CN113127094A - Application program running method and device, storage medium and terminal - Google Patents

Application program running method and device, storage medium and terminal Download PDF

Info

Publication number
CN113127094A
CN113127094A CN202110422612.XA CN202110422612A CN113127094A CN 113127094 A CN113127094 A CN 113127094A CN 202110422612 A CN202110422612 A CN 202110422612A CN 113127094 A CN113127094 A CN 113127094A
Authority
CN
China
Prior art keywords
application program
background
protection
target application
running
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110422612.XA
Other languages
Chinese (zh)
Inventor
朱铭锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202110422612.XA priority Critical patent/CN113127094A/en
Publication of CN113127094A publication Critical patent/CN113127094A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

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

Abstract

The application discloses an application program running method, an application program running device, a storage medium and a terminal, and relates to the technical field of application program technology development. Firstly, after monitoring that the application program is in the background, generating a protection list in real time based on historical use data of all application programs currently in the background, and then performing background operation protection on a target application program in the protection list. When the application program is monitored to be in the background, the protection lists corresponding to all application programs currently in the background can be generated, so that background operation protection can be performed on the target application program in the protection lists, the target application program cannot be cleaned and quitted by a system after the background operation protection is performed on the target application program, hot start can be achieved when the target application program is opened again by a user, and the time for the user to start the target application program is greatly reduced.

Description

