Data processing method based on terminal application program, electronic equipment and storage medium

By building a transfer frequency matrix to predict the applications to be recommended, the problem of the application startup time taken by terminal devices when resources are limited is solved, targeted preloading and information push are achieved, and application startup efficiency is improved.

CN119248361APending Publication Date: 2025-01-03ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310807927.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-03
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

The existing technology lacks the predictive ability of recommended applications, which leads to the lack of purpose in performing preloading and other tasks, and cannot effectively solve the problem of excessive application startup time, especially when resources are limited.

Method used

By obtaining the switching between applications on the terminal device, the transfer frequency matrix is ​​constructed, and the applications to be recommended are predicted according to user usage habits, so as to target preload and information push, and the application startup efficiency is improved.

Benefits of technology

It realizes accurate prediction of applications to be recommended based on user behavior habits, performs related work in advance, reduces application startup time, and improves resource utilization efficiency of terminal devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248361A_ABST
    Figure CN119248361A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method based on a terminal application program, electronic equipment and a storage medium. The method comprises the following steps: acquiring a sample data set, wherein the sample data set comprises the switching condition of at least one application program relative to other application programs on the terminal equipment; and constructing a transfer frequency matrix based on the sample data set, wherein the transfer frequency matrix comprises switching times of each application program relative to other application programs in the at least one application program. And on the basis of the transfer frequency matrix, predicting the second application program to be recommended according to a first application program operated by the terminal equipment. According to the application, when the terminal equipment runs the first application program, the second application program to be recommended is predicted more accurately according to the behavior habit of the user using the application program.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer application technology, and in particular to a data processing method, electronic device and storage medium based on a terminal application program. Background Art

[0002] As the performance of terminal devices improves, the functions of applications are designed to be more powerful, resulting in the need to load more resources. When a user starts an application on a terminal device, the user needs to wait for the terminal device to load, which takes a few seconds or even tens of seconds.

[0003] At present, the solution to the problem of long application startup time is to preload the application. However, usually, terminal devices have dozens or even hundreds of applications installed. With limited resources, it is obviously impossible to preload every application.

[0004] It can be seen that the existing technology lacks the predictive capability for recommending applications, which results in the terminal device being purposeless when performing tasks such as preloading that need to be performed in advance. Summary of the invention

[0005] The purpose of this application is to provide a data processing method, electronic device and storage medium based on terminal applications, which can more accurately predict a second application to be recommended based on the user's behavioral habits of using applications when a first application is running on a terminal device.

[0006] In order to at least achieve the above-mentioned purpose, the embodiment of the present application is implemented as follows:

[0007] In a first aspect, a data processing method based on terminal applications is provided, comprising: obtaining a sample data set, the sample data set containing the switching status of at least one application on a terminal device relative to other applications; constructing a transfer frequency matrix based on the sample data set, the transfer frequency matrix containing the number of switching times of each application in the at least one application relative to other applications; based on the transfer frequency matrix, predicting the second application to be recommended according to the first application running on the terminal device.

[0008] According to a second aspect, an electronic device is provided, comprising: one or more processors; and one or more memories configured to store computer-executable instructions, wherein the computer-executable instructions, when executed, cause the processor to execute the method described in the first aspect.

[0009] In a third aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by a processor, the method described in the first aspect is implemented.

[0010] This application is based on a sample data set containing the switching between multiple applications during the use of the terminal device to construct a transfer frequency matrix between multiple applications. The transfer frequency matrix records the number of times each application switches relative to other applications, which conforms to the user's behavior habits in using applications. When the first application is subsequently run on the terminal device, the transfer frequency matrix is ​​used as a reference benchmark to more accurately predict the second application to be recommended. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0012] Figure 1 This is a first flow chart of a data processing method based on a terminal application according to an embodiment of the present application.

[0013] Figure 2 This is a second flow chart of the data processing method according to an embodiment of the present application.

[0014] Figure 3 This is a third flow chart of the data processing method according to an embodiment of the present application.

[0015] Figure 4 This is a fourth flow chart of the data processing method according to an embodiment of the present application.

[0016] Figure 5 This is a fifth flow chart of the data processing method according to an embodiment of the present application.

[0017] Figure 6 This is a schematic diagram of the structure of a data processing device based on a terminal application according to an embodiment of the present application.

[0018] Figure 7 A schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0019] As mentioned above, as the performance of terminal devices improves, more and more applications are installed, and the resources that applications need to load also increase significantly. This results in users having to spend a certain amount of time waiting for the application to load when starting an application.

[0020] Currently, the solution to the problem of long application startup time is to preload the application in advance. However, usually, users install dozens or even hundreds of applications on terminal devices. Given the limited resources of terminal devices, it is obviously unrealistic to preload each application.

[0021] It can be seen that the existing technology lacks the predictive capability for recommending applications, which results in the terminal device being purposeless when performing tasks such as preloading that need to be performed in advance.

[0022] In response to the above problem, this application aims to propose a technical solution that can accurately predict the applications to be recommended on the terminal device based on the user's behavioral habits in using applications, so as to perform tasks such as preloading and information push on the recommended applications in a targeted manner.

[0023] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0024] On the one hand, an embodiment of the present application provides a method for processing a terminal application. Figure 1 The process flow diagram of the treatment method includes the following steps:

[0025] S102, obtaining a sample data set, where the sample data set includes a switching situation of at least one application program on a terminal device relative to other applications.

[0026] In this embodiment, the terminal device records the user's behavior data of using the application program to generate user behavior data. Based on the user behavior data, it is possible to know when the user used which application program, and then determine the switching between the applications within a period of time.

[0027] Correspondingly, the sample data in the sample data set may be obtained by performing structured processing on the user behavior data recorded by the terminal device.

[0028] As an example introduction:

[0029] This embodiment can read application events and corresponding time information on the terminal device.

[0030] After that, the read application events are structured according to each time period in the preset time period to obtain a sample data set. For example, if the time period is a day, the user behavior data is structured according to each hour of the day; for another example, if the time period is a week, the user behavior data is structured according to each day of the week.

[0031] It should be understood that, under structured processing, the sample data set includes a sample data set of the switching status of at least one application relative to other applications in each time period, that is, presenting the user's behavioral habits of using applications in the time dimension.

[0032] It should be noted that the other applications described in this step may be third-party applications installed by users themselves, such as short video applications, chat applications, etc., or they may be some system applications that come with the terminal device, such as a screen-lighting application for unlocking the terminal device screen, an audio application for adjusting the volume, a video application for adjusting the screen brightness, etc. This article does not specifically limit the type of application.

[0033] S104, constructing a transfer frequency matrix based on the sample data set, where the transfer frequency matrix includes the number of times each application in at least one application switches relative to other applications.

[0034] Based on the above, the sample data set includes a sample data set of the switching status of at least one application relative to other applications in each time period. Therefore, a transfer frequency matrix presenting the number of switching times of one application relative to another application in the time dimension can be constructed through the sample data set.

[0035] For ease of understanding, assuming that there are APP1, 2, 3, and 4, the information presented by the transfer frequency matrix within a period of time can be referred to as shown in the following table:

[0036] APP1 APP2 APP3 APP1 0 3 4 APP2 2 0 5 APP3 1 3 0

[0037] The diagonal value is 0, indicating that an APP cannot switch to itself. The first row records the number of times APP1 switches to APP2 as 3, and the number of times APP1 switches to APP3 as 4. The second row records the number of times APP2 switches to APP1 as 2, and the number of times APP1 switches to APP3 as 5. The third row records the number of times APP3 switches to APP1 as 1, and the number of times APP3 switches to APP2 as 3.

[0038] The transfer frequency matrix shown in the above table can reflect to a certain extent: the frequency of users switching between APP2 and APP3 when using APP1; the frequency of users switching between APP1 and APP3 when using APP2; and the frequency of users switching between APP1 and APP2 when using APP3.

[0039] Of course, in some special cases, users may use certain apps intensively in a certain period of time, and this behavior does not constitute the user's usage habits. In order to eliminate the inaccurate impact of this special case on the transfer frequency matrix, the number of switches of each application relative to other applications in the transfer frequency matrix can be smoothed, so that the number of switches of extreme values ​​is appropriately close to the normal value.

[0040] As an exemplary introduction, this embodiment can use the log function for smoothing. That is, the true number of the log function is defined as (the statistical number of application switching to specify other applications - the statistical number of application switching to specify other applications / the total statistical number of application switching to other applications).

[0041] Assume that the number of times APP1 switches to APP2, APP3, and APP4 is [2, 5, 7]. The log function is used to smooth [2, 5, 7]. The corresponding calculation process is: [log(2-2 / 14), log(5-5 / 14), log(7-7 / 14)].

[0042] From the above calculation process, it can be seen that when the value of a certain switching number is larger, the value that needs to be subtracted from the true number of its log function is larger, which leads to a greater degree of compression of the log function value. Therefore, based on the above log function, the more extreme the value of the switching number is, the greater the force of its smoothing process to move closer to the normal value, thus achieving an effective noise reduction effect.

[0043] The above is an introduction to the transfer frequency matrix. It should be noted that the transfer frequency matrix of this embodiment can be dynamically updated according to the user's habit of using applications. That is, whenever it is determined that the user's habit of using applications on the terminal device has changed (for example, the new time period has a significant change in the application used by the user and the frequency of use relative to the old time period), and / or the application installed on the terminal device has changed, steps S102 and S104 can be started to read the application event and the corresponding time information on the terminal device to construct the current latest transfer frequency matrix.

[0044] S106, predicting a second application to be recommended based on the transfer frequency matrix and the first application running on the terminal device.

[0045] In this embodiment, the second application may refer to other applications to be switched from the first application. When the terminal device is running the first application, the second application that the first application may switch to in the current time period or the next time period may be predicted based on the transfer frequency matrix. That is, other applications that have the largest number of first application switching times or that meet a certain number of switching times in the current time period or the next time period are selected from the transfer frequency matrix as the second application.

[0046] The following is a detailed introduction to the method of predicting the second application based on the transfer frequency matrix.

[0047] This embodiment constructs a usage probability matrix for each time period based on the sample data set, or directly decomposes the transfer frequency matrix into a usage probability matrix for each time period. The usage probability matrix for each time period contains the usage probability of each application in the corresponding time period. The usage probability of any target application refers to the ratio of the number of times the application is used in the corresponding time period to the total number of times all applications are used in the corresponding time period.

[0048] In the case where the terminal device runs the first application, first determine at least one candidate application for potential switching of the first application and the corresponding number of switching times based on the transfer frequency matrix. Among them, the at least one candidate application for potential switching mentioned here refers to an application with a switching record but an uncertain switching probability; for example, the transfer frequency matrix has counted the user's use of the terminal device to switch from the first application to a chat application. If it is not yet determined whether the first application switching to the chat application conforms to the normal user usage habits, the chat application can be determined as a candidate application. Alternatively, the candidate application can be other applications that have been switched by the first application and the number of switching times is greater than a certain threshold. For example, the threshold is set to 3. If the transfer frequency matrix has counted the user's use of the terminal device to switch from the first application to a chat application, and the number of switching times reaches 3 times, the chat application is used as a candidate application for the first application.

[0049] Next, based on the usage probability matrix of the target time period (which is associated with the time of the first application running on the terminal device, which can be the current time period or the next time period), combined with the transfer frequency matrix, determine the switching probability of each candidate application in at least one candidate application becoming the switching target of the first application. Among them, the switching probability of any target candidate application becoming the switching target of the first application is determined by two factors: one is the usage probability of the target candidate application counted in the usage probability matrix of the target time period; that is, the greater the usage probability, the greater the corresponding switching probability. The second is the number of times the first application switches to the target candidate application counted in the transfer frequency matrix; that is, the greater the number of switches, the greater the corresponding switching probability.

[0050] Afterwards, based on the number of switching times and switching probability corresponding to each candidate application, the confidence level corresponding to each candidate application is determined. That is, the statistical number of times and switching probability corresponding to each candidate application are weighted to quantify the confidence level. Then, at least one candidate application whose confidence level reaches the first preset requirement is selected as the second application that the terminal device potentially switches from the first application.

[0051] On the basis of the above quantitative confidence, a time-related attenuation coefficient can be further introduced. The attenuation coefficient corresponding to each candidate application is determined based on the interval time since the candidate application was last run by the terminal device. Under the influence of the attenuation coefficient, the longer the interval time since a candidate application was last used by the user, the lower the corresponding confidence value, thereby ensuring that the prediction can follow up the user's behavior habits of using the application in real time.

[0052] In addition, if the second application cannot be predicted, at least one application with the highest probability of being used in the target time period may be determined as the second application according to the usage probability matrix of the target time period.

[0053] The above is an introduction to predicting the application to be run next by the terminal device based on the transfer frequency matrix. Before the transfer frequency matrix is ​​put into use, the present embodiment can also select a part of the multiple applications of the terminal device as test samples (the selection strategy of the test samples is not specifically limited) to test the prediction accuracy of the rows of the transfer frequency matrix, that is, to use the transfer frequency matrix to try to predict the application to be recommended corresponding to the test sample.

[0054] If the test results indicate that the prediction accuracy of the transfer frequency matrix does not meet the preset requirements, the sample data set is expanded with sample data for a new time period; for example, based on the correspondence between different preset accuracy intervals and optimization strategies, a target optimization strategy that matches the test results is determined (the optimization strategy indicates the number of time periods for which the sample data set needs to be expanded); thereafter, the transfer frequency matrix is ​​optimized based on the expanded sample data set until the prediction accuracy meets the preset requirements.

[0055] It should be understood that after predicting the second application, this embodiment can execute related work of the terminal device running the second application, and the related work includes, but is not limited to, calling, starting, running, and any other operations related to the second application.

[0056] As an example, the preparation work includes at least one of the following:

[0057] Pushing relevant information of the second application based on the terminal device; for example, prompting the icon of the second application on the screen interface;

[0058] Preloading the second application based on the terminal device; that is, if the user switches from the first application to the second application, the terminal device does not need to load the second application, thereby saving the time of waiting for the second application to start;

[0059] Directly start the second application based on the terminal device; that is, the second application can be an application that comes with the terminal device system, such as a screen-lighting application for unlocking the terminal device screen, an audio application for adjusting the volume, a video application for adjusting the screen brightness, etc. When the terminal device runs the first application, it can actively execute some related system functions. For example, when the terminal device runs a short video APP, it starts an audio application for adjusting the volume, which is convenient for the user to adjust the appropriate volume.

[0060] In summary, the method of this embodiment is based on a sample data set containing the switching conditions between multiple applications during the use of the terminal device to construct a transfer frequency matrix between multiple applications. The transfer frequency matrix records the number of times each application is switched relative to other applications, which conforms to the user's behavioral habits of using applications. When the first application is subsequently run on the terminal device, the second application to be recommended is predicted based on the transfer frequency matrix as a reference. Among them, the second application can be the switching object of the first application, so the method of this embodiment can perform related work of the second application in advance based on the terminal device. For example, the second application is preloaded in a targeted manner, thereby solving the problem of long application startup time in a more practical way; for another example, the relevant information of the second application is pushed based on the terminal device. The method of this embodiment is described in detail below in conjunction with an actual application scenario.

[0061] like Figure 2 As shown in the figure, the process of this application scenario includes the following stages:

[0062] S1) Data preprocessing stage

[0063] Among them, reference Figure 3 As shown, the data preprocessing stage includes the following steps:

[0064] S1.1, read the user behavior data recorded on the terminal device, and construct tabular data with a fixed structure based on the user behavior data.

[0065] Among them, user behavior data mainly includes: timestamp, app events used and screen off events, as well as the date and hour derived from the timestamp, and the read application events are structured according to each preset time period.

[0066] As an example, assuming that each hour is used as the time period, the read application events are structured to obtain the following tabular data:

[0067]

[0068]

[0069] S1.2, filter irrelevant system application records in tabular data

[0070] The terminal device system will normally start some irrelevant applications. In this step, the event APP can be removed from the tabular data, and the corresponding event value is the row data corresponding to the system package to simplify the subsequent calculation amount.

[0071] S1.3, perform adjacent deduplication processing on tabular data

[0072] This step removes duplicate records in the tabular data with adjacent time periods and the same application. For example, in adjacent states, the screen turns off and then turns off again, and APP1 is used after APP1 is used again. In this case, duplicate removal is required, and only the earliest row record in the adjacent state is retained.

[0073] S1.4, set the target field "Target" column in the tabular data

[0074] This step introduces a switching target field "Target" column in the tabular data for each application recorded in the tabular data, and if the application in the previous time period does not belong to the lock screen application, the identifier of the application in the previous time period is added to the switching target field of switching the application to obtain a sample data set.

[0075] As shown in the following table, [APP1, APP2, screen off] is taken as a new column of data. The meaning of this row of data is: at the current time, the app used after the screen is turned off is app1.

[0076] Timestamp event Event Value date Hour Target 166249** Screen off put_out_screen 2023-04-01 1 APP1 166249** App APP1 2023-04-01 1 APP2 166249** App APP2 2023-04-01 1 put_out_screen 166249** Screen off put_out_screen 2023-04-01 1 Removal .... ... ... ... ...

[0077] S1.5, remove the records of switching times below the preset threshold and the records of screen off in the tabular data

[0078] If one of the event value or target value is off screen, the corresponding row data is deleted.

[0079] Subsequently, an app-frequency matrix is ​​constructed to count the number of times each APP appears in the sorted data set, and the row data corresponding to the APP whose number of appearances is lower than the threshold is deleted. Among them, for the case of APPs with too low a number of deletions, the row data should be deleted regardless of whether the APP appears in the event column or the target column, and the threshold is configured and issued by the cloud.

[0080] App frequency APP1 10 APP2 20 ... ...

[0081] APP-frequency matrix

[0082] S1.6, construct sample data set A based on tabular data

[0083]

[0084]

[0085] After the above data processing, the data set will be concentrated into sequence data of continuous use of more than 2 apps, and the data adjacent to screen off will be excluded, which will reduce the subsequent calculation amount and improve the hit rate of the target app.

[0086] At this time, the sample data set A is: the input is the app corresponding to the event value, and the output is the target, which is a one-to-one relationship. Take 80% of the data in the sample data set A as the training set, and the remaining 20% ​​as the test set, and then calculate various types of moments based on the training set.

[0087] S2) Determination of the transition probability matrix based on the training set

[0088] Among them, reference Figure 4 As shown, the transition probability matrix determination stage includes the following steps:

[0089] S2.1, determine the transition probability matrix P

[0090] First, find the app set, that is, the total app types that appear in the event value and the target. Assuming there are N types of apps, the transition frequency matrix is ​​N*N in size, and P[1, 2] represents the number of transitions from the first app to the second app in the app set. For example, if there are 2 rows of data from APP2 to APP1 in the training set, then the value corresponding to the matrix is ​​2. Finally, the empty values ​​in the matrix are assigned 1.

[0091] Among them, the transition probability matrix P is shown in the following table:

[0092] APP1 APP2 APP3 APP1 2 5 7 APP2 5 0 1 APP3 1 3 0

[0093] S2.2, determine the smoothed transfer frequency matrix, i.e., the transfer frequency smoothing matrix P-TF

[0094] In this step, the vector recorded in each row of the transition probability matrix P is smoothed.

[0095] For example, the vector of the first row APP2--->APP2, APP1, APP3 is [2, 5, 7]. Then [2, 5, 7] can be converted into a new vector according to the calculation formula of the noise reduction processing.

[0096] S2.3, determine the usage probability matrix Pt of the time weight

[0097] For the target column, we first calculate the number of times each app appears in each hourly period. The rows represent a certain time period and the columns represent apps. Then we convert each value into a probability: this value = this value / sum(row). For example, the data in the first row means: the probability of each app in the target column appearing in the time period from 0:00 to 1:00.

[0098] Among them, the hour-app transition probability matrix Pt is shown in the following table:

[0099] time APP1 APP2 APP3 ... APP 0 0.1 0.2 0.1 0.1 1 0.2 0.2 0.3 0.1 2 0.3 0.2 0.1 0.1 3 0.2 0.2 0.3 0.1 .... ... ... ... ... 23 0.2 0.1 0.3 0.1

[0100] S2.4, determine the transfer frequency matrix Pd with days as the time period

[0101] For each app, calculate the number of times the app is used on a day-by-day basis to get the interval between the current day and the day the app was most recently used. For example, if the prediction starts today, for a candidate application, the time interval between the day the candidate application was most recently used and today is N, and the attenuation coefficient is exp(-N).

[0102] Among them, the transfer frequency matrix Pd of app_day is shown in the following table:

[0103] App-Days 4-1 4-2 4-3 APP1 8 8 8 APP2 6 6 6 APP3 6 8 0 ....

[0104] For example, the current input day is 4-4, and the attenuation coefficient for APP3 is required. The row data corresponding to APP3 is extracted as [6, 8, 0]. The attenuation coefficient is exp(-1) when the interval with the most recently used day is 1. The same is true for other apps.

[0105] After obtaining the above matrix, save the matrix. Subsequent predictions directly call the matrix's related app and corresponding value, which has a faster prediction speed.

[0106] S3) Prediction algorithm configuration stage

[0107] It should be understood that whether the transfer frequency matrix is ​​smoothed and whether the attenuation factor is introduced will affect the prediction accuracy; for this reason, this stage needs to configure corresponding prediction algorithms for the four different combinations, pending subsequent testing and evaluation.

[0108] Among them, reference Figure 5 As shown, the prediction algorithm configuration phase includes the following steps:

[0109] S3.1, prediction of Algorithm 1 based on P matrix & Pt matrix

[0110] First, according to last-app, we get the row corresponding to last-app in the P matrix, p_cnt = {app1: times, app2: times, app3: times, ...}, where app1, app2.... are all the column names corresponding to the row. For example, the first row of the P matrix is ​​APP2, APP1, APP3. p_cnt is the original rough arrangement.

[0111] Then, according to the time weight matrix Pt, find the weights p_w = [p1, p2, p3.........] of app1, app2, etc. in the current time period h, multiply the frequency value of p_cnt by the corresponding point of p_w to form a new dictionary {app1: frequency, app2: frequency, app3: frequency, ...}, and finally perform precise sorting according to the value of the dictionary, and take the first four apps for output as the prediction set.

[0112] S3.2, prediction of Algorithm 2 based on P matrix & Pt & Pd matrix

[0113] First, according to last-app, we get the row corresponding to last-app in the P matrix, p_cnt = {app1: times, app2: times, app3: times, ...}, where app1, app2.... are all the column names corresponding to the row. For example, the first row of the P matrix is ​​APP2, APP1, APP3. p_cnt is the original rough arrangement.

[0114] Then, according to the time weight matrix Pt, find the weights p_w = [p1, p2, p3.........] of app1, app2, etc. in the current time period h, and multiply the value of p_cnt by the corresponding point of p_w to form a new dictionary p_m = {app1: times, app2: times, app3: times, ...}.

[0115] Then, the attenuation coefficient of each candidate app is calculated according to the time of the day ds and the Pd matrix, and then multiplied with the dictionary value of p_m again. Finally, after the dictionary values ​​are sorted, the top four apps with the highest probability are selected for recommendation or preload output.

[0116] S3.3, Prediction based on P-TF matrix & Pt matrix algorithm 3

[0117] First, according to last-app, we get the row corresponding to last-app in the P-TF matrix, p_cnt = {app1: times, app2: times, app3: times, ...}, where app1, app2.... are all the column names corresponding to the row. For example, the first row of the p matrix is ​​APP2, APP1, APP3. p_cnt is the original rough arrangement.

[0118] Then, according to the time weight matrix Pt, find the weights p_w = [p1, p2, p3.........] of app1, app2, etc. in the current time period h, multiply the frequency value of p_cnt by the corresponding point of p_w to form a new dictionary {app1: frequency, app2: frequency, app3: frequency, ...}, and finally perform precise sorting according to the value of the dictionary, and take the first four apps for output as the prediction set.

[0119] S3.4, prediction of algorithm 4 based on P-TF matrix & Pt & Pd matrix

[0120] First, according to last-app, we get the row corresponding to last-app in the P-TF matrix, p_cnt = {app1: times, app2: times, app3: times, ...}, where app1, app2.... are all the column names corresponding to the row. For example, the first row of the p matrix is ​​APP2, APP1, APP3. p_cnt is the original rough arrangement.

[0121] Then, according to the time weight matrix Pt, find the weights p_w = [p1, p2, p3.........] of app1, app2, etc. in the current time period h, and multiply the value of p_cnt by the corresponding point of p_w to form a new dictionary p_m = {app1: times, app2: times, app3: times, ...}.

[0122] S4) Algorithm testing phase at the edge (user terminal)

[0123] In this phase, the test set is mainly used to test the above four algorithms, and the algorithm with the best prediction effect is selected for use. The test principle is the same as the prediction principle, which will not be repeated in this article.

[0124] S5) Cloud-edge collaborative optimization stage

[0125] In this stage, the cloud can assist the user's terminal device in optimizing the model of the current algorithm.

[0126] Specifically, after the user selects a better algorithm, the terminal device will periodically use the latest test set to perform accuracy tests and upload the test results to the cloud server.

[0127] Correspondingly, the cloud determines whether a new app has appeared in the user's usage habits based on the uploaded test results. When a new app appears, the cloud first determines whether the new app has appeared in the past and whether the frequency of use of the new app meets the requirements for becoming a usage habit.

[0128] As an example, if a new app has not appeared in the first 80% of the days, and its usage frequency ranks in the top 70% of the days it appears, the cloud adaptively configures the weight of the new app. The formula for increasing the weight is:

[0129] Weight=Weight*exp(x)

[0130] Where x is the number of days the new app appears, and weight shall not exceed the frequency ratio of the new app used on that day.

[0131] Afterwards, the cloud will feed back the weight parameter of the new app to the user's terminal device. The weight parameter can directly affect the prediction results of the subsequent recommended applications. That is, the larger the weight parameter of the new app, the greater the probability of being predicted as a recommended application.

[0132] It should be understood that in this application scenario, the terminal device on the user side can complete the update of the user's usage habits through the weight parameters fed back by the cloud.

[0133] In addition, the cloud can also provide an optimization strategy for the transfer frequency matrix based on the accuracy of the test results uploaded by the terminal device. As an example, the optimization strategy can be shown in the following table, which configures the number of time periods required to expand the sample data set according to the accuracy interval of the test results.

[0134]

[0135] It should be understood that in this application scenario, the terminal device on the user side can appropriately adjust the sample data set for constructing the transfer frequency matrix through the optimization strategy fed back by the cloud, thereby optimizing the transfer frequency matrix to improve the prediction accuracy.

[0136] In summary, this application scenario is configured with four prediction algorithms, namely: Algorithm V1: transfer frequency matrix + time weight matrix + attenuation coefficient; Algorithm V2: transfer frequency matrix + time weight matrix algorithm; Algorithm V3: smoothed transfer frequency matrix + time weight matrix + attenuation coefficient; Algorithm V4: smoothed transfer frequency matrix + time weight matrix. The user terminal can use the local test set to test and evaluate the above four algorithms through edge computing, and select the algorithm with the highest prediction accuracy for use. In addition, the user terminal can also coordinate with the cloud to optimize the algorithm, that is, the user terminal submits the algorithm to be used and the results of the corresponding test set to the cloud, and the cloud provides the algorithm and sample data iteration strategy. In addition, when the user terminal is unable to test these four algorithms, it can also select the algorithm for prediction in the order of priority V2>V4>V1>V3.

[0137] In addition, another embodiment of the present application also provides a data processing device based on a terminal application. Figure 3 It is a structural schematic diagram of the processing device, comprising:

[0138] The sample acquisition module 610 is used to acquire a sample data set, where the sample data set includes a switching situation of at least one application program on a terminal device relative to other applications.

[0139] The matrix construction module 620 is used to construct a transfer frequency matrix based on the sample data set, wherein the transfer frequency matrix includes the switching times of each application program in the at least one application program relative to other applications.

[0140] The prediction module 630 is configured to predict the second application to be recommended based on the transfer frequency matrix and the first application running on the terminal device.

[0141] The device of this embodiment builds a transfer frequency matrix between multiple applications based on a sample data set containing the switching conditions between multiple applications during the use of the terminal device. The transfer frequency matrix records the number of times each application switches relative to other applications, which conforms to the user's behavioral habits of using applications. Later, when the terminal device runs the first application, the transfer frequency matrix is ​​used as a reference to predict the second application to be recommended. Among them, the second application can be the switching object of the first application, so the device of this embodiment can perform related work of the second application in advance based on the terminal device. For example, the second application is preloaded in a targeted manner, thereby solving the problem of long application startup time in a more practical way; for another example, the relevant information of the second application is pushed based on the terminal device. In an exemplary embodiment, when the terminal device runs the first application, the matrix construction module 620 is used to smooth the number of switching times of each application relative to the other application in the transfer frequency matrix before predicting the second application that the terminal device potentially switches from the first application based on the transfer frequency matrix.

[0142] In an exemplary embodiment, the sample acquisition module 610 acquires a sample data set, including: reading application events and corresponding time information on the terminal device; and, according to each time period in a preset time period, performing structured processing on the read application events to obtain a sample data set, wherein the sample data set includes a sample data set of the switching status of at least one application relative to other applications in each time period.

[0143] In an exemplary embodiment, the matrix construction module 620 is also used to construct a usage probability matrix for each of the multiple time periods based on the sample data set; wherein the usage probability matrix for each time period includes the usage probability of each application in the corresponding time period; correspondingly, the prediction module 630 predicts the second application that the terminal device potentially switches from the first application based on the transfer frequency matrix when the terminal device runs the first application, including: when the terminal device runs the first application, based on the transfer frequency matrix, determining at least one candidate application that the first application potentially switches to and the corresponding number of switching times; based on the usage probability matrix of the target time period, determining the switching probability of each candidate application in the at least one candidate application becoming the switching target of the first application in combination with the transfer frequency matrix; wherein the target time period is associated with the time of the first application running on the terminal device; determining the confidence corresponding to each candidate application based on the number of switching times and the switching probability corresponding to each candidate application; selecting the candidate application whose confidence reaches the first preset requirement as the second application that the terminal device potentially switches from the first application.

[0144] Among them, the prediction module 630 determines the confidence of each candidate application based on the number of switching times and switching probability corresponding to each candidate application, including: determining the confidence corresponding to each candidate application based on the number of switching times, switching probability and attenuation coefficient corresponding to each candidate application; wherein the attenuation coefficient corresponding to each candidate application is determined based on the interval time from the last time the candidate application was run by the terminal device.

[0145] In an exemplary embodiment, the sample acquisition module 610 reads the application events and corresponding time information on the terminal device, including: when it is determined that the user's habit of using the application of the terminal device has changed, and / or the application installed on the terminal device has changed, reading the application events and corresponding time information on the terminal device.

[0146] In an exemplary embodiment, the sample acquisition module 610 performs structured processing on the read application events according to each time period in a preset time period to obtain a sample data set, including: performing structured processing on the read application events according to each time period in the preset time period to obtain tabular data, wherein the tabular data records the switching status of at least one application relative to other applications in each time period; deduplicating record data with adjacent time periods and the same application in the tabular data, and / or removing record data with a switching number lower than a preset threshold in the tabular data; for each application recorded in the tabular data, introducing a switching target field in the tabular data, and if the application in the previous time period does not belong to the lock screen application, adding the identifier of the application in the previous time period to the switching target field for switching the application, thereby obtaining the sample data set.

[0147] In an exemplary embodiment, before the prediction module 630 predicts the second application to be recommended based on the transfer frequency matrix and the first application running on the terminal device, the matrix construction module 620 is also used to: select a test case from the at least one application to test the application to be switched by the transfer frequency matrix; if the test result indicates that the prediction accuracy of the transfer frequency matrix does not meet the second preset requirement, expand the sample data set with sample data of a new time period, and optimize the transfer frequency matrix based on the expanded sample data set.

[0148] In an exemplary embodiment, when the test result indicates that the prediction accuracy of the transfer frequency matrix does not meet the second preset requirement, the matrix construction module 620 expands the sample data of a new time period in the sample data set, including: when the test result indicates that the prediction accuracy of the transfer frequency matrix does not meet the second preset requirement, determining a target optimization strategy that matches the test result based on the correspondence between different preset accuracy intervals and optimization strategies; wherein the optimization strategy indicates the number of time periods that the sample data set needs to be expanded; and expanding the sample data set with sample data of a new time period according to the number of time periods that need to be expanded indicated by the target optimization strategy.

[0149] In an exemplary embodiment, the apparatus of this embodiment further includes:

[0150] The preparation module is used for the prediction module 630 to: after predicting the second application to be recommended based on the transfer frequency matrix and according to the first application running on the terminal device, perform related work on the terminal device running the second application.

[0151] The related work includes at least one of the following:

[0152] Pushing relevant information of the second application based on the terminal device;

[0153] Preloading the second application is performed based on the terminal device.

[0154] Obviously, Figure 6 The data processing device shown can be used as Figure 1 The execution body of the method shown in Figure 1 The steps and corresponding functions shown in the figure are the same and will not be described in detail in this article.

[0155] Figure 7 This is a schematic diagram of the structure of an electronic device according to an embodiment of this specification. Figure 7 At the hardware level, the electronic device may include one or more processors 710, and in an exemplary embodiment, may also include an internal bus 720, a network interface 730, and a memory 740. The memory 740 may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage, etc. Of course, the electronic device may also include hardware required for other services.

[0156] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0157] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.

[0158] In an exemplary embodiment, the processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming the above-mentioned Figure 6Correspondingly, the processor executes the program stored in the memory and is specifically used to perform the following operations:

[0159] A sample data set is obtained, where the sample data set includes a switching situation of at least one application program on a terminal device relative to other applications.

[0160] A transfer frequency matrix is ​​constructed based on the sample data set, and the transfer frequency matrix includes the switching times of each application program in the at least one application program relative to other applications.

[0161] Based on the transfer frequency matrix, the second application to be recommended is predicted according to the first application running on the terminal device.

[0162] The electronic device of this embodiment builds a transfer frequency matrix of multiple applications based on a sample data set containing the switching situations between multiple applications during the use of the terminal device. The transfer frequency matrix records the number of times each application is switched relative to other applications, which conforms to the user's behavioral habits of using applications. Afterwards, when the terminal device runs the first application, the transfer frequency matrix is ​​used as a reference benchmark to predict the second application to be switched next, which can be used to perform related work of the terminal device running the second application in advance, such as preloading the second application based on the terminal device, or recommending related information of the second application based on the terminal device. It can be seen that the present application enables the terminal device to preload some applications in a targeted manner, solving the problem of long application startup time in a more practical way.

[0163] The data processing method disclosed in the above-mentioned embodiment as shown in this specification can be applied to a processor and implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0164] Of course, in addition to software implementation, the electronic device of this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0165] In addition, an embodiment of the present application also proposes a computer-readable storage medium, which stores one or more programs, and the one or more programs include instructions.

[0166] In an exemplary embodiment, when the above instructions are executed by a portable electronic device including a plurality of application programs, the portable electronic device can execute Figure 1 The steps of the method shown may include:

[0167] A sample data set is obtained, where the sample data set includes a switching situation of at least one application program on a terminal device relative to other applications.

[0168] A transfer frequency matrix is ​​constructed based on the sample data set, and the transfer frequency matrix includes the switching times of each application program in the at least one application program relative to other applications.

[0169] Based on the transfer frequency matrix, the second application to be recommended is predicted according to the first application running on the terminal device.

[0170] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0171] The above is a description of a specific embodiment of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0172] The above are only embodiments of this specification and are not intended to limit this specification. For those skilled in the art, this specification may be subject to various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included in the scope of the claims of this specification. In addition, all other embodiments obtained by ordinary technicians in this field without creative work shall fall within the scope of protection of this document.

Claims

1. A data processing method based on a terminal application, characterized in that: include: Acquire a sample data set, wherein the sample data set includes a switching situation of at least one application program on a terminal device relative to other applications; Constructing a transfer frequency matrix based on the sample data set, wherein the transfer frequency matrix includes the number of times each application program in the at least one application program switches relative to other applications; Based on the transfer frequency matrix, the second application to be recommended is predicted according to the first application running on the terminal device.

2. The method according to claim 1, characterized in that: Before predicting the second application to be recommended based on the transfer frequency matrix and according to the first application running on the terminal device, the method further includes: The switching times of each application program relative to the other application programs in the transfer frequency matrix are smoothed.

3. The method according to claim 1 or 2, characterized in that: The obtaining of the sample data set comprises: Reading application events and corresponding time information on the terminal device; According to multiple time periods in a preset time cycle, the read application events are structured and processed to obtain the switching status of the at least one application program relative to other applications in the multiple time periods, so as to obtain the sample data set.

4. The method according to claim 3, characterized in that Also includes: Constructing a usage probability matrix for each of the multiple time periods based on the sample data set; wherein the usage probability matrix for each time period includes the usage probability of each application in the corresponding time period; The predicting the second application to be recommended based on the transfer frequency matrix and the first application running on the terminal device includes: In the case where the terminal device runs a first application, determining, based on the transfer frequency matrix, at least one candidate application to which the first application is potentially switched and a corresponding number of switching times; Based on the usage probability matrix of the target time period, the switching probability of each candidate application in the at least one candidate application becoming the switching target of the first application is determined in combination with the transfer frequency matrix; wherein the target time period is associated with the time of the first application running on the terminal device; Determine the confidence level corresponding to each candidate application based on the number of switching times and the switching probability corresponding to each candidate application; A candidate application whose confidence reaches a first preset requirement is selected as the second application to be recommended.

5. The method according to claim 3, characterized in that: The step of determining the confidence level of each candidate application based on the number of switching times and the switching probability corresponding to each candidate application includes: Based on the number of switching times, switching probability and attenuation coefficient corresponding to each candidate application, the confidence level corresponding to each candidate application is determined; wherein the attenuation coefficient corresponding to each candidate application is determined based on the interval time from the last time the candidate application was run by the terminal device.

6. The method according to claim 3, characterized in that: The reading of the application event and the corresponding time information on the terminal device includes: When it is determined that the user's habit of using the application of the terminal device has changed, and / or when the application installed on the terminal device has changed, the application event and the corresponding time information on the terminal device are read.

7. The method according to claim 3, characterized in that According to each time period in the preset time period, the read application events are structured to obtain a sample data set, including: According to each time period in the preset time period, the read application event is structured to obtain tabular data, wherein the tabular data records the switching status of the at least one application relative to other applications in each time period; Deduplication of recorded data with adjacent time periods and the same application in the tabular data, and / or removal of recorded data with a switching number lower than a preset threshold in the tabular data; For each application recorded in the tabular data, a switching target field is introduced in the tabular data, and if the application in the previous time period does not belong to the lock screen application, the identifier of the application in the previous time period is added to the switching target field of switching the application to obtain the sample data set.

8. The method according to claim 3, characterized in that Before predicting the second application to be recommended based on the transfer frequency matrix and according to the first application running on the terminal device, the method further includes: Selecting a test case from the at least one application to test the application to be switched by the transfer frequency matrix; When the test result indicates that the prediction accuracy of the transfer frequency matrix does not meet the second preset requirement, the sample data set is expanded with sample data of a new time period, and the transfer frequency matrix is ​​optimized based on the expanded sample data set.

9. The method according to claim 8, characterized in that When the test result indicates that the prediction accuracy of the transfer frequency matrix does not meet the second preset requirement, expanding the sample data set to a new time period includes: When the test result indicates that the prediction accuracy of the transfer frequency matrix does not meet the second preset requirement, a target optimization strategy matching the test result is determined according to the correspondence between different preset accuracy intervals and optimization strategies; wherein the optimization strategy indicates the number of time periods in which the sample data set needs to be expanded; According to the number of time periods that need to be expanded as indicated by the target optimization strategy, the sample data set is expanded with sample data of a new time period.

10. The method according to any one of claims 1 to 9, characterized in that: After predicting the second application to be recommended based on the transfer frequency matrix and the first application running on the terminal device, the method further includes: Execute the work related to the terminal device running the second application; wherein the work related to the terminal device includes at least one of the following: Pushing relevant information of the second application based on the terminal device; A preloading operation is performed on the second application based on the terminal device.

11. The method according to any one of claims 1 to 9, characterized in that: The other applications at least include a screen-lighting application for unlocking the screen of the terminal device.

12. An electronic device, characterized in that: The device comprises: One or more processors; and, one or more memories configured to store computer executable instructions, which, when executed, cause the processor to perform the method according to any one of claims 1-11.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store computer-executable instructions, and the computer-executable instructions implement the method according to any one of claims 1 to 11 when executed by a processor.