Starting control method and device of application program, electronic equipment and storage medium
By obtaining and analyzing the startup parameters and device status of the target application, determining priority and performing corresponding startup control operations, the problem of malicious application self-starting slowing down the device speed is solved, and more efficient startup control is achieved.
Patent Information
- Application Number
- CN202310648506.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-01
- Publication Date
- 2024-12-03
AI Technical Summary
Malicious applications are self-started or associated in the background of electronic devices, resulting in increased power consumption and slowed down in operation, and lack of effective startup control methods.
By obtaining the startup parameters of the target application, determining its priority, and determining the target priority based on the device status and control conditions, performing corresponding startup control operations to intercept or allow the application to start, ensuring the efficiency of the device operation.
It effectively avoids the problem of malicious applications starting by themselves and slowing down the device speed, improves the accuracy and flexibility of startup control, and adapts to different usage scenarios.
Smart Images

Figure CN119065733A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of operating systems, and in particular to a method and device for controlling the startup of an application program, an electronic device, and a storage medium. Background Art
[0002] With the rapid development of electronic device technology, more and more applications are installed on electronic devices today, including many malicious applications that can start their own application processes through self-start or associated start without the user's knowledge to achieve their profit-making purpose.
[0003] In practice, it is found that these malicious applications that are automatically started or associated with the start-up will increase the power consumption of the electronic device and slow down the operation speed of the electronic device when running in the background of the electronic device. Therefore, how to control the start-up of these malicious applications is an urgent problem to be solved. Summary of the invention
[0004] The embodiments of the present application disclose a method and device for controlling the startup of an application, an electronic device, and a storage medium, which can effectively control the startup of an application to prevent malicious applications from starting up on their own and slowing down the operation speed of the electronic device, thereby improving the accuracy of startup control.
[0005] A first aspect of an embodiment of the present application discloses a method for controlling the startup of an application program, which is applied to an electronic device. The method includes:
[0006] Obtaining startup parameters corresponding to the target application being started, and determining a first priority corresponding to the startup parameters;
[0007] Determine a target priority according to the first priority and priorities corresponding to a plurality of control conditions, the target priority being the first priority or the second priority, the second priority being the priority corresponding to the target control condition satisfied by the state parameter, and the second priority being greater than the first priority, the state parameter being used to describe the device state of the electronic device and / or the application state of the target application;
[0008] Execute a startup control operation corresponding to the target priority.
[0009] A second aspect of an embodiment of the present application discloses a device for controlling the startup of an application program, which is applied to an electronic device, and the device includes:
[0010] A first determining unit, configured to obtain a startup parameter corresponding to a target application being started, and determine a first priority corresponding to the startup parameter;
[0011] a second determination unit, configured to determine a target priority according to the first priority and priorities corresponding to a plurality of control conditions, wherein the target priority is the first priority or the second priority, the second priority is the priority corresponding to the target control condition satisfied by the state parameter, and the second priority is greater than the first priority, and the state parameter is used to describe the device state of the electronic device and / or the application state of the target application;
[0012] An execution unit is used to execute a startup control operation corresponding to the target priority.
[0013] A third aspect of the present application discloses an electronic device, including:
[0014] A memory storing executable program code;
[0015] a processor coupled to the memory;
[0016] The processor calls the executable program code stored in the memory to execute the startup control method of the application disclosed in the first aspect of the embodiment of the present application.
[0017] A fourth aspect of an embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the startup control method of an application disclosed in the first aspect of an embodiment of the present application.
[0018] Compared with the related art, the embodiments of the present application have the following beneficial effects:
[0019] In an embodiment of the present application, the electronic device can obtain the startup parameters corresponding to the target application being started, and determine the first priority corresponding to the startup parameters; further, the electronic device can determine the target priority according to the first priority, and the priorities corresponding to multiple control conditions, wherein, if there is a target control condition satisfied by the state parameter among the multiple control conditions, and the second priority corresponding to the target control condition is greater than the first priority corresponding to the startup parameter, the second priority is used as the target priority, otherwise the first priority is used as the target priority, and then the electronic device can perform the startup control operation corresponding to the target priority. It can be seen that by implementing the embodiment of the present application, the first priority can be determined according to the startup parameters of the target application, and the target priority can be further determined in combination with the priority corresponding to the control condition, and then the startup control operation that best fits the actual situation of the target application and / or the electronic device is determined according to the target priority, and then the electronic device can flexibly perform the corresponding startup control operation for the target application to avoid malicious applications starting up by themselves and slowing down the operation speed of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0021] Figure 1 It is a flowchart of the application management strategy in the related technology disclosed in the embodiment of the present application;
[0022] Figure 2 It is a flowchart of a method for starting and controlling an application program disclosed in an embodiment of the present application;
[0023] Figure 3 It is a flowchart of another application startup control method disclosed in an embodiment of the present application;
[0024] Figure 4 It is a flowchart of a method for starting and controlling an application program disclosed in an embodiment of the present application;
[0025] Figure 5 It is a flowchart of another application startup control method disclosed in an embodiment of the present application;
[0026] Fig. 6A is a schematic diagram of a conditional configuration file disclosed in an embodiment of the present application;
[0027] Figure 6B It is a schematic diagram of updating a configuration file disclosed in an embodiment of the present application;
[0028] Figure 7 It is a structural diagram of a startup control device for an application disclosed in an embodiment of the present application;
[0029] Figure 8 It is a structural schematic diagram of an electronic device disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0031] It should be noted that the terms "first", "second", "third" and "fourth" in the specification and claims of the present application are used to distinguish different objects rather than to describe a specific order. The terms "including" and "having" in the embodiments of the present application and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device including a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] The embodiments of the present application disclose a method and device for controlling the startup of an application, an electronic device, and a storage medium, which can control the startup of the application according to the startup method of the application and the overall status of the electronic device to prevent malicious applications from starting up on their own and slowing down the operation speed of the electronic device.
[0033] The technical solution of the present application will be described in detail below in conjunction with specific embodiments.
[0034] In order to more clearly illustrate a method for controlling the startup of an application disclosed in an embodiment of the present application, the control method of an application in the related art is first introduced. As mentioned above, there may be some malicious applications in electronic devices, which can start their own application processes by self-starting or associated starting without the user's awareness, thereby increasing the power consumption of the electronic device and slowing down the operation speed of the electronic device.
[0035] In this regard, related technologies provide some application management strategies to deal with the self-starting of malicious applications. Figure 1 , Figure 1 1 is a flow chart of the application management strategy in the related technology disclosed in the embodiment of the present application. In step 1, when the electronic device detects that the target application is started automatically or associated, the condition judgment strategy can be triggered. Figure 1 As shown, the conditional judgment strategy may include one or more judgment conditions, and the judgment conditions include release conditions and interception conditions. The release conditions may include: when the target application is associated with a desktop plug-in, the target application is allowed to start; the interception conditions may include: when the remaining power of the electronic device is lower than the power threshold, the target application is intercepted from starting, etc., which are not limited here.
[0036] Step 2: The electronic device can determine whether the device state and / or application state meet the judgment conditions according to the device state of the electronic device and / or the application state of the target application; if the interception condition is met, the start of the target application is directly intercepted.
[0037] If the release conditions are met, the subsequent step three will be carried out: the list judgment strategy, where the list judgment strategy is that the electronic device determines whether the target application matches the whitelist or the blacklist based on the list configuration file; if the target application matches the whitelist, the target application is allowed to start; if the target application matches the blacklist, the target application is blocked from starting.
[0038] It can be seen that in the related technology, after the device status and / or application status matches a certain interception condition, the subsequent configuration list judgment step will not be performed, which will cause the whitelist to become invalid; in addition, if the device status and / or application status meets a certain release condition, it may also be intercepted due to subsequent matching with the blacklist. In other words, the control strategy for application programs in the related technology is not flexible, and thus cannot meet the control needs in some special usage scenarios.
[0039] In this regard, an embodiment of the present application discloses a method for startup control of an application, wherein an electronic device can obtain startup parameters corresponding to a target application being started, and determine a first priority corresponding to the startup parameters; further, the electronic device can determine a target priority based on the first priority and the priorities corresponding to a plurality of control conditions, wherein if there is a target control condition satisfied by the state parameter among the plurality of control conditions, and the second priority corresponding to the target control condition is greater than the first priority corresponding to the startup parameter, the second priority is used as the target priority, otherwise the first priority is used as the target priority, and then the electronic device can perform a startup control operation corresponding to the target priority. It can be seen that by implementing an embodiment of the present application, the first priority can be determined based on the startup parameters of the target application, and the target priority can be further determined in combination with the priority corresponding to the control condition, and then the startup control operation that best suits the current state of the electronic device can be flexibly determined based on the target priority, so that the electronic device can perform the corresponding startup control operation for the target application to avoid malicious applications starting up on their own and slowing down the operation of the electronic device.
[0040] Based on this, the following introduces the application startup control method and device, electronic device, and storage medium disclosed in the embodiments of the present application.
[0041] See also Figure 2 , Figure 2 This is a flowchart of a method for controlling the startup of an application disclosed in an embodiment of the present application. Optionally, the method can be applied to various electronic devices, including portable devices such as mobile phones and tablet computers, wearable devices such as smart watches and smart bracelets, and desktop devices such as desktop computers and desktop TVs, without limitation. Optionally, the method can include the following steps:
[0042] 202. Obtain startup parameters corresponding to the target application being started, and determine a first priority corresponding to the startup parameters.
[0043] In an embodiment of the present application, when the electronic device detects that the target application is being started automatically or is being started in association with another application, the electronic device can obtain startup parameters corresponding to the target application being started.
[0044] Among them, self-starting refers to the situation where the target application starts automatically without the user inputting a startup instruction to the electronic device to start the target application. Associated startup refers to the situation where the target application starts under the call of other applications without the user inputting a startup instruction to the electronic device to start the target application. For example, during the running process of application A, it automatically calls application B so that application B starts in association.
[0045] It is understandable that, whether it is self-start or associated startup, the target application starts automatically without the user's knowledge and without corresponding usage needs. At this time, when the target application runs without the user's awareness, the user cannot shut it down in time, which will not only increase the power consumption of the electronic device, but also may slow down the operation speed of the electronic device. In view of the above situation, the electronic device can use the startup control method of the application disclosed in the embodiment of the present application to control the startup of the target application.
[0046] It should be further explained that if the target application is started according to the startup instruction issued by the user, it means that the target application is started under the user's normal usage scenario. At this time, in order to ensure that the target application can be started normally and to increase the speed of starting the target application, the electronic device does not need to execute the startup control method of the application disclosed in the embodiment of the present application, but can directly start the target application.
[0047] In other optional embodiments, when the electronic device is in a low-power state, a low-power state, or the target application is a blacklisted application, even if the target application is started according to a start-up instruction issued by the user, the electronic device can still use the application startup control method disclosed in the embodiment of the present application to control the startup of the target application. Wherein, the blacklist means that the corresponding application is not allowed to be started.
[0048] Optionally, when the control conditions include the electronic device being in a low-battery state and / or a low-power consumption state, the startup of the target application is intercepted; when the target application is a blacklisted application, the startup of the target application is intercepted, and the electronic device detects that the target application is started according to the startup instruction issued by the user, it can execute step 202.
[0049] By implementing the above method, when the target application is started according to a startup instruction issued by the user, the electronic device can still use the startup control method of the application disclosed in the embodiment of the present application to control the startup of the target application, thereby expanding the application scenarios and compatibility of the control method.
[0050] Optionally, when intercepting the launch of a target application, the electronic device may output a prompt message, where the prompt message is used to explain the reason for intercepting the target application; further, if an instruction to continue launching is detected, the electronic device may continue launching the target application.
[0051] By implementing the above method, when the user chooses to continue to start the intercepted target application, the target application can continue to be started, so as to ensure that the target application can be started normally, thereby improving the controllability of the method.
[0052] In an embodiment of the present application, the startup parameters corresponding to the target application are parameters used to describe the startup method of the target application, including but not limited to: the package name of the initiator, the package name of the associate, and the process name of the startup process, etc. Then the electronic device can determine the startup method of the target application according to the startup parameters corresponding to the target application. For example: the startup method is that component A starts application C through method B; wherein component A is the initiator and application C is the associate. Among them, the component can refer to a module in an operating system (for example: Android operating system) for performing certain specific functions, including but not limited to four major components: Activity, Service, Broadcast and ContentProvider.
[0053] Optionally, different startup parameters may correspond to different priorities, and different priorities are used to determine whether to allow the application to start. Optionally, the correspondence between the startup parameters and the priorities may be determined by the developer based on development experience, or by the user based on usage requirements, which is not limited here. Optionally, the electronic device may determine the first priority corresponding to the startup parameter based on the correspondence between the startup parameters and the priorities.
[0054] 204. Determine the target priority based on the first priority and the priorities corresponding to multiple control conditions. The target priority is the first priority or the second priority. The second priority is the priority corresponding to the target control condition satisfied by the state parameter, and the second priority is greater than the first priority. The state parameter is used to describe the device state of the electronic device and / or the application state of the target application.
[0055] In the embodiment of the present application, there may be multiple control conditions corresponding to the start of the target application, and each control condition may correspond to a priority. Optionally, the correspondence between the control conditions and the priority may be determined by the developer based on the development experience or by the user based on the usage requirements, which is not limited here.
[0056] Optionally, the electronic device may compare the first priority with the priorities corresponding to the multiple control conditions. If it is determined during the comparison that a target control condition exists, the second priority corresponding to the target control condition is used as the target priority, wherein the target control condition is a control condition satisfied by the state parameter, and the priority corresponding to the target control condition is greater than the first priority. If the target control condition is not detected during the comparison, the electronic device may use the first priority corresponding to the startup parameter as the target control condition.
[0057] The state parameter is used to describe the device state of the electronic device and / or the application state of the target application. Optionally, the control condition may include a control condition for the device state and / or a control condition for the application state.
[0058] Optionally, the device status may include temperature information, power information, etc. of the electronic device; in this regard, the control conditions for the device status may include: when the temperature information of the electronic device is higher than a temperature threshold, intercepting the launch of the target application; when the remaining power of the electronic device is lower than a power threshold, intercepting the launch of the target application.
[0059] Optionally, the application status may include whether the target application is associated with a desktop plug-in, whether the target application is running in the foreground of the electronic device, etc.; optionally, the control conditions for the application status may include: if the target application is associated with a desktop plug-in, the target application is allowed to start, otherwise the target application is blocked from starting; if the target application is running in the foreground of the electronic device, the target application is allowed to start, otherwise the target application is blocked from starting.
[0060] 206. Execute the startup control operation corresponding to the target priority.
[0061] In the embodiment of the present application, different target priorities may correspond to different startup control operations. Optionally, the startup control operation may include allowing the target application to start, intercepting the target application to start, and determining whether to allow the target application to start according to the default control policy, which is not limited here.
[0062] Optionally, the default control policy can be set by developers based on development experience, or by users based on usage requirements, and is not limited here.
[0063] By implementing the methods disclosed in the above embodiments, the electronic device can obtain the startup parameters corresponding to the target application being started, and determine the first priority corresponding to the startup parameters; further, the electronic device can determine the target priority based on the first priority and the priorities corresponding to multiple control conditions, wherein if there is a target control condition satisfied by the state parameter among the multiple control conditions, and the second priority corresponding to the target control condition is greater than the first priority corresponding to the startup parameter, the second priority is used as the target priority, otherwise the first priority is used as the target priority, and then the electronic device can perform the startup control operation corresponding to the target priority. It can be seen that by implementing the embodiments of the present application, the first priority can be determined according to the startup parameters of the target application, and the target priority can be further determined in combination with the priority corresponding to the control condition, and then the startup control operation that best suits the current state of the electronic device is determined according to the target priority, and then the electronic device can flexibly perform the corresponding startup control operation for the target application to avoid malicious applications starting up on their own and slowing down the operation of the electronic device.
[0064] See also Figure 3 , Figure 3 This is a flow chart of another application startup control method disclosed in an embodiment of the present application. Optionally, the method can be applied to various electronic devices, including portable devices such as mobile phones and tablet computers, wearable devices such as smart watches and smart bracelets, and desktop devices such as desktop computers and desktop TVs, which are not limited here. Optionally, the method can include the following steps:
[0065] 302. Obtain startup parameters corresponding to the target application being started, and determine a first priority corresponding to the startup parameters.
[0066] 304. Compare the first priority with the priorities corresponding to the multiple control conditions. If there is a target control condition, the priority corresponding to the target control condition is determined as the target priority. The target control condition is a control condition satisfied by the state parameter, and the priority corresponding to the target control condition is greater than the first priority.
[0067] Optionally, multiple control conditions can be arranged in order of priority from high to low; then the electronic device can compare the first priority with the priorities of multiple control conditions in order of priority from high to low. Optionally, when the electronic device compares the first priority with the priority corresponding to the current control condition, if the priority corresponding to the current control condition is less than or equal to the first priority, the first priority is determined as the target priority;
[0068] It should be noted that since the electronic device compares the first priority with the priorities of multiple control conditions in order from high to low, if the priority corresponding to the current control condition is less than or equal to the first priority, it means that the control conditions arranged after the current control condition that have not been compared are all lower than the first priority, so there is no need to continue comparing, and the electronic device can directly determine the first priority as the target priority.
[0069] By implementing the above method, when the priority corresponding to the current control condition is less than or equal to the first priority, the priorities corresponding to subsequent control conditions with lower priorities will no longer be compared, thereby reducing the calculation amount of the electronic device and saving power consumption. In addition, the efficiency of the control method can be improved.
[0070] Optionally, if the priority corresponding to the current control condition is greater than the first priority, it is determined whether the state parameter meets the current control condition; if the state parameter meets the current control condition, the current control condition is determined as the target control condition;
[0071] If the state parameter does not satisfy the current control condition, the next control condition is used as the new current control condition, and a step of comparing the first priority with the priority corresponding to the current control condition is performed.
[0072] Among them, if the current state parameters do not meet the current control conditions, the electronic device can use the next control condition as the new current control condition, and re-execute the step of comparing the first priority with the priority corresponding to the current control condition until the current control condition is the last control condition among multiple control conditions.
[0073] When the above method is implemented, when the state parameters meet the target control conditions and the priority corresponding to the target control conditions is greater than the first priority, it means that the control strategy corresponding to the target control conditions is the startup control strategy that best matches the target application. In this regard, the electronic device can use the priority corresponding to the target control conditions as the target priority, so that it can subsequently execute the startup control strategy that best matches the target application, thereby improving the control efficiency of the application control strategy.
[0074] Optionally, if none of the status parameters satisfies multiple control conditions, the electronic device may determine the first priority as the target priority.
[0075] In other optional embodiments, if the first priority is greater than the priorities corresponding to multiple control conditions, the first priority is determined as the target priority.
[0076] When implementing the above method, if the first priority is greater than the priorities corresponding to multiple control conditions, there is no need to perform a step of determining whether the state parameters meet the control conditions. The electronic device can directly determine the first priority as the target priority. Among them, the step of determining whether the state parameters meet the control conditions is not performed, which can reduce the calculation amount of the electronic device, save power consumption, and improve the efficiency of the control method.
[0077] 306. Execute the startup control operation corresponding to the target priority.
[0078] By implementing the methods disclosed in the above embodiments, a first priority can be determined according to the startup parameters of the target application, and a target priority can be further determined in combination with the priority corresponding to the control condition, and then the startup control operation most suitable for the current state of the electronic device can be determined according to the target priority, so that the electronic device can flexibly perform the corresponding startup control operation for the target application to avoid malicious applications starting up on their own and slowing down the running speed of the electronic device; and, when the priority corresponding to the current control condition is less than or equal to the first priority, the priority corresponding to the subsequent control condition with a lower priority is no longer compared, thereby reducing the calculation amount of the electronic device and saving power consumption, and also improving the efficiency of the control method; and, when the state parameters meet the target control conditions, If the target control condition has a priority level greater than the first priority level, then the control strategy corresponding to the target control condition is the startup control strategy that best matches the target application. The electronic device can use the priority level corresponding to the target control condition as the target priority level, so that the startup control strategy that best matches the target application can be executed subsequently, thereby improving the control efficiency of the application control strategy. If the first priority level is greater than the priorities corresponding to multiple control conditions, then there is no need to perform a step of determining whether the state parameters meet the control conditions. The electronic device can directly determine the first priority level as the target priority level. The step of determining whether the state parameters meet the control conditions is not performed, thereby reducing the amount of calculation of the electronic device, saving power consumption, and improving the efficiency of the control method.
[0079] See also Figure 4 , Figure 4It is a flowchart of a method for controlling the startup of an application disclosed in an embodiment of the present application. When the electronic device detects that the target application 400 is started, it can determine the startup parameter 410 corresponding to the target application; then determine the first priority 430 in the list configuration file 420 according to the startup parameter 410; then determine multiple control conditions 440 according to the type of startup component included in the startup parameter 410; then the electronic device can traverse the multiple control conditions 440 (optionally, the electronic device can traverse the multiple control conditions 440 in order from high to low priority) to compare the first priority 430 with the priorities corresponding to the multiple control conditions 440; wherein the electronic device can compare the first priority 430 with the priority corresponding to the current control condition. If the priority level corresponding to the current control condition is less than or equal to the first priority level 430, the first priority level 430 is used as the target priority level 450; if the priority level corresponding to the current control condition is greater than the first priority level 430, it is determined whether the state parameter satisfies the current control condition; if so, the second priority level 460 corresponding to the current control condition is used as the target priority level 450; if not, it is determined whether multiple control conditions 440 have been traversed, and if so, the first priority level 430 is used as the target priority level 450; if not, the next control condition is used as the current control priority, and the step of comparing the first priority level 430 with the priority level corresponding to the current control condition is performed;
[0080] Furthermore, when the electronic device determines the target priority 450 , it can perform the corresponding startup control operation 470 according to the target priority 450 .
[0081] See also Figure 5 , Figure 5 This is a flowchart of another application startup control method disclosed in an embodiment of the present application. Optionally, the method can be applied to various electronic devices, including portable devices such as mobile phones and tablet computers, wearable devices such as smart watches and smart bracelets, and desktop devices such as desktop computers and desktop TVs, which are not limited here. Optionally, the method can include the following steps:
[0082] 502. Obtain startup parameters corresponding to the target application being started, and determine a first priority corresponding to the startup parameters according to a list configuration file, wherein the list configuration file includes one or more sets of startup parameters, and each set of startup parameters corresponds to a priority.
[0083] Optionally, a list configuration file may be stored in the electronic device, and the list configuration file may include one or more sets of startup parameters, wherein each set of startup parameters may correspond to a priority.
[0084] For example, the first set of startup parameters is component A starting application C through method B, and its corresponding priority is 500; the second set of startup parameters is component D starting application F through method E, and its corresponding priority is -500, etc., which are not limited here.
[0085] Based on this, the electronic device can match the corresponding target startup parameters in the list configuration file based on the startup parameters corresponding to the target application being started, and use the priority corresponding to the target startup parameters as the first priority.
[0086] In another optional embodiment, if the electronic device cannot match the target startup parameters that match the startup parameters in the list configuration file, the startup of the target application can be directly controlled according to the default control policy.
[0087] Optionally, the developer may determine the second update file according to requirements and upload the second update file to the cloud server, and then the electronic device may receive the second update file sent by the cloud server and update the file content of the list configuration file according to the second update file.
[0088] By implementing the above method, developers can update the list configuration file at any time by uploading the update file, thereby improving the efficiency of maintenance; in addition, the update can be quickly effective through the online update method, thereby improving the efficiency of the update.
[0089] 504. Determine the target priority based on the first priority and the priorities corresponding to multiple control conditions. The target priority is the first priority or the second priority. The second priority is the priority corresponding to the target control condition satisfied by the state parameter, and the second priority is greater than the first priority. The state parameter is used to describe the device state of the electronic device and / or the application state of the target application.
[0090] As an optional implementation, multiple control conditions may be matched with a startup component included in the startup parameters, where the startup component is a component used to start the target application.
[0091] Optionally, the electronic device may store a conditional configuration file, which may include one or more conditional policies; a conditional policy may include multiple control conditions corresponding to the same startup component. Optionally, the conditional policy may also include a corresponding default control policy.
[0092] See also Fig. 6A , Fig. 6A 600 may include a conditional policy 610 corresponding to component A, a conditional policy 620 corresponding to component B, etc. Fig. 6ATwo conditional policies are shown as examples only for the sake of convenience. In other optional embodiments, the conditional configuration file 600 may include three, five, or more conditional policies, which is not limited here.
[0093] Taking the conditional policy 610 corresponding to component A as an example, optionally, the conditional policy 610 may include the name information 6101 of component A, the default control policy 6102 and the condition list 6103; wherein the condition list 6103 may include one or more control conditions, each of which may include a corresponding condition name and priority, which is not limited here. Optionally, the content and format of other conditional policies may be similar to the conditional policy 610, which will not be described in detail here.
[0094] As an optional implementation, the developer can determine the first update file according to the needs and upload the first update file to the cloud server. Then the electronic device can receive the first update file sent by the cloud server and update the conditional configuration file according to the first update file to update the control conditions in the conditional configuration file.
[0095] By implementing the above method, developers can update the control conditions at any time by uploading update files, which improves the efficiency of maintenance. In addition, when adjusting the control conditions, it is only necessary to adjust the configuration in the condition configuration file, without in-depth code analysis, thus reducing the difficulty of maintenance.
[0096] See also Figure 6B , Figure 6B 6 is a schematic diagram of updating a configuration file disclosed in an embodiment of the present application. Optionally, the developer 630 can upload the first update file 640 and the second update file 650 to the cloud server 660; then the electronic device 670 can receive the first update file 640 issued by the cloud server 660 to update the condition configuration file 600, and update the list configuration file 680 according to the second update file 650. This is not limited here.
[0097] 506. Execute a startup control operation corresponding to the target priority.
[0098] As an optional implementation, if the target priority is within the first priority range, the electronic device can determine that the corresponding startup control operation is to allow the target application to start; if the target priority is within the second priority range, the electronic device can determine that the corresponding startup control operation is to intercept the target application from starting; if the target priority is the third priority, the electronic device can determine that the corresponding startup control operation is to determine whether to allow the target application to start according to the default control policy.
[0099] Optionally, the first priority range may be greater than N, the second priority range may be less than N, and the third priority range may be N, where N is an integer. For example, N may be -1, 0, 2, etc., which is not limited here.
[0100] As another optional implementation, if the type corresponding to the startup component included in the startup parameters is a target type, allowing the target application to start is used as a default control policy, and the target type refers to the type visible to the user of the operation interface;
[0101] If the type of the startup component included in the startup parameters is not the target type, the target application startup will be intercepted as the default control strategy.
[0102] It should be noted that if the type of the startup component is visible to the user of the operation interface, allowing the target application to start can be used as the default control policy to avoid intercepting the startup control operation from being displayed in the operation interface and affecting the user's use of the electronic device.
[0103] Optionally, the target type startup component may be an Activity component, and the non-target type startup component may include Service, Broadcast, ContentProvider, etc., which are not limited here.
[0104] By implementing the above method, it is possible to avoid the interception of the control operation started and displayed on the operation interface, thereby affecting the user's use of the electronic device, thereby achieving a user-unaware startup effect.
[0105] By implementing the methods disclosed in the above embodiments, a first priority can be determined according to the startup parameters of the target application, and a target priority can be further determined in combination with the priority corresponding to the control condition, and then the startup control operation most suitable for the current state of the electronic device can be determined according to the target priority, and then the electronic device can flexibly perform the corresponding startup control operation for the target application to avoid malicious applications starting up on their own and slowing down the running speed of the electronic device; and, developers can update the list configuration file at any time by uploading update files, thereby improving maintenance efficiency; in addition, updates can be made to take effect quickly through online updates, thereby improving update efficiency; and, developers can update the control conditions at any time by uploading update files, thereby improving maintenance efficiency; in addition, when adjusting the control conditions, only the configuration in the condition configuration file needs to be adjusted, without the need for in-depth code analysis, thereby reducing the difficulty of maintenance; and, it can avoid intercepting the startup control operation from being displayed on the operation interface and affecting the user's use of the electronic device, thereby achieving a startup effect that the user is not aware of.
[0106] See also Figure 7 , Figure 770 is a schematic diagram of the structure of a startup control device for an application disclosed in an embodiment of the present application. Optionally, the device can be applied to various electronic devices, including portable devices such as mobile phones and tablet computers, wearable devices such as smart watches and smart bracelets, and desktop devices such as desktop computers and desktop TVs, which are not limited here. Optionally, the device may include a first determination unit 702, a second determination unit 704 and an execution unit 706, wherein:
[0107] A first determining unit 702 is used to obtain a startup parameter corresponding to the target application being started, and determine a first priority corresponding to the startup parameter;
[0108] A second determining unit 704 is used to determine a target priority according to the first priority and priorities corresponding to the multiple control conditions, where the target priority is the first priority or the second priority, the second priority is the priority corresponding to the target control condition satisfied by the state parameter, and the second priority is greater than the first priority, and the state parameter is used to describe the device state of the electronic device and / or the application state of the target application;
[0109] The execution unit 706 is used to execute the startup control operation corresponding to the target priority.
[0110] By implementing the above-mentioned device, the electronic device can obtain the startup parameters corresponding to the target application being started, and determine the first priority corresponding to the startup parameters; further, the electronic device can determine the target priority according to the first priority and the priorities corresponding to multiple control conditions, wherein, if there is a target control condition satisfied by the state parameter among the multiple control conditions, and the second priority corresponding to the target control condition is greater than the first priority corresponding to the startup parameter, the second priority is used as the target priority, otherwise the first priority is used as the target priority, and then the electronic device can perform the startup control operation corresponding to the target priority. It can be seen that by implementing the embodiment of the present application, the first priority can be determined according to the startup parameters of the target application, and the target priority can be further determined in combination with the priority corresponding to the control condition, and then the startup control operation that best suits the current state of the electronic device is determined according to the target priority, and then the electronic device can flexibly perform the corresponding startup control operation for the target application to avoid malicious applications starting up on their own and slowing down the operation of the electronic device.
[0111] As an optional implementation, the second determination unit 704 is also used to compare the first priority with the priorities corresponding to multiple control conditions; and, if there is a target control condition, the priority corresponding to the target control condition is determined as the target priority, the target control condition is a control condition satisfied by the state parameters, and the priority corresponding to the target control condition is greater than the first priority.
[0112] When the above-mentioned device is implemented, when the state parameters meet the target control conditions and the priority corresponding to the target control conditions is greater than the first priority, it means that the control strategy corresponding to the target control conditions is the startup control strategy that best matches the target application. In this regard, the electronic device can use the priority corresponding to the target control conditions as the target priority, so that it can subsequently execute the startup control strategy that best matches the target application, thereby improving the control efficiency of the application control strategy.
[0113] As an optional implementation, the multiple control conditions are arranged in descending order of priority; the second determination unit 704 is further used to compare the first priority with the priority corresponding to the current control condition;
[0114] as well as, Figure 7 The device shown may further include a third determining unit not shown in the figure, wherein:
[0115] The third determination unit is used to determine the first priority as the target priority when the priority corresponding to the current control condition is less than or equal to the first priority.
[0116] By implementing the above-mentioned device, when the priority corresponding to the current control condition is less than or equal to the first priority, the priorities corresponding to subsequent control conditions with lower priorities will no longer be compared, thereby reducing the calculation amount of the electronic device and saving power consumption. In addition, the efficiency of the control method can be improved.
[0117] As an optional implementation, Figure 7 The device shown may further include a fourth determining unit not shown in the figure, wherein:
[0118] The fourth determination unit is used to determine whether the state parameter meets the current control condition after comparing the first priority with the priority corresponding to the current control condition, if the priority corresponding to the current control condition is greater than the first priority; if the state parameter meets the current control condition, the current control condition is determined as the target control condition; if the state parameter does not meet the current control condition, the next control condition is used as the new current control condition, and the step of comparing the first priority with the priority corresponding to the current control condition is executed.
[0119] When the above-mentioned device is implemented, when the state parameters meet the target control conditions and the priority corresponding to the target control conditions is greater than the first priority, it means that the control strategy corresponding to the target control conditions is the startup control strategy that best matches the target application. In this regard, the electronic device can use the priority corresponding to the target control conditions as the target priority, so that it can subsequently execute the startup control strategy that best matches the target application, thereby improving the control efficiency of the application control strategy.
[0120] As an optional implementation, Figure 7 The device shown may further include a fifth determining unit not shown in the figure, wherein:
[0121] The fifth determination unit is used to determine the first priority as the target priority if the first priority is greater than the priorities corresponding to the multiple control conditions after comparing the first priority with the priorities corresponding to the multiple control conditions.
[0122] When the above device is implemented, if the first priority is greater than the priorities corresponding to multiple control conditions, there is no need to perform the step of determining whether the state parameters meet the control conditions. The electronic device can directly determine the first priority as the target priority. In particular, by not performing the step of determining whether the state parameters meet the control conditions, the calculation amount of the electronic device can be reduced, power consumption can be saved, and the efficiency of the control method can be improved.
[0123] As an optional implementation, Figure 7 The device shown may further include a sixth determining unit not shown, wherein:
[0124] The sixth determination unit is used to determine the first priority as the target priority if none of the state parameters satisfy the multiple control conditions after comparing the first priority with the priorities corresponding to the multiple control conditions.
[0125] When the above device is implemented, if none of the state parameters satisfy multiple control conditions, the first priority is directly determined as the target priority, thereby improving the flexibility of the method.
[0126] As an optional implementation, the plurality of control conditions are matched with a startup component included in the startup parameters, where the startup component is a component used to start the target application.
[0127] By implementing the above device, different starting components can correspond to different control conditions, thereby improving the flexibility of the method.
[0128] As an optional implementation, Figure 7 The device shown may also include a first updating unit not shown in the figure, wherein:
[0129] The first updating unit is used to receive a first updating file sent by the cloud server and update multiple control conditions according to the first updating file.
[0130] By implementing the above device, developers can update the control conditions at any time by uploading update files, which improves the efficiency of maintenance. In addition, when adjusting the control conditions, it is only necessary to adjust the configuration in the condition configuration file without in-depth code analysis, thereby reducing the difficulty of maintenance.
[0131] As an optional implementation, the first determining unit 702 is further configured to determine a first priority corresponding to the startup parameter according to the list configuration file, the list configuration file including one or more sets of startup parameters, each set of startup parameters corresponding to a priority;
[0132] as well as, Figure 7 The device shown may also include a second updating unit not shown in the figure, wherein:
[0133] The second updating unit is used to receive a second updating file sent by the cloud server, and update the file content of the list configuration file according to the second updating file.
[0134] By implementing the above device, developers can update the list configuration file at any time by uploading the update file, thereby improving the efficiency of maintenance; in addition, the update can be quickly effective through the online update method, thereby improving the efficiency of the update.
[0135] As an optional implementation, the execution unit 706 is also used to allow the target application to start when the target priority is within the first priority range; and, when the target priority is within the second priority range, intercept the target application from starting; and, when the target priority is the third priority, determine whether to allow the target application to start according to the default management policy.
[0136] As an optional implementation, the execution unit 706 is also used to allow the target application to be started when the type corresponding to the startup component included in the startup parameters is the target type, where the target type refers to the type visible to the user of the operation interface; and to intercept the target application from being started when the type corresponding to the startup component included in the startup parameters is not the target type.
[0137] By implementing the above device, it is possible to avoid the interception of the control operation started and displayed on the operation interface, thereby affecting the user's use of the electronic device, thereby achieving a user-unaware startup effect.
[0138] As an optional implementation, the first determining unit 702 is further configured to obtain startup parameters corresponding to the target application being started when the target application is being started automatically or is started in association with another application.
[0139] By implementing the above-mentioned device, when the electronic device detects that the target application is starting up automatically or is started in association with other applications, it can execute the application startup control method disclosed in the embodiment of the present application, thereby preventing malicious applications from starting up automatically and slowing down the operation speed of the electronic device.
[0140] See also Figure 8 , Figure 8It is a structural schematic diagram of an electronic device disclosed in an embodiment of the present application.
[0141] like Figure 8 As shown, the electronic device may include:
[0142] A memory 801 storing executable program codes;
[0143] a processor 802 coupled to the memory 801;
[0144] The processor 802 calls the executable program code stored in the memory 801 to execute the startup control method of the application program disclosed in the above embodiments.
[0145] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the startup control method of an application program disclosed in the above embodiments.
[0146] The embodiments of the present application also disclose an application publishing platform, wherein the application publishing platform is used to publish a computer program product, wherein when the computer program product runs on a computer, the computer executes part or all of the steps of the method in the above method embodiments.
[0147] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. Those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required for the present application.
[0148] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the above-mentioned processes does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0149] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0150] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0151] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-accessible memory. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several requests for a computer device (which can be a personal computer, a server or a network device, etc., specifically a processor in a computer device) to perform some or all of the steps of the above-mentioned methods of various embodiments of the present application.
[0152] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0153] The above is a detailed introduction to the startup control method and device, electronic device, and storage medium of the application disclosed 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 general technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for controlling the startup of an application, characterized in that: Applied to electronic equipment, the method comprises: Obtaining startup parameters corresponding to the target application being started, and determining a first priority corresponding to the startup parameters; Determine a target priority according to the first priority and priorities corresponding to a plurality of control conditions, the target priority being the first priority or the second priority, the second priority being the priority corresponding to the target control condition satisfied by the state parameter, and the second priority being greater than the first priority, the state parameter being used to describe the device state of the electronic device and / or the application state of the target application; Execute a startup control operation corresponding to the target priority.
2. The method according to claim 1, characterized in that The determining the target priority according to the first priority and the priorities corresponding to the plurality of control conditions respectively includes: Comparing the first priority with priorities corresponding to a plurality of control conditions; If there is a target control condition, the priority corresponding to the target control condition is determined as the target priority, the target control condition is the control condition satisfied by the state parameter, and the priority corresponding to the target control condition is greater than the first priority.
3. The method according to claim 2, characterized in that The multiple control conditions are arranged in descending order of priority; and the first priority is compared with the priorities corresponding to the multiple control conditions, respectively, including: Comparing the first priority with the priority corresponding to the current control condition; And, the method further comprises: If the priority corresponding to the current control condition is less than or equal to the first priority, the first priority is determined as the target priority.
4. The method according to claim 3, characterized in that After comparing the first priority with the priority corresponding to the current control condition, the method further includes: If the priority corresponding to the current control condition is greater than the first priority, determining whether the state parameter satisfies the current control condition; If the state parameter satisfies the current control condition, determining the current control condition as the target control condition; If the state parameter does not satisfy the current control condition, the next control condition is used as the new current control condition, and the step of comparing the first priority with the priority corresponding to the current control condition is continued.
5. The method according to claim 2, characterized in that: After comparing the first priority with priorities corresponding to a plurality of control conditions, the method further includes: If the first priority is greater than the priorities corresponding to the multiple control conditions respectively, the first priority is determined as the target priority.
6. The method according to claim 2, characterized in that After comparing the first priority with priorities corresponding to a plurality of control conditions, the method further includes: If none of the state parameters satisfy the multiple control conditions, the first priority is determined as the target priority.
7. The method according to any one of claims 1 to 6, characterized in that: The multiple control conditions match the startup component included in the startup parameters, and the startup component is a component used to start the target application.
8. The method according to claim 7, characterized in that The method further comprises: Receive a first update file sent by the cloud server, and update the multiple control conditions according to the first update file.
9. The method according to any one of claims 1 to 6, characterized in that: The determining the first priority corresponding to the startup parameter includes: Determining a first priority corresponding to the startup parameter according to a list configuration file, wherein the list configuration file includes one or more groups of startup parameters and a priority of each group of the startup parameters; And, the method further comprises: Receive a second update file sent by the cloud server, and update the list configuration file according to the second update file.
10. The method according to any one of claims 1 to 6, characterized in that: The executing the startup control operation corresponding to the target priority includes: If the target priority is within the first priority range, allowing the target application to start; If the target priority is within the second priority range, intercepting the start of the target application; If the target priority is the third priority, it is determined whether to allow the target application to start according to the default management policy.
11. The method according to claim 10, characterized in that The determining whether to allow the target application to start according to the default management and control policy includes: If the type corresponding to the startup component included in the startup parameter is a target type, the target application is allowed to start, and the target type refers to the type visible to the user of the operation interface; If the type corresponding to the startup component included in the startup parameter is not the target type, the startup of the target application is intercepted.
12. The method according to any one of claims 1 to 6, characterized in that: The step of obtaining startup parameters corresponding to the target application being started includes: If the target application is being started automatically, or is being started in association with another application, then the startup parameters corresponding to the target application being started are obtained.
13. A device for controlling the startup of an application, characterized in that: Applied to electronic equipment, the device comprises: A first determining unit, configured to obtain a startup parameter corresponding to a target application being started, and determine a first priority corresponding to the startup parameter; a second determination unit, configured to determine a target priority according to the first priority and priorities corresponding to a plurality of control conditions, wherein the target priority is the first priority or the second priority, the second priority is the priority corresponding to the target control condition satisfied by the state parameter, and the second priority is greater than the first priority, and the state parameter is used to describe the device state of the electronic device and / or the application state of the target application; An execution unit is used to execute a startup control operation corresponding to the target priority.
14. An electronic device, characterized in that: It comprises a memory storing executable program code, and a processor coupled to the memory; wherein the processor calls the executable program code stored in the memory to execute the method according to any one of claims 1 to 12.
15. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 12 is implemented.
