CN111221650A - System resource recovery method and device based on process type association - Google Patents

System resource recovery method and device based on process type association Download PDF

Info

Publication number
CN111221650A
CN111221650A CN201911419847.2A CN201911419847A CN111221650A CN 111221650 A CN111221650 A CN 111221650A CN 201911419847 A CN201911419847 A CN 201911419847A CN 111221650 A CN111221650 A CN 111221650A
Authority
CN
China
Prior art keywords
processes
information
association
support
determining
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
CN201911419847.2A
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.)
Qingdao Haier Technology Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN201911419847.2A priority Critical patent/CN111221650A/en
Publication of CN111221650A publication Critical patent/CN111221650A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes

Abstract

The invention provides a method and a device for recovering system resources based on process type association, wherein the method for recovering the system resources based on the process type association comprises the following steps: acquiring association degree information between a first process and a second process; the first process is a process operated by a system foreground, and the second process is a process cached by a system background; and carrying out process recycling processing on one or more second processes according to the association degree information. By the method and the device, the problem of reduced user experience in the process recovery process in the related technology can be solved, and the effect of improving the user experience can be achieved.

Description

System resource recovery method and device based on process type association
Technical Field
The invention relates to the field of computer software, in particular to a method and a device for recovering system resources based on process type association.
Background
In the actual operation process of the terminal such as a mobile phone, a tablet or a computer, when a user exits the currently used application process and makes the application process exit the background, the system does not kill the application process, but caches the application. With the increase of the number of application processes opened by a user, the number of the corresponding cached processes of the system background is increased, and the correspondingly occupied memory is increased; when the system memory is insufficient, in order to ensure the normal operation of the system, part of the application processes in the background can be killed, namely, the processes cached correspondingly in the background are recovered.
The current process recycling mechanism mainly includes a time-based recycling mechanism and a process priority-based recycling mechanism, and specifically, the process can be recycled according to the longest time interval or the process can be highly recycled based on the process priority. However, none of the process recycling mechanisms in the related art described above considers that the application process currently used by the user is recycled, and therefore, the experience of the user in the process of using the terminal is reduced.
Aiming at the problem that the user experience is reduced in the process recovery process in the related technology, an effective solution is not provided in the related technology.
Disclosure of Invention
The embodiment of the invention provides a method and a device for recovering system resources based on process type association, which are used for at least solving the problem of reduced user experience in the process recovery process in the related art.
According to an embodiment of the present invention, a method for recovering system resources based on process type association is provided, including:
acquiring association degree information between a first process and a second process; the first process is a process operated by a system foreground, and the second process is a process cached by a system background;
and carrying out process recycling processing on one or more second processes according to the association degree information.
According to another embodiment of the present invention, there is also provided a system resource recycling apparatus based on process type association, including:
the association module is used for acquiring association degree information between the first process and the second process; the first process is a process operated by a system foreground, and the second process is a process cached by a system background;
and the recovery module is used for carrying out process recovery processing on one or more second processes according to the association degree information.
According to another embodiment of the present invention, a computer-readable storage medium is also provided, in which a computer program is stored, wherein the computer program is configured to perform the steps of any of the above-described method embodiments when executed.
According to another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, on the premise of acquiring the association degree information between the first process and the second process, process recovery processing can be carried out on one or more second processes according to the association degree information; the first process is a process running in a system foreground, and the second process is a process cached in a system background. Therefore, the method and the device can solve the problem that the user experience is reduced in the process recovery process in the related technology, so that the effect of improving the user experience is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flowchart of a method for system resource reclamation based on process type association according to an embodiment of the present invention;
FIG. 2 is a system architecture diagram of a method for system resource reclamation based on process type association according to an embodiment of the present invention;
fig. 3 is a block diagram of a system resource recycling apparatus based on process type association according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Example 1
Fig. 1 is a flowchart of a method for recovering system resources based on process type association according to an embodiment of the present invention, and as shown in fig. 1, the method for recovering system resources based on process type association in this embodiment includes:
s102, obtaining the association degree information between the first process and the second process; the first process is a process operated by a system foreground, and the second process is a process cached by a system background;
and S104, performing process recycling processing on one or more second processes according to the association degree information.
It should be further explained that the method for recovering system resources based on process type association in this embodiment may also be referred to as a process recovery method, and this embodiment is not limited to process types in the process of implementing process recovery.
It should be further noted that the first process is a process that is run in a system foreground, that is, the first process is a process that is currently operated by a user, the second process is a process that is cached in a system background, that is, the second process is a process that is exited by the user and is cached in a background, taking a mobile phone terminal system as an example, the user is currently running a wechat, and the system background is cached with applications such as naobao, kyoton, and the like, the wechat is the first application in the above embodiment, and naobao, kyoton, the second application in the above embodiment.
It should be further noted that the association degree information between the first process and the second process is used to indicate the association degree between the first process and the second process in terms of process type, user usage habit, and the like.
According to the method for recovering system resources based on process type association in the embodiment, on the premise of acquiring association degree information between a first process and a second process, process recovery processing can be performed on one or more second processes according to the association degree information; the first process is a process running in a system foreground, and the second process is a process cached in a system background. Therefore, the method for recovering system resources based on process type association in the embodiment can solve the problem of reduced user experience in the process recovery process in the related art, so as to achieve the effect of improving the user experience.
Specifically, the method for recovering system resources based on process type association in this embodiment may preferentially recover a process with a lower degree of association with a currently running process when performing process recovery, and reserve a process with a higher degree of association with the currently running process, so that when a user needs to invoke the process with the higher degree of association while using the current process, the user may quickly invoke the process from a system background cache, thereby avoiding a decrease in user experience caused by restarting the corresponding process.
In an optional embodiment, in the step S104, performing process recycling processing on the second process according to the association degree information includes:
under the condition that the space of the system background cache is smaller than or equal to a preset recovery threshold value, process recovery processing is carried out on one or more second processes according to the relevancy information; alternatively, the first and second electrodes may be,
and according to a preset recovery period, carrying out process recovery processing on one or more second processes according to the association degree information.
It should be further noted that, in the above optional embodiment, in the case that the space of the system background cache is less than or equal to the preset recovery threshold, process recovery processing is performed on the one or more second processes according to the association degree information, that is, when the space of the system background cache is insufficient, process recovery is performed on the one or more second processes in time to release the system cache; and performing process recovery processing on one or more second processes according to the preset recovery period and the association degree information, namely performing timing recovery on the second processes cached in the system background according to a fixed period or a non-fixed period.
In an optional embodiment, the obtaining the association degree information between the first process and the second process includes:
acquiring one or more calling events occurring in a preset time period, and determining one or more processes called by the system in the one or more calling events;
determining corresponding first support degree information of one or more processes in one or more calling events; the first support degree information is used for indicating the calling times corresponding to one or more processes in one or more calling events;
determining relevance information between one or more processes according to the first support degree information, and determining relevance information between the first process and the second process according to the relevance information between the one or more processes;
the process comprises a first process and a second process.
It should be further noted that, in the above optional embodiment, one or more invoking events occurring within a preset time period are obtained, that is, an invoking event that is realized by a user invoking one or more processes in a system within a preset time period, such as 24h, 72h, etc., is obtained, where the invoking event may indicate one operation that the user completes in a process from system startup to hibernation (screen locking), or may indicate the user to invoke a certain operation that is completed by a different process within a certain time period; for example, when a user starts to use a mobile phone terminal, the WeChat is operated firstly, and then the Mei Tuo is called, namely the WeChat and Mei Tuo calling process can be recorded as a calling event; the preset time period can also indicate that the current time period is up, namely the system always keeps updating the calling event so as to update the support degree between the processes; the invention is not limited in this regard.
In the above alternative embodiment, each call event is made up of one or more processes. The first support degree information is used for indicating the sum of the calling times of one or more calling events in each calling event, and determining the corresponding first support degree information of one or more processes in the one or more calling events, namely taking the one or more calling events as a whole to count the called times of the whole in the one or more calling events.
In an optional embodiment, the determining first support information corresponding to the one or more processes in the one or more call events and determining relevance information between the one or more processes according to the first support information includes:
determining first support degree information corresponding to the N processes in one or more calling events, and determining relevance information among the one or more processes according to the first support degree information, wherein N is a positive integer.
In an optional embodiment, the determining first support information corresponding to the N processes in the one or more call events and determining relevance information between the one or more processes according to the first support information includes:
establishing one or more item sets according to one or more processes, wherein the item sets comprise N processes, and N is a positive integer;
determining second support information corresponding to one or more item sets in one or more calling events; the second support degree information is used for indicating the number of times of simultaneous calls corresponding to N processes in one or more item sets in one or more call events;
screening the one or more item sets according to the relationship between second support information corresponding to the one or more item sets and a preset support threshold value to determine one or more frequent item sets;
and determining the relevance information among the processes in the one or more frequent item sets according to the second support information corresponding to the one or more frequent item sets.
It should be further noted that, in the above optional embodiment, the item set is used to indicate a set of one or more processes, and the second support information of a certain item set is used to indicate the number of times that N processes included in the item set occur in one call event; when the number of times that the N processes contained in a certain item set occur in one calling event reaches the threshold value of the support degree, the item set is the frequent item set.
In an optional embodiment, the method further includes:
establishing one or more M-1 item sets according to one or more processes, wherein the M-1 item sets comprise M-1 processes; determining second support information corresponding to one or more M-1 item sets in one or more calling events; screening the one or more M-1 th item sets according to the relation between second support information corresponding to the one or more M-1 th item sets and a preset support threshold value to determine one or more M-1 th frequent item sets; m is a positive integer greater than 1;
connecting one or more M-1 frequent item sets to establish one or more M item sets, wherein the M item sets comprise M processes;
determining second support information corresponding to one or more Mth item sets in one or more calling events; screening one or more Mth item sets according to the relation between second support information corresponding to the one or more Mth item sets and a preset support threshold value to determine one or more Mth frequent item sets;
assigning M to be M-1 under the condition that the Mth frequent item set is a non-empty set, and repeating the operations; alternatively, the first and second electrodes may be,
and under the condition that the Mth frequent item set is an empty set, determining the relevance information among the processes in the one or more M-1 th frequent item sets according to the second support information corresponding to the one or more M-1 th frequent item sets.
It should be further noted that, in the optional embodiment, the technical solution performs iterative computation on the second support degree information of the item set in an iterative manner, and in the optional embodiment, after the second support degree computation of the M-1 th item set including M-1 processes is completed, the multiple M-1 th item sets may be connected in pairs to form an M-th item set, where the M-th item set includes M processes; after the second support degree of the mth item set is calculated, the mth item set may be regarded as the M-1 th item set, and the M +1 th item set may be regarded as the mth item set, so as to repeat the above calculation process, thereby forming iterative calculations.
In the above optional embodiment, the iterative computation of the second support degree information of the item set is described in detail by the following specific embodiments, which are not described herein again.
In an optional embodiment, the screening the one or more mth item sets according to a relationship between second support information corresponding to the one or more mth item sets and a preset support threshold to determine the one or more mth frequent item sets includes:
and determining one or more mth item sets of which the second support information is greater than or equal to the support threshold value as one or more mth frequent item sets.
In an optional embodiment, the concatenating the one or more mth-1 frequent item sets to establish one or more mth item sets includes:
combining any two M-1 frequent item sets to establish an M item set; wherein the M processes in the M-th entry set are all different processes from each other.
It should be further noted that, in the above-mentioned merging any two M-1 frequent item sets, that is, merging processes in two M-1 frequent item sets, for example, one M-1 frequent item set has the process A, B, C, and the other M-1 frequent item set has the process B, C, D, then the M-th item set obtained by merging two M-1 frequent item sets in the above-mentioned alternative embodiment has the process A, B, C, D.
In an optional embodiment, the determining, according to the second support information corresponding to the one or more M-1 th frequent item sets, the association information between the processes in the one or more M-1 th frequent item sets includes:
determining association degree information between processes in the first subset and processes in the second subset according to second support degree information corresponding to the first subset in the M-1 th frequent item set and second support degree information corresponding to the M-1 th frequent item set;
determining relevance information between processes in one or more M-1 th frequent item sets according to relevance information between processes in the first subset and processes in the second subset;
wherein, the M-1 frequent item set is composed of a first sub item set and a second sub item set.
It should be further noted that the first sub-item set and the first sub-item set in the M-1 th frequent item set are used to indicate non-empty subsets of the M-1 th frequent item set, and the first sub-item set and the second sub-item set may exist in various combinations according to the number of processes in the M-1 th frequent item set.
In an optional embodiment, the determining, according to the second support information corresponding to the first sub-item set in the M-1 th frequent item set and the second support information corresponding to the M-1 th frequent item set, the association information between the processes in the first sub-item set and the processes in the second sub-item set includes:
determining confidence information between the first sub item set and the second sub item set according to the second support information corresponding to the first sub item set and the second support information corresponding to the M-1 frequent item set; wherein the confidence information is used to indicate a probability that a process in the first subset occurs concurrently with a process in the second subset;
determining an association rule between the first sub-item set and the second sub-item set according to the relation between the confidence degree information and a preset confidence degree threshold value;
according to the association rule, the association degree information between the processes in the first subset and the processes in the second subset is determined.
It should be further noted that the confidence information is used to indicate the probability that the process in the first sub-item set is called and then the second sub-item set is called.
In an optional embodiment, the determining an association rule between the first sub-item set and the second sub-item set according to the relationship between the confidence information and a preset confidence threshold includes:
setting association rules between the first sub-item set and the second sub-item set with the confidence coefficient information being greater than or equal to the confidence coefficient threshold value as strong association rules; and/or the presence of a gas in the gas,
setting an association rule between the first sub-item set and the second sub-item set of which the confidence coefficient information is smaller than the confidence coefficient threshold value as a non-strong association rule;
determining association degree information between the processes in the first subset and the processes in the second subset according to an association rule, wherein the association degree information comprises the following steps:
setting association degree information between processes in the first sub-item set and processes in the second sub-item set, wherein the association rule is a strong association rule, as strong association information; and/or the presence of a gas in the gas,
and setting the association degree information between the processes in the first subset and the processes in the second subset, of which the association rules are non-strong association rules, as non-strong association information.
In an optional embodiment, the performing process recycling processing on the second process according to the association degree information includes:
determining a non-associated second process in the second process, wherein the association degree information between the non-associated second process and the first process is non-strong association information;
and carrying out process recycling processing on the non-associated second process.
The above method for recovering system resources based on process type association is further described below by way of specific embodiments.
DETAILED DESCRIPTION OF EMBODIMENT (S) OF INVENTION
Fig. 2 is a system architecture diagram of a method for recovering system resources based on process type association according to an embodiment of the present invention, as shown in fig. 2, the embodiment may obtain association rules between processes, that is, association degree information in the above embodiment, through an Apriori data acquisition module, an Apriori calculation module, an Apriori feedback module, and an Apriori item set and a rule base.
S1, the Apriori data acquisition module updates a process list;
updating a process list through a process scheduled by an Apriori data acquisition module in a system using process, and storing an updating result to an Apriori original data item set; for example, after 9 times of scheduling, the Apriori data acquisition module updates the process list as shown in table 1 below.
TABLE 1
Scheduling serial number Process lists
1 P1、P2、P3
2 P2、P4
3 P2、P5
4 P1、P2、P4
5 P1、P5
6 P2、P5
7 P1、P5
8 P1、P2、P5、P3
9 P1、P2、P5
The process called in each scheduling process in 9 scheduling processes can be obtained from the table; the processes involved in the scheduling process are uniformly combed by using an item set standard description format, and then the process is shown in the following table 2.
TABLE 2
Transaction ID Set of ready process items
1 {P1,P2,P3}
2 {P2,P4}
3 {P2,P5}
4 {P1,P2,P4}
5 {P1,P5}
6 {P2,P5}
7 {P1,P5}
8 {P1,P2,P5,P3}
9 {P1,P2,P5}
Each scheduling process is set as a transaction, each transaction corresponds to a called process as shown in the above table, the transactions 1 to 9 correspond to one or more calling events in the above embodiment, and the process in each transaction corresponds to one or more processes called in each calling event in the above embodiment.
S2, calculating an association rule by an Apriori calculation module;
in the step, association rules between processes are calculated through an Apriori calculation module; in this step, a support threshold value of 2 and a confidence threshold value of 70% are preset.
S2.1, carrying out first iteration, scanning all the transactions on the table, counting each item to obtain a candidate item set, and obtaining a candidate item set 1 shown in the following table, wherein the item set 1 is directly marked as C1 without pruning. C1 is shown in table 3 below.
TABLE 3
Figure RE-GDA0002458020490000111
Figure RE-GDA0002458020490000121
And comparing the support count with the support threshold, and removing the item sets smaller than the support threshold, wherein obviously, the item sets of C1 all reach the support threshold in the above table. This results in a frequent 1 item set, denoted L1. L1 is shown in table 4 below.
TABLE 4
Figure RE-GDA0002458020490000122
S2.2, performing second iteration to obtain a frequent 2 item set; for this purpose, the frequent 1 item set in L1 needs to be connected two by two to generate a candidate 2 item set, which is denoted as C2. C2 is shown in table 5 below.
TABLE 5
Figure RE-GDA0002458020490000123
Figure RE-GDA0002458020490000131
Pruning is carried out on the basis of the table, namely, an item set containing infrequent items in the item set is deleted, taking { P1, P2} as an example, no infrequent item set exists in { P1, P2}, the item set is not deleted, similarly, no infrequent item set exists in { P1, P3}, deletion is not carried out in the same way, and so on, all the item sets in C2 are processed. Since there is no item set of infrequent items in C1, no pruning is required for all item sets in C2. The joining and pruning process was completed, and the processed C2 is shown in table 6 below.
TABLE 6
Figure RE-GDA0002458020490000132
And comparing the support degree count with a support degree threshold value, and removing the item set smaller than the support degree threshold value, so as to obtain a frequent 2 item set, which is recorded as L2. L2 is shown in table 7 below:
TABLE 7
Figure RE-GDA0002458020490000133
Figure RE-GDA0002458020490000141
S2.3, carrying out third iteration to obtain a frequent 3 item set; for this purpose, a connection method is adopted to connect every two frequent 2 item sets in L2 to generate a candidate 3 item set, which is denoted as C3. C3 is shown in table 8 below.
TABLE 8
Figure RE-GDA0002458020490000142
In the above table, taking { P1, P5, P3} as an example, it contains { P3, P5} which is not an element of L2, and needs to be pruned, and so on, except { P1, P2, P5}, { P1, P2, P3}, { P1, P5, P3}, { P2, P5, P4}, { P2, P5, P3}, { P2, P4, and P3} which contain different sets of terms, so all need to be pruned. The joining and pruning process is completed to this point, and processed C3 is shown in table 9 below.
TABLE 9
Figure RE-GDA0002458020490000143
And comparing the support degree count with a support degree threshold value, and removing the item set smaller than the support degree threshold value, so as to obtain a frequent 3 item set, which is recorded as L3. L3 is shown in table 10 below.
Watch 10
Figure RE-GDA0002458020490000151
S2.4, carrying out fourth iteration to obtain a frequent 4 item set; for this purpose, a connection mode is adopted to connect every two frequent 3 item sets in the L3 to generate a candidate 4 item set, which is denoted as C4; since there are only two frequent 3 item sets in L3, there is only one item set { P1, P2, P5, P3} in C4 after the join. When C4 is pruned, since { P2, P5, P3} in { P1, P2, P5, P3} does not belong to L3, { P1, P2, P5, P3} needs to be deleted, so far, C4 is an empty set.
When the empty set appears in C4, the calculation can be stopped, and the current frequent item set L3 is reserved.
S2.5, outputting association rules
Take { P1, P2, P3} in L3 as an example to output association rules. The non-empty subset of { P1, P2, P3} is { P1, P2}, { P1, P3}, { P2, I5}, { P1}, { P2}, and { P3 }. And outputting the association rule by adopting the confidence coefficient for the non-empty subset. Taking { P1, P2} and { P3} as examples, the confidence between { P1, P2} and { P3} is calculated as follows:
confidence=P(P3|{P1,P2})=support_count({P1,P2,P3}) /support_count({P1,P2})。
by the above calculation, the confidence is calculated for each non-empty subset of { P1, P2, P3}, so that:
{P1,P2}=>P3,confidence=2/4=50%;
{P1,P3}=>P2,confidence=2/2=100%;
{P2,P3}=>P1,confidence=2/2=100%;
P1=>{P2,P3},confidence=2/6=33%;
P2=>{P1,P3},confidence=2/7=29%;
P3=>{P1,P2},confidence=2/2=100%;
the above confidence is the possibility of simultaneous progress between two processes, for example, { P1, P2} > P3, and the probability of executing P3 after the execution of processes P1 and P2 is 50% when the confidence 2/4% indicates that the process P3 is executed; similarly, { P1, P3} > P2, confidence 2/2 ═ 100% indicates that the probability of executing P2 after the execution of the processes P1 and P3 is 100%. Therefore, the association rule between the processes can be output according to the confidence.
Comparing the confidence with a preset confidence threshold (70%), the combination of confidence reaching the confidence threshold is:
{P1,P3}=>P2,confidence=2/2=100%;
{P2,P3}=>P1,confidence=2/2=100%;
P3=>{P1,P2},confidence=2/2=100%;
based on the confidence level, 100% of the execution of processes P1 and P3 will execute P2; 100% of the execution of process P2 and process P3 will execute P1; 100% of the execution of process P3 is performed with P1 and P2.
S3, the task scheduler calls an Apriori feedback module;
in this step, the Apriori feedback module may be called by a task scheduler of the system, so as to recycle the process cached in the system background through an association rule between the processes in the Apriori feedback module. For example, if the currently running process of the system is P3, the processes of the system background cache are P1, P2, P4, and P5, then according to the association rules obtained in the step S2.5, the association rules between P3 and P1, P2 are strong, and the association rules between P4 and P5 are weak, so that when the system memory resources are insufficient and the execution efficiency of the currently applied process is affected, the P4 and P5 are released to recycle the resources occupied by them.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
The present embodiment provides a system resource recycling apparatus based on process type association, where the apparatus is used to implement the foregoing embodiments and preferred embodiments, and the description of the apparatus is omitted for brevity. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated. Fig. 3 is a block diagram of a system resource recycling apparatus based on process type association according to an embodiment of the present invention, and as shown in fig. 3, the system resource recycling apparatus based on process type association in this embodiment includes:
the association module 202 is configured to obtain association degree information between a first process and a second process; the first process is a process operated by a system foreground, and the second process is a process cached by a system background;
and the recycling module 204 is configured to perform process recycling processing on the one or more second processes according to the association degree information.
It should be further noted that the system resource recycling device based on process type association in this embodiment may also be referred to as a process recycling device, and this embodiment is not limited to process types in the process of implementing process recycling.
It should be further noted that, the remaining optional embodiments and technical effects of the system resource recycling apparatus based on process type association in this embodiment correspond to the system resource recycling method based on process type association described in embodiment 1, and therefore, no further description is given here.
In an optional embodiment, the performing process recycling processing on the second process according to the association degree information includes:
under the condition that the space of the system background cache is smaller than or equal to a preset recovery threshold value, process recovery processing is carried out on one or more second processes according to the relevancy information; alternatively, the first and second electrodes may be,
and according to a preset recovery period, carrying out process recovery processing on one or more second processes according to the association degree information.
In an optional embodiment, the obtaining the association degree information between the first process and the second process includes:
acquiring one or more calling events occurring in a preset time period, and determining one or more processes called by the system in the one or more calling events;
determining corresponding first support degree information of one or more processes in one or more calling events; the first support degree information is used for indicating the calling times corresponding to one or more processes in one or more calling events;
determining relevance information between one or more processes according to the first support degree information, and determining relevance information between the first process and the second process according to the relevance information between the one or more processes;
the process comprises a first process and a second process.
In an optional embodiment, the determining first support information corresponding to the one or more processes in the one or more call events and determining relevance information between the one or more processes according to the first support information includes:
determining first support degree information corresponding to the N processes in one or more calling events, and determining relevance information among the one or more processes according to the first support degree information, wherein N is a positive integer.
In an optional embodiment, the determining first support information corresponding to the N processes in the one or more call events and determining relevance information between the one or more processes according to the first support information includes:
in an optional embodiment, the obtaining association degree information between the first process and the second process further includes:
establishing one or more item sets according to one or more processes, wherein the item sets comprise N processes, and N is a positive integer;
determining second support information corresponding to one or more item sets in one or more calling events; the second support degree information is used for indicating the number of times of simultaneous calls corresponding to N processes in one or more item sets in one or more call events;
screening the one or more item sets according to the relationship between second support information corresponding to the one or more item sets and a preset support threshold value to determine one or more frequent item sets;
and determining the relevance information among the processes in the one or more frequent item sets according to the second support information corresponding to the one or more frequent item sets.
In an optional embodiment, the apparatus is further configured to:
establishing one or more M-1 item sets according to one or more processes, wherein the M-1 item sets comprise M-1 processes; determining second support information corresponding to one or more M-1 item sets in one or more calling events; screening the one or more M-1 th item sets according to the relation between second support information corresponding to the one or more M-1 th item sets and a preset support threshold value to determine one or more M-1 th frequent item sets; m is a positive integer greater than 1;
connecting one or more M-1 frequent item sets to establish one or more M item sets, wherein the M item sets comprise M processes;
determining second support information corresponding to one or more Mth item sets in one or more calling events; screening one or more Mth item sets according to the relation between second support information corresponding to the one or more Mth item sets and a preset support threshold value to determine one or more Mth frequent item sets;
assigning M to be M-1 under the condition that the Mth frequent item set is a non-empty set, and repeating the operations; alternatively, the first and second electrodes may be,
and under the condition that the Mth frequent item set is an empty set, determining the relevance information among the processes in the one or more M-1 th frequent item sets according to the second support information corresponding to the one or more M-1 th frequent item sets.
In an optional embodiment, the screening the one or more mth item sets according to a relationship between second support information corresponding to the one or more mth item sets and a preset support threshold to determine the one or more mth frequent item sets includes:
and determining one or more mth item sets of which the second support information is greater than or equal to the support threshold value as one or more mth frequent item sets.
In an optional embodiment, the concatenating the one or more mth-1 frequent item sets to establish one or more mth item sets includes:
combining any two M-1 frequent item sets to establish an M item set; wherein the M processes in the M-th entry set are all different processes from each other.
In an optional embodiment, the determining, according to the second support information corresponding to the one or more M-1 th frequent item sets, the association information between the processes in the one or more M-1 th frequent item sets includes:
determining association degree information between processes in the first subset and processes in the second subset according to second support degree information corresponding to the first subset in the M-1 th frequent item set and second support degree information corresponding to the M-1 th frequent item set;
determining relevance information between processes in one or more M-1 th frequent item sets according to relevance information between processes in the first subset and processes in the second subset;
wherein, the M-1 frequent item set is composed of a first sub item set and a second sub item set.
In an optional embodiment, the determining, according to the second support information corresponding to the first sub-item set in the M-1 th frequent item set and the second support information corresponding to the M-1 th frequent item set, the association information between the processes in the first sub-item set and the processes in the second sub-item set includes:
determining confidence information between the first sub item set and the second sub item set according to the second support information corresponding to the first sub item set and the second support information corresponding to the M-1 frequent item set; wherein the confidence information is used to indicate a probability that a process in the first subset occurs concurrently with a process in the second subset;
determining an association rule between the first sub-item set and the second sub-item set according to the relation between the confidence degree information and a preset confidence degree threshold value;
according to the association rule, the association degree information between the processes in the first subset and the processes in the second subset is determined.
In an optional embodiment, the determining an association rule between the first sub-item set and the second sub-item set according to the relationship between the confidence information and a preset confidence threshold includes:
setting association rules between the first sub-item set and the second sub-item set with the confidence coefficient information being greater than or equal to the confidence coefficient threshold value as strong association rules; and/or the presence of a gas in the gas,
setting an association rule between the first sub-item set and the second sub-item set of which the confidence coefficient information is smaller than the confidence coefficient threshold value as a non-strong association rule;
determining association degree information between the processes in the first subset and the processes in the second subset according to an association rule, wherein the association degree information comprises the following steps:
setting association degree information between processes in the first sub-item set and processes in the second sub-item set, wherein the association rule is a strong association rule, as strong association information; and/or the presence of a gas in the gas,
and setting the association degree information between the processes in the first subset and the processes in the second subset, of which the association rules are non-strong association rules, as non-strong association information.
In an optional embodiment, the performing process recycling processing on the second process according to the association degree information includes:
determining a non-associated second process in the second process, wherein the association degree information between the non-associated second process and the first process is non-strong association information;
and carrying out process recycling processing on the non-associated second process.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 3
Embodiments of the present invention also provide a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to perform the steps of any of the above-mentioned method embodiments when executed.
Alternatively, in this embodiment, the computer-readable storage medium may be configured to store a computer program for executing the method steps recited in the above embodiments:
optionally, in this embodiment, the computer-readable storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Example 4
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in this embodiment, the processor may be configured to execute the method steps recited in the above embodiments through a computer program.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (15)

1. A method for recovering system resources based on process type association is characterized by comprising the following steps:
acquiring association degree information between a first process and a second process; the first process is a process operated by a system foreground, and the second process is a process cached by a system background;
and carrying out process recycling processing on one or more second processes according to the association degree information.
2. The method according to claim 1, wherein the performing process recycling processing on the second process according to the relevancy information comprises:
under the condition that the space of the system background cache is smaller than or equal to a preset recovery threshold value, process recovery processing is carried out on one or more second processes according to the relevancy information; alternatively, the first and second electrodes may be,
and according to a preset recovery period, carrying out process recovery processing on one or more second processes according to the association degree information.
3. The method of claim 1, wherein obtaining the association information between the first process and the second process comprises:
acquiring one or more calling events occurring in a preset time period, and determining one or more processes called by a system in the one or more calling events;
determining corresponding first support degree information of the one or more processes in the one or more calling events; the first support degree information is used for indicating the calling times corresponding to the one or more processes in the one or more calling events;
determining relevance information between one or more processes according to the first support degree information, and determining relevance information between the first process and the second process according to the relevance information between one or more processes;
wherein the process comprises the first process and the second process.
4. The method of claim 3, wherein the determining first support information corresponding to the one or more processes in the one or more call events and determining relevance information between the one or more processes according to the first support information comprises:
determining the first support degree information corresponding to the N processes in the one or more calling events, and determining the relevance information between the one or more processes according to the first support degree information, wherein N is a positive integer.
5. The method according to claim 4, wherein the determining the first support degree information corresponding to the N processes in the one or more call events and determining the relevance information between one or more processes according to the first support degree information includes:
establishing one or more item sets according to the one or more processes, wherein the item sets comprise N processes;
determining second support information corresponding to the one or more item sets in the one or more calling events; wherein the second support degree information is used for indicating the number of times of simultaneous calls corresponding to the N processes in the one or more item sets in the one or more call events;
screening the one or more item sets according to the relationship between the second support information corresponding to the one or more item sets and a preset support threshold value to determine one or more frequent item sets;
and determining the relevance information among the processes in the one or more frequent item sets according to the second support information corresponding to the one or more frequent item sets.
6. The method of claim 5, further comprising:
establishing one or more M-1 item sets according to the one or more processes, wherein the M-1 item sets comprise M-1 processes; determining corresponding second support information of the one or more M-1 item sets in the one or more calling events; screening the one or more M-1 th item sets according to the relationship between the second support degree information corresponding to the one or more M-1 th item sets and a preset support degree threshold value to determine one or more M-1 th frequent item sets; m is a positive integer greater than 1;
connecting the one or more M-1 th frequent item sets to establish one or more M-th item sets, wherein the M-th item sets comprise M processes;
determining second support information corresponding to the one or more Mth item sets in the one or more calling events; screening the one or more Mth item sets according to the relationship between the second support information corresponding to the one or more Mth item sets and a preset support threshold value to determine one or more Mth frequent item sets;
assigning M to be M-1 under the condition that the Mth frequent item set is a non-empty set, and repeating the operations; alternatively, the first and second electrodes may be,
and under the condition that the Mth frequent item set is an empty set, determining the relevance information among the processes in the one or more M-1 th frequent item sets according to second support information corresponding to the one or more M-1 th frequent item sets.
7. The method of claim 6, wherein the screening the one or more mth item sets according to a relationship between the second support information corresponding to the one or more mth item sets and a preset support threshold to determine one or more mth frequent item sets comprises:
determining the one or more mth item sets for which the second support information is greater than or equal to the support threshold as the one or more mth frequent item sets.
8. The method of claim 6, wherein said concatenating the one or more mth-1 frequent item sets to establish one or more mth item sets comprises:
combining any two M-1 frequent item sets to establish an M item set; wherein M of the processes in the M-th entry set are all different processes from each other.
9. The method of claim 6, wherein the determining the relationship information between the processes in the one or more M-1 th frequent item sets according to the second support information corresponding to the one or more M-1 th frequent item sets comprises:
determining association degree information between the processes in the first subset and the processes in the second subset according to the second support degree information corresponding to the first subset in the M-1 th frequent item set and the second support degree information corresponding to the M-1 th frequent item set;
determining relevance information between the processes in the one or more M-1 st frequent item sets according to relevance information between the processes in the first subset and the processes in a second subset;
wherein the M-1 th frequent item set is composed of the first sub item set and the second sub item set.
10. The method of claim 9, wherein said determining the association information between the processes in the first subset and the processes in the second subset according to the second support information corresponding to the first subset in the M-1 th frequent item set and the second support information corresponding to the M-1 th frequent item set comprises:
determining confidence information between the first sub item set and the second sub item set according to the second support information corresponding to the first sub item set and the second support information corresponding to the M-1 frequent item set; wherein the confidence information is to indicate a probability that the process in the first subset occurs concurrently with the process in the second subset;
determining an association rule between the first sub-item set and the second sub-item set according to a relation between the confidence degree information and a preset confidence degree threshold value;
according to the association rule, determining association degree information between the processes in the first subset and the processes in the second subset.
11. The method according to any one of claims 6 to 10, wherein the determining an association rule between the first sub-item set and the second sub-item set according to a relationship between the confidence information and a preset confidence threshold comprises:
setting association rules between the first sub-item set and the second sub-item set of which the confidence information is greater than or equal to the confidence threshold value as strong association rules; and/or the presence of a gas in the gas,
setting an association rule between the first sub-item set and the second sub-item set of which the confidence information is smaller than the confidence threshold value as a non-strong association rule;
the determining, according to the association rule, association degree information between the processes in the first subset and the processes in the second subset includes:
setting association degree information between the processes in the first subset and the processes in the second subset of the association rule as strong association information; and/or the presence of a gas in the gas,
setting association degree information between the processes in the first subset and the processes in the second subset of the association rule as non-strong association information.
12. The method according to claim 11, wherein the performing process recycling processing on the second process according to the relevancy information comprises:
determining a non-associated second process in the second process, wherein association degree information between the non-associated second process and the first process is the non-strong association information;
and carrying out process recycling processing on the non-associated second process.
13. A system resource recycling apparatus based on process type association, comprising:
the association module is used for acquiring association degree information between the first process and the second process; the first process is a process operated by a system foreground, and the second process is a process cached by a system background;
and the recovery module is used for carrying out process recovery processing on one or more second processes according to the association degree information.
14. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to carry out the method of any one of claims 1 to 12 when executed.
15. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 12.
CN201911419847.2A 2019-12-31 2019-12-31 System resource recovery method and device based on process type association Pending CN111221650A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911419847.2A CN111221650A (en) 2019-12-31 2019-12-31 System resource recovery method and device based on process type association

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911419847.2A CN111221650A (en) 2019-12-31 2019-12-31 System resource recovery method and device based on process type association

