CN113626397A - Method and system for dynamically processing data file - Google Patents

Method and system for dynamically processing data file Download PDF

Info

Publication number
CN113626397A
CN113626397A CN202110877623.7A CN202110877623A CN113626397A CN 113626397 A CN113626397 A CN 113626397A CN 202110877623 A CN202110877623 A CN 202110877623A CN 113626397 A CN113626397 A CN 113626397A
Authority
CN
China
Prior art keywords
application
compressed data
decompression
priority
probability
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
CN202110877623.7A
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN202110877623.7A priority Critical patent/CN113626397A/en
Publication of CN113626397A publication Critical patent/CN113626397A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/174Redundancy elimination performed by the file system
    • G06F16/1744Redundancy elimination performed by the file system using compression, e.g. sparse files

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and a system for dynamically processing a data file, wherein the method comprises the following steps: responding to a first operation aiming at the mobile terminal initiated by a user, and acquiring a pre-decompression configuration file; responding to a second operation initiated by a user and aiming at the mobile terminal, and determining a decompression level for performing data pre-decompression for each application based on the second operation and the foreground running probability of each application; determining a compression rate of each of a plurality of compressed data areas within each of the compressed data segments; and compressing the data file according to the compression rate of each compressed data area.

Description

Method and system for dynamically processing data file
Divisional application
The application is a divisional application of a patent application which is filed in 2018, 6, 16 and has an application number of 2018106245439 and is entitled "a method and a system for dynamically processing data files".
Technical Field
The present invention relates to the field of data processing and mobile applications, and more particularly, to a method and system for dynamically processing data files of an application.
Background
Currently, as the use of mobile terminals is becoming more and more popular, people often utilize mobile terminals to install a large number of applications and store a large amount of personal data. Since the amount of data increases more rapidly than the storage space increases, it is increasingly important to efficiently manage data files in a mobile terminal. A lot of space can be saved by compressing the data file, but the compressed data file takes a certain amount of time to decompress. This time consumption may result in user hesitation in using the application. For this reason, a technique of dynamically processing the data file of the application is required.
Disclosure of Invention
According to an aspect of the present invention, there is provided a method for dynamically processing a data file, the method comprising:
responding to a first operation aiming at the mobile terminal initiated by a user, and acquiring a pre-decompression configuration file, wherein the pre-decompression configuration file is used for indicating the foreground operation probability of each application in a plurality of applications in the mobile terminal, and the foreground operation probability comprises a high operation probability, a medium operation probability and a low operation probability;
responding to a second operation initiated by a user and aiming at the mobile terminal, determining a decompression level for performing data pre-decompression for each application based on the second operation and the foreground operation probability of each application, wherein the decompression level comprises a priority decompression level, an observation decompression level and a delay decompression level, and labeling the applications as a priority application, an observation application and a delay application respectively according to the decompression level determined for the applications;
scanning a compressed data segment in which a plurality of data files of each priority application in at least one priority application determined as a priority decompression level are positioned, and determining the compression rate of each compressed data area in a plurality of compressed data areas in the compressed data segment in which the plurality of data files of each priority application are positioned; scanning a compressed data segment in which the plurality of data files of each observation application in the at least one observation application determined as the observation decompression stage are located, and determining a compression rate of each compressed data area in a plurality of compressed data areas in the compressed data segment in which the plurality of data files of each observation application are located; scanning a compressed data segment in which a plurality of data files of each of at least one delayed application determined as a delayed decompression stage are located, determining a compression ratio of each of a plurality of compressed data areas in the compressed data segment in which the plurality of data files of each of the delayed applications are located, wherein the compression ratio includes a high compression ratio, a medium compression ratio and a low compression ratio, and wherein the compression degrees of the high compression ratio, the medium compression ratio and the low compression ratio are sequentially increased;
for the compressed data segment where the plurality of data files which are preferentially applied are located, firstly decompressing the compressed data area with high compression rate, and then decompressing the compressed data area with low compression rate; decompressing the compressed data area with low compression rate aiming at the compressed data section where the plurality of data files of each observation application are positioned; decompressing the compressed data area with high compression rate aiming at the compressed data section where the plurality of data files of each delayed application are positioned;
in response to a third operation initiated by a user for the mobile terminal, when it is determined based on the third operation that a decompression level of a first priority application of the at least one priority application no longer conforms to a priority decompression level, determining the decompression level of the first priority application as an observed decompression level and marking the first priority application as an observed application; compressing the decompressed compressed data area with high compression rate according to the high compression rate aiming at the compressed data section where the plurality of data files of the first priority application are located; and
modifying a decompression stage of a first observation application of the at least one observation application to a deferred decompression stage when a time for which the decompression stage of the first observation application remains as the observed decompression stage exceeds a first time threshold, compressing compressed data regions of a low compression rate that have been decompressed at a low compression rate and decompressing the compressed data regions of a high compression rate for a compressed data segment in which the plurality of data files of the first observation application reside, and marking the first observation application as the deferred application;
wherein when a time for which a decompression level of a second priority application of the at least one priority application remains as the priority decompression level exceeds a second time threshold, decompressing a compressed data region of a medium compression rate within a compressed data segment in which the plurality of data files of the second priority application reside and marking the second priority application as a fully decompressed application.
Wherein the first operation comprises: the method comprises the steps of performing screen unlocking operation, power-on starting operation and application interface browsing operation, and enabling a user to initiate first operation by initiating a touch action aiming at the mobile terminal, wherein the touch action can be converted into a control instruction aiming at the mobile terminal, and the control instruction is used for initiating the first operation.
The mobile terminal can be installed with a plurality of applications, each application comprises a plurality of data files, and each data file is an uncompressed data file.
The pre-decompression configuration file comprises a plurality of data items, and each data item comprises an application name and a foreground operation probability;
updating the pre-decompression configuration file according to a first preset time interval so that the pre-decompression configuration file can indicate the foreground operation probability of each application in a plurality of applications in the mobile terminal in real time;
wherein the first predetermined time interval is 20 minutes, 30 minutes, 40 minutes or 60 minutes.
Further comprising calculating a foreground running probability Pi for each application by the following formula:
Figure BDA0003190900750000021
wherein ni is the number of times that the application i runs in the second predetermined time interval, i is 1,2, 3.. and m, wherein m is a natural number greater than 5, wherein Ti is the current time score of the application i, Li is the current position score of the application i, Si is the current state score of the application i, α is a time factor, β is a position factor, and δ is a state factor;
determining a current time score Ti for the application i according to the current time of the mobile terminal; determining a current position score Li for the application i according to the current position of the mobile terminal and determining a current state score Si for the application i according to the current state of the mobile terminal;
wherein the values of α, β, and δ are set in advance by an operating system of the mobile terminal or are set according to a user input;
determining Ti according to the operation times, operation time ratio or operation probability of the application i at the current time in a second preset time interval; determining the score Li of the current position by applying the operation times, operation time ratio or operation probability of the i at the current position in a second preset time interval; and determining the current position score Si according to the operation times, operation time ratio or operation probability of the i in the current state in a second preset time interval.
Further comprising calculating a foreground running probability Pi for each application by the following formula:
Figure BDA0003190900750000031
the method comprises the following steps that E is a preset statistical time period, ti is the total time of foreground operation of an application i in E, i is 1,2,3, m, m is the number of the applications and is a natural number larger than 5, and Ui is the heat degree score of the application i;
the method comprises the steps of obtaining an application heat ranking list of the current time from an application server based on the current time of the mobile terminal, and inquiring the application heat list to determine Ui of an application i at the current time.
Further comprising calculating a foreground running probability Pi for each application by the following formula:
Figure BDA0003190900750000032
wherein E is a preset statistical time period, Ti is a total time of foreground operation of an application i in E, i is 1,2,3, m, m is the number of applications and is a natural number greater than 5, where Ti is a current time score of the application i, Li is a current position score of the application i, Si is a current state score of the application i, α is a time factor, β is a position factor, and δ is a state factor;
determining a current time score Ti for the application i according to the current time of the mobile terminal; determining a current position score Li for the application i according to the current position of the mobile terminal and determining a current state score Si for the application i according to the current state of the mobile terminal;
wherein the values of α, β, and δ are set in advance by an operating system of the mobile terminal or are set according to a user input;
determining Ti according to the operation times, operation time ratio or operation probability of the application i at the current time in a second preset time interval;
determining the score Li of the current position by applying the operation times, operation time ratio or operation probability of the i at the current position in a second preset time interval;
and determining the current position score Si according to the operation times, operation time ratio or operation probability of the i in the current state in a second preset time interval.
The second operation is an application start operation, the user initiates the second operation by initiating a touch action for the application of the mobile terminal, and the user initiates the second operation by initiating a touch action for the mobile terminal, the touch action being convertible into a control instruction for the mobile terminal, the control instruction being for initiating the second operation.
Wherein determining, for each application, a decompression stage for performing data pre-decompression based on the second operation and the foreground running probability of each application comprises:
determining the identification of a first running application started by the second operation, and searching a content database based on the identification of the first running application to determine the description information of the first running application;
obtaining the description information of each application except the first running application in a plurality of applications in the mobile terminal;
calculating a matching value of the description information of the first running application and the description information of each application except the first running application and determining the association degree of each application except the first running application with the first running application based on the matching value;
calculating a modified foreground run probability for each application based on the association of each application, other than the first running application, with the first running application and the foreground run probability for each application;
determining a decompression level for each application based on the modified foreground run probability for each application other than the first running application;
wherein calculating a modified foreground run probability for each application based on the association of each application other than the first running application with the first running application and the foreground run probability for each application comprises:
converting the association degree of each application except the first running application and the first running application into a foreground running probability additional value of each application except the first running application;
taking the arithmetic sum of the added value of the foreground running probability of each application except the first running application and the foreground running probability of each application as the modified foreground running probability of each application;
wherein determining a decompression level for each application based on the modified foreground run probability for each application other than the first running application comprises:
ranking the modified foreground run probabilities for each application other than the first running application to generate a probability list;
dividing the applications into three groups according to the descending order in the probability list, wherein the foreground running probability of each application in the first group is greater than the foreground running probability of any application in the second group and the third group, and the foreground running probability of each application in the second group is greater than the foreground running probability of any application in the third group;
determining a decompression level for each application in the first group as a priority decompression level;
determining a decompression level for each application in the second set as an observed decompression level;
the decompression stage of each application in the third group is determined as a delayed decompression stage.
Wherein the priority decompression stage, the observation decompression stage and the delay decompression stage are sequentially reduced in level;
wherein labeling the application as a priority application, an observation application, and a delay application, respectively, according to the determined decompression level for the application comprises:
marking the application with the priority decompression level as a priority application;
labeling an application observing the decompression stage as an observation application;
the application of the delayed decompression stage is labeled delayed application.
Wherein a separate compressed data section is allocated to each of a plurality of applications within the mobile terminal, each compressed data section including a plurality of compressed data areas and a compression ratio is specified for each of the plurality of compressed data areas within the same compressed data section, the compression ratio including a high compression ratio, a medium compression ratio and a low compression ratio;
each compressed data area compresses all data files stored by the compressed data area according to the appointed compression rate;
wherein each compressed data segment includes at least one compressed data region of a high compression rate, at least one compressed data region of a medium compression rate, and at least one compressed data region of a low compression rate.
Wherein the high compression ratio is 90%, the medium compression ratio is 80%, and the low compression ratio is 70%.
Wherein decompressing the compressed data area of the high compression ratio comprises: decompressing all compressed data files in the compressed storage area with high compression rate;
wherein decompressing the compressed data area of the medium compression ratio comprises: decompressing all compressed data files in the compressed storage area with medium compression rate; and
wherein decompressing the compressed data area of the low compression rate comprises: and decompressing all compressed data files in the compressed storage area with the low compression rate.
Compressing the (uncompressed) data file stored in the compressed storage area of high compression rate at a high compression rate;
compressing the (uncompressed) data file stored in the compressed storage area at the medium compression rate; and
the (uncompressed) data file stored in the compressed storage area of low compression ratio is compressed at low compression ratio.
The third operation is an application starting operation, and the user initiates the third operation by initiating a touch action of an application of the mobile terminal, wherein the touch action can be converted into a control instruction aiming at the mobile terminal, and the control instruction is used for initiating the third operation;
the application targeted by the third operation is different from the application targeted by the second operation; that is, the first running application and the second running application are different;
determining an identifier of a second running application started through the third operation, and retrieving a content database based on the identifier of the second running application to determine description information of the second running application;
acquiring description information of each priority application in at least one priority application in the mobile terminal;
calculating a matching value of the description information of the second running application and the description information of each priority application and determining the association degree of each priority application with the second running application based on the matching value;
calculating an updated foreground running probability of each application based on the association degree of each priority application with the second running application and the current foreground running probability of each priority application;
determining an updated decompression level for each priority application based on the updated foreground run probability for each priority application.
Wherein calculating the updated foreground run probability for each application based on the association of each priority application with the second running application and the current foreground run probability for each priority application comprises:
converting the association degree of each priority application and the second running application into a foreground running probability additional value of each priority application;
taking the arithmetic sum of the foreground operation probability additional value of each priority application and the current foreground operation probability of each priority application as the updated foreground operation probability of each priority application;
wherein the foreground operation probability added value is a positive integer, a negative integer or zero.
Wherein determining the decompression level for the update of each priority application based on the foreground run probability for the update of each priority application comprises:
determining the updated decompression level of the priority application as an observed decompression level when the foreground running probability of the update of the priority application is less than the priority decompression threshold and is greater than or equal to the observed decompression threshold;
when the foreground running probability of the update of the priority application is less than the observation decompression threshold, determining the updated decompression level of the priority application as a delayed decompression level.
And when the updated foreground running probability of the priority application is greater than or equal to the priority decompression threshold, determining the updated decompression level of the priority application as the priority decompression level.
Modifying the decompression level of the particular priority application to an observed decompression level when the updated decompression level of the particular priority application is the observed decompression level or the delayed decompression level.
The first time threshold is 20 minutes, 30 minutes or 40 minutes.
The decompressing the compressed data area with high compression ratio, and then decompressing the compressed data area with low compression ratio comprises:
all compressed data files in the compressed data area with high compression rate are decompressed first, and after all data files in each compressed data area with high compression rate are decompressed, all compressed data files in the compressed data area with low compression rate are decompressed.
The second time threshold is 20 minutes, 30 minutes, or 40 minutes.
Wherein compressing the decompressed compressed data area of low compression rate at low compression rate for the compressed data segment where the plurality of data files of the first observation application are located, and decompressing the compressed data area of high compression rate includes:
for the compressed data segment in which the plurality of data files of the first observation application are located, all (uncompressed) data files in the compressed data area of low compression rate that have been decompressed are compressed at low compression rate, and all compressed data files in the compressed data area of high compression rate are decompressed.
Wherein decompressing the compressed data area of the medium compression rate in the compressed data segment in which the plurality of data files of the second priority application are located comprises:
and decompressing all compressed data files in a compressed data area with a medium compression rate in a compressed data segment in which the plurality of data files of the second preferential application are positioned.
Further comprising calculating a foreground running probability Pi for each application by the following formula:
Figure BDA0003190900750000061
wherein ni is the running frequency of the application i in a second preset time interval, i is 1,2, 3.
The method comprises the steps of obtaining an application heat ranking list of the current time from an application server based on the current time of the mobile terminal, and inquiring the application heat list to determine Ui of an application i at the current time.
According to another aspect of the present invention, there is provided a system for dynamically processing a data file, the system comprising:
the mobile terminal comprises an acquisition unit, a pre-decompression configuration file and a pre-decompression configuration file, wherein the acquisition unit is used for responding to a first operation aiming at the mobile terminal initiated by a user and acquiring the pre-decompression configuration file which is used for indicating the foreground operation probability of each application in a plurality of applications in the mobile terminal, and the foreground operation probability comprises a high operation probability, a medium operation probability and a low operation probability;
the decompression level determining unit is used for responding to a second operation initiated by a user and aiming at the mobile terminal, determining a decompression level for performing data pre-decompression for each application based on the second operation and the foreground operation probability of each application, wherein the decompression level comprises a priority decompression level, an observation decompression level and a delay decompression level, and marking the applications as a priority application, an observation application and a delay application respectively according to the decompression level determined for the applications;
a scanning unit which scans a compressed data segment in which a plurality of data files of each priority application in at least one priority application determined as a priority decompression level are located, and determines a compression rate of each compressed data area in a plurality of compressed data areas in the compressed data segment in which the plurality of data files of each priority application are located; scanning a compressed data segment in which the plurality of data files of each observation application in the at least one observation application determined as the observation decompression stage are located, and determining a compression rate of each compressed data area in a plurality of compressed data areas in the compressed data segment in which the plurality of data files of each observation application are located; scanning a compressed data segment in which a plurality of data files of each of at least one delayed application determined as a delayed decompression stage are located, determining a compression ratio of each of a plurality of compressed data areas in the compressed data segment in which the plurality of data files of each of the delayed applications are located, wherein the compression ratio includes a high compression ratio, a medium compression ratio and a low compression ratio, and wherein the compression degrees of the high compression ratio, the medium compression ratio and the low compression ratio are sequentially increased;
the decompression unit is used for decompressing a compressed data area with high compression rate and then decompressing a compressed data area with low compression rate aiming at the compressed data section where the plurality of data files which are preferentially applied are located; decompressing the compressed data area with low compression rate aiming at the compressed data section where the plurality of data files of each observation application are positioned; decompressing the compressed data area with high compression rate aiming at the compressed data section where the plurality of data files of each delayed application are positioned;
a processing unit, in response to a third operation initiated by a user for the mobile terminal, when it is determined based on the third operation that a decompression level of a first priority application of the at least one priority application no longer conforms to a priority decompression level, determining the decompression level of the first priority application as an observed decompression level and marking the first priority application as an observed application; compressing the decompressed compressed data area with high compression rate according to the high compression rate aiming at the compressed data section where the plurality of data files of the first priority application are located; and modifying the decompression stage of a first observation application of the at least one observation application to a deferred decompression stage when the time for which the decompression stage of the first observation application remains as the observed decompression stage exceeds a first time threshold, compressing, for a compressed data segment in which the plurality of data files of the first observation application reside, a compressed data region of a low compression rate that has been decompressed at a low compression rate and decompressing the compressed data region of a high compression rate, and marking the first observation application as the deferred application;
wherein when a time for which a decompression level of a second priority application of the at least one priority application remains as the priority decompression level exceeds a second time threshold, decompressing a compressed data region of a medium compression rate within a compressed data segment in which the plurality of data files of the second priority application reside and marking the second priority application as a fully decompressed application.
Wherein the first operation comprises: the method comprises the steps of performing screen unlocking operation, power-on starting operation and application interface browsing operation, and enabling a user to initiate first operation by initiating a touch action aiming at the mobile terminal, wherein the touch action can be converted into a control instruction aiming at the mobile terminal, and the control instruction is used for initiating the first operation.
The mobile terminal can be installed with a plurality of applications, each application comprises a plurality of data files, and each data file is an uncompressed data file.
The pre-decompression configuration file comprises a plurality of data items, and each data item comprises an application name and a foreground operation probability;
updating the pre-decompression configuration file according to a first preset time interval so that the pre-decompression configuration file can indicate the foreground operation probability of each application in a plurality of applications in the mobile terminal in real time;
wherein the first predetermined time interval is 20 minutes, 30 minutes, 40 minutes or 60 minutes.
The system further comprises a calculating unit, and the foreground running probability Pi of each application is calculated by the following formula:
Figure BDA0003190900750000071
wherein ni is the number of times that the application i runs in the second predetermined time interval, i is 1,2, 3.. and m, wherein m is a natural number greater than 5, wherein Ti is the current time score of the application i, Li is the current position score of the application i, Si is the current state score of the application i, α is a time factor, β is a position factor, and δ is a state factor;
determining a current time score Ti for the application i according to the current time of the mobile terminal; determining a current position score Li for the application i according to the current position of the mobile terminal and determining a current state score Si for the application i according to the current state of the mobile terminal;
wherein the values of α, β, and δ are set in advance by an operating system of the mobile terminal or are set according to a user input;
determining Ti according to the operation times, operation time ratio or operation probability of the application i at the current time in a second preset time interval;
determining the score Li of the current position by applying the operation times, operation time ratio or operation probability of the i at the current position in a second preset time interval;
and determining the current position score Si according to the operation times, operation time ratio or operation probability of the i in the current state in a second preset time interval.
The system further comprises a calculating unit, and the foreground running probability Pi of each application is calculated by the following formula:
Figure BDA0003190900750000072
the method comprises the following steps that E is a preset statistical time period, ti is the total time of foreground operation of an application i in E, i is 1,2,3, m, m is the number of the applications and is a natural number larger than 5, and Ui is the heat degree score of the application i;
the method comprises the steps of obtaining an application heat ranking list of the current time from an application server based on the current time of the mobile terminal, and inquiring the application heat list to determine Ui of an application i at the current time.
The system further comprises a calculating unit, and the foreground running probability Pi of each application is calculated by the following formula:
Figure BDA0003190900750000081
wherein E is a preset statistical time period, Ti is a total time of foreground operation of an application i in E, i is 1,2,3, m, m is the number of applications and is a natural number greater than 5, where Ti is a current time score of the application i, Li is a current position score of the application i, Si is a current state score of the application i, α is a time factor, β is a position factor, and δ is a state factor;
determining a current time score Ti for the application i according to the current time of the mobile terminal; determining a current position score Li for the application i according to the current position of the mobile terminal and determining a current state score Si for the application i according to the current state of the mobile terminal;
wherein the values of α, β, and δ are set in advance by an operating system of the mobile terminal or are set according to a user input;
determining Ti according to the operation times, operation time ratio or operation probability of the application i at the current time in a second preset time interval;
determining the score Li of the current position by applying the operation times, operation time ratio or operation probability of the i at the current position in a second preset time interval;
and determining the current position score Si according to the operation times, operation time ratio or operation probability of the i in the current state in a second preset time interval.
The second operation is an application start operation, the user initiates the second operation by initiating a touch action for the application of the mobile terminal, and the user initiates the second operation by initiating a touch action for the mobile terminal, the touch action being convertible into a control instruction for the mobile terminal, the control instruction being for initiating the second operation.
Wherein determining, for each application, a decompression stage for performing data pre-decompression based on the second operation and the foreground running probability of each application comprises:
the computing unit determines an identifier of a first running application started through the second operation, and retrieves a content database based on the identifier of the first running application to determine description information of the first running application;
obtaining the description information of each application except the first running application in a plurality of applications in the mobile terminal;
calculating a matching value of the description information of the first running application and the description information of each application except the first running application and determining the association degree of each application except the first running application with the first running application based on the matching value;
calculating a modified foreground run probability for each application based on the association of each application, other than the first running application, with the first running application and the foreground run probability for each application;
a decompression level determination unit that determines a decompression level of each application based on the modified foreground running probability of each application other than the first running application;
wherein calculating a modified foreground run probability for each application based on the association of each application other than the first running application with the first running application and the foreground run probability for each application comprises:
converting the association degree of each application except the first running application and the first running application into a foreground running probability additional value of each application except the first running application;
taking the arithmetic sum of the added value of the foreground running probability of each application except the first running application and the foreground running probability of each application as the modified foreground running probability of each application;
wherein determining a decompression level for each application based on the modified foreground run probability for each application other than the first running application comprises:
ranking the modified foreground run probabilities for each application other than the first running application to generate a probability list;
dividing the applications into three groups according to the descending order in the probability list, wherein the foreground running probability of each application in the first group is greater than the foreground running probability of any application in the second group and the third group, and the foreground running probability of each application in the second group is greater than the foreground running probability of any application in the third group;
determining a decompression level for each application in the first group as a priority decompression level;
determining a decompression level for each application in the second set as an observed decompression level;
the decompression stage of each application in the third group is determined as a delayed decompression stage.
Wherein the priority decompression stage, the observation decompression stage and the delay decompression stage are sequentially reduced in level;
wherein labeling the application as a priority application, an observation application, and a delay application, respectively, according to the determined decompression level for the application comprises:
marking the application with the priority decompression level as a priority application;
labeling an application observing the decompression stage as an observation application;
the application of the delayed decompression stage is labeled delayed application.
The mobile terminal further comprises an allocation unit which allocates a separate compressed data section for each of the plurality of applications in the mobile terminal, wherein each compressed data section comprises a plurality of compressed data areas and specifies a compression rate for each of the plurality of compressed data areas in the same compressed data section, and the compression rates comprise a high compression rate, a medium compression rate and a low compression rate;
each compressed data area compresses all data files stored by the compressed data area according to the appointed compression rate;
wherein each compressed data segment includes at least one compressed data region of a high compression rate, at least one compressed data region of a medium compression rate, and at least one compressed data region of a low compression rate.
Wherein the high compression ratio is 90%, the medium compression ratio is 80%, and the low compression ratio is 70%.
Wherein the decompressing unit decompressing the compressed data area of the high compression rate includes: decompressing all compressed data files in the compressed storage area with high compression rate;
wherein decompressing the compressed data area of the medium compression ratio comprises: decompressing all compressed data files in the compressed storage area with medium compression rate; and
wherein decompressing the compressed data area of the low compression rate comprises: and decompressing all compressed data files in the compressed storage area with the low compression rate.
A compression unit that compresses the (uncompressed) data file stored in the compressed storage area of the high compression rate at the high compression rate;
compressing the (uncompressed) data file stored in the compressed storage area at the medium compression rate; and
the (uncompressed) data file stored in the compressed storage area of low compression ratio is compressed at low compression ratio.
The third operation is an application starting operation, and the user initiates the third operation by initiating a touch action of an application of the mobile terminal, wherein the touch action can be converted into a control instruction aiming at the mobile terminal, and the control instruction is used for initiating the third operation;
the application targeted by the third operation is different from the application targeted by the second operation; that is, the first running application and the second running application are different; and the second run is for a non-priority application;
determining an identifier of a second running application started through the third operation, and retrieving a content database based on the identifier of the second running application to determine description information of the second running application;
acquiring description information of each priority application in at least one priority application in the mobile terminal;
calculating a matching value of the description information of the second running application and the description information of each priority application and determining the association degree of each priority application with the second running application based on the matching value;
calculating an updated foreground running probability of each application based on the association degree of each priority application with the second running application and the current foreground running probability of each priority application;
determining an updated decompression level for each priority application based on the updated foreground run probability for each priority application.
The calculating unit calculates the updated foreground operation probability of each application based on the association degree of each priority application with the second operation application and the current foreground operation probability of each priority application comprises the following steps:
converting the association degree of each priority application and the second running application into a foreground running probability additional value of each priority application;
taking the arithmetic sum of the foreground operation probability additional value of each priority application and the current foreground operation probability of each priority application as the updated foreground operation probability of each priority application;
wherein the foreground operation probability added value is a positive integer, a negative integer or zero.
The decompression level determination unit determining the updated decompression level of each priority application based on the updated foreground operation probability of each priority application includes:
determining the updated decompression level of the priority application as an observed decompression level when the foreground running probability of the update of the priority application is less than the priority decompression threshold and is greater than or equal to the observed decompression threshold;
when the foreground running probability of the update of the priority application is less than the observation decompression threshold, determining the updated decompression level of the priority application as a delayed decompression level.
And when the updated foreground running probability of the priority application is greater than or equal to the priority decompression threshold, determining the updated decompression level of the priority application as the priority decompression level.
Modifying the decompression level of the particular priority application to an observed decompression level when the updated decompression level of the particular priority application is the observed decompression level or the delayed decompression level.
The first time threshold is 20 minutes, 30 minutes or 40 minutes.
The decompressing the compressed data area with high compression ratio, and then decompressing the compressed data area with low compression ratio comprises:
all compressed data files in the compressed data area with high compression rate are decompressed first, and after all data files in each compressed data area with high compression rate are decompressed, all compressed data files in the compressed data area with low compression rate are decompressed.
The second time threshold is 20 minutes, 30 minutes, or 40 minutes.
The processing unit compresses the decompressed compressed data area of low compression rate at low compression rate for the compressed data segment where the plurality of data files of the first observation application are located, and decompressing the compressed data area of high compression rate includes:
for the compressed data segment in which the plurality of data files of the first observation application are located, all (uncompressed) data files in the compressed data area of low compression rate that have been decompressed are compressed at low compression rate, and all compressed data files in the compressed data area of high compression rate are decompressed.
Wherein decompressing the compressed data area of the medium compression rate in the compressed data segment in which the plurality of data files of the second priority application are located comprises:
and decompressing all compressed data files in a compressed data area with a medium compression rate in a compressed data segment in which the plurality of data files of the second preferential application are positioned.
The system further comprises a calculating unit, and the foreground running probability Pi of each application is calculated by the following formula:
Figure BDA0003190900750000111
wherein ni is the running frequency of the application i in a second preset time interval, i is 1,2, 3.
The method comprises the steps of obtaining an application heat ranking list of the current time from an application server based on the current time of the mobile terminal, and inquiring the application heat list to determine Ui of an application i at the current time.
Drawings
A more complete understanding of exemplary embodiments of the present invention may be had by reference to the following drawings in which:
FIG. 1 is a flow diagram of a method for dynamically processing a data file according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a storage structure in a mobile terminal according to an embodiment of the present invention; and
fig. 3 is a schematic structural diagram of a system for dynamically processing a data file according to an embodiment of the present invention.
Detailed Description
FIG. 1 is a flow diagram of a method 100 for dynamically processing a data file according to an embodiment of the present invention. As depicted in fig. 1, method 100 begins at step 101.
In step 101, in response to a first operation initiated by a user for a mobile terminal, a pre-decompression configuration file is obtained, where the pre-decompression configuration file is used to indicate a foreground operation probability of each application in multiple applications in the mobile terminal. Wherein the foreground operation probability comprises a high operation probability, a medium operation probability and a low operation probability. Wherein, the foreground operation probability of each application can be preset by an operating system or a user, and is any reasonable value between 1% and 99%.
Wherein the first operation comprises: the screen unlocking operation, the power-on starting operation, the application interface browsing operation, the screen lightening operation, the phone answering operation and the like can indicate that a user wants to use the mobile terminal to run the operation of a specific application. The user initiates a first operation by initiating a touch action, a gesture action, a key action, etc. directed to the mobile terminal. The touch action, the gesture action, the key action and the like can be converted into a control instruction for the mobile terminal, and the control instruction is used for initiating the first operation.
A plurality of applications can be installed in the mobile terminal. Typically, the plurality of applications are considered user applications or system applications. In the present application, each application includes a plurality of data files, and each data file is an uncompressed data file.
Wherein the pre-decompression configuration file comprises a plurality of data items, and each data item comprises an application name and a foreground running probability. The data item is a binary group < application name, foreground operation probability >. For example, the data items are < pay, 40% >, < WeChat, 60% >. In general, the foreground operation probability may be determined according to a ratio of the number of foreground valid operations of the specific application to the total number of operations of the application within a predetermined period of time (e.g., 1 day, 2 days, etc.), a ratio of foreground accumulated operation time of the specific application to the total valid time within the predetermined period of time, and the like. And determining the application to be effectively run when the time of foreground running of the application is more than 5 seconds, 6 seconds, 8 seconds, 10 seconds and the like, and taking the number of times of effective running as the number of times of foreground effective running. Where the total effective time is the time the deductive application will obviously not run. For example, the ratio of the number of foreground valid runs 8 of the payroll to the total number of runs 20 of the application within 1 day is 40%. The ratio of the foreground cumulative runtime of 19.2 hours to the total active time of 32 hours (48 hours minus 16 hours of sleep time) over 2 days is believed to be 60%. Where the predetermined time period may be a time period from a current time to a particular time in the past, or any reasonable time period may be set by the system or the user, such as a predetermined time interval.
And updating the pre-decompression configuration file according to a first preset time interval so that the pre-decompression configuration file can indicate the foreground operation probability of each application in a plurality of applications in the mobile terminal in real time. The first predetermined time interval is 20 minutes, 30 minutes, 40 minutes, 60 minutes, or the like. When the update of the pre-decompression configuration file is performed, since the predetermined time period has changed (for example, moved for 20 minutes, 30 minutes, 40 minutes, or 60 minutes, etc.), for this purpose, the updated foreground operation probability of each application is calculated according to the new predetermined time period and the original foreground operation probability is replaced with the updated foreground operation probability. According to the method, the pre-decompression configuration file can indicate the foreground running probability of each application in the plurality of applications in the mobile terminal in real time.
The foreground running probability Pi of each application is calculated by the following formula:
Figure BDA0003190900750000121
where ni is the number of times the application i has been run (or the number of valid runs) within a second predetermined time interval (e.g., 1 day, 2 days, 3 days, etc.), i ═ 1,2, 3.. and m, where m is a natural number greater than 5, where Ti is the current time score of the application i, Li is the current location score of the application i, Si is the current state score of the application i, α is a time factor, β is a location factor, and δ is a state factor. Wherein a current time score Ti is determined for the application i according to the current time (standard time or system time) of the mobile terminal; a current location score Li is determined for the application i based on the current location of the mobile terminal (e.g. a physical location determined by a positioning system) and a current state score Si is determined for the application i based on the current state of the mobile terminal (e.g. a current state obtained by a motion trajectory, a mobile terminal acceleration sensor, a gravity sensor, etc.).
Wherein the values of α, β, and δ are set in advance by an operating system of the mobile terminal or are set according to user input. The values of α, β, and δ are used to adjust the weight ratio between the current time score, the current location score, and the current status score, and thus may be set according to system preferences, user preferences. For example, α ═ 0.4, β ═ 0.35, and δ ═ 0.25, the sum of which can be 1 or other values.
Wherein Ti is determined according to the operation times, operation time ratio or operation probability of the application i at the current time in the second preset time interval. And determining the current position score Li according to the running times, the running time ratio or the running probability of the application i at the current position in a second preset time interval. And determining the current position score Si according to the operation times, operation time ratio or operation probability of the i in the current state in a second preset time interval. The method and the device determine the current time, the current position and the current state of the mobile terminal when the foreground operation probability Pi is determined, and can acquire the operation statistical file associated with each application in a plurality of applications. The operation statistical file records an operation log of each application, wherein the operation log comprises a plurality of records, and each record is < application name, operation date, start time, end time, operation position and operation state >. For example, < Payment Bao, 1 month 1 year 2018, 12:00, 13:15, office, static >, < Payment Bao, 1 month 1 year 2018, 18:00, 18:50, on subway >, < Payment Bao, 1 month 2 day 2018, 11:50, 12:40, office, static >. Wherein the number of runs is the number of runs at the current time, current location, or current state determined from the run statistics file. The operation number ratio is a ratio of the operation number at the current time, current location, or current state determined from the operation statistic file to the total operation number (the number of all applications operated at the current time, current location, or current state). The running probability is the probability that the application may run at the current time, current location, or current state. The operation probability may be preset by the system or the user, or determined according to a record in the operation statistical file, for example, according to the operation time ratio.
The foreground running probability Pi of each application is calculated by the following formula:
Figure BDA0003190900750000131
where E is a preset statistical time period (e.g., a time period from the current time to a specific past time, such as 1 day, 2 days, 3 days, etc.), ti is a total time for application i to perform foreground operation in E (e.g., 3 times of operation in 3 days, respectively 1 hour, 2 hours, 1.5 hours, then the total time is 4.5 hours), i is 1,2,3,. Where E may be the valid time in a predetermined statistical time period. For example, if the predetermined statistical period is 3 days, then E is 48 hours (72 hours minus 24 hours of sleep time). The method comprises the steps of obtaining an application heat ranking list of the current time from an application server based on the current time of the mobile terminal, and inquiring the application heat list to determine Ui of an application i at the current time. The application server sorts all applications according to access times, comment times, search times, download times and the like, and determines an application heat sorting table according to the descending order of the access times, the comment times, the search times, the download times and the like. Wherein the top ranked application heat is higher in the application heat ranking table. The heat score is, for example, 100, 1000, 10000, 100000, etc.
The foreground running probability Pi of each application is calculated by the following formula:
Figure BDA0003190900750000132
where E is a preset statistical time period (e.g., a time period from a current time to a past specific time, such as 1 day, 2 days, 3 days, etc.), Ti is a total time for the application i to perform foreground operation in E (e.g., 3 times of operation in 3 days, respectively 1 hour, 2 hours, 1.5 hours, the total time is 4.5 hours), i is 1,2,3,. once, m, m is the number of applications and is a natural number greater than 5, where Ti is a current time score of the application i, Li is a current position score of the application i, Si is a current state score of the application i, α is a time factor, β is a position factor, and δ is a state factor.
Wherein a current time score Ti is determined for the application i according to the current time (standard time or system time) of the mobile terminal; a current location score Li is determined for the application i based on the current location of the mobile terminal (e.g. a physical location determined by a positioning system) and a current state score Si is determined for the application i based on the current state of the mobile terminal (e.g. a current state obtained by a motion trajectory, a mobile terminal acceleration sensor, a gravity sensor, etc.).
Wherein the values of α, β, and δ are set in advance by an operating system of the mobile terminal or are set according to user input. The values of α, β, and δ are used to adjust the weight ratio between the current time score, the current location score, and the current status score, and thus may be set according to system preferences, user preferences. For example, α ═ 0.4, β ═ 0.35, and δ ═ 0.25, the sum of which can be 1 or other values.
Wherein Ti is determined according to the operation times, operation time ratio or operation probability of the application i at the current time in the second preset time interval. And determining the current position score Li according to the running times, the running time ratio or the running probability of the application i at the current position in a second preset time interval. And determining the current position score Si according to the operation times, operation time ratio or operation probability of the i in the current state in a second preset time interval. The method and the device determine the current time, the current position and the current state of the mobile terminal when the foreground operation probability Pi is determined, and can acquire the operation statistical file associated with each application in a plurality of applications. The operation statistical file records an operation log of each application, wherein the operation log comprises a plurality of records, and each record is < application name, operation date, start time, end time, operation position and operation state >. For example, < Payment Bao, 1 month 1 year 2018, 12:00, 13:15, office, static >, < Payment Bao, 1 month 1 year 2018, 18:00, 18:50, on subway >, < Payment Bao, 1 month 2 day 2018, 11:50, 12:40, office, static >. Wherein the number of runs is the number of runs at the current time, current location, or current state determined from the run statistics file. The operation number ratio is a ratio of the operation number at the current time, current location, or current state determined from the operation statistic file to the total operation number (the number of all applications operated at the current time, current location, or current state). The running probability is the probability that the application may run at the current time, current location, or current state. The operation probability may be preset by the system or the user, or determined according to a record in the operation statistical file, for example, according to the operation time ratio.
The foreground running probability Pi of each application is calculated by the following formula:
Figure BDA0003190900750000141
where ni is the number of times that application i runs (or the number of valid runs) within a second predetermined time interval (e.g., 1 day, 2 days, 3 days, etc.), i ═ 1,2, 3. The heat score is, for example, 100, 1000, 10000, 100000, etc.
The method comprises the steps of obtaining an application heat ranking list of the current time from an application server based on the current time of the mobile terminal, and inquiring the application heat list to determine Ui of an application i at the current time. The application server sorts all applications according to access times, comment times, search times, download times and the like, and determines an application heat sorting table according to the descending order of the access times, the comment times, the search times, the download times and the like. Wherein the top ranked application heat is higher in the application heat ranking table.
In step 102, in response to a second operation initiated by the user for the mobile terminal, a decompression level for performing data pre-decompression is determined for each application based on the second operation (for example, when a shopping browsing application is performed, a dynamic coefficient of the payment application is increased) and a foreground running probability of each application, wherein the decompression level includes a priority decompression level, an observation decompression level and a delayed decompression level, and the applications are respectively marked as a priority application, an observation application and a delayed application according to the determined decompression level for the applications.
The second operation is an application start operation, and the user initiates the second operation by initiating a touch action, a gesture action, a key action, etc., with respect to the application of the mobile terminal. The user initiates a second operation by initiating a touch action, a gesture action, a key action, etc. directed to the mobile terminal, which can be converted into a control instruction directed to the mobile terminal, the control instruction being used to initiate the second operation.
Determining, for each application, a decompression stage for performing data pre-decompression based on the second operation and the foreground running probability of each application comprises:
and determining the identification of the first running application started by the second operation, and searching a content database based on the identification of the first running application to determine the description information of the first running application. For example, the first running application is a Taobao application, a Jingdong application, or the like. And acquiring the description information of each application except the first running application in a plurality of applications in the mobile terminal. Wherein the first running application is one of a plurality of applications.
Calculating a matching value of the description information of the first running application and the description information of each application except the first running application and determining the association degree of each application except the first running application with the first running application based on the matching value. The matching value between the description information is determined through text comparison, semantic comparison, keyword comparison and the like.
Calculating a modified foreground run probability for each application based on the association of each application other than the first running application with the first running application and the foreground run probability for each application.
Determining a decompression level for each application based on the modified foreground run probability for each application other than the first running application.
Wherein calculating a modified foreground run probability for each application based on the association of each application other than the first running application with the first running application and the foreground run probability for each application comprises: and converting the association degree of each application except the first running application and the first running application into the foreground running probability additional value of each application except the first running application. The way of converting the degree of association into the foreground operation probability additional value is to multiply the degree of association by a conversion coefficient to convert into the foreground operation probability additional value. The degrees of association are, for example, 50%, 80%, and 90%. And the conversion factor is 0.2, then the foreground operating probability added values are 10%, 16% and 18%.
And taking the arithmetic sum of the added value of the foreground running probability of each application except the first running application and the foreground running probability of each application as the modified foreground running probability of each application. Foreground operating probabilities are, for example, 45%, 55% and 70%, and foreground operating probability added values are 10%, then the modified foreground operating probabilities are 55%, 65% and 80%.
Wherein determining a decompression level for each application based on the modified foreground run probability for each application other than the first running application comprises:
ranking the modified foreground run probabilities for each application other than the first running application to generate a probability list. The probability list includes a plurality of data items, each data item being < application name, modified foreground run probability >. For example, < WeChat, 80% >, < Taobao, 65% >, and < Payment, 55% >. Typically, the data items are ordered in descending foreground run probability.
And dividing the applications into three groups according to the descending order in the probability list, wherein the foreground running probability of each application in the first group is greater than the foreground running probability of any application in the second group and the third group, and the foreground running probability of each application in the second group is greater than the foreground running probability of any application in the third group. Wherein the number of applications in each of the three groups may be the same, partially the same or different.
The decompression level of each application in the first group is determined as a priority decompression level. The decompression level of each application in the second set is determined as an observed decompression level. The decompression stage of each application in the third group is determined as a delayed decompression stage.
Wherein the priority decompression stage, the observation decompression stage and the delayed decompression stage are sequentially lower in level. Wherein labeling the application as a priority application, an observation application, and a delay application, respectively, according to the determined decompression level for the application comprises: the application whose decompression level is the priority decompression level is marked as the priority application. An application with a decompression stage as the observed decompression stage is labeled as the observed application. An application in which the decompression stage is a delayed decompression stage is labeled as a delayed application.
In step 103, scanning the compressed data segment in which the plurality of data files of each priority application in the at least one priority application determined as the priority decompression level are located, and determining the compression rate of each compressed data area in the plurality of compressed data areas in the compressed data segment in which the plurality of data files of each priority application are located; scanning a compressed data segment in which the plurality of data files of each observation application in the at least one observation application determined as the observation decompression stage are located, and determining a compression rate of each compressed data area in a plurality of compressed data areas in the compressed data segment in which the plurality of data files of each observation application are located; the method comprises the steps of scanning a compressed data section in which a plurality of data files of each delayed application in at least one delayed application determined as a delayed decompression stage are positioned, and determining a compression rate of each compressed data area in a plurality of compressed data areas in the compressed data section in which the plurality of data files of each delayed application are positioned, wherein the compression rate comprises a high compression rate, a medium compression rate and a low compression rate, and the compression degrees of the high compression rate, the medium compression rate and the low compression rate are sequentially increased.
Wherein after the operating system of the mobile terminal is started up (here, when the system service, the system application, the resource management, the network initialization, etc. of the operating system are started up and the user application is not loaded), and before the plurality of applications to be loaded of the mobile terminal are determined according to the preset loading configuration file, a plurality of compressed data segments for storing the data file are created in the storage device of the mobile terminal, as shown in fig. 2. Fig. 2 is a schematic diagram of a storage structure 200 in a mobile terminal according to an embodiment of the present invention. In fig. 2, the storage device 200 includes: a boot area 201, a data storage area 205, and a reserved storage area 206. Wherein the boot area 201 is used to store system files associated with the booting of the operating system and directory files for indicating storage directory information within the storage device 200. The data storage 205 includes a plurality of compressed data segments, such as compressed data segment 202, compressed data segment 203, compressed data segment 204, and so forth. Each compressed data segment includes at least three compressed data areas therein. For example, the compressed data segment 202 includes a compressed data area 202-1, a compressed data area 202-2, a compressed data area 202-3, a compressed data area 202-4, a compressed data area 202-5, and so on. The compressed data segment 203 includes a compressed data area 203-1, a compressed data area 203-2, a compressed data area 203-3, a compressed data area 203-4, a compressed data area 203-5, and the like. The reserved storage area 206 includes a plurality of data segments and a plurality of compressed data segments, and is used for storing backup files, or for storing reserved resources of a system, or for storing emergency files, or for storing storage areas when emergency storage is performed by the mobile terminal.
The application assigns a separate compressed data segment for each of a plurality of applications within the mobile terminal. For example, the compressed data section 202 is allocated for the payment instrument application, and all data files of the payment instrument application are stored in the compressed data section 202. Each compressed data segment includes a plurality of (at least three) compressed data areas and a compression rate is specified for each of the plurality of compressed data areas within the same compressed data segment. For example, the compressed data segment 202 includes a compressed data area 202-1, a compressed data area 202-2, a compressed data area 202-3, a compressed data area 202-4, a compressed data area 202-5, and so on. Wherein. The compressed data area 202-1 and the compressed data area 202-2 are compressed data areas with high compression rate; the compressed data area 202-3 and the compressed data area 202-4 are compressed data areas with medium compression rate; and the compressed data area 202-5 is a compressed data area of a low compression rate. That is, the compression ratio includes a high compression ratio, a medium compression ratio, and a low compression ratio.
Each compressed data area, compressed data area 202-1, compressed data area 202-2, compressed data area 202-3, compressed data area 202-4, and compressed data area 202-5, compresses all data files stored in itself (in its storage area) according to a specified compression rate. Wherein each compressed data segment includes at least one compressed data region of a high compression rate, at least one compressed data region of a medium compression rate, and at least one compressed data region of a low compression rate.
The storage space (or capacity) of each compressed data area may be the same or different, or partially the same. Further, the compression rate of each compressed data area within the same or different compressed data sections may be the same or different, and the compression rate of each compressed data area may be a high compression rate, a medium compression rate, or a low compression rate. For example, the high compression ratio is 90%, the medium compression ratio is 80%, and the low compression ratio is 70%. Alternatively, the high compression ratio is a compression ratio of 89% to 99%, the medium compression ratio is a compression ratio of 79% to 89% (excluding 89%), and the low compression ratio is a compression ratio of less than 79%. Alternatively, the high compression ratio is a compression ratio of 85% -100% (excluding 100%), the medium compression ratio is a compression ratio of 70% -85% (excluding 85%), and the low compression ratio is a compression ratio of less than 70%. The above values are exemplary only, and one skilled in the art will appreciate that the compression ratio or range of values can be any reasonable value.
In the present application, multiple data files (e.g., all data files) of each (priority, observation, delay, running) application are within a single compressed data segment, and each compressed data segment is used to store multiple data files (e.g., all data files) of one application. Before decompression, the application scans each compressed data segment, for example, a compressed data segment where a priority application is located, a compressed data segment where an observation application is located, or a compressed data segment where a delay application is located, to determine a compression rate of each of a plurality of compressed data regions within each compressed data segment.
In step 104, for the compressed data segment where the plurality of data files that are preferentially applied are located, the compressed data area with high compression rate is decompressed first, and then the compressed data area with low compression rate is decompressed; decompressing the compressed data area with low compression rate aiming at the compressed data section where the plurality of data files of each observation application are positioned; and decompressing the compressed data area with high compression rate aiming at the compressed data section where the plurality of data files of each delayed application are positioned.
Wherein decompressing the compressed data area of the high compression ratio comprises: and decompressing all data files in each high-compression-rate compressed storage area in the compressed data section where all data files of the priority application, the observation application or the delayed application are located.
Wherein decompressing the compressed data area of the medium compression ratio comprises: and decompressing all data files in the compressed storage area with the compression rate in each compressed data section where all the data files of the prior application, the observation application or the delayed application are positioned. And wherein decompressing the compressed data area of the low compression ratio comprises: and decompressing all data files in each low-compression-rate compressed storage area in the compressed data section where all data files of the priority application, the observation application or the delayed application are located.
The decompressing the compressed data area with high compression ratio, and then decompressing the compressed data area with low compression ratio comprises:
all compressed data files in the compressed data areas with high compression rate are decompressed first, and after all compressed data files in each compressed data area with high compression rate are decompressed, all compressed data files in the compressed data areas with low compression rate are decompressed.
Wherein the data file stored in the high compression rate compressed storage area is compressed at a high compression rate.
And compressing the data file stored in the compressed storage area with the medium compression rate according to the medium compression rate.
The data file stored in the compressed storage area of low compression ratio is compressed at low compression ratio. In general, when a plurality of/all data files of a specific application are stored in a compressed data section allocated for the specific application, the data files are compressed according to the compression rate of a compressed data area in which each data file is located. When a new data file of the specific application exists, the new data file and all other data files of the specific application are stored in the same compressed data segment. The newly added data file is compressed according to the compression rate of the compressed data area in which the newly added data file is stored.
In step 105, in response to a third operation (running a specific application) initiated by the user for the mobile terminal, when it is determined based on the third operation that the decompression level of a first priority application of the at least one priority application no longer complies with the priority decompression level, the decompression level of the first priority application is determined as the observed decompression level and the first priority application is marked as the observed application. And compressing the compressed data areas with high compression rate which are already decompressed according to the high compression rate aiming at the compressed data sections where the plurality of data files of the first priority application are positioned.
The third operation is an application start operation, and the user initiates the third operation by initiating a touch action, a gesture action, a key action, and the like, which are capable of being converted into a control instruction for the mobile terminal, for initiating the third operation, for the application of the mobile terminal.
The application targeted by the third operation is different from the application targeted by the second operation; that is, the first running application and the second running application are different applications. For example, the first running application is a pay for you application and the second running application is a WeChat application.
And determining the identification of the second running application started by the third operation, and searching a content database based on the identification of the second running application to determine the description information of the second running application. For example, the first running application is a Taobao application, a Jingdong application, or the like.
The description information of each priority application in at least one priority application in the mobile terminal is obtained. Wherein neither the second running application nor the first running application is a priority application.
And calculating a matching value of the description information of the second running application and the description information of each priority application and determining the association degree of each priority application with the second running application based on the matching value. The matching value between the description information is determined through text comparison, semantic comparison, keyword comparison and the like.
And calculating the updated foreground running probability of each application based on the association degree of each priority application and the second running application and the current foreground running probability of each priority application.
Determining an updated decompression level for each priority application based on the updated foreground run probability for each priority application.
Wherein calculating the updated foreground run probability for each application based on the association of each priority application with the second running application and the current foreground run probability for each priority application comprises:
and converting the association degree of each priority application and the second running application into a foreground running probability additional value of each priority application. The mode of converting the association degree into the foreground operation probability additional value is to subtract a reference value from the association degree to determine an intermediate value, and multiply the intermediate value by a conversion coefficient to convert into the foreground operation probability additional value. The degrees of association are, for example, 30%, 40%, 50%, 80%, and 90%. And the predetermined value is 0.5 and the conversion factor is 0.4, then the intermediate values are-20%, -10%, 0%, 30%, and 40%. The foreground operation probability has additional value of-8%, -4%, 0%, 12% and 16%
And taking the arithmetic sum of the foreground running probability additional value of each priority application and the current foreground running probability of each priority application as the updated foreground running probability of each priority application. Foreground operation probabilities are, for example, 45%, 55%, and 70%, and foreground operation probability added values are 12%, then the modified foreground operation probabilities are 57%, 67%, and 82%. Foreground operating probabilities are, for example, 45%, 55% and 70%, and foreground operating probability additional values are-8%, then the modified foreground operating probabilities are 37%, 47% and 74%. Wherein the foreground operation probability added value is a positive integer, a negative integer or zero.
Wherein determining the decompression level for the update of each priority application based on the foreground run probability for the update of each priority application comprises:
determining the updated decompression level of the priority application as an observed decompression level when the foreground running probability of the update of the priority application is less than the priority decompression threshold and is greater than or equal to the observed decompression threshold;
when the foreground running probability of the update of the priority application is less than the observation decompression threshold, determining the updated decompression level of the priority application as a delayed decompression level.
And when the updated foreground running probability of the priority application is greater than or equal to the priority decompression threshold, determining the updated decompression level of the priority application as the priority decompression level.
As described above, the priority decompression threshold and the observed decompression threshold may be determined when applications are to be grouped according to a probability list. For example, the smallest foreground run probability involved by all applications in the first group is determined as the preferential decompression threshold, and the smallest foreground run probability involved by all applications in the second group is determined as the observation decompression threshold. That is, the smallest foreground operation probability in the priority application is determined as the priority decompression threshold, and the smallest foreground operation probability in the observation application is determined as the observation decompression threshold. Further, it is also possible to set a priority decompression threshold and an observed decompression threshold in advance by the system or the user, and to determine a decompression level of any application or an updated decompression level according to the priority decompression threshold and the observed decompression threshold. Wherein the decompression level of the particular priority application is modified to the observed decompression level when the updated decompression level of the particular priority application is the observed decompression level. Wherein when the updated decompression level of the particular priority application is the delayed decompression level, the decompression level of the particular priority application is modified to the observed decompression level instead of the delayed decompression level.
In step 106, when the time for which the decompression stage of the first observation application/any observation application of the at least one observation application is kept as the observation decompression stage exceeds/is greater than the first time threshold, the decompression stage of the first observation application is modified to a deferred decompression stage, for the compressed data segment where the plurality of data files of the first observation application are located, the compressed data area with the low compression rate, which has been decompressed, is compressed with the low compression rate, and the compressed data area with the high compression rate is decompressed, and the first observation application is marked as the deferred application.
Wherein the first time threshold is 20 minutes, 30 minutes or 40 minutes. Wherein compressing the decompressed compressed data area of low compression rate at low compression rate for the compressed data segment where the plurality of data files of the first observation application are located, and decompressing the compressed data area of high compression rate includes:
and compressing all the data files in the compressed data area with the low compression rate which are already decompressed according to the low compression rate and decompressing all the data files in the compressed data area with the high compression rate aiming at the compressed data section where the plurality of data files of the first observation application are positioned.
For the compressed data segment where the plurality of data files of the first observation application are located, compressing the compressed data area with the low compression rate, which has been decompressed, at the low compression rate, and decompressing the compressed data area with the high compression rate:
for the compressed data segment where the plurality of data files of the first observation application are located, compressing all the decompressed data files in the compressed data area of low compression rate that have been decompressed at low compression rate, and decompressing all the compressed data files in the compressed data area of high compression rate.
In step 107, when the time for maintaining the decompression level of the second priority application of the at least one priority application as the priority decompression level exceeds a second time threshold, decompressing the compressed data area of the medium compression rate within the compressed data segment in which the plurality of data files of the second priority application are located and marking the second priority application as a fully decompressed application.
Wherein the second time threshold is 20 minutes, 30 minutes or 40 minutes.
Wherein decompressing the compressed data area of the medium compression rate in the compressed data segment in which the plurality of data files of the second priority application are located comprises:
and decompressing all compressed data files in a compressed data area with a medium compression rate in a compressed data segment in which the plurality of data files of the second preferential application are positioned.
Fig. 3 is a schematic diagram of a system 300 for dynamically processing data files according to an embodiment of the present invention. As shown in fig. 3, the system 300 includes: an acquisition unit 301, a decompression level determination unit 302, a scanning unit 303, a decompression unit 304, a processing unit 305, a calculation unit 306, a distribution unit 307, and a compression unit 308.
An obtaining unit 301, configured to obtain, in response to a first operation initiated by a user for a mobile terminal, a pre-decompression configuration file, where the pre-decompression configuration file is used to indicate a foreground operation probability of each application in multiple applications in the mobile terminal. Wherein the foreground operation probability comprises a high operation probability, a medium operation probability and a low operation probability.
Wherein the first operation comprises: the screen unlocking operation, the power-on starting operation, the application interface browsing operation, the screen lightening operation, the phone answering operation and the like can indicate that a user wants to use the mobile terminal to run the operation of a specific application. The user initiates a first operation by initiating a touch action, a gesture action, a key action, etc. directed to the mobile terminal. The touch action, the gesture action, the key action and the like can be converted into a control instruction for the mobile terminal, and the control instruction is used for initiating the first operation.
A plurality of applications can be installed in the mobile terminal. Typically, the plurality of applications are considered user applications or system applications. In the present application, each application includes a plurality of data files, and each data file is an uncompressed data file.
Wherein the pre-decompression configuration file comprises a plurality of data items, and each data item comprises an application name and a foreground running probability. The data item is a binary group < application name, foreground operation probability >. For example, the data items are < pay, 40% >, < WeChat, 60% >. In general, the foreground operation probability may be determined according to a ratio of the number of foreground valid operations of the specific application to the total number of operations of the application within a predetermined period of time (e.g., 1 day, 2 days, etc.), a ratio of foreground accumulated operation time of the specific application to the total valid time within the predetermined period of time, and the like. And determining the application to be effectively run when the time of foreground running of the application is more than 5 seconds, 6 seconds, 8 seconds, 10 seconds and the like, and taking the number of times of effective running as the number of times of foreground effective running. Where the total effective time is the time the deductive application will obviously not run. For example, the ratio of the number of foreground valid runs 8 of the payroll to the total number of runs 20 of the application within 1 day is 40%. The ratio of the foreground cumulative runtime of 19.2 hours to the total active time of 32 hours (48 hours minus 16 hours of sleep time) over 2 days is believed to be 60%. Where the predetermined time period may be a time period from a current time to a particular time in the past, or any reasonable time period may be set by the system or the user, such as a predetermined time interval.
And updating the pre-decompression configuration file according to a first preset time interval so that the pre-decompression configuration file can indicate the foreground operation probability of each application in a plurality of applications in the mobile terminal in real time. The first predetermined time interval is 20 minutes, 30 minutes, 40 minutes, 60 minutes, or the like. When the update of the pre-decompression configuration file is performed, since the predetermined time period has changed (for example, moved for 20 minutes, 30 minutes, 40 minutes, or 60 minutes, etc.), for this purpose, the updated foreground operation probability of each application is calculated according to the new predetermined time period and the original foreground operation probability is replaced with the updated foreground operation probability. According to the method, the pre-decompression configuration file can indicate the foreground running probability of each application in the plurality of applications in the mobile terminal in real time.
The foreground running probability Pi of each application is calculated by the following formula:
Figure BDA0003190900750000201
where ni is the number of times the application i has been run (or the number of valid runs) within a second predetermined time interval (e.g., 1 day, 2 days, 3 days, etc.), i ═ 1,2, 3.. and m, where m is a natural number greater than 5, where Ti is the current time score of the application i, Li is the current location score of the application i, Si is the current state score of the application i, α is a time factor, β is a location factor, and δ is a state factor. Wherein a current time score Ti is determined for the application i according to the current time (standard time or system time) of the mobile terminal; a current location score Li is determined for the application i based on the current location of the mobile terminal (e.g. a physical location determined by a positioning system) and a current state score Si is determined for the application i based on the current state of the mobile terminal (e.g. a current state obtained by a motion trajectory, a mobile terminal acceleration sensor, a gravity sensor, etc.).
Wherein the values of α, β, and δ are set in advance by an operating system of the mobile terminal or are set according to user input. The values of α, β, and δ are used to adjust the weight ratio between the current time score, the current location score, and the current status score, and thus may be set according to system preferences, user preferences. For example, α ═ 0.4, β ═ 0.35, and δ ═ 0.25, the sum of which can be 1 or other values.
Wherein Ti is determined according to the operation times, operation time ratio or operation probability of the application i at the current time in the second preset time interval. And determining the current position score Li according to the running times, the running time ratio or the running probability of the application i at the current position in a second preset time interval. And determining the current position score Si according to the operation times, operation time ratio or operation probability of the i in the current state in a second preset time interval. The method and the device determine the current time, the current position and the current state of the mobile terminal when the foreground operation probability Pi is determined, and can acquire the operation statistical file associated with each application in a plurality of applications. The operation statistical file records an operation log of each application, wherein the operation log comprises a plurality of records, and each record is < application name, operation date, start time, end time, operation position and operation state >. For example, < Payment Bao, 1 month 1 year 2018, 12:00, 13:15, office, static >, < Payment Bao, 1 month 1 year 2018, 18:00, 18:50, on subway >, < Payment Bao, 1 month 2 day 2018, 11:50, 12:40, office, static >. Wherein the number of runs is the number of runs at the current time, current location, or current state determined from the run statistics file. The operation number ratio is a ratio of the operation number at the current time, current location, or current state determined from the operation statistic file to the total operation number (the number of all applications operated at the current time, current location, or current state). The running probability is the probability that the application may run at the current time, current location, or current state. The operation probability may be preset by the system or the user, or determined according to a record in the operation statistical file, for example, according to the operation time ratio.
The foreground running probability Pi of each application is calculated by the following formula:
Figure BDA0003190900750000211
where E is a preset statistical time period (e.g., a time period from the current time to a specific past time, such as 1 day, 2 days, 3 days, etc.), ti is a total time for application i to perform foreground operation in E (e.g., 3 times of operation in 3 days, respectively 1 hour, 2 hours, 1.5 hours, then the total time is 4.5 hours), i is 1,2,3,. The heat score is, for example, 100, 1000, 10000, 100000, etc. Where E may be the valid time in a predetermined statistical time period. For example, if the predetermined statistical period is 3 days, then E is 48 hours (72 hours minus 24 hours of sleep time). The method comprises the steps of obtaining an application heat ranking list of the current time from an application server based on the current time of the mobile terminal, and inquiring the application heat list to determine Ui of an application i at the current time. The application server sorts all applications according to access times, comment times, search times, download times and the like, and determines an application heat sorting table according to the descending order of the access times, the comment times, the search times, the download times and the like. Wherein the top ranked application heat is higher in the application heat ranking table.
The foreground running probability Pi of each application is calculated by the following formula:
Figure BDA0003190900750000212
where E is a preset statistical time period (e.g., a time period from a current time to a past specific time, such as 1 day, 2 days, 3 days, etc.), Ti is a total time for the application i to perform foreground operation in E (e.g., 3 times of operation in 3 days, respectively 1 hour, 2 hours, 1.5 hours, the total time is 4.5 hours), i is 1,2,3,. once, m, m is the number of applications and is a natural number greater than 5, where Ti is a current time score of the application i, Li is a current position score of the application i, Si is a current state score of the application i, α is a time factor, β is a position factor, and δ is a state factor.
Wherein a current time score Ti is determined for the application i according to the current time (standard time or system time) of the mobile terminal; a current location score Li is determined for the application i based on the current location of the mobile terminal (e.g. a physical location determined by a positioning system) and a current state score Si is determined for the application i based on the current state of the mobile terminal (e.g. a current state obtained by a motion trajectory, a mobile terminal acceleration sensor, a gravity sensor, etc.).
Wherein the values of α, β, and δ are set in advance by an operating system of the mobile terminal or are set according to user input. The values of α, β, and δ are used to adjust the weight ratio between the current time score, the current location score, and the current status score, and thus may be set according to system preferences, user preferences. For example, α ═ 0.4, β ═ 0.35, and δ ═ 0.25, the sum of which can be 1 or other values.
Wherein Ti is determined according to the operation times, operation time ratio or operation probability of the application i at the current time in the second preset time interval. And determining the current position score Li according to the running times, the running time ratio or the running probability of the application i at the current position in a second preset time interval. And determining the current position score Si according to the operation times, operation time ratio or operation probability of the i in the current state in a second preset time interval. The method and the device determine the current time, the current position and the current state of the mobile terminal when the foreground operation probability Pi is determined, and can acquire the operation statistical file associated with each application in a plurality of applications. The operation statistical file records an operation log of each application, wherein the operation log comprises a plurality of records, and each record is < application name, operation date, start time, end time, operation position and operation state >. For example, < Payment Bao, 1 month 1 year 2018, 12:00, 13:15, office, static >, < Payment Bao, 1 month 1 year 2018, 18:00, 18:50, on subway >, < Payment Bao, 1 month 2 day 2018, 11:50, 12:40, office, static >. Wherein the number of runs is the number of runs at the current time, current location, or current state determined from the run statistics file. The operation number ratio is a ratio of the operation number at the current time, current location, or current state determined from the operation statistic file to the total operation number (the number of all applications operated at the current time, current location, or current state). The running probability is the probability that the application may run at the current time, current location, or current state. The operation probability may be preset by the system or the user, or determined according to a record in the operation statistical file, for example, according to the operation time ratio.
The foreground running probability Pi of each application is calculated by the following formula:
Figure BDA0003190900750000221
where ni is the number of times that application i runs (or the number of valid runs) within a second predetermined time interval (e.g., 1 day, 2 days, 3 days, etc.), i ═ 1,2, 3. The heat score is, for example, 100, 1000, 10000, 100000, etc.
The method comprises the steps of obtaining an application heat ranking list of the current time from an application server based on the current time of the mobile terminal, and inquiring the application heat list to determine Ui of an application i at the current time. The application server sorts all applications according to access times, comment times, search times, download times and the like, and determines an application heat sorting table according to the descending order of the access times, the comment times, the search times, the download times and the like. Wherein the top ranked application heat is higher in the application heat ranking table.
The decompression level determination unit 302, in response to a second operation initiated by the user for the mobile terminal, determines a decompression level for performing data pre-decompression for each application based on the second operation (for example, when a shopping browsing application is performed, a dynamic coefficient of a payment application is increased) and a foreground running probability of each application, wherein the decompression level includes a priority decompression level, an observation decompression level and a delayed decompression level, and the applications are respectively marked as a priority application, an observation application and a delayed application according to the determined decompression level for the applications.
The second operation is an application start operation, and the user initiates the second operation by initiating a touch action, a gesture action, a key action, etc., with respect to the application of the mobile terminal. The user initiates a second operation by initiating a touch action, a gesture action, a key action, etc. directed to the mobile terminal, which can be converted into a control instruction directed to the mobile terminal, the control instruction being used to initiate the second operation.
Determining, for each application, a decompression stage for performing data pre-decompression based on the second operation and the foreground running probability of each application comprises:
and determining the identification of the first running application started by the second operation, and searching a content database based on the identification of the first running application to determine the description information of the first running application. For example, the first running application is a Taobao application, a Jingdong application, or the like. And acquiring the description information of each application except the first running application in a plurality of applications in the mobile terminal. Wherein the first running application is one of a plurality of applications.
Calculating a matching value of the description information of the first running application and the description information of each application except the first running application and determining the association degree of each application except the first running application with the first running application based on the matching value. The matching value between the description information is determined through text comparison, semantic comparison, keyword comparison and the like.
Calculating a modified foreground run probability for each application based on the association of each application other than the first running application with the first running application and the foreground run probability for each application.
Determining a decompression level for each application based on the modified foreground run probability for each application other than the first running application.
Wherein calculating a modified foreground run probability for each application based on the association of each application other than the first running application with the first running application and the foreground run probability for each application comprises: and converting the association degree of each application except the first running application and the first running application into the foreground running probability additional value of each application except the first running application. The way of converting the degree of association into the foreground operation probability additional value is to multiply the degree of association by a conversion coefficient to convert into the foreground operation probability additional value. The degrees of association are, for example, 50%, 80%, and 90%. And the conversion factor is 0.2, then the foreground operating probability added values are 10%, 16% and 18%.
And taking the arithmetic sum of the added value of the foreground running probability of each application except the first running application and the foreground running probability of each application as the modified foreground running probability of each application. Foreground operating probabilities are, for example, 45%, 55% and 70%, and foreground operating probability added values are 10%, then the modified foreground operating probabilities are 55%, 65% and 80%.
Wherein determining a decompression level for each application based on the modified foreground run probability for each application other than the first running application comprises:
ranking the modified foreground run probabilities for each application other than the first running application to generate a probability list. The probability list includes a plurality of data items, each data item being < application name, modified foreground run probability >. For example, < WeChat, 80% >, < Taobao, 65% >, and < Payment, 55% >. Typically, the data items are ordered in descending foreground run probability.
And dividing the applications into three groups according to the descending order in the probability list, wherein the foreground running probability of each application in the first group is greater than the foreground running probability of any application in the second group and the third group, and the foreground running probability of each application in the second group is greater than the foreground running probability of any application in the third group. Wherein the number of applications in each of the three groups may be the same, partially the same or different.
The decompression level of each application in the first group is determined as a priority decompression level. The decompression level of each application in the second set is determined as an observed decompression level. The decompression stage of each application in the third group is determined as a delayed decompression stage.
Wherein the priority decompression stage, the observation decompression stage and the delayed decompression stage are sequentially lower in level. Wherein labeling the application as a priority application, an observation application, and a delay application, respectively, according to the determined decompression level for the application comprises: the application whose decompression level is the priority decompression level is marked as the priority application. An application with a decompression stage as the observed decompression stage is labeled as the observed application. An application in which the decompression stage is a delayed decompression stage is labeled as a delayed application.
A scanning unit 303 configured to scan a compressed data segment in which the plurality of data files of each of the at least one priority application determined as the priority decompression level are located, and determine a compression rate of each of the plurality of compressed data areas in the compressed data segment in which the plurality of data files of each priority application are located; scanning a compressed data segment in which the plurality of data files of each observation application in the at least one observation application determined as the observation decompression stage are located, and determining a compression rate of each compressed data area in a plurality of compressed data areas in the compressed data segment in which the plurality of data files of each observation application are located; the method comprises the steps of scanning a compressed data section in which a plurality of data files of each delayed application in at least one delayed application determined as a delayed decompression stage are positioned, and determining a compression rate of each compressed data area in a plurality of compressed data areas in the compressed data section in which the plurality of data files of each delayed application are positioned, wherein the compression rate comprises a high compression rate, a medium compression rate and a low compression rate, and the compression degrees of the high compression rate, the medium compression rate and the low compression rate are sequentially increased.
Wherein after the operating system of the mobile terminal is started up (here, when the system service, the system application, the resource management, the network initialization, etc. of the operating system are started up and the user application is not loaded), and before the plurality of applications to be loaded of the mobile terminal are determined according to the preset loading configuration file, a plurality of compressed data segments for storing the data file are created in the storage device of the mobile terminal, as shown in fig. 2.
The storage space (or capacity) of each compressed data area may be the same or different, or partially the same. Further, the compression rate of each compressed data area within the same or different compressed data sections may be the same or different, and the compression rate of each compressed data area may be a high compression rate, a medium compression rate, or a low compression rate. For example, the high compression ratio is 90%, the medium compression ratio is 80%, and the low compression ratio is 70%. Alternatively, the high compression ratio is a compression ratio of 89% to 99%, the medium compression ratio is a compression ratio of 79% to 89% (excluding 89%), and the low compression ratio is a compression ratio of less than 79%. Alternatively, the high compression ratio is a compression ratio of 85% -100% (excluding 100%), the medium compression ratio is a compression ratio of 70% -85% (excluding 85%), and the low compression ratio is a compression ratio of less than 70%. The above values are exemplary only, and one skilled in the art will appreciate that the compression ratio or range of values can be any reasonable value.
In the present application, multiple data files (e.g., all data files) of each (priority, observation, delay, running) application are within a single compressed data segment, and each compressed data segment is used to store multiple data files (e.g., all data files) of one application. Before decompression, the application scans each compressed data segment, for example, a compressed data segment where a priority application is located, a compressed data segment where an observation application is located, or a compressed data segment where a delay application is located, to determine a compression rate of each of a plurality of compressed data regions within each compressed data segment.
A decompression unit 304, which decompresses the compressed data area with high compression rate and then decompresses the compressed data area with low compression rate for the compressed data segment where the plurality of data files that are preferentially applied are located; decompressing the compressed data area with low compression rate aiming at the compressed data section where the plurality of data files of each observation application are positioned; and decompressing the compressed data area with high compression rate aiming at the compressed data section where the plurality of data files of each delayed application are positioned.
Wherein decompressing the compressed data area of the high compression ratio comprises: and decompressing all data files in each high-compression-rate compressed storage area in the compressed data section where all data files of the priority application, the observation application or the delayed application are located.
Wherein decompressing the compressed data area of the medium compression ratio comprises: and decompressing all data files in the compressed storage area with the compression rate in each compressed data section where all the data files of the prior application, the observation application or the delayed application are positioned. And wherein decompressing the compressed data area of the low compression ratio comprises: and decompressing all data files in each low-compression-rate compressed storage area in the compressed data section where all data files of the priority application, the observation application or the delayed application are located.
The decompressing the compressed data area with high compression ratio, and then decompressing the compressed data area with low compression ratio comprises:
all compressed data files in the compressed data areas with high compression rate are decompressed first, and after all compressed data files in each compressed data area with high compression rate are decompressed, all compressed data files in the compressed data areas with low compression rate are decompressed.
Wherein the data file stored in the high compression rate compressed storage area is compressed at a high compression rate.
And compressing the data file stored in the compressed storage area with the medium compression rate according to the medium compression rate.
The data file stored in the compressed storage area of low compression ratio is compressed at low compression ratio. In general, when a plurality of/all data files of a specific application are stored in a compressed data section allocated for the specific application, the data files are compressed according to the compression rate of a compressed data area in which each data file is located. When a new data file of the specific application exists, the new data file and all other data files of the specific application are stored in the same compressed data segment. The newly added data file is compressed according to the compression rate of the compressed data area in which the newly added data file is stored.
The processing unit 305, in response to a third operation (running a specific application) initiated by the user for the mobile terminal, determines a decompression level of a first priority application of the at least one priority application as an observed decompression level and marks the first priority application as an observed application when it is determined based on the third operation that the decompression level of the first priority application no longer conforms to the priority decompression level. And compressing the compressed data areas with high compression rate which are already decompressed according to the high compression rate aiming at the compressed data sections where the plurality of data files of the first priority application are positioned.
The third operation is an application start operation, and the user initiates the third operation by initiating a touch action, a gesture action, a key action, and the like, which are capable of being converted into a control instruction for the mobile terminal, for initiating the third operation, for the application of the mobile terminal.
The application targeted by the third operation is different from the application targeted by the second operation; that is, the first running application and the second running application are different applications. For example, the first running application is a pay for you application and the second running application is a WeChat application.
And determining the identification of the second running application started by the third operation, and searching a content database based on the identification of the second running application to determine the description information of the second running application. For example, the first running application is a Taobao application, a Jingdong application, or the like.
The description information of each priority application in at least one priority application in the mobile terminal is obtained. Wherein neither the second running application nor the first running application is a priority application.
And calculating a matching value of the description information of the second running application and the description information of each priority application and determining the association degree of each priority application with the second running application based on the matching value. The matching value between the description information is determined through text comparison, semantic comparison, keyword comparison and the like.
And calculating the updated foreground running probability of each application based on the association degree of each priority application and the second running application and the current foreground running probability of each priority application.
Determining an updated decompression level for each priority application based on the updated foreground run probability for each priority application.
Wherein calculating the updated foreground run probability for each application based on the association of each priority application with the second running application and the current foreground run probability for each priority application comprises:
and converting the association degree of each priority application and the second running application into a foreground running probability additional value of each priority application. The mode of converting the association degree into the foreground operation probability additional value is to subtract a reference value from the association degree to determine an intermediate value, and multiply the intermediate value by a conversion coefficient to convert into the foreground operation probability additional value. The degrees of association are, for example, 30%, 40%, 50%, 80%, and 90%. And the predetermined value is 0.5 and the conversion factor is 0.4, then the intermediate values are-20%, -10%, 0%, 30%, and 40%. The foreground operation probability has additional value of-8%, -4%, 0%, 12% and 16%
And taking the arithmetic sum of the foreground running probability additional value of each priority application and the current foreground running probability of each priority application as the updated foreground running probability of each priority application. Foreground operation probabilities are, for example, 45%, 55%, and 70%, and foreground operation probability added values are 12%, then the modified foreground operation probabilities are 57%, 67%, and 82%. Foreground operating probabilities are, for example, 45%, 55% and 70%, and foreground operating probability additional values are-8%, then the modified foreground operating probabilities are 37%, 47% and 74%. Wherein the foreground operation probability added value is a positive integer, a negative integer or zero.
Wherein determining the decompression level for the update of each priority application based on the foreground run probability for the update of each priority application comprises:
determining the updated decompression level of the priority application as an observed decompression level when the foreground running probability of the update of the priority application is less than the priority decompression threshold and is greater than or equal to the observed decompression threshold;
when the foreground running probability of the update of the priority application is less than the observation decompression threshold, determining the updated decompression level of the priority application as a delayed decompression level.
And when the updated foreground running probability of the priority application is greater than or equal to the priority decompression threshold, determining the updated decompression level of the priority application as the priority decompression level.
As described above, the priority decompression threshold and the observed decompression threshold may be determined when applications are to be grouped according to a probability list. For example, the smallest foreground run probability involved by all applications in the first group is determined as the preferential decompression threshold, and the smallest foreground run probability involved by all applications in the second group is determined as the observation decompression threshold. That is, the smallest foreground operation probability in the priority application is determined as the priority decompression threshold, and the smallest foreground operation probability in the observation application is determined as the observation decompression threshold. Further, it is also possible to set a priority decompression threshold and an observed decompression threshold in advance by the system or the user, and to determine a decompression level of any application or an updated decompression level according to the priority decompression threshold and the observed decompression threshold. Wherein the decompression level of the particular priority application is modified to the observed decompression level when the updated decompression level of the particular priority application is the observed decompression level. Wherein when the updated decompression level of the particular priority application is the delayed decompression level, the decompression level of the particular priority application is modified to the observed decompression level instead of the delayed decompression level.
A calculating unit 306, when the time for maintaining the decompression stage of the first observation application/any observation application in the at least one observation application as the observation decompression stage exceeds/is greater than the first time threshold, modifying the decompression stage of the first observation application into a delayed decompression stage, for the compressed data segment where the plurality of data files of the first observation application are located, the compressing unit 308 compresses the compressed data region of the low compression rate that has been already decompressed at the low compression rate, and the decompressing unit 304 decompresses the compressed data region of the high compression rate, and marks the first observation application as the delayed application.
Wherein the first time threshold is 20 minutes, 30 minutes or 40 minutes. Wherein compressing the decompressed compressed data area of low compression rate at low compression rate for the compressed data segment where the plurality of data files of the first observation application are located, and decompressing the compressed data area of high compression rate includes:
for the compressed data segment in which the plurality of data files of the first observation application are located, the compression unit 308 compresses all the data files in the compressed data area of low compression rate that have been decompressed at low compression rate, and the decompression unit 304 decompresses all the data files in the compressed data area of high compression rate.
For the compressed data segments where the plurality of data files of the first observation application are located, the compression unit 308 compresses the compressed data regions of low compression rate that have already been decompressed at low compression rate, and the decompression unit 304 decompresses the compressed data regions of high compression rate:
for the compressed data segment in which the plurality of data files of the first observation application are located, the compression unit 308 compresses all the decompressed data files in the compressed data area of low compression rate that have been decompressed at low compression rate, and the decompression unit 304 decompresses all the compressed data files in the compressed data area of high compression rate.
The allocation unit 307, when the time that the decompression level of the second priority application of the at least one priority application is kept as the priority decompression level exceeds the second time threshold, the decompression unit 304 decompresses the compressed data area of the medium compression rate within the compressed data segment in which the plurality of data files of the second priority application are located and marks the second priority application as the full decompression application.
Wherein the second time threshold is 20 minutes, 30 minutes or 40 minutes.
The decompressing unit 304 decompresses the compressed data area of the medium compression rate in the compressed data segment in which the plurality of data files of the second priority application are located, and includes:
and decompressing all compressed data files in a compressed data area with a medium compression rate in a compressed data segment in which the plurality of data files of the second preferential application are positioned.

