CN115202902B - Method and related device for controlling process interaction - Google Patents
Method and related device for controlling process interaction Download PDFInfo
- Publication number
- CN115202902B CN115202902B CN202210764724.8A CN202210764724A CN115202902B CN 115202902 B CN115202902 B CN 115202902B CN 202210764724 A CN202210764724 A CN 202210764724A CN 115202902 B CN115202902 B CN 115202902B
- Authority
- CN
- China
- Prior art keywords
- data
- target information
- information
- application
- binder
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 364
- 230000008569 process Effects 0.000 title claims abstract description 307
- 230000003993 interaction Effects 0.000 title claims abstract description 35
- 239000011230 binding agent Substances 0.000 claims abstract description 64
- 230000007246 mechanism Effects 0.000 claims abstract description 12
- 230000000694 effects Effects 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 19
- 230000005540 biological transmission Effects 0.000 abstract description 20
- 230000002159 abnormal effect Effects 0.000 abstract description 9
- 238000004891 communication Methods 0.000 description 33
- 238000012545 processing Methods 0.000 description 32
- 230000000875 corresponding effect Effects 0.000 description 22
- 230000006870 function Effects 0.000 description 22
- 230000001276 controlling effect Effects 0.000 description 16
- 238000010586 diagram Methods 0.000 description 11
- 238000007726 management method Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 6
- 238000013461 design Methods 0.000 description 5
- 238000012546 transfer Methods 0.000 description 5
- 239000003795 chemical substances by application Substances 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000013528 artificial neural network Methods 0.000 description 2
- 230000003190 augmentative effect Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 230000003111 delayed effect Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 210000000988 bone and bone Anatomy 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000011664 signaling Effects 0.000 description 1
- 239000004984 smart glass Substances 0.000 description 1
- 238000001356 surgical procedure Methods 0.000 description 1
- 230000026676 system process Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5016—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer And Data Communications (AREA)
Abstract
本申请实施例提供控制进程交互的方法及相关装置,涉及终端技术领域。方法包括:终端设备确定第一进程向第二进程调取目标信息;向第一进程传输目标信息中的第一数据;其中,第一数据包括目标信息中的第一部分信息,第一数据的大小不超过预设值,其中,第一进程和第二进程基于binder机制通信。这样,可以在binder机制中支持分批传输数据,使得binder交互中的数据不会过大,改善因binder中数据过大导致binder内存耗尽产生的应用程序异常退出现象。
Embodiments of the present application provide a method for controlling process interaction and a related device, which relate to the technical field of terminals. The method includes: the terminal device determines that the first process calls the target information from the second process; transmits the first data in the target information to the first process; wherein, the first data includes the first part of the target information, and the size of the first data It does not exceed a preset value, wherein, the first process and the second process communicate based on a binder mechanism. In this way, batch transmission of data can be supported in the binder mechanism, so that the data in the binder interaction will not be too large, and the abnormal exit phenomenon of the application program caused by the exhaustion of the binder memory due to the excessive data in the binder can be improved.
Description
技术领域technical field
本申请涉及终端技术领域,尤其涉及一种控制进程交互的方法及相关装置。The present application relates to the technical field of terminals, in particular to a method for controlling process interaction and related devices.
背景技术Background technique
随着终端技术的发展,终端设备中能够支持的应用程序(application,APP)越来越多。终端设备中的系统服务与应用程序之间、不同应用程序之间等可以基于进程进行通信。例如,IPC(inter-process communication,进程间通信)是一种在不同进程之间传播或交换信息的一种通信方式。With the development of terminal technology, more and more application programs (application, APP) can be supported in the terminal device. Communication between system services and application programs in the terminal device, and between different application programs can be based on processes. For example, IPC (inter-process communication, inter-process communication) is a communication method for disseminating or exchanging information between different processes.
一些实现中,binder是IPC的重要环节,例如,进程A调用进程B的信息时,进程A可以基于binder机制中的binder通信和binder驱动实现对进程B的调用。In some implementations, binder is an important part of IPC. For example, when process A calls information of process B, process A can call process B based on binder communication and binder driver in the binder mechanism.
但是上述实现中,会存在导致终端设备的应用程序异常退出的现象。However, in the above implementation, there may be a phenomenon that the application program of the terminal device exits abnormally.
发明内容Contents of the invention
本申请实施例提供一种控制进程交互的方法及相关装置,可以在binder机制中支持按照组件信息分批传输数据,使得binder交互中的数据不会过大,改善因binder中数据过大导致binder内存耗尽产生的应用程序异常退出现象。The embodiment of the present application provides a method and related device for controlling process interaction, which can support batch transmission of data according to component information in the binder mechanism, so that the data in the binder interaction will not be too large, and improve the binder caused by excessive data in the binder. The abnormal exit phenomenon of the application program caused by memory exhaustion.
第一方面,本申请实施例提供一种控制进程交互的方法,应用于运行有第一进程和第二进程的终端设备,第一进程和第二进程基于binder机制通信,方法包括:In the first aspect, the embodiment of the present application provides a method for controlling process interaction, which is applied to a terminal device running a first process and a second process. The first process and the second process communicate based on a binder mechanism. The method includes:
确定第一进程向第二进程调取目标信息;向第一进程传输目标信息中的第一数据;其中,第一数据包括目标信息中的第一部分信息,第一数据的大小不超过预设值。这样,可以在binder机制中支持分批传输数据,使得binder交互中的数据不会过大,改善因binder中数据过大导致binder内存耗尽产生的应用程序异常退出现象。Determine that the first process calls the target information to the second process; transmit the first data in the target information to the first process; wherein, the first data includes the first part of information in the target information, and the size of the first data does not exceed a preset value . In this way, batch transmission of data can be supported in the binder mechanism, so that the data in the binder interaction will not be too large, and the abnormal exit phenomenon of the application program caused by the exhaustion of the binder memory due to the excessive data in the binder can be improved.
一种可能的实现方式中,第一部分信息至少包括activity。这样可以使得重要的activity得到传输。In a possible implementation manner, the first part of information includes at least activity. This allows important activities to be transferred.
一种可能的实现方式中,第一部分信息为:按照目标信息中的activity、service、broadcast、providers从前到后的顺序,选择得到的小于或等于预设值的部分。这样,可以使得第一数据的大小不超过预设值,且使得重要数据得到传输。In a possible implementation manner, the first part of information is: according to the order of activity, service, broadcast, and providers in the target information from front to back, select the part that is less than or equal to the preset value. In this way, the size of the first data may not exceed a preset value, and important data may be transmitted.
一种可能的实现方式中,确定第一进程向第二进程调取目标信息之前,还包括:获取目标信息对应的应用组件个数;根据应用组件个数确定第一进程向第二进程发送调用目标信息的指令的次数;其中,第一进程每向第二进程发送一次调用目标信息的指令,第二进程向第一进程返回一次数据,任一次返回的数据的大小不超过预设值。这样可以基于应用组件个数确定第二进程将分多少批完成全部数据传输,使得第二进程能完整的向第一进程传输目标信息。In a possible implementation, before determining that the first process calls the target information to the second process, it also includes: obtaining the number of application components corresponding to the target information; determining the first process to send the call to the second process according to the number of application components The number of target information instructions; wherein, each time the first process sends an instruction to call the target information to the second process, the second process returns data to the first process once, and the size of any returned data does not exceed a preset value. In this way, based on the number of application components, it can be determined how many batches the second process will complete the data transmission, so that the second process can completely transmit the target information to the first process.
一种可能的实现方式中,向第一进程传输目标信息中的第一数据之后,还包括:第一进程向第二进程发送调用目标信息的指令;第二进程向第一进程传输目标信息中的第二数据,第二数据包括目标信息中的第二部分信息,第二数据的大小不超过预设值。这样可以使得第二进程能完整的向第一进程传输目标信息。In a possible implementation manner, after transmitting the first data in the target information to the first process, it further includes: the first process sends an instruction to call the target information to the second process; the second process transmits the target information to the first process The second data includes the second part of the target information, and the size of the second data does not exceed a preset value. In this way, the second process can completely transmit the target information to the first process.
一种可能的实现方式中,第一进程根据应用组件个数确定向第二进程发送调用目标信息的指令的次数,包括:当应用组件个数大于个数阈值时,第一进程根据应用组件个数确定向第二进程发送调用目标信息的指令的次数。第一进程获取第二进程中目标信息对应的应用组件个数,包括:第一进程基于getPackageInfoComponentCount获取第二进程中目标信息对应的应用组件个数。这样,当应用组件个数大于个数阈值时,第一进程根据应用组件个数确定向第二进程发送调用目标信息的指令的次数,并执行后续的分批次传输,使得binder交互中的数据不会过大,改善因binder中数据过大导致binder内存耗尽产生的应用程序异常退出现象。In a possible implementation manner, the first process determines the number of times to send instructions for invoking target information to the second process according to the number of application components, including: when the number of application components is greater than the number threshold, the first process determines the number of times according to the number of application components The number determines the number of times an instruction to send call target information to the second process. Obtaining the number of application components corresponding to the target information in the second process by the first process includes: acquiring the number of application components corresponding to the target information in the second process by the first process based on getPackageInfoComponentCount. In this way, when the number of application components is greater than the number threshold, the first process determines the number of times to send instructions for invoking target information to the second process according to the number of application components, and performs subsequent batch transmission, so that the data in the binder interaction It will not be too large to improve the abnormal exit phenomenon of the application program caused by the exhaustion of the binder memory due to the excessive data in the binder.
一种可能的实现方式中,第一数据中携带有第一值,第一值为第二进程将向第一进程传输的数据的总批次。这样,第一进程可以知道第二进程将向第一进程传输多少批次数据,则后续第一进程可以校验是否发生漏传,第一进程也可以知道第二进程是否完成数据传输。In a possible implementation manner, the first data carries a first value, and the first value is a total batch of data to be transmitted by the second process to the first process. In this way, the first process can know how many batches of data the second process will transmit to the first process, and then the subsequent first process can check whether any leakage occurs, and the first process can also know whether the second process has completed the data transmission.
一种可能的实现方式中,向第一进程传输目标信息中的第一数据之后,还包括:向第一进程传输目标信息中的第N数据,直到第二进程将目标信息中的组件信息分批次传输完成;其中,第N数据包括目标信息中的部分信息,第N数据的大小不超过预设值。这样,第二进程向第一进程传输第一数据后,还可以接着自动向第一进程继续传输目标信息中的其它数据,每次传输的数据大小不超过预设值即可,可以节约信令资源。In a possible implementation manner, after transmitting the first data in the target information to the first process, the method further includes: transmitting the Nth data in the target information to the first process until the second process divides the component information in the target information into The batch transmission is completed; wherein, the Nth data includes part of the target information, and the size of the Nth data does not exceed a preset value. In this way, after the second process transmits the first data to the first process, it can automatically continue to transmit other data in the target information to the first process, and the size of the data transmitted each time does not exceed the preset value, which can save signaling resource.
一种可能的实现方式中,第一数据和/或第N数据还携带有第二值,第二值为第一数据或第N数据在总批次中的具体批次值。这样,第一进程在得到第二进程传输的数据后,可以基于个数据的具体批次值对数据排序,或者检查是否有数据遗漏,以及具体遗漏的那批数据,便于后续重传等。In a possible implementation manner, the first data and/or the Nth data further carry a second value, and the second value is a specific batch value of the first data or the Nth data in the total batch. In this way, after the first process obtains the data transmitted by the second process, it can sort the data based on the specific batch value of each data, or check whether there is any missing data, and the specific missing batch of data, so as to facilitate subsequent retransmission.
第二方面,本申请实施例提供一种控制进程交互的装置,该控制进程交互的装置可以是终端设备,也可以是终端设备内的芯片或者芯片系统。该控制进程交互的装置可以包括处理单元和集成电路IC。处理单元用于实现第一方面或第一方面的任意一种可能的实现方式中与处理相关的任意方法。当该控制进程交互的装置是终端设备时,该处理单元可以是处理器。该控制进程交互的装置还可以包括存储单元,该存储单元可以是存储器。该存储单元用于存储指令,该处理单元执行该存储单元所存储的指令,以使该终端设备实现第一方面或第一方面的任意一种可能的实现方式中描述的一种方法。当该控制进程交互的装置是终端设备内的芯片或者芯片系统时,该处理单元可以是处理器。该处理单元执行存储单元所存储的指令,以使该终端设备实现第一方面或第一方面的任意一种可能的实现方式中描述的一种方法。该存储单元可以是该芯片内的存储单元(例如,寄存器、缓存等),也可以是该终端设备内的位于该芯片外部的存储单元(例如,只读存储器、随机存取存储器等)。In a second aspect, the embodiment of the present application provides an apparatus for controlling process interaction. The apparatus for controlling process interaction may be a terminal device, or may be a chip or a chip system in the terminal device. The device for controlling process interaction may include a processing unit and an integrated circuit IC. The processing unit is configured to implement any processing-related method in the first aspect or in any possible implementation manner of the first aspect. When the device for controlling process interaction is a terminal device, the processing unit may be a processor. The device for controlling process interaction may also include a storage unit, which may be a memory. The storage unit is used to store instructions, and the processing unit executes the instructions stored in the storage unit, so that the terminal device implements a method described in the first aspect or any possible implementation manner of the first aspect. When the device for controlling process interaction is a chip or a chip system in the terminal device, the processing unit may be a processor. The processing unit executes the instructions stored in the storage unit, so that the terminal device implements a method described in the first aspect or any possible implementation manner of the first aspect. The storage unit may be a storage unit in the chip (for example, a register, a cache, etc.), or a storage unit in the terminal device outside the chip (for example, a read-only memory, a random access memory, etc.).
示例性的,处理单元,用于确定第一进程向第二进程调取目标信息;向第一进程传输目标信息中的第一数据;其中,第一数据包括目标信息中的第一部分信息,第一数据的大小不超过预设值。Exemplarily, the processing unit is configured to determine that the first process calls the target information from the second process; transmit the first data in the target information to the first process; wherein the first data includes a first part of information in the target information, and the first A data size does not exceed a preset value.
一种可能的实现方式中,第一部分信息至少包括activity。In a possible implementation manner, the first part of information includes at least activity.
一种可能的实现方式中,第一部分信息为:按照目标信息中的activity、service、broadcast、providers从前到后的顺序,选择得到的小于或等于预设值的部分。In a possible implementation manner, the first part of information is: according to the order of activity, service, broadcast, and providers in the target information from front to back, select the part that is less than or equal to the preset value.
一种可能的实现方式中,处理单元,还用于获取目标信息对应的应用组件个数;根据应用组件个数确定第一进程向第二进程发送调用目标信息的指令的次数;其中,第一进程每向第二进程发送一次调用目标信息的指令,第二进程向第一进程返回一次数据,任一次返回的数据的大小不超过预设值。In a possible implementation manner, the processing unit is further configured to obtain the number of application components corresponding to the target information; determine the number of times the first process sends an instruction to call the target information to the second process according to the number of application components; wherein, the first Each time the process sends an instruction to call the target information to the second process, the second process returns data to the first process once, and the size of the data returned at any one time does not exceed a preset value.
一种可能的实现方式中,处理单元,还用于第一进程向第二进程发送调用目标信息的指令;第二进程向第一进程传输目标信息中的第二数据,第二数据包括目标信息中的第二部分信息,第二数据的大小不超过预设值。In a possible implementation manner, the processing unit is further used for the first process to send an instruction to call the target information to the second process; the second process transmits the second data in the target information to the first process, and the second data includes the target information In the second part of information, the size of the second data does not exceed the preset value.
一种可能的实现方式中,处理单元,具体用于当应用组件个数大于个数阈值时,第一进程根据应用组件个数确定向第二进程发送调用目标信息的指令的次数。处理单元,具体还用于第一进程基于getPackageInfoComponentCount获取第二进程中目标信息对应的应用组件个数。In a possible implementation manner, the processing unit is specifically configured to: when the number of application components is greater than the number threshold, the first process determines the number of times to send the instruction calling the target information to the second process according to the number of application components. The processing unit is specifically also used for the first process to obtain the number of application components corresponding to the target information in the second process based on getPackageInfoComponentCount.
一种可能的实现方式中,第一数据中携带有第一值,第一值为第二进程将向第一进程传输的数据的总批次。In a possible implementation manner, the first data carries a first value, and the first value is a total batch of data to be transmitted by the second process to the first process.
一种可能的实现方式中,处理单元,还用于向第一进程传输目标信息中的第N数据,直到第二进程将目标信息中的组件信息分批次传输完成;其中,第N数据包括目标信息中的部分信息,第N数据的大小不超过预设值。In a possible implementation manner, the processing unit is further configured to transmit the Nth data in the target information to the first process until the second process completes the batch transmission of the component information in the target information; wherein, the Nth data includes For part of the information in the target information, the size of the Nth data does not exceed a preset value.
一种可能的实现方式中,第一数据和/或第N数据还携带有第二值,第二值为第一数据或第N数据在总批次中的具体批次值。In a possible implementation manner, the first data and/or the Nth data further carry a second value, and the second value is a specific batch value of the first data or the Nth data in the total batch.
第三方面,本申请实施例提供一种电子设备,括处理器和存储器,存储器用于存储代码指令,处理器用于运行代码指令,以执行第一方面或第一方面的任意一种可能的实现方式中描述的方法。In the third aspect, the embodiment of the present application provides an electronic device, including a processor and a memory, the memory is used to store code instructions, and the processor is used to run the code instructions to execute the first aspect or any possible implementation of the first aspect method described in Methods.
第四方面,本申请实施例提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机程序或指令,当计算机程序或指令在计算机上运行时,使得计算机执行第一方面或第一方面的任意一种可能的实现方式中描述的控制进程交互的方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program or instruction is stored, and when the computer program or instruction is run on a computer, the computer executes the first aspect or the first aspect. The method for controlling process interaction described in any one possible implementation manner of the aspect.
第五方面,本申请实施例提供一种包括计算机程序的计算机程序产品,当计算机程序在计算机上运行时,使得计算机执行第一方面或第一方面的任意一种可能的实现方式中描述的控制进程交互的方法。In the fifth aspect, the embodiment of the present application provides a computer program product including a computer program. When the computer program runs on the computer, the computer executes the control described in the first aspect or any possible implementation of the first aspect. Methods for process interaction.
第六方面,本申请提供一种芯片或者芯片系统,该芯片或者芯片系统包括至少一个处理器和通信接口,通信接口和至少一个处理器通过线路互联,至少一个处理器用于运行计算机程序或指令,以执行第一方面或第一方面的任意一种可能的实现方式中描述的控制进程交互的方法。其中,芯片中的通信接口可以为输入/输出接口、管脚或电路等。In a sixth aspect, the present application provides a chip or a chip system, the chip or chip system includes at least one processor and a communication interface, the communication interface and the at least one processor are interconnected through lines, and the at least one processor is used to run computer programs or instructions, To execute the method for controlling process interaction described in the first aspect or any possible implementation manner of the first aspect. Wherein, the communication interface in the chip may be an input/output interface, a pin or a circuit, and the like.
在一种可能的实现中,本申请中上述描述的芯片或者芯片系统还包括至少一个存储器,该至少一个存储器中存储有指令。该存储器可以为芯片内部的存储单元,例如,寄存器、缓存等,也可以是该芯片的存储单元(例如,只读存储器、随机存取存储器等)。In a possible implementation, the chip or the chip system described above in the present application further includes at least one memory, and instructions are stored in the at least one memory. The memory may be a storage unit inside the chip, such as a register, a cache, etc., or a storage unit of the chip (eg, a read-only memory, a random access memory, etc.).
应当理解的是,本申请的第二方面至第六方面与本申请的第一方面的技术方案相对应,各方面及对应的可行实施方式所取得的有益效果相似,不再赘述。It should be understood that, the second aspect to the sixth aspect of the present application correspond to the technical solution of the first aspect of the present application, and the beneficial effects obtained by each aspect and the corresponding feasible implementation manners are similar, so details are not repeated here.
附图说明Description of drawings
图1为本申请实施例提供的一种电子设备的结构示意图;FIG. 1 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
图2为本申请实施例提供的一种电子设备的软件框架示意图Fig. 2 is a schematic diagram of the software framework of an electronic device provided by the embodiment of the present application
图3为本申请实施例提供的一种控制进程交互的的流程示意图;FIG. 3 is a schematic flowchart of a control process interaction provided by an embodiment of the present application;
图4为本申请实施例提供的一种控制进程交互的的指令示意图;FIG. 4 is a schematic diagram of an instruction for controlling process interaction provided by an embodiment of the present application;
图5为本申请实施例提供的一种芯片的结构示意图。FIG. 5 is a schematic structural diagram of a chip provided by an embodiment of the present application.
具体实施方式Detailed ways
为了便于清楚描述本申请实施例的技术方案,以下,对本申请实施例中所涉及的部分术语和技术进行简单介绍:In order to clearly describe the technical solutions of the embodiments of the present application, the following briefly introduces some terms and technologies involved in the embodiments of the present application:
1、Binder:是安卓(Android)系统中进程间通讯(IPC)的一种方式,也是Android系统中重要的特性之一。Android系统中不同的App等可以运行在不同的进程中,Binder是这些进程间通信的桥梁。具体的,Android系统中包括四大组件:界面(Activity),服务(Service),广播(Broadcast)和内容(Content),Binder可以把系统中各个组件粘合在一起,基于各组件实现进程间的通信。1. Binder: It is a method of inter-process communication (IPC) in the Android (Android) system, and it is also one of the important features of the Android system. Different Apps in the Android system can run in different processes, and Binder is a bridge for communication between these processes. Specifically, the Android system includes four major components: interface (Activity), service (Service), broadcast (Broadcast) and content (Content). communication.
2、异步调用:应用向binder驱动发送数据后不需要挂起线程等待binder驱动的回复,而是直接结束。例如,客户端(Client端)调用IPlayer.start(),而且服务端(Server端)的启动(start)需要执行2秒,由于定义的接口是异步的,Client端可以快速的执行IPlayer.start(),不会被Server端拖延2秒。2. Asynchronous call: After the application sends data to the binder driver, it does not need to suspend the thread and wait for the binder driver's reply, but ends directly. For example, the client (Client) calls IPlayer.start(), and the start of the server (Server) takes 2 seconds. Since the defined interface is asynchronous, the Client can quickly execute IPlayer.start( ), it will not be delayed by the server for 2 seconds.
3、同步调用:应用向binder驱动发送数据后需要挂起线程等待binder驱动的回复。例如,Client端调用IPlayer.getVolume(),而且Server端的getVolume需要执行1秒,由于定义的接口是同步的,Client端在执行IPlayer.getVolume()的时候,会被Server端拖延1秒。3. Synchronous call: After the application sends data to the binder driver, it needs to suspend the thread and wait for the binder driver's reply. For example, the client calls IPlayer.getVolume(), and the getVolume on the server needs to be executed for 1 second. Since the defined interface is synchronous, when the client executes IPlayer.getVolume(), it will be delayed by the server for 1 second.
4、其他术语4. Other terms
在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。例如,第一芯片和第二芯片仅仅是为了区分不同的芯片,并不对其先后顺序进行限定。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。In the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with basically the same function and effect. For example, the first chip and the second chip are only used to distinguish different chips, and their sequence is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference.
需要说明的是,本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。It should be noted that, in the embodiments of the present application, words such as "exemplary" or "for example" are used as examples, illustrations or descriptions. Any embodiment or design described herein as "exemplary" or "for example" is not to be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete manner.
本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a--c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. "And/or" describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B, which can mean: A exists alone, A and B exist at the same time, and B exists alone, where A, B can be singular or plural. The character "/" generally indicates that the contextual objects are an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one item (piece) of a, b, or c can represent: a, b, c, a-b, a--c, b-c, or a-b-c, where a, b, c can be single or is multiple.
5、终端设备5. Terminal equipment
本申请实施例的终端设备也可以为任意形式的电子设备,例如,电子设备可以包括具有图像处理功能的手持式设备、车载设备等。例如,一些电子设备为:手机(mobilephone)、平板电脑、掌上电脑、笔记本电脑、移动互联网设备(mobile internet device,MID)、可穿戴设备,虚拟现实(virtual reality,VR)设备、增强现实(augmented reality,AR)设备、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、远程手术(remote medical surgery)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端、蜂窝电话、无绳电话、会话启动协议(session initiation protocol,SIP)电话、无线本地环路(wireless local loop,WLL)站、个人数字助理(personal digital assistant,PDA)、具有无线通信功能的手持设备、计算设备或连接到无线调制解调器的其它处理设备、车载设备、可穿戴设备,5G网络中的终端设备或者未来演进的公用陆地移动通信网络(public land mobile network,PLMN)中的终端设备等,本申请实施例对此并不限定。The terminal device in this embodiment of the present application may also be any form of electronic device. For example, the electronic device may include a handheld device with an image processing function, a vehicle-mounted device, and the like. For example, some electronic devices are: mobile phone, tablet computer, handheld computer, notebook computer, mobile internet device (mobile internet device, MID), wearable device, virtual reality (virtual reality, VR) device, augmented reality (augmented reality, AR) equipment, wireless terminals in industrial control, wireless terminals in self driving, wireless terminals in remote medical surgery, wireless terminals in smart grid Terminals, wireless terminals in transportation safety, wireless terminals in smart city, wireless terminals in smart home, cellular phones, cordless phones, session initiation protocol (SIP) ) telephones, wireless local loop (wireless local loop, WLL) stations, personal digital assistants (personal digital assistant, PDA), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, vehicle-mounted devices, A wearable device, a terminal device in a 5G network, or a terminal device in a future evolved public land mobile network (PLMN), etc., are not limited in this embodiment of the present application.
作为示例而非限定,在本申请实施例中,该电子设备还可以是可穿戴设备。可穿戴设备也可以称为穿戴式智能设备,是应用穿戴式技术对日常穿戴进行智能化设计、开发出可以穿戴的设备的总称,如眼镜、手套、手表、服饰及鞋等。可穿戴设备即直接穿在身上,或是整合到用户的衣服或配件的一种便携式设备。可穿戴设备不仅仅是一种硬件设备,更是通过软件支持以及数据交互、云端交互来实现强大的功能。广义穿戴式智能设备包括功能全、尺寸大、可不依赖智能手机实现完整或者部分的功能,例如:智能手表或智能眼镜等,以及只专注于某一类应用功能,需要和其它设备如智能手机配合使用,如各类进行体征监测的智能手环、智能首饰等。As an example but not a limitation, in this embodiment of the present application, the electronic device may also be a wearable device. Wearable devices can also be called wearable smart devices, which is a general term for the application of wearable technology to intelligently design daily wear and develop wearable devices, such as glasses, gloves, watches, clothing and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothing or accessories. Wearable devices are not only a hardware device, but also achieve powerful functions through software support, data interaction, and cloud interaction. Generalized wearable smart devices include full-featured, large-sized, complete or partial functions without relying on smart phones, such as smart watches or smart glasses, etc., and only focus on a certain type of application functions, and need to cooperate with other devices such as smart phones Use, such as various smart bracelets and smart jewelry for physical sign monitoring.
此外,在本申请实施例中,电子设备还可以是物联网(internet of things,IoT)系统中的终端设备,IoT是未来信息技术发展的重要组成部分,其主要技术特点是将物品通过通信技术与网络连接,从而实现人机互连,物物互连的智能化网络。In addition, in this embodiment of the application, the electronic device can also be a terminal device in the Internet of Things (IoT) system. IoT is an important part of the development of information technology in the future. Connect with the network to realize the intelligent network of man-machine interconnection and object interconnection.
本申请实施例中的电子设备也可以称为:终端设备、用户设备(user equipment,UE)、移动台(mobile station,MS)、移动终端(mobile terminal,MT)、接入终端、用户单元、用户站、移动站、移动台、远方站、远程终端、移动设备、用户终端、终端、无线通信设备、用户代理或用户装置等。The electronic equipment in this embodiment of the present application may also be called: terminal equipment, user equipment (user equipment, UE), mobile station (mobile station, MS), mobile terminal (mobile terminal, MT), access terminal, user unit, Subscriber station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device, etc.
在本申请实施例中,电子设备或各个网络设备包括硬件层、运行在硬件层之上的操作系统层,以及运行在操作系统层上的应用层。该硬件层包括中央处理器(centralprocessing unit,CPU)、内存管理单元(memory management unit,MMU)和内存(也称为主存)等硬件。该操作系统可以是任意一种或多种通过进程(process)实现业务处理的计算机操作系统,例如,Linux操作系统、Unix操作系统、Android操作系统、iOS操作系统或windows操作系统等。该应用层包含浏览器、通讯录、文字处理软件、即时通信软件等应用。In the embodiment of the present application, the electronic device or each network device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as a central processing unit (central processing unit, CPU), a memory management unit (memory management unit, MMU), and memory (also called main memory). The operating system may be any one or more computer operating systems that implement business processing through processes, for example, Linux operating system, Unix operating system, Android operating system, iOS operating system, or windows operating system. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.
示例性的,图1示出了电子设备的结构示意图。Exemplarily, FIG. 1 shows a schematic structural diagram of an electronic device.
电子设备可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and user An identification module (subscriber identification module, SIM) card interface 195 and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本发明实施例示意的结构并不构成对电子设备的具体限定。在本申请另一些实施例中,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structure shown in the embodiment of the present invention does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the illustrations, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor ( image signal processor (ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuitsound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuitsound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver (universal asynchronous receiver) /transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and/or A universal serial bus (universal serial bus, USB) interface, etc.
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备的结构限定。在本申请另一些实施例中,电子设备也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules shown in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
电子设备通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device realizes the display function through the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
电子设备可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device can realize the shooting function through ISP, camera 193 , video codec, GPU, display screen 194 and application processor.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. Such as saving music, video and other files in the external memory card.
内部存储器121可以用于存储计算机可执行程序代码,可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备的各种功能应用以及数据处理。例如,可以执行本申请实施例的控制进程交互的方法。The internal memory 121 may be used to store computer-executable program codes including instructions. The internal memory 121 may include an area for storing programs and an area for storing data. Wherein, the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like. The storage data area can store data (such as audio data, phone book, etc.) created during the use of the electronic device. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like. The processor 110 executes various functional applications and data processing of the electronic device by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor. For example, the method for controlling process interaction in the embodiment of the present application may be implemented.
在终端设备运行时,除了需要上述图1所示的部分或全部硬件支持,还需要加载在终端设备中的软件支持。加载在终端设备中的软件可以包括系统软件,还可以包括依赖于系统软件实现的APP,一些APP在运行时,可能调用其它APP的信息。When the terminal device is running, in addition to some or all of the hardware support shown in FIG. 1 above, software support loaded in the terminal device is also required. The software loaded in the terminal device may include system software, and may also include APPs implemented depending on the system software. Some APPs may call information of other APPs when running.
应用之间调用时,可以采用binder机制。示例性的,如图2所示,以应用A对应于进程A,应用B对应于进程B为例,说明进程间基于binder通信时的大概过程示意。可以理解的是,一个进程可以对应于一个或多个应用,本申请实施例对进程中具体对应的应用个数等不作具体限定。When calling between applications, the binder mechanism can be used. Exemplarily, as shown in FIG. 2 , taking application A corresponding to process A, and application B corresponding to process B as an example, an outline process of communication between processes based on a binder is illustrated. It can be understood that a process may correspond to one or more applications, and the embodiment of the present application does not specifically limit the number of applications corresponding to a process.
如图2所示,应用层中,进程A与进程B分别可以对应有各自的代理,例如代理包括IPC Thread State Tranasct binder通信实例。内核层,binder驱动可以作为各进程通信的桥梁,binder驱动可以为每个进程准备各自的内核缓冲区,映射到进程的虚拟地址空间和内核地址空间。在进程A与进程B进行binder通信时,进程A可以基于进程A的IPC ThreadState Tranasct binder通信实例与binder驱动通信,binder驱动将进程A的数据基于进程B的IPC Thread State Tranasct binder通信实例传递到进程B。可以理解,如果进程A与进程C,或进程B与进程C之间进行binder通信时,也可以采用类似的方式,不再赘述。As shown in FIG. 2 , in the application layer, process A and process B may respectively have their own agents, for example, the agents include IPC Thread State Tranasct binder communication instances. In the kernel layer, the binder driver can be used as a communication bridge for each process. The binder driver can prepare a separate kernel buffer for each process, and map it to the virtual address space and kernel address space of the process. When process A and process B perform binder communication, process A can communicate with the binder driver based on the IPC ThreadState Tranasct binder communication instance of process A, and the binder driver passes the data of process A to the process based on the IPC ThreadState Tranasct binder communication instance of process B b. It can be understood that if the binder communication is performed between process A and process C, or between process B and process C, a similar method can also be adopted, and details will not be repeated here.
一些实现中,在终端设备中有APP应用安装时,系统应用可能需要获取APP的组件信息。例如,系统APP应用进程可以调用包管理服务(package manager service,PMS)接口,通过get application info与系统服务进程(system sever进程)进行binder通信来获取该安装APP的应用组件信息,system sever进程可以进一步基于PMS get applicationinfo从PMS应用管理得到该安装应用的application info,并向系统APP应用进程返回该安装应用的application info。In some implementations, when an APP application is installed in the terminal device, the system application may need to obtain APP component information. For example, the system APP application process can call the package manager service (package manager service, PMS) interface, and perform binder communication with the system service process (system sever process) through get application info to obtain the application component information of the installed APP, and the system sever process can The application info of the installed application is further obtained from the PMS application management based on the PMS get applicationinfo, and the application info of the installed application is returned to the system APP application process.
但是,可以理解的是,APP的更新速度较快,新的APP总是不断涌出,一些系统APP或三方APP的应用组件的个数较大,例如可以达到四千个以上的activity,这样,在这些应用的APP应用进程与systemsever进程的binder通信中,会出现需要传输的组件信息达到1.3MB大小。However, it is understandable that the update speed of APP is relatively fast, and new APPs are always pouring out. The number of application components of some system APPs or third-party APPs is relatively large, for example, it can reach more than 4,000 activities. In this way, In the binder communication between the APP application process of these applications and the system server process, there will be component information that needs to be transmitted up to 1.3MB in size.
而binder通信的机制中,binder驱动为每个进程准备内核缓冲区通常较小,例如4M,且该4M的内核缓冲区,应用层能用到的可能只有8k-1M,其他供内核层使用。In the binder communication mechanism, the binder driver usually prepares a small kernel buffer for each process, such as 4M, and the 4M kernel buffer may only be used by the application layer 8k-1M, and the rest is used by the kernel layer.
这样binder通信中会因为传输的组件信息太大而引起调用失败返回“DeadSystem Exception”,从而引起应用crash闪退。其中,crash可以理解为客户端程序运行时遇到无法处理的错误或异常,导致退出应用程序。In this way, the binder communication will cause the call to fail and return "DeadSystem Exception" because the transmitted component information is too large, which will cause the application to crash. Among them, crash can be understood as an error or exception that cannot be handled when the client program is running, resulting in the exit of the application program.
另一些实现中,应用进程在相互调用时,也可能一次性传输较大数据,这样该单次较大数据也可能导致binder空间被占满,出现系统卡死或应用程序异常退出的现象。In other implementations, when application processes call each other, large data may be transmitted at one time, so that the single large data may also cause the binder space to be full, causing the system to freeze or the application to exit abnormally.
有鉴于此,本申请实施例中,可以在binder机制中支持分批传输数据,使得binder交互中的数据不会过大,改善因binder中数据过大导致binder内存耗尽产生的应用程序异常退出现象。In view of this, in the embodiment of this application, the binder mechanism can support data transfer in batches, so that the data in the binder interaction will not be too large, and the abnormal exit of the application program caused by the exhaustion of the binder memory due to the excessive data in the binder can be improved. Phenomenon.
下面通过具体的实施例对本申请实施例的控制进程交互的方法进行详细说明。下面的实施例可以相互结合或独立实施,对于相同或相似的概念或过程可能在某些实施例中不再赘述。The method for controlling process interaction in the embodiment of the present application will be described in detail below through specific embodiments. The following embodiments may be combined or implemented independently, and the same or similar concepts or processes may not be repeated in some embodiments.
示例性的,图3示出了本申请实施例一种控制进程交互的方法。方法包括:Exemplarily, FIG. 3 shows a method for controlling process interaction according to an embodiment of the present application. Methods include:
S301:确定第一进程向第二进程调取目标信息。S301: Determine that the first process calls the target information from the second process.
本申请实施例中,第一进程和第二进程均可以是运行在终端设备中的任意进程,第一进程可以理解为调用方进程,第二进程可以理解为被调用进程。目标信息可以是与第二进程有关的任意信息,例如目标信息可以包括第二进程对应的应用的应用组件信息等。第一进程可以基于第一进程对应的第一binder通信实例向第二进程调取目标信息。In this embodiment of the present application, both the first process and the second process may be any process running on the terminal device, the first process may be understood as a caller process, and the second process may be understood as a called process. The target information may be any information related to the second process. For example, the target information may include application component information of an application corresponding to the second process. The first process may retrieve target information from the second process based on the first binder communication instance corresponding to the first process.
本申请实施例对第一进程调用第二进程的时机以及作用不作限定。示例性的,在终端设备中新安装应用时,终端设备中的系统进程可以调取该新安装应用的组件信息,以实现对该新安装应用的设置或管理等。或者例如,在应用A运行时,需要用到应用B中的信息,则应用A的第一进程可以调用应用B的第二进程。The embodiment of the present application does not limit the timing and effect of calling the second process by the first process. Exemplarily, when an application is newly installed in the terminal device, the system process in the terminal device may call component information of the newly installed application, so as to implement setting or management of the newly installed application. Or for example, when application A is running, information in application B needs to be used, then the first process of application A may call the second process of application B.
需要说明的是,S301的确定第一进程向第二进程调取目标信息可以理解为第一进程发起调用第二进程的目标信息。It should be noted that the determination in S301 that the first process calls the target information from the second process may be understood as the first process initiates to call the target information of the second process.
S302:向第一进程传输目标信息中的第一数据;其中,第一数据包括目标信息中的第一部分信息,第一数据的大小不超过预设值。S302: Transmit first data in the target information to the first process; wherein, the first data includes a first part of information in the target information, and the size of the first data does not exceed a preset value.
本申请实施例中,第一数据可以指目标信息中的其中一部分数据大小不超过预设值的数据。或者可以理解为,第二进程向第一进程返回目标信息时,可以将目标信息拆分,通过分批传输的方式,使得每次传输的数据大小不超过预设值。其中,预设值可以是基于经验设置的,预设值可以与binder空间的大小正相关,例如预设值可以设置为200KB-800KB的任意值,比如300KB等。In this embodiment of the present application, the first data may refer to data whose size of a part of the target information does not exceed a preset value. Or it can be understood that, when the second process returns the target information to the first process, the target information can be split and transmitted in batches so that the data size of each transmission does not exceed a preset value. Wherein, the preset value can be set based on experience, and the preset value can be positively correlated with the size of the binder space, for example, the preset value can be set to any value from 200KB to 800KB, such as 300KB.
需要说明的是,本申请实施例对目标信息拆分的具体方式不作限定,可以将目标信息的全部数据按照时间戳顺序、重要程度顺序、数据类型区分等任意方式拆分,使得单次传输时数据的大小不超过预设值即可。It should be noted that the embodiment of the present application does not limit the specific method of splitting the target information. All the data of the target information can be split in any way such as timestamp order, importance order, and data type distinction, so that when a single transmission The size of the data does not exceed a preset value.
可能的实现中,也可以根据目标信息对应的应用组件的个数进行拆分,例如,每个应用组件大小约为0.3KB,若预设值为300KB,则单次传输的应用组件的最大个数可以设置为300KB/0.3KB=1000,则第一数据中包括的应用组件的个数不超过1000。In a possible implementation, it can also be split according to the number of application components corresponding to the target information. For example, the size of each application component is about 0.3KB. If the default value is 300KB, the maximum number of application components for a single transmission The number can be set as 300KB/0.3KB=1000, then the number of application components included in the first data does not exceed 1000.
本申请实施例中,第二进程可以响应于第一进程的调用,基于第二进程对应的第二binder通信实例向第一进程传输目标信息对应的第一数据。In this embodiment of the present application, the second process may transmit the first data corresponding to the target information to the first process based on the second binder communication instance corresponding to the second process in response to the call of the first process.
综上,本申请实施例中,可以在binder机制中支持分批传输数据,使得binder交互中的数据不会过大,改善因binder中数据过大导致binder内存耗尽产生的应用程序异常退出现象。To sum up, in the embodiment of this application, the binder mechanism can support data transfer in batches, so that the data in the binder interaction will not be too large, and the abnormal exit phenomenon of the application program caused by the exhaustion of the binder memory due to the excessive data in the binder can be improved. .
第一种可能的实现中,在图3的实施例的基础上,第一数据可以为目标信息中较为重要的数据,在第一进程获取到第一数据后大概能实现得到整体目标信息后类似的功能,则第二进程向第一进程传输第一数据之后,可以结束向第一进程传输数据。或者可以理解为,在第一进程向第二进程调用目标信息后,为了避免单次数据传输过大造成应用异常退出,第二进程可以向第一进程返回部分重要数据即可。In the first possible implementation, on the basis of the embodiment in Figure 3, the first data can be more important data in the target information, and after the first process obtains the first data, it can probably be achieved after obtaining the overall target information. function, after the second process transmits the first data to the first process, it can end the data transmission to the first process. Or it can be understood that, after the first process calls the target information to the second process, in order to avoid abnormal exit of the application due to excessive single data transmission, the second process can return some important data to the first process.
以目标信息为第二进程对应的应用的组件信息为例,组件信息可以包括activity、service、broadcast或providers的一种或多种应用组件类型,任一种类型的应用组件的数量可以为多个,activity应用组件是应用中比较关键的应用组件,因此可以先传输activity应用组件,则第一部分信息至少包括activity。这样可以使得重要的activity得到传输。Taking the target information as an example of the component information of the application corresponding to the second process, the component information may include one or more application component types of activity, service, broadcast or providers, and the number of any type of application component may be multiple , the activity application component is a key application component in the application, so the activity application component can be transmitted first, and the first part of information includes at least the activity. This allows important activities to be transferred.
可以理解的是,在不同的应用中,activity、service、broadcast、providers四种组件对应的重要程度可能不同,因此,第一数据中可以包括activity、service、broadcast、providers四种组件中按照重要程度排序后的部分数据,使得第一数据的大小不超过预设值,且使得重要数据得到传输。It is understandable that in different applications, the four components of activity, service, broadcast, and providers may have different degrees of importance. Therefore, the first data may include the four components of activity, service, broadcast, and providers according to their importance. Part of the data is sorted so that the size of the first data does not exceed a preset value and important data is transmitted.
例如,第一部分信息可以为:按照目标信息中的activity、service、broadcast、providers从前到后的顺序,选择得到的小于或等于预设值的部分。For example, the first part of information may be: a part less than or equal to a preset value selected according to the order of activity, service, broadcast, and providers in the target information from front to back.
第二种可能的实现中,第二进程向第一进程传输第一数据后,可以等待第一进程的调取指令,接收到第一进程的调取指令后,再继续向第一进程传输目标信息中的其它数据,每次传输的数据大小不超过预设值即可。这样可以使得第二进程能完整的向第一进程传输目标信息。In the second possible implementation, after the second process transmits the first data to the first process, it can wait for the calling command of the first process, and after receiving the calling command of the first process, continue to transmit the target to the first process For other data in the message, the data size of each transmission should not exceed the preset value. In this way, the second process can completely transmit the target information to the first process.
示例性的,在第二进程向第一进程传输第一数据之前,获取目标信息对应的应用组件个数;根据应用组件个数确定第一进程向第二进程发送调用目标信息的指令的次数;其中,第一进程每向第二进程发送一次调用目标信息的指令,第二进程向第一进程返回一次数据,任一次返回的数据的大小不超过预设值。Exemplarily, before the second process transmits the first data to the first process, obtain the number of application components corresponding to the target information; determine the number of times the first process sends an instruction to call the target information to the second process according to the number of application components; Wherein, each time the first process sends an instruction to call the target information to the second process, the second process returns data to the first process once, and the size of any returned data does not exceed a preset value.
例如,可以设计用于支持获取应用组件个数的第一接口,终端设备可以基于第一接口以及getPackageInfoComponentCount获取第二进程中目标信息对应的应用组件个数。getPackageInfoComponentCount例如可以包括getPackageInfoComponentCount(StringpackageName,int flags)。For example, the first interface may be designed to support obtaining the number of application components, and the terminal device may obtain the number of application components corresponding to the target information in the second process based on the first interface and getPackageInfoComponentCount. getPackageInfoComponentCount may include, for example, getPackageInfoComponentCount(StringpackageName, int flags).
得到目标信息对应的应用组件个数后,可以进一步根据应用组件个数确定第一进程向第二进程发送调用目标信息的指令的次数。After obtaining the number of application components corresponding to the target information, the number of times the first process sends an instruction to call the target information to the second process may be further determined according to the number of application components.
示例性的,得到目标信息对应的应用组件个数为M,在单次传输的组件信息总和不超过预设值时所能传的最多应用组件个数为L,则第一进程向第二进程发送调用目标信息的指令的次数可以为M/L,可以理解的是,如果M/L不为整数,则不管小数点后为任意值,均可以将进位得到的整数值作为第一进程向第二进程发送调用目标信息的指令的次数。Exemplarily, the number of application components corresponding to the obtained target information is M, and the maximum number of application components that can be transmitted when the sum of the component information transmitted in a single time does not exceed the preset value is L, then the first process sends the second process The number of times to send the instruction to call the target information can be M/L. It can be understood that if M/L is not an integer, then regardless of any value after the decimal point, the integer value obtained by the carry can be used as the first process to the second process. The number of times the process sent an instruction that invoked the target's information.
这样,向第一进程传输目标信息中的第一数据之后,还包括:第一进程向第二进程发送调用目标信息的指令;第二进程向第一进程传输目标信息中的第二数据,第二数据包括目标信息中的第二部分信息,第二数据的大小不超过预设值。可以理解的是,如果确定第一进程向第二进程发送调用目标信息的指令的次数大于2,则后续第一进程还会继续向第二进程发送调用目标信息的指令,第二进程继续向第一进程传输目标信息中的数据,每发一次指令传输一次数据,直到达到第一进程向第二进程发送调用目标信息的指令的次数。In this way, after transmitting the first data in the target information to the first process, it also includes: the first process sends an instruction to call the target information to the second process; the second process transmits the second data in the target information to the first process; The second data includes the second part of the target information, and the size of the second data does not exceed a preset value. It can be understood that, if it is determined that the number of times that the first process sends instructions for invoking target information to the second process is greater than 2, then the first process will continue to send instructions for invoking target information to the second process, and the second process will continue to send instructions for invoking target information to the second process. A process transmits the data in the target information, and transmits the data every time an instruction is sent, until the number of times that the first process sends instructions calling the target information to the second process is reached.
可选的,第一进程根据应用组件个数确定向第二进程发送调用目标信息的指令的次数,包括:当应用组件个数大于个数阈值时,第一进程根据应用组件个数确定向第二进程发送调用目标信息的指令的次数。Optionally, the first process determines the number of times to send instructions for invoking target information to the second process according to the number of application components, including: when the number of application components is greater than the number threshold, the first process determines the number of times to send instructions to the second process according to the number of application components Second, the number of times the process sends an instruction to call the target information.
本申请实施例中,个数阈值可以是单次传输的组件信息总和不超过预设值时所能传的最多应用组件个数,例如个数阈值可以为1000等。In this embodiment of the present application, the number threshold may be the maximum number of application components that can be transmitted when the sum of the component information transmitted in a single transmission does not exceed a preset value, for example, the number threshold may be 1000.
目标信息中的应用组件的数量可能小于或等于个数阈值,这样,就可以不需要分批次传输数据,第二进程可以向第一进程返回目标信息的全部应用组件,节约计算资源。当应用组件个数大于个数阈值时,第一进程根据应用组件个数确定向第二进程发送调用目标信息的指令的次数,并执行后续的分批次传输,使得binder交互中的数据不会过大,改善因binder中数据过大导致binder内存耗尽产生的应用程序异常退出现象。The number of application components in the target information may be less than or equal to the number threshold. In this way, there is no need to transmit data in batches, and the second process can return all application components of the target information to the first process, saving computing resources. When the number of application components is greater than the number threshold, the first process determines the number of times to send instructions for invoking target information to the second process according to the number of application components, and performs subsequent batch transmission, so that the data in the binder interaction will not If it is too large, it will improve the abnormal exit phenomenon of the application program caused by the exhaustion of the binder memory due to the excessive data in the binder.
第三种可能的实现中,第二进程向第一进程传输第一数据后,还可以接着自动向第一进程继续传输目标信息中的其它数据,每次传输的数据大小不超过预设值即可。或者可以理解为,第一进程向第二进程发送一次调用目标信息的指令后,第二进程可以分批次向第一进程传输目标信息中的数据,不需要第一进程再额外发送指令。In the third possible implementation, after the second process transmits the first data to the first process, it can then automatically continue to transmit other data in the target information to the first process, and the size of the data transmitted each time does not exceed the preset value. Can. Or it can be understood that after the first process sends an instruction to call the target information to the second process, the second process can transfer the data in the target information to the first process in batches, without the need for the first process to send additional instructions.
可选的,第一数据中携带有第一值,第一值为第二进程将向第一进程传输的数据的总批次。这样,第一进程可以知道第二进程将向第一进程传输多少批次数据,则后续第一进程可以校验是否发生漏传,第一进程也可以知道第二进程是否完成数据传输。Optionally, the first data carries a first value, and the first value is a total batch of data to be transmitted by the second process to the first process. In this way, the first process can know how many batches of data the second process will transmit to the first process, and then the subsequent first process can check whether any missing transmission occurs, and the first process can also know whether the second process has completed the data transmission.
例如,以总批次为Q为例,第一进程从第二进程接收到Q批次的数据,则可以认为目标信息获取完成,可以执行后续的步骤。或者,第一进程在预设时间长达到时,第一进程接收到来自第二进程的数据的批次没有达到Q,可以认为发生漏传。For example, taking the total batch as an example, and the first process receives Q batch of data from the second process, it can be considered that the acquisition of the target information is completed, and subsequent steps can be performed. Alternatively, when the first process reaches the preset time, the number of batches of data received by the first process from the second process does not reach Q, and it can be considered that a leak occurs.
这样,向第一进程传输目标信息中的第一数据之后,还包括:向第一进程传输目标信息中的第N数据,直到第二进程将目标信息中的组件信息分批次传输完成;其中,第N数据包括目标信息中的部分信息,第N数据的大小不超过预设值。本申请实施例中,第二进程可以自动向第一进程分批次传输数据,可以节约第一进程与第二进程之间的指令交互。In this way, after transmitting the first data in the target information to the first process, it also includes: transmitting the Nth data in the target information to the first process, until the second process completes the batch transmission of the component information in the target information; wherein , the Nth data includes part of the target information, and the size of the Nth data does not exceed a preset value. In the embodiment of the present application, the second process can automatically transfer data to the first process in batches, which can save instruction interaction between the first process and the second process.
可选的,第一数据和/或第N数据还携带有第二值,第二值为第一数据或第N数据在总批次中的具体批次值。这样,第一进程在得到第二进程传输的数据后,可以基于个数据的具体批次值对数据排序,或者检查是否有数据遗漏,以及具体遗漏的那批数据,便于后续重传等。Optionally, the first data and/or the Nth data also carry a second value, and the second value is a specific batch value of the first data or the Nth data in the total batch. In this way, after the first process obtains the data transmitted by the second process, it can sort the data based on the specific batch value of each data, or check whether there is any missing data, and the specific missing batch of data, so as to facilitate subsequent retransmission.
需要说明的是,上述第二进程分批次向第一进程传输数据时,可以设计用于按照索引分批获取组件信息的第二接口,终端设备可以基于第二接口以及getPackageInfoComponents获取第二进程中目标信息对应的应用组件。getPackageInfoComponents例如可以包括getPackageInfoComponents(StringpackageName,int flags,int start,int end),end<Count&&(end-start)<1000。It should be noted that when the above-mentioned second process transmits data to the first process in batches, the second interface for obtaining component information in batches according to the index can be designed, and the terminal device can obtain the information in the second process based on the second interface and getPackageInfoComponents The application component corresponding to the target information. getPackageInfoComponents may include, for example, getPackageInfoComponents(StringpackageName, int flags, int start, int end), where end<Count&&(end-start)<1000.
示例性的,图4示出了本申请实施例一种可能的接口实现。Exemplarily, FIG. 4 shows a possible interface implementation of this embodiment of the present application.
如图4所示,第一应用可以通过第一进程调用PMS接口,通过get package info与第二进程进行binder通信,以第二进程为系统服务进程(system sever进程)为例,systemsever进程可以进一步基于PMS get package info internal从PMS应用管理获取该第一应用的package info,PMS可以生成第一应用的组件信息(generate package info),PMS进一步将第一应用的组件信息处理为有效内容(PackageInfoUtils@generate),有效内容例如包括按照应用组件类型归类后的组件信息,比如组件信息包括activity、service、broadcast和providers,第二进程向第一进程返回组件信息时,可以按照本申请实施例的方式是的单次返回的各组件总数累计小于1000个。使得binder交互中的数据不会过大,改善因binder中数据过大导致binder内存耗尽产生的应用程序异常退出现象。As shown in Figure 4, the first application can call the PMS interface through the first process, and perform binder communication with the second process through get package info. Taking the second process as a system service process (system server process) as an example, the systemsever process can further Based on the PMS get package info internal to obtain the package info of the first application from the PMS application management, the PMS can generate the component information (generate package info) of the first application, and the PMS further processes the component information of the first application into valid content (PackageInfoUtils@ generate), the effective content includes, for example, component information classified according to application component types, such as component information including activity, service, broadcast, and providers. When the second process returns component information to the first process, it can follow the method of the embodiment of this application Yes, the total number of components returned in a single return is less than 1000. The data in the binder interaction will not be too large, and the abnormal exit phenomenon of the application program caused by the exhaustion of the binder memory due to the excessive data in the binder is improved.
上述主要从方法的角度对本申请实施例提供的方案进行了介绍。为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的方法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The foregoing mainly introduces the solutions provided by the embodiments of the present application from the perspective of methods. In order to realize the above functions, it includes corresponding hardware structures and/or software modules for performing various functions. Those skilled in the art should easily realize that, in combination with the method steps of the examples described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
本申请实施例可以根据上述方法示例对实现控制进程交互的方法的装置进行功能模块的划分,例如可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application can divide the functional modules of the device implementing the method for controlling process interaction according to the above method example, for example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module middle. The integrated modules can be implemented in the form of hardware or in the form of software function modules. It should be noted that the division of modules in the embodiment of the present application is schematic, and is only a logical function division, and there may be other division methods in actual implementation.
如图5示为本申请实施例提供的一种芯片的结构示意图。芯片500包括一个或两个以上(包括两个)处理器501、通信线路502、通信接口503和存储器504。FIG. 5 is a schematic structural diagram of a chip provided by an embodiment of the present application. Chip 500 includes one or more than two (including two) processors 501 , communication lines 502 , communication interface 503 and memory 504 .
在一些实施方式中,存储器504存储了如下的元素:可执行模块或者数据结构,或者他们的子集,或者他们的扩展集。In some implementations, the memory 504 stores the following elements: executable modules or data structures, or subsets thereof, or extensions thereof.
上述本申请实施例描述的方法可以应用于处理器501中,或者由处理器501实现。处理器501可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器501中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器501可以是通用处理器(例如,微处理器或常规处理器)、数字信号处理器(digitalsignal processing,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field-programmable gate array,FPGA)或者其他可编程逻辑器件、分立门、晶体管逻辑器件或分立硬件组件,处理器501可以实现或者执行本申请实施例中的公开的各处理相关的方法、步骤及逻辑框图。The methods described in the foregoing embodiments of the present application may be applied to the processor 501 or implemented by the processor 501 . The processor 501 may be an integrated circuit chip and has signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 501 or instructions in the form of software. The above-mentioned processor 501 may be a general-purpose processor (for example, a microprocessor or a conventional processor), a digital signal processor (digital signal processing, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), an off-the-shelf programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates, transistor logic devices or discrete hardware components, the processor 501 can implement or execute the methods, steps and methods related to each process disclosed in the embodiments of the present application. Logic block diagram.
结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。其中,软件模块可以位于随机存储器、只读存储器、可编程只读存储器或带电可擦写可编程存储器(electricallyerasable programmable read only memory,EEPROM)等本领域成熟的存储介质中。该存储介质位于存储器504,处理器501读取存储器504中的信息,结合其硬件完成上述方法的步骤。The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. Wherein, the software module may be located in a mature storage medium in the field such as random access memory, read-only memory, programmable read-only memory, or electrically erasable programmable read only memory (EEPROM). The storage medium is located in the memory 504, and the processor 501 reads the information in the memory 504, and completes the steps of the above method in combination with its hardware.
处理器501、存储器504以及通信接口503之间可以通过通信线路502进行通信。The processor 501 , the memory 504 and the communication interface 503 can communicate through the communication line 502 .
在上述实施例中,存储器存储的供处理器执行的指令可以以计算机程序产品的形式实现。其中,计算机程序产品可以是事先写入在存储器中,也可以是以软件形式下载并安装在存储器中。In the above embodiments, the instructions stored in the memory for execution by the processor may be implemented in the form of computer program products. Wherein, the computer program product may be written in the memory in advance, or may be downloaded and installed in the memory in the form of software.
本申请实施例还提供一种计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包括一个或多个可用介质集成的服务器、数据中心等数据存储设备。例如,可用介质可以包括磁性介质(例如,软盘、硬盘或磁带)、光介质(例如,数字通用光盘(digital versatile disc,DVD))、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。The embodiment of the present application also provides a computer program product including one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. The computer can be a general purpose computer, special purpose computer, computer network, or other programmable device. Computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g. Coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL) or wireless (such as infrared, wireless, microwave, etc.) transmission to another website site, computer, server or data center. Computer readable storage medium can be Any available media capable of being stored by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. For example, available media may include magnetic media (e.g., floppy disks, hard disks, or tapes), optical media (e.g., A digital versatile disc (digital versatile disc, DVD)), or a semiconductor medium (for example, a solid state disk (solid state disk, SSD)), etc.
本申请实施例还提供一种计算机可读存储介质。上述实施例中描述的方法可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。计算机可读介质可以包括计算机存储介质和通信介质,还可以包括任何可以将计算机程序从一个地方传送到另一个地方的介质。存储介质可以是可由计算机访问的任何目标介质。The embodiment of the present application also provides a computer-readable storage medium. The methods described in the foregoing embodiments may be fully or partially implemented by software, hardware, firmware or any combination thereof. Computer-readable media may include computer storage media and communication media, and may include any medium that can transfer a computer program from one place to another. A storage media may be any target media that can be accessed by a computer.
作为一种可能的设计,计算机可读介质可以包括紧凑型光盘只读储存器(compactdisc read-only memory,CD-ROM)、RAM、ROM、EEPROM或其它光盘存储器;计算机可读介质可以包括磁盘存储器或其它磁盘存储设备。而且,任何连接线也可以被适当地称为计算机可读介质。例如,如果使用同轴电缆,光纤电缆,双绞线,DSL或无线技术(如红外,无线电和微波)从网站,服务器或其它远程源传输软件,则同轴电缆,光纤电缆,双绞线,DSL或诸如红外,无线电和微波之类的无线技术包括在介质的定义中。如本文所使用的磁盘和光盘包括光盘(CD),激光盘,光盘,数字通用光盘(digital versatile disc,DVD),软盘和蓝光盘,其中磁盘通常以磁性方式再现数据,而光盘利用激光光学地再现数据。As a possible design, the computer-readable medium may include compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM or other optical disc storage; the computer-readable medium may include magnetic disk storage or other disk storage devices. Also, any connected cord is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of medium. Disk and disc, as used herein, includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. reproduce the data.
本申请实施例是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理单元以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理单元执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。Embodiments of the present application are described with reference to flowcharts and/or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processing unit of other programmable data processing equipment to produce a machine such that the instructions executed by the processing unit of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
Claims (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210764724.8A CN115202902B (en) | 2022-07-01 | 2022-07-01 | Method and related device for controlling process interaction |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210764724.8A CN115202902B (en) | 2022-07-01 | 2022-07-01 | Method and related device for controlling process interaction |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115202902A CN115202902A (en) | 2022-10-18 |
CN115202902B true CN115202902B (en) | 2023-08-22 |
Family
ID=83578984
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210764724.8A Active CN115202902B (en) | 2022-07-01 | 2022-07-01 | Method and related device for controlling process interaction |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115202902B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105335238A (en) * | 2014-08-12 | 2016-02-17 | 腾讯科技(深圳)有限公司 | Inter-process communication method and apparatus |
CN109684069A (en) * | 2017-10-13 | 2019-04-26 | 华为技术有限公司 | The method and terminal device of resource management |
WO2021083378A1 (en) * | 2019-11-01 | 2021-05-06 | 华为技术有限公司 | Method for accelerating starting of application, and electronic device |
WO2021208627A1 (en) * | 2020-04-13 | 2021-10-21 | 荣耀终端有限公司 | Task scheduling method and apparatus, and electronic device |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019061407A1 (en) * | 2017-09-30 | 2019-04-04 | 华为技术有限公司 | Method and device for handling timeout of system service |
CN109669784B (en) * | 2017-10-13 | 2021-06-22 | 华为技术有限公司 | Method and system for interprocess communication |
CN108984321B (en) * | 2018-06-29 | 2021-03-19 | Oppo(重庆)智能科技有限公司 | Mobile terminal, limiting method for interprocess communication of mobile terminal and storage medium |
CN109032812B (en) * | 2018-06-29 | 2020-10-02 | Oppo(重庆)智能科技有限公司 | Mobile terminal, limiting method for interprocess communication of mobile terminal and storage medium |
-
2022
- 2022-07-01 CN CN202210764724.8A patent/CN115202902B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105335238A (en) * | 2014-08-12 | 2016-02-17 | 腾讯科技(深圳)有限公司 | Inter-process communication method and apparatus |
CN109684069A (en) * | 2017-10-13 | 2019-04-26 | 华为技术有限公司 | The method and terminal device of resource management |
WO2021083378A1 (en) * | 2019-11-01 | 2021-05-06 | 华为技术有限公司 | Method for accelerating starting of application, and electronic device |
WO2021208627A1 (en) * | 2020-04-13 | 2021-10-21 | 荣耀终端有限公司 | Task scheduling method and apparatus, and electronic device |
Also Published As
Publication number | Publication date |
---|---|
CN115202902A (en) | 2022-10-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP4002108B1 (en) | Application start method and electronic device | |
EP3018919B1 (en) | Method of transmitting and receiving data of electronic device and electronic device using the method | |
US10257873B2 (en) | Method and electronic device for providing tethering service | |
EP4243556A1 (en) | Method for monitoring link and terminal device | |
EP4345669A1 (en) | User privacy protection method and apparatus | |
CN115499897B (en) | WiFi network access method and related device | |
CN116088888B (en) | Application program updating method and related device | |
CN115202902B (en) | Method and related device for controlling process interaction | |
CN116196621B (en) | Application processing method and related device | |
CN116737104B (en) | Volume adjustment method and related device | |
CN116860115A (en) | Application management method and related device | |
CN113591006B (en) | A Web extension method and device based on WebSocket | |
CN117156088A (en) | Image processing methods and related devices | |
CN115794413A (en) | Memory processing method and related device | |
CN116089110B (en) | Methods and related devices for controlling process interaction | |
CN116737258B (en) | Method and related device for unloading application | |
CN116088970B (en) | Method for controlling application call and related device | |
CN117714271B (en) | Message processing method and related device | |
CN114928899B (en) | Physical link establishment method and electronic equipment | |
CN116707048B (en) | A charging control method and related device based on OTG | |
CN117880885B (en) | Audio playback optimization method and electronic device | |
CN115421599B (en) | Input method display control method and related device | |
WO2024239760A1 (en) | Communication network connection method, and device and storage medium | |
CN117858279A (en) | SIM card service processing method and related device | |
CN119765673A (en) | Charging control method and related device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address |
Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Patentee after: Honor Terminal Co.,Ltd. Country or region after: China Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Patentee before: Honor Device Co.,Ltd. Country or region before: China |
|
CP03 | Change of name, title or address |