Application program running method and device, storage medium and terminal
Technical Field
The present application relates to the technical field of application program technology development, and in particular, to an application program running method, an application program running device, a storage medium, and a terminal.
Background
With the development of science and technology, terminals are also increasingly appearing in people's lives, and people can run various applications in the terminals to realize various functions, so that a method for running the applications in the terminals becomes one of the important points of research of technicians in the field.
Disclosure of Invention
The application provides an application program running method, an application program running device, a storage medium and a terminal, and the technical problems that in the related art, after an application program is in a background, the application program is easily cleaned and quitted by a system, and when a user opens the application program again, the user needs to wait for a long time are solved.
In a first aspect, the present application provides an application program running method, including:
after monitoring that the application programs are in the background, generating a protection list in real time based on historical use data of all the application programs currently in the background;
and performing background operation protection on the target application program in the protection list.
In a second aspect, the present application provides an application running apparatus, including:
the list acquisition module is used for generating a protection list in real time based on historical use data of all application programs currently in the background after monitoring that the application programs are in the background;
and the program protection module is used for carrying out background operation protection on the target application program in the protection list.
In a third aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the steps of the above-mentioned method.
In a fourth aspect, embodiments of the present application provide a terminal including a memory, a processor, and a computer program stored on the memory and executable on the processor.
The beneficial effects brought by the technical scheme provided by some embodiments of the application at least comprise:
the application provides an application program running method, which comprises the steps of firstly monitoring that an application program is in a background, then generating a protection list in real time based on historical use data of all application programs currently in the background, and then carrying out background running protection on a target application program in the protection list. When the application program is monitored to be in the background, the protection lists corresponding to all application programs currently in the background can be generated, so that background operation protection can be performed on the target application program in the protection lists, the target application program cannot be cleaned and quitted by a system after the background operation protection is performed on the target application program, hot start can be achieved when the target application program is opened again by a user, and the time for the user to start the target application program is greatly reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is an exemplary system architecture diagram of an application running method according to an embodiment of the present application;
fig. 2 is a system interaction diagram of an application program operation method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of an application running method according to an embodiment of the present application;
fig. 4 is a flowchart illustrating an application running method according to another embodiment of the present application;
fig. 5 is a schematic diagram illustrating generation of a protection list according to another embodiment of the present application;
fig. 6 is a flowchart illustrating an application running method according to another embodiment of the present application;
fig. 7 is a schematic diagram illustrating a user inputting a background protection start instruction according to another embodiment of the present application;
fig. 8 is a schematic structural diagram of an application running apparatus according to another embodiment of the present application;
fig. 9 is a schematic structural diagram of an application running apparatus according to another embodiment of the present application;
fig. 10 is a schematic structural diagram of an application running apparatus according to another embodiment of the present application;
fig. 11 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
In order to make the features and advantages of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
Fig. 1 is an exemplary system architecture diagram of an application running method according to an embodiment of the present application.
As shown in fig. 1, the system architecture may include a terminal 101, a network 102, and a server 103. Network 102 is the medium used to provide communication links between terminals 101 and servers 103. Network 102 may include various types of wired or wireless communication links, such as: the wired communication link includes an optical fiber, a twisted pair wire or a coaxial cable, and the Wireless communication link includes a bluetooth communication link, a Wireless-Fidelity (Wi-Fi) communication link, a microwave communication link, or the like.
The terminal 101 may interact with the server 103 through the network 102 to receive messages from the server 103 or to send messages to the server 103. The terminal 101 may be hardware or software. When the terminal 101 is hardware, it can be a variety of electronic devices including, but not limited to, smart watches, smart phones, tablet computers, laptop portable computers, desktop computers, and the like. When the terminal 101 is software, it may be installed in the electronic devices listed above, and it may be implemented as multiple software or software modules (for example, for providing distributed services), or as a single software or software module, and is not limited in this respect.
The server 103 may be a business server providing various services. The server 103 may be hardware or software. When the server 103 is hardware, it may be implemented as a distributed server cluster composed of a plurality of servers, or may be implemented as a single server. When the server 103 is software, it may be implemented as a plurality of software or software modules (for example, to provide distributed services), or may be implemented as a single software or software module, and is not limited in particular herein.
It should be understood that the number of terminals, networks, and servers in fig. 1 is merely illustrative, and that any number of terminals, networks, and servers may be used, as desired for an implementation.
Referring to fig. 2, fig. 2 is a system interaction diagram of an application program running method according to an embodiment of the present application, it can be understood that, in the embodiment of the present application, an execution main body may be a terminal or a processor in the terminal, and may also be a service related to the execution of an application program in the terminal, and for convenience of description, a system interaction process in an application program running method is introduced with reference to fig. 1 and fig. 2, taking the execution main body as the processor in the terminal as an example.
S201, the user logs in the application program to the background.
S202, after monitoring that the application programs are in the background, generating a protection list in real time based on historical use data of all the application programs currently in the background.
Optionally, the generating the protection list in real time based on the historical usage data of all the applications currently in the background includes: acquiring use data of all application programs currently in a background, and determining use preference values corresponding to all the application programs according to the use data; and generating a protection list in real time according to the use preference values corresponding to all the application programs and the preset running memory threshold value.
Optionally, the generating a protection list in real time according to the use preference values corresponding to all the application programs and the preset running memory threshold includes: according to a priority ranking rule of using preference values from high to low, performing priority ranking on all application programs to obtain a ranking list; generating a protection list in real time based on the priority sequence corresponding to all the application programs, the current occupied operation memory corresponding to all the application programs and a preset operation memory threshold value; the sum of the currently occupied operating memory corresponding to each target application program in the protection list is smaller than a preset operating memory threshold, and the priority of any target application program in the protection list in the sorting table is larger than the priority of any application program not in the protection list.
S203, performing background operation protection on the target application program in the protection list.
Optionally, performing background operation protection on the target application program in the protection list, including: locking the target application program in the protection list into a running state in the background, and performing background freezing on the target function of the target application program; starting a network firewall corresponding to the target application program, wherein the firewall is used for controlling the network connection state of the target application program, and the network connection state of the target application program is a disconnection state when the firewall is started; and sending an abnormal data packet to a server corresponding to the target application program, wherein the abnormal data packet carries the network connection state of the target application program, and the abnormal data packet is used for indicating the server to establish communication with the target application program when the network connection state of the target application program is a connected state.
Optionally, performing background operation protection on the target application program in the protection list, including: monitoring a real-time available operation memory of the terminal; when the real-time available running memory is larger than the first cleaning running memory threshold value and smaller than the second cleaning running memory threshold value, quitting at least one application program to be cleaned in the background in a preset cleaning list until the real-time occupied running memory is smaller than or equal to the first cleaning running memory threshold value; when the real-time available running memory is larger than a second cleaning running memory threshold value, quitting at least one target application program to be cleaned with the minimum priority in the protection list until the real-time occupied running memory is smaller than or equal to the second cleaning running memory threshold value; and deleting the target application program to be cleaned from the protection list, and updating the protection list based on the historical use data of all application programs currently in the background.
Optionally, performing background operation protection on the target application program in the protection list, including: transferring a memory with preset capacity occupied by the target application program in the protection list in the running memory to a read-only memory, and restoring the memory with preset capacity to the running memory when the target application program is in the foreground.
Optionally, after performing run protection on the first target application in the background, the method further includes: and monitoring the running state of the target application program in the protection list, and updating the protection list based on historical use data of all application programs currently in the background after monitoring that the abnormal target application program in the target application program exits.
Optionally, the obtaining usage data of all application programs currently in the background, and determining respective usage preference values of all application programs according to the usage data includes: acquiring use data of all application programs currently in a background, wherein the use data at least comprises the opening times of the application programs in a preset period away from the current time and the total running time of the application programs in a foreground; calculating the use preference value corresponding to each application program according to the use data and the use preference value formula;
wherein, the usage preference value formula is as follows:
Figure BDA0003027581300000051
y is the application program usage preference value, x is a certain time from the current time within a preset time period, txThe time is the opening times of the application program in the preset period from the current time, T is the total time length of the application program running in the foreground in the preset period from the current time, and n is the weight between the opening times of the application program in the preset period from the current time and the total time length of the application program running in the foreground.
Optionally, after monitoring that the application program is in the background, before generating a protection list in real time based on historical usage data of all application programs currently in the background, the method further includes: receiving a background protection starting instruction input by a user, executing and monitoring the application programs in the background based on the background protection starting instruction, and then generating a protection list in real time based on historical use data of all the application programs currently in the background.
Optionally, the application program is a preset type application program, and the cold start time of the preset type application program is greater than the preset start time.
In the embodiment of the application, after the application program is monitored to be in the background, a protection list is generated in real time based on historical use data of all application programs currently in the background, and then background operation protection is performed on a target application program in the protection list. When the application program is monitored to be in the background, the protection lists corresponding to all application programs currently in the background can be generated, so that background operation protection can be performed on the target application program in the protection lists, the target application program cannot be cleaned and quitted by a system after the background operation protection is performed on the target application program, hot start can be achieved when the target application program is opened again by a user, and the time for the user to start the target application program is greatly reduced.
Referring to fig. 3, fig. 3 is a flowchart illustrating an application running method according to an embodiment of the present disclosure.
As shown in fig. 3, the application program running method includes:
s301, after monitoring that the application programs are in the background, generating a protection list in real time based on historical use data of all the application programs currently in the background.
In the related art, for some applications with long starting time, such as game applications, the starting time of the applications is long due to loading of animation and game resources; moreover, due to the particularity of the application programs (occupying more running memory), the application programs are easily cleaned and quitted by the system after being in the background, and the user cannot warm start the application programs when opening the application programs again, so that the problem that the user waits for a long time is caused.
For the technical problem, after the terminal is started, the running state of the application program between a foreground and a background can be monitored through a preset component or a function, when the application program is monitored to be in the background, historical use data of all application programs currently in the background can be obtained first, the historical use data of the application program reflects the use condition of a user on the application program within a period of time, if the use condition of the application program is frequent, the application program can be considered to be required to be protected in the background after being in the background, and the application program is prevented from being quitted or cleaned by the system background.
Therefore, after the historical use data of all the application programs currently in the background is acquired, the application programs needing to be protected can be judged according to preset rules, algorithms or formulas, and a protection list can be generated in real time. The real-time generation of the protection list based on the historical usage data of all application programs currently in the background may be performed in various ways, for example, the protection list may be determined according to usage habits or usage preference values of the application programs in a preset time by a user, the protection list may be determined according to a usage scenario of the current terminal, and a basis for generating the protection list in real time is not limited herein.
S302, performing background operation protection on the target application program in the protection list.
After the protection list is generated in real time based on the historical use data of all application programs currently in the background, all application programs in the protection list can be determined to be target application programs, background operation protection is conducted on the target application programs, so that the target application programs are not quitted or cleaned by a system, important components or data of the target application programs are in an operating state, when a user needs to start one or more target application programs in the background to a foreground, the target application programs in the background can be directly and thermally started, and the starting time of the target application programs can be greatly saved.
Optionally, because the cold start time of the game-type application program or the design-type application program is long, background protection may be performed only on the application program of the type described above, that is, the application program is a preset-type application program, and the cold start time of the application program of the preset type may be defined to be greater than the preset start time, so that after it is monitored that the application program of the preset type is in the background, a protection list may be generated in real time based on historical usage data of all the application programs of the preset type currently in the background, and background operation protection may be performed on the target application program of the preset type in the protection list. The operation has the advantages that background protection is not needed to be carried out on some application programs with quick cold start, only the application programs with longer cold start time and preset types are subjected to background protection, the data processing amount of the terminal can be greatly reduced, and the power consumption is reduced.
In the embodiment of the application, after the application program is monitored to be in the background, a protection list is generated in real time based on historical use data of all application programs currently in the background, and then background operation protection is performed on a target application program in the protection list. When the application program is monitored to be in the background, the protection lists corresponding to all application programs currently in the background can be generated, so that background operation protection can be performed on the target application program in the protection lists, the target application program cannot be cleaned and quitted by a system after the background operation protection is performed on the target application program, hot start can be achieved when the target application program is opened again by a user, and the time for the user to start the target application program is greatly reduced.
Referring to fig. 4, fig. 4 is a flowchart illustrating an application running method according to another embodiment of the present application.
As shown in fig. 4, the application program running method includes:
s401, after the application programs are monitored to be in the background, acquiring the use data of all the application programs currently in the background, and determining the use preference values corresponding to all the application programs according to the use data.
In the embodiment of the present application, the manner of generating the protection list in real time based on the historical usage data of all application programs currently in the background may be various, and one feasible manner is to determine the protection list based on the usage preference value of the user for each application program, where the usage preference value of the application program represents the preference degree or the usage frequency of the user for the application program in a preset time, and the higher the usage preference value of the application program is, the higher the preference degree or the usage frequency of the user for the application program in the preset time is.
Optionally, after it is monitored that the application program is in the background, the usage data of all application programs currently in the background may be acquired, and the usage preference values corresponding to all application programs may be determined according to the usage data. The method for acquiring the use data of all application programs currently in the background may be that the use data of all application programs in the background is periodically recorded through a preset component or function and is stored at a prepared position, so that the use data of all application programs in the background can be quickly acquired after the application programs are monitored to be in the background. The method for determining the usage preference value corresponding to each of all the applications according to the usage data may be to determine the usage preference value of each application according to a preset preference value calculation formula.
Specifically, obtaining usage data of all application programs currently in the background, where the usage data at least includes the number of times of opening the application programs in a preset period from the current time and the total duration of running in the foreground, and then calculating usage preference values corresponding to all the application programs according to the usage data and a usage preference value formula, where the usage preference value formula is:
Figure BDA0003027581300000081
y is the application program usage preference value, x is a certain time from the current time within a preset time period, txThe number of times of opening the application program in a preset period from the current time, T is the total time length of the application program running in the foreground in the preset period from the current time, n is the distanceAnd weighting the opening times of the application program in the preset period of the current time and the total running time of the foreground.
The numerical value corresponding to n can be freely set according to the needs of the user, and the numerical value conforming to the use habit of the user can be calculated according to the opening times of the application program in daily use of the user and the data of the total running time of the application program in the foreground through a machine learning algorithm. For example, when a user opens an application more times within a preset time period for the application, but the running time in the foreground after each opening is shorter, which means that the user may only touch the application more times by mistake, the value of n may be decreased to decrease the weight of the opening times of the application compared with the total running time in the foreground.
S402, generating a protection list in real time according to the use preference values corresponding to all the application programs and the preset running memory threshold value.
After obtaining the usage preference values corresponding to all application programs currently in the background, a preset running Memory threshold may also be obtained, where the preset running Memory threshold is a threshold specially set for protecting some application programs in the background, because in actual application, the capacity corresponding to the maximum running Memory in the terminal is a certain capacity, and the capacity corresponding to the running Memory, that is, the capacity of a Random Access Memory (RAM), is a capacity, for example, the maximum running Memory of a certain terminal is 8G. In order to ensure the operation of other necessary applications in the terminal system, it is impossible to use all the operating memories to protect the applications in the background, and therefore the applications in the background can only be protected within the range corresponding to the preset operating memory threshold.
Specifically, the priority ranking is performed on all the application programs according to a priority ranking rule of the use preference values from high to low to obtain a ranking table, wherein in the above steps, the use preference values corresponding to all the application programs are already determined according to the use data, so that the use preference values corresponding to all the application programs can be directly obtained.
And then generating a protection list in real time based on the priority sequence corresponding to all the application programs, the current occupied operating memory corresponding to all the application programs and a preset operating memory threshold, wherein the sum of the current occupied operating memory corresponding to all the target application programs in the protection list is smaller than the preset operating memory threshold, and the priority of any target application program in the protection list in the sorting table is larger than the priority of any application program not in the protection list.
The sum of the currently occupied running memories corresponding to the target application programs in the protection list is smaller than a preset running memory threshold value, and represents a certain number of target application programs which can be accommodated at most in a range corresponding to the preset running memory threshold value; the priority of any target application program in the protection list in the sorting table is greater than that of any application program not in the protection list, which means that the target application programs in the protection list are all application programs sorted in the front on the premise that a certain number of target application programs can be accommodated at most, so as to meet the use preference of a user. Regarding the specific process of acquiring the protection list, refer to the generation process of the protection list in fig. 5.
Referring to fig. 5, fig. 5 is a schematic diagram illustrating generation of a protection list according to another embodiment of the present application.
As shown in fig. 5, the ranking table 510 lists the priority order corresponding to all the applications, wherein the first application has a sequence number of 1 in the ranking table 510, the corresponding priority is 1 (the lower the value corresponding to the priority, the higher the corresponding priority), the second application has a sequence number of 2 in the ranking table 510, the corresponding priority is 2, the third application has a sequence number of 3 in the ranking table 510, the corresponding priority is 3, the fourth application has a sequence number of 4 in the ranking table 510, the corresponding priority is 4, the fifth application has a sequence number of 5 in the ranking table 510, and the corresponding priority is 5.
Respectively obtaining the current occupied running memory of each application program in each sequencing table in the background, wherein the current occupied running memory of the first application program is 200M, the current occupied running memory of the second application program is 300M, the current occupied running memory of the third application program is 500M, the current occupied running memory of the fourth application program is 100M, the current occupied running memory of the fifth application program is 900M, and the preset running memory threshold value is 15000M, calculating whether the current occupied running memory of the first application program is smaller than the preset running memory threshold value according to the sequencing of each application program in the sequencing table 510, if so, calculating whether the current occupied running memory of the first application program and the current occupied running memory of the second application program are smaller than the preset running memory threshold value, and stopping accumulation until the accumulated value of the current occupied running memory of a certain number of application programs is larger than the preset running memory threshold value, and acquiring all target application programs corresponding to the accumulated value of the currently occupied running memory which is less than or equal to the preset running memory threshold value, and generating a protection list in real time according to each target application program. In fig. 5, the accumulated values of the currently occupied operating memories of the first to fifth applications are greater than the preset operating memory threshold, and the accumulated values of the currently occupied operating memories of the first to fourth applications are less than the preset operating memory threshold, so that it can be determined that the target applications in the protection list 520 are the first application, the second application, the third application, and the fourth application, and the priorities of the first application, the second application, the third application, and the fourth application are all greater than the priority of the fifth application not in the protection list 520.
In the embodiments, it is described that the protection list is generated in real time according to the use preference values corresponding to all the application programs and the preset running memory threshold, and in some embodiments, the protection list may also be determined according to the current environment parameter, for example, the current environment parameter of the terminal is first obtained through a preset system interface, the environment parameter at least includes one or more of a current location parameter, a current time parameter, and a current use scene parameter, and the current environment parameter of the terminal represents an environment where the user is located, so that the application programs that the user needs to start under different environment parameters are different, that is, the current environment parameter of the terminal may reflect habits or preferences of the user in using some application programs to some extent.
Preset parameters of all application programs in the background can be acquired through a preset system interface, the preset parameters at least comprise one or more of starting time, accumulated running time, starting times, starting places and use scenes in preset time, the preset parameters can reflect the actual running condition of each application program at certain moment in the preset time, the protection priorities of all application programs of the terminal, which are currently in the background, can be calculated according to the environmental parameters and the preset parameters, the protection priorities of all the application programs reflect the degree of the user continuously using the application programs or starting the application programs at any time at the current moment, and the higher the protection priorities are, the higher the degree of the user continuously using the application programs or starting the application programs at any time is, so that a protection list can be generated in real time according to the protection priorities of all the application programs.
And S403, locking the target application program in the protection list into a running state in the background, and performing background freezing on the target function of the target application program.
After the protection list is generated in real time, background operation protection can be performed on the target application programs in the protection list, wherein the target application programs can be regarded as all corresponding application programs in the protection list, and the number of the target application programs can be one or more. When background protection is performed on a target application program, protection can be performed from multiple layers, and for convenience of description, background protection is performed through a freezing layer, a communication layer, a cleaning layer and a memory management layer in the embodiment of the application.
Firstly, after the target application program is determined, the target application program in the protection list can be locked into the running state in the background so as to ensure that the target application program can not be quitted or killed by the system, and in the process of locking the target application program into the running state, the core component of the target application program can be kept in the running state, some peripheral components are forbidden, and the target application program is ensured to have the lowest running condition.
Furthermore, the target function of the target application program can be frozen in the background, wherein the target function can call unnecessary resources during running, the target application program can be controlled to prohibit calling of some unnecessary resources after the target function is frozen, and the necessary resource calling in the target application program is not influenced, so that the target application program cannot be abnormally quitted due to lack of necessary resources, wherein the target function of the target application program can be freely set according to the requirement, so that the data processing process of the target application program can be reduced, and the power consumption of background protection of the target application program is reduced.
S404, a network firewall corresponding to the target application program is opened, wherein the firewall is used for controlling the network connection state of the target application program, and the network connection state of the target application program is a disconnection state when the firewall is opened.
Further, in this embodiment of the present application, the firewall is configured to control a network connection state of the target application, so that the network firewall corresponding to the target application may also be opened, so that when the firewall corresponding to the target application is opened, the network connection state of the target application is a disconnected state, which is used to prevent a network communication packet between the target application and the server or other applications, wake up and unfreeze the frozen target application, and improve stability of performing background freezing on the target function of the target application.
S405, sending an abnormal data packet to the server corresponding to the target application program, wherein the abnormal data packet carries the network connection state of the target application program, and the abnormal data packet is used for indicating the server to establish communication with the target application program when the network connection state of the target application program is a communication state.
Further, an exception packet may be sent to the target application program counterpart server, for example, when the target application program is a game application program, the abnormal data packet may be a reset packet, the abnormal data packet carries the network connection state of the target application program, the abnormal data packet is used to indicate that the server is in a connected state when the network connection state of the target application program is a connected state, and establishes communication with the target application program, namely the server can confirm the network state of the target application program according to the abnormal data packet, therefore, the server can monitor the network state of the target server in real time through related components or threads according to the indication of the abnormal data packet, when the network connection state of the target application program is a connection state, the server can actively establish communication with the target server, so that the target server can be started quickly and run normally. Optionally, after the target application is in the foreground, the target application may be controlled to actively establish communication with the server, so as to prevent the server from actively establishing connection, and also implement communication between the target application and the server.
And S406, monitoring a real-time available operation memory of the terminal.
It can be understood that after the target application program is in the background, the target application program is limited to run in the memory range corresponding to the preset memory threshold, and then some application programs are also run in other running memory ranges in the terminal, and these application programs may be application programs being used by the user and cannot be directly exited from these application programs, so that in the use process of the terminal, the available running memory of the terminal may be reduced.
In order to ensure normal use of a user, the real-time available operating memory of the terminal may be monitored first, wherein the method for monitoring the real-time available operating memory of the terminal may be to acquire the real-time available operating memory of the terminal in a fixed period through a preset component or a preset function, or may also be to determine a corresponding period to acquire the real-time available operating memory of the terminal according to an operating memory occupation ratio through the preset component or the preset function, for example, when the operating memory occupation ratio is large, the real-time available operating memory of the terminal may be acquired in a faster period to improve timeliness of acquiring data; and when the occupation proportion of the operating memory is small, the real-time available operating memory of the terminal can be acquired at a slow period so as to reduce the power consumption for acquiring data.
S407, when the real-time available running memory is larger than the first cleaning running memory threshold and smaller than the second cleaning running memory threshold, quitting at least one application program to be cleaned in the background in the preset cleaning list until the real-time occupied running memory is smaller than or equal to the first cleaning running memory threshold.
Optionally, a preset cleaning list may be preset, where the application in the preset cleaning list may be some applications that do not affect the normal use of the terminal by the user or the operation of the system, for example, the application in the preset cleaning list may be a calendar, an alarm clock, a notepad, and the like. A first clean-up running memory threshold and a second clean-up running memory threshold may also be preset, where a value corresponding to the second clean-up running memory threshold is greater than a value corresponding to the first clean-up running memory threshold, for example, if the middle running memory of the terminal is 8G, the first clean-up running memory threshold may be set to 6G, and the second clean-up running memory threshold is 7G, then when the real-time available running memory is greater than the first clean-up running memory threshold and less than the second clean-up running memory threshold, it may be considered that the available running memory of the terminal has pressure, and the available running memory of the terminal is smaller, then at least one application program in a preset clean list and a background at the same time may be determined, the application program may be determined to be cleaned, and the application program to be cleaned may be exited, where the number of the application programs to be cleaned may be determined according to the number of the application programs to be cleaned after exiting, and determining whether the real-time occupied operation memory is smaller than or equal to a first clearing operation memory threshold value so as to reduce the occupation of the current operation memory of the terminal and expand the available operation memory of the terminal.
S408, when the real-time available running memory is larger than the second cleaning running memory threshold value, quitting at least one target application program to be cleaned with the minimum priority in the protection list until the real-time occupied running memory is smaller than or equal to the preset running memory threshold value.
When the real-time available operating memory is larger than the second cleaning operating memory threshold, it may be considered that a larger pressure exists in the available operating memory of the terminal, the available operating memory of the terminal is extremely small, and the occupation of the current operating memory of the terminal cannot be effectively reduced only by exiting the application program to be cleaned, so at this time, at least one target application program with the minimum priority in the protection list may be determined, the target application program is determined as the target application program to be cleaned, and the target application program to be cleaned is exited, wherein the number of the target application programs to be cleaned may be determined according to whether the real-time occupied operating memory is smaller than or equal to the second cleaning operating memory threshold after the target application program to be cleaned exits.
S409, deleting the target application program to be cleaned from the protection list, and updating the protection list based on the historical use data of all application programs currently in the background.
After the target application program to be cleaned is deleted from the protection list, a free memory may exist in a memory range corresponding to a preset running memory threshold value specially set for the target application program in the protection list, and then the protection list may be updated based on the historical usage data of all application programs currently in the background so as to protect the application programs outside the list, where the method for updating the protection list based on the historical usage data of all application programs currently in the background is similar to the above method for generating the protection list in real time based on the historical usage data of all application programs currently in the background, and is not described here any more.
S4010, transferring a memory with a preset capacity to a read-only memory from a memory occupied by the target application program in the protection list in the operating memory, and restoring the memory with the preset capacity to the operating memory when the target application program is in the foreground.
It can be understood that, when performing background operation protection on the target application program in the protection list, the Memory occupied by the target application program in the protection list in the operation Memory may also be transferred to a Memory with a preset capacity in the Read-Only Memory, where the Read-Only Memory is also a Memory corresponding to a Read-Only Memory (ROM), and since the capacity of the Read-Only Memory in the terminal is much larger than the operation Memory in the terminal, the Memory occupied by the target application program in the operation Memory may be transferred to the Read-Only Memory, so as to reduce the occupation of the operation Memory in the terminal and relieve the occupation pressure of the operation Memory in the terminal.
Optionally, the specific value corresponding to the memory transfer preset capacity occupied by the target application program in the operating memory may be determined according to the memory capacity occupied by the target application program in the operating memory, or may be manually set according to the user's own need. For example, the preset capacity of memory transfer occupied by the target application program in the running memory may be set to fifty percent, and then when the memory occupied by the target application program in the running memory is 1G, the memory occupied by the target application program in the running memory may be transferred to the read-only memory by 0.5G. In a specific practice, a swap-like technology can be adopted to expand the memory and relieve the pressure of operating the memory.
Furthermore, the memory with the preset capacity can be restored to the running memory when the target application program is in the foreground, so that the target application program can be quickly started when the target application program is in the foreground.
In the embodiment of the application, how to generate the protection list in real time and how to perform background operation protection on the target application program in the protection list are mainly introduced, so that the target application program in the protection list can be temporarily stored in a background, power consumption and memory risks are not caused, and a user can quickly start the target application program.
Referring to fig. 6, fig. 6 is a flowchart illustrating an application running method according to another embodiment of the present application.
As shown in fig. 6, the application program running method includes:
s601, receiving a background protection starting instruction input by a user, executing and monitoring that the application program is in the background based on the background protection starting instruction, and then generating a protection list in real time based on historical use data of all the application programs currently in the background.
Optionally, because some application programs may be exited or protected when the application programs are executed, related options may be set in a system of the terminal, and a user freely selects whether to execute the application program running method by setting the related options, so that after the user inputs a background protection start instruction for the related options, the terminal may receive the background protection start instruction input by the user, and after monitoring that the application programs are in the background based on the background protection start instruction, generate a protection list in real time based on historical usage data of all application programs currently in the background, that is, execute a specific process of a subsequent application program running method.
Referring to fig. 7, fig. 7 is a schematic diagram illustrating a user inputting a background protection start instruction according to another embodiment of the present application.
As shown in fig. 7, a "background protection" option 720 may be separately set in a setting interface 710 of the terminal 700, and after the user 730 clicks or clicks the "background protection" option 720, which is equivalent to that the user 730 inputs a background protection starting instruction for the background protection "option 720, the terminal 700 may receive the background protection starting instruction input by the user and execute a specific process of a subsequent application program running method.
S602, after monitoring that the application programs are in the background, generating a protection list in real time based on historical use data of all the application programs currently in the background.
And S603, performing background operation protection on the target application program in the protection list.
For step S602 and step S603, please refer to the detailed description in the above embodiments, which is not repeated herein.
S604, monitoring the running state of the target application program in the protection list, and updating the protection list based on historical use data of all application programs currently in the background after monitoring that the abnormal target application program in the target application program exits.
It can be understood that after performing background operation protection on the target application program in the protection list, the target application program in the protection list may be locked in a running state in the background, but in an actual situation, the target application program may be abnormally exited due to low memory, low power, abnormal communication environment or other abnormal situations after being in the background, and therefore the running state of the target application program in the protection list may be monitored, wherein the method for monitoring the running state of the target application program in the protection list may be monitored by a preset component or a preset function, and if the abnormal target application program in the target application program is abnormally exited, the abnormal target application program may be deleted from the protection list, and the abnormal target application program may also be automatically pulled up and run, and updating the protection list based on the historical usage data of all the application programs currently in the background so as to protect the abnormal target application program again and/or protect the application programs outside the list, wherein the method for updating the protection list based on the historical usage data of all the application programs currently in the background is similar to the method for generating the protection list in real time based on the historical usage data of all the application programs currently in the background, and is not repeated here.
In the embodiment of the application, the related options are set in the system of the terminal, and the user freely selects whether to execute the application program running method or not by setting the related options, so that the degree of freedom of the user in controlling the application programs in the terminal is improved, and after the abnormal target application programs in the target application programs are monitored to exit, the protection list can be updated based on the historical use data of all application programs currently in the background, so that the protection range of the application programs in the terminal is expanded.
Referring to fig. 8, fig. 8 is a schematic structural diagram of an application running device according to another embodiment of the present application.
As shown in fig. 8, the application execution device 800 includes:
the list obtaining module 810 is configured to generate a protection list in real time based on historical usage data of all application programs currently in the background after monitoring that the application programs are in the background.
And the program protection module 820 is used for performing background operation protection on the target application program in the protection list.
Referring to fig. 9, fig. 9 is a schematic structural diagram of an application running device according to another embodiment of the present application.
As shown in fig. 9, the application execution device 900 includes:
the usage preference value obtaining module 910 is configured to, after monitoring that the application program is in the background, obtain usage data of all application programs currently in the background, and determine, according to the usage data, usage preference values corresponding to all application programs.
And a protection list generating module 920, configured to generate a protection list in real time according to the respective usage preference values corresponding to all the application programs and the preset running memory threshold.
The method for generating the protection list in real time according to the use preference values corresponding to all the application programs and the preset running memory threshold value comprises the following steps: according to a priority ranking rule of using preference values from high to low, performing priority ranking on all application programs to obtain a ranking list; generating a protection list in real time based on the priority sequence corresponding to all the application programs, the current occupied operation memory corresponding to all the application programs and a preset operation memory threshold value; the sum of the currently occupied operating memory corresponding to each target application program in the protection list is smaller than a preset operating memory threshold, and the priority of any target application program in the protection list in the sorting table is larger than the priority of any application program not in the protection list.
And a freezing module 930, configured to lock the target application in the protected list in a running state in the background, and perform background freezing on the target function of the target application.
The network control module 940 is configured to open a network firewall corresponding to the target application, where the firewall is configured to control a network connection state of the target application, and the network connection state of the target application is a disconnected state when the firewall is opened.
The communication module 950 is configured to send an abnormal data packet to the server corresponding to the target application program, where the abnormal data packet carries a network connection state of the target application program, and the abnormal data packet is used to indicate that the server establishes communication with the target application program when the network connection state of the target application program is a connected state.
And the memory monitoring module 960 is used for monitoring the real-time available operating memory of the terminal.
The first cleaning module 970 is configured to, when the real-time available running memory is greater than the first cleaning running memory threshold and smaller than the second cleaning running memory threshold, quit at least one to-be-cleaned application program in the preset cleaning list in the background until the real-time occupied running memory is smaller than or equal to the first cleaning running memory threshold.
And a second cleaning module 980, configured to, when the real-time available operating memory is greater than the second cleaning operating memory threshold, quit at least one target application to be cleaned with the lowest priority in the protection list until the real-time occupied operating memory is less than or equal to the second cleaning operating memory threshold.
The first list updating module 990 is configured to delete the target application to be cleaned from the protected list, and update the protected list based on the historical usage data of all applications currently in the background.
The memory transfer module 9100 is configured to transfer a memory occupied by the target application program in the protection list in the operating memory to a read-only memory with a preset capacity, and restore the memory with the preset capacity to the operating memory when the target application program is in the foreground.
Referring to fig. 10, fig. 10 is a schematic structural diagram of an application running device according to another embodiment of the present application.
As shown in fig. 10, the application execution device 1000 includes:
the protection starting module 1010 is configured to receive a background protection starting instruction input by a user, execute and monitor that an application program is in a background based on the background protection starting instruction, and generate a protection list in real time based on historical usage data of all application programs currently in the background.
The list obtaining module 1020 is configured to generate a protection list in real time based on historical usage data of all application programs currently in the background after the application programs are monitored to be in the background.
And the program protection module 1030 is configured to perform background operation protection on the target application program in the protection list.
The second list updating module 1040 is configured to monitor an operating state of the target application program in the protection list, and update the protection list based on historical usage data of all application programs currently in the background after it is monitored that the abnormal target application program in the target application program exits.
In an embodiment of the present application, an application execution device includes: the list acquisition module is used for generating a protection list in real time based on historical use data of all application programs currently in the background after monitoring that the application programs are in the background; and the program protection module is used for performing background operation protection on the target application program in the protection list. When the application program is monitored to be in the background, the protection lists corresponding to all application programs currently in the background can be generated, so that background operation protection can be performed on the target application program in the protection lists, the target application program cannot be cleaned and quitted by a system after the background operation protection is performed on the target application program, hot start can be achieved when the target application program is opened again by a user, and the time for the user to start the target application program is greatly reduced.
Embodiments of the present application also provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the steps of the method according to any of the above embodiments.
Further, please refer to fig. 11, where fig. 11 is a schematic structural diagram of a terminal according to an embodiment of the present application. As shown in fig. 11, the terminal 1100 may include: at least one central processor 1101, at least one network interface 1104, a user interface 1103, a memory 1105, at least one communication bus 1102.
Wherein a communication bus 1102 is used to enable connective communication between these components.
The user interface 1103 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 1103 may also include a standard wired interface and a wireless interface.
The network interface 1104 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface).
The central processor 1101 may include one or more processing cores. A central processor 1101 connects various portions within the overall terminal 1100 using various interfaces and lines, and performs various functions of the terminal 1100 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 1105 and calling data stored in the memory 1105. Optionally, the central Processing unit 1101 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The CPU 1101 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It is understood that the modem may be implemented by a single chip without being integrated into the central processor 1101.
The Memory 1105 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 1105 includes non-transitory computer-readable storage media. The memory 1105 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 1105 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 1105 may alternatively be at least one memory device located remotely from the central processor 1101 as previously described. As shown in fig. 11, the memory 1105, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an application program execution program.
In the terminal 1100 shown in fig. 11, the user interface 1103 is mainly used as an interface for providing input for a user, and acquiring data input by the user; the central processing unit 1101 may be configured to call the application running program stored in the memory 1105, and specifically perform the following operations:
after monitoring that the application programs are in the background, generating a protection list in real time based on historical use data of all the application programs currently in the background;
and performing background operation protection on the target application program in the protection list.
In an embodiment, when the processor 1101 performs real-time generation of the protection list based on the historical usage data of all the applications currently in the background, specifically performs the following steps: acquiring use data of all application programs currently in a background, and determining use preference values corresponding to all the application programs according to the use data; and generating a protection list in real time according to the use preference values corresponding to all the application programs and the preset running memory threshold value.
In an embodiment, when the processor 1101 performs the real-time generation of the protection list according to the use preference values corresponding to all the application programs and the preset running memory threshold, the following steps are specifically performed: according to a priority ranking rule of using preference values from high to low, performing priority ranking on all application programs to obtain a ranking list; generating a protection list in real time based on the priority sequence corresponding to all the application programs, the current occupied operation memory corresponding to all the application programs and a preset operation memory threshold value; the sum of the currently occupied operating memory corresponding to each target application program in the protection list is smaller than a preset operating memory threshold, and the priority of any target application program in the protection list in the sorting table is larger than the priority of any application program not in the protection list.
In an embodiment, when performing background operation protection on a target application program in a protection list, the processor 1101 specifically performs the following steps: locking the target application program in the protection list into a running state in the background, and performing background freezing on the target function of the target application program; starting a network firewall corresponding to the target application program, wherein the firewall is used for controlling the network connection state of the target application program, and the network connection state of the target application program is a disconnection state when the firewall is started; and sending an abnormal data packet to a server corresponding to the target application program, wherein the abnormal data packet carries the network connection state of the target application program, and the abnormal data packet is used for indicating the server to establish communication with the target application program when the network connection state of the target application program is a connected state.
In an embodiment, when performing background operation protection on a target application program in a protection list, the processor 1101 specifically performs the following steps: monitoring a real-time available operation memory of the terminal; when the real-time available running memory is larger than the first cleaning running memory threshold value and smaller than the second cleaning running memory threshold value, quitting at least one application program to be cleaned in the background in a preset cleaning list until the real-time occupied running memory is smaller than or equal to the first cleaning running memory threshold value; when the real-time available running memory is larger than a second cleaning running memory threshold value, quitting at least one target application program to be cleaned with the minimum priority in the protection list until the real-time occupied running memory is smaller than or equal to the second cleaning running memory threshold value; and deleting the target application program to be cleaned from the protection list, and updating the protection list based on the historical use data of all application programs currently in the background.
In an embodiment, when performing background operation protection on a target application program in a protection list, the processor 1101 specifically performs the following steps: transferring a memory with preset capacity occupied by the target application program in the protection list in the running memory to a read-only memory, and restoring the memory with preset capacity to the running memory when the target application program is in the foreground.
In one embodiment, after performing the operation protection on the first target application in the background, the processor 1101 further specifically performs the following steps: and monitoring the running state of the target application program in the protection list, and updating the protection list based on historical use data of all application programs currently in the background after monitoring that the abnormal target application program in the target application program exits.
In an embodiment, when the processor 1101 performs the steps of acquiring the usage data of all the applications currently in the background and determining the usage preference values corresponding to all the applications according to the usage data, specifically: acquiring use data of all application programs currently in a background, wherein the use data at least comprises the opening times of the application programs in a preset period away from the current time and the total running time of the application programs in a foreground; calculating the use preference value corresponding to each application program according to the use data and the use preference value formula;
wherein, the usage preference value formula is as follows:
Figure BDA0003027581300000211
y is the application program usage preference value, x is a certain time from the current time within a preset time period, txThe time is the opening times of the application program in the preset period from the current time, T is the total time length of the application program running in the foreground in the preset period from the current time, and n is the weight between the opening times of the application program in the preset period from the current time and the total time length of the application program running in the foreground.
In an embodiment, after monitoring that the application program is in the background, and before generating the protection list in real time based on the historical usage data of all application programs currently in the background, the processor 1101 further specifically performs the following steps: receiving a background protection starting instruction input by a user, executing and monitoring the application programs in the background based on the background protection starting instruction, and then generating a protection list in real time based on historical use data of all the application programs currently in the background.
In one embodiment, the application is a preset type of application, and the cold start time of the preset type of application is greater than the preset start time.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of modules is merely a division of logical functions, and an actual implementation may have another division, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
Modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In view of the above description of the application program running method, device, storage medium and terminal provided by the present application, those skilled in the art will recognize that there are variations in the embodiments and applications of the application program according to the concepts of the embodiments of the present application, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (13)

1. An application program running method, characterized in that the method comprises:
after monitoring that the application programs are in the background, generating a protection list in real time based on historical use data of all the application programs currently in the background;
and performing background operation protection on the target application program in the protection list.
2. The method of claim 1, wherein generating the protection list in real-time based on historical usage data of all applications currently in the background comprises:
acquiring use data of all application programs currently in a background, and determining use preference values corresponding to all the application programs according to the use data;
and generating a protection list in real time according to the use preference values corresponding to all the application programs and a preset running memory threshold value.
3. The method according to claim 2, wherein the generating a protection list in real time according to the usage preference value and the preset running memory threshold value corresponding to each of the all applications comprises:
according to a priority ranking rule of using preference values from high to low, performing priority ranking on all the application programs to obtain a ranking list;
generating a protection list in real time based on the priority sequence corresponding to all the application programs, the currently occupied operating memory corresponding to all the application programs and the preset operating memory threshold value;
the sum of the currently occupied running memories corresponding to the target application programs in the protection list is smaller than the preset running memory threshold, and the priority of any target application program in the protection list in the sorting table is larger than the priority of any application program not in the protection list.
4. The method of claim 3, wherein the background running protection of the target application in the protection list comprises:
locking the target application program in the protection list into a running state in the background, and performing background freezing on the target function of the target application program;
opening a network firewall corresponding to the target application program, wherein the firewall is used for controlling the network connection state of the target application program, and the network connection state of the target application program is a disconnection state when the firewall is opened;
and sending an abnormal data packet to a server corresponding to the target application program, wherein the abnormal data packet carries the network connection state of the target application program, and the abnormal data packet is used for indicating the server to establish communication with the target application program when the network connection state of the target application program is a connected state.
5. The method according to claim 3 or 4, wherein the performing background running protection on the target application program in the protection list comprises:
monitoring a real-time available operation memory of the terminal;
when the real-time available running memory is larger than a first cleaning running memory threshold value and smaller than a second cleaning running memory threshold value, quitting at least one application program to be cleaned in a background in a preset cleaning list until the real-time occupied running memory is smaller than or equal to the first cleaning running memory threshold value;
when the real-time available running memory is larger than the second cleaning running memory threshold value, quitting at least one target application program to be cleaned with the minimum priority in the protection list until the real-time occupied running memory is smaller than or equal to the second cleaning running memory threshold value;
and deleting the target application program to be cleaned from the protection list, and updating the protection list based on the historical use data of all application programs currently in the background.
6. The method according to claim 3 or 4, wherein the performing background running protection on the target application program in the protection list comprises:
transferring a memory with preset capacity occupied by the target application program in the protection list in an operating memory to a read-only memory, and restoring the memory with the preset capacity to the operating memory when the target application program is in a foreground.
7. The method of claim 1, wherein after the running protection of the first target application in the background, further comprising:
and monitoring the running state of the target application program in the protection list, and updating the protection list based on historical use data of all application programs currently in the background after monitoring that the abnormal target application program in the target application program exits.
8. The method of claim 2, wherein the obtaining usage data of all applications currently in the background and determining respective usage preference values of all applications according to the usage data comprises:
acquiring use data of all application programs currently in a background, wherein the use data at least comprises the opening times of the application programs in a preset period away from the current time and the total running time of the application programs in a foreground;
calculating the use preference value corresponding to each application program according to the use data and the use preference value formula;
wherein the usage preference value formula is:
Figure FDA0003027581290000031
y is the application program usage preference value, x is a certain time from the current time within a preset time period, txThe time is the opening times of the application program in the preset period from the current time, T is the total time length of the application program running in the foreground in the preset period from the current time, and n is the weight between the opening times of the application program in the preset period from the current time and the total time length of the application program running in the foreground.
9. The method of claim 1, wherein after monitoring that the application is in the background and before generating the protection list in real time based on historical usage data of all applications currently in the background, further comprising:
receiving a background protection starting instruction input by a user, executing and monitoring the application programs in the background based on the background protection starting instruction, and then generating a protection list in real time based on historical use data of all the application programs currently in the background.
10. The method according to claim 1, wherein the application is a preset type of application, and the cold start time of the preset type of application is greater than the preset start time.
11. An application execution apparatus, comprising:
the list acquisition module is used for generating a protection list in real time based on historical use data of all application programs currently in the background after monitoring that the application programs are in the background;
and the program protection module is used for carrying out background operation protection on the target application program in the protection list.
12. A computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the steps of the method according to any of claims 1 to 10.
13. A terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor when executing the program implementing the steps of the method according to any of claims 1 to 10.
CN202110422612.XA 2021-04-19 2021-04-19 Application program running method and device, storage medium and terminal Pending CN113127094A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110422612.XA CN113127094A (en) 2021-04-19 2021-04-19 Application program running method and device, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110422612.XA CN113127094A (en) 2021-04-19 2021-04-19 Application program running method and device, storage medium and terminal

