Disclosure of Invention
The technical problem to be solved by the invention is to provide a method and a device for starting control of an application program, which can run non-private and time-consuming running tasks in parallel when a user reads compliance requirements, thereby being beneficial to shortening the starting time of the application program and improving the starting efficiency and convenience of the application program.
In order to solve the technical problem, a first aspect of the present invention discloses a method for controlling the start of an application program, the method comprising:
When an operation task analysis instruction of the application program is received, analyzing at least one operation task of the application program in a first starting process of the application program according to the operation task analysis instruction to obtain a task type corresponding to each operation task;
In a second starting process of the application program, executing matched operation on each operation task according to the task type corresponding to each operation task;
and judging whether all the running tasks are finished in running or not, and generating a second starting finishing instruction of the application program when all the running tasks are judged to be finished in running.
In a first aspect of the present invention, the analyzing at least one running task of the application to obtain a type corresponding to each running task includes:
Calculating the running time of at least one running task of the application program;
Judging whether the running time of each running task is greater than or equal to a preset running time threshold value or not;
When the operation time length of the operation task is larger than or equal to the preset operation time length threshold value, determining that the operation task is a first time-consuming operation task;
and when the operation time length of the operation task is smaller than the preset operation time length threshold value, determining that the operation task is a non-time-consuming operation task.
As an alternative embodiment, in the first aspect of the present invention, the method further includes:
after all the non-time-consuming running tasks are determined, calculating a first association degree of each non-time-consuming running task and the target privacy method set according to a predetermined target privacy method set;
Determining all non-time-consuming operation tasks with the first association degree of the target privacy method set being greater than or equal to a preset first association degree threshold value as all privacy operation tasks, wherein all the privacy operation tasks are operation tasks for collecting privacy data of a target user in the first starting process of the application program;
wherein the set of target privacy methods is determined by:
Determining a privacy method set according to the determined privacy statement text, wherein the privacy method set is a method set for collecting privacy data of the target user, and comprises at least one privacy method;
When the application program is not started, at least one target method of the application program is obtained, and all the target methods are methods formed by programming files corresponding to the application program;
calculating a second association degree of each target method and the privacy method set according to the privacy method set;
And determining all target methods with the second association degree larger than or equal to a preset second association degree threshold value with the privacy method set as the target privacy method set, wherein the target privacy method set is a method set capable of collecting privacy data of the target user in the application program.
As an alternative embodiment, in the first aspect of the present invention, the method further includes:
After determining all the privacy running tasks, inquiring a dynamic library corresponding to each privacy running task, and calculating the loading time length of the dynamic library corresponding to each privacy running task;
judging whether the loading time length of the dynamic library is greater than or equal to a preset loading time length threshold value for the dynamic library corresponding to each privacy operation task;
and when the loading time length of the dynamic library is larger than or equal to the preset loading time length threshold, determining that the privacy running task is a second time-consuming running task.
As an alternative embodiment, in the first aspect of the present invention, the method further includes:
When the loading time length of the dynamic library is judged to be smaller than the preset loading time length threshold value, determining that the privacy running task is a target privacy running task;
The executing the matched operation on each operation task according to the task type corresponding to each operation task includes:
For each target privacy operation task, generating an operation request instruction matched with the target privacy operation task according to the target privacy operation task, and outputting the operation request instruction, wherein the operation request instruction is used for requesting whether the target user agrees to operate the target privacy operation task or not;
Detecting whether an agreement operation instruction corresponding to the target privacy operation task is received or not;
and when the receiving of the agreement operation instruction is detected, the target privacy operation task is operated.
As an alternative embodiment, in the first aspect of the present invention, the method further includes:
determining sub threads corresponding to all target time-consuming operation tasks, wherein all the target time-consuming operation tasks comprise all the first time-consuming operation tasks and all the second time-consuming operation tasks;
Determining the operation priority of each target time-consuming operation task, starting and operating each target time-consuming operation task according to the sub-thread of each target time-consuming operation task in all the target time-consuming operation tasks, wherein the operation priority of each target time-consuming operation task corresponds to the target time-consuming operation task, and the higher the operation priority of each target time-consuming operation task is, the higher the execution sequence of the target time-consuming operation task is.
As an optional implementation manner, in the first aspect of the present invention, the determining an operation priority of each of the target time-consuming operation tasks includes:
For each target time-consuming operation task, determining the operation priority of the target time-consuming operation task according to the subordinate relation between the target time-consuming operation task and all the target time-consuming operation tasks except the target time-consuming operation task in all the target time-consuming operation tasks, or
Determining the weight corresponding to each target time-consuming operation task according to the service requirement of the target user, wherein the weight corresponding to each target time-consuming operation task represents the importance degree of the target time-consuming operation task on the service requirement of the target user;
and determining the operation priority of each target time-consuming operation task according to the weight corresponding to each target time-consuming operation task, wherein the higher the weight corresponding to each target time-consuming operation task is, the higher the operation priority of the target time-consuming operation task is.
The second aspect of the present invention discloses an apparatus for controlling the start of an application program, the apparatus comprising:
The analysis module is used for analyzing at least one running task of the application program in a first starting process of the application program according to the running task analysis instruction when the running task analysis instruction of the application program is received, so as to obtain a task type corresponding to each running task;
The task operation module is used for executing matched operation on each operation task according to the task type corresponding to each operation task in the second starting process of the application program;
and the judging module is used for judging whether all the running tasks are finished in running or not, and generating a second starting finishing instruction of the application program when judging that all the running tasks are finished in running.
In a second aspect of the present invention, the analyzing module analyzes at least one running task of the application program, and the manner of obtaining the type corresponding to each running task specifically includes:
Calculating the running time of at least one running task of the application program;
Judging whether the running time of each running task is greater than or equal to a preset running time threshold value or not;
When the operation time length of the operation task is larger than or equal to the preset operation time length threshold value, determining that the operation task is a first time-consuming operation task;
and when the operation time length of the operation task is smaller than the preset operation time length threshold value, determining that the operation task is a non-time-consuming operation task.
As an alternative embodiment, in the second aspect of the present invention, the apparatus further includes:
The calculation module is used for calculating a first association degree between each non-time-consuming operation task and the target privacy method set according to the target privacy method set determined in advance after the analysis module determines all the non-time-consuming operation tasks;
the system comprises a determining module, a privacy running task acquiring module and a target privacy method set, wherein the determining module is used for determining all non-time-consuming running tasks with a first association degree larger than or equal to a preset first association degree threshold value with the target privacy method set as all privacy running tasks;
wherein the set of target privacy methods is determined by:
Determining a privacy method set according to the determined privacy statement text, wherein the privacy method set is a method set for collecting privacy data of the target user, and comprises at least one privacy method;
When the application program is not started, at least one target method of the application program is obtained, and all the target methods are methods formed by programming files corresponding to the application program;
calculating a second association degree of each target method and the privacy method set according to the privacy method set;
And determining all target methods with the second association degree larger than or equal to a preset second association degree threshold value with the privacy method set as the target privacy method set, wherein the target privacy method set is a method set capable of collecting privacy data of the target user in the application program.
In a second aspect of the present invention, the computing module is further configured to query a dynamic library corresponding to each privacy running task after the analyzing module determines all the privacy running tasks, and calculate a loading duration of the dynamic library corresponding to each privacy running task;
the judging module is further used for judging whether the loading time length of the dynamic library is greater than or equal to a preset loading time length threshold value for the dynamic library corresponding to each privacy operation task;
And the determining module is further configured to determine that the privacy running task is a second time-consuming running task when the judging module judges that the loading time length of the dynamic library is greater than or equal to the preset loading time length threshold.
In a second aspect of the present invention, as an optional implementation manner, the determining module is further configured to determine that the privacy running task is a target privacy running task when the judging module judges that a loading time length of the dynamic library is less than the preset loading time length threshold;
The task operation module comprises:
The instruction processing sub-module is used for generating an operation request instruction matched with the target privacy operation task according to the target privacy operation task and outputting the operation request instruction for each target privacy operation task, wherein the operation request instruction is used for requesting whether the target user agrees to operate the target privacy operation task or not;
the detection sub-module is used for detecting whether an agreement operation instruction corresponding to the target privacy operation task is received or not;
And the task operation sub-module is used for operating the target privacy operation task when the detection sub-module detects that the operation agreement instruction is received.
As an optional implementation manner, in the second aspect of the present invention, the task execution module further includes:
the determining submodule is used for determining the subthread corresponding to all the target time-consuming operation tasks, wherein all the target time-consuming operation tasks comprise all the first time-consuming operation tasks and all the second time-consuming operation tasks;
the determining submodule is further used for determining the operation priority of each target time-consuming operation task;
The task operation sub-module is further configured to start and operate each target time-consuming operation task according to a sub-thread corresponding to the target time-consuming operation task in operation priority of each target time-consuming operation task in all the target time-consuming operation tasks, where the higher the operation priority of each target time-consuming operation task is, the higher the execution order of the target time-consuming operation task is.
As an optional implementation manner, in the second aspect of the present invention, the determining submodule determines the running priority of each of the target time-consuming running tasks specifically includes:
For each target time-consuming operation task, determining the operation priority of the target time-consuming operation task according to the subordinate relation between the target time-consuming operation task and all the target time-consuming operation tasks except the target time-consuming operation task in all the target time-consuming operation tasks, or
Determining the weight corresponding to each target time-consuming operation task according to the service requirement of the target user, wherein the weight corresponding to each target time-consuming operation task represents the importance degree of the target time-consuming operation task on the service requirement of the target user;
and determining the operation priority of each target time-consuming operation task according to the weight corresponding to each target time-consuming operation task, wherein the higher the weight corresponding to each target time-consuming operation task is, the higher the operation priority of the target time-consuming operation task is.
The third aspect of the present invention discloses another apparatus for controlling the start of an application program, the apparatus comprising:
a memory storing executable program code;
a processor coupled to the memory;
the processor invokes the executable program code stored in the memory to execute the method for controlling the start of the application program disclosed in the first aspect of the present invention.
A fourth aspect of the present invention discloses a computer-readable storage medium storing computer instructions that, when called, are used to execute the start-up control method of the application program disclosed in the first aspect of the present invention.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
In the embodiment of the invention, when an operation task analysis instruction of an application program is received, at least one operation task of the application program is analyzed to obtain a task type corresponding to each operation task in a first starting process of the application program according to the operation task analysis instruction, in a second starting process of the application program, a matched operation is executed for each operation task according to the task type corresponding to each operation task, whether all operation tasks are operated is judged to be completed, and when the operation completion of all operation tasks is judged, a second starting completion instruction of the application program is generated. Therefore, by implementing the method and the device, the user can read the compliance requirement and simultaneously can run time-consuming running tasks in parallel without executing all running tasks in the application program to finish the starting process of the application program after the user agrees, so that the starting time of the application program is shortened and the starting efficiency and convenience of the application program are improved under the condition that the security of private data of the user is ensured, and the using experience of the user on the application program is improved.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms first, second and the like in the description and in the claims and in the above-described figures are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, apparatus, article, or article that comprises a list of steps or elements is not limited to only those listed but may optionally include other steps or elements not listed or inherent to such process, method, article, or article.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the invention. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
The invention discloses a method and a device for controlling the starting of an application program, which can analyze the task type of each running task in the application program, and further can run time-consuming running tasks in parallel when a user reads compliance requirements, without executing all running tasks to finish the starting of the application program after the user agrees, thereby shortening the starting time of the application program and improving the starting efficiency and convenience of the application program. The following will describe in detail.
Example 1
Referring to fig. 1, fig. 1 is a flowchart of a method for controlling the start of an application according to an embodiment of the invention. The method for controlling the starting of the application program described in fig. 1 may be applied to controlling the starting of the application program of the mobile terminal, such as a mobile phone, a tablet device, etc., and may also be applied to controlling the starting of the application program of the fixed terminal, such as a desktop computer, etc., which is not limited in the embodiments of the present invention. Alternatively, the method may be implemented by an application start control system, or may be implemented by an application start control device, where the application start control device may be integrated in an application start control device, and embodiments of the present invention are not limited. As shown in fig. 1, the start control method of the application may include the following operations:
101. when an operation task analysis instruction of the application program is received, at least one operation task of the application program is analyzed in a first starting process of the application program according to the operation task analysis instruction, and a task type corresponding to each operation task is obtained.
In the embodiment of the invention, the operation task analysis instruction can be sent out when the time-consuming operation task is required to be checked for the application program, or can be sent out when the starting flow of the application program is required to be optimized. Specifically, a byte code instrumentation tool may be used to find time-consuming running tasks in the application, where the byte code instrumentation tool may be used to collect all running tasks of the application and the corresponding running time for each running task. Further, after the running task analysis instruction is received, the bytecode instrumentation can be performed on the programming file in the application program, then the application program is started, and in the starting process of the application program, all running tasks of the application program and the running time corresponding to each running task are collected until the whole starting test flow, namely the first starting process is finished, and the collection result is output. Further optionally, according to the collection result, all running tasks of the application program are analyzed, and all time-consuming running tasks and/or non-time-consuming running tasks can be determined. Still further, in the whole start-up test procedure, all privacy running tasks and/or non-privacy non-time consuming running tasks may be determined from all non-time consuming running tasks simultaneously, and all privacy non-time consuming running tasks and/or privacy time consuming running tasks may be determined from all privacy running tasks, where time consuming running tasks, non-time consuming running tasks, privacy time consuming running tasks, non-privacy non-time consuming running tasks and privacy non-time consuming running tasks may be regarded as task types and may be stored as version records.
102. And in the second starting process of the application program, executing matched operation on each operation task according to the task type corresponding to each operation task.
In the embodiment of the present invention, optionally, in the second starting process of the application program, that is, in the formal starting process, the version record obtained in the starting test with the closest time may be used as a basis for executing the running task of the application program, or according to the specific service requirement, the version record in the history storage record may be used as a basis for executing the running task of the application program, and the matched running operation is executed for the running task of each task type of the application program. For example, after determining the version record, in the formal starting process, based on the version record, the corresponding sub-thread is started immediately to execute all time-consuming running tasks, and simultaneously, after obtaining the user consent instruction, all non-time-consuming running tasks are run in parallel, or the corresponding sub-thread is started immediately to execute all time-consuming running tasks and privacy time-consuming running tasks, and simultaneously, after obtaining the user consent instruction, all privacy non-time-consuming running tasks are run in parallel. Specifically, the non-privacy non-time consuming operation task determined from the non-time consuming operation tasks may be executed after obtaining the user consent instruction, or may be executed without obtaining the user consent instruction.
103. And judging whether all the running tasks are finished, and generating a second starting finishing instruction of the application program when judging that all the running tasks are finished.
In the embodiment of the invention, the starting completion instruction of the application program can be generated after all time-consuming operation tasks and all non-time-consuming operation tasks are judged to be completed, or the starting completion instruction of the application program can be generated after all time-consuming operation tasks, privacy time-consuming operation tasks and privacy non-time-consuming operation tasks are judged to be completed.
Therefore, after the task type classification is carried out on all the running tasks of the application program, the embodiment of the invention can carry out matched running operation on the running tasks of different task types in parallel, so that all the running tasks do not need to be executed after the user agrees to the privacy data acquisition operation of the application program, the starting time of the application program is effectively shortened under the condition of ensuring the privacy security of the user, the starting efficiency and the convenience of the application program are further improved, and the use experience of the user on the application program and the user viscosity of the application degree are further improved.
Example two
Referring to fig. 2, fig. 2 is a flowchart illustrating another method for controlling the start of an application according to an embodiment of the invention. The method for controlling the starting of the application program described in fig. 2 may be applied to controlling the starting of the application program of the mobile terminal, such as a mobile phone, a tablet device, etc., and may also be applied to controlling the starting of the application program of the fixed terminal, such as a desktop computer, etc., which is not limited in the embodiments of the present invention. Alternatively, the method may be implemented by an application start control system, or may be implemented by an application start control device, where the application start control device may be integrated in an application start control device, and embodiments of the present invention are not limited. As shown in fig. 2, the start control method of the application may include the following operations:
201. and when a running task analysis instruction of the application program is received, calculating the running time of at least one running task of the application program in the first starting process of the application program according to the running task analysis instruction.
In the embodiment of the invention, the operation time length of all operation tasks in the application program can be acquired in a byte code instrumentation mode. In particular, the bytecode instrumentation may be implemented by slice-oriented programming. Alternatively, the bytecode instrumentation may insert probes into the application program on the basis of ensuring the original logical integrity of the application program, collect information in the code (method itself, method parameter values, return values, etc.) by the probes, and insert code segments at specific locations, thereby collecting dynamic context information when the program is running.
202. For each running task, judging whether the running time of the running task is greater than or equal to a preset running time threshold, triggering and executing step 203 when the judging result of step 202 is yes, and triggering and executing step 204 when the judging result of step 202 is no.
In the embodiment of the invention, optionally, the running duration threshold value, such as 3 ms, 5 ms, etc., can be set according to specific service requirements to check all time-consuming running tasks in the application program, i.e. running tasks exceeding the running duration threshold value. Further, the running tasks that do not exceed the run-time threshold may be represented as non-time consuming running tasks.
203. And determining the running task as a first time-consuming running task.
In the embodiment of the invention, optionally, when the running tasks have no dependency, the running tasks without the dependency can be tested in parallel for the running time, and when the running tasks have the dependency, the running tasks can be tested for the running time according to the dependency and the sequence. Further, according to the test result, when the running task is judged to exceed the running duration threshold, the first time-consuming running task, namely the time-consuming running task, can be determined.
204. The running task is determined to be a non-time consuming running task.
In the embodiment of the invention, the running time length test can be performed on the running tasks according to the parallel or sequential order, and when the running task is judged not to exceed the running time length threshold value, the running task can be determined to be a non-time-consuming running task. Alternatively, the non-time consuming running task may include a non-time consuming non-privacy running task and/or a privacy running task. Specifically, whether a method in the privacy method set is called in the test starting process of the application program can be judged through the privacy method set acquired when the application program is not started, so that the privacy operation task in the non-time-consuming operation task can be determined.
205. And in the second starting process of the application program, executing matched operation on each operation task according to the task type corresponding to each operation task.
206. And judging whether all the running tasks are finished, and generating a second starting finishing instruction of the application program when judging that all the running tasks are finished.
In the embodiment of the present invention, for other descriptions of step 205 to step 206, please refer to the detailed descriptions of step 105 to step 106 in the first embodiment, and the description of the embodiment of the present invention is omitted.
Therefore, in the implementation of the embodiment of the invention, whether each operation task in the application program belongs to a time-consuming task type or a non-time-consuming task type can be judged through the setting of the time threshold in the starting process test, so that the task type corresponding to each operation task can be reasonably and pertinently determined, the reliability and the accuracy of the obtained task type result are further improved, the follow-up smooth operation of matching different task types is facilitated, and the operation efficiency of the operation task of the application program is improved.
In an alternative embodiment, the method may further comprise:
After all the non-time-consuming running tasks are determined, calculating a first association degree between each non-time-consuming running task and the target privacy method set according to the target privacy method set which is determined in advance;
And determining all non-time-consuming running tasks with the first association degree with the target privacy method set being greater than or equal to a preset first association degree threshold value as all privacy running tasks.
In this alternative embodiment, the non-time consuming running tasks may optionally include a privacy running task and/or a non-privacy non-time consuming running task. Further, the privacy running task and/or the non-privacy non-time consuming running task can be determined by judging whether the running task conforming to the target privacy method set exists in the non-time consuming running task types. Specifically, all the privacy running tasks may be running tasks that are used as a task for collecting privacy data of the target user in the startup procedure test of the application program. For example, if the target privacy method set includes the first privacy method, the second privacy method and the third privacy method, and in the process of starting the flow test, only the first privacy method and the third privacy method are called as the methods related to the target privacy method set, the first privacy method and the third privacy method may be used as the privacy running tasks in the process of starting the flow test. Further alternatively, the privacy data of the target user may be geographical location information and/or chat records and/or photo video and/or behavioral habit information related to the target user, and the alternative embodiment is not limited.
Still further, the target privacy method set may be determined by determining a privacy method set according to the determined privacy statement text, obtaining at least one target method of the application when the application is not started, calculating a second association degree of each target method with the privacy method set according to the privacy method set, and determining all target methods with the second association degree with the privacy method set being greater than or equal to a preset second association degree threshold as the target privacy method set.
The privacy statement text may be used, among other things, to describe the manner in which a user is related to personal information collected through a website and application. Specifically, the method that is related to a general application program and can collect the user privacy data, namely a privacy method set, can be found based on the privacy statement text, and the privacy method set can comprise a plurality of privacy methods. Furthermore, according to the privacy method set, by scanning all target methods (methods consisting of programming files corresponding to the application program) in the target application program, a method called by the target application program and related to collecting user privacy data, namely a target privacy method set, can be found. Still further, the set of target privacy methods may be stored as version records and may be compared to other historical version records for version differences. For example, if the current target privacy method set is 1.2.0 version, compared with the previous 1.1.0 version, since the target application program increases the function of uploading the user's head portrait and needs to access the album data of the user, the method related to accessing the album data of the user will be added in the target privacy method set of 1.2.0 version, and at this time, a version check instruction may be generated to prompt the relevant research personnel to check the current 1.2.0 version and the previous 1.1.0 version, so as to check the problem.
Therefore, the optional embodiment can find out the method related to the target privacy method set called in the process of starting the flow test based on the target privacy method set, so as to determine the method as a privacy operation task, thus being capable of determining the operation task related to collecting the user privacy data in a basis, being beneficial to reasonably and effectively ensuring the safety of the user privacy data when the user privacy operation task is operated later and improving the experience of the user when using the application program.
In another alternative embodiment, the method may further comprise:
After determining all the privacy running tasks, inquiring the dynamic library corresponding to each privacy running task, and calculating the loading time of the dynamic library corresponding to each privacy running task;
judging whether the loading time length of the dynamic library is greater than or equal to a preset loading time length threshold value for the dynamic library corresponding to each privacy operation task;
And when the loading time length of the dynamic library is larger than or equal to the preset loading time length threshold value, determining that the privacy running task is a second time-consuming running task.
In this optional embodiment, optionally, the privacy running task may be further determined to be of a type of non-time-consuming or time-consuming privacy running task by setting a loading time threshold of the dynamic library, or the non-time-consuming and time-consuming privacy running task may be determined by determining whether the privacy running task needs to load the dynamic library. Specifically, when the privacy running task is of a time-consuming task type, the privacy running task can be determined to be a target privacy running task, and when the privacy running task is of a time-consuming task type, the privacy running task can be determined to be a target privacy time-consuming running task, namely a second time-consuming running task. For example, if the privacy running method in the dynamic library, i.e. the privacy running task, is to be called, the dynamic library needs to be loaded first, and this loading process is relatively time-consuming, while the privacy running method directly accessing the dynamic library does not take time, but according to the privacy statement text, the user needs to agree and then execute.
Therefore, the optional embodiment can analyze the privacy running task, further screen out the time-consuming task in the privacy running task, and further reasonably plan all running modes belonging to the time-consuming running task in the application program, further effectively utilize the time in the starting process of the application program, and further improve the starting control efficiency of the application program.
In yet another alternative embodiment, the method may further comprise:
And when the loading time length of the dynamic library is judged to be smaller than the preset loading time length threshold value, determining the privacy running task as a target privacy running task.
In this alternative embodiment, as well, a non-time-consuming task of the privacy running task, that is, the target privacy running task (privacy non-time-consuming task) may be determined by setting a loading time threshold of the dynamic library or determining whether the dynamic library needs to be loaded. Specifically, after determining the target privacy running task, according to the privacy statement text, in the formal starting process of the application program, the target privacy running task needs to obtain the consent instruction sent by the user and then execute the running task.
Therefore, the optional embodiment can analyze the privacy running task, further screen out the task which is not time-consuming in the privacy running task, and set the privacy task which is not time-consuming to execute the running after the user agrees, so that the user has the knowledge of privacy data acquisition when using the application program, and the security of the privacy data of the user and the compliance of the application program when executing the running task are guaranteed.
In yet another alternative embodiment, the performing, in step 205, the matched operation on each running task according to the task type corresponding to each running task may include:
for each target privacy operation task, generating an operation request instruction matched with the target privacy operation task according to the target privacy operation task, and outputting the operation request instruction;
Detecting whether an agreement operation instruction corresponding to a target privacy operation task is received or not;
And when the receiving of the consent operation instruction is detected, the target privacy operation task is operated.
In this alternative embodiment, in particular, the execution request instruction may be used to request whether the target user agrees to execute the target privacy execution task. For example, when there is a target privacy running task related to the geographic location information of the user in the application program, before running the target privacy running task, a running request instruction matched with the target privacy running task needs to be generated and output to the user client so as to request whether the target user agrees to collect the geographic location information, when the agreeing running instruction sent by the user client is received, the target privacy running task is run again, and when the refusing running instruction sent by the user client is received, the target privacy running task is not executed, thereby terminating the starting operation of the application program.
Therefore, the optional embodiment can fully remind the user of the privacy data required to be acquired by the application program, and acquire the privacy data after the user agrees to the instruction, so that the safety and the privacy of the user information are improved, and the use experience of the user on the application program is improved.
In yet another alternative embodiment, the method may further comprise:
Determining all sub-threads corresponding to the time-consuming running tasks of the targets;
determining the operation priority of each target time-consuming operation task, and starting and operating each target time-consuming operation task according to the sub-thread corresponding to the target time-consuming operation task in the operation priority of each target time-consuming operation task in all the target time-consuming operation tasks.
In this alternative embodiment, optionally, all first time-consuming running tasks and all second time-consuming running tasks may be considered as target time-consuming running tasks. Specifically, after determining all the target time-consuming running tasks, before formally starting, determining the sub-threads corresponding to each target time-consuming running task. Further optionally, determining the sub-threads corresponding to all the target time-consuming running tasks may include determining the sub-threads corresponding to each target time-consuming running task according to a specific task type corresponding to each target time-consuming running task and/or the number of tasks of all the target time-consuming running tasks. For example, if the number of target time-consuming tasks is five, where the five target time-consuming tasks include three specific task types, and each sub-thread may execute two target time-consuming tasks of the same specific task type, then three sub-threads may be started to execute the five target time-consuming tasks. Still further, before or after determining the sub-thread corresponding to each target time-consuming operation task, determining an operation priority of each target time-consuming operation task, and then starting to execute the target time-consuming operation task according to the operation priority corresponding to the target time-consuming operation task and the sub-thread. For example, according to the priority of each target time-consuming task, the corresponding target time-consuming tasks with the same priority can be started in parallel, or the corresponding sub-threads can be started to run the target time-consuming tasks according to the priority, and in each sub-thread, each target time-consuming task on the sub-thread can be run according to the priority. Specifically, the higher the operation priority of each target time-consuming operation task, the higher the execution order of the target time-consuming operation task.
Therefore, in the starting process of the application program, the situation that the operation work of the target time-consuming operation tasks is disordered in the starting process can be avoided, the operation tasks are executed orderly, the starting time utilization rate of the application program is greatly improved, and the starting operation of the application program is accelerated.
In yet another alternative embodiment, determining the operation priority of each target time-consuming operation task in the steps above may include:
and for each target time-consuming operation task, determining the operation priority of the target time-consuming operation task according to the subordinate relation between the target time-consuming operation task and all target time-consuming operation tasks except the target time-consuming operation task in all target time-consuming operation tasks.
In this alternative embodiment, the priority of the target time-consuming operation task may be determined according to the dependency relationship between the target time-consuming operation task and other target time-consuming operation tasks except the target time-consuming operation task, for example, if the first target time-consuming operation task depends on the second target time-consuming operation task, the second target time-consuming operation task depends on the third target time-consuming operation task, the priority is arranged from big to small, that is, the third target time-consuming operation task, the second target time-consuming operation task, the first target time-consuming operation task is executed first, then the second target time-consuming operation task is executed, and finally the first target time-consuming operation task is executed.
Therefore, the alternative embodiment can determine the priority of each target time-consuming operation task according to the subordinate relation among the target time-consuming operation tasks, which is beneficial to improving the reliability and accuracy of the obtained priority result, thereby being beneficial to orderly proceeding of all subsequent target time-consuming operation tasks and ensuring the quick start of the application program.
In yet another alternative embodiment, determining the operation priority of each target time-consuming operation task in the steps above may further include:
according to the business requirement of the target user, determining the weight corresponding to each target time-consuming operation task;
and determining the operation priority of each target time-consuming operation task according to the weight corresponding to each target time-consuming operation task.
In this optional embodiment, specifically, the weight corresponding to each target time-consuming operation task represents the importance level of the target time-consuming operation task on the service requirement of the target user, and the higher the weight corresponding to each target time-consuming operation task, the higher the operation priority of the target time-consuming operation task. For example, the task related to the picture rendering is generally relatively time-consuming, and if the user needs to see the picture rendering effect as soon as possible, that is, the weight of the target time-consuming task related to the picture rendering is relatively high, the priority of the target time-consuming task is also relatively high, so that it can be determined to execute the target time-consuming task in advance.
Therefore, the optional embodiment can determine the operation priority of each target time-consuming operation task through the service requirement of the user, further orderly execute all target time-consuming operation tasks, enrich the determination modes of the operation task priority, and flexibly meet different service requirements of the user, thereby improving the user use experience and the user viscosity of the application program.
Example III
Referring to fig. 3, fig. 3 is a schematic structural diagram of an application program start control device according to an embodiment of the invention. As shown in fig. 3, the start control device of the application may include:
The analysis module 301 is configured to, when receiving an operation task analysis instruction of an application program, analyze at least one operation task of the application program in a first starting process of the application program according to the operation task analysis instruction, and obtain a task type corresponding to each operation task;
The task running module 302 is configured to execute, in a second starting process of the application program, a matched running operation for each running task according to a task type corresponding to each running task;
and the judging module 303 is configured to judge whether all the running tasks are running and generate a second start-up completion instruction of the application program when all the running tasks are judged to be running.
Therefore, the starting control device for implementing the application program described in fig. 3 can perform the matched operation on the operation tasks with different task types in parallel after performing the task type classification on all the operation tasks of the application program, so that it is unnecessary to execute all the operation tasks after the user agrees to the privacy data acquisition operation of the application program, and the starting control device is beneficial to effectively shortening the starting time of the application program under the condition of ensuring the privacy security of the user, and further improving the starting efficiency and convenience of the application program, thereby improving the use experience of the user on the application program and improving the user viscosity of the application degree.
In an alternative embodiment, the analysis module 301 analyzes at least one running task of the application program, and the manner of obtaining the type corresponding to each running task is specifically:
Calculating the running time of at least one running task of the application program;
judging whether the running time of each running task is greater than or equal to a preset running time threshold value or not;
When the operation time length of the operation task is larger than or equal to a preset operation time length threshold value, determining that the operation task is a first time-consuming operation task;
and when the operation time length of the operation task is judged to be smaller than the preset operation time length threshold value, determining that the operation task is a non-time-consuming operation task.
Therefore, the starting control device for implementing the application program described in fig. 4 can determine whether each running task in the application program belongs to a time-consuming task type or a non-time-consuming task type through setting a time threshold in a starting flow test, so that the task type corresponding to each running task can be reasonably and pertinently determined, the reliability and the accuracy of the obtained task type result are further improved, the follow-up smooth running operation on different task types is facilitated, and the running efficiency of the running task of the application program is improved.
In another alternative embodiment, the apparatus may further include:
The calculating module 304 is configured to calculate, after the analyzing module 301 determines all the non-time-consuming running tasks, a first association degree between each non-time-consuming running task and the target privacy method set according to the target privacy method set determined in advance;
the determining module 305 is configured to determine all non-time-consuming running tasks with a first association degree with the target privacy method set being greater than or equal to a preset first association degree threshold as all privacy running tasks, where all privacy running tasks are running tasks used for collecting privacy data of the target user during a first starting process of the application program.
In this alternative embodiment, the set of target privacy methods is determined by:
Determining a privacy method set according to the determined privacy statement text, wherein the privacy method set is a method set for collecting privacy data of a target user;
when the application program is not started, at least one target method of the application program is obtained, and all the target methods are methods formed by programming files corresponding to the application program;
According to the privacy method set, calculating a second association degree of each target method and the privacy method set;
And determining all target methods with the second association degree larger than or equal to a preset second association degree threshold value as a target privacy method set, wherein the target privacy method set is a method set capable of collecting privacy data of a target user in an application program.
Therefore, the starting control device for implementing the application program described in fig. 4 can find out the method related to the target privacy method set called in the starting process test process based on the target privacy method set, so as to determine the method as a privacy operation task, thus being capable of determining the operation task related to collecting the user privacy data in a dependent manner, being beneficial to reasonably and effectively ensuring the safety of the user privacy data when the user privacy operation task is operated later, and improving the experience when the user uses the application program.
In another optional embodiment, the calculating module 304 is further configured to query a dynamic library corresponding to each privacy running task after the analyzing module 301 determines all the privacy running tasks, and calculate a loading time length of the dynamic library corresponding to each privacy running task;
The judging module 303 is further configured to judge, for each dynamic library corresponding to the privacy running task, whether a loading duration of the dynamic library is greater than or equal to a preset loading duration threshold;
The determining module 305 is further configured to determine that the privacy running task is a second time-consuming running task when the determining module 303 determines that the loading time period of the dynamic library is greater than or equal to the preset loading time period threshold.
Therefore, the starting control device for implementing the application program described in fig. 4 can analyze the privacy running task, and further screen out the time-consuming task in the privacy running task, so that it is beneficial to further reasonably planning all running modes belonging to the time-consuming running task in the application program, and further, the time in the starting process of the application program can be effectively utilized, thereby improving the starting control efficiency of the application program.
In another optional embodiment, the determining module 305 is further configured to determine that the privacy-preserving task is the target privacy-preserving task when the determining module 303 determines that the loading duration of the dynamic library is less than the preset loading duration threshold.
Therefore, the starting control device for implementing the application program described in fig. 4 can analyze the privacy running task as well, further screen out the task which is not time-consuming in the privacy running task, and set the privacy task which is not time-consuming to execute the running after the user agrees, so that the user can have the knowledge of privacy data acquisition when using the application program, and the security of the privacy data of the user and the compliance of the application program when executing the running task are guaranteed.
In another alternative embodiment, the task execution module 302 may include:
The instruction processing submodule 3021 is used for generating an operation request instruction matched with the target privacy operation task according to the target privacy operation task for each target privacy operation task and outputting the operation request instruction;
A detection sub-module 3022, configured to detect whether an operation agreement instruction corresponding to the target privacy operation task is received;
The task execution submodule 3023 is configured to execute the target privacy execution task when the detection submodule 3022 detects that the consent execution instruction is received.
In this alternative embodiment, the execution request instruction is used to request whether the target user agrees to execute the target privacy execution task.
Therefore, the starting control device for implementing the application program described in fig. 4 can fully remind the user of the privacy data required to be acquired by the application program, and acquire the privacy data after obtaining the consent instruction of the user, so that the safety and privacy of the user information are improved, and the use experience of the user on the application program is improved.
In another alternative embodiment, the task execution module 302 may further include:
a determining sub-module 3024, configured to determine sub-threads corresponding to all the target time-consuming running tasks;
a determining submodule 3024, configured to determine an operation priority of each target time-consuming operation task;
The task running submodule 3023 is further configured to start and run each target time-consuming running task according to a sub-thread corresponding to the target time-consuming running task in running priority of each target time-consuming running task in all target time-consuming running tasks.
In this alternative embodiment, all the target time-consuming operation tasks include all the first time-consuming operation tasks and all the second time-consuming operation tasks, and the higher the operation priority of each target time-consuming operation task, the higher the execution order of the target time-consuming operation tasks.
Therefore, the starting control device for implementing the application program described in fig. 4 can reasonably plan the execution sequence of each target time-consuming operation task according to the priority of each target time-consuming operation task, so that in the starting process of the application program, the condition that the operation work of the target time-consuming operation task is disordered in the starting process can be avoided, the operation tasks are sequentially executed, the starting time utilization rate of the application program is greatly improved, and the starting operation of the application program is accelerated.
In another alternative embodiment, the manner in which the determining submodule 3024 determines the operation priority of each of the target time-consuming operation tasks is specifically:
and for each target time-consuming operation task, determining the operation priority of the target time-consuming operation task according to the subordinate relation between the target time-consuming operation task and all target time-consuming operation tasks except the target time-consuming operation task in all target time-consuming operation tasks.
Therefore, the starting control device for implementing the application program described in fig. 4 can determine the priority of each target time-consuming operation task according to the subordinate relation between the target time-consuming operation tasks, which is beneficial to improving the reliability and accuracy of the obtained priority result, thereby being beneficial to orderly proceeding of all subsequent target time-consuming operation tasks and ensuring the quick starting of the application program.
In another alternative embodiment, the manner in which the determining submodule 3024 determines the operation priority of each target time-consuming operation task may specifically be:
according to the business requirement of the target user, determining the weight corresponding to each target time-consuming operation task;
and determining the operation priority of each target time-consuming operation task according to the weight corresponding to each target time-consuming operation task.
In the alternative embodiment, the weight corresponding to each target time-consuming operation task represents the importance degree of the target time-consuming operation task on the business requirement of the target user, and the higher the weight corresponding to each target time-consuming operation task is, the higher the operation priority of the target time-consuming operation task is.
Therefore, the starting control device for implementing the application program described in fig. 4 can determine the operation priority of each target time-consuming operation task through the service requirement of the user, further sequentially execute all target time-consuming operation tasks, enrich the determination modes of the operation task priorities, and flexibly meet different service requirements of the user, thereby improving the user use experience and the user viscosity of the application program.
Example IV
Referring to fig. 5, fig. 5 is a schematic structural diagram of a start control device for an application program according to another embodiment of the present invention. As shown in fig. 5, the start control device of the application may include:
a memory 401 storing executable program codes;
A processor 402 coupled with the memory 401;
The processor 402 invokes executable program codes stored in the memory 401 to execute steps in the start control method of the application program described in the first or second embodiment of the present invention.
Example five
The embodiment of the invention discloses a computer storage medium which stores computer instructions for executing the steps in the start control method of the application program described in the first or second embodiment of the invention when the computer instructions are called.
Example six
An embodiment of the present invention discloses a computer program product including a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute steps in the start control method of an application program described in the first embodiment or the second embodiment.
The apparatus embodiments described above are merely illustrative, wherein the modules illustrated as separate components may or may not be physically separate, and the components shown as modules may or may not be physical, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above detailed description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course by means of hardware. Based on such understanding, the foregoing technical solutions may be embodied essentially or in part in the form of a software product that may be stored in a computer-readable storage medium including Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), programmable Read-Only Memory (Programmable Read-Only Memory, PROM), erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), one-time programmable Read-Only Memory (OTPROM), electrically erasable programmable Read-Only Memory (EEPROM), compact disc Read-Only Memory (Compact Disc Read-Only Memory, CD-ROM) or other optical disc Memory, magnetic disc Memory, tape Memory, or any other medium that can be used for computer-readable carrying or storing data.
Finally, it should be noted that the method and the device for controlling the startup of an application program disclosed in the embodiments of the present invention are only disclosed in the preferred embodiments of the present invention, and are only used for illustrating the technical scheme of the present invention, but not limiting the technical scheme. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that modifications may be made to the technical solutions described in the foregoing embodiments or equivalents may be substituted for some of the technical features thereof, and that these modifications or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention in essence of the corresponding technical solutions.