CN115686765A - Data processing method and electronic equipment - Google Patents

Data processing method and electronic equipment Download PDF

Info

Publication number
CN115686765A
CN115686765A CN202110846381.5A CN202110846381A CN115686765A CN 115686765 A CN115686765 A CN 115686765A CN 202110846381 A CN202110846381 A CN 202110846381A CN 115686765 A CN115686765 A CN 115686765A
Authority
CN
China
Prior art keywords
electronic device
application
data
information
electronic
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
CN202110846381.5A
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 CN202110846381.5A priority Critical patent/CN115686765A/en
Priority to PCT/CN2022/106967 priority patent/WO2023005783A1/en
Publication of CN115686765A publication Critical patent/CN115686765A/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/48Program initiating; Program switching, e.g. by interrupt
    • 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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • 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

Landscapes

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

Abstract

The embodiment of the application discloses a data processing method and electronic equipment, and relates to the technical field of communication. The first electronic device can obtain information of the second electronic device used for determining whether the second electronic device can assist the first electronic device to achieve application keep-alive or not, and under the condition that the second electronic device can assist the first electronic device to achieve application keep-alive, data of the first application running in a background of the first electronic device is sent to the second electronic device, and the data of the first application is deleted. In this way, the first electronic device may release the data of the first application to obtain more free storage space. The background application of the first electronic device is prevented from being killed due to insufficient running memory, application keep-alive is achieved, and user experience is improved.

Description