Claims (10)

1. A method for dynamically processing a data file, the method comprising:
responding to a first operation aiming at the mobile terminal initiated by a user, and acquiring a pre-decompression configuration file, wherein the pre-decompression configuration file is used for indicating the foreground operation probability of each application in a plurality of applications in the mobile terminal, and the foreground operation probability comprises a high operation probability, a medium operation probability and a low operation probability;
responding to a second operation initiated by a user and aiming at the mobile terminal, determining a decompression level for performing data pre-decompression for each application based on the second operation and the foreground operation probability of each application, wherein the decompression level comprises a priority decompression level, an observation decompression level and a delay decompression level, and labeling the applications as a priority application, an observation application and a delay application respectively according to the decompression level determined for the applications;
scanning a compressed data segment in which a plurality of data files of each priority application in at least one priority application determined as a priority decompression level are positioned, and determining the compression rate of each compressed data area in a plurality of compressed data areas in the compressed data segment in which the plurality of data files of each priority application are positioned; scanning a compressed data segment in which the plurality of data files of each observation application in the at least one observation application determined as the observation decompression stage are located, and determining a compression rate of each compressed data area in a plurality of compressed data areas in the compressed data segment in which the plurality of data files of each observation application are located; scanning a compressed data segment in which a plurality of data files of each of at least one delayed application determined as a delayed decompression stage are located, determining a compression ratio of each of a plurality of compressed data areas in the compressed data segment in which the plurality of data files of each of the delayed applications are located, wherein the compression ratio includes a high compression ratio, a medium compression ratio and a low compression ratio, and wherein the compression degrees of the high compression ratio, the medium compression ratio and the low compression ratio are sequentially increased;
for the compressed data segment where the plurality of data files which are preferentially applied are located, firstly decompressing the compressed data area with high compression rate, and then decompressing the compressed data area with low compression rate; decompressing the compressed data area with low compression rate aiming at the compressed data section where the plurality of data files of each observation application are positioned; decompressing the compressed data area with high compression rate aiming at the compressed data section where the plurality of data files of each delayed application are positioned;
in response to a third operation initiated by a user for the mobile terminal, when it is determined based on the third operation that a decompression level of a first priority application of the at least one priority application no longer conforms to a priority decompression level, determining the decompression level of the first priority application as an observed decompression level and marking the first priority application as an observed application; compressing the decompressed compressed data area with high compression rate according to the high compression rate aiming at the compressed data section where the plurality of data files of the first priority application are located; and
modifying a decompression stage of a first observation application of the at least one observation application to a deferred decompression stage when a time for which the decompression stage of the first observation application remains as the observed decompression stage exceeds a first time threshold, compressing compressed data regions of a low compression rate that have been decompressed at a low compression rate and decompressing the compressed data regions of a high compression rate for a compressed data segment in which the plurality of data files of the first observation application reside, and marking the first observation application as the deferred application;
wherein when a time for which a decompression level of a second priority application of the at least one priority application remains as a priority decompression level exceeds a second time threshold, decompressing a compressed data region of a medium compression rate within a compressed data segment in which the plurality of data files of the second priority application reside and marking the second priority application as a fully decompressed application;
further comprising calculating a foreground running probability Pi for each application by the following formula:
Figure FDA0003190900740000021
wherein ni is the number of times that the application i runs in the second predetermined time interval, i is 1,2, 3.. and m, wherein m is a natural number greater than 5, wherein Ti is the current time score of the application i, Li is the current position score of the application i, Si is the current state score of the application i, α is a time factor, β is a position factor, and δ is a state factor;
determining a current time score Ti for the application i according to the current time of the mobile terminal; determining a current position score Li for the application i according to the current position of the mobile terminal and determining a current state score Si for the application i according to the current state of the mobile terminal;
wherein the values of α, β, and δ are set in advance by an operating system of the mobile terminal or are set according to a user input;
determining Ti according to the operation times, operation time ratio or operation probability of the application i at the current time in a second preset time interval;
determining the score Li of the current position by applying the operation times, operation time ratio or operation probability of the i at the current position in a second preset time interval;
and determining the current position score Si according to the operation times, operation time ratio or operation probability of the i in the current state in a second preset time interval.
2. The method of claim 1 or 2, wherein the first operation comprises: the method comprises the steps of performing screen unlocking operation, power-on starting operation and application interface browsing operation, and enabling a user to initiate first operation by initiating a touch action aiming at the mobile terminal, wherein the touch action can be converted into a control instruction aiming at the mobile terminal, and the control instruction is used for initiating the first operation.
3. The method of claim 1, wherein the pre-decompression configuration file comprises a plurality of data items, each data item comprising an application name and a foreground run probability;
updating the pre-decompression configuration file according to a first preset time interval so that the pre-decompression configuration file can indicate the foreground operation probability of each application in a plurality of applications in the mobile terminal in real time;
wherein the first predetermined time interval is 20 minutes, 30 minutes, 40 minutes or 60 minutes.
4. The method according to claim 1, the second operation being an application start operation and the user initiating the second operation by initiating a touch action on the application of the mobile terminal and the user initiating the second operation by initiating a touch action on the mobile terminal, the touch action being convertible into control instructions for the mobile terminal, the control instructions being for initiating the second operation.
5. The method of claim 1, wherein the third operation is an application start operation, and the user initiates the third operation by initiating a touch action for an application of the mobile terminal, the touch action being convertible into a control instruction for the mobile terminal, the control instruction being for initiating the third operation;
the application targeted by the third operation is different from the application targeted by the second operation; that is, the first running application and the second running application are different;
determining an identifier of a second running application started through the third operation, and retrieving a content database based on the identifier of the second running application to determine description information of the second running application;
acquiring description information of each priority application in at least one priority application in the mobile terminal;
calculating a matching value of the description information of the second running application and the description information of each priority application and determining the association degree of each priority application with the second running application based on the matching value;
calculating an updated foreground running probability of each application based on the association degree of each priority application with the second running application and the current foreground running probability of each priority application;
determining an updated decompression level for each priority application based on the updated foreground run probability for each priority application.
6. A system for dynamically processing a data file, the system comprising:
the mobile terminal comprises an acquisition unit, a pre-decompression configuration file and a pre-decompression configuration file, wherein the acquisition unit is used for responding to a first operation aiming at the mobile terminal initiated by a user and acquiring the pre-decompression configuration file which is used for indicating the foreground operation probability of each application in a plurality of applications in the mobile terminal, and the foreground operation probability comprises a high operation probability, a medium operation probability and a low operation probability;
the decompression level determining unit is used for responding to a second operation initiated by a user and aiming at the mobile terminal, determining a decompression level for performing data pre-decompression for each application based on the second operation and the foreground operation probability of each application, wherein the decompression level comprises a priority decompression level, an observation decompression level and a delay decompression level, and marking the applications as a priority application, an observation application and a delay application respectively according to the decompression level determined for the applications;
a scanning unit which scans a compressed data segment in which a plurality of data files of each priority application in at least one priority application determined as a priority decompression level are located, and determines a compression rate of each compressed data area in a plurality of compressed data areas in the compressed data segment in which the plurality of data files of each priority application are located; scanning a compressed data segment in which the plurality of data files of each observation application in the at least one observation application determined as the observation decompression stage are located, and determining a compression rate of each compressed data area in a plurality of compressed data areas in the compressed data segment in which the plurality of data files of each observation application are located; scanning a compressed data segment in which a plurality of data files of each of at least one delayed application determined as a delayed decompression stage are located, determining a compression ratio of each of a plurality of compressed data areas in the compressed data segment in which the plurality of data files of each of the delayed applications are located, wherein the compression ratio includes a high compression ratio, a medium compression ratio and a low compression ratio, and wherein the compression degrees of the high compression ratio, the medium compression ratio and the low compression ratio are sequentially increased;
the decompression unit is used for decompressing a compressed data area with high compression rate and then decompressing a compressed data area with low compression rate aiming at the compressed data section where the plurality of data files which are preferentially applied are located; decompressing the compressed data area with low compression rate aiming at the compressed data section where the plurality of data files of each observation application are positioned; decompressing the compressed data area with high compression rate aiming at the compressed data section where the plurality of data files of each delayed application are positioned;
a processing unit, in response to a third operation initiated by a user for the mobile terminal, when it is determined based on the third operation that a decompression level of a first priority application of the at least one priority application no longer conforms to a priority decompression level, determining the decompression level of the first priority application as an observed decompression level and marking the first priority application as an observed application; compressing the decompressed compressed data area with high compression rate according to the high compression rate aiming at the compressed data section where the plurality of data files of the first priority application are located; and modifying the decompression stage of a first observation application of the at least one observation application to a deferred decompression stage when the time for which the decompression stage of the first observation application remains as the observed decompression stage exceeds a first time threshold, compressing, for a compressed data segment in which the plurality of data files of the first observation application reside, a compressed data region of a low compression rate that has been decompressed at a low compression rate and decompressing the compressed data region of a high compression rate, and marking the first observation application as the deferred application;
wherein when a time for which a decompression level of a second priority application of the at least one priority application remains as a priority decompression level exceeds a second time threshold, decompressing a compressed data region of a medium compression rate within a compressed data segment in which the plurality of data files of the second priority application reside and marking the second priority application as a fully decompressed application;
the system further comprises a calculating unit, and the foreground running probability Pi of each application is calculated by the following formula:
Figure FDA0003190900740000041
wherein ni is the number of times that the application i runs in the second predetermined time interval, i is 1,2, 3.. and m, wherein m is a natural number greater than 5, wherein Ti is the current time score of the application i, Li is the current position score of the application i, Si is the current state score of the application i, α is a time factor, β is a position factor, and δ is a state factor;
determining a current time score Ti for the application i according to the current time of the mobile terminal; determining a current position score Li for the application i according to the current position of the mobile terminal and determining a current state score Si for the application i according to the current state of the mobile terminal;
wherein the values of α, β, and δ are set in advance by an operating system of the mobile terminal or are set according to a user input;
determining Ti according to the operation times, operation time ratio or operation probability of the application i at the current time in a second preset time interval;
determining the score Li of the current position by applying the operation times, operation time ratio or operation probability of the i at the current position in a second preset time interval;
and determining the current position score Si according to the operation times, operation time ratio or operation probability of the i in the current state in a second preset time interval.
7. The system of claim 6, wherein the first operation comprises: the method comprises the steps of performing screen unlocking operation, power-on starting operation and application interface browsing operation, and enabling a user to initiate first operation by initiating a touch action aiming at the mobile terminal, wherein the touch action can be converted into a control instruction aiming at the mobile terminal, and the control instruction is used for initiating the first operation.
8. The system of claim 6 or 7, wherein the pre-solution configuration file comprises a plurality of data items, each data item comprising an application name and a foreground run probability;
updating the pre-decompression configuration file according to a first preset time interval so that the pre-decompression configuration file can indicate the foreground operation probability of each application in a plurality of applications in the mobile terminal in real time;
wherein the first predetermined time interval is 20 minutes, 30 minutes, 40 minutes or 60 minutes.
9. The system according to any of claims 6-8, the second operation being an application start operation, and the user initiating the second operation by initiating a touch action of the application to the mobile terminal, and the user initiating the second operation by initiating a touch action to the mobile terminal, the touch action being convertible into control instructions to the mobile terminal, the control instructions being for initiating the second operation.
10. The system according to any of claims 6-9, wherein the third operation is an application start operation and the user initiates the third operation by initiating a touch action for the application of the mobile terminal, the touch action being convertible into a control instruction for the mobile terminal, the control instruction being for initiating the third operation;
the application targeted by the third operation is different from the application targeted by the second operation; that is, the first running application and the second running application are different; and the second run is for a non-priority application;
determining an identifier of a second running application started through the third operation, and retrieving a content database based on the identifier of the second running application to determine description information of the second running application;
acquiring description information of each priority application in at least one priority application in the mobile terminal;
calculating a matching value of the description information of the second running application and the description information of each priority application and determining the association degree of each priority application with the second running application based on the matching value;
calculating an updated foreground running probability of each application based on the association degree of each priority application with the second running application and the current foreground running probability of each priority application;
determining an updated decompression level for each priority application based on the updated foreground run probability for each priority application.
CN202110877623.7A 2018-06-16 2018-06-16 Method and system for dynamically processing data file Pending CN113626397A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110877623.7A CN113626397A (en) 2018-06-16 2018-06-16 Method and system for dynamically processing data file

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110877623.7A CN113626397A (en) 2018-06-16 2018-06-16 Method and system for dynamically processing data file
CN201810624543.9A CN108875009B (en) 2018-06-16 2018-06-16 Method and system for dynamically processing data file

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201810624543.9A Division CN108875009B (en) 2018-06-16 2018-06-16 Method and system for dynamically processing data file

