CN114579325A - Inter-process communication method and device - Google Patents

Inter-process communication method and device Download PDF

Info

Publication number
CN114579325A
CN114579325A CN202011381217.3A CN202011381217A CN114579325A CN 114579325 A CN114579325 A CN 114579325A CN 202011381217 A CN202011381217 A CN 202011381217A CN 114579325 A CN114579325 A CN 114579325A
Authority
CN
China
Prior art keywords
system service
application program
memory
access reference
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011381217.3A
Other languages
Chinese (zh)
Inventor
孙文涌
韩风
程飞飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202011381217.3A priority Critical patent/CN114579325A/en
Priority to PCT/CN2021/134160 priority patent/WO2022111711A1/en
Publication of CN114579325A publication Critical patent/CN114579325A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/543Local

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Telephone Function (AREA)

Abstract

When the access reference of the first system service is not stored in the memory of the application program process, the application program obtains the access reference of the first system service from a service manager and stores the access reference of the first system service in the memory of the application program process. When the application program accesses the access reference of the system service for the first time, the access reference of the system service is stored in the memory of the application program process, and the access reference of the system service is accessed again subsequently, the access reference of the system service is directly obtained from the memory, and a request to a service manager through Binder communication is not needed, so that the number of Binder communication is reduced, and the system performance is improved.

Description