Data processing method and electronic equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a data processing method and an electronic device.
Background
With the development of technology, users using electronic devices are increasing, and developers developing Applications (APPs) on electronic devices are also increasing. Therefore, an electronMultiple applications are typically installed on the device, for example
Figure BDA0003180711150000013
Figure BDA0003180711150000012
And so on. For developers of various applications, they want applications on the electronic device to be continuously alive-that is, the developers want processes of the applications to remain on without being killed. Thus, the developer can push messages to the user to develop own services. For users of electronic devices, they also want applications on the electronic device to be continuously alive. Therefore, the user can receive the message pushed by the developer in time through the electronic equipment, and when the user opens the application again, the application still maintains the last using state, so that the application is convenient to use.
However, under the condition that the memory of the electronic device is insufficient, the electronic device kills part of the application to recycle the memory, so that the normal operation of the electronic device is ensured. Therefore, how to keep alive applications is a problem which needs to be solved at present.
Disclosure of Invention
The data processing method and the electronic device can share the memory among the electronic devices, prevent applications in the electronic devices from being killed due to insufficient memory, and further improve user experience.
In order to achieve the above purpose, the embodiments of the present application adopt the following technical solutions:
in a first aspect, an embodiment of the present application provides a data processing method, where the data processing method may be applied to a first electronic device, and may also be applied to a module, such as a chip or a chip system, in the first electronic device. The following description will be given taking an example in which the data processing method is applied to the first electronic device. The first electronic device is connected with the second electronic device, at least one application runs on the first electronic device, and the at least one application comprises a first application running in the background of the first electronic device. The method comprises the following steps: acquiring information of second electronic equipment, wherein the information of the second electronic equipment is used for determining whether the second electronic equipment can assist the first electronic equipment to realize application keep-alive; if the second electronic equipment can assist the first electronic equipment to realize application keep-alive, sending data of the first application to the second electronic equipment; the data of the first application is deleted.
Based on the method provided by the first aspect, the first electronic device may send the data of the first application to the second electronic device under the condition that the second electronic device can assist the first electronic device to implement application keep-alive, so that the first electronic device can share the memory of the second electronic device. Thus, the first electronic device may free data of the first application to obtain more free storage space. The background application of the first electronic device is prevented from being killed due to insufficient running memory, application keep-alive is achieved, and user experience is improved. In addition, the method provided by the first aspect does not need to modify or adapt the application on the first electronic device, and is simple to operate and convenient to use.
In a possible implementation manner, if the first application is switched to the foreground operation of the first electronic device, the method further includes: transmitting first request information for requesting data of a first application to a second electronic device; data of a first application from a second electronic device is received. Based on the method, under the condition that the first application is switched to the foreground of the first electronic device to run, the first electronic device can acquire the data of the first application from the second electronic device, so that the first application can run in the foreground of the first electronic device conveniently.
In one possible implementation, the method further includes: and establishing a first channel, wherein the first channel is used for transmitting data of the application stored in the second electronic equipment and on the first electronic equipment. Based on the method, the first electronic device can acquire the data of the application stored in the second electronic device and on the first electronic device from the second electronic device through the first channel.
In one possible implementation, the method further includes: and sending data of a second application to the second electronic device, wherein the second application is included in at least one application, and the second application runs in the background of the first electronic device. Based on the method, the first electronic device can send the data of the second application to the second electronic device, so that the first electronic device can release more memories.
In one possible implementation, the priority of the first operation is higher than that of the second operation, the first operation is to receive data of the first application from the second electronic device, and the second operation is to send data of the second application to the second electronic device. Based on the method, under the condition that the first operation and the second operation exist simultaneously, the first electronic device can preferentially execute the first operation, so that the first electronic device can acquire the data of the first application in time. Therefore, after the first application is switched to the foreground of the first electronic device to run, the running can be timely recovered, and the user experience is not influenced.
In one possible implementation, the method further includes: sending second request information for requesting first data to second electronic equipment, wherein the first data is partial data in data of a second application; first data is received from a second electronic device. Based on the method, the first electronic device can obtain partial data in the data of the second application from the second electronic device.
In one possible implementation, the first operation is higher in priority than the third operation, the first operation is to receive data of the first application from the second electronic device, and the third operation is to receive the first data from the second electronic device. Based on the method, under the condition that the first operation and the third operation exist simultaneously, the first electronic device can preferentially execute the first operation, so that the first electronic device can acquire the data of the first application in time. Therefore, after the first application is switched to the foreground of the first electronic device to run, the running can be timely recovered, and the user experience is not influenced.
In one possible implementation, the method further includes: a second channel is established for transmitting a part of the data of the application stored in the second electronic device on the first electronic device. Based on the method, the first electronic device can acquire partial data in the data of the application stored in the second electronic device and on the first electronic device from the second electronic device through the second channel.
In one possible implementation, the method further includes: a third channel is established for transmitting data of an application on the first electronic device. Based on the method, the first electronic device can transmit the data of the application on the first electronic device to the second electronic device through the third channel.
One possible implementation manner of acquiring information of the second electronic device includes: information of a second electronic device is received from the second electronic device. Based on the method, the first electronic device can acquire the information of the second electronic device from the second electronic device, and further can determine whether the second electronic device can assist the first electronic device to realize application keep-alive according to the information of the second electronic device.
In a possible implementation manner, the information of the second electronic device indicates an available memory of the second electronic device; or the information of the second electronic device indicates whether the second electronic device can assist the first electronic device to realize application keep-alive. Based on the method, the first electronic device may determine, according to an available memory of the second electronic device, whether the second electronic device can assist the first electronic device to implement the application keep-alive, or the first electronic device may determine, according to an indication of the second electronic device, whether the second electronic device can assist the first electronic device to implement the application keep-alive.
In one possible implementation, the method further includes: and sending third request information to the second electronic equipment, wherein the third request information is used for requesting the information of the second electronic equipment. Based on the method, the first electronic device can trigger the second electronic device to send the information of the second electronic device.
In a possible implementation manner, the information of the second electronic device is obtained when the available memory of the first electronic device is less than or equal to the first threshold. Based on the method, the first electronic device can acquire the information of the second electronic device under the condition that the available memory of the first electronic device is insufficient.
In a second aspect, an embodiment of the present application provides a data processing method, where the data processing method may be applied to a second electronic device, and may also be applied to a module, such as a chip or a chip system, in the second electronic device. The following description will be given taking an example in which the data processing method is applied to the second electronic device. The second electronic device is connected with the first electronic device, at least one application runs on the first electronic device, and the at least one application comprises a first application running in a background of the first electronic device. The method comprises the following steps: sending information of second electronic equipment to the first electronic equipment, wherein the information of the second electronic equipment is used for determining whether the second electronic equipment can assist the first electronic equipment to realize application keep-alive; and if the second electronic equipment can assist the first electronic equipment to realize application keep-alive, receiving data of the first application from the first electronic equipment.
Based on the method provided by the second aspect, the second electronic device may send information of the second electronic device to the first electronic device, so that the first electronic device may determine whether the second electronic device can assist the first electronic device to implement application keep-alive according to the information of the second electronic device. And receiving data of the first application from the first electronic device under the condition that the first electronic device determines that the second electronic device can assist the first electronic device to realize application keep-alive, so that the first electronic device can release the data of the first application to obtain more free storage space. The background application of the first electronic device is prevented from being killed due to insufficient running memory, application keep-alive is achieved, and user experience is improved. In addition, the method provided by the second aspect does not need to modify or adapt the application on the first electronic device, and is simple to operate and convenient to use.
In one possible implementation, the method further includes: receiving first request information for requesting data of a first application from a first electronic device; and sending the data of the first application to the first electronic equipment. Based on the method, the second electronic device may send the data of the first application to the first electronic device based on the request of the first electronic device, so that the first application may run on the first electronic device.
In one possible implementation, the method further includes: a first channel is established for transmitting data of an application stored in the second electronic device on the first electronic device. Based on the method, the second electronic device can send the data of the application stored in the second electronic device and on the first electronic device to the first electronic device through the first channel.
In one possible implementation, the method further includes: data of a second application from the first electronic device is received, and the second application runs in the background of the first electronic device. Based on the method, the second electronic device may receive data of the second application from the first electronic device, so that the first electronic device may release more memory.
In one possible implementation, the priority of the first operation is higher than the priority of the second operation, the first operation is to send data of the first application to the first electronic device, and the second operation is to receive data of the second application from the first electronic device. Based on the method, under the condition that the first operation and the second operation exist simultaneously, the second electronic device can preferentially execute the first operation, so that the first electronic device can acquire the data of the first application in time. Therefore, the first electronic equipment can timely resume running the first application, and user experience is not influenced.
In one possible implementation, the method further includes: receiving second request information for requesting first data from the first electronic equipment, wherein the first data is part of data in data of a second application; and sending the first data to the first electronic equipment. Based on the method, the second electronic device may transmit a part of the data of the second application to the first electronic device.
In one possible implementation manner, the priority of the first operation is higher than the priority of the third operation, the first operation is to send data of the first application to the first electronic device, and the third operation is to send the first data to the first electronic device. Based on the method, under the condition that the first operation and the third operation exist at the same time, the second electronic device can preferentially execute the first operation, so that the first electronic device can acquire the data of the first application in time. Therefore, the first electronic equipment can timely resume running the first application, and user experience is not influenced.
In one possible implementation, the method further includes: a second channel is established for transmitting a part of the data of the application stored in the second electronic device on the first electronic device. Based on the method, the second electronic device can send partial data in the data of the application stored in the second electronic device and on the first electronic device to the first electronic device through the second channel.
In one possible implementation, the method further includes: a third channel is established for transmitting data of an application on the first electronic device. Based on the above method, the second electronic device may receive data from the application on the first electronic device of the first electronic device through the third channel.
In one possible implementation, the information of the second electronic device indicates an available memory of the second electronic device; or the information of the second electronic device indicates whether the second electronic device can assist the first electronic device to realize application keep-alive. Based on the method, the first electronic device may determine, according to an available memory of the second electronic device, whether the second electronic device can assist the first electronic device to implement the application keep-alive, or the first electronic device may determine, according to an indication of the second electronic device, whether the second electronic device can assist the first electronic device to implement the application keep-alive.
In one possible implementation, the method further includes: and receiving third request information from the first electronic equipment, wherein the third request information is used for requesting information of the second electronic equipment. Based on the method, the second electronic device may send the information of the second electronic device to the first electronic device after the first electronic device is triggered.
In a third aspect, an embodiment of the present application provides an electronic device, where the electronic device is configured to implement the foregoing method. The electronic device may be the first electronic device of the first aspect described above; alternatively, the electronic device may be the second electronic device in the second aspect described above. The electronic device comprises corresponding modules, units or means (means) for implementing the above method, and the modules, units or means can be implemented by hardware, software or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions.
With reference to the third aspect, in a first possible implementation manner, the electronic device may include a processing module and a transceiver module. The processing module may be configured to implement the processing function in any of the above aspects and any possible implementation manner thereof. The processing module may be, for example, a processor. The transceiver module, which may also be referred to as a transceiver unit, is configured to implement the transmitting and/or receiving functions in any of the above aspects and any possible implementation manners. The transceiver module may be formed by a transceiver circuit, a transceiver or a communication interface.
With reference to the third aspect, in a first possible implementation manner, the transceiver module includes a sending module and a receiving module, which are respectively configured to implement sending and receiving functions in any one of the foregoing aspects and any possible implementation manner thereof.
In a fourth aspect, an electronic device is provided, comprising: a processor; the processor is configured to be coupled to the memory, and to execute the method according to any one of the above aspects after reading the instruction in the memory. The electronic device may be the first electronic device of the first aspect; alternatively, the electronic device may be the second electronic device in the second aspect described above.
With reference to the fourth aspect, in one possible implementation manner, the electronic device further includes a memory, and the memory is used for storing necessary program instructions and data.
With reference to the fourth aspect, in one possible implementation manner, the electronic device is a chip or a chip system. Optionally, when the electronic device is a chip system, the electronic device may be formed by a chip, or may include a chip and other discrete devices.
In a fifth aspect, an electronic device is provided, comprising: a processor and an interface circuit; an interface circuit for receiving a computer program or instructions and transmitting the same to a processor; the processor is configured to execute the computer program or instructions to cause the electronic device to perform the method according to any of the above aspects.
With reference to the fifth aspect, in a possible implementation manner, the electronic device is a chip or a chip system. Optionally, when the electronic device is a chip system, the electronic device may be formed by a chip, and may also include a chip and other discrete devices.
In a sixth aspect, there is provided a computer readable storage medium having stored therein instructions which, when run on a computer, cause the computer to perform the method of any of the above aspects.
In a seventh aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any of the above aspects.
For technical effects brought by any possible implementation manner in the third aspect to the seventh aspect, reference may be made to technical effects brought by any one of the first aspect to the second aspect or different possible implementation manners in any one of the first aspect to the second aspect, and details are not repeated here.
Drawings
Fig. 1A is a first schematic memory diagram of an electronic device according to an embodiment of the present disclosure;
fig. 1B is a schematic diagram of a memory of an electronic device according to an embodiment of the present application;
fig. 1C is a schematic diagram of a memory of an electronic device according to an embodiment of the present application;
fig. 1D is a schematic memory diagram of an electronic device according to an embodiment of the present disclosure;
fig. 1E is a schematic diagram of a memory of an electronic device according to an embodiment of the present application;
FIG. 2 is a block diagram of a data processing system according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a mobile phone according to an embodiment of the present application;
FIG. 4 is a block diagram of a software architecture according to an embodiment of the present application;
fig. 5 is a first flowchart illustrating a data processing method according to an embodiment of the present application;
fig. 6A is a first schematic diagram illustrating an execution sequence of a first operation, a second operation, and a third operation according to an embodiment of the present application;
fig. 6B is a second schematic diagram illustrating an execution sequence of the first operation, the second operation, and the third operation according to an embodiment of the present application;
fig. 6C is a third schematic diagram illustrating an execution sequence of the first operation, the second operation, and the third operation according to the embodiment of the present application;
FIG. 7 is a schematic diagram of data transmission and processing provided by an embodiment of the present application;
fig. 8 is a schematic flowchart of a second data processing method according to an embodiment of the present application;
fig. 9 is a schematic structural component diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The terminology used in the following examples is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of this application and the appended claims, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, such as "one or more", unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" means one, two or more. The term "and/or" is used to describe the association relationship of the associated objects, and means that there may be three relationships; for example, a and/or B, may represent: a exists singly, A and B exist simultaneously, and B exists singly, wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather mean "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise. The term "coupled" includes both direct and indirect connections, unless otherwise noted.
It should be noted that, in the following embodiments of the present application, names of messages between electronic devices or names of parameters in messages are only an example, and other names may also be used in a specific implementation, which is not specifically limited in this embodiment of the present application.
For convenience in describing the technical solutions of the embodiments of the present application, in the embodiments of the present application, terms such as "first" and "second" may be used to distinguish technical features having the same or similar functions. The terms "first", "second", and the like do not necessarily limit the number and execution order, and the terms "first", "second", and the like do not necessarily differ. In the embodiments of the present application, the words "exemplary" or "such as" are used to indicate examples, illustrations or illustrations, and any embodiment or design described as "exemplary" or "e.g.," should not be construed as preferred or advantageous over other embodiments or designs. The use of the terms "exemplary" or "such as" are intended to present relevant concepts in a concrete fashion for ease of understanding. In addition, in the embodiments of the present application, for a technical feature, the technical features in the technical feature are distinguished by "first", "second", "third", and the like, and the technical features described in "first", "second", and "third" are not in the order of priority or magnitude.
It is to be understood that steps or technical features of the same step or the same function in the embodiments of the present application may be referred to with each other between different embodiments.
As can be seen from the description in the background art, in the case that a plurality of applications run on an electronic device, if the memory of the electronic device is insufficient, the electronic device may kill a part of the applications. Therefore, if the application in the electronic device is desired to keep alive continuously, how to increase the memory on the limited memory of the electronic device through a software technology is very important. For example, the increase of the memory can be realized by the following method.
The method comprises the following steps: a memory is fixed in the memory of the electronic device as a zip random access memory (zRAM) buffer. The electronic device can gradually compress data of an inactive (inactive) application in a memory of the electronic device, and store the compressed data in a zRAM buffer. In this way, the electronic device can release a portion of the memory by compressing the data, so that the application in the electronic device is kept alive. Subsequently, if the electronic device needs to use the data, the data is decompressed.
As shown in fig. 1A, a block of memory 103 is fixed in the memory 101 of the electronic device as a zRAM buffer. The remaining memory, memory 102, may be used to store data. In fig. 1A, before the data in the memory 102 is compressed, the data of the inactive application and the data of the active application are stored, and the memory 102 is already full. By compressing data for inactive applications, the compressed data is stored in the zRAM buffer, and the memory 102 has free memory space. Thus, the application in the electronic equipment can be kept alive without killing the application.
In this embodiment, the inactive application may be any application running in the background of the electronic device. For example, an inactive application may be an application that is not used by a user for a period of time in a background running application of the electronic device. The active application may be a foreground-running application of the electronic device, or the active application may be an application frequently used by a user in a background-running application of the electronic device.
The method 2 comprises the following steps: the method is expanded on the basis of the method 1. As shown in fig. 1B, after the electronic device compresses the data of the inactive application, according to the memory usage of the electronic device, part of the compressed data in the zRAM buffer is written into a flash memory (flash memory). Therefore, the memory of the electronic equipment can be saved, and the application in the electronic equipment is kept alive. Subsequently, if the electronic device needs to use the data, the data is read from the flash memory.
The method 3 comprises the following steps: the electronic equipment can acquire the information of other electronic equipment connected with the electronic equipment, and determine whether the other electronic equipment can assist the electronic equipment to realize application keep-alive according to the information of the other electronic equipment. If the other electronic equipment can assist the electronic equipment to realize application keep-alive, data of the inactive application on the electronic equipment is sent to the other electronic equipment, and the data of the inactive application on the electronic equipment is deleted. In this way, the electronic device can release a portion of memory so that the application on the electronic device is alive. The specific process of the method 3 will be specifically described in the method shown in fig. 5, which will not be described herein.
It can be understood that, compared with the method 1 and the method 2, the method 3 does not need to fix a memory as a zRAM buffer, that is, the electronic device of the method 3 can dominate all memories, thereby improving the utilization rate of the memories. In addition, compared with method 1, the memory of other electronic devices in method 3 is much larger than the zRAM buffer, so that the electronic devices can be assisted to keep alive more applications. Compared with method 2, the read-write lifetime of the memory of other electronic devices in method 3 is not limited as much as that of the flash memory. Therefore, when the method 3 is adopted to increase the memory, the service life of the device does not need to be considered, and the method is simple and convenient to implement.
In order to facilitate understanding of technical solutions of the embodiments of the present application, technical terms related to the embodiments of the present application are explained below.
In the embodiment of the application, when data is exchanged between electronic devices, the following three situations may exist:
1. anonymous page read in one block (anonymous page-hold block read, ap-wbr)
The ap-wbr may be done in case data on one electronic device needs to be written to another electronic device. This process is not perceived by the user. As shown in fig. 1C, the electronic device 1 may send data of the inactive application (e.g., a plurality of anonymous pages corresponding to the inactive application) in its memory to the electronic device 2. After receiving the data of the inactive application, the electronic device 2 writes the data into the memory of the electronic device 2. In this way the electronic device 1 may delete the data of the inactive application so that the memory of the electronic device 1 has more free memory space.
It will be appreciated that after the electronic device 1 deletes data of an inactive application, the progress of the inactive application is frozen and cannot be scheduled. If a process of the application needs to be scheduled, an anonymous page corresponding to the process needs to be acquired from the electronic device 2.
2. Anonymous page-fault (ap-fault) writes
The ap-fault write may occur without the electronic device having access to the data. This process is not perceived by the user. As shown in fig. 1D, the electronic device 1 sends a plurality of anonymous pages corresponding to the inactive application to the electronic device 2, deletes the anonymous pages, and schedules a process (e.g., a process) of the inactive application when the process is to be scheduled
Figure BDA0003180711150000071
Some processes need to be scheduled periodically to receive messages on the cloud side), the electronic device 2 may send an anonymous page corresponding to the process to the electronic device 1, so that the electronic device 1 runs the process.
3. Anonymous page write in one block (anonymous page-write, ap-write)
ap-wbw may be performed when a background running application of the electronic device switches to foreground running. In this case, the electronic device may obtain the anonymous page corresponding to the application from the electronic device storing the anonymous page corresponding to the application, so that the electronic device runs the application. For example, as shown in fig. 1E, after the electronic device 2 has transmitted the individual anonymous page to the electronic device 1, the inactive application has switched from the background to the foreground of the electronic device 1. In this case, the electronic device 2 may transmit the remaining anonymous pages in the entire anonymous page to the electronic device 1 so that the electronic device 1 runs the application.
It can be understood that the user has a perception of the ap-wbw process, and if the application running in the background of the electronic device is switched to the foreground running, the electronic device obtains the anonymous page corresponding to the application from the other electronic device too slowly, which may cause too slow response of the application and affect the user experience.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Fig. 2 is a schematic diagram of an architecture of a data processing system according to an embodiment of the present application. The data processing system may include at least: electronic device 201 and electronic device 202. Optionally, the data processing system may further comprise an electronic device 203 and/or an electronic device 204.
The connections between the electronic devices in fig. 2 (e.g., between the electronic device 201 and the electronic device 202, and between the electronic device 201 and the electronic device 203) may be established through a wired (e.g., universal Serial Bus (USB) data line) or wireless (e.g., USB) manner, and the specific connection manner is not limited in this embodiment of the present application. When the electronic devices in fig. 2 are connected wirelessly, the wireless communication protocol used may be a wireless fidelity (Wi-Fi) protocol, various cellular networks (e.g., a fourth generation (4 th generation,4 g) communication network or a fifth generation (5 th generation,5 g) communication network), and the like, and is not limited specifically herein.
In some embodiments, the electronic device in fig. 2 may form a super terminal. For example, the electronic devices in fig. 2 may perform identity authentication based on any authentication mechanism (e.g., a hician mechanism), and the electronic devices that pass the authentication may form a super terminal. It can be understood that the super terminal may include a plurality of terminals, the plurality of terminals are in a networking connection state, and the plurality of terminals are trusted devices.
In particular implementations, the electronic device in fig. 2, such as the electronic device 201, the electronic device 202, the electronic device 203, or the electronic device 204, may be a mobile phone, a tablet computer, a handheld computer, a Personal Computer (PC), a cellular phone, a Personal Digital Assistant (PDA), a wearable device (e.g., a smart watch, a smart bracelet, etc.), a game console, or an electronic device such as an Augmented Reality (AR)/Virtual Reality (VR) device. The embodiment of the present application does not particularly limit the specific device form of the electronic device in fig. 2. For example, the electronic device in fig. 2 may also be an intelligent household device (such as a television, an intelligent sound box), a vehicle-mounted computer (or referred to as a car machine), and the like. In the embodiment of the present application, the device forms of the electronic devices in fig. 2 may be the same. For example, the electronic device 201 and the electronic device 202 are both mobile phones. The device morphology of the electronic device in fig. 2 may also be different. For example, the electronic device 201 is a mobile phone, and the electronic device 202 is a tablet computer. For another example, the electronic device 201 is a smart watch, and the electronic device 202 is a PC.
The electronic device in fig. 2 may be a touch screen device or a non-touch screen device. The touch screen device can control the electronic device by clicking, sliding and the like on a screen through a finger, a touch pen and the like. The non-touch screen device can be connected with input devices such as a mouse, a keyboard and a touch panel, and the electronic device is controlled through the input devices. In the embodiment of the present application, the electronic devices in fig. 2 are all electronic devices that can run an operating system and install an application. The operating system of the electronic device in fig. 2 may be an Android system, an ios system, a windows system, a mac system, a Linux system, and the like, and embodiments of the present application are not specifically limited herein. The operating systems of the electronic devices in fig. 2 may be the same or different. As an example, the electronic devices in fig. 2 may each include a memory and a processor. The memory may be used to store an operating system, and the processor may be used to run the operating system stored in the memory.
In this embodiment of the present application, the memory may also be referred to as a storage, and is used to store data operated by the operating system and the processor, and the memory may also be used to run a program of an application installed on the electronic device. As an example, the memory may be the internal storage 121 in fig. 3.
In this embodiment, a distributed system may be deployed on the electronic device shown in fig. 2. The electronic device with the distributed system can execute the data processing method provided by the embodiment of the application, so that memory sharing is realized among the electronic devices with the distributed system, and the application in the electronic device is prevented from being killed due to insufficient memory.
The data processing system shown in fig. 2 is only for example and is not used to limit the technical solution of the embodiment of the present application. Those skilled in the art will appreciate that in particular implementations, the data processing system may include other devices, and the number of electronic devices may be determined according to particular needs, without limitation.
In the embodiment of the present application, an electronic device is taken as an example of a mobile phone. Please refer to fig. 3, which is a schematic structural diagram of a mobile phone according to an embodiment of the present disclosure. The method in the following embodiments may be implemented in a mobile phone having the following hardware structure.
As shown in fig. 3, the mobile phone may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, 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 module 180, and the like.
It should be understood that the exemplary structure in the embodiments of the present application does not constitute a specific limitation to the mobile phone. In other embodiments of the present application, the handset may include more or fewer components than shown, or combine certain components, or split certain components, 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 memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, 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.
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. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
The wireless communication function of the mobile phone can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the handset 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 wireless communication of 2G/3G/4G/5G, etc. applied to a mobile phone. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. 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 wireless communication module 160 may provide solutions for wireless communication applied to a mobile phone, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (BT), global Navigation Satellite System (GNSS), frequency Modulation (FM), near Field Communication (NFC), infrared (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 through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, the handset antenna 1 is coupled to the mobile communication module 150 and the handset antenna 2 is coupled to the wireless communication module 160 so that the handset can communicate with the network and other devices via wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), general Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. 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 mobile phone realizes the display function through the GPU, the display screen 194, the application processor and the like. The GPU is a microprocessor for image processing, connected to the display screen 194 and the 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 program instructions to generate or alter 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 be 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-o led, a quantum dot light-emitting diode (QLED), or the like. In some embodiments, the handset may include 1 or N display screens 194, N being a positive integer greater than 1.
The mobile phone can realize shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, the application processor and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, the handset may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the handset is in frequency bin selection, the digital signal processor is used for performing fourier transform and the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The handset may support one or more video codecs. Thus, the mobile phone can play or record videos in various encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the storage capability of the mobile phone. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The processor 110 executes various functional applications of the cellular phone and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The data storage area can store data (such as audio data, phone book and the like) created in the use process of the mobile phone. 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.
The mobile phone can realize an audio function through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into analog audio signals for output, and also used to convert analog audio inputs into digital audio signals. 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 handset can listen to music, or to hands-free talk, through the speaker 170A.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the mobile phone receives a call or voice information, the receiver 170B can be close to the ear to receive voice.
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 near the microphone 170C through the mouth. The handset may be provided with at least one microphone 170C. In other embodiments, the mobile phone may be provided with two microphones 170C to achieve the noise reduction function in addition to collecting the sound signal. In other embodiments, the mobile phone may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be the USB interface 130, or may be a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
One or more of the following sensors may be included in the sensor module 180: pressure sensors, gyroscope sensors, air pressure sensors, magnetic sensors, acceleration sensors, distance sensors, proximity light sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, and the like.
Certainly, the mobile phone may further include a charging management module, a power management module, a battery, a key, an indicator, 1 or more SIM card interfaces, and the like, which is not limited in this embodiment of the present application.
Referring to fig. 4 in conjunction with fig. 2, a schematic diagram of a software architecture according to an embodiment of the present application is shown. As shown in fig. 4, the software architecture of the electronic devices (e.g., the electronic device 201 and the electronic device 202) in fig. 2 may each include: application layer and framework layer (FWK).
In some embodiments, the application layer may include various applications installed on the electronic device. For example, applications installed in the electronic device may include settings, calculators, cameras, short messages, music players, file managers, galleries, browsers, memos, news, video players, mail,
Figure BDA0003180711150000111
and the like. The applications may be system applications of the electronic device, or may also be third-party applications, and the embodiments of the present application are not specifically limited herein. A distributed system may be deployed in the framework layer. The distributed system can realize memory sharing among the electronic devices, and prevent applications in the electronic devices from being killed due to insufficient memory.
It should be noted that the software architecture illustrated in the present embodiment does not constitute a specific limitation to the electronic device in fig. 2. In other embodiments, the electronic device in fig. 2 may include more or less layers than those shown, or more or less modules, or a combination of some modules, or a different arrangement of modules, and the embodiment is not limited in this respect. For example, the software architecture shown above may include other layers, such as a kernel layer (not shown in fig. 4) and the like, in addition to the application layer and the framework layer described above. The kernel layer is a layer between hardware and software. The core layer may include at least a display driver, a camera driver, an audio driver, a sensor driver, and the like.
The data processing method provided by the embodiment of the present application will be described below with reference to the accompanying drawings.
As shown in fig. 5, a data processing method provided in an embodiment of the present application includes S501-S503.
S501: the first electronic device acquires information of the second electronic device.
In this embodiment of the application, the first electronic device may be any electronic device in fig. 2, for example, the first electronic device is the electronic device 201 in fig. 2. At least one application is running on the first electronic device. For example, the at least one application may be running in the background of the first electronic device; or, in the at least one application, one application runs in the foreground of the first electronic device, and the other applications run in the background of the first electronic device.
In this embodiment, the second electronic device may be any electronic device connected to the first electronic device, except the first electronic device in fig. 2. For example, if the first electronic device is the electronic device 201 in fig. 2, the second electronic device may be the electronic device 202, the electronic device 203, or the electronic device 204 in fig. 2.
It is understood that, in order to improve communication security and prevent data leakage in the first electronic device, the second electronic device may satisfy a certain condition.
As an example, the second electronic device is a trusted device. For example, both the second electronic device and the first electronic device are included in the super terminal. The introduction of the super-terminal may refer to the corresponding description in the data processing system shown in fig. 2.
As another example, the second electronic device may be a device in a device list stored by the first electronic device. The device list may be user set or otherwise user maintained. For example, the user may add the device with which the first electronic device has established a connection to the device list through the human-machine interface. Taking the example that the first electronic device establishes a connection with the tablet computer, the smart band and the smart watch through wifi once, the user may add one or more devices of the tablet computer, the smart band and the smart watch to the device list through the human-computer interaction interface of the first electronic device. The device list may also be obtained by the first electronic device. For example, the first electronic device may add a device associated with the user's username to the list of devices. Taking the example that the user holds the first electronic device, the tablet computer and the smart band, and the user logs in the first electronic device and the tablet computer through the user name, the first electronic device may add the tablet computer to the device list.
In this embodiment, the information of the second electronic device may be used to determine whether the second electronic device can assist the first electronic device in implementing application keep-alive. Whether the second electronic device can assist the first electronic device to realize application keep-alive can also be described as whether the second electronic device can store data of the application on the first electronic device. It will be appreciated that if the second electronic device is capable of assisting the first electronic device in application keep-alive, the first electronic device may send data for the inactive application on the first electronic device to the second electronic device. In this way, the first electronic device can release the data of the inactive application, so that the memory of the first electronic device has more free storage space. In this way, the first electronic device does not need to kill the application, and the application in the first electronic device can be kept alive.
In one possible implementation manner, the information of the second electronic device may be obtained by the following two cases:
case 1: the information of the second electronic device indicates available memory of the second electronic device.
As an example, the information of the second electronic device includes indication information of available memory of the second electronic device.
Optionally, the information of the second electronic device further includes at least one of: an identifier (diviceID) of the second electronic device, a name (devicenname) of the second electronic device, information indicating a type (deviceType) of the second electronic device, information indicating whether the second electronic device is online (online), information indicating whether the second electronic device is a trusted device (trusted), an Internet Protocol (Internet Protocol, IP) address (IPAddress) of the second electronic device, information indicating whether the second electronic device is in an active state (active), information indicating a total capacity (basic capacity) of the second electronic device, information indicating a remaining capacity (basic percentage) of the second electronic device, information indicating a temperature (basic temperature) of a battery of the second electronic device, information indicating whether the second electronic device is charging (setCharging), information indicating a Central Processing Unit (CPU) of the second electronic device, information indicating a large CPU (CPU), information indicating a small CPU (CPU), or information indicating a small CPU (CPU) of the second electronic device.
The identity of the second electronic device may also be referred to as the ID of the second electronic device. The types of the second electronic device include: cell-phones, panel computer, PC, wearable equipment etc.. Whether the second electronic device is available online is understood as whether the second electronic device is connected with the first electronic device. Whether the second electronic device is in an active state may indicate whether the second electronic device is used. Taking the second electronic device as a mobile phone as an example, whether the second electronic device is in an active state may indicate whether a screen of the second electronic device is on or off. For example, if the indication information of whether the second electronic device is in the active state indicates that the second electronic device is in the active state, it indicates that the screen of the second electronic device is lit; and if the indication information of whether the second electronic equipment is in the active state indicates that the second electronic equipment is not in the active state, the screen of the second electronic equipment is turned off. Taking the second electronic device as a PC for example, whether the second electronic device is in the active state may indicate whether the second electronic device is in the sleep state. For example, if the indication information of whether the second electronic device is in the active state indicates that the second electronic device is in the active state, it indicates that the second electronic device is not in the sleep state; and if the indication information of whether the second electronic equipment is in the active state indicates that the second electronic equipment is not in the active state, indicating that the second electronic equipment is in the sleep state.
Optionally, the identifier of the second electronic device, the name of the second electronic device, the indication information of the type of the second electronic device, the indication information of whether the second electronic device is online, the indication information of whether the second electronic device is a trusted device, and the IP address of the second electronic device may be collectively referred to as device information. The indication information of whether the second electronic device is in an active state, the indication information of the total power amount of the second electronic device, the indication information of the remaining power amount of the second electronic device, the indication information of the temperature of the battery of the second electronic device, and the indication information of whether the second electronic device is being charged may be collectively referred to as device status information (DeviceStatus). The indication information of the CPU dominant frequency of the second electronic device and the indication information of the CPU occupancy rate of the second electronic device may be collectively referred to as resource information (cpureresource) of the CPU. The indication information of the total memory size of the second electronic device and the indication information of the available memory of the second electronic device may be collectively referred to as storage resource information (StorageResource). Status information of the device, resource information of the CPU, and storage resource information may be collectively referred to as device resource information. Illustratively, the information of the second electronic device may include contents as shown in table 1.
TABLE 1
Figure BDA0003180711150000131
Case 2: the information of the second electronic device indicates whether the second electronic device can assist the first electronic device in implementing application keep-alive.
As an example, the information of the second electronic device includes first indication information. The first indication information is 1-bit indication information. If the value of the first indication information is '0', the information of the second electronic equipment indicates that the second electronic equipment cannot assist the first electronic equipment to realize application keep-alive; if the value of the first indication information is "1", the information of the second electronic device indicates that the second electronic device can assist the first electronic device to realize application keep-alive. In this case, the second electronic device may not need to transmit the information described in case 1 to the first electronic device, and signaling overhead may be saved.
In a possible implementation manner, a first electronic device obtains information of a second electronic device, including: the first electronic equipment receives information of the second electronic equipment from the second electronic equipment; or the first electronic equipment acquires the information of the second electronic equipment from the local. This process will be described in detail in the following method shown in fig. 8, and will not be described herein.
It can be understood that, if there are a plurality of second electronic devices connected to the first electronic device, the first electronic device may obtain information of the plurality of second electronic devices. The specific process of the first electronic device obtaining the information of each second electronic device may refer to the introduction of the first electronic device obtaining the information of the second electronic device described in fig. 6, which is not described herein again. After the first electronic device obtains the information of the plurality of second electronic devices, at least one electronic device can be determined in the device capable of assisting the first electronic device to realize application keep-alive, and data of an inactive application on the first electronic device is sent to the at least one electronic device, so that the application in the first electronic device is kept alive.
Taking the data processing system shown in fig. 2 as an example, if the electronic device 201 establishes a connection with the electronic device 202, the electronic device 203, and the electronic device 204, the electronic device 201 may acquire information of the electronic device 202, information of the electronic device 203, and information of the electronic device 204. If the electronic device 202 and the electronic device 203 are capable of assisting the electronic device 201 in implementing application keep-alive and the electronic device 204 is not capable of assisting the electronic device 201 in implementing application keep-alive, the electronic device 201 sends data for inactive applications on the electronic device 201 to one or more of the electronic device 202 and the electronic device 203 to keep-alive applications in the electronic device 201.
S502: if the second electronic device can assist the first electronic device to realize application keep-alive, the first electronic device sends the data of the first application to the second electronic device. Correspondingly, the second electronic device receives data of the first application from the first electronic device.
In an embodiment of the application, the first application is included in at least one application running on the first electronic device, and the first application runs in a background of the first electronic device. The first application may also be referred to as an inactive application on the first electronic device. The data of the first application may also be referred to as an anonymous page corresponding to the first application. The data of the first application may be stored in a memory of the first electronic device. The first electronic device sends data of the first application to the second electronic device, which may also be referred to as ap-wbr. ap-wbr can be introduced as described above.
According to a possible implementation manner, the first electronic device determines whether the second electronic device can assist the first electronic device to realize application keep-alive according to information of the second electronic device. And if the second electronic equipment can assist the first electronic equipment to realize application keep-alive, the first electronic equipment sends the data of the first application to the second electronic equipment.
For cases 1 and 2 above, the first electronic device determines whether the second electronic device can assist the first electronic device in implementing the application keep-alive process differently. As will be specifically explained below.
For the above case 1, the first electronic device may compare the information of the second electronic device with preset information to determine whether the second electronic device can assist the first electronic device to implement application keep-alive. The preset information may indicate a condition that needs to be satisfied by a device (hereinafter referred to as an assist device) capable of assisting the first electronic device to implement application keep-alive. The preset information may be set by a user before the first electronic device performs the data processing method provided in the embodiment of the present application for the first time, or may be stored in the first electronic device in advance. Subsequently, the preset information may be modified. It can be understood that, if the second electronic device can meet the condition indicated by the preset information, the first electronic device determines that the second electronic device can assist the first electronic device to implement the application keep-alive, and if the second electronic device cannot meet the condition indicated by the preset information, the first electronic device determines that the second electronic device cannot assist the first electronic device to implement the application keep-alive.
For example, taking that the information of the second electronic device includes indication information of an available memory of the second electronic device, and the preset information indicates that the available memory of the assisting device needs to be greater than or equal to 2GB, if the indication information of the available memory of the second electronic device indicates that the available memory of the second electronic device is 8GB, the first electronic device determines that the second electronic device can assist the first electronic device to implement application keep-alive. If the indication information of the available memory of the second electronic device indicates that the available memory of the second electronic device is 1GB, the first electronic device determines that the second electronic device cannot assist the first electronic device to implement application keep-alive.
For example, taking that the information of the second electronic device includes indication information of an available memory of the second electronic device and indication information of whether the second electronic device is a trusted device, the preset information indicates that the available memory of the assistance device needs to be greater than or equal to 2GB, and the assistance device needs to be a trusted device as an example, if the indication information of the available memory of the second electronic device indicates that the available memory of the second electronic device is 8GB, and the indication information of whether the second electronic device is a trusted device indicates that the second electronic device is a trusted device, the first electronic device determines that the second electronic device can assist the first electronic device to implement application keep alive. If the indication information of the available memory of the second electronic device indicates that the available memory of the second electronic device is 4GB, and the indication information of whether the second electronic device is a trusted device indicates that the second electronic device is an untrusted device, the first electronic device determines that the second electronic device cannot assist the first electronic device in implementing application keep-alive.
For example, taking that the information of the second electronic device includes indication information of an available memory of the second electronic device and indication information of whether the second electronic device is in an active state, the preset information indicates that the available memory of the assisting device needs to be greater than or equal to 1GB, and the assisting device is not in the active state as an example, if the indication information of the available memory of the second electronic device indicates that the available memory of the second electronic device is 8GB, and the indication information of whether the second electronic device is in the active state indicates that the second electronic device is not in the active state, the first electronic device determines that the second electronic device can assist the first electronic device to implement application keep-alive. If the indication information of the available memory of the second electronic device indicates that the available memory of the second electronic device is 4GB, and the indication information of whether the second electronic device is in the active state indicates that the second electronic device is in the active state, the first electronic device determines that the second electronic device cannot assist the first electronic device to implement application keep-alive.
For example, the information of the second electronic device includes indication information of an available memory of the second electronic device, indication information of whether the second electronic device is online, and indication information of a remaining capacity of the second electronic device, and the preset information indicates that the available memory of the assisting device needs to be greater than or equal to 1GB, the assisting device is online, and the remaining capacity of the assisting device needs to be greater than or equal to 80%, if the indication information of the available memory of the second electronic device indicates that the available memory of the second electronic device is 6GB, the indication information of whether the second electronic device is online indicates that the second electronic device is online, and the indication information of the remaining capacity of the second electronic device indicates that the remaining capacity of the second electronic device is 80%, the first electronic device determines that the second electronic device can assist the first electronic device to implement application keep alive. If the indication information of the available memory of the second electronic device indicates that the available memory of the second electronic device is 4GB, the indication information of whether the second electronic device is online indicates that the second electronic device is online, and the indication information of the remaining power of the second electronic device indicates that the remaining power of the second electronic device is 60%, the first electronic device determines that the second electronic device cannot assist the first electronic device to implement application keep-alive.
For example, taking that the information of the second electronic device includes indication information of an available memory of the second electronic device and indication information of a CPU occupancy rate of the second electronic device, and the preset information indicates that the available memory of the assisting device needs to be greater than or equal to 1GB and the CPU occupancy rate of the assisting device needs to be less than or equal to 20%, if the indication information of the available memory of the second electronic device indicates that the available memory of the second electronic device is 4GB and the indication information of the CPU occupancy rate of the second electronic device indicates that the CPU occupancy rate of the second electronic device is 10%, the first electronic device determines that the second electronic device can assist the first electronic device to implement application keep-alive. If the indication information of the available memory of the second electronic device indicates that the available memory of the second electronic device is 4GB, and the indication information of the CPU occupancy rate of the second electronic device indicates that the CPU occupancy rate of the second electronic device is 25%, the first electronic device determines that the second electronic device cannot assist the first electronic device in implementing application keep-alive.
For case 2 above, the first electronic device may determine, according to the first indication information, whether the second electronic device can assist the first electronic device to implement application keep-alive. That is, the second electronic device can determine whether the second electronic device can assist the first electronic device in implementing application keep-alive in the same way as the first electronic device. For example, the second electronic device can determine, according to the preset information, that the second electronic device can assist the first electronic device in implementing application keep-alive. The preset information may be set by a user before the second electronic device executes the data processing method provided in the embodiment of the present application for the first time, or stored in the second electronic device in advance, or acquired by the second electronic device from the first electronic device. Subsequently, the preset information may be modified. It can be understood that, if the second electronic device can meet the condition indicated by the preset information, the second electronic device indicates to the first electronic device that the second electronic device can assist the first electronic device to implement application keep-alive; and if the second electronic equipment cannot meet the condition indicated by the preset information, indicating to the first electronic equipment by the second electronic equipment that the second electronic equipment cannot assist the first electronic equipment to realize application keep-alive. For example, if the first indication information indicates that the second electronic device can assist the first electronic device to implement application keep-alive, the first electronic device determines that the second electronic device can assist the first electronic device to implement application keep-alive. If the first indication information indicates that the second electronic device cannot assist the first electronic device to realize application keep-alive, the first electronic device determines that the second electronic device cannot assist the first electronic device to realize application keep-alive.
Optionally, after receiving the data of the first application, the second electronic device stores the data of the first application in a memory buffer (memory base) of the second electronic device.
S503: the first electronic device deletes the data of the first application.
It can be understood that the first electronic device may delete the data of the first application from the memory of the first electronic device, so that the memory of the first electronic device has more free storage space. In this way, the first electronic device does not need to kill the application, and the application in the first electronic device can be kept alive.
Based on the method shown in fig. 5, the first electronic device sends the data of the first application to the second electronic device under the condition that the second electronic device can assist the first electronic device to realize application keep-alive, so that the first electronic device can share the memory of the second electronic device. Thus, the first electronic device may free data of the first application to obtain more free storage space. The background application of the first electronic device is prevented from being killed due to insufficient running memory, application keep-alive is achieved, and user experience is improved. In addition, the method shown in fig. 5 does not require any modification or adaptation to the application on the first electronic device, and is simple to operate and convenient to use.
Optionally, after S503, if the first application is switched to the foreground of the first electronic device to run, the first electronic device may obtain data of the first application from the second electronic device, so that the first application runs in the foreground of the first electronic device. For example, the method shown in FIG. 5 also includes S504-S505.
S504: the first electronic device sends the first request information to the second electronic device. Correspondingly, the second electronic device receives the first request message from the first electronic device.
In this embodiment, the first request information may be used to request data of the first application. For example, the first request information may include an identification of an anonymous page corresponding to the first application. In this way, after receiving the first request message, the second electronic device may obtain the anonymous page corresponding to the first application (i.e., the data of the first application) according to the identifier of the anonymous page corresponding to the first application.
S505: the second electronic device sends the data of the first application to the first electronic device. Correspondingly, the first electronic device receives data of the first application from the second electronic device.
In this embodiment, sending, by the second electronic device, the data of the first application to the first electronic device may also be referred to as ap-wbw. ap-wbw may be introduced as described above.
Optionally, after S502, the first electronic device continues to send the data of the application on the first electronic device to the second electronic device, so that the first electronic device may release more memories. For example, the method shown in fig. 5 further includes S506.
S506: the first electronic device sends data of the second application to the second electronic device. Correspondingly, the second electronic device receives data of the second application from the first electronic device.
In this embodiment, the second application may be an application of at least one application running on the first electronic device. The second application runs in the background of the first electronic device.
It can be understood that the data of the second application may be sent to the second electronic device, and may also be sent to other devices that meet the condition indicated by the preset information, which is not limited.
Optionally, after S506, if the first electronic device needs to schedule a part of processes of the second application, the first electronic device may obtain anonymous pages corresponding to the processes from the second electronic device. For example, the method shown in FIG. 5 also includes S507-S508.
S507: the first electronic device sends the second request information to the second electronic device. Correspondingly, the second electronic device receives the second request message from the first electronic device.
In this embodiment, the second request information may be used to request the first data. For example, the second request information may include an identification of an anonymous page to which the first data corresponds. In this way, after receiving the second request message, the second electronic device may obtain the first data according to the identifier of the anonymous page corresponding to the first data. The first data is part of data in the data of the second application. For example, the first data is an anonymous page corresponding to a partial process of the second application.
S508: the second electronic device transmits the first data to the first electronic device. Correspondingly, the first electronic device receives the first data from the second electronic device.
In this embodiment of the application, sending, by the second electronic device, the first data to the first electronic device may also be referred to as ap-fault writing. The ap-fault writing can be introduced as described above.
It can be understood that, in the embodiment of the present application, if a plurality of applications are running on the first electronic device, there may be a case where ap-wbr, ap-fault write and ap-wbw occur simultaneously. As can be seen from the foregoing description, the user is unaware of the ap-wbr and ap-fault writes. And the user has a perception on ap-wbw, and if ap-wbw cannot be executed in time, application response is too slow, and user experience is affected. Therefore, different priorities can be configured for ap-wbr, ap-fault writing and ap-wbw, so that operations with high priority can be executed first to improve user experience.
In one possible implementation, ap-wbw is prioritized over ap-wbr and ap-fault writes. The ap-fault writes have a higher priority than the ap-wbr. Therefore, the ap-wbw can be executed preferentially, the interference when the ap-wbw is executed is reduced, and the execution efficiency of the ap-wbw is improved. Then, after the application is switched from the background to the foreground, the first electronic device can acquire the data of the application in time and run the application in the foreground in time, so that the user experience is improved.
As an example, if ap-wbr, ap-fault write, and ap-wbw occur simultaneously, ap-wbw is preferentially executed and ap-wbr and ap-fault write are set to timeout wait. After waiting for the timeout, ap-wbr and ap-fault are executed again.
As another example, if ap-wbr, ap-fault write, and ap-wbw occur at the same time, then ap-wbw is executed first, and ap-wbr and ap-fault write are set to wait. Executing the ap-wbr and the ap-fault after the ap-wbw execution is completed.
As another example, if ap-wbr, ap-fault write, and ap-wbw occur simultaneously, ap-wbw is preferentially executed, ap-fault write is set to timeout wait, and ap-wbr is set to wait. Subsequently, after waiting for overtime, executing ap-fault writing, and executing ap-wbr after the execution of ap-wbw is finished.
It is understood that, in the above example, if the ap-wbw and the ap-fault write correspond to the same application, the execution of the ap-fault write may be stopped, and the ap-wbw may be executed. Because the data written by the ap-fault is included in the data of the ap-wbw, the first electronic device executes the ap-wbw and can acquire the data acquired when the ap-fault is written. Writing corresponding application by ap-wbw and ap-fault as
Figure BDA0003180711150000172
For the purpose of example only,
Figure BDA0003180711150000171
after switching from the foreground to the background of the first electronic device, the first electronic device can connect the first electronic device with the second electronic device
Figure BDA0003180711150000173
Is sent to the second electronic device. Then, if
Figure BDA0003180711150000174
And some processes need to be scheduled to receive the messages of the cloud side, the first electronic equipment can execute the ap-fault writing. If the first electronic equipment executes the ap-fault writing process, the first electronic equipment determines that the ap-fault writing process is executed
Figure BDA0003180711150000175
And switching from the background of the first electronic equipment to the foreground, and then the first electronic equipment can stop executing the ap-fault writing, and only needs to execute the ap-wbw.
The following describes the execution sequence of ap-wbr, ap-fault write and ap-wbw, taking the method shown in FIG. 5 as an example, which includes both S504-S508.
In one possible implementation, the first operation has a higher priority than the second operation and the third operation. The third operation has a higher priority than the second operation. The first operation is that the first electronic equipment receives data of a first application from the second electronic equipment. The second operation is that the first electronic device transmits data of the second application to the second electronic device. The third operation is that the first electronic device receives the first data from the second electronic device.
For example, as shown in fig. 6A, if the first electronic device needs to perform the first operation during the second operation and the third operation (i.e., the first electronic device needs to perform S505 during the S505 and S508), the first electronic device preferentially performs the first operation and sets the second operation and the third operation as timeout waiting. And after waiting for the timeout, executing the second operation and the third operation.
For example, as shown in fig. 6B, if the first electronic device needs to perform the first operation in the process of performing the second operation and the third operation, the first electronic device preferentially performs the first operation, and sets the second operation and the third operation to wait. And after the first operation is executed, executing the second operation and the third operation.
For example, as shown in fig. 6C, if the first electronic device needs to execute the first operation in the process of executing the second operation and the third operation, the first electronic device preferentially executes the first operation, sets the third operation as timeout waiting, and sets the second operation as waiting. And subsequently, after the waiting timeout, executing a third operation, and after the execution of the first operation is finished, executing a second operation.
As can be appreciated from the foregoing description, the time spent by ap-wbw is closely related to the user experience. The shorter the time spent ap-wbw, the better the user experience. In order to further improve the user experience, different transmission channels can be respectively established for ap-wbr, ap-fault writing and ap-wbw. Therefore, ap-wbr, ap-fault writing and ap-wbw can process data through own transmission channels respectively without mutual influence.
Optionally, before S505, the first electronic device and the second electronic device establish a first channel. The first channel is used for transmitting data of an application stored in the second electronic equipment and on the first electronic equipment. In this way, the second electronic device may send the data of the first application to the first electronic device through the first channel, and the first electronic device may receive the data of the first application through the first channel. For example, before S505, the first electronic device and the second electronic device establish a first Transmission Control Protocol (TCP) connection and establish a first thread. The first TCP connection and the first thread may be used to transfer data of an application stored in the second electronic device on the first electronic device.
Optionally, before S508, the first electronic device and the second electronic device establish a second channel. The second channel is used for transmitting part of data in the second electronic equipment and the data of the application on the first electronic equipment. In this way, the second electronic device may send the first data to the first electronic device through the second channel, and the first electronic device may receive the first data through the second channel. For example, before S508, the first electronic device and the second electronic device establish a second TCP connection and establish a second thread. The second TCP connection and the second thread may be used to transfer part of the data stored in the second electronic device in the data of the application on the first electronic device.
Optionally, before S502, the first electronic device and the second electronic device may establish a third channel. Wherein the third channel may be used to transmit data of an application on the first electronic device. In this way, the first electronic device may transmit data of the first application to the second electronic device through the third channel, and the second electronic device may receive data of the first application through the third channel. For example, before S502, the first electronic device and the second electronic device establish a third TCP connection and establish a third thread. The third TCP connection and the third thread may be for transmitting data of an application on the first electronic device.
It will be appreciated that to improve the user experience, the first thread, the second thread, and the third thread may also be configured with different priorities based on the user's sensitivity to ap-wbw, ap-wbr, and ap-fault writes. Threads with high priority may be processed in advance. As described above, the user is unaware of the ap-wbr and ap-fault writing and aware of the ap-wbw, and if the ap-wbw cannot be executed in time, the application response is too slow, which affects the user experience. Thus, the priority of the first thread may be higher than the priority of the second thread and the priority of the third thread. The priority of the second thread is higher than that of the third thread, or the priority of the second thread is the same as that of the third thread.
It is understood that, in order to save transmission resources, a transmission channel may be established for the ap-wbr and the ap-fault writes, and the ap-wbr and the ap-fault writes may process data through the transmission channel. For example, prior to S502, the first electronic device and the second electronic device may establish a fourth channel. The fourth channel may have the functions of the second and third channels described above.
It is understood that, in order to further increase the speed of ap-wbr, ap-fault writing and ap-wbw, data transceiving and data processing can be decoupled, so that data transceiving and data processing are not affected by each other. In this way, the first electronic device or the second electronic device can continuously receive or transmit data, so that the transmission rate of data can be kept highest without interrupting transceiving operation for processing data.
For example, the first electronic device and the second electronic device may establish an independent transmission channel, an independent data transceiving task and an independent data processing task for ap-wbr, ap-fault writing and ap-wbw. As shown in fig. 7, the first electronic device may establish a data processing task 1, a data processing task 2, a data transmitting task 1, a data receiving task 1, and a data receiving task 2. The second electronic device may establish a data receiving task 3, a data sending task 2, and a data sending task 3, and a memory buffer in the second electronic device may be used to store data applied in the first electronic device. The data processing task 1 may send data applied in the first electronic device, and the data applied in the first electronic device may be transmitted to the second electronic device through the third channel. The data receiving task 3 may receive data applied in the first electronic device. After receiving the data applied in the first electronic device, the second electronic device may write the data into the memory buffer. Subsequently, if the application 1 on the first electronic device is switched to the foreground from the background to run, the data sending task 2 may send the data of the application 1, and the data of the application 1 may be transmitted to the first electronic device through the first channel. The data receiving task 1 can receive the data of the application 1 and notify the data processing task 1 of processing the data of the application 1. The data processing task 1 may store the data of the application 1 in the memory of the first electronic device. If the first electronic device needs to schedule a part of the process of the application 2, the data sending task 3 may send data required by the part of the process of the application 2, and the data required by the part of the process of the application 2 may be transmitted to the first electronic device through the second channel. The data receiving task 2 can receive data required by a partial process of the application 2 and notify the data processing task 2 to process the data. The data processing task 2 may store the data in the memory of the first electronic device.
Optionally, a full index mechanism is constructed for the memory buffer of the second electronic device. That is, after the second electronic device receives and stores the data of the application of the first electronic device, the stored data is not modified, deleted, or added until the second electronic device transmits the data of the application to the first electronic device. For example, the second electronic device executes ap-wbr, receives and stores the data of the application 1 from the first electronic device, then executes ap-fault writing, and sends the 4k data in the application 1 to the first electronic device. Thereafter, the second electronic device does not delete the 4k data. Subsequently, if the application 1 is switched to the foreground from the background of the first electronic device to run, the second electronic device executes ap-wbw, sends the data of the application 1 to the first electronic device, and deletes the data of the application 1. Therefore, read-write conflict of data of the same application can be avoided, and the read-write operation of the data is independent and does not influence each other. For example, under the condition that the second electronic device executes ap-fault writing for multiple times for the same application, if the ap-fault writing is executed each time, the second electronic device deletes the data sent to the first electronic device, which may cause that the corresponding data cannot be found in the subsequent ap-fault writing operation, thereby affecting the subsequent ap-fault writing.
Alternatively, the first electronic device may obtain the information of the second electronic device from the second electronic device, or obtain the information of the second electronic device locally. For example, as shown in fig. 8, S501 includes S5011 or S5012.
S5011: the first electronic device receives information of the second electronic device from the second electronic device.
In a possible implementation manner, the information of the second electronic device is sent by the first electronic device triggering the second electronic device. That is, in a case where the first electronic device needs to perform application keep-alive, the first electronic device may transmit the third request information to the second electronic device. And after receiving the third request message, the second electronic device sends a response message to the first electronic device, wherein the response message comprises the information of the second electronic device. In this embodiment of the present application, the fact that the first electronic device needs to perform application keep-alive may be understood as: the available memory of the first electronic device is less than or equal to a first threshold. That is to say, under the condition that the available memory of the first electronic device is insufficient, the first electronic device may execute the data processing method provided in the embodiment of the present application, so that the first electronic device can share the memory of the second electronic device, and application keep-alive is implemented. In this embodiment, the third request information may also be referred to as a find device request (findddevicerequest) message. The third request information may be for requesting information of the second electronic device.
It is understood that, for the above case 1, the second electronic device may transmit information in the information of the second electronic device to the first electronic device a plurality of times.
As an example, after receiving the third request message, the second electronic device may first send a response message 1 to the first electronic device, where the response message 1 includes an identifier of the second electronic device. Subsequently, the second electronic device sends response information 2 to the first electronic device, where the response information 2 includes information of an available memory of the second electronic device.
As another example, after receiving the third request message, the second electronic device may first send a device information response (deviceinfonsponse) message to the first electronic device, where the device information response message includes at least one item of device information, such as an identifier of the second electronic device and an IP address of the second electronic device. After receiving the device information response message, the first electronic device sends a get device resource request (GetDeviceResourceRequest) message to the second electronic device. After receiving the device resource acquiring request message, the second electronic device sends a device resource response (deviceresource response) message to the first electronic device, where the device resource response message includes at least one item of device resource information, for example, indication information of an available memory of the second electronic device, indication information of whether the second electronic device is in an active state, and indication information of a remaining power of the second electronic device. The introduction of the device information and the device resource information may refer to the above description in S501.
Optionally, the third request information is further used for subscribing to information of the second electronic device. Subsequently, if the information of the second electronic device changes, for example, the IP address of the second electronic device changes, the second electronic device may send the first update information to the first electronic device. The first update information includes updated information of the second electronic device, for example, an updated IP address. Similarly, the get device resource request message in the above example is also used to subscribe to device resource information. Subsequently, if the device resource information of the second electronic device changes, the second electronic device may send second update information to the first electronic device, where the second update information includes the updated device resource information.
S5012: the first electronic equipment acquires the information of the second electronic equipment from the local.
In one possible implementation, the second electronic device periodically sends information of the second electronic device to the first electronic device. And after receiving the information of the second electronic equipment, the first electronic equipment stores the information of the second electronic equipment locally. And under the condition that the first electronic equipment needs to carry out application keep-alive, the first electronic equipment acquires the latest received information of the second electronic equipment from the local.
In another possible implementation manner, after the second electronic device establishes connection with the first electronic device, information of the second electronic device is sent to the first electronic device. Subsequently, if the information of the second electronic device changes, the second electronic device sends third update information to the first electronic device, where the third update information includes the updated information of the second electronic device. And under the condition that the first electronic equipment needs to carry out application keep-alive, the first electronic equipment acquires the latest received information of the second electronic equipment from the local.
It can be understood that, in the data processing method provided in the embodiment of the present application, data of an application in the first electronic device is sent to the second electronic device, so that the second electronic device can assist the first electronic device in storing the data of the application, and memory sharing between the electronic devices is achieved. Based on this idea, computing resources can also be shared between electronic devices. For example, a first electronic device may divide a computing task into a plurality of subtasks and distribute the plurality of subtasks to at least one second electronic device, such that the at least one second electronic device assists the first electronic device in completing the computing task. In this way, computational efficiency may be improved. Among other things, the computing task may be graphics rendering, video clipping, and the like.
It is understood that the electronic device includes hardware structures and/or software modules for performing the functions in order to realize the functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed in hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. 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 embodiments of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional modules according to the method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, in the embodiment of the present application, the division of the module is schematic, and is only one logic function division, and another division manner may be available in actual implementation.
As shown in fig. 9, an embodiment of the present application discloses an electronic device 900, which may be one of the electronic devices cooperating in the foregoing embodiments. The electronic device 900 may specifically include: a display screen 901; an input device 902 (e.g., a mouse, keyboard, or touch screen, etc.); one or more processors 903; a memory 904; one or more application programs (not shown); and one or more computer programs 905, which may be connected by one or more communication buses 906. Wherein the one or more computer programs 905 are stored in the memory 904 and configured to be executed by the one or more processors 903, the one or more computer programs 905 including instructions that can be used to perform the associated steps of the embodiments described above. In an example, the electronic device 900 can be the electronic device 201, the electronic device 202, the electronic device 203, or the electronic device 204 of fig. 2.
An embodiment of the present application further provides a chip system, including: at least one processor coupled with the memory through the interface, and an interface, the at least one processor causing the method of any of the above method embodiments to be performed when the at least one processor executes the computer program or instructions in the memory. In one possible implementation, the system-on-chip further includes a memory. Optionally, the chip system may be composed of a chip, and may also include a chip and other discrete devices, which is not specifically limited in this embodiment of the present application.
Embodiments of the present application further provide a computer-readable storage medium, in which computer program codes are stored, and when a processor executes the computer program codes, an electronic device executes the method in the foregoing embodiments.
The embodiments of the present application also provide a computer program product, which when running on a computer, causes the computer to execute the method in the above embodiments.
The electronic device 900, the computer-readable storage medium, or the computer program product provided in the embodiment of the present application are all configured to execute the corresponding methods provided above, so that beneficial effects achieved by the electronic device may refer to beneficial effects in the corresponding methods provided above, and are not described herein again.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical functional division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another device, 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.
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 integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or partially contributed to by the prior art, or all or part of the technical solutions may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a magnetic disk, or an optical disk.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should 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 (26)