Publications (1)

Publication Number Publication Date
CN113626397A true CN113626397A (en) 2021-11-09

Family

ID=64340625

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201810624543.9A Active CN108875009B (en) 2018-06-16 2018-06-16 Method and system for dynamically processing data file
CN202110877623.7A Pending CN113626397A (en) 2018-06-16 2018-06-16 Method and system for dynamically processing data file

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN201810624543.9A Active CN108875009B (en) 2018-06-16 2018-06-16 Method and system for dynamically processing data file

Country Status (1)

Country Link
CN (2) CN108875009B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2549399A1 (en) * 2011-07-19 2013-01-23 Koninklijke Philips Electronics N.V. Assessment of Wnt pathway activity using probabilistic modeling of target gene expression
US9348833B2 (en) * 2013-03-12 2016-05-24 Sap Se Consolidation for updated/deleted records in old fragments
US10911065B2 (en) * 2015-10-20 2021-02-02 Sinan Karaca Computer system and method including selectively compressing data files and directories based on an operator indication and representing the amount of available free space
CN107203555B (en) * 2016-03-17 2021-04-30 阿里巴巴集团控股有限公司 Page loading processing method and device
CN106021417A (en) * 2016-05-12 2016-10-12 京信通信系统(广州)有限公司 Log compression method and device

