Application control method and related apparatus
By generating an application list through a multi-path recall model and a linear regression model, background applications are accurately detected and eliminated, solving the problem of short battery life of electronic devices and improving user experience and device power consumption management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2026-04-07
AI Technical Summary
The short battery life of electronic devices is mainly due to insufficient detection and removal of background applications, resulting in excessive power consumption.
A multi-path recall model is used in combination with linear regression and normalization models to generate an application list based on user application usage habits. Applications with high usage probability are selected for detection and removal, reducing unnecessary power consumption.
It increases the probability that apps that users don't use will be detected and removed, reduces the probability that apps that users do use will be mistakenly removed, improves user experience, and extends device battery life.
Smart Images

Figure CN120276808B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to an application control method and related apparatus. Background Technology
[0002] In some implementations, users can open multiple applications on their electronic devices. One of these applications can run in the foreground, while the others can run in the background. To save power, the electronic device can detect and terminate some background applications; those that are detected will stop running, while those that are not detected will continue running.
[0003] However, the above implementation suffers from the problem of short battery life for electronic devices. Summary of the Invention
[0004] This application provides an application control method and related apparatus, applied in the field of terminal technology. In response to a recommended operation, the electronic device uses the application list corresponding to the time of the recommended operation to detect and eliminate background applications. The number of applications in the application list varies at different times, and the usage probability of each application in the application list is greater than a preset probability. This increases the probability that applications the user will not use will be eliminated, thereby reducing the power consumption of the electronic device. Furthermore, since the usage probability of applications in the application list used for background application elimination is greater than a preset threshold, using an application list to eliminate background applications reduces the probability of applications the user will use being eliminated, thus improving the user experience.
[0005] In a first aspect, embodiments of this application propose an application control method, the method comprising:
[0006] In the first instance, a first application list is used to detect and eliminate applications running in the background. This first application list includes m1 applications and information identifying the usage probability of each application within m1, with the usage probability of each application in m1 exceeding a preset threshold. In the second instance, a second application list is used to detect and eliminate applications running in the background. This second application list includes m2 applications and information identifying the usage probability of each application within m2, with the usage probability of each application in m2 exceeding a preset threshold. m1 and m2 are different. The second instance occurs later than the first instance.
[0007] This allows for obtaining application lists at different times, with varying numbers of applications in each list. By using these lists to detect and eliminate background applications at different times, the probability of detecting applications the user is unlikely to use is increased, thus reducing the power consumption of electronic devices. Applications in the detection list whose usage probability is greater than a preset threshold are considered applications the user is likely to use. Using these lists to detect background applications also reduces the probability of detecting applications the user will use, improving the user experience.
[0008] In one possible implementation, the first moment belongs to the s-th time period of day t. The first application list is obtained as follows: A first model is used to obtain multiple applications for the s-th time period of day t and the first target weight of each application within those applications. The first target weight is related to a first usage probability, which represents the application usage probability in the s-th time period of day t. The first target weights of each application within the multiple applications are input into a second model, which outputs the first application list. Specifically, the first model is used to output the first target weights of each application within the multiple applications corresponding to the first moment, given application usage data for the s-th time period over L days prior to day t and application usage data for R instances of application usage prior to the first moment. The application usage data includes the start time of the application running in the foreground and the application identifier.
[0009] The first model can be a multi-path recall model. This model can learn users' long-term, recent, and real-time application (APP) usage habits, and can also use recall rates for each path to achieve multi-path recall fusion. The first model considers users' long-term, recent, and real-time application usage habits. By considering long-term, recent, and real-time data, accurate target weights can be obtained. The second model can obtain the application usage probability based on the target weights output by the first model, and thus obtain an accurate first list of applications containing usage probabilities greater than a preset threshold. When electronic devices use this first application list to detect and eliminate background applications, it can increase the probability of applications that users do not use being detected, thereby reducing the power consumption of electronic devices, and also reduce the probability of applications that users do use being detected.
[0010] In one possible implementation, the first target weight is linearly correlated with the first usage probability. The second model includes a linear regression model and a normalization model. The first target weights of each application from multiple applications are input into the second model, and the second model outputs a first application list, including: inputting the first target weights of each application from multiple applications into the linear regression model to obtain the first conditional probability of each application from multiple applications. The first conditional probability represents the unnormalized usage probability. The first conditional probability of each application from multiple applications is input into the normalization model to obtain the first usage probability of each application from multiple applications. Applications with a first usage probability greater than a preset threshold are selected from the multiple applications to obtain the first application list.
[0011] In this way, the target weight of the application is linearly related to the probability of use of the application. By using a linear regression model and a normalization model to process the first target weight of the application, an accurate first list of applications containing the first probability of use greater than a preset threshold can be obtained.
[0012] In one possible implementation, the first objective weights of each application in multiple applications are input into a linear regression model to obtain the first conditional probabilities of each application in multiple applications, including: calculating the first objective weights of each application in multiple applications using the least squares method to obtain the first conditional probabilities of each application in multiple applications.
[0013] Since the target weight of an application is linearly related to its usage probability, the least squares method can be used to calculate the first target weight of each application in multiple applications, thereby obtaining the accurate first conditional probability of each application in multiple applications and improving the accuracy of the first application list.
[0014] In one possible implementation, the first conditional probability of each application in multiple applications is input into a normalized model to obtain the first usage probability of each application in multiple applications, including: using the normalized exponential function softmax to calculate the first conditional probability of each application in multiple applications to obtain the first usage probability of each application in multiple applications.
[0015] This allows for the selection of applications with a first usage probability greater than a preset threshold from multiple applications, thus forming a first application list.
[0016] In one possible implementation, the first moment is the j-th time point on day t, and the first usage probability is g(Y). i,tj It satisfies the following formula:
[0017]
[0018] Among them, Y i,tjLet e be the first conditional probability obtained based on the first target weight of the i-th application corresponding to the j-th time point on day t, where e is a natural constant.
[0019] This allows for the selection of applications with a first usage probability greater than a preset threshold from multiple applications, thus forming a first application list.
[0020] In one possible implementation, the first time point is the j-th time point on day t, and the first conditional probability Y i,tj Satisfy the following formula:
[0021] Y i,tj =bZ i,tj +a
[0022] Among them, Z i,tj Let be the first target weight of the i-th application corresponding to the j-th time point on day t, where a is the weight coefficient of the linear regression model and b is the weight coefficient of the linear regression model.
[0023] In this way, the accurate first conditional probability of each application can be obtained based on the first target weight of each application, thereby improving the accuracy of the first application list.
[0024] In one possible implementation, the weight coefficients of the linear regression model are obtained by training the linear regression model using first training data. This first training data relates to the target weights of each application in the P applications at multiple time points on day q, and the application usage data on day q. The target weights of each application in the P applications at multiple time points on day q are output by the first model when the application usage data from day M1 is input into the first model. Day q is after day M1, and the P applications belong to the applications corresponding to the application usage data from day M1.
[0025] In P applications, the target weights of each application at multiple time points on day q belong to the predicted data, while the application usage data on day q belongs to the actual data. A linear regression model is trained using the first training data related to the predicted and actual data. This linear regression model can obtain an accurate linear relationship between the target weights of applications output by the multipath recall model and the usage probabilities of applications. Furthermore, based on this linear regression model, the accurate usage probability corresponding to the target weights of applications can be obtained.
[0026] In one possible implementation, the first training data is obtained by: sorting the target weights of the target application among the P applications according to their target weight magnitude, resulting in a target weight sequence for the target application. The target application can be any application among the P applications. The target weight sequence of the target application is divided into N equal segments, resulting in N sets of target weights for the target application, where each set has the same number of target weights. The average target weight of each set in the N sets of target weights is calculated. Based on the application usage data on day q and the time points corresponding to each target weight in the N sets of target weights and the identifier of the target application, the conditional probability of each set in the N sets of target weights is obtained. The conditional probability of each set in the N sets of target weights represents the actual usage probability of the target application under the grouping conditions. The linear regression model is trained using the first training data, including: training the linear regression model using the average of the N target weights corresponding to each application among the P applications and the N conditional probabilities corresponding to each application among the P applications.
[0027] In this way, by constructing sample points after grouping, the first training data can cover a larger amount of data, thereby improving the prediction accuracy and robustness of the linear regression model trained on the first training data.
[0028] In one possible implementation, the conditional probability of a target group within the N target weight sets of the target application is the ratio of the number of accurately predicted target weights in the target group to the total number of target weights in the target group. The accurately predicted target weights are the target weights corresponding to the time point and application identifier in the application usage data on day q. The target group is any one of the N target weight sets of the target application.
[0029] In this way, when the linear regression model is trained with the first training data, it can obtain an accurate linear relationship between the target weight of the application and the probability of application use output by the multi-way recall model.
[0030] In one possible implementation, the weight coefficients of the linear regression model satisfy the following formula:
[0031]
[0032] Where, x k Let be the average weight of the k-th target in the training data of the linear regression model. y is the average of the target weights in the training data of the linear regression model. k Let k be the conditional probability in the training data of the linear regression model. x is the average of the conditional probabilities in the training data of the linear regression model.k The corresponding group and y k The corresponding groups are the same, x k Corresponding applications and y k The corresponding applications are the same, n = P × N.
[0033] In this way, when the linear regression model is trained with the first training data, it can obtain an accurate linear relationship between the target weight of the application and the probability of application use output by the multi-way recall model.
[0034] In one possible implementation, the prediction accuracy of the linear regression model is greater than an accuracy threshold. The prediction accuracy of the linear regression model is calculated based on the predicted usage probability of each application in the K applications at the target time point on day q+1, obtained using the first model and the linear regression model, and the actual usage probability of each application in the K applications within a preset time period including the target time point on day q+1. The predicted usage probability of each application in the K applications at the target time point on day q+1 is obtained by inputting the application usage data from day M1 and the application usage data from day q into the first model, and then inputting the output of the first model into the linear regression model.
[0035] Thus, if the prediction accuracy of the linear regression model is greater than the accuracy threshold, it indicates that the trained linear regression model meets the requirements. By processing the target weights of the application using the linear regression model that meets the requirements, the conditional probability of the application can be obtained, and thus an accurate list of applications can be obtained.
[0036] In one possible implementation, the prediction accuracy of the linear regression model is the ratio of the sum of the predicted usage probabilities of P applications in K applications at the target time point on day q+1 to the sum of the actual usage probabilities of P applications in K applications within a preset time period including the target time point on day q+1.
[0037] This allows for the measurement of prediction accuracy based on the linear regression model, validating whether the trained linear regression model meets the requirements. For example, if the prediction accuracy of the linear regression model is greater than the accuracy threshold, it means the trained linear regression model meets the requirements. If the prediction accuracy of the linear regression model is less than or equal to the accuracy threshold, it means the trained linear regression model does not meet the requirements. The training data of the linear regression model can be updated, and the updated training data can be used to train the linear regression model until the prediction accuracy of the linear regression model is greater than the accuracy threshold.
[0038] In one possible implementation, the first model is a multi-path recall model, which includes a first-path recall, a second-path recall, and a third-path recall. The first-path recall includes a classification and regression tree CART algorithm, the second-path recall includes a recent hot recall algorithm, and the third-path recall includes a time decay algorithm.
[0039] In this way, the multi-path recall model takes into account users' long-term application usage habits, recent application usage habits, and real-time application usage habits, thus obtaining accurate target weights through the multi-path recall model.
[0040] In one possible implementation, the recall rates of each of the three recall paths in the multi-path recall model are updated daily, and the recall rate of each path is related to the weight of the first target.
[0041] This can further improve the accuracy of the target weights output by the multi-path recall model, making the resulting application list (such as the first application list or the second application list) more closely match the actual application usage of users.
[0042] Secondly, embodiments of this application provide an application control device, which can be an electronic device, or a chip or chip system within an electronic device. The application control device may include a display unit and a processing unit. When the application control device is an electronic device, the processing unit may be a processor. The application control device may also include a storage unit, which may be a memory. The storage unit stores instructions, and the processing unit executes the instructions stored in the storage unit to cause the electronic device to implement an application control method described in the first aspect or any possible implementation of the first aspect. When the application control device is a chip or chip system within an electronic device, the processing unit may be a processor. The processing unit executes the instructions stored in the storage unit to cause the electronic device to implement an application control method described in the first aspect or any possible implementation of the first aspect. The storage unit may be a storage unit within the chip (e.g., a register, cache, etc.), or a storage unit located outside the chip within the electronic device (e.g., a read-only memory, random access memory, etc.).
[0043] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, the memory for storing code instructions, and the processor for running the code instructions to perform the methods described in the first aspect or any possible implementation of the first aspect.
[0044] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program or instructions that, when executed on a computer, cause the computer to perform the methods described in the first aspect or any possible implementation thereof.
[0045] Fifthly, embodiments of this application provide a computer program product including a computer program, which, when run on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof.
[0046] Sixthly, this application provides a chip or chip system including at least one processor and a communication interface. The communication interface and the at least one processor are interconnected via a circuit. The at least one processor is used to run computer programs or instructions to perform the methods described in the first aspect or any possible implementation of the first aspect. The communication interface in the chip can be an input / output interface, pins, or circuits, etc.
[0047] In one possible implementation, the chip or chip system described above in this application further includes at least one memory storing instructions. The memory can be an internal storage unit of the chip, such as a register or cache, or it can be a storage unit of the chip itself (e.g., read-only memory, random access memory, etc.).
[0048] It should be understood that the second to sixth aspects of this application correspond to the technical solutions of the first aspect of this application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation are similar, and will not be repeated here. Attached Figure Description
[0049] Figure 1 A scenario diagram provided for an embodiment of this application;
[0050] Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;
[0051] Figure 3 A schematic diagram of the software architecture of the electronic device provided in the embodiments of this application;
[0052] Figure 4 This is a schematic flowchart of an application control method provided in an embodiment of this application;
[0053] Figure 5 A schematic diagram of the architecture of the multi-path recall model provided in the embodiments of this application;
[0054] Figure 6 A schematic diagram of multi-path recall fusion and ranking provided in the embodiments of this application;
[0055] Figure 7 This is a schematic diagram illustrating the training of the linear regression model provided in an embodiment of this application. Detailed Implementation
[0056] To facilitate a clear description of the technical solutions in the embodiments of this application, some terms and technologies involved in the embodiments of this application will be briefly introduced below:
[0057] 1. Conditional probability
[0058] Conditional probability can be understood as the probability of event A occurring given that event B has occurred. Event A is different from event B.
[0059] 2. Decision Tree Algorithm
[0060] Decision trees are widely used in classification and regression models and are tree-like structures used to classify instances. It's a typical classification method that first processes the data, using inductive algorithms to generate readable rules and decision trees, and then uses these rules to analyze new data. Essentially, a decision tree is a process of classifying data through a series of rules.
[0061] Common decision tree algorithms include classification and regression tree (CART) algorithms, as well as ID3 decision trees or C4.5 algorithms. CART algorithms support binary classification problems. The results of CART algorithms are all probability values; in classification cases, the Gini index minimization criterion is often used.
[0062] 3. Other terms
[0063] In the embodiments of this application, terms such as "first" and "second" are used to distinguish identical or similar items with substantially the same function and purpose. For example, "first chip" and "second chip" are used only to distinguish different chips and do not limit their order of execution. Those skilled in the art will understand that terms such as "first" and "second" do not limit the quantity or execution order, and that "first" and "second" do not necessarily imply that they are different.
[0064] It should be noted that, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0065] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, and c can be single or multiple.
[0066] When multiple applications are open on an electronic device, one of the applications can run in the foreground, while the others can run in the background.
[0067] For ease of understanding, combined with Figure 1 This section describes a scenario where one application runs in the foreground, while the other applications among multiple applications run in the background. Figure 1 This illustration shows a scenario diagram provided by an embodiment of this application.
[0068] Taking the following scenario as an example, if a file management app, SMS app, video app, WeChat app, TikTok app, map app, and Taobao app are opened on an electronic device, with the file management app running in the foreground and the SMS app, video app, WeChat app, TikTok app, map app, and Taobao app running in the background, the electronic device can display [data / display] when the file management app is running in the foreground. Figure 1 The image 'a' shows the interface of a file management application. For example... Figure 1 The interface shown in Figure 'a' displays a virtual navigation bar 101 at the bottom of the screen. The virtual navigation bar 101 contains multiple virtual controls, such as a back control, a home control, and function controls 102.
[0069] On electronic device display Figure 1 In the interface shown in Figure a, the user can click on the function control 102. In response to the user's click on the function control 102, the electronic device can display as shown in Figure a. Figure 1 The recent tasks screen 103 is shown as b in the diagram. The recent tasks screen 103 may contain previews of applications running in the background. Figure 1 The recent tasks interface 103 shown in Figure b only displays previews of the file management application, the SMS application, and the video application. (This is in contrast to the previews displayed on electronic devices.) Figure 1In the case of the interface shown in b, the user can swipe the screen left or right, so that the preview interface of other applications running in the background can be displayed on the recent tasks interface 103.
[0070] On electronic device display Figure 1 In the interface shown in b, the user can click on the blank area, and the electronic device can display... Figure 1 The desktop application interface shown in 'c' is an example. Figure 1 The interface shown in 'c' includes the icon 104 for recommended apps.
[0071] On electronic device display Figure 1 In the scenario shown in 'c', the user can make recommendations. A recommendation is, for example, clicking on icon 104. In response to a recommendation, the electronic device can obtain a set of applications the user might use within the time period corresponding to the recommendation.
[0072] In some implementations, in response to a recommendation, the electronic device uses a predictive model to obtain a list of predicted applications corresponding to the time of the recommendation. This list represents a list of applications the user might use within the time period of the recommendation. The electronic device then uses this predicted application list to detect and eliminate multiple applications running in the background.
[0073] The number of applications in the predicted application list is a preset fixed value. The prediction model sorts the applications used by the user before the recommended operation time according to their predicted weights, and then extracts a portion of the applications by a preset fixed value to obtain the predicted application list. The predicted weights are related to the order of application usage probabilities. This preset fixed value is the maximum number of applications used in each time period of the day.
[0074] Therefore, the number of applications in the predicted application list at different times obtained through the prediction model is the same. The applications in the predicted application list at different times can be shown in Table 1.
[0075] Table 1 shows the applications in the prediction application list for different time periods.
[0076]
[0077] It should be understood that the times shown in Table 1 can belong to the same day. The times shown in Table 1 can also belong to different days.
[0078] Table 1 shows the applications and their quantities in the predicted application lists for the first, second, third, and fourth time points. As shown in Table 1, the electronic device can use the prediction model to obtain the predicted application lists for different time points, and the number of applications in the predicted application lists for each time point is the same.
[0079] When using a predictive app list for background scanning, the number of apps running in the background after scanning can remain the same at different times. However, the number of apps a user uses may vary at different times. If a predictive app list is used to scan for background apps, apps that the user doesn't use may not be scanned, leading to higher power consumption and shorter battery life for the electronic device.
[0080] In view of this, embodiments of this application provide an application control method. In response to a recommended operation, the electronic device uses the application list corresponding to the time of the recommended operation to detect and eliminate background applications. The number of applications in the application list varies at different times, and the usage probability of each application in the application list is greater than a preset probability. This increases the probability that applications the user will not use will be eliminated, thereby reducing the power consumption of the electronic device. Furthermore, since the usage probability of applications in the application list used for background application elimination is greater than a preset threshold, using an application list to eliminate background applications reduces the probability that applications the user will use will be eliminated, thus improving the user experience.
[0081] The electronic devices in this application embodiment may include handheld devices, vehicle-mounted devices, etc., with application recommendation functions. For example, some electronic devices include: mobile phones, tablets, PDAs, laptops, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving vehicles, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to a wireless modem, in-vehicle devices, wearable devices, terminal devices in 5G networks, or future evolution of public land mobile communication networks. Terminal devices in a network (PLMN), etc., are not limited to this in the embodiments of this application.
[0082] By way of example and not limitation, in this embodiment, the electronic device can also be a wearable device. Wearable devices, also known as wearable smart devices, are a general term for devices that utilize wearable technology to intelligently design and develop everyday wearables, such as glasses, gloves, watches, clothing, and shoes. Wearable devices are portable devices that are worn directly on the body or integrated into the user's clothing or accessories. Wearable devices are not merely hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are feature-rich, large in size, and can achieve complete or partial functions without relying on a smartphone, such as smartwatches or smart glasses, as well as those that focus on a specific type of application function and require the use of other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.
[0083] Furthermore, in this embodiment of the application, the electronic device can also be a terminal device in the Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network of human-machine interconnection and object-to-object interconnection.
[0084] The electronic devices in the embodiments of this application may also be referred to as: terminal equipment, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent, or user device, etc.
[0085] In this embodiment, the electronic device or various network devices include a hardware layer, an operating system layer running on top of the hardware layer, and an application layer running on top of the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as Linux, Unix, Android, iOS, or Windows. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.
[0086] Figure 2 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown.
[0087] like Figure 2As shown, the electronic device 200 may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, a headphone jack 270D, a sensor module 280, buttons 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a subscriber identification module (SIM) card interface 295, etc. The sensor module 280 may include a pressure sensor 280A, a gyroscope sensor 280B, a barometric pressure sensor 280C, a magnetic sensor 280D, an accelerometer sensor 280E, a distance sensor 280F, a proximity sensor 280G, a fingerprint sensor 280H, a temperature sensor 280J, a touch sensor 280K, an ambient light sensor 280L, a bone conduction sensor 280M, etc.
[0088] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 200. In other embodiments of this application, the electronic device 200 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0089] For example, at a first time point, the processor 210 of the electronic device receives a first recommendation operation through the sensor module 280. In response to the first recommendation operation, the processor 210 can obtain a first application list corresponding to the first time point and use the first application list to detect and eliminate applications running in the background. The first application list includes m1 applications and information identifying the usage probability of each application among the m1 applications, and the usage probability of each application among the m1 applications is greater than a preset threshold.
[0090] If the usage probability of each of the m1 applications in the first application list is greater than a preset threshold, it can be said that the m1 applications in the first application list are applications that the user will use within the time period to which the first time point belongs.
[0091] This increases the probability that applications that users don't use will be detected and removed, thereby reducing the power consumption of electronic devices and also reducing the probability that applications that users do use will be detected and removed.
[0092] At the second time point, the processor 210 of the electronic device receives the second recommended operation through the sensor module 280. In response to the second recommended operation, the processor 210 obtains the second application list corresponding to the second time point and uses the second application list to detect and eliminate applications running in the background. The second application list includes m2 applications and information identifying the usage probability of each application among the m2 applications, where the usage probability of each application in the m2 applications is greater than a preset threshold; m1 and m2 are different; the second time point can be later than the first time point. The specific implementation principle of the processor 210 obtaining the second application list can be found in the specific implementation principle of the processor 210 obtaining the first application list. The technical effect of the processor 210 using the second application list to detect and eliminate applications running in the background is similar to that of the processor 210 using the first application list to detect and eliminate applications running in the background, and will not be elaborated further here.
[0093] As shown in the first and second application lists, the number of applications in the application lists varies at different times, and the usage probability of each application in the application lists is greater than a preset threshold. By using different application lists at different times to detect and eliminate applications running in the background, the probability of applications that the user does not use being detected and eliminated can be increased, thereby reducing the power consumption of the electronic device. Furthermore, the probability of applications that the user does use being detected and eliminated can also be reduced.
[0094] The software system of electronic device 200 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the invention uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100.
[0095] Figure 3 A schematic diagram of the software architecture of the electronic device provided in an embodiment of this application is shown.
[0096] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0097] The application layer can include a series of application packages.
[0098] like Figure 3As shown, the application package can include desktop management, sensing, recommendation, camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, SMS, and other applications (also referred to as apps). Among them, the recommendation app can be used for app recommendations. In some implementations, the recommendation app is called the app recommendation app, and the app recommendation app is simply called app recommendation.
[0099] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0100] like Figure 3 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, location-based services (LBS), etc.
[0101] A location manager can be used to obtain the current location of an electronic device. For example, it can obtain current Global Positioning System (GPS) data, Wi-Fi location data, and cell base station location data.
[0102] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
[0103] The core library consists of two parts: one part contains the functionalities that the Java language needs to call, and the other part is the Android core library. The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0104] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0105] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.
[0106] For example, when a user clicks on an application, the desktop management application can send an application click event to the sensing application. Based on the application click event, the sensing application can collect the current time and the application corresponding to the application click event, generating application usage data.
[0107] The application usage data can include the start time of the application running in the foreground and the application identifier. The application identifier can include the application name. The start time of the application running in the foreground can be the time when the user clicks the application to open it, or the time when the user clicks the application to switch from background to foreground operation. The application usage data can include the number of times the application is used. The number of times the application is used can be the same as the number of times the application starts running in the foreground. For example, if there are 5 start times for the application running in the foreground in the application usage data for time period X, then the number of times the application is used in time period X is 5.
[0108] At the first point in time, the user can perform the first recommended action. This first recommended action is, for example, clicking on a recommended app. The desktop management app can send an app click event to the recommended app. This app click event includes a timestamp representing the first point in time. The recommended app can identify that the first point in time belongs to the s-th time period of day t. The recommended app can obtain the app usage data corresponding to the s-th time period from the sensing app. The recommended app can then transmit the app usage data corresponding to the s-th time period to the application framework layer.
[0109] The application framework layer can input application usage data from the recommended applications into the first model. The first model can output multiple applications in the s-th time period of day t and the first target weight of each application. The application framework layer can then input the first target weight of each application into the second model. The second model outputs a list of first applications. The first target weight is related to the first usage probability. The first usage probability represents the application usage probability in the s-th time period of day t.
[0110] The application framework layer can transmit a first list of applications to the recommending application. The recommending application can then transmit this first list to the detection module, which is used to detect and eliminate background applications. The detection module can use this first list to detect and eliminate applications running in the background. This detection module can reside either at the application layer or the application framework layer. The detection module is not located at... Figure 3 As shown in the image.
[0111] At a second time point, the user can perform a second recommended action. This second recommended action might be, for example, clicking on a recommended application. The second time point can be later than or earlier than the first time point. In response to the second recommended action, the recommended application can obtain a second application list transmitted from the application framework layer. The recommended application can then transmit this second application list to the detection module. The detection module can then use this second application list to detect and eliminate applications running in the background.
[0112] The specific implementation principle of the recommended application obtaining the second application list is similar to that of the recommended application obtaining the first application list, and will not be elaborated here.
[0113] As shown in the first and second application lists, the number of applications in the application lists varies at different times, and the usage probability of each application in the application lists is greater than a preset threshold. By using different application lists at different times to detect and eliminate applications running in the background, the probability of applications that the user does not use being detected and eliminated can be increased, thereby reducing the power consumption of the electronic device. Furthermore, the probability of applications that the user does use being detected and eliminated can also be reduced.
[0114] Figure 4 A schematic diagram of an application control method provided in an embodiment of this application is shown.
[0115] like Figure 4 As shown, the method includes:
[0116] S401. Electronic devices obtain the training set model features corresponding to the prediction period.
[0117] For example, consider the s-th time period of day t as an example. An electronic device can receive a first recommendation operation. Upon receiving the first recommendation operation, the electronic device can identify that the time of the first recommendation operation belongs to the s-th time period of day t and obtain the first data corresponding to the s-th time period of day t. Since the feature type in the first data is the same as the feature type of the training set model, the first data can also be referred to as the training set model feature corresponding to the s-th time period of day t. It can be understood that the first data can also be understood as the training set model feature corresponding to the time of the first recommendation operation.
[0118] For example, the first data may include first long-term data, first recent data, and first real-time data.
[0119] The first long-term data includes application usage data from L days prior to day t, within the s-th time period. L can be 90, 60, 30, or other values.
[0120] The most recent data includes application usage data from days t prior to the application in the s-th time period. L > U. U can be 3, or other values such as 5, 7, 10, or 15.
[0121] The first real-time data includes application usage data from the R times the application was used before the first recommended operation. R can be 5, or other values such as 7, 10, or 12. The R times the application was used can be understood as the number of times the application started running in the foreground, or as the sum of the number of times the application was started and the number of times the application was switched from background to foreground running.
[0122] Taking the first recommended operation time as 10:10 on December 14th, with L = 90, U = 3, and R = 5 as an example, the s-th time period on day t can be 10:00-10:30 on December 14th. The first data can be shown in Table 2.
[0123] Table 2 shows the first data.
[0124]
[0125] As shown in Table 2, the first long-term data may include application usage data for the s-th time period of each day in the 90 days prior to day t. The first recent data may include application usage data for the s-th time period of each day in the 3 days prior to day t. The first real-time data may include application usage data for the 5 times the application was used before the first recommended operation time on day t (e.g., 10:10 on December 14th). The format of the application usage data can be found in Table 2, showing the format of the application usage data for the 5 times the application was used before the first recommended operation time on day t. For example, "12.13 24:00, Application A" indicates that the application named Application A started running in the foreground at 24:00 on December 13th.
[0126] It is understandable that day t-1 represents a day preceding day t and adjacent to day t. Day t-2 represents a day preceding day t-1 and adjacent to day t-1. Day t-3 represents a day preceding day t-2 and adjacent to day t-2. Day t-4 represents a day preceding day t-3 and adjacent to day t-3. Day t-5 represents a day preceding day t-4 and adjacent to day t-4. Day t-88 represents a day preceding day t-87 and adjacent to day t-87. Day t-89 represents a day preceding day t-88 and adjacent to day t-88. Day t-90 represents a day preceding day t-89 and adjacent to day t-89.
[0127] Optionally, taking the first recommended operation time as the s-th time period of day t as an example, if day t is a workday, then the first long-term data can include application usage data for the s-th time period of workdays in the L days prior to day t. The first recent data can include application usage data for the s-th time period of workdays in the U days prior to day t. The first real-time data can include application usage data for the R times the application was used before the first recommended operation time on day t. All R times the application was used before the first recommended operation time on day t are workday times.
[0128] Optionally, taking the example where the first recommended operation time is on day t and the first time period is the s-th time period of day t, if day t is a holiday, then the first long-term data can include application usage data for the s-th time period of holidays in the L days prior to day t. The first recent data can include application usage data for the s-th time period of holidays in the U days prior to day t. The first real-time data can include application usage data for the R times the application was used before the first recommended operation time on day t. All R times the application was used before the first recommended operation time on day t are holidays.
[0129] S402. The electronic device uses the first model to perform predictive inference and obtains multiple applications for the prediction period and the target weights of each application in the multiple applications.
[0130] For example, given the training set model features corresponding to the prediction period, the electronic device can input these features into a first model. The first model can then output multiple applications for the prediction period and the target weights of each application. The target weights of the applications are related to their usage probabilities, thus enabling the determination of application usage probabilities based on these target weights.
[0131] For example, upon obtaining the first data, the electronic device can input the first data into a first model, and the first model can output multiple applications corresponding to the s-th time period on day t, and the first target weight of each application among the multiple applications. It can be understood that the multiple applications corresponding to the s-th time period on day t, and the first target weight of each application among the multiple applications, can also be referred to as the multiple applications corresponding to the first recommendation operation time, and the first target weight of each application among the multiple applications.
[0132] For example, the first model can be a multi-path recall model. A multi-path recall model can include a recall layer and a ranking layer. The recall layer can include a first-path recall, a second-path recall, and a third-path recall. The first-path recall uses the Classification and Regression Tree (CART) algorithm. The second-path recall uses the most recent recall algorithm. The third-path recall uses the time decay algorithm. The recall layer is used to quickly filter through a set of tens of millions of candidate options (or features) to obtain a feature set at the thousand-level or even hundred-level. The ranking layer is used to uniformly score and rank the results of the multi-path recall in the recall layer, selecting the best few (TopK). The ranking layer's uniform scoring of the results of the multi-path recall in the recall layer can also be called multi-path recall fusion. Figure 5 The architecture diagram of the multi-path recall model is shown. Figure 6 This diagram illustrates how the ranking layer performs multi-path recall fusion and ranking on the results of multi-path recall in the recall layer. For ease of understanding, Figure 5 and Figure 6 This will be explained later.
[0133] Electronic devices can input the first long-term data into the classification and regression tree (CART) of a multi-path recall model to obtain the first probability value of each application in the first long-term data. Based on the first probability value and the first recall rate of each application, the electronic device can calculate the first weight of each application.
[0134] Here, the first-path recall rate represents the proportion of the first-path recall in the overall recall ranking. The first weight of an application can be obtained by multiplying the first probability value of the application by the first-path recall rate. For example, the first weight of application A can be obtained by multiplying the first probability value of application A by the first-path recall rate.
[0135] Electronic devices can input first recent data into a recent hot recall algorithm to obtain a second probability value for each application in the first recent data. Based on the second probability value and second recall rate of each application, the electronic device can calculate a second weight for each application. For example, the recent hot recall algorithm can determine the first probability of each application as the proportion of its usage frequency in the first recent data to the sum of the total usage frequency of all applications in the first recent data. For instance, if an application is used 60 times in the first recent data, including 12 times for Notes, 6 times for Video, 6 times for Email, 5 times for Settings, 3 times for Weather, and 3 times for Clock, the second probability value can be determined as 0.2 for Notes, 0.1 for Video, 0.1 for Email, 0.083 for Settings, 0.05 for Weather, and 0.05 for Clock.
[0136] Here, the second-path recall rate represents the proportion of the second-path recall among all path rankings. The second weight of an application can be obtained by multiplying the application's second probability value by the second-path recall rate. For example, the second weight of application A can be obtained by multiplying the second probability value of application A by the second-path recall rate.
[0137] The electronic device can input the first real-time data into a time decay algorithm to obtain the third probability value of each application in the first real-time data. Based on the third probability value and the third-way recall of each application, the electronic device can calculate the third weight of each application.
[0138] Among them, the third probability value of the f-th application in the first real-time data satisfies the formula: δ(T) f Let T be the time interval for the f-th application. f The attenuation value of T. f εf is the time difference between the moment the f-th application starts running in the foreground and the moment of the first recommended action. ε0 is the initial decay value. θ is the exponential decay constant. l represents the leftward shift, allowing the value to continue decaying from any position instead of starting from ε0. ε0, θ, and l can all be values obtained through pre-training of the electronic device. Third-way recall represents the proportion of third-way recall in all-way rankings. The third weight of an application can be obtained by multiplying the third probability value of the application by the third-way recall. For example, the third weight of application A can be obtained by multiplying the third probability value of application A by the third-way recall.
[0139] Having obtained the first weight, second weight, and third weight of each application output by the recall layer, the electronic device can obtain the first target weight of each application based on these weights. For example, the first target weight of an application is the sum of its first weight, second weight, and third weight. For instance, the first target weight of application A is the sum of its first weight, second weight, and third weight.
[0140] For example, the first recall rate, the second recall rate, and the third recall rate can all be preset.
[0141] Optionally, the first, second, and third recall rates can also be dynamically calculated using the recall rate for each route.
[0142] For example, the first-path recall, second-path recall, and third-path recall can also be obtained by training the multi-path recall model daily using daily updated second training data on the electronic device. The second training data may include application usage data from L days prior to the date to which the multi-path recall model was trained.
[0143] The sum of the first-path recall rate, the second-path recall rate, and the third-path recall rate can be greater than 1, or less than or equal to 1.
[0144] It is understandable that the target weight of each application corresponding to the s-th time period on day t can also be called the first target weight of each application.
[0145] For example, multiple applications for a prediction period and the target weights of each application within those applications can be represented in the following format: {'com.aaaa.m':3.847,'com.bbbb.we':3.543,'com.hihonor.elink':1.685,'com.hihonor.systemmanager':1.06,'com.dddd.searchbox':0.564}.
[0146] Here, 'com.aaaa.m':3.847 can indicate that the target weight of the application with the application identifier com.aaaa.m is 3.847.
[0147] 'com.bbbb.we':3.543 indicates that the target weight of the application with the application identifier com.bbbb.we is 3.543.
[0148] 'com.hihonor.elink':1.685 indicates that the target weight of the application with the application identifier com.hihonor.elink is 1.685.
[0149] 'com.hihonor.systemmanager':1.06 indicates that the target weight of the application with the application identifier com.hihonor.systemmanager is 1.06.
[0150] 'com.dddd.searchbox':0.564 indicates that the target weight of the application with the application identifier com.dddd.searchbox is 0.564.
[0151] The multi-path recall model described above employs three recall methods to learn users' long-term, recent, and real-time application (APP) usage habits, and also uses recall rate for each path to achieve multi-path recall fusion. Thus, the multi-path recall model in this embodiment comprehensively considers users' long-term application usage habits, recent application usage habits, and real-time application usage habits. By considering long-term, recent, and real-time data, accurate target weights can be obtained.
[0152] Because the correlation between the target weights of each application and the usage probability of each application during the prediction period obtained by the multi-path recall model is unknown, the specific value of the application's target weight cannot be used to represent the specific value of the application's usage probability. The usage probability of an application during the prediction period can be understood as the probability that the application is used during the prediction period. In the embodiments of this application, the usage probability can also be referred to as the application usage probability.
[0153] If we obtain the usage probability of each application among multiple applications in the prediction period based on the target weight of each application, and then use the applications with higher usage probabilities to form an application list for background application detection and removal, we can increase the probability of applications that users will not use during the prediction period being detected and removed, reduce the power consumption of electronic devices, and also reduce the probability of applications that users will use being detected and removed, thereby improving the user experience.
[0154] Therefore, when using a multi-path recall model to obtain the target weights of each application in multiple applications during the prediction period, the electronic device can execute S403 to obtain the usage probability of each application in multiple applications during the prediction period.
[0155] Furthermore, since the sum of the first, second, and third recall rates may be greater than 1, the recall rates of each channel in the multi-channel recall model are updated daily to improve the prediction accuracy. When the sum of the first, second, and third recall rates is greater than 1, the target weights of each application output by the multi-channel recall model on different days may have different ranges, and these ranges may change daily. Given that the target weight ranges of each application may change daily, it is impossible to select applications with high user usage probabilities from the multiple applications output by the multi-channel recall model using a preset threshold. Therefore, it is necessary to process the target weights (as in step S403) after obtaining the target weights of each application among the multiple applications in the prediction period using the multi-channel recall model to obtain the usage probability of each application among the multiple applications in the prediction period.
[0156] S403. The electronic device uses a second model to process multiple applications and the target weights of each application in the multiple applications during the prediction period output by the first model, and obtains multiple applications and the usage probability of each application in the multiple applications during the prediction period.
[0157] For example, the second model may include a linear regression model and a normalized model. The electronic device inputs the multiple applications for the prediction period and the target weights of each application in the multiple applications, which are output by the first model, into the linear regression model. The linear regression model outputs the multiple applications for the prediction period and the conditional probabilities of each application in the multiple applications.
[0158] Since conditional probability can represent unnormalized usage probabilities, to facilitate the selection of applications with usage probabilities greater than a preset threshold from multiple applications to form an application list, the electronic device can input the first conditional probabilities of each application from the linear regression model into a normalization model to obtain the usage probabilities of each application from the normalized model. It can be understood that the usage probabilities output by the normalized model are normalized usage probabilities. The normalized usage probabilities can be values between 0 and 1. The normalized usage probabilities can be equal to 0 or 1.
[0159] For example, given multiple applications output by the first model and the first target weights of each application in the multiple applications, the electronic device can use the least squares algorithm of the linear regression model to calculate the first target weights of each application in the multiple applications, thereby obtaining the first conditional probabilities of each application in the multiple applications.
[0160] Given the first conditional probability of each application in multiple applications, the electronic device uses the normalized exponential function (softmax) of the normalized model to calculate the first conditional probability of each application in multiple applications, so as to obtain the first usage probability of each application in multiple applications, so that the electronic device can subsequently select applications with a first usage probability greater than a preset threshold from multiple applications to form a first application list.
[0161] For example, the first recommended operation time is the j-th time point of day t.
[0162] First conditional probability Y i,tj It satisfies the following formula (1):
[0163] Y i,tj =bZ i,tj +a (1)
[0164] Among them, Z i,tj Z represents the first objective weight of the i-th application corresponding to the j-th time point on day t, where a is the weight coefficient of the linear regression model and b is the weight coefficient of the linear regression model. i,tj It can also be understood as the first target weight of the i-th application in the s-th time period of day t.
[0165] First probability of use g(Y) i,tj It satisfies the following formula (2):
[0166]
[0167] Among them, Y i,tjLet e be the first conditional probability obtained based on the first target weight of the i-th application corresponding to the j-th time point on day t, where e is a natural constant.
[0168] It is understandable that the probability of first use of multiple applications and each application within those applications corresponding to the s-th time period on day t can also be referred to as the probability of first use of multiple applications and each application within those applications corresponding to the first recommended operation time. The list of first applications corresponding to the s-th time period on day t can also be referred to as the list of first applications corresponding to the first recommended operation time.
[0169] The weight coefficients of the linear regression model can be obtained by training the linear regression model using the first training data on the electronic device. A detailed description of how the electronic device trains the linear regression model using the first training data will follow. Figure 7 Description of the illustrated embodiment. For ease of understanding, Figure 7 The illustrated embodiments will be described later.
[0170] For example, the usage probability of multiple applications during the prediction period and the usage probability of each application among the multiple applications can be represented in the following format: {'com.aaaa.m':0.98,'com.bbbb.we':0.97,'com.hihonor.elink':0.734,'com.hihonor.systemmanager':0.547,'com.dddd.searchbox':0.385}.
[0171] Here, 'com.aaaa.m':0.98 can indicate that the probability of using the application with the application identifier com.aaaa.m is 0.98.
[0172] 'com.bbbb.we':0.97 indicates that the probability of using the application with the application identifier com.bbbb.we is 0.97.
[0173] 'com.hihonor.elink':0.734 indicates that the probability of using an application with the application identifier com.hihonor.elink is 0.734.
[0174] 'com.hihonor.systemmanager':0.547 indicates that the probability of using an application with the application identifier com.hihonor.systemmanager is 0.547.
[0175] 'com.dddd.searchbox':0.385 indicates that the probability of using the application with the application identifier com.dddd.searchbox is 0.385.
[0176] S404. The electronic device selects applications with a usage probability greater than a preset threshold from multiple applications corresponding to the predicted time period to obtain a list of applications corresponding to the predicted time period.
[0177] For example, when an electronic device obtains multiple applications and the first usage probability of each application among the multiple applications, the electronic device can select applications whose first usage probability is greater than a preset threshold from the multiple applications, and can sort the selected applications in order of their first usage probabilities to obtain a first application list.
[0178] For example, when an electronic device obtains multiple applications and the first usage probability of each application in the multiple applications, the electronic device can determine whether the first usage probability of an application in the multiple applications is greater than a preset threshold.
[0179] If the probability of an application being used for the first time is greater than a preset threshold, then the application is retained.
[0180] If the first usage probability of an application is less than or equal to a preset threshold, the application will not be retained or will be deleted.
[0181] When an electronic device determines whether the first usage probability of an application in multiple applications is greater than a preset threshold, the electronic device can sort the applications whose first usage probability is greater than the preset threshold according to the order of their first usage probabilities, and obtain a first application list.
[0182] Optionally, when the electronic device obtains multiple applications and the first usage probability of each application, it can sort the applications according to the order of their first usage probabilities to obtain a first sorted list. The electronic device can then remove applications from the first sorted list whose first usage probability is less than or equal to a preset threshold, thus obtaining a first application list.
[0183] For example, when a first sorted list is obtained, the electronic device can determine whether the first usage probability of an application in the first sorted list is greater than a preset threshold.
[0184] If the probability of an application being used for the first time is greater than a preset threshold, then the application is retained.
[0185] If the first usage probability of an application is less than or equal to a preset threshold, the application will not be retained or will be removed from the first sorting list.
[0186] In this way, electronic devices can obtain a first list of applications.
[0187] For example, the preset threshold can be any of 0.6, 0.8, or 0.9. The preset threshold can also be other values.
[0188] The usage probabilities of all applications in the first application list obtained in this step are greater than the preset threshold, which means that the applications in the first application list are applications that the user is likely to use in the s-th time period on day t. By using the first application list to detect and kill applications running in the background, the probability of applications that the user will not use in the s-th time period on day t being detected and killed can be increased, reducing the power consumption of electronic devices. It can also reduce the probability of applications that the user will use in the s-th time period on day t being detected and killed.
[0189] S405. Electronic devices use a list of applications corresponding to the predicted time period to detect and kill applications running in the background.
[0190] For example, given a first application list, an electronic device can use the first application list to detect and kill applications running in the background, thereby reducing the power consumption of the electronic device.
[0191] The application control method provided in this application embodiment, upon receiving a first recommendation operation, allows an electronic device to obtain first data corresponding to the s-th time period of the t-th day to which the first recommendation operation occurs. This first data is then input into a multi-path recall model to obtain multiple applications corresponding to the s-th time period of the t-th day and the first target weight of each application within those applications. The electronic device's linear regression model processes the first target weights of each application within the multiple applications corresponding to the s-th time period of the t-th day to obtain the first conditional probability of each application within those applications. The electronic device's normalization model normalizes the first conditional probabilities of each application within the multiple applications corresponding to the s-th time period of the t-th day to obtain the first usage probability of each application within those applications. The electronic device can then select applications with a first usage probability greater than a preset threshold from the multiple applications output by the normalization model corresponding to the s-th time period of the t-th day to obtain a first application list. The electronic device can use this first application list to detect and eliminate applications running in the background. The fact that the first usage probability of each application in the first application list is greater than the preset threshold indicates that the applications in the first application list are applications that the user is highly likely to use. This can increase the probability of apps that users don't use being detected and removed, reduce the power consumption of electronic devices, and also reduce the probability of apps that users do use being detected and removed.
[0192] Figure 5 A schematic diagram of the architecture of the multi-path recall model provided in an embodiment of this application is shown.
[0193] like Figure 5As shown, the multi-path recall model includes a recall layer and a ranking layer. The recall layer can include a first-path recall using the Classification and Regression Tree (CART) algorithm, a second-path recall using the most recent popular recall algorithm, and a third-path recall using the time decay algorithm. The first-path recall can be called CART decision tree recall. The second-path recall can be called most recent popular recall. The third-path recall can be called recently used recall.
[0194] In possible implementations, the electronic device may be in a cold start phase or in a normal processing phase.
[0195] For example, taking the first recommended operation time as the s-th time period of day t as an example, if the sum β of the application usage in the first time period of the L days prior to day t satisfies 201≤β≤800, then the electronic device is in the cold start phase. For example, if the number of days from the date the user first uses the electronic device to day t is less than or equal to U, it can also indicate that the electronic device is in the cold start phase.
[0196] If the sum of application usage β over the first time period of L days prior to day t satisfies 800 < β, then the electronic device is in the cold start phase. For example, if the number of days from the date the user first uses the electronic device to day t is greater than U, it can also indicate that the electronic device is in the normal start phase.
[0197] Optionally, the way in which an electronic device in the normal phase obtains multiple applications and the target weights of each application in the prediction period can be different from the way in which an electronic device in the cold start phase obtains multiple applications and the target weights of each application in the prediction period.
[0198] For example, let's take the first recommended operation time as the s-th time period of day t as an example.
[0199] In scenarios where the electronic device is in a normal operating state, if the electronic device receives the first recommended operation, such as Figure 4 As shown in S402 of the embodiment, the electronic device can use the three-way recall in the multi-way recall model to process the first long-term data, the first recent data and the first real-time data, and perform multi-way recall fusion on the results of the three-way recall to obtain multiple applications corresponding to the s-th time period on the t-th day and the first target weight of each application in the multiple applications.
[0200] For example, the first data obtained by the electronic device may include a dataset representing first long-term data, a dataset representing first recent data, and a dataset representing first real-time data. When the electronic device obtains the first data, if it identifies that the date corresponding to the first long-term data is different from the date corresponding to the first recent data, or that the number of dates corresponding to the first long-term data is greater than the number of dates corresponding to the first recent data, it can be indicated that the electronic device is in a normal state. The electronic device can then mark the dataset representing the first long-term data as a first identifier, the dataset representing the first recent data as a second identifier, and the dataset representing the first real-time data as a third identifier. When the electronic device inputs the first data into a preset model, a first-path recall can process the dataset with the first identifier, a second-path recall can process the dataset with the second identifier, and a third-path recall can process the dataset with the third identifier. In this way, the electronic device can obtain the first weight, the second weight, and the third weight of each application output by the recall layer.
[0201] In scenarios where electronic devices are in a cold start phase, when an electronic device receives the first recommended operation, since the number of days from the user's first use of the electronic device to day t is less than or equal to U, when the electronic device obtains the first data, if the electronic device identifies that the date corresponding to the first long-term data in the first data is the same as the date corresponding to the first recent data, or the number of dates corresponding to the first long-term data in the first data is the same as the number of dates corresponding to the first recent data, it can be indicated that the electronic device is in a cold start phase, or it can be indicated that the first long-term data and the first recent data are the same. The electronic device can clear the data set representing the first long-term data, mark the data set representing the first recent data as a second identifier, and mark the data set representing the first real-time data as a third identifier.
[0202] When the electronic device inputs the first data into a preset model, the second recall can process the data set with the second identifier to obtain the second weight of each application corresponding to the first recent data. The third recall can process the data set with the third identifier to obtain the third weight of each application corresponding to the first real-time data.
[0203] In the multi-path recall model, the ranking layer adds the second weight and the third weight of the application to obtain the first target weight of the application.
[0204] The specific implementation principle of the second weight of the application can be found in [link to relevant documentation]. Figure 4 For details on the implementation principles of the second weight applied in S402, and the implementation principles of the third weight applied, please refer to [link to relevant documentation]. Figure 4The specific implementation principle of the third weight applied in S402 will not be elaborated here.
[0205] Because the first-path recall has a requirement for the amount of data to be processed, if the amount of data processed by the first-path recall is less than or equal to the amount of data processed by the second-path recall, the accuracy of the processing results obtained by the first-path recall may be poor. However, in the cold start phase of an electronic device, the amount of the first long-term data is the same as the amount of the first recent data; the amount of the first long-term data does not meet the requirement for the amount of data to be processed by the first-path recall. Therefore, in the scenario where the electronic device is in the cold start phase, clearing the first long-term data and having the multi-path recall model process the first recent data and the first real-time data to obtain the first target weight for each application can reduce the impact of the low accuracy of the processing results obtained by the first-path recall on the accuracy of the first target weight for each application, thereby obtaining accurate first target weights for each application.
[0206] Optionally, if the electronic device obtains multiple applications and the target weights of each application in the prediction period through the first model, the electronic device can sort the multiple applications according to the size of the target weights through the sorting layer in the first model, and input the sorted multiple applications and the target weights of each application in the multiple applications into the second model for processing.
[0207] Figure 6 This illustration shows a schematic diagram of a multi-path recall fusion and sorting model provided in an embodiment of this application.
[0208] like Figure 6 As shown, taking the applications corresponding to the first data as including WeChat, online meeting and Zhihu applications, the multi-path recall model has a first-path recall rate of 0.5, a second-path recall rate of 0.3 and a third-path recall rate of 0.2 as an example.
[0209] Given initial data from an electronic device, the device can input this data into a multi-path recall model. CART decision tree recall processes the first long-term data from the initial dataset, yielding a probability value of 0.2 for WeChat, 0.3 for online meeting applications, and 0.1 for Zhihu applications. Recent popularity recall processes the first recent data from the initial dataset, yielding a probability value of 0.5 for WeChat, 0.2 for online meeting applications, and 0.3 for Zhihu applications. Recent usage recall processes the first real-time data from the initial dataset, yielding a probability value of 0.1 for WeChat, 0.6 for online meeting applications, and 0.1 for Zhihu applications.
[0210] Having obtained the first probability values for each of the three recalled applications (WeChat, online meeting, and Zhihu) from the recall layer, the recall layer can transmit these first probability values to the ranking layer. Based on the first probability values, the first-path recall rate, the second-path recall rate, and the third-path recall rate, the ranking layer obtains the following first target weights: WeChat application 0.27, online meeting application 0.33, and Zhihu application 0.16.
[0211] like Figure 6 As shown, the first target weight of the WeChat application is 0.27 = 0.2 × 0.5 + 0.5 × 0.3 + 0.1 × 0.2, which represents the first probability value of the WeChat application obtained by CART decision tree recall × the first path recall rate + the first probability value of the WeChat application obtained by recent popular recall × the second path recall rate + the first probability value of the WeChat application obtained by recent use recall × the third path recall rate.
[0212] In some implementations of this application, when the ranking layer obtains multiple applications and the first target weight of each application within those applications, the ranking layer can sort the multiple applications according to the order of their first target weights, and then input the sorted applications and their first target weights into a second model for processing. For example, if the ranking layer obtains a first target weight of 0.27 for the WeChat application, 0.33 for the online meeting application, and 0.16 for the Zhihu application, the ranking layer can sort the multiple applications according to their first target weights, obtaining the first target weights of each application within the multiple applications, and also obtaining the sorted applications as follows: Online Meeting Application > WeChat > Zhihu.
[0213] Figure 7 A schematic diagram illustrating the training of the linear regression model provided in an embodiment of this application is shown.
[0214] like Figure 7 As shown, the training process for a linear regression model may include:
[0215] S701, electronic devices can obtain training set features.
[0216] For example, the training set features may include application usage data for M1 days. An electronic device can obtain M1 days of application usage data from multiple days of application usage data recorded by the electronic device. Here, M1 and L can be the same or different. For example, M1 ≤ L. For instance, M1 can be 30.
[0217] S702, electronic devices can input training set features into a multiplexed recall model.
[0218] For example, the electronic device inputs the application usage data from day M1 into a multi-path recall model, and controls the multi-path recall model to output multiple applications corresponding to each time point on day q, and the target weight of each application among the multiple applications. Here, day q is after day M1.
[0219] For example, if day q is December 12th and M1 equals 30, the training set features include application usage data for the 30 days prior to December 12th.
[0220] S703, the electronic device can obtain multiple applications corresponding to each time point in the multiple time points output by the multi-way recall model, and the target weight of each application in the multiple applications.
[0221] For example, consider 100 time points on day q.
[0222] When an electronic device inputs application usage data from the 30 days prior to December 12th into a multi-channel recall model, and controls the multi-channel recall model to output multiple applications and their target weights for each of the 100 time points on day q, the electronic device can obtain the multiple applications and their target weights for each of the 100 time points on day q, as output by the multi-channel recall model. Table 3 shows the multiple applications and their target weights for each of the 100 time points on day q.
[0223] Table 3 shows the target weights Zij of each application in the multiple applications corresponding to each of the 100 time points on day q.
[0224] Time point 1 Time point 2 Time point 3 … Time point 100 Application 1 Z 11 ]]> Z 12 ]]> Z 13 ]]> … Z 1100 ]] Application 2 Z 21 ]]> Z 22 ]]> Z 23 ]]> … Z 2100 ]]> Application 3 <![CDATA[Z 31 ]]> <![CDATA[Z 32 ]]> <![CDATA[Z 33 ]]> … <![CDATA[Z 3100 ]]> Application 4 <![CDATA[Z 41 ]]> <![CDATA[Z 42 ]]> <![CDATA[Z 43 ]]> … <![CDATA[Z 4100 ]]> Application 5 <![CDATA[Z 51 ]]> <![CDATA[Z 52 ]]> <![CDATA[Z 53 ]]> … <![CDATA[Z 5100 ]]> Application 6 <![CDATA[Z 61 ]]> <![CDATA[Z 62 ]]> <![CDATA[Z 63 ]]> … <![CDATA[Z 6100 ]]> Application 7 <![CDATA[Z 71 ]]> <![CDATA[Z 72 ]]> <![CDATA[Z 73 ]]> … <![CDATA[Z 7100 <!-- 20 -->]]> Application 8 <![CDATA[Z 81 ]]> <![CDATA[Z 82 ]]> <![CDATA[Z 83 ]]> … <![CDATA[Z 8100 ]]> Application 9 <![CDATA[Z 91 ]]> <![CDATA[Z 92 ]]> <![CDATA[Z 93 ]]> … <![CDATA[Z 9100 ]]> Application 10 <![CDATA[Z 101 ]]> <![CDATA[Z 102 ]]> <![CDATA[Z 103 ]]> … <![CDATA[Z 10100 ]]> Application 11 <![CDATA[Z 111 ]]> <![CDATA[Z 112 ]]> <![CDATA[Z 113 ]]> … <![CDATA[Z 11100 ]]> … … … … … … Application v <![CDATA[Z v1 ]]> <![CDATA[Z v2 ]]> <![CDATA[Z v3 ]]> … <![CDATA[Z v100 ]]>
[0225] Where i is the application number, and j is the time point number. For example, Z 12 Z represents the target weight of application 1 corresponding to time point 2. 12 This can be represented as application number 1 and time point number 2.
[0226] S704. Electronic devices construct sample points to obtain training data for the linear regression model.
[0227] For example, the electronic device can select target weights for P applications from Table 1. The electronic device can also select application usage data at 100 time points on day q from the recorded application usage data. The 100 time points on day q are the same as the 100 time points shown in Table 3.
[0228] The electronic device uses P target weights for each application and application usage data at 100 time points on day q to construct sample points, thus obtaining the first training data.
[0229] Taking P=10 as an example, the target weights of the P applications are shown in Table 4. The application usage data at 100 time points on day q are shown in Table 5.
[0230] Table 4 shows the target weights Zij for each of the P applications.
[0231] Time point 1 Time point 2 Time point 3 … Time point 100 Application 1 <![CDATA[Z 11 ]]> <![CDATA[Z 12 ]]> <![CDATA[Z 13 ]]> … <![CDATA[Z 1100 ]]> Application 2 <![CDATA[Z 21 ]]> <![CDATA[Z 22 ]]> <![CDATA[Z 23 ]]> … <![CDATA[Z 2100 ]]> Application 3 <![CDATA[Z 31 ]]> <![CDATA[Z 32 ]]> <![CDATA[Z 33 ]]> … <![CDATA[Z 3100 ]]> Application 4 <![CDATA[Z 41 ]]> <![CDATA[Z 42 ]]> <![CDATA[Z 43 ]]> … <![CDATA[Z 4100 ]]> Application 5 <![CDATA[Z 51 ]]> <![CDATA[Z 52 ]]> <![CDATA[Z 53 ]]> … <![CDATA[Z 5100 ]]> Application 6 <![CDATA[Z 61 ]]> <![CDATA[Z 62 ]]> <![CDATA[Z 63 ]]> … <![CDATA[Z 6100 ]]> Application 7 <![CDATA[Z 71 ]]> <![CDATA[Z 72 ]]> <![CDATA[Z 73 ]]> … <![CDATA[Z 7100 ]]> Application 8 <![CDATA[Z 81 ]]> <![CDATA[Z 82 ]]> <![CDATA[Z 83 ]]> … <![CDATA[Z 8100 ]]> Application 9 <![CDATA[Z 91 ]]> <![CDATA[Z 92 ]]> <![CDATA[Z 93 ]]> … <![CDATA[Z 9100 ]]> Application 10 <![CDATA[Z 101 ]]> <![CDATA[Z 102 ]]> <![CDATA[Z 103 ]]> … <![CDATA[Z 10100 ]]>
[0232] Table 5 shows the application usage data for 100 time points on day q.
[0233]
[0234] The electronic device can sort the target weights of the target applications in Table 4 according to their magnitude, thus obtaining a target weight sequence for each application. The target application can be any application in Table 4. In this way, the electronic device can obtain the target weight sequence for each application in Table 4.
[0235] The electronic device divides the target weight sequence of the target application into N equal segments, resulting in N sets of target weights for the target application. Each of the N sets of target weights for the target application has the same number of target weights. For example, with N=10, the target application is application 1, and the target weight sequence of application 1 is [Z...]. 11 Z 13 Z 120 Z 115 Z 131 Z 132 Z 133 Z 134 Z 135 Z 136 Z 137 Z 138 Z 139 Z 140 Z 141 Z 160 Z 161 Z 162 Z 12 Z 13 , ..., Z 150 For example, an electronic device can divide the target weight sequence of Application 1 into 10 equal segments, resulting in 10 sets of target weights for Application 1. These 10 sets of target weights for Application 1 include: the first set, the second set, the third set, ..., the tenth set. The first set of Application 1 includes the first through tenth target weights in the target weight sequence of Application 1. For example, the first set of Application 1 includes: Z... 11 Z 13 Z 120 Z 115 Z131 Z 132 Z 133 Z 134 Z 135 and Z 136 The second group of Application 1 includes the 11th to 20th target weights in the target weight sequence of Application 1. For example, the second group of Application 1 includes: Z 137 Z 138 Z 139 Z 140 Z 141 Z 160 Z 161 Z 162 Z 12 and Z 13 Group 3 of Application 1 includes the 21st to 30th target weights in the target weight sequence of Application 1. Group 4 of Application 1 includes the 31st to 40th target weights in the target weight sequence of Application 1. Group 5 of Application 1 includes the 41st to 50th target weights in the target weight sequence of Application 1. Group 6 of Application 1 includes the 51st to 60th target weights in the target weight sequence of Application 1. Group 7 of Application 1 includes the 61st to 70th target weights in the target weight sequence of Application 1. Group 8 of Application 1 includes the 71st to 80th target weights in the target weight sequence of Application 1. Group 9 of Application 1 includes the 81st to 90th target weights in the target weight sequence of Application 1. Group 10 of Application 1 includes the 91st to 100th target weights in the target weight sequence of Application 1. Each of the 10 target weight sets in the target application contains 10 target weights. Thus, the electronic device can obtain P×N (e.g., 100) target weight sets.
[0236] Electronic devices calculate the average target weight X in the target group. iw Where i is the application index, and w is the category index of the target group. For example, w = 1, 2, 3, ..., N. The average target weight X... iw Examples are shown in Table 6 below. The target group is any one of the P×N target weight sets. In this way, the electronic device can obtain the average value of P×N target weights.
[0237] Based on the application usage data for day q shown in Table 5, and the time points corresponding to each target weight in the N target weight sets of the target application, as well as the identifier of the target application, the electronic device obtains the conditional probability of each group in the N target weight sets of the target application. The conditional probability of each group in the N target weight sets of the target application represents the actual usage probability of the target application under the grouping conditions shown in the above N target weight sets of the target application.
[0238] For example, based on Table 5 and a set of P×N target weights (e.g., 100 groups), the electronic device determines the conditional probability of the target group. Thus, the electronic device can obtain P×N conditional probabilities.
[0239] The conditional probability of the target group is the ratio of the number of accurately predicted target weights in the target group to the total number of target weights in the target group. The accurately predicted target weights are the target weights corresponding to the time point and application identifier in the application usage data on day q. The application identifier may also include the application's sequence number. For example, the target group contains target weights Z. 11 and target weight Z 13 For example, the target weight Z 11 The corresponding time point 1 and application 1 are identified by label 1 in Table 5, indicating that the user used application 1 at time point 1 on day q, with a target weight Z. 11 To predict accurate target weights. Target weight Z 13 The corresponding time point 3 and application 1 are marked with 0 in Table 5, indicating that the user did not use application 1 at time point 3 on day q, and the target weight Z 13 It is not an accurate prediction of the target weight.
[0240] Understandably, the target weight Z is still used. 11 and target weight Z 13 For example, in Table 5, time point 1 and application 1 correspond to identifier 1, which can also indicate that the target weights corresponding to time point 1 and application 1 are accurately predicted target weights. In Table 5, time point 3 and application 1 correspond to identifier 0, which indicates that the target weights corresponding to time point 3 and application 1 are not accurately predicted target weights.
[0241] For example, if the number of accurately predicted target weights in the target group is 2, and the total number of target weights in the target group is 10, then the conditional probability of the target group is 0.2.
[0242] Taking P×N=10×10=100 as an example, the electronic device can obtain the average value of 100 target weights and 100 conditional probabilities as shown in Table 6. The average value of the target weights of the target group and the conditional probabilities of the target group constitute a sample point. The electronic device can obtain 100 sample points, which constitute the first training data.
[0243] Table 6 shows the average target weight X in the first training data. iw and conditional probability Y iw The illustration
[0244] Group 1 Group 2 Group 3 … Group 10 Application 1 <![CDATA[X 11 ,AND 11 ]]> <![CDATA[X 12 ,AND 12 ]]> <![CDATA[X 13 ,AND 13 ]]> … <![CDATA[X 110 ,AND 110 ]]> Application 2 <![CDATA[X 21 ,AND 21 ]]> <![CDATA[X 22 ,AND 22 ]]> <![CDATA[X 23 ,AND 23 ]]> … <![CDATA[X 210 ,AND 210 ]]> Application 3 <![CDATA[X 31 ,AND 31 ]]> <![CDATA[X 32 ,AND 32 ]]> <![CDATA[X 33 ,AND 33 ]]> … <![CDATA[X 310 ,AND 310 ]]> Application 4 <![CDATA[X 41 ,AND 41 ]]> <![CDATA[X 42 ,AND 42 ]]> <![CDATA[X 43 ,AND 43 ]]> … <![CDATA[X 410 ,AND 410 ]]> Application 5 <![CDATA[X 51 ,AND 51 ]]> <![CDATA[X 52 ,AND 52 ]]> <![CDATA[X 53 ,AND 53 ]]> … <![CDATA[X 510 ,AND 510 ]]> Application 6 <![CDATA[X 61 ,AND 61 ]]> <![CDATA[X 62 ,AND 62 ]]> <![CDATA[X 63 ,AND 63 ]]> … <![CDATA[X 610 ,AND 610 ]]> Application 7 <![CDATA[X 71 ,AND 71 ]]> <![CDATA[X 72 ,AND 72 ]]> <![CDATA[X 73 ,AND 73 ]]> … <![CDATA[X 710 ,AND 710 ]]> Application 8 <![CDATA[X 81 ,AND 81 ]]> <![CDATA[X 82 ,AND 82 ]]> <![CDATA[X 83 ,AND 83 ]]> … <![CDATA[X 810 ,AND 810 ]]> Application 9 <![CDATA[X 91 ,AND 91 ]]> <![CDATA[X 92 ,AND 92 ]]> <![CDATA[X 93 ,AND 93 ]]> … <![CDATA[X 910 ,AND 910 ]]> Application 10 <![CDATA[X 101 ,AND 101 ]]> <![CDATA[X 102 ,AND 102 ]]> <![CDATA[X 103 ,AND 103 ]]> … <![CDATA[X 1010 ,AND 1010 ]]>
[0245] For example, X 12 Y can represent the average target weight of the second set of target weights in application 1.12 It can represent the conditional probability of the second set of target weights in Application 1. The conditional probability of the second set of target weights in Application 1 can also be called the conditional probability of the second group in Application 1.
[0246] S705. Electronic equipment uses training data of a linear regression model to train the linear regression model and obtain the weight coefficients of the linear regression model.
[0247] The weight coefficients of the linear regression model satisfy the following formula (3):
[0248]
[0249] Where, x k Let be the average weight of the k-th target in the training data of the linear regression model. y is the average of the target weights in the training data of the linear regression model. k Let k be the conditional probability in the training data of the linear regression model. x is the average of the conditional probabilities in the training data of the linear regression model. k The corresponding group and y k The corresponding groups are the same, x k Corresponding applications and y k The corresponding applications are the same, n = P × N.
[0250] For example, given the first training data shown in Table 6, the electronic device uses the first training data to train a linear regression model, obtaining the weight coefficients a and b of the linear regression model. X in Table 6 iw The average value. Y can be found in Table 6 iw The average value.
[0251] It is understandable that the data shown in Table 4 is predicted data, while the data shown in Table 5 is actual application usage data. Training samples for a linear regression model are constructed based on the predicted and actual usage data. This training sample is then used to train the linear regression model. In this way, the linear regression model can obtain an accurate linear relationship between the target weight of the application output by the multi-path recall model and the application's usage probability. Furthermore, based on this linear regression model, the accurate usage probability corresponding to the application's target weight can be obtained.
[0252] S706, electronic devices can also obtain validation set features.
[0253] For example, the validation set features may include application usage data for day q. If the electronic device has trained a linear regression model using the first training data, the electronic device can obtain the application usage data for day q from the application usage data recorded over multiple days by the electronic device.
[0254] S707, electronic devices can input training set features and validation set features into a multiplexed recall model.
[0255] For example, the electronic device inputs the application usage data of day M1 and the application usage data of day q into the multi-path recall model, and controls the multi-path recall model to output multiple applications corresponding to the target time point of day q+1 and the target weight of each application among the multiple applications.
[0256] S708, the electronic device can obtain the target weights of multiple applications and each application in the multiple applications corresponding to the target time point of the (q+1)th day output by the multi-way recall model.
[0257] The electronic device inputs the target weights of multiple applications corresponding to the target time point on day q+1 into the linear regression model trained by S705 to obtain the conditional probabilities of multiple applications corresponding to the target time point on day q+1 and the conditional probabilities of each application in the multiple applications.
[0258] S709. The electronic device uses the normalized exponential function of the normalized model to normalize the conditional probabilities of multiple applications and each application in the multiple applications corresponding to the target time point on day q+1, so as to obtain the usage probability of multiple applications and each application in the multiple applications corresponding to the target time point on day q+1.
[0259] Furthermore, taking the multiple applications corresponding to the target time point on day q+1 as K applications as an example, given the K applications corresponding to the target time point on day q+1 output by the normalized model and the usage probability of each application among the K applications, the electronic device can obtain the application usage data for day q+1 from the application usage data recorded over multiple days.
[0260] Electronic devices can use application usage data from day q+1 to determine the actual usage probability of each of the K applications within a preset time period including the target time point of day q+1. The duration of the preset time period can be the same as or different from the duration of the s-th time period. For example, the duration of the preset time period can be shorter than the duration of the s-th time period.
[0261] Based on the K applications corresponding to the target time point of day q+1 and the usage probability of each application in the K applications, and the actual usage probability of each application in the K applications within the preset time period including the target time point of day q+1, electronic devices can obtain the prediction accuracy of the linear regression model.
[0262] The prediction accuracy of the linear regression model is the ratio of the sum of the usage probabilities of each of the P applications in the K applications corresponding to the target time point of day q+1 output by the normalized model to the sum of the actual usage probabilities of each of the P applications in the K applications within the preset time period including the target time point of day q+1.
[0263] Electronic devices determine whether the prediction accuracy of a linear regression model is greater than an accuracy threshold.
[0264] If so, it means that the linear regression model trained by S705 meets the requirements.
[0265] If not, it means that the linear regression model trained by S705 does not meet the requirements. The electronic device can update the training data of the linear regression model and use the updated training data to train the linear regression model until the prediction accuracy of the linear regression model is greater than the accuracy threshold.
[0266] Understandably, in situations like Figure 7 In the training and validation process of the linear regression model shown, the application data used for training the linear regression model on day M1 belongs to the training set, the application data used for training and validation on day q belongs to the validation set, and the application data used for validation on day q+1 belongs to the test set. In some embodiments of this application, the ratio of the amount of data in the training set used for training the linear regression model to the amount of data in the validation set used for training and validation of the linear regression model to the amount of data in the test set used for validation of the linear regression model is 8:1:1.
[0267] This application embodiment also provides an application control method, which may include:
[0268] In the first instance, a first application list is used to detect and kill applications running in the background. The first application list includes m1 applications and information to identify the usage probability of each application among the m1 applications, and the usage probability of each application among the m1 applications is greater than a preset threshold.
[0269] In the second step, a second application list is used to detect and eliminate applications running in the background. This second application list includes m2 applications and information identifying the usage probability of each application within those m2 applications, with each application's usage probability exceeding a preset threshold. m1 is different from m2.
[0270] For example, the first moment can be the moment when the electronic device receives the first application list, and the second moment can be the moment when the electronic device receives the second application list. It is understood that if the first recommended operation moment and the moment when the electronic device receives the first application list are the same, the first moment can be the first recommended operation moment, or the first moment can be a first time point. For example, if the first recommended operation moment is December 14th at 10:10, the electronic device also receives the first application list at December 14th at 10:10. If the second recommended operation moment and the moment when the electronic device receives the second application list are the same, the second moment can be the second recommended operation moment, or the second moment can be a second time point. The time period to which the first moment belongs can be the same as or different from the time period to which the second moment belongs. The duration of the time period to which the first moment belongs is the same as the duration of the time period to which the second moment belongs, and both are equal to the duration of the s-th time period.
[0271] The information in the first application list that identifies the usage probability of each application among the m1 applications can be the usage probability of each application output by the second model from the first application list. The information in the second application list that identifies the usage probability of each application among the m2 applications can be the usage probability of each application output by the second model from the second application list.
[0272] In this embodiment, the specific implementation principle of the electronic device obtaining the second application list is similar to that of the electronic device obtaining the first application list. For the specific implementation principle of the electronic device obtaining the first application list, please refer to... Figure 4 The specific implementation principle of the electronic device obtaining the first application list in the embodiment will not be elaborated here.
[0273] For example, the date of the first moment and the date of the second moment can be the same. The date of the first moment and the date of the second moment can also be different. The fact that the date of the first moment and the date of the second moment can be the same can be understood as: the first moment and the second moment can belong to the same day.
[0274] For example, as shown in Table 7, the application control method provided in the embodiments of this application can be used to obtain a list of applications for detecting and killing background applications at different times.
[0275] Table 7 shows the applications in the application list at different times.
[0276]
[0277] It should be understood that the times shown in Table 7 can belong to the same day. The times shown in Table 7 can also belong to different days.
[0278] As shown in Table 7, the application control method provided in this application embodiment can obtain application lists corresponding to different times, and the number of applications in the application lists corresponding to different times is different. At different times, the corresponding application lists are used to kill applications running in the background, which can increase the probability of applications that users will not use being killed, thereby reducing the power consumption of electronic devices. The usage probability of the applications in the application list used for killing is greater than a preset threshold, indicating that the applications in the application list are applications that users are likely to use. Using the application list to kill applications running in the background can also reduce the probability of applications that users will use being killed, thereby improving the user experience.
[0279] Optionally, the first moment belongs to the s-th time period of day t. The first application list is obtained in the following way:
[0280] The first model is used to obtain multiple applications in the s-th time period of day t and the first target weight of each application in the multiple applications. The first target weight is related to the first usage probability, which represents the application usage probability in the s-th time period of day t.
[0281] The first objective weights of each application in multiple applications are input into the second model, and the second model outputs the first application list.
[0282] The first model is used to output the first target weight of each application among multiple applications at the first moment, given application usage data in the s-th time period over L days prior to day t, and application usage data from R instances of application usage prior to the first moment. The application usage data includes the start time of the application running in the foreground and the application identifier.
[0283] For example, the first model can be a multi-path recall model. The specific implementation principle of the electronic device using the first model to obtain multiple applications and the first target weight of each application can be found in [reference needed]. Figure 4 The specific implementation principle of S401-S402 in the embodiment is as follows. The specific implementation principle of the electronic device inputting the first target weight of each application in multiple applications into the second model and the second model outputting the first application list can be found in the specific implementation principle of S403-S404 in embodiment 4, which will not be repeated here.
[0284] In this way, the first model can learn users' long-term, recent, and real-time application (APP) usage habits, and can also use recall rates for each path to achieve multi-path recall fusion. The first model takes into account users' long-term, recent, and real-time application usage habits. By considering long-term, recent, and real-time data, accurate target weights can be obtained. The second model can obtain the application usage probability based on the target weights output by the first model, and then obtain an accurate first list of applications containing usage probabilities greater than a preset threshold. When electronic devices use the first application list to detect and eliminate background applications, it can increase the probability of applications that users do not use being detected and eliminated, thereby reducing the power consumption of electronic devices, and also reduce the probability of applications that users do use being detected and eliminated.
[0285] Optionally, the first objective weights are linearly correlated with the first usage probability. The second model includes a linear regression model and a normalized model.
[0286] The first objective weights of each application in the multiple applications are input into the second model, and the second model outputs a list of the first applications, including:
[0287] By inputting the first objective weights of each application into a linear regression model, the first conditional probability of each application is obtained. The first conditional probability represents the unnormalized usage probability.
[0288] By inputting the first conditional probability of each application into the normalized model, the first usage probability of each application in the multiple applications can be obtained.
[0289] The application with the highest probability of use exceeding a preset threshold is selected from multiple applications to obtain the first application list.
[0290] In this way, the target weight of the application is linearly related to the probability of use of the application. By using a linear regression model and a normalization model to process the first target weight of the application, an accurate first list of applications containing the first probability of use greater than a preset threshold can be obtained.
[0291] Optionally, the first objective weights of each application in the multiple applications are input into the linear regression model to obtain the first conditional probabilities of each application in the multiple applications, including:
[0292] The first objective weights of each application in multiple applications are calculated using the least squares method, thereby obtaining the first conditional probabilities of each application in multiple applications.
[0293] Since the target weight of an application is linearly related to its usage probability, the least squares method can be used to calculate the first target weight of each application in multiple applications, thereby obtaining the accurate first conditional probability of each application in multiple applications and improving the accuracy of the first application list.
[0294] Optionally, the first conditional probability of each application in multiple applications is input into the normalized model to obtain the first usage probability of each application in multiple applications, including:
[0295] The first conditional probability of each application in multiple applications is calculated using the normalized exponential function softmax, thus obtaining the first usage probability of each application in multiple applications.
[0296] This allows for the selection of applications with a first usage probability greater than a preset threshold from multiple applications, thus forming a first application list.
[0297] Optionally, the first time point is the j-th time point on day t, and the first usage probability is g(Y). i,tj It satisfies formula (2).
[0298] This allows for the selection of applications with a first usage probability greater than a preset threshold from multiple applications, thus forming a first application list.
[0299] Optionally, the first time point is the j-th time point on day t, and the first conditional probability Y i,tj It satisfies the following formula (1).
[0300] In this way, the accurate first conditional probability of each application can be obtained based on the first target weight of each application, thereby improving the accuracy of the first application list.
[0301] Optionally, the weight coefficients of the linear regression model are obtained by training the linear regression model using the first training data.
[0302] The first training data relates to the target weights of each application in the P applications at multiple time points on day q, and the application usage data on day q. The target weights of each application in the P applications at multiple time points on day q are output by the first model when the application usage data of day M1 is input into the first model. Day q is after day M1, and the P applications belong to the applications corresponding to the application usage data of day M1.
[0303] For example, the target weights of each application in P applications at various time points on day q are as follows: Figure 7 In the embodiment, the target weights of each application in the P applications corresponding to each time point on the qth day output by the multi-path recall model are shown.
[0304] In P applications, the target weights of each application at multiple time points on day q belong to the predicted data, while the application usage data on day q belongs to the actual data. A linear regression model is trained using the first training data related to the predicted and actual data. This linear regression model can obtain an accurate linear relationship between the target weights of applications output by the multipath recall model and the usage probabilities of applications. Furthermore, based on this linear regression model, the accurate usage probability corresponding to the target weights of applications can be obtained.
[0305] Optionally, the first training data may be obtained in the following ways:
[0306] Sort the target weights of the target application among the P applications in order of their target weights, resulting in a target weight sequence for the target application. The target application can be any one of the P applications.
[0307] The target weight sequence of the target application is divided into N equal segments to obtain N sets of target weights for the target application. The number of target weights in each of the N sets of target weights is the same.
[0308] Calculate the average target weight of each group in the N target weight sets of the target application. Based on the application usage data on day q, the time points corresponding to each target weight in the N target weight sets of the target application, and the identifier of the target application, obtain the conditional probability of each group in the N target weight sets of the target application. The conditional probability of each group in the N target weight sets of the target application represents the actual usage probability of the target application under the grouping conditions.
[0309] The linear regression model is trained using the first training data, including:
[0310] The linear regression model is trained using the average of N target weights for each of the P applications and the N conditional probabilities for each of the P applications.
[0311] In this way, by constructing sample points after grouping, the first training data can cover a larger amount of data, thereby improving the prediction accuracy and robustness of the linear regression model trained on the first training data.
[0312] Optionally, the conditional probability of a target group within the N target weight sets of the target application is the ratio of the number of accurately predicted target weights in the target group to the total number of target weights in the target group. The accurately predicted target weights are the target weights corresponding to the time point and application identifier in the application usage data on day q. The target group is any set of target weights from the N target weight sets of the target application.
[0313] In this way, when the linear regression model is trained with the first training data, it can obtain an accurate linear relationship between the target weight of the application and the probability of application use output by the multi-way recall model.
[0314] Optionally, the weight coefficients a and b of the linear regression model satisfy formula (3).
[0315] In this way, when the linear regression model is trained with the first training data, it can obtain an accurate linear relationship between the target weight of the application and the probability of application use output by the multi-way recall model.
[0316] Optionally, the prediction accuracy of the linear regression model is greater than the accuracy threshold.
[0317] The prediction accuracy of the linear regression model is calculated based on the predicted usage probability of each application in the K applications at the target time point on day q+1, obtained using the first model and the linear regression model, and the actual usage probability of each application in the K applications within a preset time period including the target time point on day q+1. The predicted usage probability of each application in the K applications at the target time point on day q+1 is obtained by inputting the application usage data of day M1 and the application usage data of day q into the first model, and then inputting the output of the first model into the linear regression model.
[0318] Thus, if the prediction accuracy of the linear regression model is greater than the accuracy threshold, it indicates that the trained linear regression model meets the requirements. By processing the target weights of the application using the linear regression model that meets the requirements, the conditional probability of the application can be obtained, and thus an accurate list of applications can be obtained.
[0319] Optionally, the prediction accuracy of the linear regression model is the ratio of the sum of the predicted usage probabilities of P applications in K applications at the target time point on day q+1 to the sum of the actual usage probabilities of P applications in K applications within a preset time period including the target time point on day q+1.
[0320] This allows for the measurement of prediction accuracy based on the linear regression model, validating whether the trained linear regression model meets the requirements. For example, if the prediction accuracy of the linear regression model is greater than the accuracy threshold, it means the trained linear regression model meets the requirements. If the prediction accuracy of the linear regression model is less than or equal to the accuracy threshold, it means the trained linear regression model does not meet the requirements. The training data of the linear regression model can be updated, and the updated training data can be used to train the linear regression model until the prediction accuracy of the linear regression model is greater than the accuracy threshold.
[0321] Optionally, the first model is a multi-path recall model, which includes a first-path recall, a second-path recall, and a third-path recall. The first-path recall includes a classification and regression tree CART algorithm, the second-path recall includes a recent hot recall algorithm, and the third-path recall includes a time decay algorithm.
[0322] In this way, the multi-path recall model takes into account users' long-term application usage habits, recent application usage habits, and real-time application usage habits, thus obtaining accurate target weights through the multi-path recall model.
[0323] Optionally, the recall rate of each of the three recall paths in the multi-path recall model is updated daily, and the recall rate of each path is related to the weight of the first target.
[0324] This can further improve the accuracy of the target weights output by the multi-path recall model, making the subsequent application list (such as the first application list or the second application list) more closely match the actual application usage of users.
[0325] It should be noted that the module names involved in the embodiments of this application can all be defined as other names, as long as they can achieve the function of each module, and no specific restrictions are placed on the module names.
[0326] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0327] The application control method of the present application embodiments has been described above. The apparatus for executing the above method provided in the present application embodiments is described below. Those skilled in the art will understand that the methods and apparatus can be combined and referenced with each other, and the related apparatus provided in the present application embodiments can execute the steps in the above application control method.
[0328] The application control method provided in this application can be applied to electronic devices with communication functions. Electronic devices include terminal devices, and the specific device form of the terminal device can be referred to the above-mentioned descriptions, which will not be repeated here.
[0329] This application provides an electronic device, which includes a processor and a memory; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory, causing the electronic device to perform the above-described method.
[0330] This application provides a chip. The chip includes a processor, which is used to call a computer program in memory to execute the technical solutions in the above embodiments. Its implementation principle and technical effects are similar to those in the related embodiments described above, and will not be repeated here.
[0331] This application provides a chip system. The chip system may include at least one processor and a communication interface, the communication interface and the at least one processor being interconnected via a circuit, and the at least one processor being used to run computer programs or instructions to perform the methods described above.
[0332] This application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, it implements the methods described above. The methods described in the above embodiments can be implemented wholly or partially by software, hardware, firmware, or any combination thereof. If implemented in software, the functionality can be stored as one or more instructions or code on or transmitted over the computer-readable medium. The computer-readable medium can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium accessible by a computer.
[0333] In one possible implementation, a computer-readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage or other magnetic storage devices, or any other medium targeted to carry or to store the required program code in the form of instructions or data structures, and accessible by a computer. Furthermore, any connection is appropriately referred to as a computer-readable medium. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. As used herein, disks and optical discs include optical discs, laser discs, optical discs, Digital Versatile Discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs optically reproduce data using lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0334] This application provides a computer program product, which includes a computer program that, when run, causes the computer to perform the above-described method.
[0335] This application describes embodiments of methods, apparatus (systems), and computer program products according to embodiments of this application with reference to flowchart illustrations and / or block diagrams. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable device to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0336] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the present invention should be included within the scope of protection of the present invention.
Claims
1. An application control method, characterized in that, include: At the first moment, the first application list is used to detect and kill the applications running in the background; the first application list includes m1 applications and information for identifying the usage probability of each application in the m1 applications, and the usage probability of each application in the m1 applications is greater than a preset threshold. At the second moment, a second application list is used to detect and kill applications running in the background; the second application list includes m2 applications and information for identifying the usage probability of each application in the m2 applications, and the usage probability of each application in the m2 applications is greater than the preset threshold; m1 is different from m2; the second moment is later than the first moment; Wherein, the first moment belongs to the s-th time period of day t, and the first application list is obtained in the following way: A first model is used to obtain multiple applications in the s-th time period of day t and a first target weight for each application in the multiple applications. The first target weight is linearly related to a first usage probability, which represents the application usage probability in the s-th time period of day t. The first model is used to output the first target weight of each application in the multiple applications corresponding to the first moment, given application usage data in the s-th time period over L days prior to day t and application usage data of R times the application was used before the first moment. The application usage data includes the start time of the application running in the foreground and the application identifier. The first objective weight of each application in the plurality of applications is input into the linear regression model to obtain the first conditional probability of each application in the plurality of applications, wherein the first conditional probability represents the unnormalized usage probability. Input the first conditional probability of each application in the plurality of applications into the normalization model to obtain the first usage probability of each application in the plurality of applications; From the plurality of applications, select the first application with a usage probability greater than the preset threshold to obtain the first application list.
2. The method according to claim 1, characterized in that, The step of inputting the first target weight of each application in the plurality of applications into the linear regression model to obtain the first conditional probability of each application in the plurality of applications includes: The first objective weight of each application in the plurality of applications is calculated using the least squares method to obtain the first conditional probability of each application in the plurality of applications.
3. The method according to claim 2, characterized in that, The step of inputting the first conditional probability of each application in the plurality of applications into the normalized model to obtain the first usage probability of each application in the plurality of applications includes: The first conditional probability of each application in the plurality of applications is calculated by using the normalized exponential function softmax, thereby obtaining the first usage probability of each application in the plurality of applications.
4. The method according to claim 3, characterized in that, The first time point is the j-th time point on the t-th day, and the first usage probability Satisfy the following formula: in, Let e be the first conditional probability obtained based on the first target weight of the i-th application corresponding to the j-th time point on day t, where e is a natural constant.
5. The method according to any one of claims 2-4, characterized in that, The first time point is the j-th time point on the t-th day, and the first conditional probability Satisfy the following formula: in, The first target weight is the value of the i-th application corresponding to the j-th time point on day t. These are the weight coefficients of the linear regression model. represents the weight coefficients of the linear regression model.
6. The method according to claim 5, characterized in that, The weight coefficients of the linear regression model are obtained by training the linear regression model using the first training data; Wherein, the first training data is related to the target weights of each application in the P applications at multiple time points on day q and the application usage data on day q; the target weights of each application in the P applications at multiple time points on day q are output by the first model when the application usage data of day M1 is input into the first model; day q is after day M1, and the P applications belong to the applications corresponding to the application usage data of day M1.
7. The method according to claim 6, characterized in that, The methods for obtaining the first training data include: The target weights of the target applications in the P applications are sorted according to the magnitude of the target weights to obtain the target weight sequence of the target applications; the target application is any one of the P applications. The target weight sequence of the target application is divided into N equal segments to obtain N sets of target weights for the target application, wherein the number of target weights in each of the N sets of target weights is the same; Calculate the average target weight of each group in the N target weight sets of the target application; and based on the application usage data on day q and the time point corresponding to each target weight in the N target weight sets of the target application and the identifier of the target application, obtain the conditional probability of each group in the N target weight sets of the target application; the conditional probability of each group in the N target weight sets of the target application represents the actual usage probability of the target application under the grouping condition; The step of training the linear regression model using the first training data includes: The linear regression model is trained using the average of the N target weights corresponding to each of the P applications and the N conditional probabilities corresponding to each of the P applications.
8. The method according to claim 7, characterized in that, The conditional probability of a target group in the N target weight sets of the target application is the ratio of the number of accurately predicted target weights in the target group to the total number of target weights in the target group; the accurately predicted target weights are the target weights corresponding to the time point and application identifier in the application usage data on day q; the target group is any one of the N target weight sets of the target application.
9. The method according to claim 7 or 8, characterized in that, The weight coefficients of the linear regression model satisfy the following formula: in, Let be the average value of the k-th target weight in the training data of the linear regression model. This is the average of the target weights in the training data of the linear regression model. Let k be the k-th conditional probability in the training data of the linear regression model. The average value of the conditional probabilities in the training data of the linear regression model is given by the given value. The corresponding group and the The corresponding groups are the same, the The corresponding application and the above The corresponding applications are the same. .
10. The method according to any one of claims 6-8, characterized in that, The prediction accuracy of the linear regression model is greater than the accuracy threshold. The prediction accuracy of the linear regression model is calculated based on the predicted usage probability of each application in the K applications at the target time point on day q+1, obtained by using the first model and the linear regression model, and the actual usage probability of each application in the K applications within a preset time period including the target time point on day q+1. The predicted usage probability of each application in the K applications at the target time point on day q+1 is obtained by inputting the application usage data of day M1 and the application usage data of day q into the first model, and inputting the output of the first model into the linear regression model.
11. The method according to claim 10, characterized in that, The prediction accuracy of the linear regression model is the ratio of the sum of the predicted usage probabilities of P applications in the K applications at the target time point on day q+1 to the sum of the actual usage probabilities of P applications in the K applications within a preset time period including the target time point on day q+1.
12. The method according to any one of claims 1-4, 6-8, and 11, characterized in that, The first model is a multi-path recall model, which includes a first path recall, a second path recall, and a third path recall. The first path recall includes a classification and regression tree CART algorithm, the second path recall includes a recent hot topic recall algorithm, and the third path recall includes a time decay algorithm.
13. The method according to claim 12, characterized in that, The recall rate of each of the three recall paths in the multi-path recall model is updated daily, and the recall rate of each path is related to the weight of the first target.
14. An electronic device, characterized in that, include: Processor and memory; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the electronic device to perform the method as described in any one of claims 1-13.
15. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-13.
16. A chip system, characterized in that, It includes at least one processor and a communication interface, the communication interface and the at least one processor being interconnected via a line, the at least one processor being configured to run a computer program or instructions to perform the method as described in any one of claims 1-13.
17. A computer program product, characterized in that, Includes a computer program that, when run, causes a computer to perform the method as described in any one of claims 1-13.
Citation Information
Patent Citations
Application program processing method and deice, storage medium and electronic equipment
CN107943583A
Background application cleaning method and device and computer readable storage medium
CN110825458A
Application cleaning method and apparatus, storage medium and electronic device
WO2020206690A1