Inter-process communication method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for interprocess communication.
Background
The Android system (Android) is an operating system commonly used for electronic devices such as smart phones, and two processes in the Android system communicate with each other through a Binder, so the Binder is also called an Inter-Process Communication (IPC) mechanism. The number of Binder communications and the time consumed by the Binder communications in the system greatly affect the performance of the system.
The Binder communication mainly comprises three processes: the method comprises the steps of service registration, service acquisition and service use, wherein the service registration refers to the step that each system service in a system registers to a service manager (server manager), the service manager stores information of the system service after registration is completed, in the service acquisition stage, a client (or called as application) requests the service manager for access reference of the system service to be accessed, the service manager returns the system service to the client, and the client accesses the system service according to the obtained system service access reference. In the service obtaining stage, a client and a service manager need to carry out Binder communication, the client requests a system service access reference to a Binder driver located in a kernel, the Binder driver sends a request to the service manager after receiving the request, the service manager returns the access reference of the system service requested by the client to the Binder according to the request, the Binder driver returns the access reference of the system service to the client, and the process needs four steps. In the related technology, the acquired services are optimized, when a client acquires the access reference of a certain system service for the first time, the Binder driver stores the access reference of the system service requested by the client into the kernel, the Binder driver is positioned in the kernel, the Binder driver independently maintains the access reference of the system service for each client, and when the client requests the access reference of the system service again, the Binder driver inquires the access reference of the system service from the kernel and returns the access reference of the system service to the client without requesting the access reference of the system service to the service manager, so that two steps are saved.
However, when there are many processes running in the system, the resources occupied by Binder communication are still high, which greatly affects the system performance and cannot meet the user requirements.
Disclosure of Invention
The embodiment of the application provides a method and a device for interprocess communication, which can reduce the number of Binder communication and improve the system performance.
In a first aspect, the present application provides an inter-process communication method, including: the application program judges whether the access reference of the first system service is stored in the memory of the application program process; when the access reference of the first system service is stored in the memory of the application program process, accessing the first system service by using the access reference of the first system service; when the access reference of the first system service is not stored in the memory of the application program process, the application program acquires the access reference of the first system service from a service manager through Binder communication according to the identifier of the first system service, accesses the first system service by using the access reference of the first system service, and stores the access reference of the first system service in the memory of the application program process.
In the method, when an application program accesses a first system service for the first time, an access reference of the first system service is not stored in a memory of an application program process, the application program can request the access reference of the first system service from a service manager through Binder communication and store the requested access reference of the first system service into the memory of the application program process, and then when the application program accesses the first system service again, the application program can acquire the access reference of the first system service from the memory of the application program process without requesting the access reference of the first system service from a kernel or the service manager through Binder communication, so that the number of times of Binder communication in the system is reduced.
In a first possible implementation manner, after storing the access reference of the first system service in the memory of the application program process, the method further includes: and when the number of the access references of the system services stored in the memory of the application program process reaches a preset number, the application program deletes the access references of one or more system services from the memory of the application program process.
In the implementation mode, when the number of the access references of the system services stored in the memory reaches the preset number, the system services are deleted, and the sufficient memory space of the system is ensured.
Optionally, the deleting, by the application program, the access reference of the one or more system services from the memory of the application program process includes: the application deletes access references for one or more system services from the application process' memory using least recently used LRU, least frequently used LFU, or first-in-first-out FIFO.
In a first possible implementation manner, after storing the access reference of the first system service in the memory of the application program process, the method further includes: and the application program requests the Binder driver to monitor the state of the first system service.
In the implementation mode, the application program requests to monitor the system service, so that the application program can know the system service in time after the address of the system service is changed after the system service is restarted, and the system service cannot be used due to the fact that the system service cannot be used because the system service is requested by a wrong system service address.
In a first possible implementation manner, the method further includes: the application program receives a deletion request sent by the Binder driver, wherein the deletion request is used for requesting to delete the access reference of the first system service, and the deletion request is sent by the Binder driver after monitoring the restart of the first system service; and the application program deletes the access reference of the first system service from the memory of the application program process according to the deletion request.
In the implementation manner, the Binder driver sends a deletion request to the application program after monitoring that the first system service is restarted, so as to delete the access reference of the first system service deleted from the memory of the application program process, and can ensure the correctness of the access reference of the first system service in the memory of the application program process.
Optionally, the delete request further includes an access reference after the restart of the first system service, and correspondingly, the method further includes: and the application program stores the access reference of the restarted first system service into a memory of the application program process.
In this implementation manner, the application stores the access reference of the restarted first system service in the memory of the application process, so that the access reference of the first system service in the memory of the application process can be updated, and the first system service can be accurately called.
In a first possible implementation manner, the method further includes: the application requesting an access reference for the first system service from the service manager; when the access reference of the first system service stored in the memory of the application program process is different from the access reference of the first system service requested to the service manager, the application program updates the access reference of the first service stored in the memory of the application program process to the access reference of the first system service requested to the service manager.
In this implementation manner, the application program stores the access reference of the restarted first system service in the memory of the application program process, and updates the function of the access reference of the first system service in the memory of the application program process, so that the correctness of the access reference of the first system service in the memory of the application program process can be ensured, and the first system service can be accurately called.
Optionally, the requesting, by the application program, the access reference of the first system service from the service manager includes: the application requests the service manager for an access reference to each system service stored in the memory of the application process.
Or, the application requesting an access reference of the first system service from the service manager includes: and when the storage time of the access reference of the first system service in the memory of the application program process reaches a preset time length, the application program requests the service manager for the access reference of the first system service.
In this implementation manner, when the storage time of the access reference of the first system service in the memory of the application program process reaches the preset time length, the application program requests the service manager for the access reference of the first system service, so that it is avoided that when the first system service is restarted, the access reference of the first system service read from the memory of the application program process is incorrect due to a change in the access reference of the first system service, so that the first system service cannot be accessed, and the problem can be avoided by accessing once for a certain preset time length.
In a first possible implementation manner, the determining, by the application program, whether an access reference of a first system service is stored in a memory of the application program process includes: the application program inquires the memory of the application program process according to the identification of the first system service; if the memory of the application program process stores the identifier of the first system service, determining that the access reference of the first system service is stored in the memory of the application program process; and if the identifier of the first system service is not stored in the memory of the application program process, determining that the access reference of the first system service is not stored in the memory of the application program process.
In a second aspect, the present application provides an inter-process communication method, including: a Binder driver receives a monitoring request sent by an application program, wherein the monitoring request is used for requesting to monitor the state of a first system service; and the Binder driver monitors the state of the first system service according to the monitoring request.
In the method, the Binder driver monitors the state of the first system service, so that the situation that the first system service cannot be accessed due to the fact that the access reference of the first system service read from the memory of the application program process is wrong due to the fact that the access reference of the first system service is changed when the first system service is restarted can be avoided.
In a first possible implementation manner, when the state restart of the first system service is monitored, the Binder driver sends a deletion request to the application program, where the deletion request is used to indicate that the access reference of the first system service is deleted.
In the implementation manner, the Binder driver sends a deletion request to the application program after monitoring that the first system service is restarted, so as to delete the access reference of the first system service deleted from the memory of the application program process, and can ensure the correctness of the access reference of the first system service in the memory of the application program process.
Optionally, the delete request includes an access reference after the restart of the first system service, and correspondingly, the method further includes: and the Binder driver acquires the access reference of the first system service after restarting from the service manager.
In a third aspect, the present application provides an interprocess communication apparatus, which may include various modules for implementing the method in the first aspect, and the modules may be implemented by software and/or hardware.
In a fourth aspect, the present application provides another interprocess communication apparatus, which may include various modules for implementing the method in the second aspect, and the modules may be implemented by software and/or hardware.
In a fifth aspect, the present application provides an interprocess communication apparatus, comprising: a memory and a processor; the memory is to store program instructions; the processor is configured to invoke program instructions in the memory to perform a method according to the first aspect or any one of its possible implementations.
In a sixth aspect, the present application provides a chip comprising at least one processor and a communication interface, the communication interface and the at least one processor are interconnected by a line, and the at least one processor is configured to execute a computer program or instructions to perform the method according to the first aspect or any one of the possible implementations thereof.
In a seventh aspect, the present application provides a computer-readable medium storing program code for execution by a device, the program code comprising instructions for performing the method according to the first aspect or any one of its possible implementations.
In an eighth aspect, the present application provides a computer program product containing instructions which, when run on a computer, cause the computer to perform the method according to the first aspect or any one of its possible implementations.
In a ninth aspect, the present application provides a computing device comprising at least one processor and a communication interface, the communication interface and the at least one processor being interconnected by a line, the communication interface being in communication with a target system, the at least one processor being configured to execute a computer program or instructions to perform the method according to the first aspect or any one of the possible implementations thereof.
Drawings
Fig. 1 is a schematic structural diagram of an electronic device to which the present application is applicable;
FIG. 2 is a schematic diagram of a Binder communication architecture;
FIG. 3 is a flowchart of an inter-process communication method according to an embodiment of the present disclosure;
FIG. 4 is a diagram illustrating an interprocess communication architecture suitable for use with an embodiment of the present application;
FIG. 5 is a flowchart of an interprocess communication method provided in the second embodiment of the present application
FIG. 6 is a diagram illustrating access reference updates for system services in process memory of an application;
fig. 7 is a signaling flowchart of an inter-process communication method according to a third embodiment of the present application;
fig. 8 is a flowchart of an interprocess communication method according to a fourth embodiment of the present application;
FIG. 9 is a diagram illustrating an interprocess communication architecture according to a fourth embodiment;
FIG. 10 is a block diagram of an interprocess communication device according to an embodiment of the present application;
FIG. 11 is a schematic diagram of an interprocess communication device according to another embodiment of the present application;
fig. 12 is a schematic structural diagram of an interprocess communication device according to another embodiment of the present application.
Detailed Description
The application provides an inter-process communication method, which is applied to an electronic device, where the electronic device may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an internet book, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Personal Digital Assistant (PDA), a vehicle-mounted device, a wearable device, and the like, and the embodiment of the application does not specially limit the specific form of the electronic device.
Fig. 1 is a schematic structural diagram of an electronic device suitable for the present application, and as shown in fig. 1, the electronic device 100 may include: the mobile terminal includes a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like. It is to be understood that the illustrated structure of the present embodiment does not constitute a specific limitation to the electronic apparatus 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, a Display Processing Unit (DPU), and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors. In some embodiments, the electronic device 100 may also include one or more processors 110. The controller may be, among other things, a neural center and a command center of the electronic device 100. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution. A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. This avoids repeated accesses, reduces the latency of the processor 110, and thus increases the efficiency of the system of the electronic device 100.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc. The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone.
It should be understood that the connection relationship between the modules according to the embodiment of the present invention is only illustrative, and is not limited to the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via 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. The charging management module 140 may also supply power to the electronic device 100 through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented 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. The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may 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.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier, etc. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLAN), bluetooth, Global Navigation Satellite System (GNSS), Frequency Modulation (FM), NFC, infrared technology (IR), and the like. 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, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves via the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that electronic device 100 can communicate with networks and other devices through wireless communication techniques. The wireless communication technologies may include GSM, GPRS, CDMA, WCDMA, TD-SCDMA, LTE, GNSS, WLAN, NFC, FM, and/or IR technologies, among others. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The electronic device 100 may implement display functions via 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 an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute instructions to generate or change display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, with N being a positive integer greater than 1.
The electronic device 100 may implement the camera function via the ISP, one or more cameras 193, video codecs, GPU, one or more displays 194, and application processor, among other things.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent recognition of the electronic device 100 can be realized through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The DPU is also called a Display Sub-System (DSS), and is used for adjusting the color of the Display screen 194, and the DPU may adjust the color of the Display screen through a three-dimensional look-up table (3D LUT). The DPU may also perform scaling, noise reduction, contrast enhancement, backlight brightness management, hdr processing, display parameter Gamma adjustment, and the like on the picture.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability 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. For example, data files such as music, photos, videos, and the like are saved in the external memory card.
Internal memory 121 may be used to store one or more computer programs, including instructions. The processor 110 may cause the electronic device 100 to execute various functional applications, data processing, and the like by executing the above-described instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Wherein, the storage program area can store an operating system; the storage area may also store one or more application programs (e.g., gallery, contacts, etc.), etc. The storage data area may store data (e.g., photos, contacts, etc.) created during use of the electronic device 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like. In some embodiments, the processor 110 may cause the electronic device 100 to execute various functional applications and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor 110.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc. The audio module 170 is configured to convert digital audio information into an analog audio signal for output, and also configured to convert an analog audio input into a 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 disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110. The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The electronic apparatus 100 can listen to music through the speaker 170A or listen to a handsfree call. The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the electronic apparatus 100 receives a call or voice information, it can receive voice by placing the receiver 170B close to the ear of the person. The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can input a voice signal to the microphone 170C by speaking the user's mouth near the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, perform directional recording, and so on. The headphone interface 170D is used to connect a wired headphone. The headset interface 170D may be the USB interface 130, may be an open mobile electronic device platform (OMTP) standard interface of 3.5mm, and may also be a CTIA (cellular telecommunications industry association) standard interface.
The sensors 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, a bone conduction sensor 180M, and the like.
The pressure sensor 180A is used for sensing a pressure signal, and converting the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a wide variety, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., the x, y, and z axes) may be determined by gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the electronic device 100, calculates a distance to be compensated for by the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement, thereby achieving anti-shake. The gyro sensor 180B may also be used for navigation, body sensing game scenes, and the like.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. The method can also be used for recognizing the posture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, taking a picture of a scene, the electronic device 100 may utilize the distance sensor 180F to range to achieve fast focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light to the outside through the light emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it can 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 are no objects near the electronic device 100. The electronic device 100 can utilize the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear for talking, so as to automatically turn off the screen to achieve the purpose of saving power. The proximity light sensor 180G may also be used in a holster mode, a pocket mode automatically unlocks and locks the screen.
The ambient light sensor 180L is used to sense the ambient light level. Electronic device 100 may adaptively adjust the brightness of display screen 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
A fingerprint sensor 180H (also referred to as a fingerprint recognizer) for collecting a fingerprint. The electronic device 100 can utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, photograph the fingerprint, answer an incoming call with the fingerprint, and so on. Further description of fingerprint sensors may be found in international patent application PCT/CN2017/082773 entitled "method and electronic device for handling notifications", which is incorporated herein by reference in its entirety.
Touch sensor 180K, which may also be referred to as a touch panel or touch sensitive surface. The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a touch screen. The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device 100, different from the position of the display screen 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, the bone conduction sensor 180M may acquire a vibration signal of the human vocal part vibrating the bone mass. The bone conduction sensor 180M may also contact the human body pulse to receive the blood pressure pulsation signal. In some embodiments, the bone conduction sensor 180M may also be disposed in a headset, integrated into a bone conduction headset. The audio module 170 may analyze a voice signal based on the vibration signal of the bone mass vibrated by the sound part acquired by the bone conduction sensor 180M, so as to implement a voice function. The application processor can analyze 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.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys or touch keys. The electronic apparatus 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 100.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be brought into and out of contact with the electronic apparatus 100 by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. The same SIM card interface 195 can be inserted with multiple cards at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
The operating system of the electronic device 100 needs inter-process communication, a common inter-process communication mechanism is a Binder communication mechanism, fig. 2 is a schematic diagram of a Binder communication architecture, the Binder communication adopts a client/server architecture, as shown in fig. 2, the architecture includes an application 11, a Binder driver 22, a service manager 23, and system services (system services) 24.
The application 21 acts as a client, also referred to as a client process, of the Binder communication, and the system service 24 acts as a server, also referred to as a service process, of the Binder communication. A client process is a process that uses system services and a service process is a process that provides system services.
The application 21 may be an application provided by the electronic device itself, or an application provided by a third-party device, and one or more processes (processes) may be established during the running process of the application 21, and the processes may be executed in parallel. A process is a running activity of a program with independent functionality with respect to a certain data set. It can apply for and own system resources, and is a dynamic concept and an active entity. It is the basic unit that the operating system executes dynamically, and in the traditional operating system, the process is the basic allocation unit and the basic execution unit.
Each process has an own access space, and in the electronic device using the android system, each process can only run in the own access space, which is a virtual access space. The access space is divided into a user space and a kernel space, and in fig. 1, the application 21, the service manager 23 and the system service 24 are located in the user space, and the Binder driver is located in the kernel space. With respect to the user space, the application 21 and the system service 24 are not shareable, i.e., the application 21 and the system service 24 are each for a separate user space. For kernel space, the application 21 and system services 24 may be shared. Each communication between the application 21 and the system service 24 is realized by the Binder driver 22 located in the kernel space.
The Binder driver 22 and the service manager 23 can be regarded as an infrastructure of an android platform, and the application 21 and the system service 24 can be regarded as an application layer of the android platform. The Binder driver 22 is also called a Binder driver, and the Binder driver 22 is responsible for establishing Binder communication between processes, managing a Binder reference counter, transmitting a data packet between processes and other series of bottom layer support.
The service manager 23 is used to manage various system services, such as registration of the system services, access reference (i.e., reference) management of the system services, and the like. The system services 24 are a type of application program that is a program, routine, or process that performs specified system functions to support other programs, particularly underlying (near hardware) programs. The access references of the system services may be stored on the service manager 23 in a service access reference list comprising identifications of a plurality of system services.
In the communication process based on the binder mechanism, the following three processes are mainly included: registering for services, obtaining services, and using services.
All system services 24 in the android system need to be registered on the service manager 23, the service manager 23 stores information of the registered system services 24, the information of the registered system services 24 includes an identifier of the system service 24 and an access reference of the system service 24, the identifier of the system service 24 corresponds to the access reference of the system service 24 one by one, a name of the system service 24 is used for uniquely identifying one system service 24, and the access reference of the system service 24 is used for indexing the system service. The system service 24 may be restarted, after the system service 24 is restarted, the access reference of the system service 24 is changed, the system service 24 needs to register on the service manager 23 again, that is, the management server 23 replaces the old access reference of the system service 24 with the new access reference, and after the system service 24 is restarted, the identification of the system service 24 is not changed.
Acquiring service means that the application 21 acquires an access reference of the system service 24, before the application 21 uses the system service 24, the access reference of the system service 24 needs to be acquired first to use the system service 24, and the application 21 can request the service manager 23 for the access reference of the system service 24.
After acquiring the access reference of the system service 24, the application 21 uses the system service 24 according to the access reference of the system service 24, that is, calls a method or a function in the system service 24 to implement a corresponding function.
It will be appreciated that the interaction between the application 21, the service manager 23 and the system service 24 in FIG. 2 is represented by dashed lines, since they do not interact directly with each other, but interact through the Binder driver 22 to implement IPC communications. Taking a service acquisition process as an example, when the application 21 needs to access a certain system service 24, the application 21 sends a request message to the Binder driver 22, where the request message includes an identifier of the requested system service 24, the Binder driver 22 sends the request message to the service manager 23, the service manager 23 searches for an access reference of the system service 24 according to the identifier of the system service 24 in the request message, carries the access reference of the system service 24 in a request response, and sends the request response to the Binder driver 22, and the Binder driver 22 sends the request response to the application 21.
When the Binder driver 22 requests an access reference to a system service from the service manager 23, the access reference of the system service 24 may be stored in the kernel space, the Binder driver 22 may maintain a list of access references of the system service for each application 21, the list of access references of the system service stores the access reference of the system service that the application 21 has accessed, and subsequently when the application 21 accesses the system service again, the application 21 sends a request message to the Binder driver 22, the Binder driver 22 queries whether there is an access reference of the requested system service from the list of access references of the system service of the application 21 stored in the kernel space, and if so, returns a request response directly to the application 21, and the Binder driver 22 does not need to request a service access reference from the service manager 23.
The service acquisition process can be completed only by interacting with the Binder driver, the acquisition steps are redundant, the time consumption is long, and the system performance is influenced under the condition of a large number of Binder communication.
Based on this, an embodiment of the present application provides an inter-process communication method, where when an application accesses a certain system service for the first time, the application acquires an access reference of the system service from a service manager through a Binder driver, and stores the access reference of the system service in a memory of the application process (i.e., in a user space of the application), when the application accesses the system service again, the application first queries whether the access reference of the system service exists in the process memory, and if the access reference of the system service exists, the application directly uses the system service without sending any message to the Binder driver or the service manager, thereby reducing the der bin communication, and improving the system performance.
In this embodiment, reference to a system service may be referred to as access reference of the system service or reference of the system service. The access reference of the system service may be an integer identifier or address registered with the service and corresponding to the service one to one, or may be an object including a service access method, such as an IBinder in an android system, where each IBinder stores an integer identifier or address registered with the service and corresponding to the service one to one, and optionally, the IBinder further stores service maintenance and measurement information.
Each system service has a unique identification, the identification of the system service can be the name (name) of the system service, the identification of the system service is determined before the system runs, and the identification of the system service does not change after the system is restarted.
The technical means shown in the present application will be described in detail below with reference to specific examples.
Fig. 3 is a flowchart of an inter-process communication method according to an embodiment of the present application, and fig. 4 is a schematic diagram of an inter-process communication architecture applicable to the embodiment of the present application, and referring to fig. 3 and fig. 4, the method according to the embodiment includes the following steps:
s101, the application program requests a first system service.
The application program is used for providing one or more functions for a user, so the application program refers to a computer program for completing one or more functions, and the application program can comprise two parts of computer programs, wherein one part is the computer program carried by the system, and the other part is the computer program developed by a third party. It is understood that all computer programs of the application program may also be developed by a third party, and the embodiment is not limited thereto.
When the application program is operated, the system service is required to be accessed to complete some functions, and one system service can be accessed by a plurality of application programs. There are a large number of system services in the terminal device, for example, some mobile phones include 256 system services, which can be repeatedly used by different applications, some of which are used more frequently, and others of which are used less frequently.
S102, the application program judges whether the access reference of the first system service is stored in the memory of the application program process.
Before the application uses the first system service, the access reference of the first system service needs to be acquired, each system service has a unique identifier, the identifier of the system service can uniquely identify one system service and cannot be changed, and the access reference of the system service may be changed in the running process of the application.
In this embodiment, after the application program accesses the system service for the first time, the access reference of the system service is stored, and the access reference of the system service may be stored in the memory of the application program process. Each application program can establish a plurality of processes, the processes are operated independently, and the access reference of the system service can be stored in the memory of the application program process by taking the process as a unit, and can also be stored in the memory of the application program process by taking the application program as a unit.
When the access reference of the system service is stored in the memory of the application program process by taking the process as a unit, the access references of the system service of the other side cannot be mutually accessed among a plurality of processes of the application program. For example, the application program includes a process a and a process B, the process a stores the access reference of the system service a in the memory of the process a, and the process B stores the access reference of the system service B in the memory of the process B, so that the process a cannot read the access reference of the system service B from the memory of the process B, and similarly, the process B cannot read the access reference of the system service a from the memory of the process a.
When the access references of the system services are stored in the memory of the application program process by taking the application program as a unit, the access references of all the system services accessed by the application program are stored in the memory of a certain process of the application program, or the access references of all the system services accessed by the application program are stored in the fixed memory of the application program, and the fixed memory does not belong to any process of the application program. At this time, multiple processes of the application can read access references of the system services in the fixed memory.
For example, the access reference of the system service may be stored in a memory of the application program process in a form of a list, the list storing the access reference of the system service may be referred to as an access reference list, a service interface list, or a service reference list or a service address list of the service, and the access reference list of the service stores therein the identifiers and the access references of a plurality of system services, where the identifiers and the access references of the system services correspond to each other one by one, and the access reference list of the service may be as shown in table one.
TABLE one (Access references list for service)
Identification of system services Access referencing of system services
AAA aaaa
BBB bbbb
CCC cccc
DDD dddd
The application program reads the access reference list of the service from the memory of the application program process according to the identifier of the first system service, if the identifier and the access reference of the first system service exist in the access reference list of the service, the access reference of the first system service is determined to be stored in the memory of the application program process, and if the identifier and the access reference of the first system service do not exist in the access reference list of the service, the access reference of the first system service is determined not to be stored in the memory of the application program process. Step S103 is executed when the access reference of the first system service is stored in the memory of the application program process, and step S104 is executed when the access reference of the first system service is not stored in the memory of the application program process.
The first system service is a system service to be accessed currently, the first system service may be the system service X in fig. 4, and when the application 21 requests the system service X, the application first reads an access reference list of the service from a memory of a process, and determines whether there is an access reference of the system service X in the access reference list of the service. If the access reference list of the service does not store the access reference of the system service X, it indicates that the application 21 requests the system service X for the first time, and if the access reference list of the service stores the access reference of the system service X, it indicates that the application 21 does not request the access reference of the system service X for the first time, and the application 21 uses the system service X before, so the access reference list of the service stores the access reference of the system service X.
S103, the application program accesses the first system service by using the access reference of the first system service.
When the memory of the application program process stores the access reference of the first system service, the access reference of the first system service is directly used, and the access reference of the first system service is not required to be acquired from the service manager through Binder communication, wherein the application program accessing the system service can be understood as the application program calling the system service.
S104, the application program obtains the access reference of the first system service from the service manager through Binder communication according to the identification of the first system service, accesses the first system service by using the access reference of the first system service, and stores the access reference of the first system service in a memory of the application program process.
The service manager is used for managing all system services, the access references of the registered system services are stored in the service manager, when an application program accesses a first system service for the first time, the memory of an application program process does not store the access references of the first system service, the application program can request the access references of the first system service from the service manager through Binder communication and store the requested access references of the first system service into the memory of the application program process, and then when the application program accesses the first system service again, the application program can acquire the access references of the first system service from the memory of the application program process without requesting the access references of the first system service from a kernel or the service manager through Binder communication, so that the number of times of Binder communication in the system is reduced.
Taking fig. 4 as an example, when the application 21 accesses the system service X for the first time, the access reference of the system service X is obtained through the following steps: 1. the application 21 judges whether the access reference list of the service stores the access reference of the system service X; 2. when the access reference list of the service does not store the access reference of the system service X, the application 21 sends an access reference request message to the Binder driver 22, where the access reference request message is used for requesting the access reference of the system service X; 3. the Binder driver 22 sends an access quote request message to the service manager 23; 4. the service manager 23 queries the access reference of the service X from the access reference list of the service; 5. the service manager 23 sends an access reference request response to the Binder driver 22, wherein the access reference request response includes the access reference of the service X; 6. the Binder driver 22 sends the access reference request response to the application 21; 7. the application 21 stores the access reference of the service X in the access reference list of the service.
The access reference request message includes the identifier of the service X, and after receiving the access reference request message, the service manager 23 queries the access reference of the service X from the access reference list of the service according to the identifier of the service X.
After the application 21 acquires the access reference of the system service X from the response message, the access reference of the system service X is used, and the access reference of the system service X is stored in the access reference list of the service of the application 21, and then when the application 21 requests the system service X for the 2 nd to N th times, as can be seen from fig. 4, the application 21 acquires the access reference of the system service X directly from the access reference list of the service stored in the memory, and does not need to request the access reference of the system service X from the service manager 23 through the Binder driver, thereby reducing the number of Binder communications.
After the application program X obtains the access reference, the process of using the access reference is as shown in fig. 4: 8. the application 21 sends an access request to the Binder driver 22, wherein the access request message is used for accessing the system service X and comprises an access reference of the system service X; 9. the Binder driver 22 sends the access request message to the system service X; 10. the system service X processes corresponding processing according to the access request message; 11. the system service X returns an access request response to the Binder driver 22, wherein the access request response comprises a processing result or a calling result; 12. the Binder driver 22 sends an access request response to the application 21.
In order to distinguish the acquisition process and the use process of the access reference of the system service X, the acquisition process of the access reference of the system service X is represented by a solid line and the use process of the access reference of the system service X is represented by a dotted line in fig. 4.
As can be seen from fig. 4, the application 21 and the service manager 23 both store service access reference lists, but the two stored service access reference lists are different, the service access reference list of the application 21 is used for storing access references of system services used by the application 21, and the service access reference list of the service manager 23 stores access references of all registered system services on the terminal device. Different applications use different system services and therefore different access reference lists for services stored in different applications.
Optionally, the number of access references of the system service stored in the memory of the application program process is limited, and when the number of access references of the system service stored in the memory of the application program process reaches a preset number, the application program deletes one or more access references of the system service from the memory of the application program process. The preset number may be set by the application itself or by the service manager 23.
Illustratively, the access references to the system services may be deleted using any one of the following algorithms: least Recently Used (LRU), Least Recently Used (LFU), First In First Out (FIFO). Deleting the access reference of the system service from the memory of the application process by using the algorithm is also called eliminating the access reference of the system service.
When the LRU algorithm is used to eliminate the access references of the system services, if the access reference of one system service is not accessed in the last period of time, it is considered that the access reference of the system service is less likely to be accessed in the future, and therefore, when the memory space of the application program process is insufficient, the access reference of the system service which is not accessed for the longest time is eliminated first.
When the LFU algorithm is used to eliminate the access references of the system services, if the access references of one system service are rarely accessed in the recent period of time, the possibility that the access references of the system service are accessed in the future is considered to be low, and therefore, when the memory space of the application program process is insufficient, the access references of the system service with the lowest frequency of access are eliminated first.
When the FIFO algorithm is used for eliminating the access references of the system services, if the access reference of one system service firstly enters the memory, the possibility that the access reference of the system service is accessed in the future is considered to be low, and therefore, when the memory space of the application program process is insufficient, the access reference of the system service firstly entering the memory of the application program process is eliminated firstly.
Optionally, the application 21 may store the access reference of the first system service in the memory of the application 21 process, and then determine whether the number of the access references of the system service stored in the memory reaches the preset number, or may determine whether the number of the access references of the system service stored in the memory reaches the preset number before storing the access reference of the first system service in the memory of the application 21 process
In the method of this embodiment, the application program determines whether the access reference of the first system service is stored in the memory of the application program process, and when the access reference of the first system service is stored in the memory of the application program process, the application program uses the access reference of the first system service, and when the access reference of the first system service is not stored in the memory of the application program process, the application program obtains the access reference of the first system service from the service manager, and stores the access reference of the first system service in the memory of the application program process. When the application program accesses the access reference of the system service for the first time, the access reference of the system service is stored in the memory of the application program process, and when the access reference of the system service is accessed again subsequently, the access reference of the system service is directly obtained from the memory without requesting a service manager through Binder communication, so that the number of Binder communication is reduced, and the system performance is improved.
The system service may be restarted for some reasons during the operation of the system service, after the system service is restarted, the access reference of the system service may be changed, the identification of the system service is not changed after the restart, and after the system service is restarted, the system service may be re-registered in the service manager 23, that is, the access reference of the system service stored in the service manager 23 is the latest access reference. On the basis of the first embodiment, since each application program stores the access reference of the used system service in the respective process memory, if the access reference of the system service in the service manager 23 is updated due to the restart of the system service, the access reference of the system service stored in the process memory of the application program is not updated, and at this time, if the application program uses the access reference of the system service, the access of the system service fails due to inconsistency of the access references of the same system service, that is, the application program cannot use the access reference of the system service.
In order to ensure that the access reference of the system service stored in the memory of the application process is consistent with the access reference of the system service stored in the service manager 23, a second embodiment of the present application provides an inter-process communication method, and fig. 5 is a flowchart of the inter-process communication method provided in the second embodiment of the present application, as shown in fig. 5, this embodiment further includes the following steps based on the first embodiment:
and S105, the application program sends a monitoring request to the Binder driver, wherein the monitoring request is used for requesting monitoring of the state of the first system service.
This step is executed after step S204, that is, after the application obtains the access reference of the first system service from the service manager, the application requests the Binder driver to monitor the status of the first system service, and the application may request the Binder driver to monitor the status of the first system service by sending the monitoring request to the Binder driver, where the monitoring request includes an identifier of the first system service, and is used to notify the Binder driver of which system service is monitored. The Binder driver is used for monitoring the state of the first system service, and starts monitoring the state of the first system service after receiving the monitoring request. Illustratively, the state of the first system service may be normal or reset.
It is to be appreciated that sending a snoop request to request the Binder driver to snoop the state of the first system service is only one exemplary way, and that the application may also request the Binder driver to snoop the state of the first system service in other ways. For example, the Binder driver also returns a response corresponding to the listening request to the application program, and the response is used for notifying the application program that the Binder driver receives the listening request or starts listening to the state of the first system service. Of course, the Binder driver may also be requested to listen to the status of the first system service through other messages or more message interactions, which is not limited in this embodiment.
Optionally, the snoop request includes an access reference of the first system service, and the first system service access reference included in the snoop request is an access reference of the first system service stored in the memory of the application program process.
S106, the application program receives a deletion request sent by the Binder driver, wherein the deletion request is used for requesting to delete the access reference of the first system service, and the deletion request is sent by the Binder driver after monitoring the restart of the first system service.
When the Binder driver monitors that the state of the first system service is restart, the Binder driver generates a deletion request, after the first system service is restarted, the access reference of the first system service is changed, after the access reference of the first system service occurs, the access reference of the first system service stored in the process memory of the application program is inconsistent with the access reference of the first system service stored in the service manager, and the Binder driver requests the application program to delete the locally stored access reference of the first system service.
Fig. 6 is a schematic view illustrating updating of access references of system services in a process memory of an application program, and as shown in fig. 6, access references of the system service X are stored in service access reference lists of the application program 1 and the application program 2, and after the application program 1 and the application program 2 acquire the access references of the system service X from a system server, they will send monitoring requests to the Binder driver 22. After the Binder driver 22 receives the monitoring request sent by the application program 2, the relationship between the access reference of the system service X and the application program 2 is recorded in the service access reference and the relationship list of the application program, wherein the access reference of one system service can establish an association relationship with a plurality of application programs.
Subsequently, when the Binder driver 22 monitors that the system service is restarted, according to the relationship list, a deletion request is sent to each application program corresponding to the system service, and deletion of access references of the system service on the plurality of application programs is completed. For example, in the scenario shown in fig. 6, when the Binder driver 22 monitors that the system service X is restarted, the relationship list between the service access reference and the application program is queried to obtain the application program 1 and the application program 2 corresponding to the access reference of the system service X, and then the Binder driver 22 sends deletion requests to the application program 1 and the application program 2, where the deletion requests include the identifier of the system service X.
And S107, deleting the access reference of the first system service from the memory of the application program process by the application program according to the deletion request.
And the deletion request comprises an identifier of the first system service, after receiving the deletion request, the application program determines to delete the access reference of the first system service according to the identifier of the first system service, and searches for the access reference corresponding to the identifier of the first system service from the process memory and deletes the access reference.
Optionally, after deleting the access reference of the first system service, the application returns a response corresponding to the deletion request to the Binder driver, and notifies the Binder driver that the deletion of the access reference of the first system service is successful.
Optionally, the delete request further includes an access reference after the restart of the first system service, where the access reference after the restart of the first system service is acquired from the service manager by the Binder driver, and the Binder driver may request the service manager for the access reference after the restart of the first system service after determining that the first system service is restarted. Correspondingly, after the application program deletes the access reference of the first system service stored in the process memory according to the deletion request, the access reference of the restarted first system service is stored in the process memory.
When the deletion request does not include the access reference of the restarted first system service, after the application program deletes the access reference of the first system service from the process memory, when the application program uses the first system service next time, the application program needs to request the access reference of the first system service from the service manager, and because the access reference of the first system service stored in the service manager is the access reference of the restarted first system service (or is regarded as the latest access reference), the application program can normally use the access reference of the first system service.
In an embodiment, after obtaining an access reference of a first system service from a service manager, an application program sends a monitoring request to a Binder driver, where the monitoring request is used to request monitoring of a state of the first system service, and the Binder driver starts monitoring the access reference of the first system service according to the monitoring request, and when it is monitored that the first system service is restarted, the application program is instructed to delete the access reference of the first system service, so that it can be ensured that the access reference of the first system service stored in a process memory of the application program is consistent with the access reference of the first system service stored in the service manager, and it is avoided that when the first system service is restarted, the access reference of the first system service read from a memory of the application program process is incorrect due to a change in the access reference of the first system service, so that the first system service cannot be accessed.
In the second embodiment, the Binder driver determines whether the access reference of the system service is changed by monitoring the state of the system service. In an optional mode of the application, the application program detects whether the access reference of the system service changes, and if the access reference of the system service changes, the access reference of the system service is deleted from the memory of the application program process. Illustratively, the application requests the service manager for an access reference of the first system service, and when the access reference of the first system service stored in the memory of the application process is different from the access reference of the first system service requested to the service manager, the application updates the access reference of the first service stored in the memory of the application process to the access reference of the first system service requested to the service manager.
In an exemplary manner, the application program may periodically request the service manager for an access reference of each system service stored in the memory of the application program process, and determine whether the requested access reference is the same as the access reference stored in the memory process. Or, the application requests the service manager for an access reference of each system service stored in the memory of the application process when the system is idle, for example, when the utilization rate of the CPU is less than 50%, the system is considered to be idle, or the utilization rate of the memory is less than 40%, the system is considered to be idle.
In another exemplary manner, when the storage time of the access reference of the first system service in the memory of the application program process reaches the preset time length, the application program requests the service manager for the access reference of the first system service. The preset time length corresponding to the access reference of each system service can be the same or different. Or, when the application program fails to access a certain system service, the application program requests the service manager for the access application of the system service with failed access.
In the prior art, the application program does not execute the determination step S102, that is, does not determine whether the access reference of the first system service is stored in the memory of the application program process, and in order to implement the method according to the embodiment of the present application, a system code is required to be modified, where the system code is used to query whether the access reference of the system service is stored in the process memory of the application program when the application program is to access or call the system service, and maintain the access reference of the system service stored in the process memory of the application program. And loading the system code into the process during the process starting process of the application program.
Alternatively, the system code may be integrated in the hwEmui code. And loading the frame code and the hwEmui code into the process in the process starting process, thereby realizing the loading of the newly added system code into the process.
Fig. 7 is a signaling flowchart of an inter-process communication method provided in a third embodiment of the present application, and as shown in fig. 7, the method in this embodiment includes the following steps:
s201, creating a process by the application program.
S202, the application program loads the frame code.
S203, the application program loads the hwEmui code.
And S204, the application program queries a system service calling function.
S205, the application program calls a Binder memory interface.
When the process calls the original frame code interface, the process jumps to a new system code interface: and a memory interface (such as a getCache function) for reading the access reference of the system service from the memory of the application program process.
S206, the application program judges whether the access reference of the first system service is stored in the memory of the application program process.
Step S207 is executed when the access reference of the first system service is stored in the memory, and step S209 is executed when the access reference of the first system service is not stored in the memory.
And S207, updating the query time and/or query times of the access reference of the first system service by the application program.
The application program updates the query time quoted by the access of the first system service to the query time of this time, and the query time of this time can be the current time. And updating the query times of the access references of the first system service, namely adding 1 to the query times of the access references of the first system service.
The query time can be used for eliminating the access references of the system services stored in the memory of the application program process by adopting an LRU algorithm subsequently, the query times can be used for eliminating the access references of the system services stored in the memory of the application program process by adopting an LFU algorithm, and the access references of the system services stored in the memory of the application program process can also be eliminated by combining the LRU algorithm and the LFU algorithm.
And S208, returning the access reference of the first system service by the application program.
S209, the application program requests the service manager for the access reference of the first system service.
S210, the application program inserts the access reference of the first system service into the memory.
S211, the application program judges whether the access reference of the system service stored in the memory exceeds a preset number.
If the access reference of the system service stored in the memory exceeds the preset number, step S212 is executed, and if the access reference of the system service stored in the memory exceeds the preset number, step S208 is executed.
S212, the application program deletes the access reference of one system service from the memory according to the query time and/or query times of the access reference of each system service in the memory.
Step S209 is performed after step S212.
For example, the application program deletes the access reference of the system service with the earliest query time in the memory by using the LRU algorithm according to the query time of the access reference of each system service in the memory, or deletes the access reference of the system service with the fewest queries in the memory by using the LFU algorithm according to the number of queries of the access reference of each system service in the memory.
Fig. 8 is a flowchart of an interprocess communication method provided by a fourth embodiment of the present application, and fig. 8 is a schematic diagram of an interprocess communication architecture applicable to the fourth embodiment, and referring to fig. 8 and fig. 9, the method provided by the present embodiment includes the following steps:
s301, when a first process of an application program is started, allocating an access reference of a shared memory for the first process, wherein the shared memory is used for storing the access reference of system services.
As shown in fig. 8, the shared memory is located in the kernel space, and the shared memory is dedicated to storing access references of system services, and the access references of the system services in the shared memory may exist in a service access reference list, where the service access reference list in the shared memory is the same as the service access reference list in the service manager 23, and is used for storing access references of all system services in the electronic device.
The shared memory is a fixed memory, that is, the storage location of the access reference of the system service is fixed, and the access reference of the system service in the service manager 23 is stored in the dynamic memory, that is, the storage location of the access reference of the system service is not fixed, and the storage location is determined by the system service itself, and each process in the system cannot directly access the access reference of the system service in the dynamic memory. The storage location of the access reference of the system service in the shared memory is fixed, the application 21 allocates the access reference of the shared memory to the process in the process of establishing the process, and when the subsequent process accesses the system service, the access reference of the system service to be accessed is directly read from the shared memory according to the access reference of the shared memory.
S302, when the first process requests the first system service, the access reference of the first system service is read in the shared memory according to the access reference of the shared memory.
In the method of the embodiment, a section of shared memory is opened up in the kernel space, the shared memory is used for storing the access reference of the system service, the access reference of the shared memory is distributed to the process by an application program in the process of establishing the process, when the process accesses the system service, the access reference of the system service is read from the shared memory according to the access reference of the shared memory, the access reference of the system service is not required to be acquired through Binder communication, the number of Binder communication is reduced, and the system performance is improved.
Fig. 10 is a schematic structural diagram of an inter-process communication apparatus according to an embodiment of the present application, where the apparatus may be configured to execute a method executed by an application program in the method according to any one of the foregoing embodiments, and as shown in fig. 10, the inter-process communication apparatus 300 according to this embodiment may include:
a determining module 31, configured to determine whether an access reference of a first system service is stored in a memory of the application program process;
a use module 32, configured to access the first system service using the access reference of the first system service when the access reference of the first system service is stored in the memory of the application program process;
an obtaining module 33, configured to, when the access reference of the first system service is not stored in the memory of the application process, obtain, through Binder communication, the access reference of the first system service from a service manager according to the identifier of the first system service, access the first system service using the access reference of the first system service, and store the access reference of the first system service in the memory of the application process.
Optionally, the system further includes a first deleting module, configured to: and when the number of the access references of the system services stored in the memory of the application program process reaches a preset number, deleting the access references of one or more system services from the memory of the application program process.
Optionally, the first deleting module is specifically configured to: the access references of one or more system services are deleted from the memory of the application process using least recently used LRU, least frequently used LFU, or first-in-first-out FIFO.
In an exemplary manner, the system further comprises a monitoring module for requesting the Binder driver to monitor the state of the first system service.
Optionally, the system further includes a second deleting module, configured to: receiving a deletion request sent by the Binder driver, wherein the deletion request is used for requesting to delete the access reference of the first system service, and the deletion request is sent by the Binder driver after monitoring that the first system service is restarted; and deleting the access reference of the first system service from the memory of the application program process according to the deletion request.
Optionally, the delete request further includes an access reference after the restart of the first system service, and the apparatus further includes a storage module, configured to: and storing the access reference of the restarted first system service into the memory of the application program process.
In another exemplary manner, the apparatus further includes an updating module, configured to: requesting an access reference for the first system service from the service manager; when the access reference of the first system service stored in the memory of the application program process is different from the access reference of the first system service requested to the service manager, updating the access reference of the first service stored in the memory of the application program process to the access reference of the first system service requested to the service manager.
Optionally, the update module is specifically configured to: and requesting the access reference of each system service stored in the memory of the application program process from the service manager. Or when the storage time of the access reference of the first system service in the memory of the application program process reaches a preset time length, requesting the access reference of the first system service from the service manager.
Optionally, the determining module 31 is specifically configured to: inquiring the memory of the application program process according to the identifier of the first system service; if the memory of the application program process stores the identifier of the first system service, determining that the access reference of the first system service is stored in the memory of the application program process; and if the identifier of the first system service is not stored in the memory of the application program process, determining that the access reference of the first system service is not stored in the memory of the application program process.
The interprocess communication apparatus 300 provided in this embodiment may be specifically configured to execute the method steps executed by the application program in the foregoing method embodiment, and the specific implementation manner and the technical effect are similar, and are not described herein again.
Fig. 11 is a schematic structural diagram of an inter-process communication apparatus according to an embodiment of the present application, where the apparatus may be used to execute a method executed by a Binder driver in the method according to any of the foregoing embodiments, and as shown in fig. 11, the inter-process communication apparatus 400 according to this embodiment may include:
a receiving module 41, configured to receive a monitoring request sent by an application, where the monitoring request is used to request to monitor a state of a first system service;
and the monitoring module 42 is configured to monitor a state of the first system service according to the monitoring request.
Optionally, the apparatus further includes a sending module, configured to send, when it is monitored that the state of the first system service restarts, a deletion request to the application program, where the deletion request is used to indicate to delete the access reference of the first system service.
Optionally, the apparatus further includes an obtaining module, configured to obtain, from the service manager, the access reference after the restart of the first system service.
The inter-process communication apparatus 400 provided in this embodiment may be specifically configured to execute the method steps executed by the Binder driver in the foregoing method embodiments, and the specific implementation manner and the technical effect are similar and will not be described again here.
Fig. 12 is a schematic structural diagram of an inter-process communication apparatus according to another embodiment of the present application, and the apparatus shown in fig. 12 may be used to execute the inter-process communication method according to any one of the foregoing embodiments.
As shown in fig. 12, the apparatus 500 of the present embodiment includes: memory 501, processor 502, communication interface 503, and bus 504. The memory 501, the processor 502 and the communication interface 503 are connected to each other by a bus 504.
The memory 501 may be a Read Only Memory (ROM), a static memory device, a dynamic memory device, or a Random Access Memory (RAM). The memory 501 may store a program and the processor 502 is adapted to perform the steps of the method shown in fig. 3 or fig. 6 or fig. 7 or fig. 8 when the program stored in the memory 501 is executed by the processor 502.
The processor 502 may be a general-purpose Central Processing Unit (CPU), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits, and is configured to execute related programs to implement the interprocess communication method according to the embodiment of the present application.
It should be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: u disk, removable hard disk, read only memory, random access memory, magnetic disk or optical disk, etc. for storing program codes.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (29)

1. An interprocess communication method, comprising:
the application program judges whether the access reference of the first system service is stored in the memory of the application program process;
when the access reference of the first system service is stored in the memory of the application program process, accessing the first system service by using the access reference of the first system service;
when the access reference of the first system service is not stored in the memory of the application program process, the application program acquires the access reference of the first system service from a service manager through Binder communication according to the identifier of the first system service, accesses the first system service by using the access reference of the first system service, and stores the access reference of the first system service in the memory of the application program process.
2. The method of claim 1, wherein storing the access reference to the first system service after the memory of the application process, further comprises:
and when the number of the access references of the system services stored in the memory of the application program process reaches a preset number, the application program deletes the access references of one or more system services from the memory of the application program process.
3. The method of claim 2, wherein the application deleting access references of one or more system services from the memory of the application process comprises:
the application deletes access references for one or more system services from the application process' memory using least recently used LRU, least frequently used LFU, or first-in-first-out FIFO.
4. The method of any of claims 1-3, after storing the access reference of the first system service in the memory of the application process, further comprising:
and the application program requests the Binder driver to monitor the state of the first system service.
5. The method of claim 4, further comprising:
the application program receives a deletion request sent by the Binder driver, wherein the deletion request is used for requesting to delete the access reference of the first system service, and the deletion request is sent by the Binder driver after monitoring the restart of the first system service;
and the application program deletes the access reference of the first system service from the memory of the application program process according to the deletion request.
6. The method of claim 5, wherein the delete request further includes an access reference after the first system service is restarted, and wherein the method further comprises:
and the application program stores the access reference of the restarted first system service into a memory of the application program process.
7. The method according to any one of claims 1-3, further comprising:
the application requesting an access reference for the first system service from the service manager;
when the access reference of the first system service stored in the memory of the application program process is different from the access reference of the first system service requested to the service manager, the application program updates the access reference of the first service stored in the memory of the application program process to the access reference of the first system service requested to the service manager.
8. The method of claim 7, wherein the application requesting an access reference for the first system service from the service manager comprises:
and the application program requests the service manager for the access reference of each system service stored in the memory of the application program process.
9. The method of claim 7, wherein the application requesting an access reference for the first system service from the service manager comprises:
and when the storage time of the access reference of the first system service in the memory of the application program process reaches a preset time length, the application program requests the service manager for the access reference of the first system service.
10. The method of any of claims 1-9, wherein the determining, by the application program, whether the access reference to the first system service is stored in the memory of the application program process comprises:
the application program inquires the memory of the application program process according to the identification of the first system service;
if the memory of the application program process stores the identifier of the first system service, determining that the access reference of the first system service is stored in the memory of the application program process;
and if the identifier of the first system service is not stored in the memory of the application program process, determining that the access reference of the first system service is not stored in the memory of the application program process.
11. An interprocess communication method, comprising:
a Binder driver receives a monitoring request sent by an application program, wherein the monitoring request is used for requesting to monitor the state of a first system service;
and the Binder driver monitors the state of the first system service according to the monitoring request.
12. The method of claim 11, further comprising:
when the state of the first system service is monitored to restart, the Binder driver sends a deletion request to the application program, wherein the deletion request is used for indicating to delete the access reference of the first system service.
13. The method of claim 12, wherein the delete request includes an access reference after the restart of the first system service, the method further comprising:
and the Binder driver acquires the access reference of the first system service after restarting from the service manager.
14. An interprocess communication apparatus, comprising:
the judging module is used for judging whether the access reference of the first system service is stored in the memory of the application program process;
a using module, configured to access the first system service using the access reference of the first system service when the access reference of the first system service is stored in the memory of the application program process;
and the obtaining module is used for obtaining the access reference of the first system service from a service manager through Binder communication according to the identifier of the first system service when the access reference of the first system service is not stored in the memory of the application program process, accessing the first system service by using the access reference of the first system service, and storing the access reference of the first system service in the memory of the application program process.
15. The apparatus of claim 14, further comprising a first deletion module to:
and when the number of the access references of the system services stored in the memory of the application program process reaches a preset number, deleting the access references of one or more system services from the memory of the application program process.
16. The apparatus of claim 15, wherein the first deletion module is specifically configured to:
the access references of one or more system services are deleted from the memory of the application process using least recently used LRU, least frequently used LFU, or first-in-first-out FIFO.
17. The apparatus of any of claims 14-16, further comprising a listening module to: and requesting the Binder driver to monitor the state of the first system service.
18. The apparatus of claim 17, further comprising a second deletion module to:
receiving a deletion request sent by the Binder driver, wherein the deletion request is used for requesting to delete the access reference of the first system service, and the deletion request is sent by the Binder driver after monitoring that the first system service is restarted;
and deleting the access reference of the first system service from the memory of the application program process according to the deletion request.
19. The apparatus of claim 18, wherein the delete request further includes an access reference after the restart of the first system service, and wherein the apparatus further comprises a storage module configured to: and storing the access reference of the restarted first system service into the memory of the application program process.
20. The apparatus according to any one of claims 14-16, wherein the apparatus further comprises an update module configured to:
requesting an access reference for the first system service from the service manager;
when the access reference of the first system service stored in the memory of the application program process is different from the access reference of the first system service requested to the service manager, updating the access reference of the first service stored in the memory of the application program process to the access reference of the first system service requested to the service manager.
21. The apparatus according to claim 20, wherein the update module is specifically configured to: and requesting the access reference of each system service stored in the memory of the application program process from the service manager.
22. The apparatus of claim 20, wherein the update module is specifically configured to: and when the storage time of the access reference of the first system service in the memory of the application program process reaches a preset time length, requesting the access reference of the first system service from the service manager.
23. The apparatus according to any one of claims 14 to 22, wherein the determining module is specifically configured to:
inquiring the memory of the application program process according to the identifier of the first system service;
if the memory of the application program process stores the identifier of the first system service, determining that the access reference of the first system service is stored in the memory of the application program process;
and if the identifier of the first system service is not stored in the memory of the application program process, determining that the access reference of the first system service is not stored in the memory of the application program process.
24. An interprocess communication apparatus, comprising:
the system comprises a receiving module, a monitoring module and a processing module, wherein the receiving module is used for receiving a monitoring request sent by an application program, and the monitoring request is used for requesting to monitor the state of a first system service;
and the monitoring module is used for monitoring the state of the first system service according to the monitoring request.
25. The apparatus of claim 24, further comprising a sending module configured to:
and when the state of the first system service is monitored to be restarted, sending a deletion request to the application program, wherein the deletion request is used for indicating the deletion of the access reference of the first system service.
26. The apparatus of claim 25, further comprising an acquisition module configured to:
and acquiring the access reference of the first system service after restarting from the service manager.
27. An interprocess communication apparatus, comprising: a memory and a processor;
the memory is to store program instructions;
the processor is configured to invoke program instructions in the memory to perform the method of any of claims 1 to 13.
28. A chip comprising at least one processor and a communication interface, the communication interface and the at least one processor being interconnected by a line, the at least one processor being configured to execute a computer program or instructions to perform the method of any one of claims 1 to 13.
29. A computer-readable medium, characterized in that the computer-readable medium stores program code for computer execution, the program code comprising instructions for performing the method of any of claims 1 to 13.
CN202011381217.3A 2020-11-30 2020-11-30 Inter-process communication method and device Pending CN114579325A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011381217.3A CN114579325A (en) 2020-11-30 2020-11-30 Inter-process communication method and device
PCT/CN2021/134160 WO2022111711A1 (en) 2020-11-30 2021-11-29 Inter-process communication method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011381217.3A CN114579325A (en) 2020-11-30 2020-11-30 Inter-process communication method and device

Publications (1)

Publication Number Publication Date
CN114579325A true CN114579325A (en) 2022-06-03

Family

ID=81754063

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011381217.3A Pending CN114579325A (en) 2020-11-30 2020-11-30 Inter-process communication method and device

Country Status (2)

Country Link
CN (1) CN114579325A (en)
WO (1) WO2022111711A1 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102464678B1 (en) * 2016-03-18 2022-11-11 한국전자통신연구원 Method and apparatus for scheduling thread in a in manycore system
CN106375371B (en) * 2016-08-22 2019-11-22 四川安嵌科技有限公司 A kind of method and system of cross-domain access service
CN109669784B (en) * 2017-10-13 2021-06-22 华为技术有限公司 Method and system for interprocess communication
CN109144232B (en) * 2018-08-01 2020-12-01 Oppo广东移动通信有限公司 Process processing method and device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
WO2022111711A1 (en) 2022-06-02

Similar Documents

Publication Publication Date Title
CN113329047B (en) Distributed service scheduling method and related device
CN113806105B (en) Message processing method, device, electronic equipment and readable storage medium
CN113747374B (en) Message pushing method and device
CN110572866B (en) Management method of wake-up lock and electronic equipment
WO2021093626A1 (en) Memory management method and electronic device
CN112181616B (en) Task processing method and related device
CN110806926A (en) Resource control method and equipment
CN114189846A (en) Method, system, electronic device and storage medium for avoiding missed call
CN114258037A (en) Network control method and device and electronic equipment
CN113973398A (en) Wireless network connection method, electronic equipment and chip system
CN113596919B (en) Data downloading method and device and terminal equipment
CN114077519B (en) System service recovery method and device and electronic equipment
WO2023051094A1 (en) Memory recovery method and apparatus, electronic device, and readable storage medium
CN115080505B (en) Data migration method, terminal, storage medium, and program product
CN117348894A (en) Software upgrading method, terminal equipment and system
WO2022111711A1 (en) Inter-process communication method and apparatus
CN112929854B (en) Event subscription method and electronic equipment
CN114116610A (en) Method, device, electronic equipment and medium for acquiring storage information
CN112822246A (en) Equipment identification method and equipment
CN116346982B (en) Method for processing audio, electronic device and readable storage medium
WO2024093795A1 (en) Device replacement configuration method and apparatus
CN118102487A (en) Data display method, system and electronic equipment
CN113992767A (en) Protocol loading method, electronic device and storage medium
CN117135683A (en) Data communication method, electronic device, and computer-readable storage medium
CN117119098A (en) Account shielding method, communication system and electronic equipment

Legal Events

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