WO2022228098A1 - 应用保活方法、电子设备及存储介质 - Google Patents
应用保活方法、电子设备及存储介质 Download PDFInfo
- Publication number
- WO2022228098A1 WO2022228098A1 PCT/CN2022/086101 CN2022086101W WO2022228098A1 WO 2022228098 A1 WO2022228098 A1 WO 2022228098A1 CN 2022086101 W CN2022086101 W CN 2022086101W WO 2022228098 A1 WO2022228098 A1 WO 2022228098A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- application
- operating system
- identification information
- information
- subscription
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 91
- 230000004083 survival effect Effects 0.000 claims abstract description 44
- 230000006870 function Effects 0.000 claims description 48
- 238000004590 computer program Methods 0.000 claims description 14
- 230000002035 prolonged effect Effects 0.000 abstract 1
- 238000012545 processing Methods 0.000 description 25
- 238000007726 management method Methods 0.000 description 16
- 230000008569 process Effects 0.000 description 15
- 238000004891 communication Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 8
- 229920001621 AMOLED Polymers 0.000 description 3
- 101100264195 Caenorhabditis elegans app-1 gene Proteins 0.000 description 3
- 230000001413 cellular effect Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 230000001960 triggered effect Effects 0.000 description 3
- 238000013473 artificial intelligence Methods 0.000 description 2
- 230000003190 augmentative effect Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 230000000737 periodic effect Effects 0.000 description 2
- 239000002096 quantum dot Substances 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 210000000988 bone and bone Anatomy 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 235000019800 disodium phosphate Nutrition 0.000 description 1
- 238000010348 incorporation Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000002195 synergetic effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/485—Task life-cycle, e.g. stopping, restarting, resuming execution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5022—Mechanisms to release resources
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/542—Event management; Broadcasting; Multicasting; Notifications
Definitions
- the embodiments of the present application relate to the field of electronic devices, and in particular, to an application keep-alive method, an electronic device, and a storage medium.
- the application collaboration function refers to the function of providing services to users through collaboration between two application programs (application, App), and a rich experience can be brought to the user through the application collaboration function.
- An application may be referred to as an application for short.
- the first application is installed on the first device, and the second application is installed on the second device.
- the first application and the second application can cooperate to provide services to the user, and the user can view the information in the first application on the first device through the second application on the second device .
- the operating system of the first device may forcibly kill some applications running on the first device due to the limitation of system resources (insufficient system resources). Free up system resources.
- the application killed by the first device includes the first application (the first application may be referred to as the associated application of the application coordination function)
- the application coordination function between the first application and the second application will be affected, affecting the user experience .
- the second application can register the death notification of the first application, and when the first application is killed by the first device , the second application may receive the death notification of the first application, and re-launch the second application to continue to implement the application coordination function between the first application and the second application.
- the second application will receive the death notification of the first application only after the first application is killed. At this time, the application coordination function between the first application and the second application has been affected .
- a heartbeat relationship may be established between the first application and the second application, and the second application may periodically send heartbeat information to the first application.
- the operating system of the first device forcibly kills some applications running on the first device to release system resources, if the heartbeat information periodically sent by the second application to the first application is monitored, the survival time of the first application can be extended.
- embodiments of the present application provide an application keep-alive method, an electronic device, and a storage medium.
- the technical solutions of the embodiments of the present application can be applied to the above scenario where the application coordination function is implemented between the first application and the second application, and the survival time of the first application is extended to avoid application coordination between the first application and the second application. functionality is affected. Also, the power consumption of the device where the first application and the second application are located is low.
- an embodiment of the present application provides an application keep-alive method, the method is applied to a first device, the first device includes a first application, and an application coordination function is provided between the first application and the second application; the method The method includes: when the first application detects that the second application acquires the first information in the first application, the first application creates a first object, and generates a unique identifier of the first object. The first application sends the unique identifier of the first object to the second application. The first application receives a subscription request sent by the second application according to the unique identifier of the first object, where the subscription request includes identification information of the second application. The first application adds the identification information of the second application to the subscription list of the first object according to the subscription request.
- the operating system of the first device When the operating system of the first device needs to forcibly kill some applications running on the first device to release system resources due to the limitation of system resources, for the first application, the operating system of the first device queries the subscription list of the first object , if the subscription list of the first object includes the identification information of the second application, the operating system of the first device extends the survival time of the first application.
- the first device in the process of viewing the first information in the first application through the second application, when the operating system of the first device needs to forcibly kill some programs running on the first device due to the limitation of system resources, when the application releases system resources, for the first application, the first device can first query the subscription list of the first object, and if the subscription list of the first object includes the identification information of the second application, it indicates that the first application and the second application There is a coordination relationship between them, and the first device can prolong the survival time of the first application, so as to avoid the application coordination function between the first application and the second application from being affected.
- this method can establish a cooperative relationship between the first application and the second application in a simple manner without requiring periodic heartbeats. Therefore, the power consumption of the first device and the second device may be lower. In addition, compared with the method of restarting the first application after being killed, the user experience can be better.
- the operating system of the first device extends the survival time of the first application, including: the operating system of the first device increasing the priority of the first application among all currently running applications in the first device At least one priority, the higher the priority, the longer the application will live.
- the operating system of the first device increases the priority of the first application in all currently running applications in the first device by at least one priority, including: the operating system of the first device The priority of the application is raised to the highest priority among all currently running applications in the first device.
- the subscription request is sent by the second application to the first application after verifying that the second application has the permission to read the unique identifier of the first object .
- the second application after receiving the unique identifier of the first object from the first application, the second application first verifies the unique identifier of the first object, and after confirming that the unique identifier of the first object has been read After the permission is granted, the subsequent steps (that is, sending a subscription request) can be performed to better protect user privacy.
- the first application adds the identification information of the second application to the subscription list of the first object according to the subscription request, including: the first application verifying the first application 2. Whether the application has the right to subscribe to the first object; when the first application verifies that the second application has the right to subscribe to the first object, the first application adds the second application's subscription list to the first object's subscription list according to the subscription request. identification information.
- the first application after the first application receives the subscription request from the second application, it first verifies the subscription request, and after confirming that the second application has the right to subscribe to the first object, and then executes the subsequent steps, which may be better. Protect user privacy.
- the application keep-alive method involves the running data of the application, the method can realize the application keep-alive only after the user agrees and grants the corresponding permission, so as to better protect the user's privacy.
- the method further includes: the first application receives an unsubscribe request sent by the second application according to the unique identifier of the first object, where the unsubscribe request includes the second The identification information of the application.
- the first application deletes the identification information of the second application from the subscription list of the first object according to the unsubscribe request.
- the operating system of the first device needs to forcibly kill some applications running on the first device to release system resources due to the limitation of system resources, for the first application, the operating system of the first device queries the subscription list of the first object , if the subscription list of the first object does not include the identification information of the second application, the operating system of the first device does not need to extend the survival time of the first application.
- the unique identifier of the first object includes device information of the first device, application information of the first application, object information of the first object, and the creation of the first object. Timestamp information at the time of the object.
- the devices where the first application and the second application reside are the same device or different devices.
- the second application may be installed on a second device that is different from the second device.
- the second application may also be installed on the first device.
- the second application includes a plurality of third applications; if the first object's subscription list includes identification information of the second application, the first device's Extending the survival time of the first application by the operating system includes: if the subscription list of the first object includes identification information of at least one third application, extending the survival time of the first application by the operating system of the first device.
- the operating system of the first device when the operating system of the first device is limited by system resources, it is necessary to forcibly kill some applications running on the first device to release system resources
- the operating system of the first device can first query the subscription list of the first object. If the subscription list of the first object includes the identification information of other applications, it indicates that the first object is subscribed by other applications, and the first object is subscribed by other applications. There is a synergistic relationship between an application and other applications, and the operating system of the first device can prolong the survival time of the first application.
- an embodiment of the present application provides an apparatus for keeping an application alive.
- the apparatus is applied to a first device, and the first device can use the apparatus to implement the function of the first application in the method for keeping the application alive in the first aspect.
- the apparatus may include: an object management module, configured to create a first object and generate a unique identifier of the first object when it is detected that the second application acquires the first information in the first application; When the second application acquires the first information in the first application, a first object is created, and a unique identifier of the first object is generated.
- the transceiver module is configured to send the unique identifier of the first object to the second application; and receive a subscription request sent by the second application according to the unique identifier of the first object, where the subscription request includes identification information of the second application.
- the keep-alive management module is configured to add the identification information of the second application to the subscription list of the first object according to the subscription request.
- the operating system of the first device When the operating system of the first device needs to forcibly kill some applications running on the first device to release system resources due to the limitation of system resources, for the first application, the operating system of the first device queries the subscription list of the first object , if the subscription list of the first object includes the identification information of the second application, the operating system of the first device extends the survival time of the first application.
- the operating system of the first device is specifically configured to increase the priority of the first application among all applications currently running in the first device by at least one priority, and the higher the priority, the longer the survival time of the application. long.
- the operating system of the first device is specifically configured to elevate the priority of the first application among all applications currently running in the first device to the highest priority.
- the subscription request is sent to the first application by the second application after verifying that the second application has the permission to read the unique identifier of the first object.
- the device may further include: a permission verification module for verifying whether the second application has the right to subscribe to the first object; a keep-alive management module, which is specifically configured to verify that the second application has been verified by the permission verification module After having the right to subscribe to the first object, the identification information of the second application is added to the subscription list of the first object according to the subscription request.
- a permission verification module for verifying whether the second application has the right to subscribe to the first object
- a keep-alive management module which is specifically configured to verify that the second application has been verified by the permission verification module After having the right to subscribe to the first object, the identification information of the second application is added to the subscription list of the first object according to the subscription request.
- the transceiver module is further configured to receive an unsubscribe request sent by the second application according to the unique identifier of the first object, where the unsubscribe request includes identification information of the second application.
- the keep-alive management module is further configured to delete the identification information of the second application from the subscription list of the first object according to the unsubscribe request.
- the operating system of the first device needs to forcibly kill some applications running on the first device to release system resources due to the limitation of system resources, for the first application, the operating system of the first device queries the subscription list of the first object , if the subscription list of the first object does not include the identification information of the second application, the operating system of the first device does not need to extend the survival time of the first application.
- the unique identifier of the first object includes device information of the first device, application information of the first application, object information of the first object, and timestamp information when the first object is created.
- the devices where the first application and the second application are located are the same device or different devices.
- the second application includes a plurality of third applications; the operating system of the first device is specifically configured to, if the subscription list of the first object includes identification information of at least one third application, the operating system of the first device is extended. The lifetime of the first application.
- embodiments of the present application provide an electronic device, including: a processor; a memory; and a computer program; wherein, the computer program is stored in the memory, and when the computer program is executed by the processor, the electronic device realizes the first
- an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium includes a computer program, and when the computer program runs on an electronic device, the electronic device enables the electronic device to implement any of the first aspect and the first aspect.
- the embodiments of the present application further provide a computer program product, including computer-readable codes, when the computer-readable codes are run on an electronic device, the electronic device can implement any one of the first aspect and the first aspect.
- the electronic device may be the first device mentioned in the first aspect.
- FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the present application.
- FIG. 2 is a schematic structural diagram of a first device provided by an embodiment of the present application.
- FIG. 3 is a schematic flowchart of an application keep-alive method provided by an embodiment of the present application.
- FIG. 5 is a schematic structural diagram of an application keep-alive device provided by an embodiment of the present application.
- FIG. 6 is another schematic structural diagram of the device for keeping applications alive according to an embodiment of the present application.
- references in this specification to "one embodiment” or “some embodiments” and the like mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application.
- appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically emphasized otherwise.
- the terms “including”, “including”, “having” and their variants mean “including but not limited to” unless specifically emphasized otherwise.
- the term “connected” includes both direct and indirect connections unless otherwise specified.
- first and second are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implicitly indicating the number of indicated technical features.
- a feature defined as “first” or “second” may expressly or implicitly include one or more of that feature.
- words such as “exemplarily” or “for example” are used to represent examples, illustrations or illustrations. Any embodiment or design described in the embodiments of the present application as “exemplarily” or “such as” should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as “exemplarily” or “such as” is intended to present the related concepts in a specific manner.
- the application collaboration function refers to the function of providing services to users through collaboration between two application programs (application, App), and a rich experience can be brought to the user through the application collaboration function.
- An application may be referred to as an application for short.
- the first application is installed on the first device, and the second application is installed on the second device.
- the first application and the second application can cooperate to provide services to the user, and the user can view the information in the first application on the first device through the second application on the second device .
- the operating system of the first device may forcibly kill some applications running on the first device due to the limitation of system resources (insufficient system resources). Free up system resources. Killing an app means ending the app's process.
- the application killed by the operating system of the first device includes the first application (the first application may be referred to as an associated application of the application coordination function), the application coordination function between the first application and the second application will be affected, affect the user experience.
- the first device is a mobile phone
- the first application is gallery application 1 installed on the mobile phone
- the second device is a smart watch
- the second application is gallery application 2 installed on the smart watch.
- the gallery application 1 and the gallery application 2 can cooperate to provide services for the user, and the user can view the pictures in the gallery application 1 on the mobile phone through the gallery application 2 on the smart watch.
- the operating system of the mobile phone may forcibly kill some applications running on the mobile phone to release system resources due to the limitation of system resources. If the apps killed by the mobile phone include gallery app 1, the application collaboration function between gallery app 1 and gallery app 2 will be affected, and gallery app 1 and gallery app 2 cannot continue to collaborate to provide services to users. At this time, the user's operation of viewing the pictures in the gallery application 1 on the mobile phone through the gallery application 2 on the smart watch may be forcibly interrupted, so that the user cannot continue to view the pictures in the gallery application 1 on the mobile phone through the gallery application 2 on the smart watch. pictures, which seriously affects the user experience.
- the second application can register the death notification of the first application, and when the first application is killed by the first device , the second application may receive the death notification of the first application, and re-launch the second application to continue to implement the application coordination function between the first application and the second application.
- the second application will receive the death notification of the first application only after the first application is killed. At this time, the application coordination function between the first application and the second application has been affected .
- a heartbeat relationship may be established between the first application and the second application, and the second application may periodically send heartbeat information to the first application.
- the operating system of the first device forcibly kills some applications running on the first device to release system resources, if the heartbeat information periodically sent by the second application to the first application is monitored, the survival time of the first application can be extended.
- an embodiment of the present application provides an application keep-alive method, which can be applied to the above-mentioned scenario in which an application coordination function is implemented between the first application and the second application.
- the method may include: when the second application receives an operation of the user viewing the first information in the first application, the second application acquires the first information from the first application and displays it to the user.
- the first application detects that the second application acquires the first information, the first application creates the first object and generates a unique identifier of the first object. After generating the unique identifier of the first object, the first application sends (shares) the unique identifier of the first object to the second application.
- the second application sends a subscription request to the first application according to the unique identifier of the first object.
- the subscription request is used to indicate to the first application that the second application has subscribed to the first object, and the subscription request may include identification information of the second application.
- the first application adds the identification information of the second application to the subscription list of the first object according to the subscription request.
- the first application adds the identification information of the second application to the subscription list of the first object, it indicates that a collaborative relationship (or referred to as a dependency relationship) is established between the first application and the second application.
- the operating system of the first device may first query the subscription list of the first object, and if the subscription list of the first object includes the identification information of the second application, it indicates that there is a relationship between the first application and the second application In the cooperative relationship, the operating system of the first device can prolong the survival time of the first application.
- the application keeping method can prolong the survival time of the first application, so as to avoid the application cooperation function between the first application and the second application from being affected. Also, the power consumption of the first device and the second device may be lower.
- FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the present application.
- an application scenario of this embodiment of the present application may include: a first device 100 and a second device 200 .
- the connection between the first device 100 and the second device 200 may be established in a wired or wireless manner.
- the first application 110 is installed on the first device 100
- the second application 210 is installed on the second device 200 .
- the first application 110 and the second application 210 can cooperate to provide services for the user, and the user can view the first device 100 on the second device 200 through the second application 210 information in the first application 110 of the .
- the wireless communication protocol adopted when the connection is established between the first device 100 and the second device 200 in a wireless manner may be a wireless fidelity (wireless fidelity, Wi-Fi) protocol, a bluetooth (bluetooth) protocol, a ZigBee protocol, A near field communication (near field communication, NFC) protocol, various cellular network protocols, etc., are not specifically limited here.
- the above-mentioned first device 100 and/or second device 200 may be a mobile phone, a tablet computer, a handheld computer, a PC, a cellular phone, a personal digital assistant (PDA), a wearable device (such as : smart watches, smart bracelets), smart home devices (such as: TV sets), car devices (such as: car computers), smart screens, game consoles, headphones, artificial intelligence (artificial intelligence, AI) speakers, and augmented reality (augmented reality (AR)/virtual reality (virtual reality, VR) devices, etc.
- the specific device forms of the first device 100 and the second device 200 are not particularly limited in this embodiment of the present application.
- the device forms of the first device 100 and the second device 200 may be the same.
- both the first device 100 and the second device 200 are mobile phones.
- the device forms of the first device 100 and the second device 200 may also be different.
- the first device 100 may be a mobile phone
- the second device 200 may be a smart watch.
- the above-mentioned first device 100 and the second device 200 may be touch screen devices or non-touch screen devices.
- the operating system of the first device 100 and/or the second device 200 may be an AndroidTM (android) system, an iosTM system, a windowsTM system, a macTM system, a linuxTM system, or the like. More specifically, Huawei TM system, EMUITM system, Android WearTM system, Lite OSTM, TizenTM system, watch osTM system, etc. can also be used.
- the operating systems of the first device 100 and the second device 200 may be the same. In other embodiments, the operating systems of the first device 100 and the second device 200 may also be different. This embodiment of the present application does not specifically limit the operating system of the first device 100 and/or the second device 200 .
- the first device 100 and the second device 200 may include a memory, a processor and a display, respectively.
- the memory may be used to store the operating system
- the processor may be used to run the operating system stored in the memory.
- Displays can be used to display various user interfaces (UIs).
- the display of the first device 100 may be used to display the application interface of the first application installed on the first device 100 and the user interaction interface of the operating system of the first device 100 .
- FIG. 2 is a schematic structural diagram of a first device according to an embodiment of the present application.
- the first device 100 may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging Management module 240, power management module 241, battery 242, antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, audio module 270, speaker 270A, receiver 270B, microphone 270C, headphone jack 270D, sensor module 280, buttons 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a subscriber identification module (SIM) card interface 295 and the like.
- SIM subscriber identification module
- the processor 210 may include one or more processing units, for example, the processor 210 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
- application processor application processor, AP
- modem processor graphics processor
- ISP image signal processor
- controller memory
- video codec digital signal processor
- DSP digital signal processor
- NPU neural-network processing unit
- the controller can be the nerve center and command center of the mobile phone.
- the controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
- a memory may also be provided in the processor 210 for storing instructions and data.
- the memory in processor 210 is cache memory.
- the memory may hold instructions or data that have just been used or recycled by the processor 210 . If the processor 210 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided, and the waiting time of the processor 210 is reduced, thereby improving the efficiency of the system.
- the application keep-alive method provided by the embodiments of the present application may be implemented by writing code or a program in the processor 210 .
- the processor 210 executes the code or program
- the first device 100 can implement the application keeping method provided by the embodiment of the present application.
- the first application 110 in the first device 100 may implement steps such as S303, S304, and S306 shown in FIG. 3 below.
- the operating system of the first device 100 may implement the following S307 and S308 shown in FIG. 3 .
- the processor 210 may include one or more interfaces.
- the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, SIM interface, and/or USB interface, etc.
- I2C integrated circuit
- I2S integrated circuit built-in audio
- PCM pulse code modulation
- PCM pulse code modulation
- UART universal asynchronous transceiver
- MIPI mobile industry processor interface
- GPIO general-purpose input/output
- SIM interface SIM interface
- USB interface etc.
- the external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone.
- the external memory card communicates with the processor 210 through the external memory interface 220 to realize the data storage function. For example to save files like music, video etc in external memory card.
- Internal memory 221 may be used to store computer executable program code, which includes instructions.
- the processor 210 executes various functional applications and data processing of the mobile phone by executing the instructions stored in the internal memory 221 .
- the internal memory 221 may include a storage program area and a storage data area.
- the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
- the storage data area can store data (such as image data, phone book, etc.) created during the use of the mobile phone.
- the internal memory 221 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
- the charging management module 240 is used to receive charging input from the charger. While the charging management module 240 charges the battery 242 , it can also supply power to the mobile phone through the power management module 241 .
- the power management module 241 is used to connect the battery 242 , the charging management module 240 , and the processor 210 .
- the power management module 241 can also receive the input of the battery 242 to supply power to the mobile phone.
- the wireless communication function of the mobile phone can be realized by the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modulation and demodulation processor, the baseband processor, and the like.
- Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
- Each antenna in a cell phone can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
- the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
- the mobile phone can implement audio functions through an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, and an application processor. Such as music playback, recording, etc.
- the sensor module 280 may include a pressure sensor 280A, a gyro sensor 280B, an air pressure sensor 280C, a magnetic sensor 280D, an acceleration sensor 280E, a distance sensor 280F, a proximity light sensor 280G, a fingerprint sensor 280H, a temperature sensor 280J, a touch sensor 280K, and an ambient light sensor 280L, bone conduction sensor 280M, etc.
- Display screen 294 is used to display images, videos, and the like.
- Display screen 294 includes a display panel.
- the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light).
- emitting diode, AMOLED organic light-emitting diode
- flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
- the cell phone may include one or M display screens 294, where M is a positive integer greater than one.
- display screen 294 may be used to display a display interface for an application.
- the mobile phone realizes the display function through the GPU, the display screen 294, and the application processor.
- the GPU is a microprocessor for image processing, and is connected to the display screen 294 and the application processor.
- the GPU is used to perform mathematical and geometric calculations for graphics rendering.
- Processor 210 may include one or more GPUs that execute program instructions to generate or alter display information.
- the structure shown in FIG. 2 does not constitute a specific limitation on the mobile phone.
- the mobile phone may also include more or less components than those shown in FIG. 2 , or combine some components, or separate some components, or different component arrangements, and the like.
- some of the components shown in FIG. 2 may be implemented in hardware, software, or a combination of software and hardware.
- the first device 100 is a tablet computer, a handheld computer, a PC, a cellular phone, a PDA, a wearable device, a smart home device, a car device, a smart screen, a game console, an earphone, an AI speaker, and an AR/VR device, etc.
- the specific structures of these other terminal devices can also be referred to as shown in FIG. 2 .
- other terminal devices may have components added or reduced on the basis of the structure given in FIG. 2 , which will not be repeated here.
- the structure of the second device 200 is the same as that of the first device 100 .
- the structure of the second device 200 may also refer to FIG. 2, which may be based on the structure given in FIG. I will not repeat them.
- the application types of the first application 110 and the second application 210 may be the same or different.
- both the first application 110 and the second application 210 may be gallery applications.
- the first application 110 may be a file management application
- the second application 210 may be a gallery application. This application is not limited here.
- the application keep-alive method provided by the embodiment of the present application can be applied to the application scenario shown in FIG. 1 .
- FIG. 3 is a schematic flowchart of an application keep-alive method provided by an embodiment of the present application. As shown in FIG. 3, the method may include S301-S308.
- the second application 210 receives an operation of a user viewing the first information in the first application 110 .
- a first control may be provided in the application interface of the second application 210, and when the user clicks on the first control, the second application 210 may be triggered to obtain the first information from the first application 110 and display it to the user.
- the operation of the user clicking the first control is the operation of the user viewing the first information in the first application 110 described in S301.
- the first information refers to information contained in the first application 110 .
- the first information may be a picture stored in the first application 110 .
- the second application 210 acquires the first information from the first application 110, and displays it to the user.
- S303-S304 may be performed.
- the second application 210 may send an acquisition request for the first information to the first application 110 . After receiving the request for obtaining the first information, the first application 110 may return the first information to the second application 210 . When the first application 110 receives the request for obtaining the first information, it can be detected that the second application 210 obtains the first information.
- the first application 110 creates a first object, and generates a unique identifier of the first object.
- the first object may be a virtual object created by the first application 110.
- the virtual object may be a text, a number, etc., and the virtual object may be randomly generated by the first application 110 or generated according to certain rules. limit.
- the first object may also be created by the first application 110 according to the first information, or the first object may be the first information.
- the first application 110 is a gallery application and the first information is picture 1 stored in the first application 110
- the first object may be text data created according to picture 1
- the first object may be picture 1 .
- the unique identifier of the first object may be generated by the first application 110 according to device information of the first device 100, application information of the first application 110, object information of the first object, timestamp information when the first object is created, and the like.
- the unique identifier of the first object may include: device information of the first device 100, application information of the first application 110, object information of the first object, and timestamp information when the first object is created.
- the device information of the first device 100 may be a device name or a device model of the first device 100 .
- the application information of the first application 110 may be an application name or an application type of the first application 110 .
- the object information of the first object may be the name of the first object.
- the first object created by the first application 110 is "Object”
- the device model of the first device 100 is "12345”
- the application name of the first application 110 is "photo”
- the timestamp when the first object is created is "20201027”
- the unique identifier of the first object may be "12345_photo_Object_20201027”.
- the first application 110 sends the unique identifier of the first object to the second application 210 .
- the second application 210 receives the unique identifier of the first object from the first application 110 .
- the second application 210 sends a subscription request to the first application 110 according to the unique identifier of the first object.
- the first application 110 receives the subscription request from the second application 210 .
- the subscription request is used to indicate to the first application 110 that the second application 210 subscribes to the first object, and the subscription request may include identification information of the second application 210 .
- the identification information of the second application 210 may be the name of the second application 210 .
- the first application 110 adds the identification information of the second application 210 to the subscription list of the first object according to the subscription request.
- the first application 110 adds the identification information of the second application 210 to the subscription list of the first object, it indicates that a collaborative relationship is established between the first application 110 and the second application 210.
- the identification information of the second application 210 included in the subscription list of the first object may be used to instruct the first device 100 to extend the survival time of the first application 110 . For example, see S307-S308.
- the operating system of the first device 100 queries the subscription list of the first object .
- the Android TM system includes a lowmemorykiller component, and the lowmemorykiller component can be used to forcibly kill some applications running on the first device 100 to release system resources.
- the subscription list of the first object includes the identification information of the second application 210
- the operating system of the first device 100 extends the survival time of the first application 110.
- the operating system of the first device 100 prolonging the survival time of the first application 110 may include: the operating system of the first device 100 does not forcibly kill the first application 110 .
- the operating system of the first device 100 prolongs the survival time of the first application 110, which may also include: the operating system of the first device 100 increases the priority of the first application 110 among all currently running applications, The higher the priority, the longer the application will live.
- the operating system of the first device 100 raises the priority of the first application 110 among all currently running applications, which may refer to: raising the priority of the first application 110 among all currently running applications to highest priority.
- the applications currently running on the first device 100 include: application A, application B, and the first application 110 .
- the current priorities of application A, application B, and the first application 110 are: application A is higher than application B, and application B is higher than the first application 110 .
- the operating system of the first device 100 can adjust the priorities of the three applications as follows: the first application 110 is higher than the application A, the application A is higher than the application B, and the operating system of the first device 100 forcibly kills the application when , will kill application B first, and then kill the first application 110 last.
- the survival time of the first application 110 may be longer.
- the operating system of the first device 100 increases the priority of the first application 110 among all currently running applications, which may also refer to: increasing the priority of the first application 110 among all currently running applications by at least one priority.
- the operating system of the first device 100 can adjust the priorities of these three applications as follows: application A is higher than the first application 110, and the first application 110 is higher than the application B.
- the operating system of the first device 100 forcibly kills the application, it will kill the application B first, and then kill the application A last.
- the survival time of the first application 110 may also be longer.
- the embodiment of the present application does not limit the specific manner in which the operating system of the first device 100 extends the survival time of the first application 110 .
- the operating system of the first device 100 needs to forcibly kill some applications running on the first device 100 to release system resources due to the limitation of system resources, after the operating system of the first device 100 queries the subscription list of the first object, Since the subscription list of the first object does not include the identification information of the second application 210, the operating system of the first device 100 does not need to prolong the survival time of the first application 110, for example, the first application 110 can be killed directly, or the first application 110 can be maintained. Apply the priority of 110.
- FIG. 4 is another schematic flowchart of the method for keeping an application alive according to an embodiment of the present application. As shown in FIG. 4, the method may include S401-S405.
- the second application 210 receives an operation of canceling viewing of the first information in the first application 110 by the user.
- a second control may be provided in the application interface of the second application 210 , and when the user clicks the second control, the second application 210 may be triggered to stop acquiring the first information from the first application 110 .
- the operation of the user clicking on the second control is the operation of canceling the viewing of the first information in the first application 110 by the user described in S401 .
- the second application 210 After the second application 210 receives the operation of canceling the viewing of the first information in the first application 110 by the user, it no longer acquires the first information from the first application 110, and simultaneously executes S402.
- the second application 210 sends an unsubscribe request to the first application 110 according to the unique identifier of the first object.
- the first application 110 receives the unsubscribe request from the second application 210 .
- the unsubscribe request is used to instruct the first application 110 to unsubscribe the second application 210 from the first object, and the unsubscribe request may also include identification information of the second application 210 .
- the first application 110 deletes the identification information of the second application 210 from the subscription list of the first object according to the unsubscribe request.
- the first application 110 After the first application 110 deletes the identification information of the second application 210 from the subscription list of the first object, it means that there is no collaborative relationship between the first application 110 and the second application 210 .
- the subscription list of the first object no longer includes the second application 210
- the identification information can indicate that the first device 100 does not need to extend the survival time of the first application 110 any more. For example, see S404-S405.
- the operating system of the first device 100 does not need to extend the survival time of the first application 110.
- the operating system of the first device 100 does not need to prolong the survival time of the first application 110, which may refer to: when the operating system of the first device 100 needs to forcibly kill the application running on the first device 100 due to the limitation of system resources. When some applications release system resources, the operating system of the first device 100 does not need to adjust the priority of the first application 110, or directly kill the first application 110.
- the first device in the process of viewing the first information in the first application 110 through the second application 210, when the operating system of the first device 100 needs to forcibly kill the first information on the first device 100 due to the limitation of system resources
- the first device can first query the subscription list of the first object, if the subscription list of the first object includes the identification information of the second application 210, it indicates that the There is a cooperative relationship between an application 110 and a second application 210 , and the first device 100 can prolong the survival time of the first application 110 to prevent the application cooperation function between the first application 110 and the second application 210 from being affected.
- this method can establish a cooperative relationship between the first application 110 and the second application 210 in a simple manner without requiring periodic heartbeats. Therefore, the power consumption of the first device 100 and the second device 200 may be lower. In addition, compared with the method in which the first application 110 is re-launched after being killed, the user experience can be better.
- the gallery application 2 can receive the user's operation of viewing pictures in the gallery application 1.
- the gallery application 2 may acquire and display a picture from the gallery application 1 in response to the user's operation of viewing the picture in the gallery application 1 .
- the gallery application 1 may create a first object and generate a unique identifier of the first object.
- the gallery application 1 may send (share) the unique identifier of the first object to the gallery application 2 .
- the gallery application 2 sends a subscription request to the gallery application 1 according to the unique identifier of the first object.
- the gallery application 1 may add the identification information of the gallery application 2 to the subscription list of the first object according to the subscription request.
- the gallery application 1 adds the identification information of the gallery application 2 to the subscription list of the first object, it indicates that a collaborative relationship (or referred to as a dependency relationship) is established between the gallery application 1 and the gallery application 2 .
- the operating system of the mobile phone can first query the subscription list of the first object. If the subscription list of the first object includes the identification information of the gallery application 2, the operating system of the mobile phone can prolong the survival time of the gallery application 1.
- the application keep-alive method can prolong the survival time of the gallery application 1, so as to avoid the application collaboration function between the gallery application 1 and the gallery application 2 from being affected, thereby ensuring user experience. Also, the power consumption of mobile phones and smart watches can be lower.
- the second application 210 may first check the unique identifier of the first object to determine the second application 210 Whether there is permission to read the unique identifier of the first object.
- the second application 210 determines that it has the right to read the unique identifier of the first object, the second application 210 performs subsequent steps, such as S305.
- the permission for the second application 210 to read the unique identifier of the first object may be given to the second application 210 by the user on the second device 200 .
- the second device 200 may display the first interface , the first interface may include prompt information: "whether to allow the second application 210 to read information from the first application 110", and a "confirm” button and a "cancel” button.
- the second application 210 may be given the permission to read the unique identifier of the first object.
- the second application 210 does not have the right to read the unique identifier of the first object.
- the second application 210 after receiving the unique identifier of the first object from the first application 110, the second application 210 first verifies the unique identifier of the first object, and after confirming that it has the unique identifier for reading the first object After obtaining the permission of the identifier, you can perform the next steps to better protect the user's privacy.
- the first application 110 may first verify the subscription request to determine whether the second application 210 has the right to subscribe to the first object.
- the subsequent steps such as S306, are performed.
- the permission of the second application 210 to subscribe to the first object may be given to the second application 210 by the user on the first device 100 .
- the first device 100 may display the second interface, in which the second interface It may include prompt information: "whether to allow the second application 210 to subscribe to the first object", and a "confirm” button and a "cancel” button.
- the second application 210 may be given the right to subscribe to the first object.
- the second application 210 does not have the right to subscribe to the first object.
- the first application 110 will not perform subsequent steps.
- the first application 110 after receiving the subscription request from the second application 210, the first application 110 first verifies the subscription request, and after confirming that the second application 210 has the right to subscribe to the first object, the subsequent steps are performed. User privacy can be better protected.
- the application keep-alive method provided by the embodiment of the present application involves the running data of the application, the method can realize the application keep-alive only after the user agrees and grants corresponding permissions, so as to better protect the user's privacy.
- the above embodiments mainly describe the specific implementation process of the application keep-alive method provided by the embodiments of the present application in the application scenario shown in FIG. 1 .
- the first application 110 and the second application 210 are respectively installed on two different devices (the first device 100 and the second device 200 ).
- the application keep-alive method provided in the embodiment of the present application is also applicable to two applications installed on the same device to achieve keep-alive.
- the specific process is similar to the interaction process between the first application 110 and the second application 210 described in the foregoing embodiment, and will not be repeated.
- the embodiments of the present application are described by taking the implementation of the application coordination function between the first application and the second application as an example, it should be understood that the application that realizes the coordination function with the first application may include multiple. Each application can implement a collaboration function with the first application, and subscribe to the first object created by the first application according to the process described in the foregoing embodiment. The first application may add the identification information of all applications that have subscribed to the first object to the subscription list of the first object.
- the operating system of the first device when the operating system of the first device (or the device where the first application is located) needs to be forcibly killed due to the limitation of system resources, running on the first device
- the operating system of the first device can first query the subscription list of the first object, and if the subscription list of the first object includes the identification information of other applications, it indicates that the first application
- the object is subscribed by other applications, there is a cooperative relationship between the first application and other applications, and the operating system of the first device can prolong the survival time of the first application.
- the aforementioned second application may include multiple applications (such as third applications).
- third applications When some applications release system resources, if the subscription list of the first object includes the identification information of at least one third application, it indicates that the first object is subscribed by the third application, and there is a relationship between the first application and the third application. In the cooperative relationship, the operating system of the first device can prolong the survival time of the first application.
- the third application may be referred to as a subscriber.
- the technical solution of the embodiment of the present application can actually be understood as: when another application reads (obtains) the first information , the first application records the identification information of other applications in the subscription list of the first object (for details, refer to the foregoing embodiment). If the subscription list of the first object includes identification information of other applications, it indicates that the first information is being read by other applications. so.
- the survival time of the first application may be appropriately extended.
- the embodiment of the present application further provides an application keep-alive device, and the device can be applied to the first device, for example, the device can be shared with the first application in the form of code. Deployed in the aforementioned first device, the first device can call the code to implement the function of the first application in the aforementioned application keep-alive method. There is an application coordination function between the first application and the second application.
- FIG. 5 is a schematic structural diagram of an application keep-alive device provided by an embodiment of the present application. As shown in Figure 5, the apparatus may include:
- the object management module 501 is configured to create a first object when it is detected that the second application acquires the first information in the first application, and generate a unique identifier of the first object; for detecting that the second application acquires the first information; When the first information in an application is used, a first object is created, and a unique identifier of the first object is generated.
- the transceiver module 502 is configured to send the unique identifier of the first object to the second application; and receive a subscription request sent by the second application according to the unique identifier of the first object, where the subscription request includes identification information of the second application.
- the keep-alive management module 503 is configured to add the identification information of the second application to the subscription list of the first object according to the subscription request.
- the operating system of the first device When the operating system of the first device needs to forcibly kill some applications running on the first device to release system resources due to the limitation of system resources, for the first application, the operating system of the first device queries the subscription list of the first object , if the subscription list of the first object includes the identification information of the second application, the operating system of the first device extends the survival time of the first application.
- the operating system of the first device is specifically configured to increase the priority of the first application among all applications currently running in the first device by at least one priority, and the higher the priority, the longer the survival time of the application. long.
- the operating system of the first device is specifically configured to elevate the priority of the first application among all applications currently running in the first device to the highest priority.
- the subscription request is sent to the first application by the second application after verifying that the second application has the permission to read the unique identifier of the first object.
- FIG. 6 is another schematic structural diagram of the device for keeping an application alive according to an embodiment of the present application.
- the apparatus may further include: a permission checking module 504 for checking whether the second application has permission to subscribe to the first object; After verifying that the second application has the right to subscribe to the first object, the identification information of the second application is added to the subscription list of the first object according to the subscription request.
- the transceiver module 502 is further configured to receive an unsubscribe request sent by the second application according to the unique identifier of the first object, where the unsubscribe request includes identification information of the second application.
- the keep-alive management module 503 is further configured to delete the identification information of the second application from the subscription list of the first object according to the unsubscribe request.
- the operating system of the first device needs to forcibly kill some applications running on the first device to release system resources due to the limitation of system resources, for the first application, the operating system of the first device queries the subscription list of the first object , if the subscription list of the first object does not include the identification information of the second application, the operating system of the first device does not need to extend the survival time of the first application.
- the unique identifier of the first object includes device information of the first device, application information of the first application, object information of the first object, and timestamp information when the first object is created.
- the devices where the first application and the second application are located are the same device or different devices.
- the second application includes a plurality of third applications; the operating system of the first device is specifically configured to, if the subscription list of the first object includes identification information of at least one third application, the operating system of the first device is extended. The lifetime of the first application.
- units in the above apparatus is only a division of logical functions, and may be fully or partially integrated into a physical entity in actual implementation, or may be physically separated.
- all the units in the device can be realized in the form of software calling through the processing element; also can all be realized in the form of hardware; some units can also be realized in the form of software calling through the processing element, and some units can be realized in the form of hardware.
- each unit can be a separately established processing element, or can be integrated in a certain chip of the device to be implemented, and can also be stored in the memory in the form of a program, which can be called by a certain processing element of the device and execute the unit's processing. Function.
- all or part of these units can be integrated together, and can also be implemented independently.
- the processing element described here may also be called a processor, which may be an integrated circuit with signal processing capability.
- each step of the above method or each of the above units may be implemented by an integrated logic circuit of hardware in the processor element or implemented in the form of software being invoked by the processing element.
- the units in the above apparatus may be one or more integrated circuits configured to implement the above method, eg, one or more application specific integrated circuits (ASICs), or, one or more A digital signal processor (DSP), or, one or more field programmable gate arrays (FPGA), or a combination of at least two of these integrated circuit forms.
- ASICs application specific integrated circuits
- DSP digital signal processor
- FPGA field programmable gate arrays
- the processing element can be a general-purpose processor, such as a CPU or other processors that can invoke programs.
- these units can be integrated together and implemented in the form of a system-on-a-chip (SOC).
- the unit of the above apparatus for implementing each corresponding step in the above method may be implemented in the form of a processing element scheduler.
- the apparatus may include a processing element and a storage element, and the processing element invokes a program stored in the storage element to execute the method described in the above method embodiments.
- the storage element may be a storage element on the same chip as the processing element, ie, an on-chip storage element.
- the program for performing the above method may be in a storage element on a different chip from the processing element, ie, an off-chip storage element.
- the processing element calls or loads the program from the off-chip storage element to the on-chip storage element, so as to call and execute the methods described in the above method embodiments.
- an embodiment of the present application may further provide an apparatus, such as an electronic device, which may include a processor, and a memory for storing instructions executable by the processor.
- an electronic device which may include a processor, and a memory for storing instructions executable by the processor.
- the processor When the processor is configured to execute the above-mentioned instructions, the electronic device implements the application keep-alive method described in the foregoing embodiments.
- the memory may be located within the electronic device or external to the electronic device.
- the processor includes one or more.
- the electronic device may be the above-mentioned first device.
- the unit of the apparatus implementing each step in the above method may be configured as one or more processing elements, where the processing elements may be integrated circuits, such as: one or more ASICs, or, one or more Multiple DSPs, or, one or more FPGAs, or a combination of these types of integrated circuits. These integrated circuits can be integrated together to form chips.
- an embodiment of the present application further provides a chip, which can be applied to the above-mentioned electronic device.
- the chip includes one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected by lines; the processor receives and executes computer instructions from the memory of the electronic device through the interface circuit, so as to realize the above-mentioned embodiments. Apply the keep alive method.
- Embodiments of the present application further provide a computer program product, including computer-readable codes, which, when the computer-readable codes are run in an electronic device, enable the electronic device to implement the application keep-alive method described in the foregoing embodiments.
- the disclosed apparatus and method may be implemented in other manners.
- the device embodiments described above are only illustrative.
- the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods.
- multiple units or components may be Incorporation may either be integrated into another device, or some features may be omitted, or not implemented.
- the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place, or may be distributed to multiple different places . Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
- the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
- the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium.
- the software product is stored in a program product, such as a computer-readable storage medium, and includes several instructions to cause a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) to execute all of the methods described in the various embodiments of the present application. or part of the steps.
- the aforementioned storage medium includes: a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, and other media that can store program codes.
- the embodiments of the present application may further provide a computer-readable storage medium on which computer program instructions are stored.
- the electronic device is made to implement the application keep-alive method described in the foregoing embodiments.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Stored Programmes (AREA)
Abstract
Description
Claims (11)
- 一种应用保活方法,其特征在于,所述方法应用于第一设备,所述第一设备包括第一应用,所述第一应用与第二应用之间具有应用协同功能;所述方法包括:当所述第一应用检测到所述第二应用获取所述第一应用中的第一信息时,所述第一应用创建第一对象,并生成所述第一对象的唯一标识符;所述第一应用向所述第二应用发送所述第一对象的唯一标识符;所述第一应用接收所述第二应用根据所述第一对象的唯一标识符发送的订阅请求,所述订阅请求包括所述第二应用的标识信息;所述第一应用根据所述订阅请求,在所述第一对象的订阅列表中添加所述第二应用的标识信息;当所述第一设备的操作系统,由于系统资源的限制需要强行杀死所述第一设备上运行的某些应用来释放系统资源时,对于所述第一应用,所述第一设备的操作系统查询所述第一对象的订阅列表,如果所述第一对象的订阅列表中包括所述第二应用的标识信息,则所述第一设备的操作系统延长所述第一应用的存活时间。
- 根据权利要求1所述的方法,其特征在于,所述第一设备的操作系统延长所述第一应用的存活时间,包括:所述第一设备的操作系统,将所述第一应用在所述第一设备中所有当前正在运行的应用中的优先级提升至少一个优先级,优先级越高,应用的存活时间越长。
- 根据权利要求2所述的方法,其特征在于,所述第一设备的操作系统,将所述第一应用在所述第一设备中所有当前正在运行的应用中的优先级提升至少一个优先级,包括:所述第一设备的操作系统,将所述第一应用在所述第一设备中所有当前正在运行的应用中的优先级提升至最高优先级。
- 根据权利要求1所述的方法,其特征在于,所述订阅请求是所述第二应用在校验到所述第二应用具有读取所述第一对象的唯一标识符的权限后,发送给所述第一应用的。
- 根据权利要求1所述的方法,其特征在于,所述第一应用根据所述订阅请求,在所述第一对象的订阅列表中添加所述第二应用的标识信息,包括:所述第一应用校验所述第二应用是否具有订阅所述第一对象的权限;当所述第一应用校验到所述第二应用具有订阅所述第一对象的权限后,所述第一应用根据所述订阅请求,在所述第一对象的订阅列表中添加所述第二应用的标识信息。
- 根据权利要求1-5任一项所述的方法,其特征在于,所述方法还包括:所述第一应用接收所述第二应用根据所述第一对象的唯一标识符发送的取消订阅请求,所述取消订阅请求包括所述第二应用的标识信息;所述第一应用根据所述取消订阅请求,在所述第一对象的订阅列表中删除所述第二应用的标识信息;当所述第一设备的操作系统,由于系统资源的限制需要强行杀死所述第一设备上运行的某些应用来释放系统资源时,对于所述第一应用,所述第一设备的操作系统查询所述第一对象的订阅列表,如果所述第一对象的订阅列表中不包括所述第二应用的 标识信息,则所述第一设备的操作系统无需延长所述第一应用的存活时间。
- 根据权利要求1-6任一项所述的方法,其特征在于,所述第一对象的唯一标识符包括所述第一设备的设备信息、所述第一应用的应用信息、所述第一对象的对象信息、以及创建所述第一对象时的时间戳信息。
- 根据权利要求1-7任一项所述的方法,其特征在于,所述第一应用和所述第二应用所在的设备为同一设备或不同设备。
- 根据权利要求1-8任一项所述的方法,其特征在于,所述第二应用包括多个第三应用;所述如果所述第一对象的订阅列表中包括所述第二应用的标识信息,则所述第一设备的操作系统延长所述第一应用的存活时间,包括:如果所述第一对象的订阅列表中包括至少一个所述第三应用的标识信息,则所述第一设备的操作系统延长所述第一应用的存活时间。
- 一种电子设备,其特征在于,包括:处理器;存储器;以及计算机程序;其中,所述计算机程序存储在所述存储器上,当所述计算机程序被所述处理器执行时,使得所述电子设备实现如权利要求1-9任一项所述的方法。
- 一种计算机可读存储介质,所述计算机可读存储介质包括计算机程序,其特征在于,当所述计算机程序在电子设备上运行时,使得所述电子设备实现如权利要求1-9任一项所述的方法。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP22794569.8A EP4310672A1 (en) | 2021-04-25 | 2022-04-11 | Application keep-alive method, electronic device and a storage medium |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110449195.8A CN115328566A (zh) | 2021-04-25 | 2021-04-25 | 应用保活方法、电子设备及存储介质 |
CN202110449195.8 | 2021-04-25 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022228098A1 true WO2022228098A1 (zh) | 2022-11-03 |
Family
ID=83846641
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/086101 WO2022228098A1 (zh) | 2021-04-25 | 2022-04-11 | 应用保活方法、电子设备及存储介质 |
Country Status (3)
Country | Link |
---|---|
EP (1) | EP4310672A1 (zh) |
CN (1) | CN115328566A (zh) |
WO (1) | WO2022228098A1 (zh) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130262670A1 (en) * | 2010-11-26 | 2013-10-03 | Fujitsu Limited | Management system, management apparatus and management method |
CN108737161A (zh) * | 2018-04-20 | 2018-11-02 | 中国人民解放军国防科技大学 | 面向智能体协同体系的实时数据总线管理方法及系统 |
CN110798349A (zh) * | 2019-10-28 | 2020-02-14 | 国家计算机网络与信息安全管理中心 | 一种配置分发、接收方法、设备及计算机可读存储介质 |
CN110958151A (zh) * | 2018-09-26 | 2020-04-03 | 上海欣诺通信技术股份有限公司 | 保活检测方法、装置、节点、存储介质及通信系统 |
-
2021
- 2021-04-25 CN CN202110449195.8A patent/CN115328566A/zh active Pending
-
2022
- 2022-04-11 EP EP22794569.8A patent/EP4310672A1/en active Pending
- 2022-04-11 WO PCT/CN2022/086101 patent/WO2022228098A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130262670A1 (en) * | 2010-11-26 | 2013-10-03 | Fujitsu Limited | Management system, management apparatus and management method |
CN108737161A (zh) * | 2018-04-20 | 2018-11-02 | 中国人民解放军国防科技大学 | 面向智能体协同体系的实时数据总线管理方法及系统 |
CN110958151A (zh) * | 2018-09-26 | 2020-04-03 | 上海欣诺通信技术股份有限公司 | 保活检测方法、装置、节点、存储介质及通信系统 |
CN110798349A (zh) * | 2019-10-28 | 2020-02-14 | 国家计算机网络与信息安全管理中心 | 一种配置分发、接收方法、设备及计算机可读存储介质 |
Non-Patent Citations (1)
Title |
---|
See also references of EP4310672A4 |
Also Published As
Publication number | Publication date |
---|---|
EP4310672A4 (en) | 2024-01-24 |
CN115328566A (zh) | 2022-11-11 |
EP4310672A1 (en) | 2024-01-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020108356A1 (zh) | 一种应用显示方法及电子设备 | |
EP4084486A1 (en) | Cross-device content projection method, and electronic device | |
WO2021147406A1 (zh) | 一种音频输出方法及终端设备 | |
WO2021253975A1 (zh) | 应用程序的权限管理方法、装置和电子设备 | |
EP4020210A1 (en) | Multi-thread synchronization method and electronic device | |
WO2020238728A1 (zh) | 智能终端的登录方法及电子设备 | |
WO2020150917A1 (zh) | 一种应用权限的管理方法及电子设备 | |
WO2021043046A1 (zh) | 一种资源管控方法及设备 | |
WO2021223539A1 (zh) | 射频资源分配方法及装置 | |
WO2021159746A1 (zh) | 文件共享方法、系统及相关设备 | |
WO2021052204A1 (zh) | 基于通讯录的设备发现方法、音视频通信方法及电子设备 | |
WO2021052200A1 (zh) | 一种设备能力调度方法及电子设备 | |
WO2021179924A1 (zh) | 一种显示蓝牙设备标识的方法及电子设备 | |
WO2021258795A1 (zh) | 原子能力调用方法及终端设备 | |
WO2021052415A1 (zh) | 资源调度方法及电子设备 | |
WO2021017935A1 (zh) | 一种唤醒锁的管理方法及电子设备 | |
WO2021093855A1 (zh) | 一种移动设备管理方法及设备 | |
WO2021052311A1 (zh) | 一种根据后壳颜色显示用户界面的方法和电子设备 | |
WO2022089121A1 (zh) | 处理推送消息的方法和装置 | |
WO2022127632A1 (zh) | 一种资源管控方法及设备 | |
WO2021238387A1 (zh) | 一种执行应用的方法及装置 | |
WO2021042991A1 (zh) | 一种非侵入式交互方法及电子设备 | |
WO2021057982A1 (zh) | 应用程序的处理方法及相关产品 | |
WO2021073183A1 (zh) | 始终显示方法及移动设备 | |
WO2021143168A1 (zh) | 可信执行环境操作系统崩溃处理方法及电子设备 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22794569 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2022794569 Country of ref document: EP |
|
ENP | Entry into the national phase |
Ref document number: 2022794569 Country of ref document: EP Effective date: 20231016 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 18556968 Country of ref document: US |
|
NENP | Non-entry into the national phase |
Ref country code: DE |