Publications (1)

Publication Number Publication Date
CN113127094A true CN113127094A (en) 2021-07-16

Family

ID=76777800

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110422612.XA Pending CN113127094A (en) 2021-04-19 2021-04-19 Application program running method and device, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN113127094A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115129505A (en) * 2022-09-02 2022-09-30 荣耀终端有限公司 Processing method and device for abnormal exit of application program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105388990A (en) * 2015-10-19 2016-03-09 北京奇虎科技有限公司 Power saving processing method and apparatus for terminal device
CN107506240A (en) * 2017-07-31 2017-12-22 广东欧珀移动通信有限公司 Background application management-control method, device, storage medium and electronic equipment
CN109992310A (en) * 2019-03-12 2019-07-09 中国平安财产保险股份有限公司 Application program keepalive method, device, computer equipment and storage medium
WO2019238124A1 (en) * 2018-06-15 2019-12-19 奇酷互联网络科技(深圳)有限公司 Memory management method and apparatus, readable storage medium and terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105388990A (en) * 2015-10-19 2016-03-09 北京奇虎科技有限公司 Power saving processing method and apparatus for terminal device
CN107506240A (en) * 2017-07-31 2017-12-22 广东欧珀移动通信有限公司 Background application management-control method, device, storage medium and electronic equipment
WO2019238124A1 (en) * 2018-06-15 2019-12-19 奇酷互联网络科技(深圳)有限公司 Memory management method and apparatus, readable storage medium and terminal
CN109992310A (en) * 2019-03-12 2019-07-09 中国平安财产保险股份有限公司 Application program keepalive method, device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115129505A (en) * 2022-09-02 2022-09-30 荣耀终端有限公司 Processing method and device for abnormal exit of application program
CN115129505B (en) * 2022-09-02 2023-07-07 荣耀终端有限公司 Processing method and device for abnormal exit of application program