Also Published As

Publication number Publication date
CN108875009A (en) 2018-11-23
CN108875009B (en) 2021-10-22

Similar Documents

Publication Publication Date Title
US10230668B2 (en) Information replying method and apparatus
US20120054162A1 (en) Likelihood-based storage management
CN105988996B (en) Index file generation method and device
CN104808892A (en) Application icon ordering method, device, system and associated equipment
US10719769B2 (en) Systems and methods for generating and communicating application recommendations at uninstall time
CN110019794B (en) Text resource classification method and device, storage medium and electronic device
CN111475750A (en) Page preloading control method, device, system, equipment and storage medium
US20190034466A1 (en) Database archiving method and device for creating index information and method and device of retrieving archived database including index information
CN112052397B (en) User characteristic generation method and device, electronic equipment and storage medium
CN107357794B (en) Method and device for optimizing data storage structure of key value database
CN114529741A (en) Picture duplicate removal method and device and electronic equipment
CN109408471B (en) Compressed packet decompression method and device based on matching tree and storage medium
CN113849499A (en) Data query method and device, storage medium and electronic device
CN108875009B (en) Method and system for dynamically processing data file
JP6691611B2 (en) Information processing apparatus, information processing method, program, storage medium
CN108012558B (en) Telephone number normalization and information discoverability
CN116186198A (en) Information retrieval method, information retrieval device, computer equipment and storage medium
JP2022106948A (en) Information display method, device, electronic apparatus, storage media, and computer program
CN112860626B (en) Document ordering method and device and electronic equipment
JP2000348039A (en) Information provision system and information providing device using same system
KR102529704B1 (en) Method and apparatus for processing data of in-memory database
US20170366602A1 (en) Server apparatus, information processing method, and computer program product
CN112433779B (en) Application site preloading method, device and storage medium based on ERP system
JP2006172363A (en) Document retrieval device, index reconfiguration method and program
CN113326417B (en) Method and device for updating webpage library

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