1. A data processing method is applied to a first electronic device, at least one application runs on the first electronic device, and the first electronic device is connected with a second electronic device, and the method comprises the following steps:
acquiring information of second electronic equipment, wherein the information of the second electronic equipment is used for determining whether the second electronic equipment can assist the first electronic equipment to realize application keep-alive;
if the second electronic device can assist the first electronic device to realize application keep-alive, sending data of a first application to the second electronic device, wherein the first application is included in the at least one application, and the first application runs in a background of the first electronic device;
deleting the data of the first application.
2. The method of claim 1, wherein if the first application switches to a foreground operation of the first electronic device, the method further comprises:
sending first request information to the second electronic equipment, wherein the first request information is used for requesting data of the first application;
receiving data of the first application from the second electronic device.
3. The method of claim 2, further comprising:
establishing a first channel for transmitting data of an application stored in the second electronic device on the first electronic device.
4. A method according to claim 2 or 3, characterized in that the method further comprises:
sending data of a second application to the second electronic device, wherein the second application is included in the at least one application, and the second application runs in the background of the first electronic device.
5. The method of claim 4, wherein a first operation is prioritized over a second operation, the first operation is receiving data of the first application from the second electronic device, and the second operation is sending data of a second application to the second electronic device.
6. The method of claim 4, further comprising:
sending second request information to the second electronic device, wherein the second request information is used for requesting first data, and the first data is part of data in the data of the second application;
receiving the first data from the second electronic device.
7. The method of claim 6, wherein a first operation is prioritized over a third operation, the first operation being receiving data from the first application of the second electronic device, the third operation being receiving the first data from the second electronic device.
8. The method according to claim 6 or 7, characterized in that the method further comprises:
establishing a second channel for transmitting a part of data of the application stored in the second electronic device on the first electronic device.
9. The method according to any one of claims 1-8, further comprising:
establishing a third channel for transmitting data of an application on the first electronic device.
10. The method according to any one of claims 1-9, wherein the obtaining information of the second electronic device comprises:
receiving information of the second electronic device from the second electronic device.
11. The method of claim 10, further comprising:
and sending third request information to the second electronic equipment, wherein the third request information is used for requesting the information of the second electronic equipment.
12. The method of any one of claims 1-11,
the information of the second electronic device indicates available memory of the second electronic device; alternatively, the first and second electrodes may be,
the information of the second electronic device indicates whether the second electronic device can assist the first electronic device to realize application keep-alive.
13. The method according to any of claims 1-12, wherein the information of the second electronic device is obtained when the available memory of the first electronic device is less than or equal to a first threshold.
14. A data processing method is applied to a second electronic device, wherein the second electronic device is connected with a first electronic device, and the method comprises the following steps:
sending information of the second electronic device to the first electronic device, wherein the information of the second electronic device is used for determining whether the second electronic device can assist the first electronic device to realize application keep-alive;
and if the second electronic equipment can assist the first electronic equipment to realize application keep-alive, receiving data of a first application from the first electronic equipment, wherein the first application is an application running in the background of the first electronic equipment.
15. The method of claim 14, further comprising:
receiving first request information from the first electronic equipment, wherein the first request information is used for requesting data of the first application;
and sending the data of the first application to the first electronic equipment.
16. The method of claim 15, further comprising:
establishing a first channel for transmitting data of an application stored in the second electronic device on the first electronic device.
17. The method of claim 15 or 16, further comprising:
receiving data of a second application from the first electronic device, the second application running in a background of the first electronic device.
18. The method of claim 17, wherein a first operation is prioritized over a second operation, the first operation being sending data of the first application to the first electronic device, the second operation being receiving data of a second application from the first electronic device.
19. The method of claim 17, further comprising:
receiving second request information from the first electronic device, wherein the second request information is used for requesting first data, and the first data is part of data in the data of the second application;
and sending the first data to the first electronic equipment.
20. The method of claim 19, wherein a first operation is prioritized over a third operation, the first operation being sending data of the first application to the first electronic device, and wherein the third operation is sending the first data to the first electronic device.
21. The method according to claim 19 or 20, further comprising:
establishing a second channel for transmitting a portion of data stored in the second electronic device in the data of the application on the first electronic device.
22. The method according to any one of claims 14-21, further comprising:
establishing a third channel for transmitting data of an application on the first electronic device.
23. The method of any one of claims 14-22,
the information of the second electronic device indicates available memory of the second electronic device; alternatively, the first and second electrodes may be,
the information of the second electronic device indicates whether the second electronic device can assist the first electronic device to realize application keep-alive.
24. The method according to any one of claims 14-23, further comprising:
and receiving third request information from the first electronic equipment, wherein the third request information is used for requesting information of the second electronic equipment.
25. An electronic device, comprising: the method comprises the following steps: a processor coupled with a memory for storing a program or instructions that, when executed by the processor, cause the electronic device to perform the method of any of claims 1-13 or perform the method of any of claims 14-24.
26. A computer-readable storage medium having stored thereon a computer program or instructions, which when executed cause a computer to perform the method of any of claims 1 to 13 or the method of any of claims 14 to 24.
CN202110846381.5A 2021-07-26 2021-07-26 Data processing method and electronic equipment Pending CN115686765A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110846381.5A CN115686765A (en) 2021-07-26 2021-07-26 Data processing method and electronic equipment
PCT/CN2022/106967 WO2023005783A1 (en) 2021-07-26 2022-07-21 Data processing method and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110846381.5A CN115686765A (en) 2021-07-26 2021-07-26 Data processing method and electronic equipment