Similar Documents

Publication Publication Date Title
CN110808922B (en) Message processing method and device, storage medium and electronic equipment
CN107071865B (en) A kind of method and device that Wireless Fidelity quickly connects
CN107803029A (en) Display processing method and related product
CN107832127B (en) Application control method and related product
US20100207585A1 (en) Reserving power for electronic devices
CN113127094A (en) Application program running method and device, storage medium and terminal
CN115023919A (en) Firewall rule updating method and device, server and storage medium
CN115017030A (en) Resource allocation method, device, electronic equipment and storage medium
CN114285844A (en) Method and device for intelligently fusing server interface, electronic equipment and storage medium
CN112286930A (en) Method, device, storage medium and electronic equipment for resource sharing of redis business side
CN111092774A (en) Configuration method and equipment of acquisition gateway
EP3756356A1 (en) Providing activity notifications regarding digital content
CN110349076A (en) The processing method and processing device of data
CN109829152A (en) Head portrait replacing options, device, computer equipment and storage medium
CN114968400A (en) Webpage synchronization method and device, storage medium and electronic equipment
CN107277104A (en) The processing method and wireless router of a kind of web page access data
CN114268799A (en) Streaming media transmission method and device, electronic equipment and medium
CN107168648A (en) File memory method, device and terminal
CN113010279A (en) Application program process processing method and device for mobile terminal and electronic equipment
CN111552705A (en) Data processing method and device based on chart, electronic equipment and medium
CN109376323A (en) Using operation method, device, computer installation and storage medium
CN112035133A (en) Homepage upgrading method and terminal
CN112616177B (en) Network control method, device, storage medium and terminal
CN113760569B (en) Multi-account management method and system
CN111026048B (en) Data processing method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination