CN109189737B - Method and system for prefetching files in mobile internet according to time segments - Google Patents

Method and system for prefetching files in mobile internet according to time segments Download PDF

Info

Publication number
CN109189737B
CN109189737B CN201810943819.XA CN201810943819A CN109189737B CN 109189737 B CN109189737 B CN 109189737B CN 201810943819 A CN201810943819 A CN 201810943819A CN 109189737 B CN109189737 B CN 109189737B
Authority
CN
China
Prior art keywords
user application
user
mobile terminal
target mobile
time
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.)
Active
Application number
CN201810943819.XA
Other languages
Chinese (zh)
Other versions
CN109189737A (en
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.)
Beijing Hesi Information Technology Co Ltd
Original Assignee
Beijing Hesi Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Hesi Information Technology Co Ltd filed Critical Beijing Hesi Information Technology Co Ltd
Priority to CN201810943819.XA priority Critical patent/CN109189737B/en
Publication of CN109189737A publication Critical patent/CN109189737A/en
Application granted granted Critical
Publication of CN109189737B publication Critical patent/CN109189737B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method and a system for prefetching files in a mobile internet according to time segments, wherein the method comprises the following steps: determining running time statistical information of each user application in a plurality of user applications in a target mobile terminal; determining the operation probability of each user application in a specific time segment according to the operation time statistical information of each user application; calculating an adjusted operation probability of each user application within the specific time segment based on the third adjustment coefficient of each user application and the operation probability within the specific time segment, and sorting the plurality of user applications in descending order of the operation probability based on the adjusted operation probability of each user application within the specific time segment to generate a sorted list; setting a storage level for each pre-fetching user application in the at least one pre-fetching user application according to the ordered list; and file prefetching a data file associated with each prefetched user application from the second memory according to the storage level of the prefetched user application.

Description

Method and system for prefetching files in mobile internet according to time segments
Technical Field
The present invention relates to the field of internet of things and the internet, and more particularly, to a method and system for prefetching a file in a mobile internet according to a time segment in the field of mobile internet.
Background
Currently, as the internet of things, especially the mobile internet, develops faster and faster, and the use of mobile terminals is more and more popular, people usually use 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. In some cases, for a user with a high regularity of usage, the user will often use a common application of a plurality of user applications when the mobile terminal is at a specific time. In the prior art, no technology for prefetching files according to the regularity exists.
Disclosure of Invention
According to an aspect of the present invention, there is provided a method for prefetching a file in a mobile internet according to a time segment, the method comprising:
acquiring an operation statistical file associated with a target mobile terminal in a mobile internet, and analyzing the operation statistical file to determine operation time statistical information of each user application in a plurality of user applications in the target mobile terminal;
dividing each time interval T in a plurality of time intervals in a natural day into a plurality of time segments according to the application switching frequency F of the user application in the target mobile terminal during operation and a dynamic adjustment factor A preset by the user, and determining the operation probability of each user application in a specific time segment according to the operation time statistical information of each user application when the current operation time of the target mobile terminal enters the specific time segment in the plurality of time segments;
setting a first adjustment coefficient S for each user application according to the state parameter of the target mobile terminal and setting a second adjustment coefficient L for each user application according to the position parameter of the target mobile terminal, acquiring the weight proportion of the state parameter and the position parameter, determining a third adjustment coefficient K of each user application according to the first adjustment coefficient S, the second adjustment coefficient L and the weight proportion of each user application, calculating the adjusted operation probability of each user application in a specific time segment based on the third adjustment coefficient K of each user application and the operation probability in the specific time segment, and performing descending order of the operation probabilities on a plurality of user applications based on the adjusted operation probability of each user application in the specific time segment to generate an ordered list;
determining at least one of the plurality of user applications that can be preloaded from the second memory into the first memory according to the ordered list, and setting a storage level for each of the at least one pre-fetching user application according to the ordered list, wherein the storage level comprises: a decrement storage stage, an increment storage stage, a quantitative storage stage and a compression storage stage;
allocating at least one dynamic memory unit for each pre-fetch user application of the decrement storage stage, allocating at least one dynamic memory unit for each pre-fetch user application of the compression storage stage, allocating one dynamic memory unit for each pre-fetch user application of the increment storage stage and allocating one dynamic memory unit for each pre-fetch user application of the quantitive storage stage;
setting a storage level for a dynamic storage unit allocated to each pre-fetching user application according to the storage level of each pre-fetching user application;
file prefetching a data file associated with each prefetched user application from the second memory according to the storage level of the prefetched user application, comprising:
copying a plurality of data files associated with each pre-fetch user application of the reduced storage tier from the second memory to the dynamic storage unit of at least one reduced storage tier allocated for each pre-fetch user application of the reduced storage tier, setting a first time period for the dynamic storage unit of each reduced storage tier upon completion of the copying and starting timing, deleting a first predetermined number of data files in the dynamic storage unit of each reduced storage tier each time the first time period expires;
selecting at least one base data file among the plurality of data files associated with each pre-fetching user application of the incremental storage tier, copying the at least one base data file of each pre-fetching user application of the incremental storage tier from the second memory to the dynamic storage unit of the incremental storage tier allocated for each pre-fetching user application of the incremental storage tier, setting a second time period and starting timing for the dynamic storage unit of the incremental storage tier upon completion of the copying, wherein a second predetermined number of data files among the plurality of data files associated with each pre-fetching user application of the incremental storage tier are copied from the second memory to the dynamic storage unit of the incremental storage tier allocated for each pre-fetching user application of the incremental storage tier each time the second time period expires;
selecting at least one data file from the plurality of data files associated with each pre-fetch user application of the quantitative storage tier based on the storage capacity of the dynamic storage unit of the quantitative storage tier assigned for each pre-fetch user application of the quantitative storage tier and copying the selected at least one data file from the second memory to the dynamic storage unit of the quantitative storage tier assigned for each pre-fetch user application of the quantitative storage tier; and
the method further includes compressing the plurality of data files associated with each pre-fetch user application of the compressed storage tier to generate a plurality of compressed data files, copying the plurality of compressed data files of each pre-fetch user application of the compressed storage tier from the second memory to a dynamic storage unit of at least one compressed storage tier allocated for each pre-fetch user application of the compressed storage tier.
The mobile internet comprises a plurality of mobile terminals, the mobile terminal which initiates a file pre-fetching request is determined as a target mobile terminal, and the number of user applications is larger than 4.
The operation statistical file comprises a plurality of data tables, one data table is allocated to each user application in a plurality of user applications in the target mobile terminal, each data table comprises a plurality of data items, and the content of each data item is a quadruple < application name, foreground operation starting time, foreground operation ending time and foreground operation accumulated time >.
Wherein the data table allocated to each user application is used as the running-time statistical information of each user application, and the data table allocated to each user application is used for recording the running-time information of each user application in real time.
In the running statistics file, a predetermined number of data items are saved for each user application, or a predetermined number of data items within a natural day or a predetermined length of time are saved for each user application. Wherein the predetermined number of natural days is 10 natural days, 20 natural days, or 30 natural days, and wherein the predetermined time length is 240 hours, 480 hours, or 720 hours.
The application switching frequency F of the user application in the target mobile terminal during running is a switching frequency of the user application in the foreground during running to the background during running of the user application in the target mobile terminal, the application switching frequency F is an average switching number of the user application in the foreground during running to the background during an effective time period in each natural day of a first date interval, wherein the switching number is counted when the user application in the foreground is switched to the background after the running time exceeds 1 minute, and the first date interval comprises at least 10 natural days, wherein the effective time period is a time period from 6 am to 11 pm. And the user presets a dynamic adjustment factor A according to the processor main frequency of the target mobile terminal and the reading speed of the second memory, wherein the dynamic adjustment factor is 5.
Dividing each time interval T in a plurality of time intervals into a plurality of time segments according to the application switching frequency F of the user application in the target mobile terminal during operation and a dynamic adjustment factor A preset by the user comprises:
Figure BDA0001769707430000021
where S is the number of time segments in each time interval T. Each time interval T is 60 minutes and the start time and the end time of each time interval T are the whole time. Wherein each time interval T is divided into 3 time segments, 6 time segments or 10 time segments. Wherein determining the probability of operation of each user application within a particular time segment based on the runtime statistics of each user application comprises: selecting a second date interval for determining a probability of operation, the second date interval comprising at least 10 natural days; analyzing each data item in the plurality of data items in the running time statistical information of each user application to determine the effective times Ci of running of each user application in a specific time segment in each natural day in a second date interval, wherein i is more than or equal to 1 and less than or equal to Na, Na is the number of user applications in the target mobile terminal, and Na is a natural number and is more than 4; calculating the total effective times S of all the user applications running in the specific time segment based on the effective times Ci of each user application running in the specific time segments of the second date interval:
Figure BDA0001769707430000031
and calculating the operation probability Pi & Ci/S of each user application in a specific time segment.
Wherein the user application counts as a valid number of times when the running time of the user application in a specific time segment exceeds 20 seconds.
Wherein determining the probability of operation of each user application within a particular time segment based on the runtime statistics of each user application comprises: selecting a second date interval for determining a probability of operation, the second date interval comprising at least 10 natural days;
analyzing each data item in the plurality of data items in the running time statistical information of each user application to determine the running time length ti of each user application in a specific time segment in each natural day in a second time interval, wherein i is more than or equal to 1 and less than or equal to Na, Na is the number of user applications in the target mobile terminal, and Na is a natural number and is more than 4;
calculating a total time length T of all user applications running in a specific time segment based on the time length ti of each user application running in a plurality of specific time segments of the second date interval:
Figure BDA0001769707430000032
and calculating the operation probability Pi of each user application in a specific time segment, namely ti/T. The state parameter is the current state of the target mobile terminal. Wherein setting a first adjustment coefficient S for each user application according to the state parameter of the target mobile terminal comprises:
in the case that the status parameter of the target mobile terminal is in the highlight status, setting the first adjustment coefficient S applied by each user to be less than 1, for example, 0.8; setting a first adjustment coefficient S applied by each user to be greater than 1, for example, 1.2, under the condition that the state parameter of the target mobile terminal is in a soft light state; and setting the first adjustment coefficient S applied by each user to be less than 1, for example, 0.9, in case the state parameter of the target mobile terminal is in a low light state.
Wherein a first adjustment coefficient S is set for each user application according to the state parameters of the target mobile terminal:
setting a first adjustment coefficient S applied by each user to be larger than 1, for example 1.2, under the condition that the state parameter of the target mobile terminal is that the display screen faces upwards; setting a first adjustment coefficient S applied by each user to be less than 1, for example, 0.3, under the condition that the state parameter of the target mobile terminal is that the display screen is downward; setting a first adjustment coefficient S applied by each user to be less than 1, for example 0.9, under the condition that the state parameter of the target mobile terminal is moving in the horizontal direction; in case the status parameter of the target mobile terminal is a vertical direction movement, the first adjustment factor S applied by each user is set to be less than 1, for example 0.7.
Wherein setting a first adjustment coefficient S for each user application according to the state parameter of the target mobile terminal comprises: setting a first adjustment coefficient S applied by each user to be less than 1, for example 0.8, under the condition that the state parameter of the target mobile terminal is in a hot state; setting a first adjustment coefficient S applied by each user to be less than 1, for example 0.9, under the condition that the state parameter of the target mobile terminal is in a high-temperature state; setting a first adjustment coefficient S applied by each user to be larger than 1, for example 1.2, under the condition that the state parameter of the target mobile terminal is in a proper state; setting a first adjustment coefficient S applied by each user to be less than 1, for example 0.9, under the condition that the state parameter of the target mobile terminal is in a low-temperature state; in the case where the state parameter of the target mobile terminal is in a cold state, setting a first adjustment coefficient S applied by each user to be less than 1, for example, 0.6;
wherein the hot state is that the air temperature T is more than or equal to 32 ℃; the high temperature state is 32 ℃ and the temperature T is more than or equal to 25 ℃, the suitable state is 25 ℃ and the temperature T is more than or equal to 18 ℃, the low temperature state is 18 ℃ and the temperature T is more than or equal to 8 ℃, or the cold state is 8 ℃ and the temperature T.
The position parameter is the current position of the target mobile terminal.
Setting a second adjustment coefficient L for each user application according to the location parameter of the target mobile terminal comprises: in the case where the location parameter of the target mobile terminal is office, setting the second adjustment coefficient L applied by each user to be less than 1, for example, 0.8; setting a second adjustment coefficient L applied by each user to be greater than 1, for example 1.2, under the condition that the location parameter of the target mobile terminal is home; in the case where the location parameter of the target mobile terminal is restaurant, setting the second adjustment coefficient L applied by each user to be less than 1, for example, 0.9; in the case where the location parameter of the target mobile terminal is a road, setting the second adjustment coefficient L applied by each user to be less than 1, for example, 0.8; and setting the second adjustment coefficient L applied by each user to be greater than 1, for example, 1.1, in the case where the location parameter of the target mobile terminal is the subway.
Wherein obtaining the weight ratio of the state parameter and the position parameter comprises: and reading a weight configuration file in the target mobile terminal, and analyzing the weight configuration file to obtain the weight proportion of the state parameter and the position parameter. The sum of the weight ratios of the state parameter and the position parameter is 1, and the weight ratios of the state parameter and the position parameter are 0.5 and 0.5 respectively; the weight ratio of the state parameter to the position parameter is 0.3 and 0.7 respectively; the weight ratio of the state parameter to the position parameter is 0.2 and 0.8 respectively; the weight ratio of the state parameter to the position parameter is 0.7 and 0.3 respectively; the weight ratio of the state parameter to the position parameter is 0.8 and 0.2 respectively; the weight ratio of the state parameter to the position parameter is 0.4 and 0.6 respectively; the weight ratio of the state parameter and the position parameter is 0.6 and 0.4 respectively.
Determining a third adjustment coefficient K applied by each user according to the first adjustment coefficient S and the second adjustment coefficient L applied by each user and the weight proportion, wherein the third adjustment coefficient K applied by each user is: the third adjustment coefficient K is the first adjustment coefficient sxw 1+ the second adjustment coefficient lxw 2, where W1 is the weight ratio of the sum of the state parameters, and W2 is the weight ratio of the position parameters.
Calculating an adjusted operation probability of each user application in a specific time segment based on the third adjustment coefficient K of each user application and the operation probability in the specific time segment comprises: and taking the product of the third adjustment coefficient K applied by each user and the operation probability in the specific time segment as the adjusted operation probability of each user application in the specific time segment. Before obtaining the operation statistical file associated with the target mobile terminal in the mobile internet, the method further comprises the following steps:
responding to a file prefetching request initiated by a user and used for prefetching a file aiming at a data file of a target mobile terminal in a mobile Internet and associated with a user application, and acquiring a dynamic configuration file associated with the file prefetching;
creating a dynamic index area in a first memory of the target mobile terminal, and creating a plurality of dynamic storage units for storing data files in the first memory according to the dynamic configuration file, wherein the storage capacity of each of the plurality of dynamic storage units is determined according to the dynamic configuration file; and
and generating a dynamic index table in the dynamic index area, wherein the dynamic index table comprises a plurality of index entries, and each index entry is used for recording the application identification, the starting address, the ending address, the storage capacity and the storage level of a corresponding dynamic storage unit in a plurality of dynamic storage units.
The first memory is a random access memory, and the second memory is a read-only memory. The dynamic profile includes a start address and an end address of a storage area in the first memory for providing a plurality of dynamic storage units, and the dynamic profile further includes a storage capacity of each of the plurality of dynamic storage units.
The application identifier is an identifier of a user application to which the dynamic storage unit belongs, the starting address is a starting address of a storage space of the dynamic storage unit, the ending address is an ending address of the storage space of the dynamic storage unit, and the storage capacity is the storage capacity and the storage level of the storage space of the dynamic storage unit.
And updating the corresponding index entry in the dynamic index table according to the storage level set for the dynamic storage unit.
Selecting at least one data file from the plurality of data files associated with each pre-fetching user application of the quantitative storage tier based on the storage capacity of the dynamic storage unit of the quantitative storage tier allocated for each pre-fetching user application of the quantitative storage tier comprises:
grouping a plurality of data files associated with each pre-fetch user application of the quantitative storage tier according to a storage capacity of a dynamic storage unit of the quantitative storage tier allocated to each pre-fetch user application of the quantitative storage tier to generate a plurality of file groups, wherein each file group includes at least one data file, and setting different priorities for the plurality of file groups of each pre-fetch user application of the quantitative storage tier to constitute priority queues, regarding a file group positioned at a head of a queue in each priority queue as a current file group and copying at least one data file in the current file group from a second memory to a dynamic storage unit of the quantitative storage tier allocated to each pre-fetch user application of the quantitative storage tier and setting a third time period for each dynamic storage unit of the quantitative storage tier, whenever the third time period expires, using a next file group in the priority queues as the current file group in order of decreasing priority, until there is no next set of files; determining a number of pre-fetch user applications associated with the quantitative storage tier based on the at least one data file selected from the plurality of data files; wherein the size of each file group is smaller than the storage space of the dynamic storage unit of the corresponding quantitative storage tier.
Selecting at least one data file from the plurality of data files associated with each pre-fetching user application of the quantitative storage tier based on the storage capacity of the dynamic storage unit of the quantitative storage tier allocated for each pre-fetching user application of the quantitative storage tier comprises:
grouping a plurality of data files associated with each pre-fetch user application of the quantitative storage tier according to a storage capacity of a dynamic storage unit of the quantitative storage tier allocated for each pre-fetch user application of the quantitative storage tier to generate a plurality of file groups, wherein each file group includes at least one data file, randomly selecting one file group from the plurality of file groups as a current file group and copying at least one data file in the current file group from the second memory to the dynamic storage unit of the quantitative storage tier allocated for each pre-fetch user application of the quantitative storage tier and setting a third time period for each dynamic storage unit of the quantitative storage tier, and randomly selecting a next file group from the plurality of file groups as the current file group until there is no next file group whenever the third time period expires;
determining a number of pre-fetch user applications associated with the quantitative storage tier based on the at least one data file selected from the plurality of data files; wherein the size of each file group is smaller than the storage space of the dynamic storage unit of the corresponding quantitative storage tier. After copying the selected at least one data file from the second memory to the dynamic storage unit of the quantitative storage tier assigned to each pre-fetching user application of the quantitative storage tier, setting a third time period and whenever the third time period expires, re-selecting at least one data file from the plurality of data files associated with each pre-fetching user application of the quantitative storage tier based on the storage capacity of the dynamic storage unit of the quantitative storage tier assigned to each pre-fetching user application of the quantitative storage tier, copying the re-selected at least one data file from the second memory to the dynamic storage unit of the quantitative storage tier assigned to each pre-fetching user application of the quantitative storage tier.
Wherein selecting at least one data file from the plurality of data files associated with each pre-fetch user application of the quantitative storage tier based on the storage capacity of the dynamic storage unit of the quantitative storage tier allocated for each pre-fetch user application of the quantitative storage tier comprises:
step 1, grouping a plurality of data files associated with each pre-fetching user application of the quantitative storage tier to generate N file groups according to the storage capacity of a dynamic storage unit of the quantitative storage tier allocated to each pre-fetching user application of the quantitative storage tier, wherein N is a natural number greater than 1 and each file group comprises at least one data file;
step 2, setting different sequence numbers for each file group in the N file groups, wherein the sequence numbers are from 1 to N;
step 3, taking the file group with the serial number i equal to 1 as the current file group, wherein N is more than or equal to i and is more than 0;
step 4, setting a third time period for each dynamic storage unit of the quantitative storage level;
step 5, copying at least one data file included in the current file group from the second memory to a dynamic storage unit of the quantitative storage level allocated to each pre-fetching user application of the quantitative storage level;
step 6, when the third time period expires, judging whether i is true or not, and if yes, ending; if not, taking the file group with the serial number i being i +1 as the current file group, and performing step 5;
wherein the size of each file group is smaller than the storage capacity of the dynamic storage unit of the fixed-amount storage tier.
Wherein determining from the ordered list a plurality of pre-fetch user applications of the plurality of user applications that can be pre-loaded from a second memory into a first memory comprises:
when the number of the user applications with the operation probability larger than the pre-fetching threshold value in the ordered list is larger than 0, determining the user applications with the operation probability larger than the pre-fetching threshold value in the ordered list as the pre-fetching user applications which can be pre-loaded into the first memory from the second memory so as to determine at least one pre-fetching user application;
when the number of user applications in the ordered list having an operating probability greater than the pre-fetch threshold is equal to 0, determining all user applications in the ordered list as pre-fetched user applications that can be pre-loaded from the second memory into the first memory to determine at least one pre-fetched user application.
Wherein setting a storage level for each of at least one pre-fetch user application according to the ordered list comprises: setting the storage level of the pre-fetching user application with the operation probability larger than the high probability threshold value in the ordered list as a decrement storage level; setting the storage level of the pre-fetching user application with the running probability less than or equal to the high probability threshold and greater than the medium probability threshold in the sorted list as an incremental storage level; setting the storage level of the pre-fetching user application with the running probability less than or equal to the middle probability threshold and greater than the low probability threshold in the sorted list as a quantitative storage level; and setting the storage level of the pre-fetching user application with the operation probability less than or equal to the low probability threshold value in the sorted list as a compression storage level.
The at least one dynamic memory unit allocated for the pre-fetch user application of each reduced storage tier is capable of holding all data files of the pre-fetch user application of the corresponding reduced storage tier, and the at least one dynamic memory unit allocated for the pre-fetch user application of each compressed storage tier is capable of holding all compressed data files of the pre-fetch user application of the corresponding compressed storage tier. Wherein the first time period is 30 seconds, the second time period is 60 seconds, and wherein the third time period is 90 seconds. Wherein the at least one base data file of each pre-fetching user application is at least one data file of the plurality of data files associated with each pre-fetching user application of the incremental storage tier that has a launch order above a priority threshold. Wherein the first predetermined number is 5 and the second predetermined number is 8.
According to another aspect of the present invention, there is provided a system for file prefetching in a mobile internet according to time segmentation, the system comprising: the analysis device is used for acquiring an operation statistical file associated with a target mobile terminal in a mobile internet, and analyzing the operation statistical file to determine the operation time statistical information of each user application in a plurality of user applications in the target mobile terminal;
the probability determining device divides each time interval T in a plurality of time intervals in a natural day into a plurality of time segments according to the application switching frequency F of the user application in the target mobile terminal during operation and a dynamic adjustment factor A preset by the user, and determines the operation probability of each user application in a specific time segment according to the operation time statistical information of each user application when the current operation time of the target mobile terminal enters the specific time segment in the plurality of time segments;
a sorting device, which sets a first adjusting coefficient S for each user application according to the state parameter of the target mobile terminal and a second adjusting coefficient L for each user application according to the position parameter of the target mobile terminal, obtains the weight proportion of the state parameter and the position parameter, determines a third adjusting coefficient K for each user application according to the first adjusting coefficient S and the second adjusting coefficient L of each user application and the weight proportion, calculates the adjusted operation probability of each user application in a specific time segment based on the third adjusting coefficient K of each user application and the operation probability in the specific time segment, and performs descending sorting of the operation probabilities of a plurality of user applications based on the adjusted operation probability of each user application in the specific time segment to generate a sorted list;
setting means for determining at least one pre-fetch user application of the plurality of user applications that can be pre-loaded from the second memory into the first memory according to the ordered list, and setting a storage level for each pre-fetch user application of the at least one pre-fetch user application according to the ordered list, wherein the storage level comprises: a decrement storage stage, an increment storage stage, a quantitative storage stage and a compression storage stage; setting a storage level for a dynamic storage unit allocated to each pre-fetching user application according to the storage level of each pre-fetching user application;
the allocation device allocates at least one dynamic storage unit for each pre-fetching user application of the decrement storage level, allocates at least one dynamic storage unit for each pre-fetching user application of the compression storage level, allocates one dynamic storage unit for each pre-fetching user application of the increment storage level and allocates one dynamic storage unit for each pre-fetching user application of the quantitative storage level;
prefetching means for file prefetching the data files associated with each prefetched user application from the second memory according to the storage level of the prefetched user application, comprising:
copying a plurality of data files associated with each pre-fetch user application of the reduced storage tier from the second memory to the dynamic storage unit of at least one reduced storage tier allocated for each pre-fetch user application of the reduced storage tier, setting a first time period for the dynamic storage unit of each reduced storage tier upon completion of the copying and starting timing, deleting a first predetermined number of data files in the dynamic storage unit of each reduced storage tier each time the first time period expires;
selecting at least one base data file among the plurality of data files associated with each pre-fetching user application of the incremental storage tier, copying the at least one base data file of each pre-fetching user application of the incremental storage tier from the second memory to the dynamic storage unit of the incremental storage tier allocated for each pre-fetching user application of the incremental storage tier, setting a second time period and starting timing for the dynamic storage unit of the incremental storage tier upon completion of the copying, wherein a second predetermined number of data files among the plurality of data files associated with each pre-fetching user application of the incremental storage tier are copied from the second memory to the dynamic storage unit of the incremental storage tier allocated for each pre-fetching user application of the incremental storage tier each time the second time period expires;
selecting at least one data file from the plurality of data files associated with each pre-fetch user application of the quantitative storage tier based on the storage capacity of the dynamic storage unit of the quantitative storage tier assigned for each pre-fetch user application of the quantitative storage tier and copying the selected at least one data file from the second memory to the dynamic storage unit of the quantitative storage tier assigned for each pre-fetch user application of the quantitative storage tier; and
the method further includes compressing the plurality of data files associated with each pre-fetch user application of the compressed storage tier to generate a plurality of compressed data files, copying the plurality of compressed data files of each pre-fetch user application of the compressed storage tier from the second memory to a dynamic storage unit of at least one compressed storage tier allocated for each pre-fetch user application of the compressed storage tier.
The mobile internet comprises a plurality of mobile terminals, the mobile terminal which initiates a file pre-fetching request is determined as a target mobile terminal, and the number of user applications is larger than 4. The operation statistical file comprises a plurality of data tables, one data table is allocated to each user application in a plurality of user applications in the target mobile terminal, each data table comprises a plurality of data items, and the content of each data item is a quadruple < application name, foreground operation starting time, foreground operation ending time and foreground operation accumulated time >. Wherein the data table allocated to each user application is used as the running-time statistical information of each user application, and the data table allocated to each user application is used for recording the running-time information of each user application in real time.
In the running statistics file, a predetermined number of data items are saved for each user application, or a predetermined number of data items within a natural day or a predetermined length of time are saved for each user application. Wherein the predetermined number of natural days is 10 natural days, 20 natural days, or 30 natural days, and wherein the predetermined time length is 240 hours, 480 hours, or 720 hours.
The application switching frequency F of the user application in the target mobile terminal during running is a switching frequency of the user application in the foreground during running to the background during running of the user application in the target mobile terminal, the application switching frequency F is an average switching number of the user application in the foreground during running to the background during an effective time period in each natural day of a first date interval, wherein the switching number is counted when the user application in the foreground is switched to the background after the running time exceeds 1 minute, and the first date interval comprises at least 10 natural days, wherein the effective time period is a time period from 6 am to 11 pm. And the user presets a dynamic adjustment factor A according to the processor main frequency of the target mobile terminal and the reading speed of the second memory, wherein the dynamic adjustment factor is 5.
Dividing each time interval T in a plurality of time intervals into a plurality of time segments according to the application switching frequency F of the user application in the target mobile terminal during operation and a dynamic adjustment factor A preset by the user comprises:
Figure BDA0001769707430000071
where S is the number of time segments in each time interval T. Wherein each time interval T is 60 minutes and the start time and the end time of each time interval T are punctual times. Wherein each time interval T is divided into 3 time segments, 6 time segments or 10 time segments. Wherein determining the probability of operation of each user application within a particular time segment based on the runtime statistics of each user application comprises: selecting a second date interval for determining a probability of operation, the second date interval comprising at least 10 natural days; analyzing each data item in the plurality of data items in the running time statistical information of each user application to determine the effective times Ci of running of each user application in a specific time segment in each natural day in a second date interval, wherein i is more than or equal to 1 and less than or equal to Na, Na is the number of user applications in the target mobile terminal, and Na is a natural number and is more than 4;
calculating the total effective times S of all the user applications running in the specific time segment based on the effective times Ci of each user application running in the specific time segments of the second date interval:
Figure BDA0001769707430000072
and calculating the operation probability Pi & Ci/S of each user application in a specific time segment.
Wherein the user application counts as a valid number of times when the running time of the user application in a specific time segment exceeds 20 seconds.
Wherein determining the probability of operation of each user application within a particular time segment based on the runtime statistics of each user application comprises: selecting a second date interval for determining a probability of operation, the second date interval comprising at least 10 natural days;
analyzing each data item in the plurality of data items in the running time statistical information of each user application to determine the running time length ti of each user application in a specific time segment in each natural day in a second time interval, wherein i is more than or equal to 1 and less than or equal to Na, Na is the number of user applications in the target mobile terminal, and Na is a natural number and is more than 4;
calculating a total time length T of all user applications running in a specific time segment based on the time length ti of each user application running in a plurality of specific time segments of the second date interval:
Figure BDA0001769707430000073
and calculating the operation probability Pi of each user application in a specific time segment, namely ti/T. The state parameter is the current state of the target mobile terminal. Wherein setting a first adjustment coefficient S for each user application according to the state parameter of the target mobile terminal comprises: in the case that the status parameter of the target mobile terminal is in the highlight status, setting the first adjustment coefficient S applied by each user to be less than 1, for example, 0.8; setting a first adjustment coefficient S applied by each user to be greater than 1, for example, 1.2, under the condition that the state parameter of the target mobile terminal is in a soft light state; and setting the first adjustment coefficient S applied by each user to be less than 1, for example, 0.9, in case the state parameter of the target mobile terminal is in a low light state.
Wherein a first adjustment coefficient S is set for each user application according to the state parameters of the target mobile terminal: setting a first adjustment coefficient S applied by each user to be larger than 1, for example 1.2, under the condition that the state parameter of the target mobile terminal is that the display screen faces upwards; setting a first adjustment coefficient S applied by each user to be less than 1, for example, 0.3, under the condition that the state parameter of the target mobile terminal is that the display screen is downward; setting a first adjustment coefficient S applied by each user to be less than 1, for example 0.9, under the condition that the state parameter of the target mobile terminal is moving in the horizontal direction; in case the status parameter of the target mobile terminal is a vertical direction movement, the first adjustment factor S applied by each user is set to be less than 1, for example 0.7.
Wherein setting a first adjustment coefficient S for each user application according to the state parameter of the target mobile terminal comprises: setting a first adjustment coefficient S applied by each user to be less than 1, for example 0.8, under the condition that the state parameter of the target mobile terminal is in a hot state; setting a first adjustment coefficient S applied by each user to be less than 1, for example 0.9, under the condition that the state parameter of the target mobile terminal is in a high-temperature state; setting a first adjustment coefficient S applied by each user to be larger than 1, for example 1.2, under the condition that the state parameter of the target mobile terminal is in a proper state; setting a first adjustment coefficient S applied by each user to be less than 1, for example 0.9, under the condition that the state parameter of the target mobile terminal is in a low-temperature state; in the case where the state parameter of the target mobile terminal is in a cold state, setting a first adjustment coefficient S applied by each user to be less than 1, for example, 0.6;
wherein the hot state is that the air temperature T is more than or equal to 32 ℃; the high temperature state is 32 ℃ and the temperature T is more than or equal to 25 ℃, the suitable state is 25 ℃ and the temperature T is more than or equal to 18 ℃, the low temperature state is 18 ℃ and the temperature T is more than or equal to 8 ℃, or the cold state is 8 ℃ and the temperature T.
The position parameter is the current position of the target mobile terminal. Setting a second adjustment coefficient L for each user application according to the location parameter of the target mobile terminal comprises: in the case where the location parameter of the target mobile terminal is office, setting the second adjustment coefficient L applied by each user to be less than 1, for example, 0.8; setting a second adjustment coefficient L applied by each user to be greater than 1, for example 1.2, under the condition that the location parameter of the target mobile terminal is home; in the case where the location parameter of the target mobile terminal is restaurant, setting the second adjustment coefficient L applied by each user to be less than 1, for example, 0.9; in the case where the location parameter of the target mobile terminal is a road, setting the second adjustment coefficient L applied by each user to be less than 1, for example, 0.8; and setting the second adjustment coefficient L applied by each user to be greater than 1, for example, 1.1, in the case where the location parameter of the target mobile terminal is the subway.
Wherein obtaining the weight ratio of the state parameter and the position parameter comprises:
and reading a weight configuration file in the target mobile terminal, and analyzing the weight configuration file to obtain the weight proportion of the state parameter and the position parameter. The sum of the weight ratios of the state parameter and the position parameter is 1, and the weight ratios of the state parameter and the position parameter are 0.5 and 0.5 respectively; the weight ratio of the state parameter to the position parameter is 0.3 and 0.7 respectively; the weight ratio of the state parameter to the position parameter is 0.2 and 0.8 respectively; the weight ratio of the state parameter to the position parameter is 0.7 and 0.3 respectively; the weight ratio of the state parameter to the position parameter is 0.8 and 0.2 respectively; the weight ratio of the state parameter to the position parameter is 0.4 and 0.6 respectively; the weight ratio of the state parameter and the position parameter is 0.6 and 0.4 respectively.
Determining a third adjustment coefficient K applied by each user according to the first adjustment coefficient S and the second adjustment coefficient L applied by each user and the weight proportion, wherein the third adjustment coefficient K applied by each user is: the third adjustment coefficient K is the first adjustment coefficient sxw 1+ the second adjustment coefficient lxw 2, where W1 is the weight ratio of the sum of the state parameters, and W2 is the weight ratio of the position parameters.
Calculating an adjusted operation probability of each user application in a specific time segment based on the third adjustment coefficient K of each user application and the operation probability in the specific time segment comprises: and taking the product of the third adjustment coefficient K applied by each user and the operation probability in the specific time segment as the adjusted operation probability of each user application in the specific time segment. The system comprises a mobile internet and an initialization device, wherein the initialization device is used for responding to a file prefetching request initiated by a user and used for prefetching a file aiming at a data file of a target mobile terminal in the mobile internet and relevant to a user application, and acquiring a dynamic configuration file relevant to the file prefetching; creating a dynamic index area in a first memory of the target mobile terminal, and creating a plurality of dynamic storage units for storing data files in the first memory according to the dynamic configuration file, wherein the storage capacity of each of the plurality of dynamic storage units is determined according to the dynamic configuration file; and
and generating a dynamic index table in the dynamic index area, wherein the dynamic index table comprises a plurality of index entries, and each index entry is used for recording the application identification, the starting address, the ending address, the storage capacity and the storage level of a corresponding dynamic storage unit in a plurality of dynamic storage units. The first memory is a random access memory, and the second memory is a read-only memory.
The dynamic profile includes a start address and an end address of a storage area in the first memory for providing a plurality of dynamic storage units, and the dynamic profile further includes a storage capacity of each of the plurality of dynamic storage units. The application identifier is an identifier of a user application to which the dynamic storage unit belongs, the starting address is a starting address of a storage space of the dynamic storage unit, the ending address is an ending address of the storage space of the dynamic storage unit, and the storage capacity is the storage capacity and the storage level of the storage space of the dynamic storage unit.
And updating the corresponding index entry in the dynamic index table according to the storage level set for the dynamic storage unit.
Wherein the pre-fetching means selects at least one data file from the plurality of data files associated with each pre-fetching user application of the quantitative storage tier based on the storage capacity of the dynamic storage unit of the quantitative storage tier allocated for each pre-fetching user application of the quantitative storage tier comprises: grouping a plurality of data files associated with each pre-fetch user application of the quantitative storage tier according to a storage capacity of a dynamic storage unit of the quantitative storage tier allocated to each pre-fetch user application of the quantitative storage tier to generate a plurality of file groups, wherein each file group includes at least one data file, and setting different priorities for the plurality of file groups of each pre-fetch user application of the quantitative storage tier to constitute priority queues, regarding a file group positioned at a head of a queue in each priority queue as a current file group and copying at least one data file in the current file group from a second memory to a dynamic storage unit of the quantitative storage tier allocated to each pre-fetch user application of the quantitative storage tier and setting a third time period for each dynamic storage unit of the quantitative storage tier, whenever the third time period expires, using a next file group in the priority queues as the current file group in order of decreasing priority, until there is no next set of files;
determining a number of pre-fetch user applications associated with the quantitative storage tier based on the at least one data file selected from the plurality of data files; wherein the size of each file group is smaller than the storage space of the dynamic storage unit of the corresponding quantitative storage tier. Wherein the pre-fetching means selects at least one data file from the plurality of data files associated with each pre-fetching user application of the quantitative storage tier based on the storage capacity of the dynamic storage unit of the quantitative storage tier allocated for each pre-fetching user application of the quantitative storage tier comprises:
grouping a plurality of data files associated with each pre-fetch user application of the quantitative storage tier according to a storage capacity of a dynamic storage unit of the quantitative storage tier allocated for each pre-fetch user application of the quantitative storage tier to generate a plurality of file groups, wherein each file group includes at least one data file, randomly selecting one file group from the plurality of file groups as a current file group and copying at least one data file in the current file group from the second memory to the dynamic storage unit of the quantitative storage tier allocated for each pre-fetch user application of the quantitative storage tier and setting a third time period for each dynamic storage unit of the quantitative storage tier, randomly selecting a next file group from the plurality of file groups as the current file group whenever the third time period expires until there is no next file group; determining a number of pre-fetch user applications associated with the quantitative storage tier based on the at least one data file selected from the plurality of data files;
wherein the size of each file group is smaller than the storage space of the dynamic storage unit of the corresponding quantitative storage tier.
After the pre-fetching means copies the selected at least one data file from the second memory to the dynamic storage unit of the quantitative storage tier assigned to each pre-fetching user application of the quantitative storage tier, the pre-fetching means sets a third time period and re-selects the at least one data file from the plurality of data files associated with each pre-fetching user application of the quantitative storage tier according to the storage capacity of the dynamic storage unit of the quantitative storage tier assigned to each pre-fetching user application of the quantitative storage tier each time the third time period expires, copying the re-selected at least one data file from the second memory to the dynamic storage unit of the quantitative storage tier assigned to each pre-fetching user application of the quantitative storage tier.
Wherein the pre-fetching means selects at least one data file from the plurality of data files associated with each pre-fetching user application of the quantitative storage tier based on the storage capacity of the dynamic storage unit of the quantitative storage tier allocated for each pre-fetching user application of the quantitative storage tier comprises:
step 1, grouping a plurality of data files associated with each pre-fetching user application of the quantitative storage tier to generate N file groups according to the storage capacity of a dynamic storage unit of the quantitative storage tier allocated to each pre-fetching user application of the quantitative storage tier, wherein N is a natural number greater than 1 and each file group comprises at least one data file;
step 2, setting different sequence numbers for each file group in the N file groups, wherein the sequence numbers are from 1 to N;
step 3, taking the file group with the serial number i equal to 1 as the current file group, wherein N is more than or equal to i and is more than 0;
step 4, setting a third time period for each dynamic storage unit of the quantitative storage level;
step 5, copying at least one data file included in the current file group from the second memory to a dynamic storage unit of the quantitative storage level allocated to each pre-fetching user application of the quantitative storage level;
step 6, when the third time period expires, judging whether i is true or not, and if yes, ending; if not, taking the file group with the serial number i being i +1 as the current file group, and performing step 5;
wherein the size of each file group is smaller than the storage capacity of the dynamic storage unit of the fixed-amount storage tier.
Wherein the setting means determining, from the ordered list, a plurality of pre-fetched user applications of the plurality of user applications that can be pre-loaded from the second memory into the first memory comprises:
when the number of the user applications with the operation probability larger than the pre-fetching threshold value in the ordered list is larger than 0, determining the user applications with the operation probability larger than the pre-fetching threshold value in the ordered list as the pre-fetching user applications which can be pre-loaded into the first memory from the second memory so as to determine at least one pre-fetching user application; when the number of user applications in the ordered list having an operating probability greater than the pre-fetch threshold is equal to 0, determining all user applications in the ordered list as pre-fetched user applications that can be pre-loaded from the second memory into the first memory to determine at least one pre-fetched user application.
Wherein the setting means setting a storage level for each of the at least one pre-fetch user application according to the ordered list comprises: setting the storage level of the pre-fetching user application with the operation probability larger than the high probability threshold value in the ordered list as a decrement storage level; setting the storage level of the pre-fetching user application with the running probability less than or equal to the high probability threshold and greater than the medium probability threshold in the sorted list as an incremental storage level; setting the storage level of the pre-fetching user application with the running probability less than or equal to the middle probability threshold and greater than the low probability threshold in the sorted list as a quantitative storage level; and setting the storage level of the pre-fetching user application with the operation probability less than or equal to the low probability threshold value in the sorted list as a compression storage level.
Wherein the at least one dynamic storage unit allocated by the allocating means for the pre-fetching user application of each reduced storage tier is able to hold all data files of the pre-fetching user application of the corresponding reduced storage tier, and the at least one dynamic storage unit allocated by the allocating means for the pre-fetching user application of each compressed storage tier is able to hold all compressed data files of the pre-fetching user application of the corresponding compressed storage tier. Wherein the first time period is 30 seconds, the second time period is 60 seconds, and wherein the third time period is 90 seconds. Wherein the at least one base data file of each pre-fetching user application is at least one data file of the plurality of data files associated with each pre-fetching user application of the incremental storage tier that has a launch order above a priority threshold. Wherein the first predetermined number is 5 and the second predetermined number is 8.
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 chart of a method for file prefetching in a mobile Internet according to time segmentation in accordance with the present invention;
FIG. 2 is a logical representation of an ordered list according to the present invention;
FIG. 3 is a logic diagram of a reduced memory according to the present invention;
FIG. 4 is a logic diagram of an incremental store according to the present invention;
FIG. 5 is a logic diagram of a quantitative store according to the present invention;
FIG. 6 is a logic diagram of compressed storage according to the present invention; and
fig. 7 is a schematic structural diagram of a system for performing file prefetching in the mobile internet according to time segmentation according to the present invention.
Detailed Description
Fig. 1 is a flow diagram of a method 100 for performing file prefetching in a mobile internet according to time segmentation according to an embodiment of the present invention. As shown in fig. 1, method 100 begins at step 101.
In step 101, an operation statistics file associated with a target mobile terminal in a mobile internet is obtained, and the operation statistics file is parsed to determine operation time statistics information of each of a plurality of user applications in the target mobile terminal. The mobile internet includes a plurality of mobile terminals, base stations, content servers, and the like. The method and the device determine the mobile terminal which initiates the file prefetching request or the mobile terminal which requests to perform file prefetching as the target mobile terminal. Furthermore, the number of user applications included or installed in each mobile terminal (including the target mobile terminal) is greater than 4, e.g. 5, 10, 20 user applications. Concepts related to user applications include system applications, and system applications are typically system level applications determined by the operating system of the mobile terminal.
The operation statistical file comprises a plurality of data tables, and each data table is allocated to each user application in a plurality of user applications in the target mobile terminal. Each data table includes a plurality of data items, and the content of each data item is four-tuple < application name, foreground operation start time, foreground operation end time, foreground operation accumulated time >. For example, the data items are < royal glory, 6/8/2018 20: 00/2018/6/8/21: 50/110 minutes >.
The data table allocated to each user application is used as the running-time statistical information of each user application, namely, the running-time statistical information of each user application is provided in the form of the data table. The data table allocated for each user application is used to record the runtime information of each user application in real time. That is, when the mobile terminal is running, the operating system or the control device may count and record running information of each user application, for example, an application name, a foreground running start time, a foreground running end time, a foreground running accumulated time, and the like, in real time. Therefore, the data table records the running information of each user application in a statistical time interval from a specific time point in the past to the current time point. Wherein, in the running statistics file, the application stores a predetermined number (e.g., 100, 200, 300) of data items for each user application, or stores data items for each user application within a predetermined length of time (e.g., 10 days, 20 days, 30 days).
In step 102, each time interval T in a plurality of time intervals in a natural day is divided into a plurality of time segments according to the application switching frequency F of the user application in the target mobile terminal during operation and the dynamic adjustment factor a preset by the user. When the current running time of the target mobile terminal enters a specific time segment in the multiple time segments, determining the running probability of each user application in the specific time segment according to the running time statistical information of each user application;
the application switching frequency F of the user application in the target mobile terminal during operation is a switching frequency of the user application located in the foreground during operation to be switched to the background during operation of the user application in the target mobile terminal. The application switching frequency F is an average number of times that a user application located in the foreground is switched to the background at runtime during an effective time period (e.g., a time period from 8 am to 12 pm, a time period from 10 am to 10 pm) during each natural day of a first date interval (e.g., 10 natural days, 20 natural days, 30 natural days). In general, the first date interval and the valid period may be set according to user input or by an operating system. In the application, only one application in foreground operation in the target mobile terminal is available at any time, and the switching times are counted when the user application in the foreground is switched to the background after the foreground operation time is greater than 1 minute. That is, if a user application of the foreground is switched to the background when the foreground operating time is 1 minute or less than 1 minute, the switching is not counted as the number of switching times (considered as an interfering operation). According to the mode, the problem that switching times are too large due to frequent switching of foreground running applications caused by misoperation can be solved. Wherein the first date interval includes at least 10 natural days, and the valid time period is a time period from 6 am to 11 pm.
For example, the application switching frequency F of the multiple user applications in the target mobile terminal during running is a switching frequency of the user application located in the foreground during running to be switched to the background during running of the multiple user applications in the target mobile terminal. The application switching frequency F is an effective time period (a time period from 10 am to 10 pm) in each of 10 natural days, that is, 12 hours, and the average switching number of the user application located in the foreground that is switched to the background during the running time. For example, the number of times of switching of the effective time period within each of the 10 natural days is: 10. 15, 20, 9, 21, 16, 12, 22, 10 and 15, then the average number of handovers is 15.
And the user presets a dynamic adjustment factor A according to the processor main frequency of the target mobile terminal and the reading speed of the second memory. Generally, the dynamic adjustment factor a is set larger, e.g., 3, 4, 5, 6 and 8, when the processor of the target mobile terminal has a higher dominant frequency and/or the reading speed of the second memory is faster. In addition, there may be a user or system directly specifying the dynamic adjustment factor, e.g., set to 5.
Dividing each time interval T in a plurality of time intervals into a plurality of time segments according to the application switching frequency F of the user application in the target mobile terminal during operation and a dynamic adjustment factor A preset by the user comprises:
Figure BDA0001769707430000111
where S is the number of time segments in each time interval T. The method and the device determine different time segment numbers according to different values of the application switching frequency F. Each time interval T is 60 minutes, and the start time and the end time of each time interval T are the integer time, for example, the time intervals are 10:00 to 11:00, 11:00 to 12:00, 15:00 to 16:00, etc. in the present application, each time interval T in a plurality of time intervals in a natural day may be divided into a plurality of time segments according to the application switching frequency F of the user application at runtime in the target mobile terminal and the dynamic adjustment factor a preset by the user, instead: each of a plurality of time intervals within one natural day is divided into 3 time segments, 6 time segments, or 10 time segments. Dividing each time interval T in a plurality of time intervals in a natural day into a plurality of time segments according to the application switching frequency F of the user application in the target mobile terminal during operation and the dynamic adjustment factor A preset by the user can be replaced by dividing each time interval T in the plurality of time intervals in the natural day into 6 time segments.
And when the current running time of the target mobile terminal enters a specific time segment in the plurality of time segments, determining the running probability of each user application in the specific time segment according to the running time statistical information of each user application.
The current running time of the target mobile terminal refers to the current system time of the target mobile terminal, for example, the current time indicated or displayed by the operating system. The current running time of the target mobile terminal enters a specific time segment of the plurality of time segments, for example, when the current running time of the target mobile terminal is 10:00, the specific time segment (10:00 to 10:10) is entered, as shown in fig. 2. FIG. 2 is a logic diagram of an ordered list 200 according to an embodiment of the invention. Wherein, the number of the natural days is 10 from 2018 6/1, 2018 6/2, 203 to 2018 6/9, and 2018 6/10, 205, and the time segments are 10:00 to 10:10 in the morning.
Wherein determining the probability of operation of each user application within a particular time segment based on the runtime statistics of each user application comprises: selecting a second date interval for determining the probability of operation, the second date interval including at least 10 natural days (e.g., 10 natural days, 20 natural days, 30 natural days);
each of the plurality of data items within the runtime statistics of each user application is parsed to determine the effective number of times Ci that each user application is running within a particular time segment within each natural day within the second date interval. Wherein the user application counts as a valid number of times when the running time of the user application in a specific time segment exceeds 20 seconds. For example, if the specific time segment is 10:00 to 10:10 (i.e., the time interval is 10:00 to 11:00 is divided into 6 time segments), the time of operation of the pay bank application in the specific time segment in each of 10 natural days is 10 seconds (operation does not exceed 20 seconds), 60 seconds, 0 seconds (non-operation), 50 seconds, 30 seconds, 90 seconds, 120 seconds, 0 seconds (non-operation), 15 seconds (operation does not exceed 20 seconds), and 60 seconds, and the valid number of times of the pay bank application is 0+1+0+1+1+1+ 0+0+1 equals to 6 times. Wherein i is more than or equal to 1 and less than or equal to Na, and Na is the number of user applications in the target mobile terminal, wherein Na is a natural number and Na is more than 4.
Calculating the total effective times S of all the user applications running in the specific time segment based on the effective times Ci of each user application running in the specific time segments of the second date interval:
Figure BDA0001769707430000121
and calculating the operation probability Pi & Ci/S of each user application in a specific time segment. For example, the pay for use application runs 6 times in a specific time segment (10:00 to 10:10) of 10 natural days, the wechat application runs 10 times in a specific time segment (10:00 to 10:10) of 10 natural days, the naught application runs 3 times in a specific time segment (10:00 to 10:10) of 10 natural days, the wanger glows 1 time in a specific time segment (10:00 to 10:10) of 10 natural days, and the mei group application runs 0 times in a specific time segment (10:00 to 10:10) of 10 natural days, then S is 20 times. The running probabilities for pay Bao, WeChat, Taobao, King glory and beauty applications for a particular time segment (10:00 to 10:10) are 30%, 50%, 15%, 5% and 0%, respectively.
Wherein determining the probability of operation of each user application within a particular time segment based on the runtime statistics of each user application comprises: selecting a second date interval for determining the probability of operation, the second date interval including at least 10 natural days (e.g., 10 natural days, 20 natural days, 30 natural days);
each of the plurality of data items within the runtime statistics of each user application is parsed to determine a length of time ti for which each user application is running within a particular time segment within each natural day during the second time interval. For example, the specific time segment is 10:00 to 10:10 (i.e., the time interval is 10:00 to 11:00 is divided into 6 time segments), the running time of the pay bank application in the specific time segment in each of 10 natural days is 10 seconds, 60 seconds, 0 seconds, 50 seconds, 30 seconds, 90 seconds, 120 seconds, 0 seconds, 15 seconds, and 60 seconds, and the time length of the pay bank application is 435 seconds. Wherein i is more than or equal to 1 and less than or equal to Na, and Na is the number of user applications in the target mobile terminal, wherein Na is a natural number and Na is more than 4.
Calculating a total time length T of all user applications running in a specific time segment based on the time length ti of each user application running in a plurality of specific time segments of the second date interval:
Figure BDA0001769707430000122
and calculating the operation probability Pi of each user application in a specific time segment, namely ti/T. For example, if the pay for baby application runs 435 seconds in a specific time segment (10:00 to 10:10) of 10 natural days, the wechat application runs 875 seconds in a specific time segment (10:00 to 10:10) of 10 natural days, the naught application runs 500 seconds in a specific time segment (10:00 to 10:10) of 10 natural days, the wang glows 190 seconds in a specific time segment (10:00 to 10:10) of 10 natural days, and the mei group application runs 0 second in a specific time segment (10:00 to 10:10) of 10 natural days, then T equals 2000 seconds. The running probabilities for pay Bao, WeChat, Taobao, King Rong and Mei Gong applications for a particular time segment (10:00 to 10:10) are 21.75%, 43.75%, 25%, 9.5% and 0%, respectively.
In the example shown in fig. 2, as shown in table 206, in a time segment a of 10 natural days from 1 st 6/2018 to 10 th 6/2018, the operation probability of royal glory is 15%, the operation probability of tremble short video is 13.3%, the operation probability of kui video is 12.5%, the operation probability of cell phone panning is 10.8%, the operation probability of mei takeout is 8.3%, the operation probability of Baidu takeout is 7.5%, the operation probability of mastership is 5.8%, the operation probability of tribuna takeout is 5% and the operation probability of lazy english is 0%.
In step 103, setting a first adjustment coefficient S for each user application according to the state parameter of the target mobile terminal and a second adjustment coefficient L for each user application according to the location parameter of the target mobile terminal, obtaining a weight ratio of the state parameter and the location parameter, determining a third adjustment coefficient K for each user application according to the first adjustment coefficient S and the second adjustment coefficient L for each user application and the weight ratio, calculating an adjusted operation probability of each user application in a specific time segment based on the third adjustment coefficient K for each user application and the operation probability in the specific time segment, and performing a descending order of the operation probabilities for a plurality of user applications based on the adjusted operation probability of each user application in the specific time segment to generate an ordered list;
the method and the device use the sensor assembly of the target mobile terminal to acquire the state parameters of the target mobile terminal. Wherein the state parameter of the target mobile terminal is a current state of the target mobile terminal. The sensor assembly includes, for example: a brightness sensor, an acceleration sensor, an ambient temperature sensor, etc. The method for acquiring the state parameters of the target mobile terminal by using the sensor component of the target mobile terminal comprises the following steps:
and acquiring the state parameters of the target mobile terminal to be in a strong light state, a soft light state or a weak light state by using a brightness sensor in a sensor assembly of the target mobile terminal. The strong light state is a state that the illumination intensity is greater than 10000 lux; the soft light state is a state in which the illuminance is less than or equal to 10000 lux and the illuminance is greater than or equal to 100 lux; a low light state is less than 100 lux. The bright light state, the soft light state, or the weak light state may refer to illuminance of external light with respect to a display screen of the target mobile terminal.
The setting of the first adjustment coefficient S for each user application according to the state parameter of the target mobile terminal comprises the following steps: in the case that the status parameter of the target mobile terminal is in the highlight status, setting the first adjustment coefficient S applied by each user to be less than 1, for example, 0.8; in case that the state parameter of the target mobile terminal is the soft light state, the first adjustment coefficient S applied by each user is set to be greater than 1, for example, 1.2.
In case the state parameter of the target mobile terminal is in a low light state, the first adjustment coefficient S applied by each user is set to be less than 1, for example 0.9. This is because in both the bright light state and the weak light state, there may be a case where the display effect is not good when the user uses the target mobile terminal to run the user application, and therefore the first adjustment coefficient S is smaller than 1. In the soft light condition, the willingness of the user to use the target mobile terminal to run the user application is greatly enhanced, so the first adjustment coefficient S is greater than 1.
The method for acquiring the state parameters of the target mobile terminal by using the sensor component of the target mobile terminal comprises the following steps:
and acquiring the state parameters of the target mobile terminal by using an acceleration sensor in a sensor assembly of the target mobile terminal, wherein the state parameters are that a display screen moves upwards, the display screen moves downwards, and the display screen moves in the horizontal direction or the vertical direction. Wherein the display screen is facing upwards, for example, the user places the target mobile terminal on a desktop and the display screen side is facing upwards; the display screen is downward, for example, the user places the target mobile terminal on a desktop and the display screen is downward on one side; the horizontal movement is, for example, a user placing the target mobile terminal in a hand or carrying the target mobile terminal with him for horizontal movement (for example, moving in a flat office); the vertical movement is, for example, a user putting the target mobile terminal in a hand or carrying it with him for vertical movement (e.g., taking an elevator).
The setting of the first adjustment coefficient S for each user application according to the state parameter of the target mobile terminal comprises the following steps:
setting the adjustment coefficient applied by each user to be larger than 1, for example 1.2, under the condition that the state parameter of the target mobile terminal is that the display screen faces upwards; setting a first adjustment coefficient S applied by each user to be less than 1, for example, 0.3, under the condition that the state parameter of the target mobile terminal is that the display screen is downward; setting a first adjustment coefficient S applied by each user to be less than 1, for example 0.9, under the condition that the state parameter of the target mobile terminal is moving in the horizontal direction; in case the status parameter of the target mobile terminal is a vertical direction movement, the first adjustment factor S applied by each user is set to be less than 1, for example 0.7.
Since the probability of using the target mobile terminal to run the user application is greater when the user sets the target mobile terminal to have the display screen facing upward, for this reason, the first adjustment coefficient S is greater than 1. Since the probability of using the target mobile terminal to run the user application is small in the case where the user sets the target mobile terminal to have the display screen moved downward, in the horizontal direction, or in the vertical direction, the first adjustment coefficient S is smaller than 1.
The method for acquiring the state parameters of the target mobile terminal by using the sensor component of the target mobile terminal comprises the following steps:
and acquiring the state parameters of the target mobile terminal to be in a hot state, a high-temperature state, a proper state, a low-temperature state or a cold state by utilizing an ambient temperature sensor in a sensor assembly of the target mobile terminal.
The setting of the first adjustment coefficient S for each user application according to the state parameter of the target mobile terminal comprises the following steps:
setting a first adjustment coefficient S applied by each user to be less than 1, for example 0.8, under the condition that the state parameter of the target mobile terminal is in a hot state; setting a first adjustment coefficient S applied by each user to be less than 1, for example 0.9, under the condition that the state parameter of the target mobile terminal is in a high-temperature state; setting a first adjustment coefficient S applied by each user to be larger than 1, for example 1.2, under the condition that the state parameter of the target mobile terminal is in a proper state; setting a first adjustment coefficient S applied by each user to be less than 1, for example 0.9, under the condition that the state parameter of the target mobile terminal is in a low-temperature state; in the case where the state parameter of the target mobile terminal is in a cold state, setting a first adjustment coefficient S applied by each user to be less than 1, for example, 0.6; wherein the hot state is that the air temperature T is more than or equal to 32 ℃; a high temperature state of 32 ℃ to 25 ℃ inclusive, a suitable state of 25 ℃ to 18 ℃ inclusive, a low temperature state of 18 ℃ to 8 ℃ inclusive, or a cold state of 8 ℃ to temperature T inclusive.
Since the probability that the user uses the target mobile terminal to run the user application is large in the case where the ambient temperature is in a suitable state, the first adjustment coefficient S is greater than 1 for this reason. Since the probability that the user uses the target mobile terminal to run the user application is small in the case where the ambient temperature is a hot state, a high temperature state, a suitable state, a low temperature state, or a cold state, for this reason, the first adjustment coefficient S is greater than 1.
It should be understood that the user may set the magnitude of the first adjustment coefficient S in each state as desired. Wherein the location parameter is the current location of the target mobile terminal (the current location obtained by the positioning component).
Setting a second adjustment coefficient L for each user application according to the location parameter of the target mobile terminal comprises:
in case the location parameter of the target mobile terminal is office, the second adjustment factor L applied by each user is set to be less than 1, e.g. 0.8. In case the location parameter of the target mobile terminal is home, the second adjustment factor L applied by each user is set to be greater than 1, e.g. 1.2. In the case where the location parameter of the target mobile terminal is restaurant, the second adjustment coefficient L applied by each user is set to be less than 1, for example, 0.9. In the case where the location parameter of the target mobile terminal is a road (e.g., a highway), the second adjustment coefficient L applied by each user is set to be less than 1, e.g., 0.8. In the case where the location parameter of the target mobile terminal is the subway, the second adjustment coefficient L applied by each user is set to be greater than 1, for example, 1.1.
It should be understood that the user can set the magnitude of the second adjustment coefficient L at each position as desired.
Wherein obtaining the respective weight ratios of the state parameter and the position parameter comprises: reading a weight configuration file in a target mobile terminal, and analyzing the weight configuration file to obtain respective weight proportions of the state parameters and the position parameters; wherein the sum of the respective weight ratios of the state parameter and the position parameter is 1, for example, the weight ratios of the state parameter and the position parameter are 0.5 and 0.5, respectively; the weight ratio of the state parameter to the position parameter is 0.3 and 0.7 respectively; the weight ratio of the state parameter to the position parameter is 0.2 and 0.8 respectively; the weight ratio of the state parameter to the position parameter is 0.7 and 0.3 respectively; the weight ratio of the state parameter to the position parameter is 0.8 and 0.2 respectively; the weight ratio of the state parameter to the position parameter is 0.4 and 0.6 respectively; the weight ratio of the state parameter and the position parameter is 0.6 and 0.4 respectively.
Determining a third adjusting coefficient K applied by each user according to the first adjusting coefficient S and the second adjusting coefficient L applied by each user and the respective weight proportion as follows: the third adjustment coefficient K is the first adjustment coefficient S × W1+ the second adjustment coefficient L × W2, where W1 is the weight ratio of the state parameter, and W2 is the weight ratio of the position parameter, as shown in fig. 2.
Calculating an adjusted running probability of each user application in a specific time segment based on the third adjustment coefficient K of each user application and the running probability in the specific time segment: and taking the product of the third adjustment coefficient K applied by each user and the operation probability in the specific time segment as the adjusted operation probability of each user application in the specific time segment.
In the example shown in fig. 2, as shown in table 206, in a specific time segment a within 10 natural days from 6/1/2018 to 6/10/2018, the operation probability of royal glory is 15%, the operation probability of tremble/short video is 13.3%, the operation probability of kui/cool video is 12.5%, the operation probability of cell phone panning is 10.8%, the operation probability of masu/takeout is 8.3%, the operation probability of bouquet/takeout is 7.5%, the adjusted operation probability of mastership is 5.8%, the operation probability of tribe/takeout is 5%, the operation probability of tribe/minbi is 5%, and the adjusted operation probability of lazy english is 0%.
In the case where the state parameter of the target mobile terminal is in the low light state, the first adjustment coefficient S applied by each user is set to 0.9, and at the same time, in the case where the location parameter of the target mobile terminal is home, the second adjustment coefficient L applied by each user is set to 1.2. The weight ratio of the status parameter is 0.4 and the weight ratio of the location parameter is 0.6. Then, the third adjustment factor F is: the third adjustment coefficient F is the first adjustment coefficient T × W1+ the second adjustment coefficient L × W2, i.e., the third adjustment coefficient F is 0.9 × 0.4+1.2 × 0.6 is 0.36+0.72 is 1.08.
Wherein calculating the adjusted operation probability of each user application in the specific time segment based on the third adjustment coefficient K of each user application and the operation probability in the specific time segment comprises: the product of the third adjustment factor K applied by each user and the operating probability in the specific time segment is used as the adjusted operating probability of each user application in the specific time segment, i.e., the operating probability × 1.08 is the adjusted operating probability.
For ease of calculation, an example of the adjusted operating probability is chosen as 1.2. In the example shown in fig. 2, as shown in table 207, in a specific time segment a of 10 natural days from 6/1/2018 to 6/10/2018, the adjusted operation probability of the royal glory is 18%, the adjusted operation probability of the trembled short video is 16%, the adjusted operation probability of the kukoku video is 15%, the adjusted operation probability of the cell phone naught is 13%, the adjusted operation probability of the meyowa takeout is 10%, the adjusted operation probability of the boudouche takeout is 9%, the adjusted operation probability of the mastership is 7%, the adjusted operation probability of the sanchi takeout is 6%, and the adjusted operation probability of the lazy english is 0%.
At step 104, determining at least one of the plurality of user applications that can be preloaded from the second memory into the first memory according to the ordered list, and setting a storage level for each of the at least one pre-fetch user application according to the ordered list, wherein the storage levels include: a decrement storage stage, an increment storage stage, a quantitative storage stage, and a compressed storage stage.
Wherein determining from the ordered list a plurality of pre-fetch user applications of the plurality of user applications that can be pre-loaded from a second memory into a first memory comprises: when the number of user applications in the ordered list having an operating probability greater than the pre-fetch threshold (e.g., 5%, 10%) is greater than 0 (e.g., 10), determining the user applications in the ordered list having an operating probability greater than the pre-fetch threshold as pre-fetch user applications that can be pre-loaded from the second memory into the first memory to determine at least one pre-fetch user application; when the number of user applications in the ordered list having a running probability greater than the pre-fetch threshold (e.g., 5%, 10%) is equal to 0, all user applications (e.g., 15) in the ordered list are determined as pre-fetched user applications that can be pre-loaded from the second memory into the first memory to determine at least one pre-fetched user application.
Wherein setting a storage level for each of at least one pre-fetch user application according to the ordered list comprises: setting a storage level of the pre-fetched user applications in the ordered list having an operational probability greater than a high probability threshold (e.g., 15%) to a reduced storage level; setting a storage level of the pre-fetch user application in the sorted list having a probability of operation less than or equal to a high probability threshold (e.g., 15%) and greater than a medium probability threshold (e.g., 12%) as an incremental storage level; setting a storage level of the pre-fetched user applications in the sorted list having a probability of operation less than or equal to a medium probability threshold (e.g., 12%) and greater than a low probability threshold (e.g., 8%) as a quantitative storage level; setting a storage level of the pre-fetched user applications in the sorted list having an operating probability less than or equal to a low probability threshold (e.g., 8%) as a compressed storage level. Wherein the pre-fetching of user applications has a running probability of more than 5%.
As shown in fig. 2, according to the above-described manner, it can be determined that the operation probability of the royal glowing and the operation probability of the tremble short video are 18% and 16%, and therefore the storage level of the royal glowing and the tremble short video is the reduced storage level. The running probability of the Youkou video is 15% and the running probability of the mobile phone panning is 13%, so the storage level of the Youkou video and the mobile phone panning is an incremental storage level. The operation probability of the American college takeout is 10% and the operation probability of the Baidu takeout is 9%, so that the storage level of the American college takeout and the Baidu takeout is a quantitative storage level, the operation probability of the masterpiece flying vehicle is 7% and the operation probability of the masterpiece flying vehicle is 6%, so that the storage level of the masterpiece flying vehicle and the masterpiece flying vehicle is a compression storage level.
Since the number 8 of user applications having an operation probability greater than 5% of the pre-fetch threshold in the sorted list is greater than 0, the user applications having an operation probability greater than the pre-fetch threshold in the sorted list (the operation probability of royal glory is 18%, the operation probability of jittering short video is 16%, the operation probability of kukoku video is 15%, the operation probability of mobile phone panning is 13%, the operation probability of masu takeout is 10%, the operation probability of Baidu takeout is 9%, the operation probability of masterwork galloping is 7%, and the operation probability of tribasic masterless is 6%) are determined as pre-fetch user applications that can be pre-loaded from the second memory into the first memory to determine at least one pre-fetch user application. The operating probability of the lazy english language is 0%, and therefore does not belong to the pre-fetching user application.
At step 105, at least one dynamic memory location is allocated for each pre-fetch user application of the reduced storage tier, at least one dynamic memory location is allocated for each pre-fetch user application of the compressed storage tier, one dynamic memory location is allocated for each pre-fetch user application of the increased storage tier and one dynamic memory location is allocated for each pre-fetch user application of the quantitative storage tier. Wherein the storage capacity of each of the at least one dynamic storage unit allocated for each of the pre-fetched user applications of the reduced storage tier may be the same or different, and the storage capacity of each of the at least one dynamic storage unit allocated for each of the pre-fetched user applications of the compressed storage tier may be the same or different.
The total storage capacity of the at least one dynamic storage unit allocated for the pre-fetching user application of each reduced storage tier is capable of accommodating all data files of the pre-fetching user application of the corresponding reduced storage tier. The total storage capacity of the at least one dynamic storage unit allocated for the pre-fetching user application of each compressed storage tier is capable of accommodating all compressed data files of the pre-fetching user application of the corresponding compressed storage tier. One dynamic memory unit is allocated for each pre-fetching user application of the incremental storage tier that can accommodate all data files of the pre-fetching user application of the corresponding incremental storage tier. One dynamic memory unit is allocated to each pre-fetching user application of a quantitative memory rank to be able to accommodate all data files of the pre-fetching user application of the corresponding quantitative memory rank.
In step 106, a storage level is set for the dynamic storage unit allocated for each pre-fetching user application according to the storage level of each pre-fetching user application. Setting each dynamic memory unit of the at least one dynamic memory unit allocated for each pre-fetching user application of the reduced memory rank as a reduced memory rank, setting each dynamic memory unit of the at least one dynamic memory unit allocated for each pre-fetching user application of the compressed memory rank as a compressed memory rank, setting one dynamic memory unit allocated for each pre-fetching user application of the increased memory rank as an increased memory rank and setting one dynamic memory unit allocated for each pre-fetching user application of the increased memory rank as a quantitative memory rank.
In step 107, file prefetching the data files associated with each prefetched user application from the second memory according to the storage level of the prefetched user application, comprising: preferably, the (all) plurality of data files associated with each pre-fetching user application of a reduced storage tier are copied from the second memory to the dynamic storage unit of at least one reduced storage tier allocated for each pre-fetching user application of a reduced storage tier, and a first time period is set and timed for the dynamic storage unit of each reduced storage tier upon completion of the copying, a first predetermined number of data files being deleted in the dynamic storage unit of each reduced storage tier each time the first time period expires until none of the dynamic storage units of each reduced storage tier has a data file.
FIG. 3 is a logic diagram of an embodiment of a decrement storage 300. The operation probability of the royal glory is 18% and the operation probability of the tremble short video is 16%, so that the storage level of the royal glory and tremble short video is a decrement storage level. All data files of the royal glowing are copied from the second memory to the dynamic memory units 301, 302 and 303 of at least one reduced memory level allocated for the royal glowing. Each of the dynamic memory units 301, 302, and 303 has a memory capacity of 500M, and an application name and a memory level are labeled in each dynamic memory unit. A first time period (e.g., 30 seconds, 50 seconds, 60 seconds) is set for the dynamic storage units 301, 302, and 303 of each reduced storage rank after the copying is completed, and a first predetermined number (e.g., 3, 5) of data files are deleted in the dynamic storage units 301, 302, and 303 of each reduced storage rank every time the first time period expires (i.e., every time 30 seconds, 50 seconds, 60 seconds elapses).
All data files of the trembling short video are copied from the second memory to the dynamic memory units 311 and 312 of at least one decrement memory level allocated for the trembling short video. Each of the dynamic memory units 311 and 312 has a memory capacity of 60M, and an application name and a memory level are labeled in each dynamic memory unit. And sets a first time period (e.g., 30 seconds, 50 seconds, 60 seconds) for the dynamic storage units 311 and 312 of each reduced storage rank after the copying is completed, and deletes a first predetermined number (e.g., 3, 5) of data files in the dynamic storage unit of each reduced storage rank every time the first time period expires (i.e., every time 30 seconds, 50 seconds, 60 seconds elapses). For example, after the data files of the royal glory and tremble short videos are all copied to the corresponding dynamic storage units 301, 302, and 303, and 311 and 312, a timer is started, and 3 data files are deleted from each of the dynamic storage units 301, 302, 303, 311, and 312 every time 30 seconds pass. When none of the dynamic storage units 301, 302, and 303, and 311 and 312 have a data file, deletion of the file is stopped.
Preferably, at least one base data file is selected among the (all) plurality of data files associated with each pre-fetching user application of the incremental storage tier, the at least one base data file of each pre-fetching user application of the incremental storage tier is copied from the second memory to the dynamic storage unit of the incremental storage tier allocated for each pre-fetching user application of the incremental storage tier, and a second time period is set and timed for the dynamic storage unit of the incremental storage tier upon completion of the copying, wherein a second predetermined number of data files, other than already copied files, of the plurality of data files associated with each pre-fetching user application of the incremental storage tier are copied from the second memory to the dynamic storage unit of the incremental storage tier allocated for each pre-fetching user application of the incremental storage tier each time period expires until all data files associated with each pre-fetching user application are copied to the corresponding allocated incremental storage tier Dynamic memory cells of the storage level. Wherein the at least one base data file of each pre-fetching user application is at least one data file of the plurality of data files associated with each pre-fetching user application of the incremental storage tier having a firing order above a priority threshold (e.g., a priority threshold of 3, i.e., the firing order for each of the plurality of data files is set to 1, 2, 3, 4, or 5 levels, with the level of the firing order for 1, 2, 3, 4, or 5 levels increasing in order).
Wherein one dynamic storage unit of the incremental storage tier allocated for each pre-fetching user application is capable of accommodating/storing all data file(s) of the corresponding/attributed pre-fetching user application.
FIG. 4 is a logic diagram of an incremental store 400 according to an embodiment of the present invention. The running probability of the Youkou video is 15% and the running probability of the mobile phone panning is 13%, so that the storage level of the Youkou video and the mobile phone panning is an incremental storage level.
The 10 elementary data files are selected from the (all) plurality of data files associated with the kukov video, and these 10 elementary files are copied from the second memory to the dynamic storage unit 401 of the incremental storage tier allocated for the kukov video. The storage capacity of the dynamic storage units 401 is 200M each, and an application name and a storage level are labeled in each dynamic storage unit. A second time period (e.g., 30 seconds, 50 seconds, 60 seconds) is set for the dynamic storage unit 401 of the incremental storage tier after the copying is completed, and a second predetermined number (e.g., 3, 5, 8) of data files (other than the already copied files) of the plurality of data files associated with the use of the kukov video are copied from the second memory to the dynamic storage unit 401 every time the second time period expires (i.e., every time 30 seconds, 50 seconds, 60 seconds elapses).
The 10 base data files are selected from the (all) plurality of data files associated with the mobile phone pan, and the 10 base files are copied from the second memory to the dynamic storage unit 402 of the incremental storage level allocated for the mobile phone pan. The dynamic memory units 402 each have a memory capacity of 300M, and an application name and a memory level are labeled in each dynamic memory unit. A second time period (e.g., 30 seconds, 50 seconds, 60 seconds) is set for the dynamic storage unit 402 of the incremental storage stage after the copying is completed, and a second predetermined number (e.g., 3, 5, 8) of data files (other than the already copied files) of the plurality of data files associated with the mobile phone panning is copied from the second memory to the dynamic storage unit 402 every time the second time period expires (i.e., every time 30 seconds, 50 seconds, 60 seconds elapses).
For example, after all 10 basic data files of the youku video and the mobile phone panning are copied to the corresponding dynamic storage units 401 and 402, timing is started, and every time 60 seconds pass, 8 data files (initially 100 data files) of 90 data files associated with the youku video are copied from the second memory to the dynamic storage unit 401; and copying 8 data files (initially 160 data files) of the 150 data files associated with the mobile phone panning function from the second memory to the dynamic storage unit 401 every time 60 seconds pass. When all 100 data files of the Youkou video are copied into the Olympic dynamic storage unit 401, the copying operation is not performed, and when all 160 data files of the mobile phone Taobao are copied into the Olympic dynamic storage unit 402, the copying operation is not performed
Preferably, at least one data file is selected from the (all) plurality of data files associated with each pre-fetching user application of the quantitative storage tier (the total storage capacity required for the selected at least one data file being smaller than the storage capacity of the dynamic storage units of the quantitative storage tier) in dependence on the storage capacity of the dynamic storage units of the quantitative storage tier allocated for each pre-fetching user application of the quantitative storage tier, and the selected at least one data file is copied from the second memory to the dynamic storage units of the quantitative storage tier allocated for each pre-fetching user application of the quantitative storage tier.
FIG. 5 is a logic diagram of a quantitative storage 500 according to an embodiment of the present invention. Wherein the operation probability of the American group take-out is 10% and the operation probability of the Baidu take-out is 9%, so that the storage level of the American group take-out and the Baidu take-out is a quantitative storage level. At least one data file is selected from (all) the plurality of data files associated with the massa takeaway (the selected at least one data file requiring a storage capacity of less than 20M) according to the storage capacity 20M of the dynamic storage unit of the quantitative storage tier assigned for the massa takeaway, and the selected at least one data file is copied from the second storage to the dynamic storage unit 501. At least one data file is selected from (all) the plurality of data files associated with the massa takeaway (the selected at least one data file requiring less than 10M of storage capacity) based on the storage capacity 10M of the dynamic storage unit of the quantitative storage tier assigned for the hundred degrees takeaway, and the selected at least one data file is copied from the second storage to the dynamic storage unit 511.
Alternatively, wherein selecting at least one data file from the plurality of data files associated with each pre-fetching user application of the quantitative storage tier based on the storage capacity of the dynamic storage unit of the quantitative storage tier allocated for each pre-fetching user application of the quantitative storage tier comprises:
the plurality of data files associated with each pre-fetching user application of the quantitative storage tier are grouped according to a storage capacity of a dynamic storage unit (501 or 511) of the quantitative storage tier allocated for each pre-fetching user application of the quantitative storage tier (American or Baidu takeout) to generate a plurality of file groups, wherein each file group includes at least one data file. Wherein the total storage capacity required for the at least one data file of each file group is smaller than the storage capacity of the dynamic storage unit of the corresponding quantitative storage tier. That is, the total storage capacity of all data files in each file group for the U.S. take-out is less than 20M, and the total storage capacity of all data files in each group for the hundred degree take-out is less than 10M. Different priorities are set for each of the plurality of file groups of the pre-fetching user application of the quantitative storage tier to form a priority queue. For example, the cohesive takeout includes 5 file groups, and the priorities of the 5 file groups are 1, 2, 3, 4, and 5 (where the smaller the number, the higher the priority). The file group at the head of the queue (file group with priority 1) in each priority queue is taken as the current file group and at least one data file in the current file group is copied from the second memory to a dynamic storage unit (e.g., dynamic storage unit 501) of the quantitative storage level allocated for each pre-fetching user application of the quantitative storage level. A third time period (e.g., 30 seconds, 60 seconds, or 90 seconds) is set for each dynamic memory cell (501 or 511) of the quantitative memory rank after replication is complete. Every time the third time period expires (i.e., every time 30 seconds, 60 seconds pass), the next file group in the priority queue (e.g., file group of priority 2) is used as the current file group in order of decreasing priority until there is no next file group. That is, the file groups of priorities 1, 2, 3, 4, and 5 are copied to the dynamic storage unit 501 or 511. It can be seen that when the time is long enough (sufficiently longer than the plurality of third time period periods), for example, the third time period is 90 seconds, and the 450 th second is reached (i.e., when 5 third time periods are reached), all of the 5 file groups are used as the current file group. In this case, the content in the dynamic storage unit (501 or 511) is not being updated, i.e., at least one data file of the file group having the priority of 5 is retained in the dynamic storage unit 501.
At least one data file in the current set of files (possibly a set of files with a priority of 1, 2, 3, 4 or 5) is taken as the at least one data file selected from the plurality of data files associated with each pre-fetching user application of a quantitative storage tier. Wherein the size of each file group (i.e., the size of all data files in the file group) is smaller than the storage space of the dynamic storage unit of the corresponding quantitative storage tier. Alternatively, wherein selecting at least one data file from the plurality of data files associated with each pre-fetching user application of the quantitative storage tier based on the storage capacity of the dynamic storage unit of the quantitative storage tier allocated for each pre-fetching user application of the quantitative storage tier comprises:
the plurality of data files associated with each pre-fetching user application of the quantitative storage tier are grouped according to the storage capacity of the dynamic storage unit (501 or 511) of the quantitative storage tier allocated for each pre-fetching user application of the quantitative storage tier (American takeaway or Baidu takeaway) to generate a plurality of file groups, wherein each file group includes at least one data file wherein the total storage capacity required for the at least one data file of each file group is less than the storage capacity of the dynamic storage unit of the corresponding quantitative storage tier. That is, the total storage capacity of all data files in each file group for the U.S. take-out is less than 20M, and the total storage capacity of all data files in each group for the hundred degree take-out is less than 10M. For example, the beauty group takeout includes 5 file groups, and the 5 file groups have sequence numbers of 1, 2, 3, 4, and 5. Randomly selecting one file group (file group with the sequence number of 5) from the plurality of file groups as a current file group, copying at least one data file in the current file group from the second memory to a dynamic storage unit (for example, the dynamic storage unit 501) of a quantitative storage class allocated for each pre-fetching user application of the quantitative storage class, and setting a third time period (for example, 30 seconds, 60 seconds or 90 seconds) for each dynamic storage unit (501 or 511) of the quantitative storage class after the copying is completed. Every time the third time period expires (i.e., every time 30 seconds, 60 seconds elapses), a next file group (e.g., file group of sequence number 2) is randomly selected from the plurality of file groups as the current file group until there is no next file group. The file groups with sequence numbers 1, 2, 3, 4 and 5 are copied to the dynamic storage unit 501 or 511. It can be seen that when the time is long enough (sufficiently longer than the plurality of third time period periods), for example, the third time period is 90 seconds, and the 450 th second is reached (i.e., when 5 third time periods are reached), all of the 5 file groups are used as the current file group. In this case, the content in the dynamic storage unit (501 or 511) is not updated, i.e. at least one data file of the last file group (e.g. file group 1) selected randomly is kept in the dynamic storage unit 501.
At least one data file in the current set of files (possibly a set of files with sequence number 1, 2, 3, 4 or 5) is taken as the at least one data file selected from the plurality of data files associated with each pre-fetching user application of the quantitative storage tier. Wherein the size of each file group (i.e., the size of all data files in the file group) is smaller than the storage space of the dynamic storage unit of the corresponding quantitative storage tier.
Alternatively, after copying the selected at least one data file from the second memory to the dynamic storage unit (501 or 511) of the quantitative storage tier assigned for each pre-fetched user application (mezzo takeaway or hectometre takeaway) of the quantitative storage tier, setting a third time period (e.g., 30 seconds, 60 seconds, or 90 seconds) and starting timing, whenever the third time period (e.g., 30 seconds, 60 seconds, or 90 seconds) expires, re-selecting at least one data file randomly/sequentially from the plurality of data files associated with each pre-fetched user application of the quantitative storage tier based on the storage capacity (20M or 10M) of the dynamic storage unit (501 or 511) of the quantitative storage tier assigned for each pre-fetched user application (mezzo takeaway or hectometre takeaway) of the quantitative storage tier, copying the re-selected at least one data file from the second memory to each pre-fetched user application (mezzo takeaway or hectometer) of the quantitative storage tier Dynamic memory cells (20M or 10M) of the assigned fixed-amount storage rank. Wherein the data file of the at least one data file reselected by the random selection may be the same as the previously randomly selected data file. The data file of the at least one data file reselected by the sequential selection may not be identical to any data file previously selected in the sequential selection.
Alternatively, wherein selecting at least one data file from the plurality of data files associated with each pre-fetching user application of the quantitative storage tier based on the storage capacity of the dynamic storage unit of the quantitative storage tier allocated for each pre-fetching user application of the quantitative storage tier comprises: step 1, grouping a plurality of data files associated with each pre-fetching user application of the quantitative storage tier according to a storage capacity (20M or 10M) of a dynamic storage unit (501 or 511) of the quantitative storage tier allocated for each pre-fetching user application of the quantitative storage tier (american takeout or hundredth takeout) to generate N (e.g., N ═ 5) file groups, where N is a natural number greater than 1 and each file group includes at least one data file;
step 2, setting different sequence numbers for each file group in the N file groups, wherein the sequence numbers are from 1 to N (for example, 1, 2, 3, 4 and 5);
step 3, taking the file group with the serial number i equal to 1 as the current file group, wherein N is more than or equal to i and is more than 0;
step 4, setting a third time period (for example, 30 seconds, 60 seconds or 90 seconds) for each dynamic storage unit (501 or 511) of the quantitative storage level;
step 5, copying at least one data file included in the current file group from the second memory to a dynamic storage unit of the quantitative storage level allocated to each pre-fetching user application of the quantitative storage level, and starting timing;
step 6, when the third time period expires, determining whether i-N (i.e. whether i-5 holds true) holds true, and if yes, ending; if not, taking the file group with the serial number i being i +1 as the current file group, and performing step 5;
wherein the size of each file group is smaller than the storage capacity (20M or 10M) of the dynamic storage unit (501 or 511) of the quantitative storage tier. That is, the total storage capacity of all data files in each file group for the U.S. take-out is less than 20M, and the total storage capacity of all data files in each group for the hundred degree take-out is less than 10M. For example, the beauty group takeout includes 5 file groups, and the 5 file groups have sequence numbers of 1, 2, 3, 4, and 5.
In step 6, if true, the process ends, meaning that: the file groups with sequence numbers 1, 2, 3, 4 and 5 are copied to the dynamic storage unit 501 or 511, and then the copying is stopped. It can be seen that when the time is long enough (sufficiently longer than the plurality of third time period periods), for example, the third time period is 90 seconds, and the 450 th second is reached (i.e., when 5 third time periods are reached), all of the 5 file groups are used as the current file group. In this case, the content in the dynamic storage unit (501 or 511) is not updated, i.e. at least one data file of the last file group (e.g. file group 5) selected randomly is kept in the dynamic storage unit 501.
Preferably, the (all) plurality of data files associated with each pre-fetching user application of the compressed storage tier are compressed to generate a plurality of compressed data files, the plurality of compressed data files of each pre-fetching user application of the compressed storage tier are copied from the second memory to the dynamic storage unit of the at least one compressed storage tier allocated for each pre-fetching user application of the compressed storage tier.
FIG. 6 is a logic diagram of a compressed store 600 according to an embodiment of the present invention. The running probability of the super-quality aerodyne is 7 percent and the running probability of the super-quality aerodyne of three kingdoms is 6 percent, so the storage level of the royal glory and tremble short video is a compressed storage level. The (all) plurality of data files associated with each pre-fetch user application of the compressed storage tier (either mastership or tribune) are compressed to generate a plurality of compressed data files, the plurality of compressed data files of each pre-fetch user application of the compressed storage tier (mastership or tribune) are copied from the second memory to the dynamic storage units 601, 602, and 603, and 611 and 612 of the at least one compressed storage tier allocated for each pre-fetch user application of the compressed storage tier.
For example, the (all) plurality of data files associated with the mastership aircraft are compressed to generate a plurality of compressed data files, which are copied from the second memory to the dynamic storage units 601, 602, and 603. For example, the (all) plurality of data files associated with the tribune pair are compressed to generate a plurality of compressed data files, and the tribune plurality of compressed data files are copied from the second memory to the dynamic storage units 611 and 612. Preferably, before obtaining the operation statistic file associated with the target mobile terminal in the mobile internet, the method further includes:
the method comprises the steps of responding to a file prefetching request initiated by a user and used for prefetching a file aiming at a data file of a target mobile terminal in the mobile Internet and associated with a user application, and obtaining a dynamic configuration file associated with the file prefetching. The mobile internet includes a plurality of mobile terminals, base stations, content servers, and the like. The method and the device determine the mobile terminal which initiates the file prefetching request or the mobile terminal which requests to perform file prefetching as the target mobile terminal. Furthermore, the number of user applications included or installed in each mobile terminal (including the target mobile terminal) is greater than 4, e.g. 5, 10, 20 user applications. Concepts related to user applications include system applications, and system applications are typically system level applications determined by the operating system of the mobile terminal.
The dynamic profile includes a start address and an end address of a storage area in the first memory for providing a plurality of dynamic storage units. The storage area in which the plurality of dynamic memory cells are provided may be a continuous storage area at an address or a discontinuous storage area at an address in the first memory. The dynamic profile further includes a storage capacity of each of the plurality of dynamic storage units. In general, the storage capacity of each dynamic storage unit may be set according to the size and number of a plurality of data files applied per user within a mobile terminal (target mobile terminal) so that the storage capacity of each dynamic storage unit can accommodate a corresponding at least one data file.
Creating a dynamic index area in a first memory of the target mobile terminal, and creating a plurality of dynamic storage units for storing data files in the first memory according to the dynamic configuration file, wherein the storage capacity of each of the plurality of dynamic storage units is determined according to the dynamic configuration file. Therefore, the method creates a plurality of dynamic storage units for storing the data files in the first storage according to the storage capacity of each dynamic storage unit.
And generating a dynamic index table in the dynamic index area, wherein the dynamic index table comprises a plurality of index entries, and each index entry is used for recording the application identification, the starting address, the ending address, the storage capacity and the storage level of a corresponding dynamic storage unit in a plurality of dynamic storage units. The application identifier is an identifier of a user application to which the dynamic storage unit belongs, the starting address is a starting address of a storage space of the dynamic storage unit, the ending address is an ending address of the storage space of the dynamic storage unit, and the storage capacity is the storage capacity and the storage level of the storage space of the dynamic storage unit. For example, the index entry of the dynamic storage unit includes: payment treasure application, 7000H00, 8FFFH, 8Kb, decrement storage level. When any index entry in the dynamic index table relates to updated data, the corresponding index entry in the dynamic index table is updated with the updated data.
Wherein the first memory is a random access memory and the second memory is a read only memory. And updating the corresponding index entry in the dynamic index table according to the storage level set for the dynamic storage unit. Wherein the first time period is 30 seconds, the second time period is 60 seconds, and wherein the third time period is 90 seconds. Wherein the first predetermined number is 5 and the second predetermined number is 8.
It should be understood that, in the present application, when copying one or more data files from the second memory or other locations to the dynamic storage unit of any storage rank, the original data files in the dynamic storage unit of any storage rank are deleted and the new one or more data files are copied to the dynamic storage unit of any storage rank. Further, when the file prefetching is finished, or according to the user's operation, the dynamic index area or all the dynamic storage units are deleted/reset/cleared.
Fig. 7 is a schematic structural diagram of a system 700 for prefetching a file in a mobile internet according to a time segment according to an embodiment of the present invention. As shown in fig. 7, the system 700 includes: parsing means 701, probability determination means 702, sorting means 703, setting means 704, allocation means 705, pre-fetching means 706 and initialization means 707.
The parsing device 701 acquires an operation statistics file associated with a target mobile terminal in a mobile internet, and parses the operation statistics file to determine operation time statistics information of each user application in a plurality of user applications in the target mobile terminal. The mobile internet includes a plurality of mobile terminals, base stations, content servers, and the like. The method and the device determine the mobile terminal which initiates the file prefetching request or the mobile terminal which requests to perform file prefetching as the target mobile terminal. Furthermore, the number of user applications included or installed in each mobile terminal (including the target mobile terminal) is greater than 4, e.g. 5, 10, 20 user applications. Concepts related to user applications include system applications, and system applications are typically system level applications determined by the operating system of the mobile terminal. The operation statistical file comprises a plurality of data tables, and each data table is allocated to each user application in a plurality of user applications in the target mobile terminal. Each data table includes a plurality of data items, and the content of each data item is four-tuple < application name, foreground operation start time, foreground operation end time, foreground operation accumulated time >. For example, the data items are < royal glory, 6/8/2018 20: 00/2018/6/8/21: 50/110 minutes >.
The data table allocated to each user application is used as the running-time statistical information of each user application, namely, the running-time statistical information of each user application is provided in the form of the data table. The data table allocated for each user application is used to record the runtime information of each user application in real time. That is, when the mobile terminal is running, the operating system or the control device may count and record running information of each user application, for example, an application name, a foreground running start time, a foreground running end time, a foreground running accumulated time, and the like, in real time. Therefore, the data table records the running information of each user application in a statistical time interval from a specific time point in the past to the current time point. Wherein, in the running statistics file, the application stores a predetermined number (e.g., 100, 200, 300) of data items for each user application, or stores data items for each user application within a predetermined length of time (e.g., 10 days, 20 days, 30 days).
The probability determination device 702 divides each time interval T of multiple time intervals in a natural day into multiple time segments according to the application switching frequency F of the user application in the target mobile terminal during operation and the dynamic adjustment factor a preset by the user. When the current running time of the target mobile terminal enters a specific time segment in the multiple time segments, determining the running probability of each user application in the specific time segment according to the running time statistical information of each user application;
the application switching frequency F of the user application in the target mobile terminal during operation is a switching frequency of the user application located in the foreground during operation to be switched to the background during operation of the user application in the target mobile terminal. The application switching frequency F is an average number of times that a user application located in the foreground is switched to the background at runtime during an effective time period (e.g., a time period from 8 am to 12 pm, a time period from 10 am to 10 pm) during each natural day of a first date interval (e.g., 10 natural days, 20 natural days, 30 natural days). In general, the first date interval and the valid period may be set according to user input or by an operating system. In the application, only one application in foreground operation in the target mobile terminal is available at any time, and the switching times are counted when the user application in the foreground is switched to the background after the foreground operation time is greater than 1 minute. That is, if a user application of the foreground is switched to the background when the foreground operating time is 1 minute or less than 1 minute, the switching is not counted as the number of switching times (considered as an interfering operation). According to the mode, the problem that switching times are too large due to frequent switching of foreground running applications caused by misoperation can be solved. Wherein the first date interval includes at least 10 natural days, and the valid time period is a time period from 6 am to 11 pm.
For example, the application switching frequency F of the multiple user applications in the target mobile terminal during running is a switching frequency of the user application located in the foreground during running to be switched to the background during running of the multiple user applications in the target mobile terminal. The application switching frequency F is an effective time period (a time period from 10 am to 10 pm) in each of 10 natural days, that is, 12 hours, and the average switching number of the user application located in the foreground that is switched to the background during the running time. For example, the number of times of switching of the effective time period within each of the 10 natural days is: 10. 15, 20, 9, 21, 16, 12, 22, 10 and 15, then the average number of handovers is 15.
And the user presets a dynamic adjustment factor A according to the processor main frequency of the target mobile terminal and the reading speed of the second memory. Generally, the dynamic adjustment factor a is set larger, e.g., 3, 4, 5, 6 and 8, when the processor of the target mobile terminal has a higher dominant frequency and/or the reading speed of the second memory is faster. In addition, there may be a user or system directly specifying the dynamic adjustment factor, e.g., set to 5.
Dividing each time interval T in a plurality of time intervals into a plurality of time segments according to the application switching frequency F of the user application in the target mobile terminal during operation and a dynamic adjustment factor A preset by the user comprises:
Figure BDA0001769707430000211
where S is the number of time segments in each time interval T. The method and the device determine different time segment numbers according to different values of the application switching frequency F. Each time interval T is 60 minutes, and the start time and the end time of each time interval T are the integer time, for example, the time intervals are 10:00 to 11:00, 11:00 to 12:00, 15:00 to 16:00, etc. in the present application, each time interval T in a plurality of time intervals in a natural day may be divided into a plurality of time segments according to the application switching frequency F of the user application at runtime in the target mobile terminal and the dynamic adjustment factor a preset by the user, instead: each of a plurality of time intervals within one natural day is divided into 3 time segments, 6 time segments, or 10 time segments.
According to the application switching frequency F of the user application in the target mobile terminal during operation and the dynamic adjustment factor A preset by the user, each time interval T in a plurality of time intervals in a natural day is divided into a plurality of time segments, and each time interval T in the plurality of time intervals in the natural day can be divided into 6 time segments.
And when the current running time of the target mobile terminal enters a specific time segment in the plurality of time segments, determining the running probability of each user application in the specific time segment according to the running time statistical information of each user application.
The current running time of the target mobile terminal refers to the current system time of the target mobile terminal, for example, the current time indicated or displayed by the operating system. The current running time of the target mobile terminal enters a specific time segment of the plurality of time segments, for example, when the current running time of the target mobile terminal is 10:00, the specific time segment (10:00 to 10:10) is entered, as shown in fig. 2. FIG. 2 is a logic diagram of an ordered list 200 according to an embodiment of the invention. Wherein, the number of the natural days is 10 from 2018 6/1, 2018 6/2, 203 to 2018 6/9, and 2018 6/10, 205, and the time segments are 10:00 to 10:10 in the morning.
Wherein determining the probability of operation of each user application within a particular time segment based on the runtime statistics of each user application comprises: selecting a second date interval for determining the probability of operation, the second date interval including at least 10 natural days (e.g., 10 natural days, 20 natural days, 30 natural days);
each of the plurality of data items within the runtime statistics of each user application is parsed to determine the effective number of times Ci that each user application is running within a particular time segment within each natural day within the second date interval. Wherein the user application counts as a valid number of times when the running time of the user application in a specific time segment exceeds 20 seconds. For example, if the specific time segment is 10:00 to 10:10 (i.e., the time interval is 10:00 to 11:00 is divided into 6 time segments), the time of operation of the pay bank application in the specific time segment in each of 10 natural days is 10 seconds (operation does not exceed 20 seconds), 60 seconds, 0 seconds (non-operation), 50 seconds, 30 seconds, 90 seconds, 120 seconds, 0 seconds (non-operation), 15 seconds (operation does not exceed 20 seconds), and 60 seconds, and the valid number of times of the pay bank application is 0+1+0+1+1+1+ 0+0+1 equals to 6 times. Wherein i is more than or equal to 1 and less than or equal to Na, and Na is the number of user applications in the target mobile terminal, wherein Na is a natural number and Na is more than 4.
Calculating the total effective times S of all the user applications running in the specific time segment based on the effective times Ci of each user application running in the specific time segments of the second date interval:
Figure BDA0001769707430000221
and calculating the operation probability Pi & Ci/S of each user application in a specific time segment. For example, the pay for use application runs 6 times in a specific time segment (10:00 to 10:10) of 10 natural days, the wechat application runs 10 times in a specific time segment (10:00 to 10:10) of 10 natural days, the naught application runs 3 times in a specific time segment (10:00 to 10:10) of 10 natural days, the wanger glows 1 time in a specific time segment (10:00 to 10:10) of 10 natural days, and the mei group application runs 0 times in a specific time segment (10:00 to 10:10) of 10 natural days, then S is 20 times. The running probabilities for pay Bao, WeChat, Taobao, King glory and beauty applications for a particular time segment (10:00 to 10:10) are 30%, 50%, 15%, 5% and 0%, respectively.
Wherein determining the probability of operation of each user application within a particular time segment based on the runtime statistics of each user application comprises:
selecting a second date interval for determining the probability of operation, the second date interval including at least 10 natural days (e.g., 10 natural days, 20 natural days, 30 natural days);
each of the plurality of data items within the runtime statistics of each user application is parsed to determine a length of time ti for which each user application is running within a particular time segment within each natural day during the second time interval. For example, the specific time segment is 10:00 to 10:10 (i.e., the time interval is 10:00 to 11:00 is divided into 6 time segments), the running time of the pay bank application in the specific time segment in each of 10 natural days is 10 seconds, 60 seconds, 0 seconds, 50 seconds, 30 seconds, 90 seconds, 120 seconds, 0 seconds, 15 seconds, and 60 seconds, and the time length of the pay bank application is 435 seconds. Wherein i is more than or equal to 1 and less than or equal to Na, and Na is the number of user applications in the target mobile terminal, wherein Na is a natural number and Na is more than 4.
Calculating a total time length T of all user applications running in a specific time segment based on the time length ti of each user application running in a plurality of specific time segments of the second date interval:
Figure BDA0001769707430000231
and calculating the operation probability Pi of each user application in a specific time segment, namely ti/T. For example, if the pay for baby application runs 435 seconds in a specific time segment (10:00 to 10:10) of 10 natural days, the wechat application runs 875 seconds in a specific time segment (10:00 to 10:10) of 10 natural days, the naught application runs 500 seconds in a specific time segment (10:00 to 10:10) of 10 natural days, the wang glows 190 seconds in a specific time segment (10:00 to 10:10) of 10 natural days, and the mei group application runs 0 second in a specific time segment (10:00 to 10:10) of 10 natural days, then T equals 2000 seconds. The running probabilities for pay Bao, WeChat, Taobao, King Rong and Mei Gong applications for a particular time segment (10:00 to 10:10) are 21.75%, 43.75%, 25%, 9.5% and 0%, respectively.
In the example shown in fig. 2, as shown in table 206, in a time segment a of 10 natural days from 1 st 6/2018 to 10 th 6/2018, the operation probability of royal glory is 15%, the operation probability of tremble short video is 13.3%, the operation probability of kui video is 12.5%, the operation probability of cell phone panning is 10.8%, the operation probability of mei takeout is 8.3%, the operation probability of Baidu takeout is 7.5%, the operation probability of mastership is 5.8%, the operation probability of tribuna takeout is 5% and the operation probability of lazy english is 0%.
A sorting device 703 configured to set a first adjustment coefficient S for each user application according to the state parameter of the target mobile terminal and set a second adjustment coefficient L for each user application according to the location parameter of the target mobile terminal, obtain a weight ratio of the state parameter and the location parameter, determine a third adjustment coefficient K for each user application according to the first adjustment coefficient S and the second adjustment coefficient L for each user application and the weight ratio, calculate an adjusted operation probability of each user application in a specific time segment based on the third adjustment coefficient K for each user application and the operation probability in the specific time segment, and sort the plurality of user applications in a descending order of the operation probabilities based on the adjusted operation probability of each user application in the specific time segment to generate a sorted list;
the method and the device use the sensor assembly of the target mobile terminal to acquire the state parameters of the target mobile terminal. Wherein the state parameter of the target mobile terminal is a current state of the target mobile terminal. The sensor assembly includes, for example: a brightness sensor, an acceleration sensor, an ambient temperature sensor, etc. The method for acquiring the state parameters of the target mobile terminal by using the sensor component of the target mobile terminal comprises the following steps:
and acquiring the state parameters of the target mobile terminal to be in a strong light state, a soft light state or a weak light state by using a brightness sensor in a sensor assembly of the target mobile terminal. The strong light state is a state that the illumination intensity is greater than 10000 lux; the soft light state is a state in which the illuminance is less than or equal to 10000 lux and the illuminance is greater than or equal to 100 lux; a low light state is less than 100 lux. The bright light state, the soft light state, or the weak light state may refer to illuminance of external light with respect to a display screen of the target mobile terminal.
The setting of the first adjustment coefficient S for each user application according to the state parameter of the target mobile terminal comprises the following steps: in the case that the status parameter of the target mobile terminal is in the highlight status, setting the first adjustment coefficient S applied by each user to be less than 1, for example, 0.8; in case that the state parameter of the target mobile terminal is the soft light state, the first adjustment coefficient S applied by each user is set to be greater than 1, for example, 1.2.
In case the state parameter of the target mobile terminal is in a low light state, the first adjustment coefficient S applied by each user is set to be less than 1, for example 0.9. This is because in both the bright light state and the weak light state, there may be a case where the display effect is not good when the user uses the target mobile terminal to run the user application, and therefore the first adjustment coefficient S is smaller than 1. In the soft light condition, the willingness of the user to use the target mobile terminal to run the user application is greatly enhanced, so the first adjustment coefficient S is greater than 1.
The method for acquiring the state parameters of the target mobile terminal by using the sensor component of the target mobile terminal comprises the following steps:
and acquiring the state parameters of the target mobile terminal by using an acceleration sensor in a sensor assembly of the target mobile terminal, wherein the state parameters are that a display screen moves upwards, the display screen moves downwards, and the display screen moves in the horizontal direction or the vertical direction. Wherein the display screen is facing upwards, for example, the user places the target mobile terminal on a desktop and the display screen side is facing upwards; the display screen is downward, for example, the user places the target mobile terminal on a desktop and the display screen is downward on one side; the horizontal movement is, for example, a user placing the target mobile terminal in a hand or carrying the target mobile terminal with him for horizontal movement (for example, moving in a flat office); the vertical movement is, for example, a user putting the target mobile terminal in a hand or carrying it with him for vertical movement (e.g., taking an elevator).
The setting of the first adjustment coefficient S for each user application according to the state parameter of the target mobile terminal comprises the following steps:
setting the adjustment coefficient applied by each user to be larger than 1, for example 1.2, under the condition that the state parameter of the target mobile terminal is that the display screen faces upwards; setting a first adjustment coefficient S applied by each user to be less than 1, for example, 0.3, under the condition that the state parameter of the target mobile terminal is that the display screen is downward; setting a first adjustment coefficient S applied by each user to be less than 1, for example 0.9, under the condition that the state parameter of the target mobile terminal is moving in the horizontal direction; in case the status parameter of the target mobile terminal is a vertical direction movement, the first adjustment factor S applied by each user is set to be less than 1, for example 0.7.
Since the probability of using the target mobile terminal to run the user application is greater when the user sets the target mobile terminal to have the display screen facing upward, for this reason, the first adjustment coefficient S is greater than 1. Since the probability of using the target mobile terminal to run the user application is small in the case where the user sets the target mobile terminal to have the display screen moved downward, in the horizontal direction, or in the vertical direction, the first adjustment coefficient S is smaller than 1.
The method for acquiring the state parameters of the target mobile terminal by using the sensor component of the target mobile terminal comprises the following steps:
and acquiring the state parameters of the target mobile terminal to be in a hot state, a high-temperature state, a proper state, a low-temperature state or a cold state by utilizing an ambient temperature sensor in a sensor assembly of the target mobile terminal.
The setting of the first adjustment coefficient S for each user application according to the state parameter of the target mobile terminal comprises the following steps:
setting a first adjustment coefficient S applied by each user to be less than 1, for example 0.8, under the condition that the state parameter of the target mobile terminal is in a hot state; setting a first adjustment coefficient S applied by each user to be less than 1, for example 0.9, under the condition that the state parameter of the target mobile terminal is in a high-temperature state; setting a first adjustment coefficient S applied by each user to be larger than 1, for example 1.2, under the condition that the state parameter of the target mobile terminal is in a proper state; setting a first adjustment coefficient S applied by each user to be less than 1, for example 0.9, under the condition that the state parameter of the target mobile terminal is in a low-temperature state; in the case where the state parameter of the target mobile terminal is in a cold state, setting a first adjustment coefficient S applied by each user to be less than 1, for example, 0.6; wherein the hot state is that the air temperature T is more than or equal to 32 ℃; a high temperature state of 32 ℃ to 25 ℃ inclusive, a suitable state of 25 ℃ to 18 ℃ inclusive, a low temperature state of 18 ℃ to 8 ℃ inclusive, or a cold state of 8 ℃ to temperature T inclusive.
Since the probability that the user uses the target mobile terminal to run the user application is large in the case where the ambient temperature is in a suitable state, the first adjustment coefficient S is greater than 1 for this reason. Since the probability that the user uses the target mobile terminal to run the user application is small in the case where the ambient temperature is a hot state, a high temperature state, a suitable state, a low temperature state, or a cold state, for this reason, the first adjustment coefficient S is greater than 1.
It should be understood that the user may set the magnitude of the first adjustment coefficient S in each state as desired. Wherein the location parameter is the current location of the target mobile terminal (the current location obtained by the positioning component).
Setting a second adjustment coefficient L for each user application according to the location parameter of the target mobile terminal comprises:
in case the location parameter of the target mobile terminal is office, the second adjustment factor L applied by each user is set to be less than 1, e.g. 0.8. In case the location parameter of the target mobile terminal is home, the second adjustment factor L applied by each user is set to be greater than 1, e.g. 1.2. In the case where the location parameter of the target mobile terminal is restaurant, the second adjustment coefficient L applied by each user is set to be less than 1, for example, 0.9. In the case where the location parameter of the target mobile terminal is a road (e.g., a highway), the second adjustment coefficient L applied by each user is set to be less than 1, e.g., 0.8. In the case where the location parameter of the target mobile terminal is the subway, the second adjustment coefficient L applied by each user is set to be greater than 1, for example, 1.1.
It should be understood that the user can set the magnitude of the second adjustment coefficient L at each position as desired.
Wherein obtaining the respective weight ratios of the state parameter and the position parameter comprises: reading a weight configuration file in a target mobile terminal, and analyzing the weight configuration file to obtain respective weight proportions of the state parameters and the position parameters; wherein the sum of the respective weight ratios of the state parameter and the position parameter is 1, for example, the weight ratios of the state parameter and the position parameter are 0.5 and 0.5, respectively; the weight ratio of the state parameter to the position parameter is 0.3 and 0.7 respectively; the weight ratio of the state parameter to the position parameter is 0.2 and 0.8 respectively; the weight ratio of the state parameter to the position parameter is 0.7 and 0.3 respectively; the weight ratio of the state parameter to the position parameter is 0.8 and 0.2 respectively; the weight ratio of the state parameter to the position parameter is 0.4 and 0.6 respectively; the weight ratio of the state parameter and the position parameter is 0.6 and 0.4 respectively.
Determining a third adjusting coefficient K applied by each user according to the first adjusting coefficient S and the second adjusting coefficient L applied by each user and the respective weight proportion as follows: the third adjustment coefficient K is the first adjustment coefficient S × W1+ the second adjustment coefficient L × W2, where W1 is the weight ratio of the state parameter, and W2 is the weight ratio of the position parameter, as shown in fig. 2.
Wherein the adjusted operation probability of each user application in a specific time segment is calculated based on the third adjustment coefficient K of each user application and the operation probability in the specific time segment: and taking the product of the third adjustment coefficient K applied by each user and the operation probability in the specific time segment as the adjusted operation probability of each user application in the specific time segment.
In the example shown in fig. 2, as shown in table 206, in a specific time segment a within 10 natural days from 6/1/2018 to 6/10/2018, the operation probability of royal glory is 15%, the operation probability of tremble/short video is 13.3%, the operation probability of kui/cool video is 12.5%, the operation probability of cell phone panning is 10.8%, the operation probability of masu/takeout is 8.3%, the operation probability of bouquet/takeout is 7.5%, the adjusted operation probability of mastership is 5.8%, the operation probability of tribe/takeout is 5%, the operation probability of tribe/minbi is 5%, and the adjusted operation probability of lazy english is 0%.
In the case where the state parameter of the target mobile terminal is in the low light state, the first adjustment coefficient S applied by each user is set to 0.9, and at the same time, in the case where the location parameter of the target mobile terminal is home, the second adjustment coefficient L applied by each user is set to 1.2. The weight ratio of the status parameter is 0.4 and the weight ratio of the location parameter is 0.6. Then, the third adjustment factor F is: the third adjustment coefficient F is the first adjustment coefficient T × W1+ the second adjustment coefficient L × W2, i.e., the third adjustment coefficient F is 0.9 × 0.4+1.2 × 0.6 is 0.36+0.72 is 1.08.
Wherein calculating the adjusted operation probability of each user application in the specific time segment based on the third adjustment coefficient K of each user application and the operation probability in the specific time segment comprises: the product of the third adjustment factor K applied by each user and the operating probability in the specific time segment is used as the adjusted operating probability of each user application in the specific time segment, i.e., the operating probability × 1.08 is the adjusted operating probability.
For ease of calculation, an example of the adjusted operating probability is chosen as 1.2. In the example shown in fig. 2, as shown in table 207, in a specific time segment a of 10 natural days from 6/1/2018 to 6/10/2018, the adjusted operation probability of the royal glory is 18%, the adjusted operation probability of the trembled short video is 16%, the adjusted operation probability of the kukoku video is 15%, the adjusted operation probability of the cell phone naught is 13%, the adjusted operation probability of the meyowa takeout is 10%, the adjusted operation probability of the boudouche takeout is 9%, the adjusted operation probability of the mastership is 7%, the adjusted operation probability of the sanchi takeout is 6%, and the adjusted operation probability of the lazy english is 0%.
Setting means 704 is configured to determine at least one pre-fetch user application of the plurality of user applications that can be pre-loaded from the second memory into the first memory according to the ordered list, and set a storage level for each pre-fetch user application of the at least one pre-fetch user application according to the ordered list, wherein the storage level comprises: a decrement storage stage, an increment storage stage, a quantitative storage stage and a compression storage stage; and setting the storage level of the dynamic storage unit allocated to each pre-fetching user application according to the storage level of each pre-fetching user application.
Wherein determining from the ordered list a plurality of pre-fetch user applications of the plurality of user applications that can be pre-loaded from a second memory into a first memory comprises: when the number of user applications in the ordered list having an operating probability greater than the pre-fetch threshold (e.g., 5%, 10%) is greater than 0 (e.g., 10), determining the user applications in the ordered list having an operating probability greater than the pre-fetch threshold as pre-fetch user applications that can be pre-loaded from the second memory into the first memory to determine at least one pre-fetch user application; when the number of user applications in the ordered list having a running probability greater than the pre-fetch threshold (e.g., 5%, 10%) is equal to 0, all user applications (e.g., 15) in the ordered list are determined as pre-fetched user applications that can be pre-loaded from the second memory into the first memory to determine at least one pre-fetched user application.
Wherein setting a storage level for each of at least one pre-fetch user application according to the ordered list comprises: setting a storage level of the pre-fetched user applications in the ordered list having an operational probability greater than a high probability threshold (e.g., 15%) to a reduced storage level; setting a storage level of the pre-fetch user application in the sorted list having a probability of operation less than or equal to a high probability threshold (e.g., 15%) and greater than a medium probability threshold (e.g., 12%) as an incremental storage level; setting a storage level of the pre-fetched user applications in the sorted list having a probability of operation less than or equal to a medium probability threshold (e.g., 12%) and greater than a low probability threshold (e.g., 8%) as a quantitative storage level; setting a storage level of the pre-fetched user applications in the sorted list having an operating probability less than or equal to a low probability threshold (e.g., 8%) as a compressed storage level. Wherein the pre-fetching of user applications has a running probability of more than 5%.
The allocation means 705 is adapted to allocate at least one dynamic memory location for each pre-fetch user application of the reduced memory rank, at least one dynamic memory location for each pre-fetch user application of the compressed memory rank, one dynamic memory location for each pre-fetch user application of the increased memory rank and one dynamic memory location for each pre-fetch user application of the quantitative memory rank. Wherein the storage capacity of each of the at least one dynamic storage unit allocated for each of the pre-fetched user applications of the reduced storage tier may be the same or different, and the storage capacity of each of the at least one dynamic storage unit allocated for each of the pre-fetched user applications of the compressed storage tier may be the same or different.
The total storage capacity of the at least one dynamic storage unit allocated for the pre-fetching user application of each reduced storage tier is capable of accommodating all data files of the pre-fetching user application of the corresponding reduced storage tier. The total storage capacity of the at least one dynamic storage unit allocated for the pre-fetching user application of each compressed storage tier is capable of accommodating all compressed data files of the pre-fetching user application of the corresponding compressed storage tier. One dynamic memory unit is allocated for each pre-fetching user application of the incremental storage tier that can accommodate all data files of the pre-fetching user application of the corresponding incremental storage tier. One dynamic memory unit is allocated to each pre-fetching user application of a quantitative memory rank to be able to accommodate all data files of the pre-fetching user application of the corresponding quantitative memory rank.
The prefetching means 706 is configured to perform file prefetching for the data file associated with each prefetching user application from the second memory according to the storage level of the prefetching user application, and includes:
copying a plurality of data files associated with each pre-fetch user application of the reduced storage tier from the second memory to the dynamic storage unit of at least one reduced storage tier allocated for each pre-fetch user application of the reduced storage tier, setting a first time period for the dynamic storage unit of each reduced storage tier upon completion of the copying and starting timing, deleting a first predetermined number of data files in the dynamic storage unit of each reduced storage tier each time the first time period expires;
selecting at least one base data file among the plurality of data files associated with each pre-fetching user application of the incremental storage tier, copying the at least one base data file of each pre-fetching user application of the incremental storage tier from the second memory to the dynamic storage unit of the incremental storage tier allocated for each pre-fetching user application of the incremental storage tier, setting a second time period and starting timing for the dynamic storage unit of the incremental storage tier upon completion of the copying, wherein a second predetermined number of data files among the plurality of data files associated with each pre-fetching user application of the incremental storage tier are copied from the second memory to the dynamic storage unit of the incremental storage tier allocated for each pre-fetching user application of the incremental storage tier each time the second time period expires;
selecting at least one data file from the plurality of data files associated with each pre-fetch user application of the quantitative storage tier based on the storage capacity of the dynamic storage unit of the quantitative storage tier assigned for each pre-fetch user application of the quantitative storage tier and copying the selected at least one data file from the second memory to the dynamic storage unit of the quantitative storage tier assigned for each pre-fetch user application of the quantitative storage tier; and
the method further includes compressing the plurality of data files associated with each pre-fetch user application of the compressed storage tier to generate a plurality of compressed data files, copying the plurality of compressed data files of each pre-fetch user application of the compressed storage tier from the second memory to a dynamic storage unit of at least one compressed storage tier allocated for each pre-fetch user application of the compressed storage tier.
The initialization device 707 is configured to, in response to a file prefetching request initiated by a user and used for performing file prefetching on a data file associated with a user application of a target mobile terminal in a mobile internet, obtain a dynamic configuration file associated with the file prefetching;
creating a dynamic index area in a first memory of the target mobile terminal, and creating a plurality of dynamic storage units for storing data files in the first memory according to the dynamic configuration file, wherein the storage capacity of each of the plurality of dynamic storage units is determined according to the dynamic configuration file; and
and generating a dynamic index table in the dynamic index area, wherein the dynamic index table comprises a plurality of index entries, and each index entry is used for recording the application identification, the starting address, the ending address, the storage capacity and the storage level of a corresponding dynamic storage unit in a plurality of dynamic storage units.

Claims (10)

1. A method for file prefetching in a mobile internet according to time segmentation, the method comprising:
acquiring an operation statistical file associated with a target mobile terminal in a mobile internet, and analyzing the operation statistical file to determine operation time statistical information of each user application in a plurality of user applications in the target mobile terminal;
dividing each time interval T in a plurality of time intervals in a natural day into a plurality of time segments according to the application switching frequency F of the user application in the target mobile terminal during operation and a dynamic adjustment factor A preset by the user, and determining the operation probability of each user application in a specific time segment according to the operation time statistical information of each user application when the current operation time of the target mobile terminal enters the specific time segment in the plurality of time segments;
setting a first adjustment coefficient S for each user application according to the state parameter of the target mobile terminal and setting a second adjustment coefficient L for each user application according to the position parameter of the target mobile terminal, acquiring the weight proportion of the state parameter and the position parameter, determining a third adjustment coefficient K of each user application according to the first adjustment coefficient S, the second adjustment coefficient L and the weight proportion of each user application, calculating the adjusted operation probability of each user application in a specific time segment based on the third adjustment coefficient K of each user application and the operation probability in the specific time segment, and performing descending order of the operation probabilities on a plurality of user applications based on the adjusted operation probability of each user application in the specific time segment to generate an ordered list;
determining at least one of the plurality of user applications that can be preloaded from the second memory into the first memory according to the ordered list, and setting a storage level for each of the at least one pre-fetching user application according to the ordered list, wherein the storage level comprises: a decrement storage stage, an increment storage stage, a quantitative storage stage and a compression storage stage;
allocating at least one dynamic memory unit for each pre-fetch user application of the decrement storage stage, allocating at least one dynamic memory unit for each pre-fetch user application of the compression storage stage, allocating one dynamic memory unit for each pre-fetch user application of the increment storage stage and allocating one dynamic memory unit for each pre-fetch user application of the quantitive storage stage;
setting a storage level for a dynamic storage unit allocated to each pre-fetching user application according to the storage level of each pre-fetching user application;
file prefetching a data file associated with each prefetched user application from the second memory according to the storage level of the prefetched user application, comprising:
copying a plurality of data files associated with each pre-fetch user application of the reduced storage tier from the second memory to the dynamic storage unit of at least one reduced storage tier allocated for each pre-fetch user application of the reduced storage tier, setting a first time period for the dynamic storage unit of each reduced storage tier upon completion of the copying and starting timing, deleting a first predetermined number of data files in the dynamic storage unit of each reduced storage tier each time the first time period expires;
selecting at least one base data file among the plurality of data files associated with each pre-fetching user application of the incremental storage tier, copying the at least one base data file of each pre-fetching user application of the incremental storage tier from the second memory to the dynamic storage unit of the incremental storage tier allocated for each pre-fetching user application of the incremental storage tier, setting a second time period and starting timing for the dynamic storage unit of the incremental storage tier upon completion of the copying, wherein a second predetermined number of data files among the plurality of data files associated with each pre-fetching user application of the incremental storage tier are copied from the second memory to the dynamic storage unit of the incremental storage tier allocated for each pre-fetching user application of the incremental storage tier each time the second time period expires;
selecting at least one data file from the plurality of data files associated with each pre-fetch user application of the quantitative storage tier based on the storage capacity of the dynamic storage unit of the quantitative storage tier assigned for each pre-fetch user application of the quantitative storage tier and copying the selected at least one data file from the second memory to the dynamic storage unit of the quantitative storage tier assigned for each pre-fetch user application of the quantitative storage tier; and
the method further includes compressing the plurality of data files associated with each pre-fetch user application of the compressed storage tier to generate a plurality of compressed data files, copying the plurality of compressed data files of each pre-fetch user application of the compressed storage tier from the second memory to a dynamic storage unit of at least one compressed storage tier allocated for each pre-fetch user application of the compressed storage tier.
2. The method of claim 1, comprising a plurality of mobile terminals within the mobile internet and determining a mobile terminal initiating a file pre-fetch request as a target mobile terminal, wherein the number of user applications is greater than 4; the operation statistical file comprises a plurality of data tables, one data table is allocated to each user application in a plurality of user applications in the target mobile terminal, each data table comprises a plurality of data items, and the content of each data item is a quadruple < application name, foreground operation starting time, foreground operation ending time and foreground operation accumulated time >; the data table allocated to each user application is used as the running time statistical information of each user application, and the data table allocated to each user application is used for recording the running time information of each user application in real time; in the operation statistical file, storing a preset number of data items for each user application, or storing a preset number of data items in a natural day or a preset time length for each user application; wherein the predetermined number of natural days is 10 natural days, 20 natural days, or 30 natural days, and wherein the predetermined time length is 240 hours, 480 hours, or 720 hours.
3. The method according to any of claims 1-2, wherein the application switching frequency F of the user application at runtime in the target mobile terminal is a switching frequency of the user application located in foreground being switched to background at runtime when the user application is running in the target mobile terminal, the application switching frequency F being an average number of times that the user application located in foreground is switched to background at runtime during an effective time period within each natural day of a first date interval, wherein the number of times that the user application located in foreground is switched to background after more than 1 minute of running time is counted and the first date interval comprises at least 10 natural days, wherein the effective time period is a time period from 6 am to 11 pm; the user presets a dynamic adjustment factor A according to the main frequency of the processor of the target mobile terminal and the reading speed of the second memory, wherein the dynamic adjustment factor is 5; dividing each time interval T in a plurality of time intervals into a plurality of time segments according to the application switching frequency F of the user application in the target mobile terminal during operation and a dynamic adjustment factor A preset by the user comprises:
Figure FDA0003157325000000021
wherein S is the number of time segments in each time interval T; wherein each time interval T is 60 minutes and the start time and the end time of each time interval T are the integer time; wherein each time interval T is divided into 3 time segments, 6 time segments or 10 time segments;
wherein determining the probability of operation of each user application within a particular time segment based on the runtime statistics of each user application comprises:
selecting a second date interval for determining a probability of operation, the second date interval comprising at least 10 natural days;
analyzing each data item in the plurality of data items in the running time statistical information of each user application to determine the effective times Ci of running of each user application in a specific time segment in each natural day in a second date interval, wherein i is more than or equal to 1 and less than or equal to Na, Na is the number of user applications in the target mobile terminal, and Na is a natural number and is more than 4;
calculating the total effective times S of all the user applications running in the specific time segment based on the effective times Ci of each user application running in the specific time segments of the second date interval:
Figure FDA0003157325000000022
calculating the operation probability Pi (Ci/S) of each user application in a specific time segment; wherein the user application counts as a valid number of times when the running time of the user application in a specific time segment exceeds 20 seconds.
4. The method according to any of claims 1-2, wherein the status parameter is a current status of the target mobile terminal; wherein setting a first adjustment coefficient S for each user application according to the state parameter of the target mobile terminal comprises:
under the condition that the state parameter of the target mobile terminal is in a highlight state, setting a first adjusting coefficient S applied by each user to be smaller than 1;
under the condition that the state parameter of the target mobile terminal is in a soft light state, setting a first adjustment coefficient S applied by each user to be greater than 1; and
under the condition that the state parameter of the target mobile terminal is in a low-light state, setting a first adjustment coefficient S applied by each user to be smaller than 1;
or, a first adjustment coefficient S is set for each user application according to the state parameter of the target mobile terminal:
setting a first adjustment coefficient S applied by each user to be larger than 1 under the condition that the state parameter of the target mobile terminal is that the display screen faces upwards;
setting a first adjusting coefficient S applied by each user to be less than 1 under the condition that the state parameter of the target mobile terminal is that the display screen is downward;
under the condition that the state parameter of the target mobile terminal is moving in the horizontal direction, setting a first adjusting coefficient S applied by each user to be smaller than 1;
under the condition that the state parameter of the target mobile terminal is moving in the vertical direction, setting a first adjustment coefficient S applied by each user to be smaller than 1;
or, the setting of the first adjustment coefficient S for each user application according to the state parameter of the target mobile terminal includes:
under the condition that the state parameter of the target mobile terminal is in a hot state, setting a first adjusting coefficient S applied by each user to be less than 1;
under the condition that the state parameter of the target mobile terminal is in a high-temperature state, setting a first adjustment coefficient S applied by each user to be less than 1;
under the condition that the state parameter of the target mobile terminal is in a proper state, setting a first adjusting coefficient S applied by each user to be larger than 1;
under the condition that the state parameter of the target mobile terminal is in a low-temperature state, setting a first adjustment coefficient S applied by each user to be less than 1;
setting a first adjustment coefficient S applied by each user to be less than 1 under the condition that the state parameter of the target mobile terminal is in a cold state;
wherein the hot state is that the air temperature T is more than or equal to 32 ℃; the high temperature state is 32 ℃ and the air temperature T is more than or equal to 25 ℃, the suitable state is 25 ℃ and the air temperature T is more than or equal to 18 ℃, the low temperature state is 18 ℃ and the air temperature T is more than or equal to 8 ℃ or the cold state is 8 ℃ and the air temperature T;
the position parameter is the current position of the target mobile terminal; setting a second adjustment coefficient L for each user application according to the location parameter of the target mobile terminal comprises:
setting a second adjustment coefficient L applied by each user to be less than 1 under the condition that the position parameter of the target mobile terminal is an office;
setting a second adjustment coefficient L applied by each user to be larger than 1 under the condition that the position parameter of the target mobile terminal is home;
setting a second adjustment coefficient L applied by each user to be less than 1 in the case that the location parameter of the target mobile terminal is restaurant;
setting a second adjustment coefficient L applied by each user to be less than 1 under the condition that the position parameter of the target mobile terminal is a road; and
and under the condition that the position parameter of the target mobile terminal is the subway, setting the second adjustment coefficient L applied by each user to be more than 1.
5. The method of any of claims 1-2, wherein obtaining the weight ratio of the state parameter and the location parameter comprises:
reading a weight configuration file in a target mobile terminal, and analyzing the weight configuration file to obtain the weight proportion of the state parameter and the position parameter; the sum of the weight ratios of the state parameter and the position parameter is 1, and the weight ratios of the state parameter and the position parameter are 0.5 and 0.5 respectively; the weight ratio of the state parameter to the position parameter is 0.3 and 0.7 respectively; the weight ratio of the state parameter to the position parameter is 0.2 and 0.8 respectively; the weight ratio of the state parameter to the position parameter is 0.7 and 0.3 respectively; the weight ratio of the state parameter to the position parameter is 0.8 and 0.2 respectively; the weight ratio of the state parameter to the position parameter is 0.4 and 0.6 respectively; the weight ratio of the state parameter to the position parameter is 0.6 and 0.4 respectively; determining a third adjustment coefficient K applied by each user according to the first adjustment coefficient S and the second adjustment coefficient L applied by each user and the weight proportion, wherein the third adjustment coefficient K applied by each user is:
the third adjustment coefficient K is the first adjustment coefficient sxw 1+ the second adjustment coefficient lxw 2, where W1 is the weight ratio of the sum of the state parameters, and W2 is the weight ratio of the position parameters;
calculating an adjusted operation probability of each user application in a specific time segment based on the third adjustment coefficient K of each user application and the operation probability in the specific time segment comprises:
and taking the product of the third adjustment coefficient K applied by each user and the operation probability in the specific time segment as the adjusted operation probability of each user application in the specific time segment.
6. A system for file prefetching in a mobile internet based on time segmentation, the system comprising:
the analysis device is used for acquiring an operation statistical file associated with a target mobile terminal in a mobile internet, and analyzing the operation statistical file to determine the operation time statistical information of each user application in a plurality of user applications in the target mobile terminal;
the probability determining device divides each time interval T in a plurality of time intervals in a natural day into a plurality of time segments according to the application switching frequency F of the user application in the target mobile terminal during operation and a dynamic adjustment factor A preset by the user, and determines the operation probability of each user application in a specific time segment according to the operation time statistical information of each user application when the current operation time of the target mobile terminal enters the specific time segment in the plurality of time segments;
a sorting device, which sets a first adjusting coefficient S for each user application according to the state parameter of the target mobile terminal and a second adjusting coefficient L for each user application according to the position parameter of the target mobile terminal, obtains the weight proportion of the state parameter and the position parameter, determines a third adjusting coefficient K for each user application according to the first adjusting coefficient S and the second adjusting coefficient L of each user application and the weight proportion, calculates the adjusted operation probability of each user application in a specific time segment based on the third adjusting coefficient K of each user application and the operation probability in the specific time segment, and performs descending sorting of the operation probabilities of a plurality of user applications based on the adjusted operation probability of each user application in the specific time segment to generate a sorted list;
setting means for determining at least one pre-fetch user application of the plurality of user applications that can be pre-loaded from the second memory into the first memory according to the ordered list, and setting a storage level for each pre-fetch user application of the at least one pre-fetch user application according to the ordered list, wherein the storage level comprises: a decrement storage stage, an increment storage stage, a quantitative storage stage and a compression storage stage; setting a storage level for a dynamic storage unit allocated to each pre-fetching user application according to the storage level of each pre-fetching user application;
the allocation device allocates at least one dynamic storage unit for each pre-fetching user application of the decrement storage level, allocates at least one dynamic storage unit for each pre-fetching user application of the compression storage level, allocates one dynamic storage unit for each pre-fetching user application of the increment storage level and allocates one dynamic storage unit for each pre-fetching user application of the quantitative storage level;
prefetching means for file prefetching the data files associated with each prefetched user application from the second memory according to the storage level of the prefetched user application, comprising:
copying a plurality of data files associated with each pre-fetch user application of the reduced storage tier from the second memory to the dynamic storage unit of at least one reduced storage tier allocated for each pre-fetch user application of the reduced storage tier, setting a first time period for the dynamic storage unit of each reduced storage tier upon completion of the copying and starting timing, deleting a first predetermined number of data files in the dynamic storage unit of each reduced storage tier each time the first time period expires;
selecting at least one base data file among the plurality of data files associated with each pre-fetching user application of the incremental storage tier, copying the at least one base data file of each pre-fetching user application of the incremental storage tier from the second memory to the dynamic storage unit of the incremental storage tier allocated for each pre-fetching user application of the incremental storage tier, setting a second time period and starting timing for the dynamic storage unit of the incremental storage tier upon completion of the copying, wherein a second predetermined number of data files among the plurality of data files associated with each pre-fetching user application of the incremental storage tier are copied from the second memory to the dynamic storage unit of the incremental storage tier allocated for each pre-fetching user application of the incremental storage tier each time the second time period expires;
selecting at least one data file from the plurality of data files associated with each pre-fetch user application of the quantitative storage tier based on the storage capacity of the dynamic storage unit of the quantitative storage tier assigned for each pre-fetch user application of the quantitative storage tier and copying the selected at least one data file from the second memory to the dynamic storage unit of the quantitative storage tier assigned for each pre-fetch user application of the quantitative storage tier; and
the method further includes compressing the plurality of data files associated with each pre-fetch user application of the compressed storage tier to generate a plurality of compressed data files, copying the plurality of compressed data files of each pre-fetch user application of the compressed storage tier from the second memory to a dynamic storage unit of at least one compressed storage tier allocated for each pre-fetch user application of the compressed storage tier.
7. The system of claim 6, comprising a plurality of mobile terminals within the mobile internet and determining a mobile terminal that initiated a file pre-fetch request as a target mobile terminal, wherein the number of user applications is greater than 4; the operation statistical file comprises a plurality of data tables, one data table is allocated to each user application in a plurality of user applications in the target mobile terminal, each data table comprises a plurality of data items, and the content of each data item is a quadruple < application name, foreground operation starting time, foreground operation ending time and foreground operation accumulated time >; the data table allocated to each user application is used as the running time statistical information of each user application, and the data table allocated to each user application is used for recording the running time information of each user application in real time; in the operation statistical file, storing a preset number of data items for each user application, or storing a preset number of data items in a natural day or a preset time length for each user application; wherein the predetermined number of natural days is 10 natural days, 20 natural days, or 30 natural days, and wherein the predetermined time length is 240 hours, 480 hours, or 720 hours.
8. The system according to any of claims 6-7, wherein the application switching frequency F of the user application at runtime in the target mobile terminal is a switching frequency of the user application located in foreground being switched to background at runtime when the user application is running in the target mobile terminal, the application switching frequency F is an average switching number of the user application located in foreground being switched to background at runtime within a valid period within each natural day of a first date interval, wherein the switching number is counted when the user application located in foreground is switched to background after more than 1 minute of running time and the first date interval includes at least 10 natural days, wherein the valid period is a period from 6 am to 11 pm; the user presets a dynamic adjustment factor A according to the main frequency of the processor of the target mobile terminal and the reading speed of the second memory, wherein the dynamic adjustment factor is 5; dividing each time interval T in a plurality of time intervals into a plurality of time segments according to the application switching frequency F of the user application in the target mobile terminal during operation and a dynamic adjustment factor A preset by the user comprises:
Figure FDA0003157325000000051
wherein S is the number of time segments in each time interval T; wherein each time interval T is 60 minutes and the start time and the end time of each time interval T are the integer time; wherein each time interval T is divided into 3 time segments, 6 time segments or 10 time segments; wherein determining the probability of operation of each user application within a particular time segment based on the runtime statistics of each user application comprises:
selecting a second date interval for determining a probability of operation, the second date interval comprising at least 10 natural days;
analyzing each data item in the plurality of data items in the running time statistical information of each user application to determine the effective times Ci of running of each user application in a specific time segment in each natural day in a second date interval, wherein i is more than or equal to 1 and less than or equal to Na, Na is the number of user applications in the target mobile terminal, and Na is a natural number and is more than 4;
calculating the total effective times S of all the user applications running in the specific time segment based on the effective times Ci of each user application running in the specific time segments of the second date interval:
Figure FDA0003157325000000061
calculating the operation probability Pi (Ci/S) of each user application in a specific time segment; wherein the user application counts as a valid number of times when the running time of the user application in a specific time segment exceeds 20 seconds.
9. The system according to any of claims 6-7, wherein the status parameter is a current status of the target mobile terminal; wherein setting a first adjustment coefficient S for each user application according to the state parameter of the target mobile terminal comprises:
under the condition that the state parameter of the target mobile terminal is in a highlight state, setting a first adjusting coefficient S applied by each user to be smaller than 1;
under the condition that the state parameter of the target mobile terminal is in a soft light state, setting a first adjustment coefficient S applied by each user to be greater than 1; and
under the condition that the state parameter of the target mobile terminal is in a low-light state, setting a first adjustment coefficient S applied by each user to be smaller than 1;
or, a first adjustment coefficient S is set for each user application according to the state parameter of the target mobile terminal:
setting a first adjustment coefficient S applied by each user to be larger than 1 under the condition that the state parameter of the target mobile terminal is that the display screen faces upwards;
setting a first adjusting coefficient S applied by each user to be less than 1 under the condition that the state parameter of the target mobile terminal is that the display screen is downward;
under the condition that the state parameter of the target mobile terminal is moving in the horizontal direction, setting a first adjusting coefficient S applied by each user to be smaller than 1;
under the condition that the state parameter of the target mobile terminal is moving in the vertical direction, setting a first adjustment coefficient S applied by each user to be smaller than 1;
or, the setting of the first adjustment coefficient S for each user application according to the state parameter of the target mobile terminal includes:
under the condition that the state parameter of the target mobile terminal is in a hot state, setting a first adjusting coefficient S applied by each user to be less than 1;
under the condition that the state parameter of the target mobile terminal is in a high-temperature state, setting a first adjustment coefficient S applied by each user to be less than 1;
under the condition that the state parameter of the target mobile terminal is in a proper state, setting a first adjusting coefficient S applied by each user to be larger than 1;
under the condition that the state parameter of the target mobile terminal is in a low-temperature state, setting a first adjustment coefficient S applied by each user to be less than 1;
setting a first adjustment coefficient S applied by each user to be less than 1 under the condition that the state parameter of the target mobile terminal is in a cold state;
wherein the hot state is that the air temperature T is more than or equal to 32 ℃; the high temperature state is 32 ℃ and the air temperature T is more than or equal to 25 ℃, the suitable state is 25 ℃ and the air temperature T is more than or equal to 18 ℃, the low temperature state is 18 ℃ and the air temperature T is more than or equal to 8 ℃ or the cold state is 8 ℃ and the air temperature T;
the position parameter is the current position of the target mobile terminal; setting a second adjustment coefficient L for each user application according to the location parameter of the target mobile terminal comprises:
setting a second adjustment coefficient L applied by each user to be less than 1 under the condition that the position parameter of the target mobile terminal is an office;
setting a second adjustment coefficient L applied by each user to be larger than 1 under the condition that the position parameter of the target mobile terminal is home;
setting a second adjustment coefficient L applied by each user to be less than 1 in the case that the location parameter of the target mobile terminal is restaurant;
setting a second adjustment coefficient L applied by each user to be less than 1 under the condition that the position parameter of the target mobile terminal is a road; and
and under the condition that the position parameter of the target mobile terminal is the subway, setting the second adjustment coefficient L applied by each user to be more than 1.
10. The system of any of claims 6-7, wherein obtaining a weight ratio of the state parameter and the location parameter comprises:
reading a weight configuration file in a target mobile terminal, and analyzing the weight configuration file to obtain the weight proportion of the state parameter and the position parameter; the sum of the weight ratios of the state parameter and the position parameter is 1, and the weight ratios of the state parameter and the position parameter are 0.5 and 0.5 respectively; the weight ratio of the state parameter to the position parameter is 0.3 and 0.7 respectively; the weight ratio of the state parameter to the position parameter is 0.2 and 0.8 respectively; the weight ratio of the state parameter to the position parameter is 0.7 and 0.3 respectively; the weight ratio of the state parameter to the position parameter is 0.8 and 0.2 respectively; the weight ratio of the state parameter to the position parameter is 0.4 and 0.6 respectively; the weight ratio of the state parameter to the position parameter is 0.6 and 0.4 respectively; determining a third adjustment coefficient K applied by each user according to the first adjustment coefficient S and the second adjustment coefficient L applied by each user and the weight proportion, wherein the third adjustment coefficient K applied by each user is:
the third adjustment coefficient K is the first adjustment coefficient sxw 1+ the second adjustment coefficient lxw 2, where W1 is the weight ratio of the sum of the state parameters, and W2 is the weight ratio of the position parameters; calculating an adjusted operation probability of each user application in a specific time segment based on the third adjustment coefficient K of each user application and the operation probability in the specific time segment comprises:
and taking the product of the third adjustment coefficient K applied by each user and the operation probability in the specific time segment as the adjusted operation probability of each user application in the specific time segment.
CN201810943819.XA 2018-08-18 2018-08-18 Method and system for prefetching files in mobile internet according to time segments Active CN109189737B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810943819.XA CN109189737B (en) 2018-08-18 2018-08-18 Method and system for prefetching files in mobile internet according to time segments

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810943819.XA CN109189737B (en) 2018-08-18 2018-08-18 Method and system for prefetching files in mobile internet according to time segments

Publications (2)

Publication Number Publication Date
CN109189737A CN109189737A (en) 2019-01-11
CN109189737B true CN109189737B (en) 2021-11-26

Family

ID=64918365

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810943819.XA Active CN109189737B (en) 2018-08-18 2018-08-18 Method and system for prefetching files in mobile internet according to time segments

Country Status (1)

Country Link
CN (1) CN109189737B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521041A (en) * 2011-12-14 2012-06-27 华为终端有限公司 Method for processing application program and wireless handheld device
CN102999368A (en) * 2012-12-14 2013-03-27 广东欧珀移动通信有限公司 Program pre-starting method and device in mobile terminal and mobile terminal
CN103186566A (en) * 2011-12-28 2013-07-03 中国移动通信集团河北有限公司 Data classification storage method, device and system
CN104503756A (en) * 2014-12-22 2015-04-08 北京奇虎科技有限公司 Application acceleration method and device
CN105930213A (en) * 2016-04-22 2016-09-07 北京小米移动软件有限公司 Application running method and apparatus
CN105939416A (en) * 2016-05-30 2016-09-14 努比亚技术有限公司 Mobile terminal and application prestart method thereof
CN106227844A (en) * 2016-07-27 2016-12-14 深圳市金立通信设备有限公司 The method of a kind of application recommendation and terminal
CN106570108A (en) * 2016-11-01 2017-04-19 中国科学院计算机网络信息中心 Adaptive reading optimization method and system for mass data under cloud storage environment
CN107544822A (en) * 2017-07-26 2018-01-05 北京珠穆朗玛移动通信有限公司 Application program pre-add support method, mobile terminal and the device with store function
CN107783801A (en) * 2017-11-06 2018-03-09 广东欧珀移动通信有限公司 Application program forecast model is established, preloads method, apparatus, medium and terminal
CN107944277A (en) * 2017-11-21 2018-04-20 广东欧珀移动通信有限公司 Using the control method of startup, device, storage medium and intelligent terminal
CN108363593A (en) * 2018-05-21 2018-08-03 Oppo广东移动通信有限公司 Application program preloads method, apparatus, storage medium and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101872570B1 (en) * 2012-10-08 2018-06-28 패트릭 순-시옹 Distributed storage systems and methods

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521041A (en) * 2011-12-14 2012-06-27 华为终端有限公司 Method for processing application program and wireless handheld device
CN103186566A (en) * 2011-12-28 2013-07-03 中国移动通信集团河北有限公司 Data classification storage method, device and system
CN102999368A (en) * 2012-12-14 2013-03-27 广东欧珀移动通信有限公司 Program pre-starting method and device in mobile terminal and mobile terminal
CN104503756A (en) * 2014-12-22 2015-04-08 北京奇虎科技有限公司 Application acceleration method and device
CN105930213A (en) * 2016-04-22 2016-09-07 北京小米移动软件有限公司 Application running method and apparatus
CN105939416A (en) * 2016-05-30 2016-09-14 努比亚技术有限公司 Mobile terminal and application prestart method thereof
CN106227844A (en) * 2016-07-27 2016-12-14 深圳市金立通信设备有限公司 The method of a kind of application recommendation and terminal
CN106570108A (en) * 2016-11-01 2017-04-19 中国科学院计算机网络信息中心 Adaptive reading optimization method and system for mass data under cloud storage environment
CN107544822A (en) * 2017-07-26 2018-01-05 北京珠穆朗玛移动通信有限公司 Application program pre-add support method, mobile terminal and the device with store function
CN107783801A (en) * 2017-11-06 2018-03-09 广东欧珀移动通信有限公司 Application program forecast model is established, preloads method, apparatus, medium and terminal
CN107944277A (en) * 2017-11-21 2018-04-20 广东欧珀移动通信有限公司 Using the control method of startup, device, storage medium and intelligent terminal
CN108363593A (en) * 2018-05-21 2018-08-03 Oppo广东移动通信有限公司 Application program preloads method, apparatus, storage medium and terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
列存储数据区级压缩模式与压缩策略选择方法;王梅等;《计算机学报》;20100831;第33卷(第8期);第1523-1530页 *

Also Published As

Publication number Publication date
CN109189737A (en) 2019-01-11

Similar Documents

Publication Publication Date Title
CN108028054B (en) Synchronizing audio and video components of an automatically generated audio/video presentation
US10739995B2 (en) Method of consolidate data streams for multi-stream enabled SSDs
US20120054162A1 (en) Likelihood-based storage management
US11816172B2 (en) Data processing method, server, and computer storage medium
WO2018049859A1 (en) Method and device for controlling usage of data allowance
US20020065833A1 (en) System and method for evaluating changes in performance arising from reallocation of files among disk storage units
CN102307234A (en) Resource retrieval method based on mobile terminal
WO2022233272A1 (en) Method and apparatus for eliminating cache memory block, and electronic device
CN111443867B (en) Data storage method, device, equipment and storage medium
CN109240574B (en) Method and system for prefetching files in mobile internet based on operation heat
CN110647685B (en) Information recommendation method, device and equipment
CN109189737B (en) Method and system for prefetching files in mobile internet according to time segments
CN109240987B (en) Method and system for prefetching data based on time for mobile internet
CN109151196B (en) Method and system for prefetching data in mobile internet based on current position
CN110795026B (en) Hot spot data identification method, device, equipment and storage medium
JP6550945B2 (en) Determination control program, determination control method and virtual machine management device
CN109144960B (en) Method and system for prefetching data in mobile internet according to area range
CN109271352B (en) Method and system for prefetching files in mobile internet according to state information
CN109033445B (en) Method and system for prefetching files in mobile internet according to running application
US9774488B2 (en) Apparatus and method for a thin form-factor technology for use in handheld smart phone and tablet devices
CN109376174B (en) Method and device for selecting database
CN108536759B (en) Sample playback data access method and device
CN110334073A (en) A kind of metadata forecasting method, device, terminal, server and storage medium
CN116578409A (en) Method, system and medium for identifying and migrating memory hot page
US11115464B2 (en) Server apparatus, information processing method, and computer program product

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
CB03 Change of inventor or designer information

Inventor after: Ma Chunchuo

Inventor after: Other inventors ask not to disclose names

Inventor before: Not publicizing the inventor

CB03 Change of inventor or designer information
TA01 Transfer of patent application right

Effective date of registration: 20211110

Address after: 100087 room 2201, 22 / F, building 1, courtyard 1, Danling street, Haidian District, Beijing

Applicant after: Beijing HESI Information Technology Co., Ltd

Address before: 110034 gate 2, floor 14, unit 1, building 6, No. 10 Xianglushan Road, Shenyang City, Liaoning Province (relocation building of Shenyang University of Aeronautics and Astronautics)

Applicant before: Wang Mei

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant