WO2020093208A1 - Application processing method and apparatus, computer device, and computer readable storage medium - Google Patents

Application processing method and apparatus, computer device, and computer readable storage medium Download PDF

Info

Publication number
WO2020093208A1
WO2020093208A1 PCT/CN2018/114003 CN2018114003W WO2020093208A1 WO 2020093208 A1 WO2020093208 A1 WO 2020093208A1 CN 2018114003 W CN2018114003 W CN 2018114003W WO 2020093208 A1 WO2020093208 A1 WO 2020093208A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
information
target application
target
wake
Prior art date
Application number
PCT/CN2018/114003
Other languages
French (fr)
Chinese (zh)
Inventor
陈岩
Original Assignee
深圳市欢太科技有限公司
Oppo广东移动通信有限公司
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 深圳市欢太科技有限公司, Oppo广东移动通信有限公司 filed Critical 深圳市欢太科技有限公司
Priority to PCT/CN2018/114003 priority Critical patent/WO2020093208A1/en
Priority to CN201880097679.7A priority patent/CN112703714B/en
Publication of WO2020093208A1 publication Critical patent/WO2020093208A1/en

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • This application relates to the field of computer technology, and in particular, to an application processing method, device, computer equipment, and storage medium.
  • the electronic device When the electronic device runs the application program, it will establish different application programs to achieve different application operations. Applications can be frozen, and frozen applications cannot be run. When the frozen application needs to communicate, it needs to wake up. But in the process of waking up, there are often abnormal applications.
  • An application processing method includes:
  • the target application identifier and target service information contained in the communication message are obtained, wherein the target application identifier is used to mark the target application program that receives the communication message, and the target service information is Mark the service that generates the communication message;
  • the target application program is subjected to wake-up processing.
  • An application processing device includes:
  • a communication information obtaining module configured to obtain a target application identifier and target service information contained in the communication message when a communication message is detected, wherein the target application identifier is used to mark a target application program that receives the communication message, The target service information is used to mark a service that generates the communication message;
  • a processing list obtaining module configured to obtain a processing list when it is detected that the target application is in a frozen state
  • a searching module configured to search processing information corresponding to the target application identifier and target service information from the processing list;
  • the wake-up module is configured to wake-up the target application program when the processing information is wake-up information.
  • a computer device includes a memory and a processor.
  • the memory stores a computer program.
  • the processor is caused to perform the following steps:
  • a target application identifier and target service information contained in the communication message are obtained, wherein the target application identifier is used to mark a target application program that receives the communication message, and the target service information is used to Mark the service that generates the communication message;
  • the target application program is subjected to wake-up processing.
  • a computer-readable storage medium on which a computer program is stored characterized in that, when the computer program is executed by a processor, the following steps are realized:
  • a target application identifier and target service information contained in the communication message are obtained, wherein the target application identifier is used to mark a target application program that receives the communication message, and the target service information is used to Mark the service that generates the communication message;
  • the target application program is subjected to wake-up processing.
  • the above application program processing method, device, computer equipment, and storage medium when a communication message is detected, acquire the target application identifier and target service information contained in the communication message, where the target application identifier is used to mark the target application program that receives the communication message ,
  • the target service information is used to mark the service that generates the communication message; when the target application is detected to be frozen, obtain the processing list; find the processing information corresponding to the target application ID and the target service information from the processing list; when the processing information is When awakening information, the target application is awakened.
  • the communication message is detected.
  • the processing list is obtained, and the processing information in the processing list is searched.
  • the target application Wake-up avoids the situation that after the interception of all communication messages, the application program cannot receive communication messages and generates an exception, thereby reducing the application's exception.
  • FIG. 1 is a schematic diagram of the internal structure of an electronic device in an embodiment
  • FIG. 3 is a flowchart of an application processing method in an embodiment
  • FIG. 4 is a schematic diagram of communication between a client application and a service application in an embodiment
  • FIG. 5 is a flowchart of an application processing method in yet another embodiment
  • FIG. 6 is a flowchart of an application processing method in yet another embodiment
  • FIG. 7 is a schematic diagram of an application processing flow in an embodiment
  • FIG. 8 is a structural block diagram of an application program device according to an embodiment
  • FIG. 9 is a structural block diagram of an application program device according to an embodiment
  • FIG. 10 is a block diagram of a partial structure of a mobile phone related to an electronic device provided by an embodiment of the present application.
  • first, second, etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element.
  • first client may be referred to as the second client, and similarly, the second client may be referred to as the first client. Both the first client and the second client are clients, but they are not the same client.
  • the electronic device includes a processor, memory, and display screen connected by a system bus.
  • the processor is used to provide computing and control capabilities to support the operation of the entire electronic device.
  • the memory is used to store data, programs, and / or instruction codes, etc.
  • the memory stores at least one computer program, and the computer program can be executed by the processor to implement the application program processing method for electronic devices provided in the embodiments of the present application .
  • the memory may include a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random-access memory (Random-Access-Memory, RAM).
  • the memory includes a non-volatile storage medium and internal memory.
  • the non-volatile storage medium stores an operating system and computer programs.
  • the computer program may be executed by the processor to implement an application program processing method provided by various embodiments of the present application.
  • the internal memory provides a cached operating environment for the operating system and computer programs in the non-volatile storage medium.
  • the display screen can be a touch screen, such as a capacitive screen or an electronic screen, used to display the interface information of the foreground application program, and can also be used to detect a touch operation acting on the display screen and generate corresponding instructions, such as the application of the front and background applications Switching instructions, etc.
  • the structure shown in FIG. 1 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied.
  • the specific electronic device may It includes more or fewer components than shown in the figure, or some components are combined, or have a different component arrangement.
  • the electronic device further includes a network interface connected through a system bus.
  • the network interface may be an Ethernet card or a wireless network card, etc., and is used to communicate with external electronic devices, for example, it may be used to communicate with a server.
  • FIG. 2 is a flowchart of an application processing method in an embodiment. As shown in FIG. 2, the application processing method includes steps 202 to 208. among them:
  • step 202 when a communication message is detected, the target application identifier and target service information contained in the communication message are obtained, wherein the target application identifier is used to mark the target application program that receives the communication message, and the target service information is used to mark the one that generated the communication message service.
  • the application program (Application, APP) is software written for an application purpose in the electronic device, and the electronic device can realize the demand service for the user through the application program. For example, users can play games through game applications, watch videos through video applications, and play music through music applications.
  • the target application refers to an application that receives communication messages.
  • the target service information may include a descriptor and a response code.
  • the descriptor is used to mark the server that generates the communication message
  • the response code is used to indicate the function called when the communication message is generated. Through the descriptor and the response code, it is possible to determine which service message is generated by which server.
  • the server and the application can send communication messages to each other.
  • the communication message sent by the server carries the target application identifier and target service information.
  • the server sends a communication message to the application.
  • the server When the server generates the communication message, it writes the application identification and service information of the application into the communication message.
  • the electronic device detects the communication message, it can use the application Identify the application that received the communication message.
  • the application When the application is woken up, it can process the communication message according to the service information.
  • Step 204 when it is detected that the target application is in a frozen state, a processing list is obtained.
  • the application program in the frozen state does not occupy processor resources to run, but still occupies resources such as memory and hardware of the electronic device.
  • the application can be frozen, and the application in the frozen state is not closed, but it is not run temporarily.
  • the processing list stores reference application identification, reference service information and corresponding processing information.
  • the resource priority and limit management module in the local framework layer of the electronic device can mark the state of the application, and by reading the state mark of the application, you can know whether the application is in a frozen state.
  • the resource priority and limit management module will change the state flag of the application accordingly, so as to control the frozen state of the application through the corresponding state flag.
  • the communication message when it is detected that the target application is in a running state, the communication message is not intercepted, so that the communication message reaches the target application. After the target application receives the communication message, it can process the communication message.
  • Step 206 Search processing information corresponding to the target application identifier and the target service information from the processing list.
  • the processing information refers to information for processing the target application.
  • the processing information may be "wake up", and the target application program is awakened according to the processing information "wake up”.
  • the processing list includes one or more reference application identifiers and reference service information
  • the reference service information may correspond to one or more reference application identifiers.
  • Each reference service information has corresponding processing information.
  • the processing information of the same reference application identifier in different reference service information may be the same or different.
  • the electronic device may match the target application ID and the target service information with the reference application ID and the reference service information in the processing list respectively, and then obtain the processing information corresponding to the matching reference application ID and the reference service information as the target application ID and Processing information corresponding to the target service information.
  • Step 208 when the processing information is wake-up information, the target application program is wake-up processed.
  • the target application program is processed according to the processing information.
  • the processing information is wake-up information
  • the target application is awakened, and the communication message is sent to the awakened target application.
  • the processing information is non-wake-up information
  • the communication message is intercepted, so that the target application continues to be in a frozen state.
  • the above application program processing method, device, computer equipment, and storage medium when a communication message is detected, acquire the target application identifier and target service information contained in the communication message, where the target application identifier is used to mark the target application program that receives the communication message ,
  • the target service information is used to mark the service that generates the communication message; when the target application is detected to be frozen, obtain the processing list; find the processing information corresponding to the target application ID and the target service information from the processing list; when the processing information is When awakening information, the target application is awakened.
  • the communication message is detected.
  • the processing list is obtained, and the processing information in the processing list is searched.
  • the target application Wake-up avoids the situation that after the interception of all communication messages, the application program cannot receive communication messages and generates an exception, thereby reducing the application's exception.
  • searching the wake-up information corresponding to the target application identifier and the target service information from the processing list includes: matching the target service information with the reference service information in the processing list to obtain at least one reference corresponding to the reference service information Application identifier; when the target application identifier matches at least one reference application identifier, find a matching application identifier matching the target application identifier from the at least one reference application identifier to obtain wake-up information corresponding to the matching application identifier.
  • the matching application identifier refers to a reference application identifier that matches the target application identifier.
  • the target application identifier corresponding to the target service information does not match at least one reference application identifier, it means that the processing list does not include the application identifier corresponding to the target service information and the target application identifier, that is, there is no matching application in the processing list Mark, the communication message is not intercepted.
  • the wake-up information corresponding to the matching application identifier is searched for.
  • the application program when searching for at least one reference application identifier corresponding to the target service information in the processing list, and then matching the target application identifier with at least one reference application identifier, a matching application identifier is obtained, and then searching for the corresponding application identifier
  • the application program can be processed according to different processing information, which avoids waking up all communicating application programs and reduces power consumption of the electronic device.
  • the target application when the processing information is wake-up information, the target application is wake-up processed, including:
  • Step 302 When the processing information is wake-up information, obtain the number of running candidate application programs.
  • the candidate application program refers to an application program running in the electronic device.
  • the running application program includes an application program running in the foreground and an application program running in the background.
  • the application running in the foreground is the application that the user is using
  • the application running in the background is the application running in the background of the electronic device when the user is not using it.
  • the running application needs to occupy some resources, such as processor resources and memory.
  • Step 304 When the number of running candidate applications is greater than the number threshold, obtain the running information of each candidate application.
  • the number threshold can be set by the user in advance, or can be set by other methods, which is not limited herein.
  • Step 306 Obtain the frozen application from the candidate applications according to the running information.
  • the running information refers to the related information of the application in the running process.
  • the frozen application refers to an application that meets the freezing conditions among the candidate applications.
  • the freezing parameter threshold may be set. When the freezing parameter obtained according to the running information of the application is greater than the parameter threshold, the freezing condition is met, and the application meeting the freezing condition is regarded as the freezing application.
  • Step 308 freeze the frozen application and wake up the target application.
  • the target application can be awakened by releasing one step of resources first to ensure the target application There are enough resources to run. Specifically, after obtaining the frozen application program from the candidate application program according to the running information, the frozen application program is first frozen, a part of resources are released, and then the target application program is woken up.
  • the running information of each candidate application is obtained, and the frozen applications are frozen according to the running information, which increases the time for the target application to wake up and reduces Power consumption of electronic devices.
  • the running information may include an application level and a background running time
  • freezing the application among running applications according to the running information includes: obtaining freezing parameters of each candidate application according to the application level and the background running time, Candidate applications whose freezing parameters are greater than the parameter threshold are regarded as freezing applications.
  • the application level refers to the priority level of the application program, which is set according to the importance of the application program to the user.
  • the background running time refers to the length of time the application is running in the background, that is, the length of time the user has not used the application while the application is running.
  • the freeze parameter refers to a parameter used to indicate that the application is frozen.
  • the parameter threshold can be set by the user, or can be set in other ways, which is not limited here.
  • the freezing parameter may be obtained by weighting the application level of the running information and the background running time.
  • the calculation formula of weighting can be set by the user, or can be set by other methods, which is not limited herein.
  • the application level of the A application is level 1, and the running time in the background is 3 hours.
  • the application level of the B application is three levels, and the running time in the background is 4 hours.
  • the weight value corresponding to the first level of the application level is 0.5, and the weight value corresponding to the third level of the application level is 0.2.
  • the running time in the background is 1 hour, and the corresponding weight is 0.1. Each additional hour of background running time increases the corresponding weight by 0.1.
  • the parameter threshold is 60
  • the freezing parameter 60 of the B application is equal to the parameter threshold
  • the B application is not regarded as a frozen application
  • the freezing parameter 80 of the A application is greater than the parameter threshold 60
  • the A application is regarded as a frozen application.
  • the freezing parameters of each candidate application are calculated according to the application level of the running information and the background running time.
  • the freezing parameter is greater than the parameter threshold, the candidate application is frozen as a frozen application, which can be more accurate Freeze candidate applications that are not important or have not been used for a long time.
  • FIG. 4 is a schematic diagram of communication between a server and a third-party application in an embodiment.
  • the server 402 sends a communication message to the third-party application 408, it will first send the communication message to the Linux kernel 404.
  • the Linux kernel 404 obtains the target application identifier included in the communication message And the target service information, and then look up the third-party application 408 according to the target application identifier. If the Linux kernel 404 detects that the third-party application 408 is in a frozen state, it obtains a processing list stored in the Native layer 406. Look up the processing information corresponding to the target application identifier and the target service information from the processing list. When the processing information is wake-up information, the third-party application 408 is woken up.
  • the target application can receive and process the communication message.
  • the processing information is wake-up information
  • the target application is woken up, the above method may further include:
  • Step 502 Obtain the total resource occupancy rate of the electronic device.
  • Resources refer to the software or hardware resources that the electronic device must use when processing application events, such as the electronic device CPU (Central Processing Unit), memory (Memory), hardware, network resources, IO (Input-Output , Input and output), etc.
  • Resource occupancy rate refers to the proportion of resources occupied by electronic devices, generally refers to the ratio of occupied resources to all resources, which can be expressed as a percentage. For example, the total memory of the device is 128GB, and the memory that has been occupied is 56GB, then the resource occupancy rate of the device can be expressed as the memory occupancy rate, and the obtained memory occupancy rate is 43.75%.
  • Step 504 When the total resource occupancy rate exceeds the first occupancy threshold, control the target application to be awakened to enter a resource limit state; wherein, the resource occupancy rate of the application in the resource limit state to the electronic device is less than the second Occupancy threshold, the first occupancy threshold is greater than the second occupancy threshold.
  • the resource limitation state refers to a state that limits the resources of the electronic device used by the application at runtime.
  • the resource occupancy rate during the running process cannot exceed the second occupancy rate threshold, so that the target application program can control the use of electronic device resources, thereby saving the electronic device resources. For example, restricting the CPU usage of the target application while it is running cannot exceed 10%.
  • Resource restriction level refers to the degree of restriction on the resources used by the application. Obtain the application level corresponding to the target application, and obtain the corresponding resource restriction level according to the application level; control the awakened target application to enter the resource restriction state corresponding to the resource restriction level.
  • a correspondence between the total resource occupancy rate and the resource limitation level may also be established.
  • the resource limit level is obtained according to the total resource occupancy rate, and then the awakened target application is controlled to enter the resource limit state corresponding to the resource limit level.
  • the first occupancy threshold is 50%
  • the total resource occupancy rate is divided into three occupancies: 50% to 60%, 60% to 80%, and 80% to 100%.
  • Level and then correspond to the three levels of light resource restriction level, ordinary resource restriction level and deep resource restriction level respectively, and the corresponding resource restriction level can be obtained according to the total resource occupancy rate.
  • the resource restriction level can also be obtained in combination with the total resource occupancy rate and the application level of the target application, which is not limited herein.
  • the method when the processing information is wake-up information, after the target application is wake-up processed, the method may further include:
  • Step 602 Start timing from the moment when the target application is awakened.
  • the electronic device When the target application is woken up, the electronic device starts a timer, and then starts counting through the timer. If multiple target applications are woken up at the same time, a corresponding timer can be defined for each target application, and each target application can be timed by the corresponding timer. Specifically, the correspondence between the application ID of the target application and the timing ID of the timer can be established, so that after the target application is woken up, the timer can be found and started by the timing ID corresponding to the application ID to start timing.
  • the system can predefine a timer. When it detects that the target application is woken up, it can find the timer corresponding to the application ID according to the pre-established correspondence, and pass timer.setBase (SystemClock.elapsedRealtime () ) Clear the timer, and then start the timer through the timer.start () function to start timing.
  • the Android operating system is taken as an example to describe the application processing method, but the application processing method of this application is not limited to being implemented in the Android system, but can also be applied to IOS (IPhone Operating System), Saipan, Windows, MAC OS (Macintosh Operating System) and other operating systems.
  • Step 604 When the time duration exceeds the time threshold, freeze the target application.
  • the time when the target application is awakened starts to count, and the time duration represents the time from the time when the target application is awakened to the current time.
  • the duration threshold can be defined in advance, and when the timing duration exceeds the duration threshold, the target application is re-frozen.
  • the duration threshold is generally set to a relatively small threshold, so as to avoid that the target application is always in a running state and consumes resources of the electronic device. It can be understood that different target applications may use the same duration threshold or different duration thresholds, which is not limited herein.
  • the duration threshold may be set according to how often the target application receives communication messages. Specifically, the frequency of receiving the communication message received by the awakened target application program is obtained, and the corresponding duration threshold is obtained according to the frequency of reception. For example, when the reception frequency is low, setting the duration threshold to a smaller value can automatically freeze the target application when the target application is relatively idle to avoid resource consumption of the electronic device.
  • FIG. 7 is a schematic diagram of an application process flow in an embodiment.
  • a processing list is obtained. Find the processing information from the processing list through the target application ID and target service information contained in the communication message.
  • the processing information is wake-up information
  • the target application is wake-up processed, and the wake-up application is controlled to enter a resource restriction state.
  • the wake-up duration exceeds the duration threshold, freeze the target application.
  • the target application is in a frozen state, the target application does not run, and the resource occupancy rate corresponding to the target application does not change.
  • the target application can run, but only some of the resources of the device are occupied during the running process.
  • the application processing method provided in the above embodiment detects whether the corresponding target application is in a frozen state according to the target application identifier in the communication message when the communication message is detected.
  • the target application is frozen, get the processing list.
  • the processing information is searched from the processing list through the target application ID and the target service information contained in the communication message.
  • the processing information is wake-up information, the frozen application is frozen according to the running information of the candidate application, and the target application is woken up. In this way, the application programs can be filtered by processing the list, and the running candidate application programs can be controlled at the same time to prevent too many running application programs from occupying too many resources of the electronic device, thereby reducing power consumption of the electronic device.
  • steps in the flowcharts of FIGS. 2, 3, 5, and 6 are displayed in order according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless clearly stated in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least some of the steps in FIGS. 2, 3, 5, and 6 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. These The execution order of the sub-steps or stages is not necessarily sequential, but may be executed in turn or alternately with at least a part of other steps or sub-steps or stages of other steps.
  • an application processing apparatus including: a communication information acquisition module 802, a processing list acquisition module 804, a search module 806, and a wake-up module 808, where:
  • the communication information obtaining module 802 is used to obtain the target application identifier and the target service information contained in the communication message when the communication message is detected, wherein the target application identifier is used to mark the target application program receiving the communication message, and the target service information is used to Identify the service that generates the communication message.
  • the processing list obtaining module 804 is configured to obtain a processing list when it is detected that the target application is in a frozen state.
  • the searching module 806 is used for searching processing information corresponding to the target application identifier and the target service information from the processing list.
  • the wakeup module 808 is configured to wake up the target application program when the processing information is wakeup information.
  • the above application program processing method, device, computer equipment, and storage medium when a communication message is detected, acquire the target application identifier and target service information contained in the communication message, where the target application identifier is used to mark the target application program that receives the communication message ,
  • the target service information is used to mark the service that generates the communication message; when the target application is detected to be frozen, obtain the processing list; find the processing information corresponding to the target application ID and the target service information from the processing list; when the processing information is When awakening information, the target application is awakened.
  • the communication message is detected.
  • the processing list is obtained, and the processing information in the processing list is searched.
  • the target application Wake-up avoids the situation that after the interception of all communication messages, the application program cannot receive communication messages and generates an exception, thereby reducing the application's exception.
  • an application processing apparatus including: a communication information acquisition module 902, a processing list acquisition module 904, a search module 906, a wake-up module 908, a resource restriction module 910, and a freeze module 912, where:
  • the communication information obtaining module 902 is used to obtain the target application identifier and the target service information contained in the communication message when the communication message is detected, wherein the target application identifier is used to mark the target application program receiving the communication message, and the target service information is used to Identify the service that generates the communication message.
  • the processing list obtaining module 904 is configured to obtain a processing list when it is detected that the target application is in a frozen state.
  • the searching module 906 is used for searching processing information corresponding to the target application identifier and the target service information from the processing list.
  • the wakeup module 908 is configured to wake up the target application program when the processing information is wakeup information.
  • the resource restriction module 910 is used to obtain the total resource occupancy rate of the electronic device; when the total resource occupancy rate exceeds the first occupancy threshold, the target application that is woken up is controlled to enter a resource restriction state; wherein, the application in the resource restriction state In operation, the resource occupancy rate of the electronic device is less than the second occupancy rate threshold, and the first occupancy rate threshold is greater than the second occupancy rate threshold.
  • the freezing module 912 is used to start timing from the moment when the target application is awakened; when the timing duration exceeds the duration threshold, the target application is frozen.
  • the above application program processing method, device, computer equipment, and storage medium detect communication messages, and when the target application corresponding to the communication message is in a frozen state, obtain a processing list, search for processing information in the processing list, and when the processing information is wake-up information , Wake up the target application.
  • the target application After the target application is awakened, the total resource occupancy rate of the electronic device is obtained, and the awakened target application program is controlled to enter the resource limitation state according to the total resource occupancy rate.
  • the target application is awakened, when the time duration after the target application is awakened exceeds the time threshold, the target application is frozen, which avoids awakening all the communication applications and reduces the power consumption of the electronic device.
  • the above-mentioned search module 906 is further used to match the target service information with the reference service information in the processing list to obtain at least one reference application identifier corresponding to the reference service information; when the target application identifier and at least one reference application identifier When matching, the matching application identifier matching the target application identifier is searched from at least one reference application identifier to obtain the wake-up information corresponding to the matching application identifier.
  • the above wake-up module 908 is further used to obtain the number of running candidate applications when the processing information is wake-up information; when the number of running candidate applications is greater than the number threshold, obtain each candidate application According to the running information, obtain the frozen application from the candidate applications; freeze the frozen application and wake up the target application.
  • the wake-up module 908 is further used to obtain the freezing parameters of each candidate application according to the application level and the background running time, and use the candidate application whose freezing parameter is greater than the parameter threshold as the freezing application.
  • the above freezing module 912 is further used to obtain the frequency of receiving the communication message received by the awakened target application, and obtain the corresponding duration threshold according to the frequency of reception.
  • each module in the above-mentioned application processing device is for illustration only. In other embodiments, the application processing device may be divided into different modules as needed to complete all or part of the functions of the above-mentioned application processing device.
  • Each module in the above application program processing device may be implemented in whole or in part by software, hardware, or a combination thereof.
  • the above modules may be embedded in the hardware or independent of the processor in the computer device, or may be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
  • each module in the application program processing apparatus may be in the form of a computer program.
  • the computer program can be run on a terminal or a server.
  • the program module composed of the computer program may be stored in the memory of the terminal or the server.
  • An embodiment of the present application also provides an electronic device. As shown in FIG. 10, for ease of description, only parts related to the embodiments of the present application are shown, and specific technical details are not disclosed, please refer to the method part of the embodiments of the present application.
  • the electronic device may be any terminal device including a mobile phone, tablet computer, PDA (Personal Digital Assistant), POS (Point of Sales), in-vehicle computer, wearable device, etc. Taking the electronic device as a mobile phone for example :
  • the mobile phone includes: a radio frequency (Radio Frequency) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a sensor 1050, an audio circuit 1060, a wireless fidelity (WiFi) module 1070, a processor 1080 , And power supply 1090 and other components.
  • a radio frequency (Radio Frequency) circuit 1010 the mobile phone includes: a radio frequency (Radio Frequency) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a sensor 1050, an audio circuit 1060, a wireless fidelity (WiFi) module 1070, a processor 1080 , And power supply 1090 and other components.
  • WiFi wireless fidelity
  • FIG. 10 does not constitute a limitation on the mobile phone, and may include more or less components than those shown in the figure, or a combination of certain components, or a different component arrangement.
  • the RF circuit 1010 can be used to receive and send signals during sending and receiving information or during a call. It can receive the downlink information of the base station and process it to the processor 1080; it can also send uplink data to the base station.
  • RF circuits include but are not limited to antennas, at least one amplifier, transceiver, coupler, low noise amplifier (Low Noise Amplifier, LNA), duplexer, and so on.
  • the RF circuit 1010 can also communicate with the network and other devices through wireless communication.
  • the above wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile (GSM), General Packet Radio Service (GPRS), and Code Division Multiple Access (Code Division) Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), e-mail, Short Message Service (SMS), etc.
  • GSM Global System of Mobile
  • GPRS General Packet Radio Service
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • SMS Short Message Service
  • the memory 1020 may be used to store software programs and modules.
  • the processor 1080 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 1020.
  • the memory 1020 may mainly include a program storage area and a data storage area, where the program storage area may store an operating system and at least one function-required application program (such as a sound playback function application program, an image playback function application program, etc.), etc.
  • the data storage area can store data (such as audio data, address book, etc.) created according to the use of the mobile phone.
  • the memory 1020 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
  • the input unit 1030 may be used to receive input numeric or character information, and generate key signal input related to user settings and function control of the mobile phone 1000.
  • the input unit 1030 may include a touch panel 1031 and other input devices 1032.
  • the touch panel 1031 also known as a touch screen, can collect user's touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc. on or near the touch panel 1031 Operation), and drive the corresponding connection device according to the preset program.
  • the touch panel 1031 may include a touch detection device and a touch controller.
  • the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into contact coordinates, and then sends To the processor 1080, and can receive the commands sent by the processor 1080 and execute them.
  • the touch panel 1031 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 1030 may also include other input devices 1032.
  • other input devices 1032 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), and the like.
  • the display unit 1040 may be used to display information input by the user or information provided to the user and various menus of the mobile phone.
  • the display unit 1040 may include a display panel 1041.
  • the display panel 1041 may be configured in the form of a liquid crystal display (Liquid Crystal) (LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), or the like.
  • the touch panel 1031 may cover the display panel 1041, and when the touch panel 1031 detects a touch operation on or near it, it is transmitted to the processor 1080 to determine the type of touch event, and then the processor 1080 according to The type of touch event provides a corresponding visual output on the display panel 1041.
  • the touch panel 1031 and the display panel 1041 are implemented as two independent components to realize the input and input functions of the mobile phone, in some embodiments, the touch panel 1031 and the display panel 1041 may be integrated to Realize the input and output functions of the mobile phone.
  • the mobile phone 1000 may further include at least one sensor 1050, such as a light sensor, a motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1041 according to the brightness of the ambient light, and the proximity sensor may close the display panel 1041 and / or when the mobile phone moves to the ear Or backlight.
  • the motion sensor may include an acceleration sensor. The acceleration sensor can detect the magnitude of acceleration in various directions, and can detect the magnitude and direction of gravity when at rest. Pedometer, percussion), etc.
  • the mobile phone can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor and so on.
  • the audio circuit 1060, the speaker 1061, and the microphone 1062 may provide an audio interface between the user and the mobile phone.
  • the audio circuit 1060 can transmit the received audio data converted electrical signal to the speaker 1061, which converts the speaker 1061 into a sound signal output; on the other hand, the microphone 1062 converts the collected sound signal into an electrical signal, which is converted by the audio circuit 1060 After receiving, it is converted into audio data, and then processed by the audio data output processor 1080, and then sent to another mobile phone through the RF circuit 1010, or the audio data is output to the memory 1020 for subsequent processing.
  • WiFi is a short-range wireless transmission technology. Mobile phones can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 1070. It provides users with wireless broadband Internet access.
  • FIG. 10 shows the WiFi module 1070, it can be understood that it is not a necessary component of the mobile phone 1000, and may be omitted as needed.
  • the processor 1080 is the control center of the mobile phone, and uses various interfaces and lines to connect various parts of the entire mobile phone, by running or executing software programs and / or modules stored in the memory 1020, and calling data stored in the memory 1020, the Various functions and processing data of the mobile phone, so as to monitor the mobile phone as a whole.
  • the processor 1080 may include one or more processing units.
  • the processor 1080 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, user interface, application programs, and the like; the modem processor mainly processes wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 1080.
  • the mobile phone 1000 further includes a power supply 1090 (such as a battery) for powering various components.
  • a power supply 1090 (such as a battery) for powering various components.
  • the power supply can be logically connected to the processor 1080 through a power management system, so as to realize functions such as charging, discharging, and power management through the power management system.
  • the mobile phone 1000 may further include a camera, a Bluetooth module, and the like.
  • the processor 1080 included in the electronic device implements the steps of the application processing method when the computer program stored on the memory is executed.
  • the embodiments of the present application also provide a computer-readable storage medium.
  • One or more non-volatile computer-readable storage media containing computer-executable instructions, when the computer-executable instructions are executed by one or more processors, causing the processors to perform steps of an application processing method.
  • a computer program product containing instructions that, when run on a computer, causes the computer to execute an application processing method.
  • Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM), which acts as external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR) SDRAM, enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDR double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous Link (Synchlink) DRAM
  • Rambus direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Abstract

An application processing method, comprising: when a communication message is detected, obtaining a target application identifier and target service information comprised in the communication message, wherein the target application identifier is used for identifying a target application which receives the communication message, and the target service information is used for identifying a service which generates the communication message (202); when it is detected that the target application is in a frozen state, obtaining a processing list (204); searching the processing list for processing information corresponding to the target application identifier and the target service information (206); and when the processing information is wakeup information, performing wakeup processing on the target application (208).

Description

应用程序处理方法和装置、计算机设备、计算机可读存储介质Application program processing method and device, computer equipment, and computer readable storage medium 技术领域Technical field
本申请涉及计算机技术领域,特别是涉及一种应用程序处理方法、装置、计算机设备和存储介质。This application relates to the field of computer technology, and in particular, to an application processing method, device, computer equipment, and storage medium.
背景技术Background technique
电子设备在运行应用程序的时候,会建立不同的应用程序来实现不同的应用操作。应用程序可以被冻结,被冻结的应用程序不能运行。当冻结的应用程序需要通信时,需要进行唤醒。但在唤醒的过程中,经常出现应用程序异常的情况。When the electronic device runs the application program, it will establish different application programs to achieve different application operations. Applications can be frozen, and frozen applications cannot be run. When the frozen application needs to communicate, it needs to wake up. But in the process of waking up, there are often abnormal applications.
发明内容Summary of the invention
基于此,有必要针对上述技术问题,提供一种能够降低电子设备功耗的应用程序处理方法、装置、计算机设备和存储介质。Based on this, it is necessary to provide an application processing method, apparatus, computer device, and storage medium that can reduce power consumption of electronic devices in view of the above technical problems.
一种应用程序处理方法,所述方法包括:An application processing method, the method includes:
当检测到通信消息时,获取所述通信消息中包含的目标应用标识和目标服务信息,其中,所述目标应用标识用于标示接收所述通信消息的目标应用程序,所述目标服务信息用于标示生成所述通信消息的服务;When a communication message is detected, the target application identifier and target service information contained in the communication message are obtained, wherein the target application identifier is used to mark the target application program that receives the communication message, and the target service information is Mark the service that generates the communication message;
当检测到所述目标应用程序处于冻结状态时,获取处理列表;When it is detected that the target application is in a frozen state, obtain a processing list;
从所述处理列表中查找与所述目标应用标识和目标服务信息对应的处理信息;Searching processing information corresponding to the target application identifier and target service information from the processing list;
当所述处理信息为唤醒信息时,将所述目标应用程序进行唤醒处理。When the processing information is wake-up information, the target application program is subjected to wake-up processing.
一种应用程序处理装置,所述装置包括:An application processing device, the device includes:
通信信息获取模块,用于当检测到通信消息时,获取所述通信消息中包含的目标应用标识和目标服务信息,其中,所述目标应用标识用于标示接收所述通信消息的目标应用程序,所述目标服务信息用于标示生成所述通信消息的服务;A communication information obtaining module, configured to obtain a target application identifier and target service information contained in the communication message when a communication message is detected, wherein the target application identifier is used to mark a target application program that receives the communication message, The target service information is used to mark a service that generates the communication message;
处理列表获取模块,用于当检测到所述目标应用程序处于冻结状态时,获取处理列表;A processing list obtaining module, configured to obtain a processing list when it is detected that the target application is in a frozen state;
查找模块,用于从所述处理列表中查找与所述目标应用标识和目标服务信息对应的处理信息;A searching module, configured to search processing information corresponding to the target application identifier and target service information from the processing list;
唤醒模块,用于当所述处理信息为唤醒信息时,将所述目标应用程序进行唤醒处理。The wake-up module is configured to wake-up the target application program when the processing information is wake-up information.
一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如下步骤:A computer device includes a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor is caused to perform the following steps:
当检测到通信消息时,获取所述通信消息中包含的目标应用标识和目标服务信息,其中,所述目标应用标识用于标示接收所述通信消息的目标应用程序,所述目标服务信息用于标示生成所述通信消息的服务;When a communication message is detected, a target application identifier and target service information contained in the communication message are obtained, wherein the target application identifier is used to mark a target application program that receives the communication message, and the target service information is used to Mark the service that generates the communication message;
当检测到所述目标应用程序处于冻结状态时,获取处理列表;When it is detected that the target application is in a frozen state, obtain a processing list;
从所述处理列表中查找与所述目标应用标识和目标服务信息对应的处理信息;Searching processing information corresponding to the target application identifier and target service information from the processing list;
当所述处理信息为唤醒信息时,将所述目标应用程序进行唤醒处理。When the processing information is wake-up information, the target application program is subjected to wake-up processing.
一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如下步骤:A computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the following steps are realized:
当检测到通信消息时,获取所述通信消息中包含的目标应用标识和目标服务信息,其中,所述目标应用标识用于标示接收所述通信消息的目标应用程序,所述目标服务信息用于标示生成所述通信消息的服务;When a communication message is detected, a target application identifier and target service information contained in the communication message are obtained, wherein the target application identifier is used to mark a target application program that receives the communication message, and the target service information is used to Mark the service that generates the communication message;
当检测到所述目标应用程序处于冻结状态时,获取处理列表;When it is detected that the target application is in a frozen state, obtain a processing list;
从所述处理列表中查找与所述目标应用标识和目标服务信息对应的处理信息;Searching processing information corresponding to the target application identifier and target service information from the processing list;
当所述处理信息为唤醒信息时,将所述目标应用程序进行唤醒处理。When the processing information is wake-up information, the target application program is subjected to wake-up processing.
上述应用程序处理方法、装置、计算机设备和存储介质,当检测到通信消息时,获取通信消息中包含的目标应用标识和目标服务信息,其中,目标应用标识用于标示接收通信消息的目标应用程序,目标服务信息用于标示生成通信消息的服务;当检测到目标应用程序处于冻结状态时,获取处理列表;从处理列表中查找与目标应用标识和目标服务信息对应的处理信息;当处理信息为唤醒信息时,将目标应用程序进行唤醒处理。上述应用程序处理的方式中,检测通信消息,当通信消息对应的目标应用程序处于冻结状态时,则获取处理列表,查 找处理列表中的处理信息,当处理信息为唤醒信息时,将目标应用程序唤醒,避免了将所有通信消息拦截后,导致应用程序接收不到通信消息而产生异常的情况,从而减少了应用程序的异常。The above application program processing method, device, computer equipment, and storage medium, when a communication message is detected, acquire the target application identifier and target service information contained in the communication message, where the target application identifier is used to mark the target application program that receives the communication message , The target service information is used to mark the service that generates the communication message; when the target application is detected to be frozen, obtain the processing list; find the processing information corresponding to the target application ID and the target service information from the processing list; when the processing information is When awakening information, the target application is awakened. In the above application processing method, the communication message is detected. When the target application corresponding to the communication message is in a frozen state, the processing list is obtained, and the processing information in the processing list is searched. When the processing information is wake-up information, the target application Wake-up avoids the situation that after the interception of all communication messages, the application program cannot receive communication messages and generates an exception, thereby reducing the application's exception.
附图说明BRIEF DESCRIPTION
图1为一个实施例中电子设备的内部结构示意图;1 is a schematic diagram of the internal structure of an electronic device in an embodiment;
图2为一个实施例中应用程序处理方法的流程图;2 is a flowchart of an application processing method in an embodiment;
图3为一个实施例中应用程序处理方法的流程图;3 is a flowchart of an application processing method in an embodiment;
图4为一个实施例中客户端应用程序与服务应用程序进行通信的示意图;4 is a schematic diagram of communication between a client application and a service application in an embodiment;
图5为又一个实施例中应用程序处理方法的流程图;FIG. 5 is a flowchart of an application processing method in yet another embodiment;
图6为又一个实施例中应用程序处理方法的流程图;6 is a flowchart of an application processing method in yet another embodiment;
图7为一个实施例中应用程序处理流程的示意图;7 is a schematic diagram of an application processing flow in an embodiment;
图8为一个实施例的应用程序装置的结构框图;8 is a structural block diagram of an application program device according to an embodiment;
图9为一个实施例的应用程序装置的结构框图;9 is a structural block diagram of an application program device according to an embodiment;
图10为与本申请实施例提供的电子设备相关的手机的部分结构的框图。10 is a block diagram of a partial structure of a mobile phone related to an electronic device provided by an embodiment of the present application.
具体实施方式detailed description
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clear, the present application will be described in further detail in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一客户端称为第二客户端,且类似地,可将第二客户端称为第一客户端。第一客户端和第二客户端两者都是客户端,但其不是同一客户端。It can be understood that the terms “first”, “second”, etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element. For example, without departing from the scope of the present application, the first client may be referred to as the second client, and similarly, the second client may be referred to as the first client. Both the first client and the second client are clients, but they are not the same client.
如图1所示,提供了一种电子设备的内部结构示意图。该电子设备包括通过系统总线连接的处理器、存储器和显示屏。其中,该处理器用于提供计算和控制能力,支撑整个电子设备的运行。存储器用于存储数据、程序、和/或指令代码等,存储器上存储至少一个计算机程序,该计算机程序可被处理器执行,以实现本申请实施例中提供的适用于电子设备的应用程 序处理方法。存储器可包括磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random-Access-Memory,RAM)等。例如,在一个实施例中,存储器包括非易失性存储介质及内存储器。非易失性存储介质存储有操作系统和计算机程序。该计算机程序可被处理器所执行,以用于实现本申请各个实施例所提供的一种应用程序处理方法。内存储器为非易失性存储介质中的操作系统和计算机程序提供高速缓存的运行环境。显示屏可以是触摸屏,比如为电容屏或电子屏,用于显示前台应用程序的界面信息,还可以被用于检测作用于该显示屏的触摸操作,生成相应的指令,比如进行前后台应用的切换指令等。As shown in FIG. 1, a schematic diagram of an internal structure of an electronic device is provided. The electronic device includes a processor, memory, and display screen connected by a system bus. Among them, the processor is used to provide computing and control capabilities to support the operation of the entire electronic device. The memory is used to store data, programs, and / or instruction codes, etc. The memory stores at least one computer program, and the computer program can be executed by the processor to implement the application program processing method for electronic devices provided in the embodiments of the present application . The memory may include a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random-access memory (Random-Access-Memory, RAM). For example, in one embodiment, the memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The computer program may be executed by the processor to implement an application program processing method provided by various embodiments of the present application. The internal memory provides a cached operating environment for the operating system and computer programs in the non-volatile storage medium. The display screen can be a touch screen, such as a capacitive screen or an electronic screen, used to display the interface information of the foreground application program, and can also be used to detect a touch operation acting on the display screen and generate corresponding instructions, such as the application of the front and background applications Switching instructions, etc.
本领域技术人员可以理解,图1中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的电子设备的限定,具体的电子设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。如该电子设备还包括通过系统总线连接的网络接口,网络接口可以是以太网卡或无线网卡等,用于与外部的电子设备进行通信,比如可用于同服务器进行通信。Those skilled in the art may understand that the structure shown in FIG. 1 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied. The specific electronic device may It includes more or fewer components than shown in the figure, or some components are combined, or have a different component arrangement. For example, the electronic device further includes a network interface connected through a system bus. The network interface may be an Ethernet card or a wireless network card, etc., and is used to communicate with external electronic devices, for example, it may be used to communicate with a server.
图2为一个实施例中应用程序处理方法的流程图。如图2所示,该应用程序处理方法包括步骤202至步骤208。其中:FIG. 2 is a flowchart of an application processing method in an embodiment. As shown in FIG. 2, the application processing method includes steps 202 to 208. among them:
步骤202,当检测到通信消息时,获取通信消息中包含的目标应用标识和目标服务信息,其中,目标应用标识用于标示接收通信消息的目标应用程序,目标服务信息用于标示生成通信消息的服务。In step 202, when a communication message is detected, the target application identifier and target service information contained in the communication message are obtained, wherein the target application identifier is used to mark the target application program that receives the communication message, and the target service information is used to mark the one that generated the communication message service.
其中,应用程序(Application,APP)是电子设备中针对某种应用目的所撰写的软体,电子设备可以通过应用程序实现对用户的需求服务。例如,用户可以通过游戏类应用程序玩游戏,也可以通过视频类应用程序看视频,还可以通过音乐类应用程序播放音乐等。目标应用程序指的是接收通信消息的应用程序。Among them, the application program (Application, APP) is software written for an application purpose in the electronic device, and the electronic device can realize the demand service for the user through the application program. For example, users can play games through game applications, watch videos through video applications, and play music through music applications. The target application refers to an application that receives communication messages.
目标服务信息可以包括描述符和响应码。其中,描述符用于标示生成通信消息的服务端,响应码用于表示生成通信消息时调用的函数。通过描述符和响应码就可以确定具体是哪一个服务端的哪一个服务生成的通信消息。The target service information may include a descriptor and a response code. Among them, the descriptor is used to mark the server that generates the communication message, and the response code is used to indicate the function called when the communication message is generated. Through the descriptor and the response code, it is possible to determine which service message is generated by which server.
服务端和应用程序之间可以相互发送通信消息,服务端发送的通信消息中会携带目标应用标识和目标服务信息。例如,服务端向应用程序发送通信消息,服务端在生成通信消息的时候,会将应用程序的应用标识和服务信息写入通信消息中,电子设备在检测到通信消息的 时候,就可以根据应用标识查找接收该通信消息的应用程序。当应用程序被唤醒后,可以根据服务信息对通信消息进行处理。The server and the application can send communication messages to each other. The communication message sent by the server carries the target application identifier and target service information. For example, the server sends a communication message to the application. When the server generates the communication message, it writes the application identification and service information of the application into the communication message. When the electronic device detects the communication message, it can use the application Identify the application that received the communication message. When the application is woken up, it can process the communication message according to the service information.
步骤204,当检测到目标应用程序处于冻结状态时,获取处理列表。 Step 204, when it is detected that the target application is in a frozen state, a processing list is obtained.
其中,处于冻结状态的应用程序不占用处理器资源进行运行,但是仍然占用电子设备的内存和硬件等资源。应用程序可以被冻结,处于冻结状态的应用程序并没有被关闭,只是暂时不运行。处理列表中存储着参考应用标识、参考服务信息和对应的处理信息。Among them, the application program in the frozen state does not occupy processor resources to run, but still occupies resources such as memory and hardware of the electronic device. The application can be frozen, and the application in the frozen state is not closed, but it is not run temporarily. The processing list stores reference application identification, reference service information and corresponding processing information.
具体地,电子设备的本地框架层中的资源优先级和限制管理模块可以对应用程序的状态进行标记,通过读取应用程序的状态标记就可以知道应用程序是否处于冻结状态。当应用程序被唤醒后,资源优先级和限制管理模块会相应地更改应用程序的状态标记,从而通过对应的状态标记来实现对应用程序冻结状态的管控。Specifically, the resource priority and limit management module in the local framework layer of the electronic device can mark the state of the application, and by reading the state mark of the application, you can know whether the application is in a frozen state. When the application is awakened, the resource priority and limit management module will change the state flag of the application accordingly, so as to control the frozen state of the application through the corresponding state flag.
在本申请提供的实施例中,当检测到目标应用程序处于运行状态时,不拦截通信消息,使通信消息到达目标应用程序。目标应用程序在接收到通信消息之后,可以对通信消息进行处理。In the embodiment provided by the present application, when it is detected that the target application is in a running state, the communication message is not intercepted, so that the communication message reaches the target application. After the target application receives the communication message, it can process the communication message.
步骤206,从处理列表中查找与目标应用标识和目标服务信息对应的处理信息。Step 206: Search processing information corresponding to the target application identifier and the target service information from the processing list.
其中,处理信息指的是用于对目标应用程序处理的信息。例如,处理信息可以为“唤醒”,则根据该处理信息“唤醒”对目标应用程序进行唤醒。Among them, the processing information refers to information for processing the target application. For example, the processing information may be "wake up", and the target application program is awakened according to the processing information "wake up".
具体地,处理列表包括一个或者多个参考应用标识和参考服务信息,参考服务信息可以对应一个或者多个参考应用标识。每个参考服务信息都有对应的处理信息。同一个参考应用标识在不同的参考服务信息中的处理信息可以相同,也可以不同。Specifically, the processing list includes one or more reference application identifiers and reference service information, and the reference service information may correspond to one or more reference application identifiers. Each reference service information has corresponding processing information. The processing information of the same reference application identifier in different reference service information may be the same or different.
电子设备可以将目标应用标识和目标服务信息与处理列表中的参考应用标识和参考服务信息分别进行匹配,然后获取相匹配的参考应用标识和参考服务信息所对应的处理信息,作为目标应用标识和目标服务信息对应的处理信息。The electronic device may match the target application ID and the target service information with the reference application ID and the reference service information in the processing list respectively, and then obtain the processing information corresponding to the matching reference application ID and the reference service information as the target application ID and Processing information corresponding to the target service information.
步骤208,当处理信息为唤醒信息时,将目标应用程序进行唤醒处理。 Step 208, when the processing information is wake-up information, the target application program is wake-up processed.
具体地,查找到目标应用标识和目标服务信息对应的处理信息后,根据处理信息对目标应用程序进行处理。当处理信息为唤醒信息时,将目标应用程序进行唤醒处理,并将通信消息发送给唤醒后的目标应用程序。当处理信息为非唤醒信息时,则拦截通信消息,使目标应用程序继续处于冻结状态。Specifically, after finding the processing information corresponding to the target application identifier and the target service information, the target application program is processed according to the processing information. When the processing information is wake-up information, the target application is awakened, and the communication message is sent to the awakened target application. When the processing information is non-wake-up information, the communication message is intercepted, so that the target application continues to be in a frozen state.
上述应用程序处理方法、装置、计算机设备和存储介质,当检测到通信消息时,获取通 信消息中包含的目标应用标识和目标服务信息,其中,目标应用标识用于标示接收通信消息的目标应用程序,目标服务信息用于标示生成通信消息的服务;当检测到目标应用程序处于冻结状态时,获取处理列表;从处理列表中查找与目标应用标识和目标服务信息对应的处理信息;当处理信息为唤醒信息时,将目标应用程序进行唤醒处理。上述应用程序处理的方式中,检测通信消息,当通信消息对应的目标应用程序处于冻结状态时,则获取处理列表,查找处理列表中的处理信息,当处理信息为唤醒信息时,将目标应用程序唤醒,避免了将所有通信消息拦截后,导致应用程序接收不到通信消息而产生异常的情况,从而减少了应用程序的异常。The above application program processing method, device, computer equipment, and storage medium, when a communication message is detected, acquire the target application identifier and target service information contained in the communication message, where the target application identifier is used to mark the target application program that receives the communication message , The target service information is used to mark the service that generates the communication message; when the target application is detected to be frozen, obtain the processing list; find the processing information corresponding to the target application ID and the target service information from the processing list; when the processing information is When awakening information, the target application is awakened. In the above application processing method, the communication message is detected. When the target application corresponding to the communication message is in a frozen state, the processing list is obtained, and the processing information in the processing list is searched. When the processing information is wake-up information, the target application Wake-up avoids the situation that after the interception of all communication messages, the application program cannot receive communication messages and generates an exception, thereby reducing the application's exception.
在一个实施例中,从处理列表中查找与目标应用标识和目标服务信息对应的唤醒信息,包括:将目标服务信息与处理列表中的参考服务信息进行匹配,得到参考服务信息对应的至少一个参考应用标识;当目标应用标识与至少一个参考应用标识相匹配时,从至少一个参考应用标识中查找与目标应用标识相匹配的匹配应用标识,获取匹配应用标识对应的唤醒信息。In one embodiment, searching the wake-up information corresponding to the target application identifier and the target service information from the processing list includes: matching the target service information with the reference service information in the processing list to obtain at least one reference corresponding to the reference service information Application identifier; when the target application identifier matches at least one reference application identifier, find a matching application identifier matching the target application identifier from the at least one reference application identifier to obtain wake-up information corresponding to the matching application identifier.
其中,匹配应用标识指的是与目标应用标识相匹配的参考应用标识。The matching application identifier refers to a reference application identifier that matches the target application identifier.
具体地,当目标服务信息对应的目标应用标识与至少一个参考应用标识不相匹配时,则说明处理列表中不包含目标服务信息与目标应用标识对应的应用标识,即处理列表中不存在匹配应用标识,则不拦截通信消息。当从至少一个参考应用标识中匹配到与目标应用标识相匹配的匹配应用标识时,则查找匹配应用标识对应的唤醒信息。Specifically, when the target application identifier corresponding to the target service information does not match at least one reference application identifier, it means that the processing list does not include the application identifier corresponding to the target service information and the target application identifier, that is, there is no matching application in the processing list Mark, the communication message is not intercepted. When a matching application identifier matching the target application identifier is matched from at least one reference application identifier, the wake-up information corresponding to the matching application identifier is searched for.
在本实施例中,在处理列表中查找与目标服务信息对应的至少一个参考应用标识,然后将目标应用标识与至少一个参考应用标识相匹配时,得到匹配应用标识,然后查找匹配应用标识对应的处理信息,可以根据不同的处理信息对应用程序进行处理,避免了将所有通信的应用程序进行唤醒,降低了电子设备功耗。In this embodiment, when searching for at least one reference application identifier corresponding to the target service information in the processing list, and then matching the target application identifier with at least one reference application identifier, a matching application identifier is obtained, and then searching for the corresponding application identifier For processing information, the application program can be processed according to different processing information, which avoids waking up all communicating application programs and reduces power consumption of the electronic device.
在一个实施例中,如图3所示,当处理信息为唤醒信息时,将目标应用程序进行唤醒处理,包括:In one embodiment, as shown in FIG. 3, when the processing information is wake-up information, the target application is wake-up processed, including:
步骤302,当处理信息为唤醒信息时,获取运行中的候选应用程序的数量。Step 302: When the processing information is wake-up information, obtain the number of running candidate application programs.
其中,候选应用程序指的是电子设备中运行中的应用程序。The candidate application program refers to an application program running in the electronic device.
具体地,运行中的应用程序包括前台运行的应用程序和后台运行的应用程序。前台运行的应用程序即是用户正在使用的应用程序,后台运行的应用程序是用户没有使用时,在电子设备后台运行的应用程序。运行中的应用程序需要占用部分的资源,如处理器资源、内存等。Specifically, the running application program includes an application program running in the foreground and an application program running in the background. The application running in the foreground is the application that the user is using, and the application running in the background is the application running in the background of the electronic device when the user is not using it. The running application needs to occupy some resources, such as processor resources and memory.
步骤304,当运行中的候选应用程序的数量大于数量阈值时,获取各个候选应用程序的运行信息。Step 304: When the number of running candidate applications is greater than the number threshold, obtain the running information of each candidate application.
具体地,当运行中的候选应用程序的数量过多时,电子设备的功耗过大,再将目标应用程序进行唤醒,会进一步增加电子设备的功耗。当运行中的候选应用程序的数量小于数量阈值时,则将目标应用程序进行唤醒处理。当运行中的候选应用程序的数量大于数量阈值时,则获取各个候选应用程序的运行信息。数量阈值可以由用户预先设置,也可以由其他的方式进行设置,在此不做限定。Specifically, when the number of running candidate application programs is too large, the power consumption of the electronic device is too large, and then awakening the target application program will further increase the power consumption of the electronic device. When the number of running candidate applications is less than the number threshold, the target application is awakened. When the number of running candidate applications is greater than the number threshold, the running information of each candidate application is acquired. The number threshold can be set by the user in advance, or can be set by other methods, which is not limited herein.
步骤306,根据运行信息从候选应用程序中获取冻结应用程序。Step 306: Obtain the frozen application from the candidate applications according to the running information.
其中,运行信息指的是应用程序在运行过程中的相关信息。冻结应用程序指的是在候选应用程序中符合冻结条件的应用程序。例如,可以设置冻结参数阈值,当根据应用程序的运行信息得到的冻结参数大于参数阈值时,即符合冻结条件,将符合冻结条件的应用程序作为冻结应用程序。Among them, the running information refers to the related information of the application in the running process. The frozen application refers to an application that meets the freezing conditions among the candidate applications. For example, the freezing parameter threshold may be set. When the freezing parameter obtained according to the running information of the application is greater than the parameter threshold, the freezing condition is met, and the application meeting the freezing condition is regarded as the freezing application.
步骤308,冻结该冻结应用程序,并唤醒目标应用程序。 Step 308, freeze the frozen application and wake up the target application.
由于唤醒后的目标应用程序在运行过程中会占用电子设备的资源,因此在检测到电子设备中的资源被过多占用的时候,可以先释放一步资源再唤醒目标应用程序,以保证目标应用程序有足够的资源运行。具体地,根据运行信息从候选应用程序中获取冻结应用程序后,先将冻结应用程序进行冻结,释放出一部分资源,再将目标应用程序进行唤醒。Since the awakened target application will occupy the resources of the electronic device during the running process, when it is detected that the resources in the electronic device are excessively occupied, the target application can be awakened by releasing one step of resources first to ensure the target application There are enough resources to run. Specifically, after obtaining the frozen application program from the candidate application program according to the running information, the frozen application program is first frozen, a part of resources are released, and then the target application program is woken up.
在本实施例中,当运行中的候选应用程序的数量大于数量阈值时,则获取各个候选应用程序的运行信息,根据运行信息对冻结应用程序进行冻结,提高了目标应用程序唤醒的时间,降低了电子设备的功耗。In this embodiment, when the number of running candidate applications is greater than the number threshold, the running information of each candidate application is obtained, and the frozen applications are frozen according to the running information, which increases the time for the target application to wake up and reduces Power consumption of electronic devices.
在一个实施例中,运行信息可以包括应用等级和后台运行时长,根据运行信息在运行中的应用程序中选择冻结应用程序,包括:根据应用等级和后台运行时长获取各个候选应用程序的冻结参数,将冻结参数大于参数阈值的候选应用程序作为冻结应用程序。In an embodiment, the running information may include an application level and a background running time, and freezing the application among running applications according to the running information includes: obtaining freezing parameters of each candidate application according to the application level and the background running time, Candidate applications whose freezing parameters are greater than the parameter threshold are regarded as freezing applications.
其中,应用等级指的是应用程序的优先等级,根据应用程序对用户的重要性进行设置。后台运行时长指的是应用程序在后台运行的时长,也就是应用程序在运行的状态下,用户没有使用该应用程序的时长。冻结参数指的是用于表示将应用程序进行冻结的参数。参数阈值可以由用户进行设置,也可以通过其他的方式进行设置,在此不做限定。Among them, the application level refers to the priority level of the application program, which is set according to the importance of the application program to the user. The background running time refers to the length of time the application is running in the background, that is, the length of time the user has not used the application while the application is running. The freeze parameter refers to a parameter used to indicate that the application is frozen. The parameter threshold can be set by the user, or can be set in other ways, which is not limited here.
可以理解的是,等级越高,则应用程序对用户的越重要,冻结参数越低。后台运行时长 越长,则用户没有使用该应用程序的时间越长,冻结参数越高。It is understandable that the higher the level, the more important the application is to the user, and the lower the freeze parameter. The longer the background running time, the longer the user has not used the application and the higher the freezing parameter.
在一个实施例中,冻结参数可以由运行信息的应用等级和后台运行时长进行加权计算得到。加权的计算公式可以由用户进行设置,也可以通过其他的方式进行设置,在此不做限定。In an embodiment, the freezing parameter may be obtained by weighting the application level of the running information and the background running time. The calculation formula of weighting can be set by the user, or can be set by other methods, which is not limited herein.
例如,A应用程序的应用等级为一级,后台运行时长为3小时。B应用程序的应用等级为三级,后台运行时长为4小时。应用等级一级对应的权值为0.5,应用等级三级对应的权值为0.2。后台运行时长为1小时,对应的权值为0.1。后台运行时长每增加1小时,则对应的权值增加0.1。加权的计算公式为:冻结参数=100*应用等级权值+100*后台运行时长权值。其中,100分别为应用等级和后台运行时长的基本参数。则计算A应用程序的冻结参数=100*0.5+100*0.3=80,B应用程序的冻结参数=100*0.2+100*0.4=60。假设参数阈值为60,那么B应用程序的冻结参数60等于参数阈值,B应用程序不作为冻结应用程序,A应用程序的冻结参数80大于参数阈值60,将A应用程序作为冻结应用程序。For example, the application level of the A application is level 1, and the running time in the background is 3 hours. The application level of the B application is three levels, and the running time in the background is 4 hours. The weight value corresponding to the first level of the application level is 0.5, and the weight value corresponding to the third level of the application level is 0.2. The running time in the background is 1 hour, and the corresponding weight is 0.1. Each additional hour of background running time increases the corresponding weight by 0.1. The calculation formula for weighting is: freezing parameter = 100 * application level weight + 100 * background running time weight. Among them, 100 is the basic parameter of the application level and the background running time. Then calculate the freezing parameter of the A application = 100 * 0.5 + 100 * 0.3 = 80, and the freezing parameter of the B application = 100 * 0.2 + 100 * 0.4 = 60. Assuming that the parameter threshold is 60, the freezing parameter 60 of the B application is equal to the parameter threshold, the B application is not regarded as a frozen application, and the freezing parameter 80 of the A application is greater than the parameter threshold 60, and the A application is regarded as a frozen application.
在本实施例中,根据运行信息的应用等级和后台运行时长计算得到各个候选应用程序的冻结参数,当冻结参数大于参数阈值时,则将该候选应用程序作为冻结应用程序进行冻结,可以更加准确地冻结一些不重要或者长时间没使用的候选应用程序。In this embodiment, the freezing parameters of each candidate application are calculated according to the application level of the running information and the background running time. When the freezing parameter is greater than the parameter threshold, the candidate application is frozen as a frozen application, which can be more accurate Freeze candidate applications that are not important or have not been used for a long time.
图4为一个实施例中服务端与第三方应用程序进行通信的示意图。如图4所示,服务端402向第三方应用程序408发送通信消息时,会首先将通信消息发送到Linux内核404中,Linux内核404接收到通信消息后,获取通信消息中包含的目标应用标识和目标服务信息,然后根据目标应用标识查找第三方应用程序408。若Linux内核404检测到第三方应用程序408处于冻结状态,则获取Native层406中存储着处理列表。从处理列表中查找与目标应用标识和目标服务信息对应的处理信息,当处理信息为唤醒信息时,将第三方应用程序408进行唤醒处理。FIG. 4 is a schematic diagram of communication between a server and a third-party application in an embodiment. As shown in FIG. 4, when the server 402 sends a communication message to the third-party application 408, it will first send the communication message to the Linux kernel 404. After receiving the communication message, the Linux kernel 404 obtains the target application identifier included in the communication message And the target service information, and then look up the third-party application 408 according to the target application identifier. If the Linux kernel 404 detects that the third-party application 408 is in a frozen state, it obtains a processing list stored in the Native layer 406. Look up the processing information corresponding to the target application identifier and the target service information from the processing list. When the processing information is wake-up information, the third-party application 408 is woken up.
在一个实施例中,目标应用程序唤醒之后,目标应用程序就可以接收并处理通信消息。如图5所示,当处理信息为唤醒信息时,将目标应用程序被唤醒之后,上述方法还可以包括:In one embodiment, after the target application wakes up, the target application can receive and process the communication message. As shown in FIG. 5, when the processing information is wake-up information, after the target application is woken up, the above method may further include:
步骤502,获取电子设备的资源总占用率。Step 502: Obtain the total resource occupancy rate of the electronic device.
资源是指电子设备在处理应用事件时所必须用到的软件或硬件资源,比如电子设备的CPU(Central Processing Unit,中央处理器)、内存(Memory)、硬件、网络资源、IO(Input-Output,输入输出)等。资源占用率是指电子设备的资源被占用的比例,一般是指被占用的资源与全部资源的比例,可以通过百分比的形式进行表示。例如,设备的总内存有128GB,已经被占用的内存有56GB,那么该设备的资源占用率就可以表示为内存占用率,得到的内存占用率即为43.75%。Resources refer to the software or hardware resources that the electronic device must use when processing application events, such as the electronic device CPU (Central Processing Unit), memory (Memory), hardware, network resources, IO (Input-Output , Input and output), etc. Resource occupancy rate refers to the proportion of resources occupied by electronic devices, generally refers to the ratio of occupied resources to all resources, which can be expressed as a percentage. For example, the total memory of the device is 128GB, and the memory that has been occupied is 56GB, then the resource occupancy rate of the device can be expressed as the memory occupancy rate, and the obtained memory occupancy rate is 43.75%.
步骤504,当资源总占用率超过第一占用率阈值时,控制被唤醒的目标应用程序进入资源限制状态;其中,处于资源限制状态的应用程序在运行时对电子设备的资源占用率小于第二占用率阈值,第一占用率阈值大于第二占用率阈值。Step 504: When the total resource occupancy rate exceeds the first occupancy threshold, control the target application to be awakened to enter a resource limit state; wherein, the resource occupancy rate of the application in the resource limit state to the electronic device is less than the second Occupancy threshold, the first occupancy threshold is greater than the second occupancy threshold.
可以理解的是,资源限制状态是指对应用程序在运行时使用的电子设备的资源进行限制的状态。当资源总占用率超过第一占用率阈值时,则认为电子设备的剩余资源比较少,目标应用程序会影响电子设备的正常运行,那么就可以控制被唤醒的目标应用程序进入资源限制状态。目标应用程序处于资源限制状态时,运行过程中的资源占用率不能超过第二占用率阈值,这样可以控制目标应用程序对电子设备资源的使用,从而节省电子设备的资源。例如,限制目标应用程序在运行时的CPU占用率不能超过10%。It can be understood that the resource limitation state refers to a state that limits the resources of the electronic device used by the application at runtime. When the total resource occupancy rate exceeds the first occupancy threshold, it is considered that the remaining resources of the electronic device are relatively small, and the target application program will affect the normal operation of the electronic device, so that the awakened target application program can be controlled to enter the resource limitation state. When the target application is in the resource limitation state, the resource occupancy rate during the running process cannot exceed the second occupancy rate threshold, so that the target application program can control the use of electronic device resources, thereby saving the electronic device resources. For example, restricting the CPU usage of the target application while it is running cannot exceed 10%.
具体地,还可以根据目标应用程序的应用等级来控制对资源的占用情况,预先建立目标应用程序的应用等级与资源限制级别的对应关系,然后根据目标应用程序的应用等级来控制进入资源限制状态的资源限制级别。资源限制级别是指对应用程序使用的资源进行限制的程度。获取目标应用程序对应的应用等级,根据应用等级获取对应的资源限制级别;控制被唤醒的目标应用程序进入资源限制级别对应的资源限制状态。Specifically, it is also possible to control the occupancy of resources according to the application level of the target application, establish the correspondence between the application level of the target application and the resource restriction level in advance, and then control to enter the resource restriction state according to the application level of the target application Resource limitation level. Resource restriction level refers to the degree of restriction on the resources used by the application. Obtain the application level corresponding to the target application, and obtain the corresponding resource restriction level according to the application level; control the awakened target application to enter the resource restriction state corresponding to the resource restriction level.
在本申请提供的其他实施例中,还可以建立资源总占用率和资源限制级别的对应关系。当资源总占用率超过第一占用率阈值时,根据资源总占用率获取资源限制级别,然后控制被唤醒的目标应用程序进入资源限制级别对应的资源限制状态。例如,第一占用率阈值为50%,则当资源总占用率超过50%时,将资源总占用率划分为50%~60%、60%~80%、80%~100%等三个占用级别,然后分别对应轻度资源限制级别、普通资源限制级别和深度资源限制级别等三个等级,根据资源总占用率可以获取对应的资源限制级别。可以理解的是,还可以结合资源总占用率和目标应用程序的应用等级,来获取资源限制级别,在此不做限定。In other embodiments provided by the present application, a correspondence between the total resource occupancy rate and the resource limitation level may also be established. When the total resource occupancy rate exceeds the first occupancy threshold, the resource limit level is obtained according to the total resource occupancy rate, and then the awakened target application is controlled to enter the resource limit state corresponding to the resource limit level. For example, if the first occupancy threshold is 50%, when the total resource occupancy rate exceeds 50%, the total resource occupancy rate is divided into three occupancies: 50% to 60%, 60% to 80%, and 80% to 100%. Level, and then correspond to the three levels of light resource restriction level, ordinary resource restriction level and deep resource restriction level respectively, and the corresponding resource restriction level can be obtained according to the total resource occupancy rate. It can be understood that the resource restriction level can also be obtained in combination with the total resource occupancy rate and the application level of the target application, which is not limited herein.
在一个实施例中,如图6所示,当处理信息为唤醒信息时,将目标应用程序进行唤醒处理之后,还可以包括:In one embodiment, as shown in FIG. 6, when the processing information is wake-up information, after the target application is wake-up processed, the method may further include:
步骤602,从目标应用程序被唤醒的时刻开始计时。Step 602: Start timing from the moment when the target application is awakened.
当目标应用程序被唤醒时,电子设备启动计时器,然后通过计时器开始计时。若同时存在多个目标应用程序被唤醒的情况,那么可以对每个目标应用程序定义一个对应的计时器,每个目标应用程序都可以通过对应的计时器来进行计时。具体的,可以建立目标应用程序的应用标识和计时器的计时标识之间的对应关系,这样在目标应用程序被唤醒后,可以通过应 用标识对应的计时标识查找并启动计时器开始计时。When the target application is woken up, the electronic device starts a timer, and then starts counting through the timer. If multiple target applications are woken up at the same time, a corresponding timer can be defined for each target application, and each target application can be timed by the corresponding timer. Specifically, the correspondence between the application ID of the target application and the timing ID of the timer can be established, so that after the target application is woken up, the timer can be found and started by the timing ID corresponding to the application ID to start timing.
以Android系统为例,系统可以预先定义一个计时器,当检测到目标应用程序被唤醒时,可以根据预先建立的对应关系查找应用标识对应的计时器,并通过timer.setBase(SystemClock.elapsedRealtime())将计时器清零,然后通过timer.start()函数启动计时器,开始计时。可以理解的是,本申请中以Android操作系统为例对应用程序处理方法进行说明,但是本申请的应用程序处理方法并不仅限于在Android系统中实现,还可以应用在IOS(IPhone Operating System)、塞班、Windows、MAC OS(Macintosh Operating System)等操作系统中。Taking the Android system as an example, the system can predefine a timer. When it detects that the target application is woken up, it can find the timer corresponding to the application ID according to the pre-established correspondence, and pass timer.setBase (SystemClock.elapsedRealtime () ) Clear the timer, and then start the timer through the timer.start () function to start timing. It is understandable that in this application, the Android operating system is taken as an example to describe the application processing method, but the application processing method of this application is not limited to being implemented in the Android system, but can also be applied to IOS (IPhone Operating System), Saipan, Windows, MAC OS (Macintosh Operating System) and other operating systems.
步骤604,当计时时长超过时长阈值时,冻结目标应用程序。Step 604: When the time duration exceeds the time threshold, freeze the target application.
具体地,目标应用程序被唤醒的时刻开始计时,计时时长表示从目标应用程序被唤醒的时刻到当前时刻的时长。可以预先定义时长阈值,当计时时长超过时长阈值时,将该目标应用程序重新进行冻结。时长阈值一般会设置为一个比较小的阈值,这样避免目标应用程序一直处于运行状态,而占用电子设备的资源。可以理解的是,不同的目标应用程序可以使用相同的时长阈值,也可以使用不同的时长阈值,在此不做限定。Specifically, the time when the target application is awakened starts to count, and the time duration represents the time from the time when the target application is awakened to the current time. The duration threshold can be defined in advance, and when the timing duration exceeds the duration threshold, the target application is re-frozen. The duration threshold is generally set to a relatively small threshold, so as to avoid that the target application is always in a running state and consumes resources of the electronic device. It can be understood that different target applications may use the same duration threshold or different duration thresholds, which is not limited herein.
在一个实施例中,可以根据目标应用程序接收通信消息的频率,来设置时长阈值。具体的,获取被唤醒的目标应用程序接收通信消息的接收频率,并根据接收频率获取对应的时长阈值。例如,在接收频率较低的时候,将时长阈值设置为一个较小的值,就可以在目标应用程序比较空闲的时候,自动将目标应用程序进行冻结,避免电子设备的资源消耗。In one embodiment, the duration threshold may be set according to how often the target application receives communication messages. Specifically, the frequency of receiving the communication message received by the awakened target application program is obtained, and the corresponding duration threshold is obtained according to the frequency of reception. For example, when the reception frequency is low, setting the duration threshold to a smaller value can automatically freeze the target application when the target application is relatively idle to avoid resource consumption of the electronic device.
图7为一个实施例中应用程序处理流程的示意图。如图7所示,当检测到发送至处于冻结状态的目标应用程序的通信消息时,获取处理列表。通过通信消息中包含的目标应用标识和目标服务信息从处理列表中查找处理信息。当处理信息为唤醒信息时,则将该目标应用程序进行唤醒处理,并控制唤醒的应用程序进入资源限制状态。在唤醒时长超过时长阈值时,冻结该目标应用程序。目标应用程序处于冻结状态时,目标应用程序不运行,目标应用程序对应的资源占用率不会产生变化。处于唤醒状态且在资源限制状态中时,目标应用程序可以运行,但是运行过程中只能占用设备的部分资源。7 is a schematic diagram of an application process flow in an embodiment. As shown in FIG. 7, when a communication message sent to a target application in a frozen state is detected, a processing list is obtained. Find the processing information from the processing list through the target application ID and target service information contained in the communication message. When the processing information is wake-up information, the target application is wake-up processed, and the wake-up application is controlled to enter a resource restriction state. When the wake-up duration exceeds the duration threshold, freeze the target application. When the target application is in a frozen state, the target application does not run, and the resource occupancy rate corresponding to the target application does not change. When in the wake-up state and in the resource-restricted state, the target application can run, but only some of the resources of the device are occupied during the running process.
上述实施例提供的应用程序处理方法,在检测到通信消息时,根据通信消息中的目标应用标识检测对应的目标应用程序是否处于冻结状态。当该目标应用程序处于冻结状态,获取处理列表。在处理列表中不存在与目标应用标识对应的应用标识时,则不拦截该通信消息。 当处理列表中存在与目标应用标识对应的应用标识时,通过通信消息中包含的目标应用标识和目标服务信息从处理列表中查找处理信息。根据处理信息对目标应用程序进行处理。当处理信息为唤醒信息时,根据候选应用程序的运行信息对冻结应用程序进行冻结,并将目标应用程序进行唤醒。这样可以通过处理列表来过滤应用程序,同时控制运行中的候选应用程序,防止运行中的应用程序太多,占用电子设备的资源太多,从而降低电子设备的功耗。The application processing method provided in the above embodiment detects whether the corresponding target application is in a frozen state according to the target application identifier in the communication message when the communication message is detected. When the target application is frozen, get the processing list. When there is no application identifier corresponding to the target application identifier in the processing list, the communication message is not intercepted. When there is an application ID corresponding to the target application ID in the processing list, the processing information is searched from the processing list through the target application ID and the target service information contained in the communication message. Process the target application according to the processing information. When the processing information is wake-up information, the frozen application is frozen according to the running information of the candidate application, and the target application is woken up. In this way, the application programs can be filtered by processing the list, and the running candidate application programs can be controlled at the same time to prevent too many running application programs from occupying too many resources of the electronic device, thereby reducing power consumption of the electronic device.
应该理解的是,虽然图2、3、5、6的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2、3、5、6中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flowcharts of FIGS. 2, 3, 5, and 6 are displayed in order according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless clearly stated in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least some of the steps in FIGS. 2, 3, 5, and 6 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. These The execution order of the sub-steps or stages is not necessarily sequential, but may be executed in turn or alternately with at least a part of other steps or sub-steps or stages of other steps.
在一个实施例中,如图8所示,提供了一种应用程序处理装置,包括:通信信息获取模块802、处理列表获取模块804、查找模块806和唤醒模块808,其中:In one embodiment, as shown in FIG. 8, an application processing apparatus is provided, including: a communication information acquisition module 802, a processing list acquisition module 804, a search module 806, and a wake-up module 808, where:
通信信息获取模块802,用于当检测到通信消息时,获取通信消息中包含的目标应用标识和目标服务信息,其中,目标应用标识用于标示接收通信消息的目标应用程序,目标服务信息用于标示生成通信消息的服务。The communication information obtaining module 802 is used to obtain the target application identifier and the target service information contained in the communication message when the communication message is detected, wherein the target application identifier is used to mark the target application program receiving the communication message, and the target service information is used to Identify the service that generates the communication message.
处理列表获取模块804,用于当检测到目标应用程序处于冻结状态时,获取处理列表。The processing list obtaining module 804 is configured to obtain a processing list when it is detected that the target application is in a frozen state.
查找模块806,用于从处理列表中查找与目标应用标识和目标服务信息对应的处理信息。The searching module 806 is used for searching processing information corresponding to the target application identifier and the target service information from the processing list.
唤醒模块808,用于当处理信息为唤醒信息时,将目标应用程序进行唤醒处理。The wakeup module 808 is configured to wake up the target application program when the processing information is wakeup information.
上述应用程序处理方法、装置、计算机设备和存储介质,当检测到通信消息时,获取通信消息中包含的目标应用标识和目标服务信息,其中,目标应用标识用于标示接收通信消息的目标应用程序,目标服务信息用于标示生成通信消息的服务;当检测到目标应用程序处于冻结状态时,获取处理列表;从处理列表中查找与目标应用标识和目标服务信息对应的处理信息;当处理信息为唤醒信息时,将目标应用程序进行唤醒处理。上述应用程序处理的方式中,检测通信消息,当通信消息对应的目标应用程序处于冻结状态时,则获取处理列表,查找处理列表中的处理信息,当处理信息为唤醒信息时,将目标应用程序唤醒,避免了将所有 通信消息拦截后,导致应用程序接收不到通信消息而产生异常的情况,从而减少了应用程序的异常。The above application program processing method, device, computer equipment, and storage medium, when a communication message is detected, acquire the target application identifier and target service information contained in the communication message, where the target application identifier is used to mark the target application program that receives the communication message , The target service information is used to mark the service that generates the communication message; when the target application is detected to be frozen, obtain the processing list; find the processing information corresponding to the target application ID and the target service information from the processing list; when the processing information is When awakening information, the target application is awakened. In the above application processing method, the communication message is detected. When the target application corresponding to the communication message is in a frozen state, the processing list is obtained, and the processing information in the processing list is searched. When the processing information is wake-up information, the target application Wake-up avoids the situation that after the interception of all communication messages, the application program cannot receive communication messages and generates an exception, thereby reducing the application's exception.
在一个实施例中,如图9所示,提供了一种应用程序处理装置,包括:通信信息获取模块902、处理列表获取模块904、查找模块906、唤醒模块908、资源限制模块910和冻结模块912,其中:In one embodiment, as shown in FIG. 9, an application processing apparatus is provided, including: a communication information acquisition module 902, a processing list acquisition module 904, a search module 906, a wake-up module 908, a resource restriction module 910, and a freeze module 912, where:
通信信息获取模块902,用于当检测到通信消息时,获取通信消息中包含的目标应用标识和目标服务信息,其中,目标应用标识用于标示接收通信消息的目标应用程序,目标服务信息用于标示生成通信消息的服务。The communication information obtaining module 902 is used to obtain the target application identifier and the target service information contained in the communication message when the communication message is detected, wherein the target application identifier is used to mark the target application program receiving the communication message, and the target service information is used to Identify the service that generates the communication message.
处理列表获取模块904,用于当检测到目标应用程序处于冻结状态时,获取处理列表。The processing list obtaining module 904 is configured to obtain a processing list when it is detected that the target application is in a frozen state.
查找模块906,用于从处理列表中查找与目标应用标识和目标服务信息对应的处理信息。The searching module 906 is used for searching processing information corresponding to the target application identifier and the target service information from the processing list.
唤醒模块908,用于当处理信息为唤醒信息时,将目标应用程序进行唤醒处理。The wakeup module 908 is configured to wake up the target application program when the processing information is wakeup information.
资源限制模块910,用于获取电子设备的资源总占用率;当资源总占用率超过第一占用率阈值时,控制被唤醒的目标应用程序进入资源限制状态;其中,处于资源限制状态的应用程序在运行时对电子设备的资源占用率小于第二占用率阈值,第一占用率阈值大于第二占用率阈值。The resource restriction module 910 is used to obtain the total resource occupancy rate of the electronic device; when the total resource occupancy rate exceeds the first occupancy threshold, the target application that is woken up is controlled to enter a resource restriction state; wherein, the application in the resource restriction state In operation, the resource occupancy rate of the electronic device is less than the second occupancy rate threshold, and the first occupancy rate threshold is greater than the second occupancy rate threshold.
冻结模块912,用于从目标应用程序被唤醒的时刻开始计时;当计时时长超过时长阈值时,冻结目标应用程序。The freezing module 912 is used to start timing from the moment when the target application is awakened; when the timing duration exceeds the duration threshold, the target application is frozen.
上述应用程序处理方法、装置、计算机设备和存储介质,检测通信消息,当通信消息对应的目标应用程序处于冻结状态时,则获取处理列表,查找处理列表中的处理信息,当处理信息为唤醒信息时,将目标应用程序唤醒。在将目标应用程序进行唤醒处理之后,获取电子设备的资源总占用率,根据资源总占用率控制被唤醒的目标应用程序进入资源限制状态。在将目标应用程序进行唤醒处理之后,当目标应用程序被唤醒后的计时时长超过时长阈值时,则冻结目标应用程序,避免了将所有通信的应用程序进行唤醒,降低了电子设备功耗。The above application program processing method, device, computer equipment, and storage medium detect communication messages, and when the target application corresponding to the communication message is in a frozen state, obtain a processing list, search for processing information in the processing list, and when the processing information is wake-up information , Wake up the target application. After the target application is awakened, the total resource occupancy rate of the electronic device is obtained, and the awakened target application program is controlled to enter the resource limitation state according to the total resource occupancy rate. After the target application is awakened, when the time duration after the target application is awakened exceeds the time threshold, the target application is frozen, which avoids awakening all the communication applications and reduces the power consumption of the electronic device.
在一个实施例中,上述查找模块906还用于将目标服务信息与处理列表中的参考服务信息进行匹配,得到参考服务信息对应的至少一个参考应用标识;当目标应用标识与至少一个参考应用标识相匹配时,从至少一个参考应用标识中查找与目标应用标识相匹配的匹配应用标识,获取匹配应用标识对应的唤醒信息。In one embodiment, the above-mentioned search module 906 is further used to match the target service information with the reference service information in the processing list to obtain at least one reference application identifier corresponding to the reference service information; when the target application identifier and at least one reference application identifier When matching, the matching application identifier matching the target application identifier is searched from at least one reference application identifier to obtain the wake-up information corresponding to the matching application identifier.
在一个实施例中,上述唤醒模块908还用于当处理信息为唤醒信息时,获取运行中的候 选应用程序的数量;当运行中的候选应用程序的数量大于数量阈值时,获取各个候选应用程序的运行信息;根据运行信息从候选应用程序中获取冻结应用程序;冻结该冻结应用程序,并唤醒目标应用程序。In one embodiment, the above wake-up module 908 is further used to obtain the number of running candidate applications when the processing information is wake-up information; when the number of running candidate applications is greater than the number threshold, obtain each candidate application According to the running information, obtain the frozen application from the candidate applications; freeze the frozen application and wake up the target application.
在一个实施例中,上述唤醒模块908还用于根据应用等级和后台运行时长获取各个候选应用程序的冻结参数,将冻结参数大于参数阈值的候选应用程序作为冻结应用程序。In one embodiment, the wake-up module 908 is further used to obtain the freezing parameters of each candidate application according to the application level and the background running time, and use the candidate application whose freezing parameter is greater than the parameter threshold as the freezing application.
在一个实施例中,上述冻结模块912还用于获取被唤醒的目标应用程序接收通信消息的接收频率,并根据接收频率获取对应的时长阈值。In one embodiment, the above freezing module 912 is further used to obtain the frequency of receiving the communication message received by the awakened target application, and obtain the corresponding duration threshold according to the frequency of reception.
上述应用程序处理装置中各个模块的划分仅用于举例说明,在其他实施例中,可将应用程序处理装置按照需要划分为不同的模块,以完成上述应用程序处理装置的全部或部分功能。The division of each module in the above-mentioned application processing device is for illustration only. In other embodiments, the application processing device may be divided into different modules as needed to complete all or part of the functions of the above-mentioned application processing device.
关于应用程序处理装置的具体限定可以参见上文中对于应用程序处理方法的限定,在此不再赘述。上述应用程序处理装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitation of the application program processing device, reference may be made to the above limitation on the application program processing method, which will not be repeated here. Each module in the above application program processing device may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in the hardware or independent of the processor in the computer device, or may be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
本申请实施例中提供的应用程序处理装置中的各个模块的实现可为计算机程序的形式。该计算机程序可在终端或服务器上运行。该计算机程序构成的程序模块可存储在终端或服务器的存储器上。该计算机程序被处理器执行时,实现本申请实施例中所描述方法的步骤。The implementation of each module in the application program processing apparatus provided in the embodiments of the present application may be in the form of a computer program. The computer program can be run on a terminal or a server. The program module composed of the computer program may be stored in the memory of the terminal or the server. When the computer program is executed by the processor, the steps of the method described in the embodiments of the present application are implemented.
本申请实施例还提供了一种电子设备。如图10所示,为了便于说明,仅示出了与本申请实施例相关的部分,具体技术细节未揭示的,请参照本申请实施例方法部分。该电子设备可以为包括手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑、穿戴式设备等任意终端设备,以电子设备为手机为例:An embodiment of the present application also provides an electronic device. As shown in FIG. 10, for ease of description, only parts related to the embodiments of the present application are shown, and specific technical details are not disclosed, please refer to the method part of the embodiments of the present application. The electronic device may be any terminal device including a mobile phone, tablet computer, PDA (Personal Digital Assistant), POS (Point of Sales), in-vehicle computer, wearable device, etc. Taking the electronic device as a mobile phone for example :
图10为与本申请实施例提供的电子设备相关的手机的部分结构的框图。参考图10,手机包括:射频(Radio Frequency,RF)电路1010、存储器1020、输入单元1030、显示单元1040、传感器1050、音频电路1060、无线保真(wireless fidelity,WiFi)模块1070、处理器1080、以及电源1090等部件。本领域技术人员可以理解,图10所示的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。10 is a block diagram of a partial structure of a mobile phone related to an electronic device provided by an embodiment of the present application. 10, the mobile phone includes: a radio frequency (Radio Frequency) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a sensor 1050, an audio circuit 1060, a wireless fidelity (WiFi) module 1070, a processor 1080 , And power supply 1090 and other components. Those skilled in the art may understand that the structure of the mobile phone shown in FIG. 10 does not constitute a limitation on the mobile phone, and may include more or less components than those shown in the figure, or a combination of certain components, or a different component arrangement.
其中,RF电路1010可用于收发信息或通话过程中,信号的接收和发送,可将基站的下行信息接收后,给处理器1080处理;也可以将上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路1010还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE))、电子邮件、短消息服务(Short Messaging Service,SMS)等。Among them, the RF circuit 1010 can be used to receive and send signals during sending and receiving information or during a call. It can receive the downlink information of the base station and process it to the processor 1080; it can also send uplink data to the base station. Generally, RF circuits include but are not limited to antennas, at least one amplifier, transceiver, coupler, low noise amplifier (Low Noise Amplifier, LNA), duplexer, and so on. In addition, the RF circuit 1010 can also communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile (GSM), General Packet Radio Service (GPRS), and Code Division Multiple Access (Code Division) Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), e-mail, Short Message Service (SMS), etc.
存储器1020可用于存储软件程序以及模块,处理器1080通过运行存储在存储器1020的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器1020可主要包括程序存储区和数据存储区,其中,程序存储区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能的应用程序、图像播放功能的应用程序等)等;数据存储区可存储根据手机的使用所创建的数据(比如音频数据、通讯录等)等。此外,存储器1020可以包括高 速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 1020 may be used to store software programs and modules. The processor 1080 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 1020. The memory 1020 may mainly include a program storage area and a data storage area, where the program storage area may store an operating system and at least one function-required application program (such as a sound playback function application program, an image playback function application program, etc.), etc. The data storage area can store data (such as audio data, address book, etc.) created according to the use of the mobile phone. In addition, the memory 1020 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
输入单元1030可用于接收输入的数字或字符信息,以及产生与手机1000的用户设置以及功能控制有关的键信号输入。具体地,输入单元1030可包括触控面板1031以及其他输入设备1032。触控面板1031,也可称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1031上或在触控面板1031附近的操作),并根据预先设定的程式驱动相应的连接装置。在一个实施例中,触控面板1031可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器1080,并能接收处理器1080发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板1031。除了触控面板1031,输入单元1030还可以包括其他输入设备1032。具体地,其他输入设备1032可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)等中的一种或多种。The input unit 1030 may be used to receive input numeric or character information, and generate key signal input related to user settings and function control of the mobile phone 1000. Specifically, the input unit 1030 may include a touch panel 1031 and other input devices 1032. The touch panel 1031, also known as a touch screen, can collect user's touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc. on or near the touch panel 1031 Operation), and drive the corresponding connection device according to the preset program. In one embodiment, the touch panel 1031 may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into contact coordinates, and then sends To the processor 1080, and can receive the commands sent by the processor 1080 and execute them. In addition, the touch panel 1031 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 1031, the input unit 1030 may also include other input devices 1032. Specifically, other input devices 1032 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), and the like.
显示单元1040可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元1040可包括显示面板1041。在一个实施例中,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板1041。在一个实施例中,触控面板1031可覆盖显示面板1041,当触控面板1031检测到在其上或附近的触摸操作后,传送给处理器1080以确定触摸事件的类型,随后处理器1080根据触摸事件的类型在显示面板1041上提供相应的视觉输出。虽然在图10中,触控面板1031与显示面板1041是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板1031与显示面板1041集成而实现手机的输入和输出功能。The display unit 1040 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 1040 may include a display panel 1041. In one embodiment, the display panel 1041 may be configured in the form of a liquid crystal display (Liquid Crystal) (LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), or the like. In one embodiment, the touch panel 1031 may cover the display panel 1041, and when the touch panel 1031 detects a touch operation on or near it, it is transmitted to the processor 1080 to determine the type of touch event, and then the processor 1080 according to The type of touch event provides a corresponding visual output on the display panel 1041. Although in FIG. 10, the touch panel 1031 and the display panel 1041 are implemented as two independent components to realize the input and input functions of the mobile phone, in some embodiments, the touch panel 1031 and the display panel 1041 may be integrated to Realize the input and output functions of the mobile phone.
手机1000还可包括至少一种传感器1050,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板1041的亮度,接近传感器可在手机移动到耳边时,关闭显示面板1041和/或背光。运动传感器可包括加速度传感器,通过加速度传感器可检测各个方向上加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换)、振动识别相关功能(比如计步器、敲击)等;此外,手机还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器等。The mobile phone 1000 may further include at least one sensor 1050, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1041 according to the brightness of the ambient light, and the proximity sensor may close the display panel 1041 and / or when the mobile phone moves to the ear Or backlight. The motion sensor may include an acceleration sensor. The acceleration sensor can detect the magnitude of acceleration in various directions, and can detect the magnitude and direction of gravity when at rest. Pedometer, percussion), etc. In addition, the mobile phone can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor and so on.
音频电路1060、扬声器1061和传声器1062可提供用户与手机之间的音频接口。音频电路1060可将接收到的音频数据转换后的电信号,传输到扬声器1061,由扬声器1061转换为声音信号输出;另一方面,传声器1062将收集的声音信号转换为电信号,由音频电路1060接收后转换为音频数据,再将音频数据输出处理器1080处理后,经RF电路1010可以发送给另一手机,或者将音频数据输出至存储器1020以便后续处理。The audio circuit 1060, the speaker 1061, and the microphone 1062 may provide an audio interface between the user and the mobile phone. The audio circuit 1060 can transmit the received audio data converted electrical signal to the speaker 1061, which converts the speaker 1061 into a sound signal output; on the other hand, the microphone 1062 converts the collected sound signal into an electrical signal, which is converted by the audio circuit 1060 After receiving, it is converted into audio data, and then processed by the audio data output processor 1080, and then sent to another mobile phone through the RF circuit 1010, or the audio data is output to the memory 1020 for subsequent processing.
WiFi属于短距离无线传输技术,手机通过WiFi模块1070可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图10示出了WiFi模块1070,但是可以理解的是,其并不属于手机1000的必须构成,可以根据需要而省略。WiFi is a short-range wireless transmission technology. Mobile phones can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 1070. It provides users with wireless broadband Internet access. Although FIG. 10 shows the WiFi module 1070, it can be understood that it is not a necessary component of the mobile phone 1000, and may be omitted as needed.
处理器1080是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器1020内的软件程序和/或模块,以及调用存储在存储器1020内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。在一个实施例中,处理器1080可包括一个或多个处理单元。在一个实施例中,处理器1080可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等;调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1080中。The processor 1080 is the control center of the mobile phone, and uses various interfaces and lines to connect various parts of the entire mobile phone, by running or executing software programs and / or modules stored in the memory 1020, and calling data stored in the memory 1020, the Various functions and processing data of the mobile phone, so as to monitor the mobile phone as a whole. In one embodiment, the processor 1080 may include one or more processing units. In one embodiment, the processor 1080 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, user interface, application programs, and the like; the modem processor mainly processes wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 1080.
手机1000还包括给各个部件供电的电源1090(比如电池),优选的,电源可以通过电源管理系统与处理器1080逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile phone 1000 further includes a power supply 1090 (such as a battery) for powering various components. Preferably, the power supply can be logically connected to the processor 1080 through a power management system, so as to realize functions such as charging, discharging, and power management through the power management system.
在一个实施例中,手机1000还可以包括摄像头、蓝牙模块等。In one embodiment, the mobile phone 1000 may further include a camera, a Bluetooth module, and the like.
在本申请实施例中,该电子设备所包括的处理器1080执行存储在存储器上的计算机程序时实现应用程序处理方法的步骤。In the embodiment of the present application, the processor 1080 included in the electronic device implements the steps of the application processing method when the computer program stored on the memory is executed.
本申请实施例还提供了一种计算机可读存储介质。一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当所述计算机可执行指令被一个或多个处理器执行时,使得所述处理器执行应用程序处理方法的步骤。The embodiments of the present application also provide a computer-readable storage medium. One or more non-volatile computer-readable storage media containing computer-executable instructions, when the computer-executable instructions are executed by one or more processors, causing the processors to perform steps of an application processing method.
一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行应用程序处理方法。A computer program product containing instructions that, when run on a computer, causes the computer to execute an application processing method.
本申请所使用的对存储器、存储、数据库或其它介质的任何引用可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM),它用作外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDR SDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)。Any references to memory, storage, databases, or other media used in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR) SDRAM, enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation manners of the present application, and their descriptions are more specific and detailed, but they should not be construed as limiting the patent scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which all fall within the protection scope of the present application. Therefore, the protection scope of the patent of this application shall be subject to the appended claims.

Claims (28)

  1. 一种应用程序处理方法,所述方法包括:An application processing method, the method includes:
    当检测到通信消息时,获取所述通信消息中包含的目标应用标识和目标服务信息,其中,所述目标应用标识用于标示接收所述通信消息的目标应用程序,所述目标服务信息用于标示生成所述通信消息的服务;When a communication message is detected, a target application identifier and target service information contained in the communication message are obtained, wherein the target application identifier is used to mark a target application program that receives the communication message, and the target service information is used to Mark the service that generates the communication message;
    当检测到所述目标应用程序处于冻结状态时,获取处理列表;When it is detected that the target application is in a frozen state, obtain a processing list;
    从所述处理列表中查找与所述目标应用标识和目标服务信息对应的处理信息;Searching processing information corresponding to the target application identifier and target service information from the processing list;
    当所述处理信息为唤醒信息时,将所述目标应用程序进行唤醒处理。When the processing information is wake-up information, the target application program is subjected to wake-up processing.
  2. 根据权利要求1所述的方法,其特征在于,所述从所述处理列表中查找与所述目标应用标识和目标服务信息对应的唤醒信息,包括:The method according to claim 1, wherein the searching the wake-up information corresponding to the target application identifier and target service information from the processing list includes:
    将所述目标服务信息与所述处理列表中的参考服务信息进行匹配,得到所述参考服务信息对应的至少一个参考应用标识;Matching the target service information with the reference service information in the processing list to obtain at least one reference application identifier corresponding to the reference service information;
    当所述目标应用标识与所述至少一个参考应用标识相匹配时,从所述至少一个参考应用标识中查找与所述目标应用标识相匹配的所述匹配应用标识,获取所述匹配应用标识对应的唤醒信息。When the target application identifier matches the at least one reference application identifier, search for the matching application identifier matching the target application identifier from the at least one reference application identifier, and obtain the correspondence of the matching application identifier Wakeup message.
  3. 根据权利要求1所述的方法,其特征在于,所述当所述处理信息为唤醒信息时,将所述目标应用程序进行唤醒处理,包括:The method according to claim 1, wherein when the processing information is wake-up information, performing wake-up processing on the target application includes:
    当所述处理信息为唤醒信息时,获取运行中的候选应用程序的数量;When the processing information is wake-up information, obtain the number of running candidate application programs;
    当所述运行中的候选应用程序的数量大于数量阈值时,获取各个所述候选应用程序的运行信息;When the number of running candidate applications is greater than the number threshold, acquiring running information of each candidate application;
    根据所述运行信息从所述候选应用程序中获取冻结应用程序;Obtaining a frozen application program from the candidate application program according to the operation information;
    冻结所述冻结应用程序,并唤醒所述目标应用程序。Freeze the frozen application and wake up the target application.
  4. 根据权利要求3所述的方法,其特征在于,所述运行信息包括应用等级和后台运行时长,所述根据所述运行信息在所述运行中的应用程序中选择冻结应用程序,包括:The method according to claim 3, wherein the running information includes an application level and a background running duration, and the selecting to freeze an application among the running applications according to the running information includes:
    根据所述应用等级和后台运行时长获取各个候选应用程序的冻结参数,将所述冻结参数大于参数阈值的候选应用程序作为冻结应用程序。The freezing parameters of each candidate application program are obtained according to the application level and the background running time, and the candidate application program whose freezing parameter is greater than the parameter threshold is used as the freezing application program.
  5. 根据权利要求1所述的方法,其特征在于,所述当所述处理信息为唤醒信息时,将所述目标应用程序进行唤醒处理之后,还包括:The method according to claim 1, wherein when the processing information is wake-up information, after the wake-up processing of the target application program, the method further comprises:
    获取电子设备的资源总占用率;Obtain the total resource occupancy rate of electronic equipment;
    当所述资源总占用率超过第一占用率阈值时,控制被唤醒的所述目标应用程序进入资源限制状态;When the total resource occupancy rate exceeds the first occupancy rate threshold, control the target application that is woken up to enter a resource restriction state;
    其中,处于所述资源限制状态的应用程序在运行时对电子设备的资源占用率小于第二占用率阈值,所述第一占用率阈值大于第二占用率阈值。Wherein, the resource occupancy rate of the application in the resource limitation state to the electronic device when running is less than a second occupancy rate threshold, and the first occupancy rate threshold is greater than the second occupancy rate threshold.
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述当所述处理信息为唤醒信息时,将所述目标应用程序进行唤醒处理之后,还包括:The method according to any one of claims 1 to 5, wherein, when the processing information is wake-up information, after the wake-up processing of the target application program, the method further includes:
    从所述目标应用程序被唤醒的时刻开始计时;Start timing from the moment when the target application is awakened;
    当计时时长超过时长阈值时,冻结所述目标应用程序。When the time duration exceeds the duration threshold, the target application is frozen.
  7. 根据权利要求6所述的方法,其特征在于,所述当计时时长超过时长阈值时,冻结所述目标应用程序之前,还包括:The method according to claim 6, wherein, when the time duration exceeds the time threshold, before freezing the target application, further comprising:
    获取被唤醒的目标应用程序接收通信消息的接收频率,并根据所述接收频率获取对应的时长阈值。Acquire the receiving frequency of the awakened target application to receive the communication message, and obtain the corresponding duration threshold according to the receiving frequency.
  8. 一种应用程序处理装置,所述装置包括:An application processing device, the device includes:
    通信信息获取模块,用于当检测到通信消息时,获取所述通信消息中包含的目标应用标识和目标服务信息,其中,所述目标应用标识用于标示接收所述通信消息的目标应用程序,所述目标服务信息用于标示生成所述通信消息的服务;A communication information obtaining module, configured to obtain a target application identifier and target service information contained in the communication message when a communication message is detected, wherein the target application identifier is used to mark a target application program that receives the communication message, The target service information is used to mark a service that generates the communication message;
    处理列表获取模块,用于当检测到所述目标应用程序处于冻结状态时,获取处理列表;A processing list obtaining module, configured to obtain a processing list when it is detected that the target application is in a frozen state;
    查找模块,用于从所述处理列表中查找与所述目标应用标识和目标服务信息对应的处理信息;A searching module, configured to search processing information corresponding to the target application identifier and target service information from the processing list;
    唤醒模块,用于当所述处理信息为唤醒信息时,将所述目标应用程序进行唤醒处理。The wake-up module is configured to wake-up the target application program when the processing information is wake-up information.
  9. 根据权利要求8所述的装置,其特征在于,所述查找模块还用于将所述目标服务信息与所述处理列表中的参考服务信息进行匹配,得到所述参考服务信息对应的至少一个参考应用标识;当所述目标应用标识与所述至少一个参考应用标识相匹配时,从所述至少一个参考应用标识中查找与所述目标应用标识相匹配的所述匹配应用标识,获取所述匹配应用标识对应的唤醒信息。The apparatus according to claim 8, wherein the search module is further configured to match the target service information with reference service information in the processing list to obtain at least one reference corresponding to the reference service information Application identifier; when the target application identifier matches the at least one reference application identifier, look up the matching application identifier matching the target application identifier from the at least one reference application identifier to obtain the match The wake-up information corresponding to the application ID.
  10. 根据权利要求8所述的装置,其特征在于,所述唤醒模块还用于当所述处理信息为 唤醒信息时,获取运行中的候选应用程序的数量;当所述运行中的候选应用程序的数量大于数量阈值时,获取各个所述候选应用程序的运行信息;根据所述运行信息从所述候选应用程序中获取冻结应用程序;冻结所述冻结应用程序,并唤醒所述目标应用程序。The apparatus according to claim 8, wherein the wake-up module is further configured to obtain the number of running candidate applications when the processing information is wake-up information; when the running candidate applications When the number is greater than the number threshold, obtain the running information of each candidate application; obtain the frozen application from the candidate application according to the running information; freeze the frozen application, and wake up the target application.
  11. 根据权利要求10所述的装置,其特征在于,所述唤醒模块还用于根据所述应用等级和后台运行时长获取各个候选应用程序的冻结参数,将所述冻结参数大于参数阈值的候选应用程序作为冻结应用程序。The apparatus according to claim 10, wherein the wake-up module is further configured to obtain freeze parameters of each candidate application according to the application level and background running time, and to select the candidate application whose freeze parameter is greater than a parameter threshold As a frozen application.
  12. 根据权利要求8所述的装置,其特征在于,所述应用程序处理装置还包括:The device according to claim 8, wherein the application processing device further comprises:
    资源限制模块,用于获取电子设备的资源总占用率;当所述资源总占用率超过第一占用率阈值时,控制被唤醒的所述目标应用程序进入资源限制状态;其中,处于所述资源限制状态的应用程序在运行时对电子设备的资源占用率小于第二占用率阈值,所述第一占用率阈值大于第二占用率阈值。A resource restriction module, used to obtain the total resource occupancy rate of the electronic device; when the total resource occupancy rate exceeds the first occupancy threshold, control the target application that is woken up to enter a resource restriction state; The resource occupancy rate of the application in the restricted state to the electronic device when running is less than the second occupancy rate threshold, and the first occupancy rate threshold is greater than the second occupancy rate threshold.
  13. 根据权利要求8至12中任一项所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 8 to 12, wherein the device further comprises:
    冻结模块,用于从所述目标应用程序被唤醒的时刻开始计时;当计时时长超过时长阈值时,冻结所述目标应用程序。The freezing module is used to start timing from the moment when the target application is awakened; when the time duration exceeds the time threshold, freeze the target application.
  14. 根据权利要求13所述的装置,其特征在于,所述冻结模块还用于获取被唤醒的目标应用程序接收通信消息的接收频率,并根据所述接收频率获取对应的时长阈值。The apparatus according to claim 13, wherein the freezing module is further used to obtain a frequency of receiving the communication message received by the awakened target application, and obtain a corresponding duration threshold according to the frequency of reception.
  15. 一种电子设备,包括存储器和处理器,所述存储器存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如下步骤:An electronic device includes a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor is caused to perform the following steps:
    当检测到通信消息时,获取所述通信消息中包含的目标应用标识和目标服务信息,其中,所述目标应用标识用于标示接收所述通信消息的目标应用程序,所述目标服务信息用于标示生成所述通信消息的服务;When a communication message is detected, a target application identifier and target service information contained in the communication message are obtained, wherein the target application identifier is used to mark a target application program that receives the communication message, and the target service information is used to Mark the service that generates the communication message;
    当检测到所述目标应用程序处于冻结状态时,获取处理列表;When it is detected that the target application is in a frozen state, obtain a processing list;
    从所述处理列表中查找与所述目标应用标识和目标服务信息对应的处理信息;Searching processing information corresponding to the target application identifier and target service information from the processing list;
    当所述处理信息为唤醒信息时,将所述目标应用程序进行唤醒处理。When the processing information is wake-up information, the target application program is subjected to wake-up processing.
  16. 根据权利要求15所述的电子设备,其特征在于,所述计算机程序被所述处理器执行从所述处理列表中查找与所述目标应用标识和目标服务信息对应的唤醒信息的步骤时,还执行如下步骤:The electronic device according to claim 15, wherein when the computer program is executed by the processor to search for wake-up information corresponding to the target application identification and target service information from the processing list, Perform the following steps:
    将所述目标服务信息与所述处理列表中的参考服务信息进行匹配,得到所述参考服务信息对应的至少一个参考应用标识;Matching the target service information with the reference service information in the processing list to obtain at least one reference application identifier corresponding to the reference service information;
    当所述目标应用标识与所述至少一个参考应用标识相匹配时,从所述至少一个参考应用标识中查找与所述目标应用标识相匹配的所述匹配应用标识,获取所述匹配应用标识对应的唤醒信息。When the target application identifier matches the at least one reference application identifier, search for the matching application identifier matching the target application identifier from the at least one reference application identifier, and obtain the correspondence of the matching application identifier Wakeup message.
  17. 根据权利要求1所述的电子设备,其特征在于,所述计算机程序被所述处理器执行当所述处理信息为唤醒信息时,将所述目标应用程序进行唤醒处理的步骤时,还执行如下步骤:The electronic device according to claim 1, wherein the computer program is executed by the processor when the processing information is the wake-up information, the step of waking up the target application program is also executed as follows step:
    当所述处理信息为唤醒信息时,获取运行中的候选应用程序的数量;When the processing information is wake-up information, obtain the number of running candidate application programs;
    当所述运行中的候选应用程序的数量大于数量阈值时,获取各个所述候选应用程序的运行信息;When the number of running candidate applications is greater than the number threshold, acquiring running information of each candidate application;
    根据所述运行信息从所述候选应用程序中获取冻结应用程序;Obtaining a frozen application program from the candidate application program according to the operation information;
    冻结所述冻结应用程序,并唤醒所述目标应用程序。Freeze the frozen application and wake up the target application.
  18. 根据权利要求3所述的电子设备,其特征在于,所述计算机程序被所述处理器执行运行信息包括应用等级和后台运行时长,所述根据所述运行信息在所述运行中的应用程序中选择冻结应用程序的步骤时,还执行如下步骤:The electronic device according to claim 3, wherein the computer program is executed by the processor. The running information includes an application level and a background running time, and the running application is based on the running information in the running application. When selecting the steps to freeze the application, the following steps are also performed:
    根据所述应用等级和后台运行时长获取各个候选应用程序的冻结参数,将所述冻结参数大于参数阈值的候选应用程序作为冻结应用程序。The freezing parameters of each candidate application program are obtained according to the application level and the background running time, and the candidate application program whose freezing parameter is greater than the parameter threshold is used as the freezing application program.
  19. 根据权利要求1所述的电子设备,其特征在于,所述计算机程序被所述处理器执行当所述处理信息为唤醒信息时,将所述目标应用程序进行唤醒处理的步骤之后,还执行如下步骤:The electronic device according to claim 1, wherein the computer program is executed by the processor after the step of waking up the target application program when the processing information is wake-up information, the following is also executed: step:
    获取电子设备的资源总占用率;Obtain the total resource occupancy rate of electronic equipment;
    当所述资源总占用率超过第一占用率阈值时,控制被唤醒的所述目标应用程序进入资源限制状态;When the total resource occupancy rate exceeds the first occupancy rate threshold, control the target application that is woken up to enter a resource restriction state;
    其中,处于所述资源限制状态的应用程序在运行时对电子设备的资源占用率小于第二占用率阈值,所述第一占用率阈值大于第二占用率阈值。Wherein, the resource occupancy rate of the application in the resource limitation state to the electronic device when running is less than a second occupancy rate threshold, and the first occupancy rate threshold is greater than the second occupancy rate threshold.
  20. 根据权利要求1至5中任一项所述的电子设备,其特征在于,所述计算机程序被所述处理器执行当所述处理信息为唤醒信息时,将所述目标应用程序进行唤醒处理的步骤之后, 还执行如下步骤:The electronic device according to any one of claims 1 to 5, wherein the computer program is executed by the processor when the processing information is wake-up information, the target application program is subjected to wake-up processing After the steps, the following steps are also performed:
    从所述目标应用程序被唤醒的时刻开始计时;Start timing from the moment when the target application is awakened;
    当计时时长超过时长阈值时,冻结所述目标应用程序。When the time duration exceeds the duration threshold, the target application is frozen.
  21. 根据权利要求6所述的电子设备,其特征在于,所述计算机程序被所述处理器执行当计时时长超过时长阈值时,冻结所述目标应用程序的步骤之前,还执行如下步骤:The electronic device according to claim 6, wherein the computer program is executed by the processor before the step of freezing the target application when the time duration exceeds the time threshold, the following steps are further performed:
    获取被唤醒的目标应用程序接收通信消息的接收频率,并根据所述接收频率获取对应的时长阈值。Acquire the receiving frequency of the awakened target application to receive the communication message, and obtain the corresponding duration threshold according to the receiving frequency.
  22. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如下步骤:A computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the following steps are realized:
    当检测到通信消息时,获取所述通信消息中包含的目标应用标识和目标服务信息,其中,所述目标应用标识用于标示接收所述通信消息的目标应用程序,所述目标服务信息用于标示生成所述通信消息的服务;When a communication message is detected, a target application identifier and target service information contained in the communication message are obtained, wherein the target application identifier is used to mark a target application program that receives the communication message, and the target service information is used to Mark the service that generates the communication message;
    当检测到所述目标应用程序处于冻结状态时,获取处理列表;When it is detected that the target application is in a frozen state, obtain a processing list;
    从所述处理列表中查找与所述目标应用标识和目标服务信息对应的处理信息;Searching processing information corresponding to the target application identifier and target service information from the processing list;
    当所述处理信息为唤醒信息时,将所述目标应用程序进行唤醒处理。When the processing information is wake-up information, the target application program is subjected to wake-up processing.
  23. 根据权利要求22所述的计算机可读存储介质,其特征在于,所述计算机程序被所述处理器执行从所述处理列表中查找与所述目标应用标识和目标服务信息对应的唤醒信息的步骤时,还执行如下步骤:The computer-readable storage medium according to claim 22, wherein the computer program is executed by the processor to look up wake-up information corresponding to the target application identifier and target service information from the processing list , The following steps are also performed:
    将所述目标服务信息与所述处理列表中的参考服务信息进行匹配,得到所述参考服务信息对应的至少一个参考应用标识;Matching the target service information with the reference service information in the processing list to obtain at least one reference application identifier corresponding to the reference service information;
    当所述目标应用标识与所述至少一个参考应用标识相匹配时,从所述至少一个参考应用标识中查找与所述目标应用标识相匹配的所述匹配应用标识,获取所述匹配应用标识对应的唤醒信息。When the target application identifier matches the at least one reference application identifier, search for the matching application identifier matching the target application identifier from the at least one reference application identifier, and obtain the correspondence of the matching application identifier Wakeup message.
  24. 根据权利要求22所述的计算机可读存储介质,其特征在于,所述计算机程序被所述处理器执行当所述处理信息为唤醒信息时,将所述目标应用程序进行唤醒处理的步骤时,还执行如下步骤:The computer-readable storage medium according to claim 22, wherein the computer program is executed by the processor when the processing information is the wake-up information, when the target application program is subjected to a wake-up processing step, Also perform the following steps:
    当所述处理信息为唤醒信息时,获取运行中的候选应用程序的数量;When the processing information is wake-up information, obtain the number of running candidate application programs;
    当所述运行中的候选应用程序的数量大于数量阈值时,获取各个所述候选应用程序的运行信息;When the number of running candidate applications is greater than the number threshold, acquiring running information of each candidate application;
    根据所述运行信息从所述候选应用程序中获取冻结应用程序;Obtaining a frozen application program from the candidate application program according to the operation information;
    冻结所述冻结应用程序,并唤醒所述目标应用程序。Freeze the frozen application and wake up the target application.
  25. 根据权利要求24所述的计算机可读存储介质,其特征在于,所述计算机程序被所述处理器执行运行信息包括应用等级和后台运行时长,所述根据所述运行信息在所述运行中的应用程序中选择冻结应用程序的步骤时,还执行如下步骤:The computer-readable storage medium according to claim 24, wherein the computer program is executed by the processor. The running information includes an application level and a background running time, and the running information is based on the running information. When selecting the step of freezing the application in the application, the following steps are also performed:
    根据所述应用等级和后台运行时长获取各个候选应用程序的冻结参数,将所述冻结参数大于参数阈值的候选应用程序作为冻结应用程序。The freezing parameters of each candidate application program are obtained according to the application level and the background running time, and the candidate application program whose freezing parameter is greater than the parameter threshold is used as the freezing application program.
  26. 根据权利要求22所述的计算机可读存储介质,其特征在于,所述计算机程序被所述处理器执行当所述处理信息为唤醒信息时,将所述目标应用程序进行唤醒处理的步骤之后,还执行如下步骤:The computer-readable storage medium of claim 22, wherein the computer program is executed by the processor after the step of waking up the target application program when the processing information is wake-up information, Also perform the following steps:
    获取电子设备的资源总占用率;Obtain the total resource occupancy rate of electronic equipment;
    当所述资源总占用率超过第一占用率阈值时,控制被唤醒的所述目标应用程序进入资源限制状态;When the total resource occupancy rate exceeds the first occupancy rate threshold, control the target application that is woken up to enter a resource restriction state;
    其中,处于所述资源限制状态的应用程序在运行时对电子设备的资源占用率小于第二占用率阈值,所述第一占用率阈值大于第二占用率阈值。Wherein, the resource occupancy rate of the application in the resource limitation state to the electronic device when running is less than a second occupancy rate threshold, and the first occupancy rate threshold is greater than the second occupancy rate threshold.
  27. 根据权利要求22至26中任一项所述的计算机可读存储介质,其特征在于,所述计算机程序被所述处理器执行当所述处理信息为唤醒信息时,将所述目标应用程序进行唤醒处理的步骤之后,还执行如下步骤:The computer-readable storage medium according to any one of claims 22 to 26, wherein the computer program is executed by the processor when the processing information is wake-up information, the target application program is executed After the steps of the wake-up process, the following steps are also performed:
    从所述目标应用程序被唤醒的时刻开始计时;Start timing from the moment when the target application is awakened;
    当计时时长超过时长阈值时,冻结所述目标应用程序。When the time duration exceeds the duration threshold, the target application is frozen.
  28. 根据权利要求27所述的计算机可读存储介质,其特征在于,所述计算机程序被所述处理器执行当计时时长超过时长阈值时,冻结所述目标应用程序的步骤之前,还执行如下步骤:The computer-readable storage medium according to claim 27, wherein the computer program is executed by the processor before the step of freezing the target application when the time duration exceeds the time threshold, the following steps are further performed:
    获取被唤醒的目标应用程序接收通信消息的接收频率,并根据所述接收频率获取对应的时长阈值。Acquire the receiving frequency of the awakened target application to receive the communication message, and obtain the corresponding duration threshold according to the receiving frequency.
PCT/CN2018/114003 2018-11-05 2018-11-05 Application processing method and apparatus, computer device, and computer readable storage medium WO2020093208A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/114003 WO2020093208A1 (en) 2018-11-05 2018-11-05 Application processing method and apparatus, computer device, and computer readable storage medium
CN201880097679.7A CN112703714B (en) 2018-11-05 2018-11-05 Application processing method and device, computer equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/114003 WO2020093208A1 (en) 2018-11-05 2018-11-05 Application processing method and apparatus, computer device, and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2020093208A1 true WO2020093208A1 (en) 2020-05-14

Family

ID=70611285

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/114003 WO2020093208A1 (en) 2018-11-05 2018-11-05 Application processing method and apparatus, computer device, and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN112703714B (en)
WO (1) WO2020093208A1 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111918386A (en) * 2020-07-03 2020-11-10 Oppo广东移动通信有限公司 Positioning method, positioning device, storage medium and electronic equipment
CN112131482A (en) * 2020-10-10 2020-12-25 腾讯科技(深圳)有限公司 Aging determination method and related device
CN112612526A (en) * 2020-12-24 2021-04-06 深圳市九洲电器有限公司 Application program control method and device, terminal device and storage medium
CN112653615A (en) * 2020-12-16 2021-04-13 努比亚技术有限公司 Management and control method, terminal and computer readable medium for instant messaging application
CN112667407A (en) * 2021-01-18 2021-04-16 成都国科微电子有限公司 Processor parameter adjusting method and device, electronic equipment and storage medium
CN112711471A (en) * 2020-12-31 2021-04-27 中移(杭州)信息技术有限公司 Big data task execution method and device, server and storage medium
CN112764512A (en) * 2021-01-26 2021-05-07 维沃移动通信有限公司 Power saving control method and device, electronic equipment and readable storage medium
CN114860460A (en) * 2022-07-05 2022-08-05 深圳市遇贤微电子有限公司 Database acceleration method and device and computer equipment
CN112612526B (en) * 2020-12-24 2024-04-19 深圳市九洲电器有限公司 Application program control method, device, terminal equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051516A (en) * 2011-10-17 2013-04-17 腾讯科技(深圳)有限公司 Message prompting method and device of instant messaging client
CN103259714A (en) * 2013-04-28 2013-08-21 深圳市深信服电子科技有限公司 Instant information notification method and device
CN104468645A (en) * 2013-09-13 2015-03-25 联想(北京)有限公司 Control method, electronic equipment, and information transmission method and device
CN108243085A (en) * 2016-12-26 2018-07-03 腾讯科技(深圳)有限公司 Push, setting method and the device of communication group status indicator

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100526562B1 (en) * 2003-03-26 2005-11-03 삼성전자주식회사 method for acting application program in mobile communication terminal and method for providing service data in service system of mobile communication network
CN104717342B (en) * 2013-12-11 2018-11-09 阿里巴巴集团控股有限公司 A kind of method and device waking up client application based on short message
CN106791004B (en) * 2016-11-28 2020-01-10 北京安云世纪科技有限公司 Automatic application awakening method and device and mobile terminal
CN107466094A (en) * 2017-08-02 2017-12-12 努比亚技术有限公司 Network data method for controlling reporting, coprocessor, terminal and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051516A (en) * 2011-10-17 2013-04-17 腾讯科技(深圳)有限公司 Message prompting method and device of instant messaging client
CN103259714A (en) * 2013-04-28 2013-08-21 深圳市深信服电子科技有限公司 Instant information notification method and device
CN104468645A (en) * 2013-09-13 2015-03-25 联想(北京)有限公司 Control method, electronic equipment, and information transmission method and device
CN108243085A (en) * 2016-12-26 2018-07-03 腾讯科技(深圳)有限公司 Push, setting method and the device of communication group status indicator

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111918386B (en) * 2020-07-03 2023-09-29 Oppo广东移动通信有限公司 Positioning method, positioning device, storage medium and electronic equipment
CN111918386A (en) * 2020-07-03 2020-11-10 Oppo广东移动通信有限公司 Positioning method, positioning device, storage medium and electronic equipment
CN112131482A (en) * 2020-10-10 2020-12-25 腾讯科技(深圳)有限公司 Aging determination method and related device
CN112131482B (en) * 2020-10-10 2023-12-08 腾讯科技(深圳)有限公司 Aging determining method and related device
CN112653615A (en) * 2020-12-16 2021-04-13 努比亚技术有限公司 Management and control method, terminal and computer readable medium for instant messaging application
CN112612526A (en) * 2020-12-24 2021-04-06 深圳市九洲电器有限公司 Application program control method and device, terminal device and storage medium
CN112612526B (en) * 2020-12-24 2024-04-19 深圳市九洲电器有限公司 Application program control method, device, terminal equipment and storage medium
CN112711471A (en) * 2020-12-31 2021-04-27 中移(杭州)信息技术有限公司 Big data task execution method and device, server and storage medium
CN112667407B (en) * 2021-01-18 2023-09-19 成都国科微电子有限公司 Processor parameter adjusting method and device, electronic equipment and storage medium
CN112667407A (en) * 2021-01-18 2021-04-16 成都国科微电子有限公司 Processor parameter adjusting method and device, electronic equipment and storage medium
CN112764512A (en) * 2021-01-26 2021-05-07 维沃移动通信有限公司 Power saving control method and device, electronic equipment and readable storage medium
CN112764512B (en) * 2021-01-26 2024-03-01 维沃移动通信有限公司 Power saving control method, device, electronic equipment and readable storage medium
CN114860460A (en) * 2022-07-05 2022-08-05 深圳市遇贤微电子有限公司 Database acceleration method and device and computer equipment

Also Published As

Publication number Publication date
CN112703714B (en) 2023-05-05
CN112703714A (en) 2021-04-23

Similar Documents

Publication Publication Date Title
WO2020093208A1 (en) Application processing method and apparatus, computer device, and computer readable storage medium
WO2019128546A1 (en) Application program processing method, electronic device, and computer readable storage medium
WO2016188260A1 (en) Communication message sending method and device
CN109144232B (en) Process processing method and device, electronic equipment and computer readable storage medium
WO2017008569A1 (en) Message updating method, apparatus, and terminal
CN107368400B (en) CPU monitoring method and device, computer readable storage medium and mobile terminal
CN106775685B (en) Awakening lock release method and device and mobile terminal
CN107577508B (en) Application processing method and device, readable storage medium and mobile terminal
CN108334345B (en) Application processing method and device, readable storage medium and mobile terminal
CN108541013B (en) Information processing method, device, mobile terminal and computer readable storage medium
CN110032266B (en) Information processing method, information processing device, computer equipment and computer readable storage medium
WO2019128537A1 (en) Application freezing method, and computer device and computer-readable storage medium
WO2018214744A1 (en) Information processing method and related product
CN109992425B (en) Information processing method, information processing device, computer equipment and computer readable storage medium
WO2019128586A1 (en) Application processing method, electronic device, and computer readable storage medium
WO2019128569A1 (en) Method and apparatus for freezing application, and storage medium and terminal
CN107659718B (en) Method and device for controlling mobile terminal, mobile terminal and storage medium
CN109992323B (en) Process processing method and device, electronic equipment and computer readable storage medium
CN107341032B (en) Data loading method, mobile terminal and computer readable storage medium
CN110543333A (en) Dormancy processing method and device for processor, mobile terminal and storage medium
WO2019128553A1 (en) Application processing method, electronic device, and computer-readable storage medium
CN108646909B (en) Information processing method, device, mobile terminal and computer readable storage medium
CN109511139B (en) WIFI control method and device, mobile device and computer-readable storage medium
CN110046033B (en) Application program processing method and device, electronic equipment and computer readable storage medium
CN109992360B (en) Process processing method and device, electronic equipment and computer readable storage medium

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: 18939661

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18939661

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 17/09/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18939661

Country of ref document: EP

Kind code of ref document: A1