Publications (1)

Publication Number Publication Date
CN111221650A true CN111221650A (en) 2020-06-02

Family

ID=70831026

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911419847.2A Pending CN111221650A (en) 2019-12-31 2019-12-31 System resource recovery method and device based on process type association

Country Status (1)

Country Link
CN (1) CN111221650A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112217940A (en) * 2020-08-28 2021-01-12 深圳市修远文化创意有限公司 Memory release method and related device
CN115309547A (en) * 2022-07-31 2022-11-08 荣耀终端有限公司 Method and device for processing asynchronous binder call

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514267A (en) * 2013-09-04 2014-01-15 快传(上海)广告有限公司 Gateway correlation information obtaining method and system
CN104252389A (en) * 2013-06-27 2014-12-31 腾讯科技(深圳)有限公司 Application operation method, system and application
CN105446814A (en) * 2014-09-30 2016-03-30 青岛海信移动通信技术股份有限公司 Cache recovery method and device
CN107220076A (en) * 2016-09-27 2017-09-29 华为技术有限公司 A kind of method for recovering internal storage and device
WO2017198198A1 (en) * 2016-05-19 2017-11-23 中兴通讯股份有限公司 Software compiling method and device
CN107463403A (en) * 2017-07-31 2017-12-12 广东欧珀移动通信有限公司 Course control method, device, storage medium and electronic equipment
CN108830655A (en) * 2018-06-19 2018-11-16 郑州云海信息技术有限公司 A kind of user's operation Relation acquisition method and relevant apparatus
US20190102383A1 (en) * 2016-02-22 2019-04-04 Alibaba Group Holding Limited Association analysis method and apparatus
CN110032267A (en) * 2018-01-10 2019-07-19 广东欧珀移动通信有限公司 Information processing method, device, mobile terminal and computer readable storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104252389A (en) * 2013-06-27 2014-12-31 腾讯科技(深圳)有限公司 Application operation method, system and application
CN103514267A (en) * 2013-09-04 2014-01-15 快传(上海)广告有限公司 Gateway correlation information obtaining method and system
CN105446814A (en) * 2014-09-30 2016-03-30 青岛海信移动通信技术股份有限公司 Cache recovery method and device
US20190102383A1 (en) * 2016-02-22 2019-04-04 Alibaba Group Holding Limited Association analysis method and apparatus
WO2017198198A1 (en) * 2016-05-19 2017-11-23 中兴通讯股份有限公司 Software compiling method and device
CN107220076A (en) * 2016-09-27 2017-09-29 华为技术有限公司 A kind of method for recovering internal storage and device
CN107463403A (en) * 2017-07-31 2017-12-12 广东欧珀移动通信有限公司 Course control method, device, storage medium and electronic equipment
CN110032267A (en) * 2018-01-10 2019-07-19 广东欧珀移动通信有限公司 Information processing method, device, mobile terminal and computer readable storage medium
CN108830655A (en) * 2018-06-19 2018-11-16 郑州云海信息技术有限公司 A kind of user's operation Relation acquisition method and relevant apparatus

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112217940A (en) * 2020-08-28 2021-01-12 深圳市修远文化创意有限公司 Memory release method and related device
CN115309547A (en) * 2022-07-31 2022-11-08 荣耀终端有限公司 Method and device for processing asynchronous binder call
CN115309547B (en) * 2022-07-31 2023-08-29 荣耀终端有限公司 Method and device for processing asynchronous binder call

