Application processing method, device, storage medium and electronic device
By configuring models corresponding to multiple scenarios for each application and determining whether the application can be cleaned based on the current scenario, the problem of insufficient flexibility in determining whether an application can be cleaned is solved in the existing technology, achieving more flexible resource management and improving user experience. .
Patent Information
- Application Number
- CN201980090664.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-04-12
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2039-04-12
AI Technical Summary
The existing technology has poor flexibility in determining whether an application in an electronic device can be cleaned. The same model is usually used for determination, and differentiated processing cannot be performed based on specific scenarios, resulting in inflexible resource management.
By preconfiguring multiple models for each application in the electronic device, each model corresponds to a different scenario, and the corresponding target model is obtained according to the current scenario to determine whether the application can be cleaned, thereby improving the flexibility of judgment.
It improves the flexibility of determining whether an application can be cleaned, enables differentiated management based on specific scenarios, saves system resources, and improves user experience.
Smart Images

Figure CN113383311B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of electronic equipment, and in particular, relates to an application processing method, device, storage medium and electronic equipment. Background Art
[0002] As the configurations of electronic devices continue to improve, users can install various applications on electronic devices to achieve various functions. For example, users can install video playback applications on electronic devices to achieve video playback functions. Or, users can install game applications on electronic devices to play games, etc. In related technologies, electronic devices can determine whether a certain application can be cleared from the electronic device to save system resources of the electronic device. Summary of the invention
[0003] Embodiments of the present application provide an application processing method, device, storage medium, and electronic device, which can improve the flexibility of the electronic device in determining whether an application can be cleared from the electronic device.
[0004] In a first aspect, this embodiment provides an application processing method, which is applied to an electronic device, wherein the electronic device includes one or more applications, and the method includes:
[0005] Determining a current scene in which the electronic device is located;
[0006] Acquire a target model corresponding to the current scene from at least two models pre-configured for the target application, wherein different models configured by the electronic device for the target application correspond to different scenes;
[0007] The target model is used to determine whether the target application can be cleaned.
[0008] In a second aspect, this embodiment provides an application processing device, which is applied to an electronic device, wherein the electronic device includes one or more applications, and the device includes:
[0009] A determination module, used to determine the current scene in which the electronic device is located;
[0010] an acquisition module, configured to acquire a target model corresponding to the current scene from at least two models pre-configured for the target application, wherein different models configured by the electronic device for the target application correspond to different scenes;
[0011] The judging module is used to judge whether the target application can be cleaned by using the target model.
[0012] In a third aspect, this embodiment provides a storage medium on which a computer program is stored. When the computer program is executed on a computer, the computer executes the process in the application processing method provided by this embodiment.
[0013] In a fourth aspect, this embodiment provides an electronic device, including a memory and a processor, wherein the electronic device includes one or more applications, and the processor is configured to execute, by calling a computer program stored in the memory:
[0014] Determining a current scene in which the electronic device is located;
[0015] Acquire a target model corresponding to the current scene from at least two models pre-configured for the target application, wherein different models configured by the electronic device for the target application correspond to different scenes;
[0016] The target model is used to determine whether the target application can be cleaned. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The technical solution and beneficial effects of the present application will be made apparent by describing in detail the specific implementation methods of the present application in conjunction with the accompanying drawings.
[0018] Figure 1 It is a flowchart of the application processing method provided in an embodiment of the present application.
[0019] Figure 2 It is another flowchart of the application processing method provided in an embodiment of the present application.
[0020] Figures 3 to 5 It is a scenario diagram of the application processing method provided in an embodiment of the present application.
[0021] Figure 6 It is a structural diagram of an application processing device provided in an embodiment of the present application.
[0022] Figure 7 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0023] Figure 8 It is another structural schematic diagram of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] Please refer to the drawings, where the same component symbols represent the same components. The principle of the present application is illustrated by implementing it in an appropriate computing environment. The following description is based on the illustrated specific embodiments of the present application, which should not be considered as limiting other specific embodiments of the present application that are not described in detail herein.
[0025] It is understandable that the execution subject of the embodiments of the present application may be an electronic device such as a smart phone or a tablet computer.
[0026] See also Figure 1 , Figure 1 : is a flow chart of an application processing method provided in an embodiment of the present application. The application processing method can be applied to an electronic device, and the electronic device can include one or more applications. The process of the application processing method can include:
[0027] In 101, a current scene in which the electronic device is located is determined.
[0028] As the configurations of electronic devices continue to improve, users can install a variety of applications on electronic devices to achieve various functions. For example, users can install video playback applications on electronic devices to achieve video playback functions. Or, users can install game applications on electronic devices to play games, etc. In the related art, electronic devices can judge (such as predicting) whether an application can be cleared from the electronic device based on the user's application usage behavior habits to save system resources of the electronic device. However, in the related art, electronic devices use the same model to judge whether all applications in the electronic device can be cleared. That is, in the related art, electronic devices have poor flexibility when judging whether applications can be cleared from electronic devices.
[0029] In 101 of the embodiment of the present application, for example, the electronic device may first determine the current scene in which it is located.
[0030] In some embodiments, the scene in which the electronic device is located may include an outdoor scene, an indoor scene, a scene with low remaining power, a scene with high remaining power, a scene with high power consumption, a scene with low power consumption, a scene with high security, a scene with low security, etc. It is understood that the examples given here do not constitute a limitation on the embodiments of the present application.
[0031] In 102, a target model corresponding to the current scene is obtained from at least two models pre-configured for the target application, wherein different models configured by the electronic device for the target application correspond to different scenes.
[0032] For example, after determining the current scene in which the electronic device is located, the electronic device may obtain a model corresponding to the current scene, ie, a target model, from at least two models pre-configured for the target application A.
[0033] Among them, in this embodiment, the electronic device is configured with at least two models for the target application, and different models correspond to different scenes. For example, the electronic device is pre-configured with 3 models for application A, namely model a1, model a2, and model a3. Moreover, different models correspond to different scenes, for example, model a1 corresponds to outdoor scenes, model a2 corresponds to indoor scenes, model a3 corresponds to scenes with low remaining power, and so on. Then, in the process of 102, the electronic device can obtain the target model corresponding to the current scene from the models a1, a2, and a3 pre-configured for application A. For example, if the current scene is an outdoor scene, the target model obtained by the electronic device in 102 is a1. If the current scene is an indoor scene, the target model obtained by the electronic device in 102 is a2.
[0034] For another example, the electronic device is pre-configured with 4 models for application B, namely model b1, model b2, model b3, and model b4. Moreover, different models correspond to different scenes, for example, model b1 corresponds to outdoor scenes, model b2 corresponds to indoor scenes, model b3 corresponds to scenes with low remaining power, model b4 corresponds to scenes with high remaining power, and so on. Then, in the process of 102, the electronic device can obtain the target model corresponding to the current scene from the models b1, b2, b3, and b4 pre-configured for application B. For example, if the current scene is an outdoor scene, the target model obtained by the electronic device is b1. If the current scene is a scene with low remaining power, the target model obtained by the electronic device is b3.
[0035] In 103, the target model is used to determine whether the target application can be cleaned.
[0036] For example, after obtaining the target model corresponding to the target application, the electronic device can use the target model to determine whether the target application can be cleared from the electronic device. For example, if the electronic device obtains the target model corresponding to the target application A in the outdoor scene as a2, the electronic device can use the model a2 to determine whether the application A can be cleared from the electronic device.
[0037] It can be understood that in this embodiment, the electronic device is configured with at least two models for the target application, and different models correspond to different scenarios. The electronic device can determine the target model corresponding to the current scenario from the at least two models corresponding to the target application, and use the target model to determine whether the target application can be cleaned. Therefore, compared with the solution in the related art that the electronic device uses the same model to determine whether all applications in the electronic device can be cleaned, this embodiment has better flexibility when determining whether the application can be cleaned.
[0038] See also Figure 2 , Figure 2Another flowchart of the application processing method provided in an embodiment of the present application is provided. The application processing method can be applied to an electronic device, and the electronic device can include one or more applications. The process of the application processing method can include:
[0039] In 201, the electronic device obtains current environmental parameters, which at least include an ambient light brightness value, position data, and an ambient noise value.
[0040] For example, when determining whether the target application A can be cleared from the background, the electronic device can obtain current environmental parameters, wherein the environmental parameters may at least include ambient light brightness value, location data, ambient noise value, and the like.
[0041] In other implementations, the environmental parameters may also include parameters such as time, remaining power value, communication network signal strength, etc. It is to be understood that the examples given here do not constitute a limitation on this embodiment.
[0042] In 202, the electronic device identifies the current scene according to the current environmental parameters.
[0043] For example, after acquiring the current environmental parameters, the electronic device can identify the current scene in which it is located according to the current environmental parameters.
[0044] For example, the electronic device can input the acquired current environmental parameters as input values into a preset scene recognition algorithm model, and the scene recognition algorithm model can output the current scene in which the electronic device is located after processing the current environmental parameters. In one embodiment, the above-mentioned scene recognition algorithm model can be an algorithm model that has undergone deep learning. When performing deep learning, the electronic device can obtain a large number of training samples, which are composed of environmental parameters and their corresponding scenes. In this way, the electronic device can learn the correspondence between environmental parameters and scenes, so that it can identify the corresponding scene according to the input environmental parameters.
[0045] In 203, the electronic device obtains a target model corresponding to the current scenario from at least two models pre-configured for the target application, wherein different models configured by the electronic device for the target application correspond to different scenarios.
[0046] For example, after identifying the current scene, the electronic device can obtain a target model corresponding to the current scene from at least two models pre-configured for the target application A. The electronic device is configured with at least two models for the target application, and different models correspond to different scenes.
[0047] In one embodiment, the scene in which the electronic device is located includes at least an outdoor scene and an indoor scene, and the model configured by the electronic device for the target application includes at least a first model and a second model, wherein the first model corresponds to the outdoor scene and the second model corresponds to the indoor scene. If the current scene is an outdoor scene, the electronic device may determine the first model as the target model. If the current scene is an indoor scene, the electronic device may determine the second model as the target model.
[0048] For example, the electronic device is pre-configured with three models for application A, namely model a1, model a2, and model a3. Moreover, different models correspond to different scenes, for example, model a1 corresponds to outdoor scenes, model a2 corresponds to indoor scenes, model a3 corresponds to scenes with low remaining power, and so on. Then, in the process of 203, the electronic device can obtain the target model corresponding to the current scene from the models a1, a2, and a3 pre-configured for application A. For example, if the current scene is an outdoor scene, the target model obtained by the electronic device in 203 is a1. If the current scene is an indoor scene, the target model obtained by the electronic device in 203 is a2.
[0049] In one embodiment, the electronic device may configure at least two models for each application installed in the electronic device, and different models configured for each application correspond to different scenarios. For example, the electronic device is pre-configured with 3 models for application A, namely model a1, model a2, and model a3. Among them, model a1 corresponds to outdoor scenes, model a2 corresponds to indoor scenes, model a3 corresponds to scenes with low remaining power, and so on. For another example, the electronic device is pre-configured with 4 models for application B, namely model b1, model b2, model b3, and model b4. Among them, model b1 corresponds to outdoor scenes, model b2 corresponds to indoor scenes, model b3 corresponds to scenes with low remaining power, model b4 corresponds to scenes with high remaining power, and so on.
[0050] In some embodiments, the model configured by the electronic device for the application may be an algorithm model based on deep learning, such as an adaptive learning algorithm (Adaptive algorithm), convolutional neural network (CNN), recurrent neural network (RNN), deep belief neural network (DBN-DNN), etc. It is understood that the examples given here do not constitute a limitation on this embodiment.
[0051] In 204 , the electronic device uses the target model to determine whether the target application can be cleared from the background.
[0052] For example, if the current scene is an outdoor scene, then after acquiring the target model a1 corresponding to the current scene, the electronic device can use the target model a1 to determine whether application A can be cleared from the background.
[0053] If it is determined by using the target model a1 that the application A can be cleared from the background, the process proceeds to step 205 .
[0054] If it is determined by the target model a1 that application A cannot be cleared from the background, the electronic device may perform other operations without clearing application A from the background.
[0055] In 205 , if it is determined that the target application can be cleared from the background, the electronic device generates inquiry information, where the inquiry information is used to inquire whether to clear the target application from the background.
[0056] For example, the electronic device determines that application A can be cleared from the background using target model a1, and then the electronic device can generate an inquiry message, which can be used to inquire the user whether to clear application A from the background.
[0057] If the user does not agree to clear application A from the background, the electronic device can perform other operations without clearing application A from the background.
[0058] If the user agrees to clear application A from the background, the process may proceed to step 206 .
[0059] In 206 , if the information for clearing the target application from the background is received, the electronic device clears the target application from the background.
[0060] For example, after receiving the above inquiry information, the user sends a message to the electronic device agreeing to clear application A from the background, and the electronic device can clear application A from the background, thereby preventing application A from consuming system resources.
[0061] It can be understood that in this embodiment, when the electronic device determines that a certain application can be cleared from the background, it can generate an inquiry message, and will only clear the application from the background if the user agrees to clear the application from the background. This can avoid clearing an application from the background without the user's knowledge, that is, avoid the user mistakenly believing that an error occurred in the operation of the electronic device, resulting in the background application being cleared from the wrong place, thereby improving the user experience.
[0062] In one implementation, this embodiment may also include the following process: establishing a corresponding relationship between the scene and the model.
[0063] Then, when the electronic device executes the process of acquiring the target model corresponding to the current scene in 203, the process may include:
[0064] The electronic device detects whether the corresponding relationship includes the current scene;
[0065] If the corresponding relationship includes the current scene, the electronic device determines a model corresponding to the current scene according to the corresponding relationship;
[0066] The electronic device determines the model corresponding to the current scene as the target model.
[0067] For example, if the electronic device configures models a1, a2, and a3 for application A, then the electronic device can establish a correspondence table between scenes and models for application A. For example, the electronic device can establish a correspondence between outdoor scenes and model a1, establish a correspondence between indoor scenes and model a2, and establish a correspondence between scenes with low remaining power and model a3. Afterwards, the electronic device can generate a correspondence table based on the correspondence between the above different scenes and different models.
[0068] After generating a correspondence table between scenes and models for application A, when the electronic device needs to obtain a target model corresponding to the current scene, the electronic device can detect whether the current scene is included in the correspondence table. If the current scene is included in the correspondence table, the electronic device can determine the model corresponding to the current scene according to the correspondence table, and determine the model corresponding to the current scene as the target model. For example, if the current scene is an outdoor scene, the electronic device can detect that the current scene is included in the correspondence table. Since the model corresponding to the outdoor scene is model a1, the electronic device can determine model a1 corresponding to the outdoor scene as the target model according to the correspondence table.
[0069] In one implementation, the above correspondence between scenes and models may also include environmental parameters for identifying each scene. Then, after detecting whether the correspondence includes the current scene, this embodiment may also include the following process:
[0070] If the corresponding relationship does not include the current scene, the electronic device obtains the current environmental parameters for identifying the current scene;
[0071] The electronic device compares the current environmental parameters with the environmental parameters of each scene included in the corresponding relationship;
[0072] By comparing, the electronic device detects whether there is a target scene in the corresponding relationship, wherein the value of the current environmental parameter is within a preset range of the value of the environmental parameter of the target scene;
[0073] If there is a target scene, the electronic device determines the model corresponding to the target scene as the target model.
[0074] For example, in this embodiment, in addition to recording the correspondence between scenes and models, the correspondence table may also record environmental parameters for identifying each recorded scene.
[0075] When judging whether application A can be cleared from the background, after determining the current scene according to the current environmental parameters, the electronic device detects that the current scene is not recorded in the correspondence table. In this case, the electronic device can first obtain the current environmental parameters for identifying the current scene, and compare the current environmental parameters with the environmental parameters of each scene recorded in the correspondence table. Through the comparison, the electronic device can detect whether there is a target scene in the correspondence table, wherein the target scene satisfies the following conditions: the value of the current environmental parameters of the current scene is within the preset range of the value of the environmental parameters of the target scene.
[0076] If there is such a target scene in the correspondence table, the electronic device can determine the model corresponding to the target scene as the target model. For example, the electronic device recognizes that the current scene is the fourth scene, but the fourth scene is not recorded in the correspondence table of application A, and only the fifth scene, the sixth scene and the seventh scene are recorded. In this case, the electronic device can obtain the current environmental parameters and compare the current environmental parameters with the environmental parameters corresponding to each scene recorded in the correspondence table. For example, through the comparison between the parameters, the electronic device detects that the environmental parameters of the fourth scene (i.e., the current environmental parameters) are within the preset range of the environmental parameters of the sixth scene. Then, the electronic device can determine the sixth scene as the target scene, and determine the model a2 corresponding to the sixth scene as the target model.
[0077] It can be understood that, in this embodiment, taking the current scene as the fourth scene as an example, when the fourth scene is not recorded in the correspondence table of application A, by comparing the value of the current environmental parameter with the environmental parameter recorded in the correspondence table for identifying each scene, when it is detected through comparison that the value of the current environmental parameter is within the preset range of the value of the environmental parameter of a certain scene in the correspondence table, it can be considered that the current scene is similar to the certain scene, and the model corresponding to the certain scene can be determined as the target model. For example, if the current scene is the fourth scene, if it is detected that the value of the current environmental parameter is within the preset range of the value of the environmental parameter of the sixth scene recorded in the correspondence table, it can be considered that the sixth scene is similar to the fourth scene. In this case, the model corresponding to the sixth scene can be determined as the target model.
[0078] It should be noted that the following uses environmental noise as an example to illustrate that the value of the current environmental parameter is within the preset range of the value of the environmental parameter of the target scene. For example, the value range of the environmental noise parameter in the environmental parameters corresponding to the sixth scene is 50 decibels to 80 decibels. The value of the environmental noise parameter in the current environmental parameters is 98 decibels. Then, if the preset range of the environmental noise parameter in the environmental parameters corresponding to the sixth scene is 30 decibels to 100 decibels, the electronic device can determine that the value of the environmental noise parameter in the current environmental parameters, 98 decibels, is within the preset range of the environmental noise parameter in the environmental parameters of the sixth scene. If the value of the environmental noise parameter in the current environmental parameters is 108 decibels, the electronic device can determine that the value of the environmental noise parameter in the current environmental parameters, 108 decibels, is outside the preset range of the environmental noise parameter in the environmental parameters of the sixth scene.
[0079] If it is detected that there is no target scene that meets the conditions in the correspondence table, the electronic device can determine any one of the models corresponding to application A as the target model. Alternatively, the electronic device can count the judgment accuracy of the model corresponding to application A. When there is no target scene that meets the conditions in the correspondence table, the electronic device can determine the model with the highest judgment accuracy as the target model. For example, when the electronic device uses models a1, a2, and a3 to determine whether application A can be cleaned up from the background, the electronic device can count the judgment accuracy of each model. For example, the electronic device counts that model a1 has the highest judgment accuracy. Based on this, if it is detected that there is no target scene that meets the conditions in the correspondence table, the electronic device can determine model a1 as the target model.
[0080] In one implementation, the process of determining the current scene of the electronic device in 201 may include:
[0081] After the target application is switched to the background, the electronic device counts the power consumption of the target application;
[0082] If the power consumption of the target application reaches a preset threshold, the electronic device detects whether the process of the target application is called by the foreground application;
[0083] If the process of the target application is not called by the foreground application, the electronic device determines the current scene.
[0084] For example, after application A is switched from the foreground to the background, the electronic device can count the power consumed by application A. If it is detected that the power consumed by application A in the background reaches a preset threshold, the electronic device can detect whether the process of application A is called by the foreground application.
[0085] If it is detected that the process of application A has not been called by the foreground application, it can be considered that application A itself consumes a large amount of power. In this case, in order to save power, the electronic device can determine its current scene and obtain the target model corresponding to the current scene to determine whether application A can be cleared from the background.
[0086] If it is detected that the process of application A is called by the foreground application, it can be considered that the power consumed by application A in the background is consumed to support the operation of the foreground application. In this case, the electronic device can perform other operations.
[0087] In another embodiment, when it is detected that a certain application is switched to the background, for example, when it is detected that application A is switched to the background, the electronic device can count whether the number of applications currently residing in the background reaches a preset value. If it is detected that the number of applications currently residing in the background reaches a preset value, it can be considered that there are many applications currently residing in the background. In order to avoid the background consuming more system resources (such as power, etc.), the electronic device can be triggered to determine whether the background application can be cleared at this time, and the electronic device will determine whether application A can be cleared from the background.
[0088] In another embodiment, for example, when determining whether application A can be cleared from the background, if the electronic device cannot determine the current scene based on the current environmental parameters after the process of obtaining the current environmental parameters in 201, then the electronic device can determine any one of the models corresponding to application A as the target model. Alternatively, the electronic device can count the judgment accuracy of the model corresponding to application A, and when the current scene cannot be determined based on the current environmental parameters, the electronic device can determine the model with the highest judgment accuracy as the target model. For example, when the electronic device uses models a1, a2, and a3 to determine whether application A can be cleared from the background, the electronic device can count the judgment accuracy of each model. For example, the electronic device counts that model a1 has the highest judgment accuracy. Based on this, if the electronic device cannot determine the current scene based on the current environmental parameters, the electronic device can determine model a1 as the target model.
[0089] In one implementation, this embodiment may determine a corresponding model for a target application in the following manner:
[0090] The electronic device acquires at least three models, wherein input parameters used by each model have corresponding attributes;
[0091] According to the preset strategy, the electronic device determines the target attribute corresponding to the target application;
[0092] According to the target attribute and the attributes of the input parameters used by each model, the electronic device determines at least two corresponding models from the at least three models.
[0093] For example, six models are pre-configured in the electronic device, namely model o, model p, model q, model r, model s and model t. Then, the electronic device can first obtain the above six models. Among them, each input parameter used by the above models has a corresponding attribute. For example, one of the input parameters used by model p is the running time of the application in the foreground, and this input parameter has a time attribute.
[0094] Afterwards, the electronic device can determine the target attribute corresponding to the target application according to a preset strategy. In one embodiment, the target attribute corresponding to the application can be one or more. For example, the electronic device can pre-set the attribute corresponding to the application of the video playback category as a time attribute, the attribute corresponding to the application of the instant messaging category as a text attribute, and so on. Then, the electronic device can first determine the category to which the target application belongs, and then determine its corresponding target attribute according to the category to which the target application belongs. For example, the electronic device determines that the target application A belongs to the video playback category, then the electronic device can determine that the target attribute corresponding to the target application A is a time attribute.
[0095] Afterwards, the electronic device can determine at least two corresponding models from model o, model p, model q, model r, model s, and model t according to the target attribute corresponding to the target application A and the attributes of the input parameters used by each model. For example, the electronic device detects that the parameters used by model o do not include parameters with time attributes, and since the target attribute corresponding to the target application A is the time attribute, the electronic device can exclude model o and not use it as the corresponding model of the target application A. The parameters used by model p, model q, model r, model s, and model t all include parameters with time attributes, so the electronic device can determine model p, model q, model r, model s, and model t as the corresponding models of the target application A. Afterwards, for the target application A, the electronic device can establish a correspondence between different scenarios and different models.
[0096] See also Figures 3 to 5 , Figures 3 to 5 A schematic diagram of a scenario of an application processing method provided in an embodiment of the present application.
[0097] For example, Figure 3 As shown, when the user is using application A, he clicks the button to return to the home screen. At this time, the electronic device returns to the home screen, and application A is switched from the foreground to the background.
[0098] When application A is switched from the foreground to the background, the electronic device can obtain the number of applications currently residing in the background and detect whether the number reaches a preset value. For example, in this embodiment, the electronic device detects that the number of applications currently residing in the background has reached a preset threshold. In this case, it can be considered that there are many applications residing in the current background, and these background applications will consume more system resources. At this time, the electronic device can determine whether each application in the background can be cleaned up. For example, at this time, there are a total of 10 applications in the background, including application A, application B and application C.
[0099] When predicting whether the background application can be cleared from the background, the electronic device may first obtain the current environment parameters, and identify the current scene the electronic device is in according to the current environment parameters. For example, the electronic device identifies that the current scene it is in is an indoor scene.
[0100] In this embodiment, the electronic device can pre-configure at least two models for each application, and for each application, the electronic device establishes a corresponding relationship between the scene and the model. For example, for application A, the electronic device configures three models for the application A, namely model a1, model a2 and model a3. In addition, the electronic device establishes a corresponding relationship between the outdoor scene and model a1, establishes a corresponding relationship between the indoor scene and model a2, and establishes a corresponding relationship between the scene of low remaining power and model a3.
[0101] For application B, the electronic device configures four models for application B, namely model b1, model b2, model b3 and model b4. In addition, the electronic device establishes a corresponding relationship between outdoor scenes and model b1, establishes a corresponding relationship between indoor scenes and model b2, establishes a corresponding relationship between scenes with low remaining power and model b3, and establishes a corresponding relationship between scenes with high remaining power and model b4.
[0102] For application C, the electronic device configures two models for the application C, namely model a2 and model b3. In addition, the electronic device establishes a corresponding relationship between the outdoor scene and model a2, and establishes a corresponding relationship between the indoor scene and model b3.
[0103] Among them, when determining whether application A can be cleared from the background, the electronic device can obtain the target model corresponding to the current scene from the three models a1, a2, and a3 pre-configured for application A. For example, since the electronic device recognizes that the current scene is an indoor scene, the electronic device can determine model a2 as the target model and use model a2 to determine whether application A can be cleared from the background. For example, in this embodiment, the electronic device uses model a2 to determine that application A can be cleared from the background.
[0104] When determining whether application B can be cleared from the background, the electronic device can obtain a target model corresponding to the current scene from the four models b1, b2, b3, and b4 pre-configured for application B. For example, since the electronic device recognizes that the current scene is an indoor scene, the electronic device can determine model b2 as the target model and use model b2 to determine whether application B can be cleared from the background. For example, in this embodiment, the electronic device uses model b2 to determine that application B cannot be cleared from the background.
[0105] When determining whether application C can be cleared from the background, the electronic device can obtain a target model corresponding to the current scene from the two models a2 and b3 pre-configured for application C. For example, since the electronic device recognizes that the current scene is an indoor scene, the electronic device can determine model b3 as the target model and use model b3 to determine whether application C can be cleared from the background. For example, in this embodiment, the electronic device uses model b3 to determine that application C can be cleared from the background.
[0106] For example, in this embodiment, the background of the electronic device also includes applications D, E, F, G, H, I, and J, wherein the electronic device determines that applications D, E, and H can be cleared from the background, while applications F, G, I, and J cannot be cleared from the background.
[0107] Afterwards, the electronic device may generate a query message, which may be used to ask the user whether to clear applications A, C, D, E, and H from the background, such as Figure 4 shown.
[0108] For example, in this embodiment, after receiving the inquiry information, the user chooses to agree to clear applications A, C, D, E, and H from the background. Figure 5 Then, the electronic device can clear applications A, C, D, E, and H from the background, thereby saving system resources.
[0109] See also Figure 6 , Figure 6 The schematic diagram of the structure of the application processing device provided in the embodiment of the present application. The application processing device can be applied to an electronic device, wherein the electronic device includes one or more applications. The application processing device 300 may include: a determination module 301, an acquisition module 302, and a judgment module 303.
[0110] The determination module 301 is used to determine the current scene in which the electronic device is located.
[0111] The acquisition module 302 is used to acquire a target model corresponding to the current scene from at least two models pre-configured for the target application, wherein different models configured by the electronic device for the target application correspond to different scenes.
[0112] The judgment module 303 is used to use the target model to judge whether the target application can be cleaned.
[0113] In one implementation, the scene in which the electronic device is located includes at least an outdoor scene and an indoor scene, and the model configured by the electronic device for the target application includes at least a first model and a second model, wherein the first model corresponds to the outdoor scene, and the second model corresponds to the indoor scene;
[0114] The acquisition module 302 may be configured to: if the current scene is the outdoor scene, determine the first model as the target model; if the current scene is the indoor scene, determine the second model as the target model.
[0115] In one implementation, the determining module 301 may be used to:
[0116] Get the current environment parameters;
[0117] According to the current environmental parameters, a current scene in which the electronic device is located is identified.
[0118] In one implementation, the determining module 301 may be used to:
[0119] The current environmental parameters are obtained, where the environmental parameters include at least an ambient light brightness value, position data, and an ambient noise value.
[0120] In one implementation, the determination module 301 may also be used to: establish a corresponding relationship between a scene and a model.
[0121] The acquisition module 302 can be used to: detect whether the corresponding relationship includes the current scene; if the corresponding relationship includes the current scene, determine the model corresponding to the current scene according to the corresponding relationship; and determine the model corresponding to the current scene as the target model.
[0122] In one implementation, the corresponding relationship includes environmental parameters for identifying each scene.
[0123] Then, after detecting whether the corresponding relationship includes the current scene, the acquisition module 302 may also be used to:
[0124] If the corresponding relationship does not include the current scene, obtaining the current environmental parameters for identifying the current scene;
[0125] Comparing the current environmental parameters with the environmental parameters of each scene included in the corresponding relationship;
[0126] By comparing, detecting whether there is a target scene in the corresponding relationship, wherein the value of the current environmental parameter is within a preset range of the value of the environmental parameter of the target scene;
[0127] If the target scene exists, the model corresponding to the target scene is determined as the target model.
[0128] In one implementation, the determining module 301 may be used to:
[0129] After the target application is switched to the background, counting the power consumption of the target application;
[0130] If the power consumption of the target application reaches a preset threshold, detecting whether the process of the target application is called by the foreground application;
[0131] If the process of the target application is not called by the foreground application, the current scene of the electronic device is determined.
[0132] An embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed on a computer, the computer executes the process in the application processing method provided in this embodiment.
[0133] An embodiment of the present application also provides an electronic device, including a memory and a processor, wherein the processor is used to execute the process in the application processing method provided in this embodiment by calling a computer program stored in the memory.
[0134] For example, the electronic device may be a mobile terminal such as a tablet computer or a smart phone. Figure 7 , Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0135] The electronic device 400 may include components such as a display screen 401, a memory 402, and a processor 403. Those skilled in the art will appreciate that Figure 7 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0136] The display screen 401 can be used to display information such as images, texts, etc.
[0137] The memory 402 may be used to store applications and data. The applications stored in the memory 402 include executable codes. The applications may be composed of various functional modules. The processor 403 executes various functional applications and data processing by running the applications stored in the memory 402.
[0138] The processor 403 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device and processes data by running or executing applications stored in the memory 402 and calling data stored in the memory 402, thereby monitoring the electronic device as a whole.
[0139] In this embodiment, the electronic device includes one or more applications. The processor 403 in the electronic device will load the executable code corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 403 will run the application program stored in the memory 402 to execute:
[0140] Determining a current scene in which the electronic device is located;
[0141] Acquire a target model corresponding to the current scene from at least two models pre-configured for the target application, wherein different models configured by the electronic device for the target application correspond to different scenes;
[0142] The target model is used to determine whether the target application can be cleaned.
[0143] See also Figure 8 The electronic device 500 may include a display screen 501, a memory 502, a processor 503, a speaker 504, a microphone 505 and other components.
[0144] The display screen 501 can be used to display information such as images, text, etc. For example, the display screen 501 can display inquiry information for inquiring the user.
[0145] The memory 502 may be used to store applications and data. The applications stored in the memory 502 include executable codes. The applications may be composed of various functional modules. The processor 503 executes various functional applications and data processing by running the applications stored in the memory 502.
[0146] The processor 503 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device and processes data by running or executing applications stored in the memory 502 and calling data stored in the memory 502, thereby monitoring the electronic device as a whole.
[0147] In this embodiment, the electronic device includes one or more applications. The processor 503 in the electronic device will load the executable code corresponding to the process of one or more application programs into the memory 502 according to the following instructions, and the processor 503 will run the application program stored in the memory 502 to execute:
[0148] Determining a current scene in which the electronic device is located;
[0149] Acquire a target model corresponding to the current scene from at least two models pre-configured for the target application, wherein different models configured by the electronic device for the target application correspond to different scenes;
[0150] The target model is used to determine whether the target application can be cleaned.
[0151] In one embodiment, the scene in which the electronic device is located includes at least an outdoor scene and an indoor scene, and the model configured by the electronic device for the target application includes at least a first model and a second model, wherein the first model corresponds to the outdoor scene, and the second model corresponds to the indoor scene; when the processor 503 executes the acquisition of the target model corresponding to the current scene, it can execute: if the current scene is the outdoor scene, then the first model is determined as the target model; if the current scene is the indoor scene, then the second model is determined as the target model.
[0152] In one implementation, when executing the determination of the current scene in which the electronic device is located, the processor 503 may execute: obtaining current environmental parameters; and identifying the current scene in which the electronic device is located according to the current environmental parameters.
[0153] In one implementation, when executing the step of obtaining the current environmental parameters, the processor 503 may execute: obtaining the current environmental parameters, where the environmental parameters at least include an ambient light brightness value, position data, and an ambient noise value.
[0154] In one implementation, before determining the current scene in which the electronic device is located, the processor 503 may further execute: establishing a corresponding relationship between the scene and the model.
[0155] Then, when the processor 503 executes the acquisition of the target model corresponding to the current scene, it can execute: detecting whether the corresponding relationship includes the current scene; if the corresponding relationship includes the current scene, determining the model corresponding to the current scene according to the corresponding relationship; and determining the model corresponding to the current scene as the target model.
[0156] In one embodiment, the corresponding relationship also includes environmental parameters for identifying each scene. Then, after detecting whether the corresponding relationship includes the current scene, the processor 503 may also execute: if the corresponding relationship does not include the current scene, then obtaining the current environmental parameters for identifying the current scene; comparing the current environmental parameters with the environmental parameters of each scene included in the corresponding relationship; through the comparison, detecting whether there is a target scene in the corresponding relationship, wherein the value of the current environmental parameters is within the preset range of the value of the environmental parameters of the target scene; if the target scene exists, then determining the model corresponding to the target scene as the target model.
[0157] In one embodiment, when executing the determination of the current scene in which the electronic device is located, the processor 503 may perform the following: after the target application is switched to the background, counting the amount of power consumed by the target application; if the amount of power consumed by the target application reaches a preset threshold, detecting whether the process of the target application is called by the foreground application; if the process of the target application is not called by the foreground application, determining the current scene in which the electronic device is located.
[0158] In the above embodiments, the description of each embodiment has its own focus. For the part that is not described in detail in a certain embodiment, please refer to the detailed description of the application processing method above, and will not be repeated here.
[0159] The application processing device provided in the embodiment of the present application belongs to the same concept as the application processing method in the above embodiment. Any method provided in the application processing method embodiment can be run on the application processing device. The specific implementation process is detailed in the application processing method embodiment and will not be repeated here.
[0160] It should be noted that, for the application processing method described in the embodiment of the present application, ordinary technicians in this field can understand that all or part of the process of implementing the application processing method described in the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, such as stored in a memory, and executed by at least one processor, and the execution process may include the process of the embodiment of the application processing method. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), etc.
[0161] For the application processing device of the embodiment of the present application, each functional module can be integrated into a processing chip, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium, such as a read-only memory, a disk or an optical disk.
[0162] The above is a detailed introduction to an application processing method, device, storage medium and electronic device provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. An application processing method, applied to an electronic device, wherein the electronic device includes one or more applications, in, The method comprises: Determining a current scene in which the electronic device is located; Obtain at least three models, wherein input parameters used by each of the models have corresponding attributes; Determine the target attribute corresponding to the target application according to the preset strategy; Determining at least two models corresponding to the target application from the at least three models according to the target attributes and the attributes of the input parameters used by each of the models; Acquire a target model corresponding to the current scene from at least two models corresponding to the target application, wherein different models configured by the electronic device for the target application correspond to different scenes; The target model is used to determine whether the target application can be cleaned.
2. The application processing method according to claim 1, in, The scene where the electronic device is located includes at least an outdoor scene and an indoor scene, and the at least two models corresponding to the target application include at least a first model and a second model, wherein the first model corresponds to the outdoor scene, and the second model corresponds to the indoor scene; If the current scene is the outdoor scene, determining the first model as the target model; If the current scene is the indoor scene, the second model is determined as the target model.
3. The application processing method according to claim 1, in, The determining the current scene of the electronic device includes: Get the current environment parameters; According to the current environmental parameters, a current scene in which the electronic device is located is identified.
4. The application processing method according to claim 3, in, The obtaining of current environment parameters includes: The current environmental parameters are obtained, where the environmental parameters include at least an ambient light brightness value, position data, and an ambient noise value.
5. The application processing method according to claim 3, in, Before determining the current scene in which the electronic device is located, the method further includes: establishing a corresponding relationship between the scene and the model; The acquiring of the target model corresponding to the current scene includes: Detecting whether the corresponding relationship includes the current scene; If the corresponding relationship includes the current scene, determining a model corresponding to the current scene according to the corresponding relationship; A model corresponding to the current scene is determined as a target model.
6. The application processing method according to claim 5, in, The corresponding relationship includes environmental parameters for identifying each scene; After detecting whether the corresponding relationship includes the current scene, the method further includes: If the corresponding relationship does not include the current scene, obtaining the current environmental parameters for identifying the current scene; Comparing the current environmental parameters with the environmental parameters of each scene included in the corresponding relationship; By comparing, detecting whether there is a target scene in the corresponding relationship, wherein the value of the current environmental parameter is within a preset range of the value of the environmental parameter of the target scene; If the target scene exists, the model corresponding to the target scene is determined as the target model.
7. The application processing method according to claim 1, in, Determining a current scene in which the electronic device is located includes: After the target application is switched to the background, counting the power consumption of the target application; If the power consumption of the target application reaches a preset threshold, detecting whether the process of the target application is called by the foreground application; If the process of the target application is not called by the foreground application, the current scene of the electronic device is determined.
8. An application processing device, applied to an electronic device, wherein the electronic device includes one or more applications, in, The device comprises: A determination module, used to determine the current scene in which the electronic device is located; The acquisition module is used to: acquire at least three models, wherein the input parameters used by each of the models have corresponding attributes; determine the target attribute corresponding to the target application according to a preset strategy; determine at least two models corresponding to the target application from the at least three models according to the target attribute and the attributes of the input parameters used by each of the models; acquire the target model corresponding to the current scene from the at least two models corresponding to the target application, wherein different models configured by the electronic device for the target application correspond to different scenes; The judging module is used to judge whether the target application can be cleaned by using the target model.
9. The application processing device according to claim 8, in, The scene where the electronic device is located includes at least an outdoor scene and an indoor scene, and the at least two models corresponding to the target application include at least a first model and a second model, wherein the first model corresponds to the outdoor scene, and the second model corresponds to the indoor scene; The acquisition module is used to: if the current scene is the outdoor scene, determine the first model as the target model; if the current scene is the indoor scene, determine the second model as the target model.
10. The application processing device according to claim 8, in, The determination module is used for: Get the current environment parameters; According to the current environmental parameters, a current scene in which the electronic device is located is identified.
11. The application processing device according to claim 10, in, The determination module is also used to: establish a corresponding relationship between the scene and the model; The acquisition module is used to: detect whether the corresponding relationship includes the current scene; if the corresponding relationship includes the current scene, determine the model corresponding to the current scene according to the corresponding relationship; and determine the model corresponding to the current scene as the target model.
12. The application processing device according to claim 8, in, The determination module is used for: After the target application is switched to the background, counting the power consumption of the target application; If the power consumption of the target application reaches a preset threshold, detecting whether the process of the target application is called by the foreground application; If the process of the target application is not called by the foreground application, the current scene of the electronic device is determined.
13. A storage medium having a computer program stored thereon, in, When the computer program is executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 7.
14. An electronic device comprising a memory and a processor, wherein the electronic device comprises one or more applications. in, The processor is configured to execute, by calling a computer program stored in the memory: Determining a current scene in which the electronic device is located; Obtain at least three models, wherein input parameters used by each of the models have corresponding attributes; Determine the target attribute corresponding to the target application according to the preset strategy; Determining at least two models corresponding to the target application from the at least three models according to the target attributes and the attributes of the input parameters used by each of the models; Acquire a target model corresponding to the current scene from at least two models corresponding to the target application, wherein different models configured by the electronic device for the target application correspond to different scenes; The target model is used to determine whether the target application can be cleaned.
15. The electronic device according to claim 14, in, The scene where the electronic device is located includes at least an outdoor scene and an indoor scene, and the at least two models corresponding to the target application include at least a first model and a second model, wherein the first model corresponds to the outdoor scene, and the second model corresponds to the indoor scene; The processor is configured to execute: If the current scene is the outdoor scene, determining the first model as the target model; If the current scene is the indoor scene, the second model is determined as the target model.
16. The electronic device according to claim 14, in, The processor is configured to execute: Get the current environment parameters; According to the current environmental parameters, a current scene in which the electronic device is located is identified.
17. The electronic device according to claim 16, in, The processor is configured to execute: The current environmental parameters are obtained, where the environmental parameters include at least an ambient light brightness value, position data, and an ambient noise value.
18. The electronic device according to claim 16, in, The processor is configured to execute: Establish the correspondence between the scene and the model; Detecting whether the corresponding relationship includes the current scene; If the corresponding relationship includes the current scene, determining a model corresponding to the current scene according to the corresponding relationship; A model corresponding to the current scene is determined as a target model.
19. The electronic device according to claim 18, in, The corresponding relationship includes environmental parameters for identifying each scene; the processor is used to execute: If the corresponding relationship does not include the current scene, obtaining the current environmental parameters for identifying the current scene; Comparing the current environmental parameters with the environmental parameters of each scene included in the corresponding relationship; By comparing, detecting whether there is a target scene in the corresponding relationship, wherein the value of the current environmental parameter is within a preset range of the value of the environmental parameter of the target scene; If the target scene exists, the model corresponding to the target scene is determined as the target model.
20. The electronic device according to claim 14, in, The processor is configured to execute: After the target application is switched to the background, counting the power consumption of the target application; If the power consumption of the target application reaches a preset threshold, detecting whether the process of the target application is called by the foreground application; If the process of the target application is not called by the foreground application, the current scene of the electronic device is determined.
