技术领域technical field
本申请涉及信息交互技术领域,尤其涉及一种消息传递方法、电子设备及存储介质。The present application relates to the technical field of information interaction, and in particular to a message delivery method, electronic equipment and a storage medium.
背景技术Background technique
LCD调光需要获取后置Color sensor的数值,同时需要获取当前手机的闪光灯状态来确认色温器件的数据置信度。但是当前在Android设备中闪光灯由Cam进程控制,闪光灯状态也只有在Cam进程中轮转,并且LCD的进程和Cam的进程是天然隔离的,使用Linux提供的进程间通信方案会引入很大的隐患,所以无法通过现有的机制实现闪光灯状态的跨进程传递。LCD dimming needs to obtain the value of the rear color sensor, and at the same time, it needs to obtain the current flash status of the mobile phone to confirm the data confidence of the color temperature device. But currently the flash is controlled by the Cam process in the Android device, and the status of the flash is only rotated in the Cam process, and the LCD process and the Cam process are naturally isolated. Using the inter-process communication solution provided by Linux will introduce great hidden dangers. Therefore, the cross-process transfer of the flash state cannot be realized through the existing mechanism.
发明内容Contents of the invention
本申请实施例提供的消息传递方法可以在LCD的进程和Cam的进程需要将闪光灯状态的跨进程传递时,通过将闪光灯状态参数保存在公共模块,并在Cam进程调用传感器Hal库时将公共模块中的闪光灯状态参数上报给Cam进程实现跨进程通信,提高电子设备进程控制的便利性。The message passing method provided by the embodiment of the present application can save the flashlight state parameters in the public module when the process of the LCD and the process of the Cam need to transfer the state of the flashlight across processes, and transfer the public module when the Cam process calls the sensor Hal library The status parameters of the flashlight in are reported to the Cam process to realize cross-process communication and improve the convenience of electronic device process control.
第一方面,本申请实施例提供一种消息传递方法,应用于电子设备,方法包括:将电子设备的第一进程可操控器件的工作状态参数保存至器件驱动,其中,器件驱动为第一进程与电子设备的第二进程的公共模块;以及若确定当前调用传感器Hal库的进程为第二进程,则将器件驱动保存的第一进程可操控器件的工作状态参数上报给第二进程。通过该消息传递方法,在不同进程(第一进程和第二进程)需要跨进程进行消息传递时,可以将数据流和控制流进行结合后一起传输,具体地,可以将第一进程的状态写入到器件驱动中,第一进程的状态会跟随第二进程的数据流一同传输到第二进程中,进而实现了一种U型的消息传输,从而实现跨进程消息传递,进而一个进程可以获取到另一不同进程的状态,从而根据该不同进程的状态进行本进程的相应控制,提高电子设备进程控制的便利性。In the first aspect, the embodiment of the present application provides a method for message transmission, which is applied to electronic equipment. The method includes: saving the working state parameters of the device that can be controlled by the first process of the electronic device to the device driver, wherein the device driver is the first process A common module with the second process of the electronic device; and if it is determined that the process currently calling the sensor Hal library is the second process, then report the working state parameters of the device that can be controlled by the first process saved by the device driver to the second process. Through this message passing method, when different processes (the first process and the second process) need to carry out message passing across processes, the data flow and the control flow can be combined and transmitted together, specifically, the state of the first process can be written to Into the device driver, the state of the first process will be transmitted to the second process along with the data stream of the second process, thereby realizing a U-shaped message transmission, thereby realizing cross-process message transmission, and then a process can obtain to the state of another different process, so that the corresponding control of this process is performed according to the state of the different process, and the convenience of electronic device process control is improved.
进一步地,将电子设备的第一进程可操控器件的工作状态参数保存至器件驱动包括:在确定第一进程调用传感器Hal库时,确定第一进程可操控器件的工作状态,并将所确定的第一进程可操控器件的当前工作状态参数保存至器件驱动。Further, saving the working state parameter of the device controllable by the first process of the electronic device to the device driver includes: determining the working state of the device controllable by the first process when determining that the first process calls the sensor Hal library, and storing the determined The first process can control and save the current working state parameters of the device to the device driver.
进一步地,确定第一进程可操控器件的工作状态包括:确定第一进程可操控器件处于关闭状态或者处于工作中;其中,工作中包括低档位工作或者高档位工作。Further, determining the working state of the device controllable by the first process includes: determining that the device controllable by the first process is in a closed state or in operation; wherein, the operation includes low-level operation or high-level operation.
进一步地,在确定第一进程可操控器件的工作状态之后,将所确定的第一进程可操控器件的当前工作状态参数保存至器件驱动之前,还包括:若第一进程可操控器件处于关闭状态,则设置第一进程可操控器件对应的器件驱动的标志位置为第一属性值;若第一进程可操控器件处于工作中,则设置第一进程可操控器件对应的器件驱动的标志位置为第二属性值;其中,将所确定的第一进程可操控器件的当前工作状态参数保存至器件驱动包括:基于第一进程可操控器件对应的器件驱动的标志位置,将所确定的第一进程可操控器件的当前工作状态参数保存至器件驱动。Further, after determining the working state of the device controllable by the first process, before saving the determined current working state parameters of the device controllable by the first process to the device drive, it also includes: if the device controllable by the first process is in the closed state , then set the flag position of the device driver corresponding to the device controllable by the first process as the first attribute value; if the device controllable by the first process is in operation, set the flag position of the device driver corresponding to the device controllable by the first process as the second Two attribute values; wherein, saving the determined current working state parameters of the device controllable by the first process to the device driver includes: based on the flag position of the device driver corresponding to the device controllable by the first process, storing the determined first process controllable device The current working state parameters of the control device are saved to the device driver.
进一步地,确定第一进程调用传感器Hal库之前,还包括:基于传感器Hal库的使能类型确定当前调用传感器Hal库的进程为第一进程或是第二进程;其中,使能类型包括第一进程使能或者第二进程使能,第一进程使能表示当前第一进程调用传感器Hal库,第二进程使能表示当前第二进程调用传感器Hal库。Further, before determining that the first process calls the sensor Hal library, it also includes: based on the enabling type of the sensor Hal library, it is determined that the process currently calling the sensor Hal library is the first process or the second process; wherein the enabling type includes the first process. The process is enabled or the second process is enabled, the first process is enabled means that the current first process calls the sensor Hal library, and the second process is enabled means that the current second process calls the sensor Hal library.
进一步地,若确定当前调用传感器Hal库的进程为第二进程,将器件驱动保存的第一进程可操控器件的工作状态参数上报给第二进程之前,还包括:确定当前调用传感器Hal库的进程为第一进程或是第二进程,若为第一进程,则将第一进程对应的数据上报给第一进程;若为第二进程,则执行将器件驱动保存的第一进程可操控器件的工作状态参数上报给第二进程的步骤。Further, if it is determined that the process currently calling the sensor Hal library is the second process, before reporting the working state parameters of the first process controllable device saved by the device driver to the second process, it also includes: determining the process currently calling the sensor Hal library It is the first process or the second process. If it is the first process, report the data corresponding to the first process to the first process; if it is the second process, execute the first process that saves the device driver to control the device. A step of reporting the working state parameter to the second process.
进一步地,将第一进程包括相机进程,第二进程包括显示进程。Further, the first process includes a camera process, and the second process includes a display process.
进一步地,将电子设备的第一进程可操控器件的工作状态参数保存至器件驱动包括:将相机进程可操控的闪光灯工作状态参数保存至公共模块;若确定当前调用传感器Hal库的进程为第二进程,则将器件驱动保存的第一进程可操控器件的工作状态参数上报给第二进程包括:若确定当前调用传感器Hal库的进程为显示进程,则将闪光灯工作状态参数上报给显示进程。Further, saving the working state parameters of the device that can be controlled by the first process of the electronic device to the device driver includes: saving the working state parameters of the flash light controllable by the camera process to the public module; if it is determined that the process that currently calls the sensor Hal library is the second process, then reporting the working state parameters of the first process controllable device saved by the device driver to the second process includes: if it is determined that the process currently calling the sensor Hal library is a display process, then reporting the flashlight working state parameters to the display process.
第二方面,本申请实施例还提供一种电子设备,电子设备包括:处理器和存储器,存储器用于存储至少一条指令,指令由处理器加载并执行时以实现第一方面提供的消息传递方法。In the second aspect, the embodiment of the present application also provides an electronic device, the electronic device includes: a processor and a memory, the memory is used to store at least one instruction, and when the instruction is loaded and executed by the processor, the message delivery method provided in the first aspect is implemented .
第三方面,本申请实施例还提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现第一方面提供的消息传递方法。In the third aspect, the embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the message delivery method provided in the first aspect is implemented.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description These are some embodiments of the present application. Those skilled in the art can also obtain other drawings based on these drawings without any creative effort.
图1为本申请实施例提供的电子设备的结构示意图;FIG. 1 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
图2是本发明实施例的电子设备的软件结构框图;Fig. 2 is a software structural block diagram of the electronic equipment of the embodiment of the present invention;
图3为相关技术中不同进程之间的数据共享方式示意图;FIG. 3 is a schematic diagram of a data sharing method between different processes in the related art;
图4为电子设备的Cam进程与LCD进程之间的隔离示意图;4 is a schematic diagram of isolation between the Cam process and the LCD process of the electronic device;
图5为本申请一个实施例提供的消息传递方法的流程示意图;FIG. 5 is a schematic flowchart of a message delivery method provided by an embodiment of the present application;
图6为本申请另一个实施例提供的消息传递方法的流程示意图;FIG. 6 is a schematic flowchart of a message delivery method provided by another embodiment of the present application;
图7为本申请一个实施例提供的电子设备的框架图;FIG. 7 is a frame diagram of an electronic device provided by an embodiment of the present application;
图8为本申请实施例涉及的场景示意图;FIG. 8 is a schematic diagram of a scene involved in an embodiment of the present application;
图9为本申请一个实施例提供的一种电子设备的结构示意图。FIG. 9 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of this application.
以下对本申请涉及的概念进行说明。The concepts involved in this application are described below.
(1)、进程:系统中正在运行的一个应用程序,某个程序一旦运行就是一个进程,是资源分配的最小单位。(1) Process: An application program that is running in the system. Once a program is running, it is a process, which is the smallest unit of resource allocation.
(2)、内核空间:可以访问受保护的内存空间,有访问底层硬件设备的所有权限。(2) Kernel space: It can access the protected memory space and has all the permissions to access the underlying hardware devices.
其中,在内核空间,Binder驱动传递数据是通过内存来传递数据,Binder可以创建一块内存用来传递数据,传递流程如下:Among them, in the kernel space, the Binder driver transfers data through memory, and Binder can create a piece of memory to transfer data. The transfer process is as follows:
Client进程将要传递的数据放入到Client进程在内核空间对应的虚拟内存区;从Client进程在内核空间对应的虚拟内存拷贝到Binder驱动的内存,由于Binder驱动创建的内存和Server进程在内核空间对应的虚拟内存是同一内存地址,所以相当于直接拷贝到,通知Server进程读取数据;Server进程接到通知之后,就会从线程池中取出对应的线程,解析数据,并将最后的处理结果写入到Server进程在内核空间对应的虚拟内存中;将Server进程在内核空间对应的虚拟内存中的数据拷贝到Binder驱动的内存中,同样由于内存映射的原因,相当于直接拷贝到了Client进程在内核空间对应的虚拟内存中,并通知Client进程读取数据;Client进程接到通知之后,Client进程读取在内核空间对应的虚拟内存中的数据。The Client process puts the data to be transferred into the virtual memory area corresponding to the Client process in the kernel space; copies the virtual memory corresponding to the Client process in the kernel space to the memory driven by the Binder, because the memory created by the Binder driver corresponds to the Server process in the kernel space The virtual memory of the virtual memory is the same memory address, so it is equivalent to directly copying to it, and notifying the Server process to read the data; after the Server process receives the notification, it will take out the corresponding thread from the thread pool, analyze the data, and write the final processing result to into the virtual memory corresponding to the Server process in the kernel space; copy the data in the virtual memory corresponding to the Server process in the kernel space to the memory driven by Binder, also due to memory mapping, it is equivalent to directly copying the data to the Client process in the kernel space, and notify the Client process to read the data; after the Client process receives the notification, the Client process reads the data in the virtual memory corresponding to the kernel space.
(3)、用户空间:上层应用程序和Native层的运行空间,用户空间没法直接访问内核空间,需要系统调用才可以访问内核空间。(3) User space: the running space of the upper application program and the Native layer. The user space cannot directly access the kernel space, and system calls are required to access the kernel space.
其中,不同进程之间,用户空间不共享,但是内核空间是可以共享。Among them, user space is not shared between different processes, but kernel space can be shared.
以上为本申请涉及的概念的相应说明。The above is a corresponding description of the concepts involved in this application.
本申请实施例涉及的电子设备可以包括手机、笔记本电脑、平板电脑、可穿戴设备等移动设备。本申请实施例对电子设备的具体类型不作任何限制。The electronic devices involved in the embodiments of the present application may include mobile devices such as mobile phones, notebook computers, tablet computers, and wearable devices. The embodiment of the present application does not impose any limitation on the specific type of the electronic device.
图1为本申请实施例提供的电子设备的结构示意图。FIG. 1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
参照图1所示,本申请实施例提供的电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriberidentification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。1, the electronic device 100 provided by the embodiment of the present application may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power supply Management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, An indicator 192, a camera 193, a display screen 194, and a subscriber identification module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,系统协处理器(SystemCoprocessor,SCP),和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor ( image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, system coprocessor (System Coprocessor, SCP), and/or neural network processor (neural -network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuitsound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuitsound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver (universal asynchronous receiver) /transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and/or A universal serial bus (universal serial bus, USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flashlight, the camera 193 and the like through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to realize the touch function of the electronic device 100 .
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 . In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through the Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communication, sampling, quantizing and encoding the analog signal. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 and the wireless communication module 160 . For example: the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(displayserial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 . The MIPI interface includes a camera serial interface (camera serial interface, CSI), a display serial interface (displayserial interface, DSI), and the like. In some embodiments, the processor 110 communicates with the camera 193 through the CSI interface to realize the shooting function of the electronic device 100 . The processor 110 communicates with the display screen 194 through the DSI interface to realize the display function of the electronic device 100 .
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193 , the display screen 194 , the wireless communication module 160 , the audio module 170 , the sensor module 180 and so on. The GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface conforming to the USB standard specification, specifically, it may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100 , and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through them. This interface can also be used to connect other electronic devices, such as AR devices.
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules shown in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 . In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is configured to receive a charging input from a charger. Wherein, the charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 is charging the battery 142 , it can also supply power to the electronic device through the power management module 141 .
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the display screen 194 , the camera 193 , and the wireless communication module 160 . The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be disposed in the processor 110 . In some other embodiments, the power management module 141 and the charging management module 140 may also be set in the same device.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves and radiate them through the antenna 1 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。A modem processor may include a modulator and a demodulator. Wherein, the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal is passed to the application processor after being processed by the baseband processor. The application processor outputs sound signals through audio equipment (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194 . In some embodiments, the modem processor may be a stand-alone device. In some other embodiments, the modem processor may be independent from the processor 110, and be set in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wirelesslocal area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (wireless fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(codedivision multiple access,CDMA),宽带码分多址(wideband code division multipleaccess,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidounavigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellitesystem,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (codedivision multiple access, CDMA), wideband code Wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM , and/or IR technology, etc. The GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou satellite navigation system (beidounavigation satellite system, BDS), a quasi-zenith satellite system (quasi- zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emittingdiode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrixorganic light emitting diode的,AMOLED),柔性发光二极管(flex light-emittingdiode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot lightemitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos and the like. The display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light emitting diode). AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (quantum dot light emitting diodes, QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used for processing the data fed back by the camera 193 . For example, when taking a picture, open the shutter, the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be located in the camera 193 .
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。Camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects it to the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a complementary metal-oxide-semiconductor (complementary metal-oxide-semiconductor, CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other image signals. In some embodiments, the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。The NPU is a neural-network (NN) computing processor. By referring to the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process input information and continuously learn by itself. Applications such as intelligent cognition of the electronic device 100 can be realized through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 . The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. Such as saving music, video and other files in the external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。The internal memory 121 may be used to store computer-executable program codes including instructions. The internal memory 121 may include an area for storing programs and an area for storing data. Wherein, the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like. The storage data area can store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.) and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like. The processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。Speaker 170A, also referred to as a "horn", is used to convert audio electrical signals into sound signals. Electronic device 100 can listen to music through speaker 170A, or listen to hands-free calls.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。Receiver 170B, also called "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the receiver 170B can be placed close to the human ear to receive the voice.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can put his mouth close to the microphone 170C to make a sound, and input the sound signal to the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In some other embodiments, the electronic device 100 may be provided with two microphones 170C, which may also implement a noise reduction function in addition to collecting sound signals. In some other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions, etc.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone interface 170D is used for connecting wired earphones. The earphone interface 170D may be the USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal. In some embodiments, pressure sensor 180A may be disposed on display screen 194 . There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may be comprised of at least two parallel plates with conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view short messages is executed. When a touch operation whose intensity is greater than or equal to the first pressure threshold acts on the icon of the short message application, the instruction of creating a new short message is executed.
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B can be used to determine the motion posture of the electronic device 100 . In some embodiments, the angular velocity of the electronic device 100 around three axes (ie, x, y and z axes) may be determined by the gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the shaking angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The electronic device 100 may use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a clamshell machine, the electronic device 100 can detect opening and closing of the clamshell according to the magnetic sensor 180D. Furthermore, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, features such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。The distance sensor 180F is used to measure the distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F for distance measurement to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes. The light emitting diodes may be infrared light emitting diodes. The electronic device 100 emits infrared light through the light emitting diode. Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 . The electronic device 100 can use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to make a call, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode, automatic unlock and lock screen in pocket mode.
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。The ambient light sensor 180L is used for sensing ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket, so as to prevent accidental touch.
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access to application locks, take pictures with fingerprints, answer incoming calls with fingerprints, and the like.
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to implement a temperature treatment strategy. For example, when the temperature reported by the temperature sensor 180J exceeds the threshold, the electronic device 100 may reduce the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In some other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 caused by the low temperature. In some other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。The touch sensor 180K is also called "touch device". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”. The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the human pulse and receive the blood pressure beating signal. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone, combined into a bone conduction earphone. The audio module 170 can analyze the voice signal based on the vibration signal of the vibrating bone mass of the vocal part acquired by the bone conduction sensor 180M, so as to realize the voice function. The application processor can analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The keys 190 include a power key, a volume key and the like. The key 190 may be a mechanical key. It can also be a touch button. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100 .
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。The motor 191 can generate a vibrating reminder. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations applied to different applications (such as taking pictures, playing audio, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 194 . Different application scenarios (for example: time reminder, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。The SIM card interface 195 is used for connecting a SIM card. The SIM card can be connected and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195 . The electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards may be the same or different. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calling and data communication. In some embodiments, the electronic device 100 adopts an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the software structure of the electronic device 100 is exemplarily described by taking an Android system with a layered architecture as an example.
图2是本发明实施例的电子设备的软件结构框图。Fig. 2 is a block diagram of the software structure of the electronic device according to the embodiment of the present invention.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces. In some embodiments, the Android system is divided into four layers, which are, from top to bottom, the application program layer, the application program framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer.
应用程序层可以包括一系列应用程序包。The application layer can consist of a series of application packages.
如图2所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。As shown in Figure 2, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
应用程序框架层为应用程序层的应用程序提供应用编程接口(applicationprogramming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown in Figure 2, the application framework layer can include window managers, content providers, view systems, phone managers, resource managers, notification managers, and so on.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make it accessible to applications. Said data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebook, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. The view system can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide communication functions of the electronic device 100 . For example, the management of call status (including connected, hung up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify the download completion, message reminder, etc. The notification manager can also be a notification that appears on the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, issuing a prompt sound, vibrating the electronic device, and flashing the indicator light, etc.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core library and virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in virtual machines. The virtual machine executes the java files of the application program layer and the application program framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。A system library can include multiple function modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing, etc.
2D图形引擎是2D绘图的绘图引擎。2D graphics engine is a drawing engine for 2D drawing.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.
各功能模块之间可以通过交互的通道(Binder)201进行信息交互以及各种状态的传递,例如提供不同的APP、各系统服务模块之间的跨进程通信。在一些实施例中,Android系统包括应用程序层,应用程序框架层,内核层(Kernel)。Functional modules can exchange information and transfer various states through an interactive channel (Binder) 201 , for example, provide cross-process communication between different APPs and system service modules. In some embodiments, the Android system includes an application program layer, an application program framework layer, and a kernel layer (Kernel).
下面结合捕获拍照场景,示例性说明电子设备100软件以及硬件的工作流程。The workflow of the software and hardware of the electronic device 100 will be exemplarily described below in conjunction with capturing and photographing scenes.
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。以该触摸操作是触摸单击操作,该单击操作所对应的控件为相机应用图标的控件为例,相机应用调用应用框架层的接口,启动相机应用,进而通过调用内核层启动摄像头驱动,通过摄像头193捕获静态图像或视频。When the touch sensor 180K receives a touch operation, a corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes touch operations into original input events (including touch coordinates, time stamps of touch operations, and other information). Raw input events are stored at the kernel level. The application framework layer obtains the original input event from the kernel layer, and identifies the control corresponding to the input event. Take the touch operation as a touch click operation, and the control corresponding to the click operation is the control of the camera application icon as an example. The camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer. Camera 193 captures still images or video.
以上为对本申请实施例提供电子设备100的软件系统架构的描述。The above is a description of the software system architecture of the electronic device 100 provided for the embodiment of the present application.
以下结合附图对本申请实施例提供的消息传递方法进行详细说明。The message delivery method provided by the embodiment of the present application will be described in detail below with reference to the accompanying drawings.
当前Linux包括Android实现的进程间通信的方案中,均是采用公共部分作为桥梁实现不同进程之间的通信。In the current inter-process communication solutions implemented by Linux including Android, the public part is used as a bridge to realize the communication between different processes.
图3为相关技术中不同进程之间的数据共享方式示意图。FIG. 3 is a schematic diagram of a data sharing manner between different processes in the related art.
参照图3所示,第一进程和第二进程的相应用户空间之间存在隔离,进而导致该第一进程的用户空间与第二进程的用户空间之间不能实现直接通信,即数据不可直接共享,因此需要进行跨进程通信实现数据共享。相应的,目前可以通过以下方式进行跨进程通信:通过共享内存、管道、binder、消息队列等方式。As shown in FIG. 3 , there is isolation between the corresponding user spaces of the first process and the second process, which leads to the inability to realize direct communication between the user space of the first process and the user space of the second process, that is, data cannot be directly shared. , so cross-process communication is required to realize data sharing. Correspondingly, at present, cross-process communication can be carried out in the following ways: through shared memory, pipeline, binder, message queue, etc.
在电子设备100(例如手机)的显示屏进行显示亮度调节(LCD调光)的场景中,需要获取后置颜色传感器(Color Sensor)的数值,并且还需要获取电子设备100的闪光灯状态,并通过闪光灯状态确认色温器件的数据置信度。In the scene where the display brightness of the electronic device 100 (such as a mobile phone) is adjusted (LCD dimming), it is necessary to obtain the value of the rear color sensor (Color Sensor), and it is also necessary to obtain the flash status of the electronic device 100, and pass The flash status confirms the data confidence level of the color temperature device.
图4为电子设备的Cam进程与LCD进程之间的隔离示意图。FIG. 4 is a schematic diagram of isolation between a Cam process and an LCD process of an electronic device.
参照图4所示,电子设备100的闪关灯通过相机(Cam)进程控制,并且闪光灯状态仅在Cam进程中轮转。电子设备100显示屏的显示亮度通过显示(LCD)进程控制,然而Cam进程与LCD进程为不同的进程,且二者之间存在隔离,进而在进行LCD调光时无法通过现有的机制实现闪光灯状态的跨进程传递。Referring to FIG. 4 , the flash light of the electronic device 100 is controlled through the camera (Cam) process, and the status of the flash light is only rotated in the Cam process. The display brightness of the display screen of the electronic device 100 is controlled by the display (LCD) process, but the Cam process and the LCD process are different processes, and there is isolation between the two, so that the flash cannot be realized through the existing mechanism when LCD dimming State transfer across processes.
为克服上述技术问题,本申请实施例提供一种消息传递方法,电子设备100可以通过执行该消息传递方法,利用两个不同进程公用的硬件器件进行跨进程消息传递。具体地,在原有的设计中,某个进程的数据流和控制流都是单向的,且均为该进程的自有流程(私有流程),换言之,数据从硬件传输到上层或者控制信号从上层传输到硬件。在本申请实施例提供的消息传递方法中,在不同进程(第一进程和第二进程)需要跨进程进行消息传递时,可以将数据流和控制流进行结合后一起传输,具体地,可以将第一进程的控制流(如某个第一进程可操控器件的状态)写入到器件驱动中,在第二进程调用器件驱动时,可以将器件驱动中保存的第一进程的控制流与第二进程的数据流一同传输给第二进程,进而实现了一种U型的消息传输,从而实现跨进程消息传递,进而一个进程可以获取到另一不同进程的状态,从而根据该不同进程的状态进行本进程的相应控制,提高电子设备进程控制的便利性。In order to overcome the above technical problems, an embodiment of the present application provides a message passing method. By executing the message passing method, the electronic device 100 can use a hardware device common to two different processes to perform cross-process message passing. Specifically, in the original design, the data flow and control flow of a certain process are unidirectional, and both are the own process (private process) of the process. In other words, data is transmitted from the hardware to the upper layer or the control signal is transmitted from the The upper layer is transferred to the hardware. In the message delivery method provided by the embodiment of the present application, when different processes (the first process and the second process) need to perform message delivery across processes, the data flow and the control flow can be combined and transmitted together. Specifically, the The control flow of the first process (such as the state of a device that can be controlled by a certain first process) is written into the device driver. When the second process calls the device driver, the control flow of the first process saved in the device driver can be combined with the second process. The data streams of the two processes are transmitted to the second process together, thereby realizing a U-shaped message transmission, thereby realizing cross-process message transmission, and then one process can obtain the state of another different process, so that according to the state of the different process The corresponding control of this process is carried out, and the convenience of electronic device process control is improved.
其中需要说明的是,相比于现有技术中上层控制下层的自上而下的进程访问同一段内存的系统调用方式,本申请实施例提供的消息传递方法时采用驱动(driver)主动保存第一进程可操控器件的状态信息,并且可以主动将存储的该第一进程可操控器件的状态信息拼接在第二进程的数据流的尾端,并随第二进程的数据流一同上报给第二进程,属于自下而上的下层直接反馈上层的消息传递方式。It should be noted that, compared with the system call method in which the upper layer controls the lower layer from top to bottom to access the same segment of memory in the prior art, the message delivery method provided by the embodiment of the present application adopts the driver (driver) to actively save the first A process can control the state information of the device, and can actively splice the stored state information of the device controllable by the first process at the end of the data stream of the second process, and report it to the second process along with the data stream of the second process. The process belongs to the bottom-up message transmission method in which the lower layer directly feeds back to the upper layer.
在本申请实施例中,实现跨进程通信的方式在于通过不同进程的公共部分进行消息传递。示例性的,可以通过Linux原生的共享内存和管道,均采用一部分的公共模块作为连接点实现,但是对于Android设备中的独立进程,该公共部分可以为kernel的器件驱动(driver)。In the embodiment of the present application, the way to realize cross-process communication is to transmit messages through common parts of different processes. Exemplarily, the native shared memory and pipelines of Linux can be implemented by using a part of the public module as a connection point, but for the independent process in the Android device, the public part can be a device driver (driver) of the kernel.
在器件driver中,通常会生成多个设备节点,并以设备节点作为内核与上层的隔离。设备节点可以包括:控制器件使能(enable)、获取器件数据(data)。In the device driver, multiple device nodes are usually generated, and the device nodes are used as the isolation between the kernel and the upper layer. The device node may include: controlling device enabling (enable) and obtaining device data (data).
同时接收参数为字符串类型,通过driver函数解析得到,其中,Kernel驱动(包含上述器件driver)通过上述设备节点接收参数,并把参数解析为实际的标志位,例如enable下发0~5,通过解析此字符串获取实际的操作意图是哪个器件的关闭打开。需要说明的是,设备节点属于双工类型,既有写入操作,即下发参数给器件驱动;例如上述enable节点,也有读取操作,即上层应用读取器件驱动反馈的数据;例如上述data节点;两种操作相反,但是上下传输的介质均为字符串。At the same time, the received parameter is a string type, which is obtained by parsing the driver function. Among them, the Kernel driver (including the above-mentioned device driver) receives the parameter through the above-mentioned device node, and parses the parameter into the actual flag bit, for example, enable sends 0 to 5, and passes Parse this string to get the actual operation intent which device is off and on. It should be noted that the device node is a duplex type, which has both write operations, that is, sending parameters to the device driver; for example, the above enable node also has read operations, that is, the upper layer application reads the data fed back by the device driver; for example, the above data Node; the two operations are opposite, but the medium for up and down transmission is a string.
在一种实施方式中,可以采用参数下发的方式向器件表明当前控制使用器件的进程的身份信息。其中,参数分为CAM、LCD和FlASH三组,分别对应三个类型。具体参数列表采用枚举类型,具体如下:In an implementation manner, the identity information of the process currently controlling the use of the device may be indicated to the device in a manner of sending parameters. Among them, the parameters are divided into three groups: CAM, LCD and FlASH, corresponding to the three types. The specific parameter list adopts the enumeration type, as follows:
在一种实施方式中,不同进程之间的通信可以结合在enable_store和data_show函数共同实现。示例性的,在电子设备100(例如手机)的显示屏进行显示亮度调节(LCD调光)的场景中,在电子设备100的上层Cam进程进行闪光灯(flash)的相关操作时,可以下发对应的参数(如闪光灯状态参数)到enable_store中,进而可以将闪光灯状态参数存入器件驱动(driver),即,将闪光灯状态参数存入公共部分,进一步地公共部分中存储的闪光灯状态参数可以跟随LCD进程的数据流(data)一同传输给LCD进程,进而可以实现将Cam进程的闪光灯状态参数跨进程传递给LCD进程,LCD进程基于跨进程获取到的闪光灯状态参数进行显示亮度调节(LCD调光)。In one embodiment, the communication between different processes can be realized jointly by the enable_store and data_show functions. Exemplarily, in a scenario where the display brightness of the electronic device 100 (such as a mobile phone) is adjusted (LCD dimming), when the upper-layer Cam process of the electronic device 100 performs operations related to the flash (flash), the corresponding Parameters (such as flashlight status parameters) into enable_store, and then the flashlight status parameters can be stored in the device driver (driver), that is, the flashlight status parameters are stored in the public part, and the flashlight status parameters stored in the public part can follow the LCD The data stream (data) of the process is transmitted to the LCD process together, and then the flash status parameters of the Cam process can be passed to the LCD process across processes. The LCD process adjusts the display brightness based on the flash status parameters obtained across processes (LCD dimming) .
其中,电子设备100的闪光灯操作可以包括预闪和主闪,其中,预闪行为一般占用3秒,主闪行为一般占用0.5秒,控制闪光灯状态参数跟随LCD进程的data一同上报LCD进程可以使LCD进程获取到的闪光灯状态参数的实时性。Wherein, the flashlight operation of the electronic device 100 may include pre-flash and main flash, wherein, the pre-flash behavior generally takes 3 seconds, and the main flash behavior generally takes 0.5 seconds. Controlling the flashlight state parameters to report the LCD process together with the data of the LCD process can make the LCD The real-time performance of the flash status parameters acquired by the process.
图5为本申请一个实施例提供的消息传递方法的流程示意图。FIG. 5 is a schematic flowchart of a message delivery method provided by an embodiment of the present application.
参照图5所示,该消息传递方法可以应用于本申请实施例提供的电子设备100,该方法具体包括以下步骤:Referring to Figure 5, the message delivery method can be applied to the electronic device 100 provided in the embodiment of the present application, and the method specifically includes the following steps:
步骤501:电子设备的第一进程对第一进程可操控器件执行第一操作控制。Step 501: A first process of the electronic device executes a first operation control on a device controllable by the first process.
在一种实施方式中,该第一进程可以为Cam进程,第一进程可操控器件可以为Cam进程可以操控的闪光灯,第一操作控制可以为Cam进程控制闪光灯(flash)打开、升/降亮度或者关闭。其中,电子设备100的Cam进程可以根据闪光灯工作模式(flashmode)确定是否成功控制闪光灯,若确定成功控制闪光灯,则执行步骤502。In one embodiment, the first process can be a Cam process, the first process controllable device can be a flash that can be controlled by the Cam process, and the first operation control can be the Cam process to control the opening of the flash (flash) and the increase/decrease of brightness or off. Wherein, the Cam process of the electronic device 100 may determine whether the flashlight is successfully controlled according to the flashlight working mode (flashmode), and if it is determined that the flashlight is successfully controlled, step 502 is executed.
步骤502:基于第一操作,电子设备将第一进程可操控器件的状态参数保存至进程的公共模块。Step 502: Based on the first operation, the electronic device saves the state parameter of the device controllable by the first process to the public module of the process.
在一种实施方式中,该第一操作可以为闪光灯(flash)操作,进而电子设备100的Cam进程可以下发相应的状态参数至器件驱动(driver),具体地,由于时对闪光灯的操作,相对应的,该相应的状态参数可以为Flash_enable的参数。其中,该Flash_enable的参数具体为闪光灯状态(flash state)。在一种实施方式中,Cam进程可以将闪光灯状态(flashstate)下发到控制器件使能(enable)节点,进一步地,控制器件使能(enable)节点可以将Cam进程下发的闪光灯状态(flash state)发送给获取器件数据(data)节点。在一种实施方式中,控制器件使能(enable)节点可以周期性的将其存储的闪光灯状态(flash state)发送给获取器件数据(data)节点。In one embodiment, the first operation may be a flash light (flash) operation, and then the Cam process of the electronic device 100 may send corresponding state parameters to the device driver (driver), specifically, due to the operation of the flash light, Correspondingly, the corresponding state parameter may be a parameter of Flash_enable. Wherein, the parameter of the Flash_enable is specifically a state of a flash light (flash state). In one embodiment, the Cam process can send the flash state (flashstate) to the control device enable (enable) node, and further, the control device enable (enable) node can send the flash state (flash state) issued by the Cam process state) is sent to the device data (data) node. In one embodiment, the control device enabling (enable) node can periodically send its stored flash state (flash state) to the acquiring device data (data) node.
步骤503:电子设备控制进程的公共模块将存储的第一进程可操控器件的状态参数上报给第二进程。Step 503: The public module of the electronic device control process reports the stored state parameters of the device controllable by the first process to the second process.
在一种实施方式中,在als_work函数中,在每次拼接通道数据(channel_data)时,可以将获取器件数据(data)节点的闪光灯状态参数(flash_state)做为最后一位进行拼接,并将拼接得到的待上报数据上报给第二进程,示例性的,可以为上报给LCD进程。In one embodiment, in the als_work function, each time the channel data (channel_data) is spliced, the flash light state parameter (flash_state) of the device data (data) node can be obtained as the last bit for splicing, and the splicing The obtained data to be reported is reported to the second process, for example, may be reported to the LCD process.
在其他实施方式中,在每次拼接通道数据(channel_data)时,可以将获取器件数据(data)节点的闪光灯状态参数(flash_state)做为最后一位进行拼接,并将拼接得到的待上报数据同事上报给多个需要该闪光灯状态参数(flash_state)的进程。In other implementations, each time the channel data (channel_data) is spliced, the flash light state parameter (flash_state) of the acquired device data (data) node can be used as the last digit for splicing, and the spliced data to be reported can be Report to multiple processes that need the flash status parameter (flash_state).
图6为本申请另一个实施例提供的消息传递方法的流程图。Fig. 6 is a flowchart of a message delivery method provided by another embodiment of the present application.
图7为本申请一个实施例提供的电子设备的框架图。Fig. 7 is a frame diagram of an electronic device provided by an embodiment of the present application.
结合图6和图7所示,该方法可以通过以下步骤实现:As shown in Figure 6 and Figure 7, the method can be implemented through the following steps:
步骤601:电子设备加载传感器Hal库。Step 601: the electronic device loads the sensor Hal library.
其中,可以将Kernel driver作为两个独立进程的公共部分,使用data_show作为数据联通的桥梁,实现某进程独享的状态信息传递至其他独立进程。针对同一个sensorHal库(即传感器Hal库),设计不同的en_type(使能类型),并设定进程使用的字段,进而可以实现静态的库文件动态识别调用进程,从而完成针对不同进程的不同处理流程。Among them, the Kernel driver can be used as a common part of two independent processes, and data_show can be used as a bridge for data communication, so that the state information exclusive to a certain process can be transmitted to other independent processes. For the same sensorHal library (that is, the sensor Hal library), design different en_type (enablement type), and set the fields used by the process, and then realize the static library file to dynamically identify the calling process, so as to complete different processing for different processes process.
步骤602:电子设备确定当前调用传感器Hal库的进程的身份信息,基于确定结果,若为第一进程,则执行步骤603,若为第二进程,则执行步骤604。Step 602: The electronic device determines the identity information of the process currently calling the sensor Hal library. Based on the determination result, if it is the first process, perform step 603, and if it is the second process, perform step 604.
在一种实施方式中,由于针对同一个sensorHal库,设计不同的en_type,确设定了进程使用的字段,进而可以实现静态的库文件动态识别调用进程。即,可以通过sensorHal库中的en_type确定当前调用传感器Hal库的进程的身份信息。示例性的,在Cam进程和LCD进程跨进程通信,且LCD进程需要获取Cam进程中的闪光灯状态参数的场景中,可以根据en_type确定当前调用传感器Hal库的进程为Cam进程或是LCD进程,若确定当前是Cam进程调用传感器Hal库(即,Cam_enable),则执行步骤603,若确定当前是LCD进程调用传感器Hal库(即,LCD_enable),则执行步骤604。In one embodiment, since different en_types are designed for the same sensorHal library, the fields used by the process are definitely set, so that the static library file can dynamically identify the calling process. That is, the identity information of the process currently calling the sensorHal library can be determined through en_type in the sensorHal library. Exemplarily, in the scene where the Cam process and the LCD process communicate across processes, and the LCD process needs to obtain the flashlight status parameter in the Cam process, it can be determined according to en_type that the process currently calling the sensor Hal library is the Cam process or the LCD process, if If it is determined that the Cam process calls the sensor Hal library (ie, Cam_enable), then step 603 is performed; if it is determined that the LCD process currently calls the sensor Hal library (ie, LCD_enable), then step 604 is performed.
步骤603:电子设备将传感器Hal库设置为第一进程使用,后执行步骤605。Step 603: the electronic device sets the sensor Hal library as the first process to use, and then executes step 605.
步骤604:电子设备将传感器Hal库设置为第二进程使用,后执行步骤608。Step 604: The electronic device sets the sensor Hal library to be used by the second process, and then executes Step 608.
步骤605:电子设备确定第一进程可操控器件的工作状态,基于确定结果,若为关闭状态,则执行步骤606,若为工作状态,则执行步骤607。Step 605: The electronic device determines the working state of the device controllable by the first process, and based on the determination result, if it is in the closed state, perform step 606, and if it is in the working state, perform step 607.
步骤606:电子设备设置第一进程可操控器件对应的器件驱动的标志位置为第一属性值后,执行步骤608。Step 606: After the electronic device sets the flag position of the device driver corresponding to the first process-controllable device as the first attribute value, step 608 is executed.
在一种实施方式中,若确定第一进程可操控器件的工作状态为关闭状态,则设置器件驱动的标志位置为第一属性值可以为:若确定Cam进程可操控的闪光灯的工作状态为关闭状态,则设置器件驱动的标志位置为0,并执行步骤608。In one embodiment, if it is determined that the working state of the first process controllable device is off, then setting the flag position driven by the device to the first attribute value may be: if it is determined that the working state of the flashlight controllable by the Cam process is off state, set the flag position of the device driver to 0, and execute step 608 .
步骤607:电子设备设置第一进程可操控器件对应的器件驱动的标志位置为第二属性值后,执行步骤608。Step 607: After the electronic device sets the flag position of the device driver corresponding to the device that can be controlled by the first process as the second attribute value, step 608 is executed.
其中,Cam进程可操控的闪光灯若处于工作中,具体可以为低档位工作(low)或者高档位工作(high)。Wherein, if the flashlight controllable by the Cam process is working, specifically, it can work at a low gear (low) or at a high gear (high).
在一种实施方式中,若确定Cam进程可操控的闪光灯的工作状态为low或者high,则设置器件驱动的标志位置为1,并执行步骤608。In one embodiment, if it is determined that the working state of the flash light controllable by the Cam process is low or high, then set the flag bit driven by the device to 1, and execute step 608 .
步骤608:电子设备将进程的公共模块中存储的第一进程可操控器件的工作状态参数上报给传感器Hal库。Step 608: The electronic device reports the working state parameters of the device controllable by the first process stored in the public module of the process to the sensor Hal library.
其中,在将第一进程可操控器件的工作状态参数上报给上层进程之前,可以通过传感器Hal进行信息拦截,进行当前调用传感器Hal库的进程的身份信息的确认,进而将第一进程可操控器件的工作状态参数上报给需要该信息的进程,具体实现如步骤609至步骤611。Among them, before reporting the working state parameters of the first process-controllable device to the upper-layer process, the sensor Hal can be used to intercept information and confirm the identity information of the process that currently calls the sensor Hal library, and then the first process-controllable device The working state parameters of the information are reported to the process that needs the information, and the specific implementation is as in step 609 to step 611.
步骤609:电子设备确定当前调用传感器Hal库的进程的身份信息,若为第一进程,则执行步骤610,若为第二进程,则执行步骤611。Step 609: The electronic device determines the identity information of the process currently calling the sensor Hal library. If it is the first process, perform step 610, and if it is the second process, perform step 611.
步骤610:电子设备将第一进程对应的数据上报给第一进程。Step 610: The electronic device reports data corresponding to the first process to the first process.
在一种实施方式中,电子设备100可以仅上报色温数据给Cam进程。In an implementation manner, the electronic device 100 may only report the color temperature data to the Cam process.
步骤611:电子设备将第一进程可操控器件的工作状态参数上报给第二进程。Step 611: The electronic device reports the working state parameters of the devices controllable by the first process to the second process.
在一种实施方式中,电子设备100可以将闪光灯状态参数上报给LCD进程。In an implementation manner, the electronic device 100 may report the status parameter of the flash light to the LCD process.
在其他实施例中,采用以下两种方式实现跨进程消息传递:In other embodiments, cross-process message passing is implemented in the following two ways:
第一方式:采用metadata或者prop作为公共部分,把闪光灯的状态存储到meta或者prop中,在其他独立进程中开启循环监听来获取此公共部分的数据。The first method: use metadata or prop as the public part, store the state of the flash in meta or prop, and open loop monitoring in other independent processes to obtain the data of this public part.
第二方式:采用Android定义的binder机制实现进程间通信,在Camx的flash控制部分设计对应的binder服务,并通过系统实现的service_manager进行数据传递,在LCD中的实际控制逻辑中增加binder的接收逻辑,实现状态信息的获取。The second method: use the binder mechanism defined by Android to realize inter-process communication, design the corresponding binder service in the flash control part of Camx, and perform data transmission through the service_manager implemented by the system, and add the receiving logic of the binder to the actual control logic in the LCD , to achieve status information acquisition.
以上两替代方案可以实现进程间通信的功能,但是由于闪光灯在某些使用场景下torch的时间较短,为保证可以实时获取闪光灯的最新状态,需要提供LCD进程中的监听频率,从而导致功耗的上涨,所以综合考虑选择当前方案。The above two alternatives can realize the function of inter-process communication, but because the torch time of the flash in some usage scenarios is relatively short, in order to ensure that the latest status of the flash can be obtained in real time, it is necessary to provide the monitoring frequency in the LCD process, resulting in power consumption The rise, so comprehensive consideration to choose the current plan.
图8为本申请实施例涉及的场景示意图。FIG. 8 is a schematic diagram of a scene involved in an embodiment of the present application.
参照图8所示,该场景为多个进程对于同一硬件资源同时进行使用时,且存在的同步或者消息传输的场景。示例性的,在某一场景中,两个进程(第一进程和第二进程)对于同一硬件资源同时进行使用,且存在的同步或者消息传输。在当前设备中的AO Cam,当前针对其有很多上层应用在使用,例如人脸检测、扫码等等,可以使用当前的方式,把AO Cam作为公共部分,传递人脸和手机使用情况等等给到扫码场景,来辅助确认是否需要进行扫码,从而提高手机的资源使用效率。Referring to FIG. 8 , this scenario is a scenario where multiple processes use the same hardware resource at the same time, and there is synchronization or message transmission. Exemplarily, in a certain scenario, two processes (the first process and the second process) use the same hardware resource at the same time, and there is synchronization or message transmission. The AO Cam in the current device is currently being used by many upper-level applications, such as face detection, code scanning, etc. You can use the current method to use the AO Cam as a public part to transmit the face and mobile phone usage, etc. The code scanning scene is given to assist in confirming whether code scanning is required, thereby improving the resource usage efficiency of the mobile phone.
图9为本申请一个实施例提供的一种电子设备的结构示意图。FIG. 9 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
参照图9所示,该电子设备可以包括:处理器901和存储器902,存储器902用于存储至少一条指令,指令由处理器901加载并执行时以实现本申请任一实施例提供的消息传递方法。As shown in FIG. 9, the electronic device may include: a processor 901 and a memory 902, the memory 902 is used to store at least one instruction, and when the instruction is loaded and executed by the processor 901, the message delivery method provided by any embodiment of the present application is implemented. .
本申请实施例还提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现本申请任一实施例提供的消息传递方法。An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the message delivery method provided in any embodiment of the present application is implemented.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined Or it can be integrated into another system, or some features can be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, or in the form of hardware plus software functional units.
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机装置(可以是个人计算机,服务器,或者网络装置等)或处理器(Processor)执行本申请各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-mentioned integrated units implemented in the form of software functional units may be stored in a computer-readable storage medium. The above-mentioned software functional units are stored in a storage medium, and include several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) or a processor (Processor) to execute the methods described in various embodiments of the present application. partial steps. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other various media that can store program codes. .
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。The above is only a preferred embodiment of the application, and is not intended to limit the application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the application should be included in the application. within the scope of protection.
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, rather than limiting them; although the application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present application. scope.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211210336.1ACN116709609B (en) | 2022-09-30 | 2022-09-30 | Message delivery method, electronic device and storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211210336.1ACN116709609B (en) | 2022-09-30 | 2022-09-30 | Message delivery method, electronic device and storage medium |
| Publication Number | Publication Date |
|---|---|
| CN116709609Atrue CN116709609A (en) | 2023-09-05 |
| CN116709609B CN116709609B (en) | 2024-05-14 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211210336.1AActiveCN116709609B (en) | 2022-09-30 | 2022-09-30 | Message delivery method, electronic device and storage medium |
| Country | Link |
|---|---|
| CN (1) | CN116709609B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106547634A (en)* | 2016-11-28 | 2017-03-29 | 武汉斗鱼网络科技有限公司 | A kind of method and device of striding course communication |
| CN108170549A (en)* | 2017-12-28 | 2018-06-15 | 努比亚技术有限公司 | Mobile terminal restarts localization method, mobile terminal and computer readable storage medium |
| US20190317843A1 (en)* | 2018-04-11 | 2019-10-17 | EMC IP Holding Company LLC | Shared memory usage tracking across multiple processes |
| CN112379952A (en)* | 2020-12-09 | 2021-02-19 | 成都傲梅科技有限公司 | Method for implementing cross-process callback |
| CN113760578A (en)* | 2021-08-28 | 2021-12-07 | 特斯联科技集团有限公司 | Method, apparatus, device and computer program for fast transmission of big data across processes |
| WO2022111665A1 (en)* | 2020-11-30 | 2022-06-02 | 花瓣云科技有限公司 | Application management method and apparatus, and device and storage medium |
| CN115016957A (en)* | 2022-05-26 | 2022-09-06 | 湖南三一智能控制设备有限公司 | Method, device, terminal and vehicle for cross-process memory sharing |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106547634A (en)* | 2016-11-28 | 2017-03-29 | 武汉斗鱼网络科技有限公司 | A kind of method and device of striding course communication |
| CN108170549A (en)* | 2017-12-28 | 2018-06-15 | 努比亚技术有限公司 | Mobile terminal restarts localization method, mobile terminal and computer readable storage medium |
| US20190317843A1 (en)* | 2018-04-11 | 2019-10-17 | EMC IP Holding Company LLC | Shared memory usage tracking across multiple processes |
| WO2022111665A1 (en)* | 2020-11-30 | 2022-06-02 | 花瓣云科技有限公司 | Application management method and apparatus, and device and storage medium |
| CN112379952A (en)* | 2020-12-09 | 2021-02-19 | 成都傲梅科技有限公司 | Method for implementing cross-process callback |
| CN113760578A (en)* | 2021-08-28 | 2021-12-07 | 特斯联科技集团有限公司 | Method, apparatus, device and computer program for fast transmission of big data across processes |
| CN115016957A (en)* | 2022-05-26 | 2022-09-06 | 湖南三一智能控制设备有限公司 | Method, device, terminal and vehicle for cross-process memory sharing |
| Publication number | Publication date |
|---|---|
| CN116709609B (en) | 2024-05-14 |
| Publication | Publication Date | Title |
|---|---|---|
| CN114816210B (en) | A full-screen display method and device for a mobile terminal | |
| CN114650363B (en) | Image display method and electronic device | |
| WO2021169337A1 (en) | In-screen fingerprint display method and electronic device | |
| CN113722058B (en) | Resource calling method and electronic equipment | |
| CN113254409B (en) | File sharing method, system and related equipment | |
| CN114125130B (en) | Method for controlling communication service state, terminal device and readable storage medium | |
| CN113805797B (en) | Processing method of network resource, electronic equipment and computer readable storage medium | |
| CN113641271B (en) | Application window management method, terminal device and computer readable storage medium | |
| CN113887264B (en) | Code scanning method, system and related device | |
| CN118626005A (en) | Method and device for adjusting memory configuration parameters | |
| CN110636554A (en) | Data transmission method and device | |
| CN110286975A (en) | Display method and electronic device of a foreground element | |
| CN115314591A (en) | Device interaction method, electronic device, and computer-readable storage medium | |
| CN115904282A (en) | Screen projection method, device, storage medium and computer program product | |
| CN113438366A (en) | Information notification interaction method, electronic device and storage medium | |
| CN116051351A (en) | Special effect processing method and electronic equipment | |
| CN115599565A (en) | Method and device for sending clipboard data | |
| CN116048831A (en) | A target signal processing method and electronic equipment | |
| CN115017498B (en) | Method for operating applet and electronic device | |
| CN114828098B (en) | Data transmission method and electronic device | |
| CN116089057A (en) | Resource scheduling method, device, storage medium and program product | |
| CN113050864B (en) | Screen capturing method and related equipment | |
| CN115017227A (en) | Data synchronization method and related equipment | |
| CN116709609B (en) | Message delivery method, electronic device and storage medium | |
| CN114826636B (en) | Access control system and related methods and devices |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CP03 | Change of name, title or address | Address after:Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Patentee after:Honor Terminal Co.,Ltd. Country or region after:China Address before:3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Patentee before:Honor Device Co.,Ltd. Country or region before:China | |
| CP03 | Change of name, title or address |