Similar Documents

Publication Publication Date Title
KR101721466B1 (en) Fault tolerant batch processing
CN109885565B (en) Data table cleaning method and device
CN107656864A (en) A kind of Mobile solution automated testing method based on probabilistic model
CN111221643A (en) Task processing method and task processing device
CN111221650A (en) System resource recovery method and device based on process type association
CN108304274A (en) A kind of method of information exchange, server and computer-readable medium
CN110162344B (en) Isolation current limiting method and device, computer equipment and readable storage medium
CN112486642B (en) Resource scheduling method, device, electronic equipment and computer readable storage medium
CN108415998B (en) Application dependency relationship updating method, terminal, device and storage medium
US10310877B2 (en) Category based execution scheduling
CN107220275B (en) Database handles processing method, device and computer equipment
CN110362394B (en) Task processing method and device, storage medium and electronic device
CN109582382B (en) Loading method and device of configuration information, storage medium and terminal equipment
CN112364005B (en) Data synchronization method, device, computer equipment and storage medium
US20150293950A1 (en) Method, apparatus, and storage medium for removing redundant information from terminal
CN111880910A (en) Data processing method and device, server and storage medium
US11669316B2 (en) Web-based customer service via single-class rebuild
US9652766B1 (en) Managing data stored in memory locations having size limitations
CN115563160A (en) Data processing method, data processing device, computer equipment and computer readable storage medium
CN116048757A (en) Task processing method, device, electronic equipment and storage medium
CN113256355B (en) Method, device, medium, equipment and system for determining integral rights and interests in real time
CN112988277B (en) Rule file loading method, device, server and medium
CN110659125A (en) Analysis task execution method, device and system and electronic equipment
CN113806055A (en) Lightweight task scheduling method, system, device and storage medium
CN114116317A (en) Data processing method, device, equipment and 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