Publications (1)

Publication Number Publication Date
CN115686765A true CN115686765A (en) 2023-02-03

Family

ID=85044409

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110846381.5A Pending CN115686765A (en) 2021-07-26 2021-07-26 Data processing method and electronic equipment

Country Status (2)

Country Link
CN (1) CN115686765A (en)
WO (1) WO2023005783A1 (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9007239B1 (en) * 2012-07-02 2015-04-14 Amazon Technologies, Inc. Reduction of memory consumption
CN104503740A (en) * 2014-12-01 2015-04-08 小米科技有限责任公司 Memory management method and device
CN105404551A (en) * 2015-12-11 2016-03-16 Tcl移动通信科技(宁波)有限公司 Processing method and system for switching application between foreground and background of mobile terminal and mobile terminal
CN106201708A (en) * 2016-06-29 2016-12-07 宇龙计算机通信科技(深圳)有限公司 The freezing method of application program, the freezing plant of application program and terminal
CN110865884A (en) * 2019-09-30 2020-03-06 华为技术有限公司 Memory management method and device
CN112231090A (en) * 2020-11-04 2021-01-15 Oppo广东移动通信有限公司 Application process management method and device and terminal equipment
CN112948149A (en) * 2021-03-29 2021-06-11 江苏为是科技有限公司 Remote memory sharing method and device, electronic equipment and storage medium
CN112988282B (en) * 2021-04-27 2021-08-20 荣耀终端有限公司 Application keep-alive method and terminal equipment

Also Published As

Publication number Publication date
WO2023005783A1 (en) 2023-02-02

Similar Documents

Publication Publication Date Title
WO2021051989A1 (en) Video call method and electronic device
CN113225693A (en) Bluetooth connection method, equipment and system
CN113535340B (en) Task scheduling method and device and electronic equipment
CN112615960B (en) Equipment capacity scheduling method and electronic equipment
CN112995727A (en) Multi-screen coordination method and system and electronic equipment
CN112181616B (en) Task processing method and related device
WO2021104259A1 (en) Method and terminal for data sharing between fast application and native application
CN111078376A (en) Process management method and device
CN113133095A (en) Method for reducing power consumption of mobile terminal and mobile terminal
EP4132202A1 (en) Data downloading method and apparatus, and terminal device
CN114449576A (en) Application data sending method, device and equipment
CN115016706B (en) Thread scheduling method and electronic equipment
CN113596919B (en) Data downloading method and device and terminal equipment
CN114398020A (en) Audio playing method and related equipment
CN113473013A (en) Display method and device for beautifying effect of image and terminal equipment
CN113115483B (en) Method and device for releasing radio resource control connection and user equipment
WO2023005783A1 (en) Data processing method and electronic device
WO2023051056A1 (en) Memory management method, electronic device, computer storage medium, and program product
WO2024067110A1 (en) Card updating method and related apparatus
CN114449492B (en) Data transmission method and terminal equipment
CN116700913B (en) Scheduling method, equipment and storage medium of embedded file system
WO2024027544A1 (en) Memory management method and electronic device
CN115729684B (en) Input/output request processing method and electronic equipment
WO2022143165A1 (en) Method and apparatus for determining network standard
CN117724860A (en) Data processing method 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