CN113010291A - Application start management method and device, terminal and equipment - Google Patents

Application start management method and device, terminal and equipment Download PDF

Info

Publication number
CN113010291A
CN113010291A CN202110295722.4A CN202110295722A CN113010291A CN 113010291 A CN113010291 A CN 113010291A CN 202110295722 A CN202110295722 A CN 202110295722A CN 113010291 A CN113010291 A CN 113010291A
Authority
CN
China
Prior art keywords
starting
task
queue
application
tasks
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110295722.4A
Other languages
Chinese (zh)
Inventor
林锐翰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202110295722.4A priority Critical patent/CN113010291A/en
Publication of CN113010291A publication Critical patent/CN113010291A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The document relates to the field of mobile internet, and particularly provides an application starting management method, an application starting management device, a terminal and application starting management equipment, wherein the method comprises the following steps: starting an application according to a pre-configured task starting queue, and acquiring the starting time consumption of each task; determining the dependency relationship among the tasks according to the pre-configured task starting queue; acquiring an initial task starting queue set when the application is started next time according to the dependency relationship; and calculating the total starting time consumption of each initial task starting queue in the initial task starting queue set according to the starting time consumption of each task, and determining the initial task starting queue with the least total starting time consumption as a target task starting queue, so that when the application is started next time, the shortest starting time consumption queue of the next task can be quickly determined according to the target task starting queue, the automatic adjustment of the starting queue is realized, and the application starting speed is improved.

Description

Application start management method and device, terminal and equipment
Technical Field
The document belongs to the field of mobile interconnection, and particularly relates to an application start management method, device, terminal and equipment.
Background
With the development of scientific technology, an intelligent device taking a smart phone as an example can cover most scenes of daily life, meanwhile, mobile applications are deeply applied to various scenes of the life of a user, various scenes such as car-driving travel, on-line shopping, code-scanning purchase orders, on-line payment, instant messaging and the like are required to be used for the smart phone, with the increase of implementation scenes, application software is more and more, the starting speed of the application software (App) can increasingly influence the use experience of the user, the application starting speed becomes an important factor of the persistence rate of the application software, in the prior art, the starting sequence of various tasks in the application starting process is fixed, various tasks can wait or idle when executed, the time consumption is increased, and the starting optimization of each application program is generally the time consumption of a developer starting the application program at the side of a computer (PC) detecting mobile phone, therefore, certain adjustment of the starting task time sequence is realized, the method is low in efficiency, and real-time adjustment according to the actual starting condition of the task is difficult.
Disclosure of Invention
In view of the foregoing problems in the prior art, an object of the present disclosure is to provide an application start management method, apparatus, terminal, and device, which can implement automatic adjustment of an application start task timing sequence and improve a start speed.
In order to solve the technical problems, the specific technical scheme is as follows:
in one aspect, provided herein is a method for application launch management, the method comprising:
starting an application according to a pre-configured task starting queue, and acquiring the starting time consumption of each task;
determining the dependency relationship among the tasks according to the pre-configured task starting queue;
acquiring an initial task starting queue set when the application is started next time according to the dependency relationship;
and calculating the total starting time consumption of each initial task starting queue in the initial task starting queue set according to the starting time consumption of each task, and determining the initial task starting queue with the least total starting time consumption as a target task starting queue so as to start the application according to the target task starting queue when the application is started next time.
When the application is started for the first time, the pre-configured task starting queue is a manually configured task starting queue;
and when the application is not started for the first time, the pre-configured task starting queue is a target task starting queue determined after the last application starting is finished.
Further, the acquiring the starting time consumption of each task comprises:
acquiring starting time and ending time of each task;
and determining the starting time consumption of each task according to the starting time and the ending time.
Optionally, the acquiring the start time and the end time of each task includes: and acquiring the starting time and the ending time of each task by setting a pile inserting function.
Further, determining a dependency relationship among the tasks according to the pre-configured task start queue, including:
acquiring the task type and the starting time sequence of each task according to the pre-configured task starting queue;
and determining the correlation among different tasks according to the task type and the starting time sequence so as to determine the dependency among the tasks.
Further, the obtaining an initial task starting queue set when the application is started next time according to the dependency relationship includes:
according to the dependency relationship, performing topological sequencing on each task to generate a plurality of groups of directed acyclic graphs, wherein vertexes in each directed acyclic graph are different tasks, a directional edge and an arrow between the vertexes respectively represent the dependency relationship and the starting time sequence before the different tasks, and each directed acyclic graph represents an initial task starting queue;
and determining an initial task starting queue set when the application is started next time according to the multiple groups of directed acyclic graphs.
Further, after obtaining the initial task starting queue set when the application is started next time according to the dependency relationship, the method may further include:
acquiring an operation instruction for adjusting and starting tasks by a user, and determining the dependency relationship among the adjusted tasks according to the operation instruction;
and acquiring an initial task starting queue set after adjustment when the application is started next time according to the dependency relationship among the adjusted tasks.
Further, the user adjusting the operation instruction of the starting task comprises increasing or decreasing the starting task.
Further, the obtaining an operation instruction for adjusting and starting the task by the user, and determining a dependency relationship between the adjusted tasks according to the operation instruction includes:
determining to increase or decrease the task at the next starting according to the user operation instruction;
determining each task after adjustment when the application is started next time according to the increase or decrease of the tasks when the application is started;
and determining the dependency relationship between the tasks after adjustment when the application is started next time according to the dependency relationship between the tasks during the current starting and the dependency relationship between the tasks in the historical task starting queue.
Further, when there is a new task when the application is started next time, the determining of the target task starting queue includes:
acquiring the historical starting time consumption of the newly added task;
calculating the total starting time consumption of each initial task starting queue in the adjusted initial task starting queue set according to the historical starting time consumption of the newly added task and the starting time consumption of other non-newly added tasks;
and determining the initial task starting queue with the least total starting time consumption in the adjusted initial task starting queue set as a target task starting queue.
Further, the calculating, according to the starting time consumption of each task, the total starting time consumption of each initial task starting queue in the initial task starting queue set, and determining the initial task starting queue with the least total starting time consumption as a target task starting queue, then includes:
and storing the target task starting queue in a storage unit so as to start the application according to the target task starting queue when the application is started next time.
Optionally, when the application is started next time, starting according to the target task start queue includes:
and when the application is started next time, the tasks in the target task starting queue are created, scheduled and sequenced by using the unified thread pool through the thread control unit.
In another aspect, this document also provides an application launch management apparatus, the apparatus comprising:
the starting time consumption acquisition module is used for starting the application according to the pre-configured task starting queue and acquiring the starting time consumption of each task;
the dependency relationship determining module is used for determining the dependency relationship among the tasks according to the pre-configured task starting queue;
the initial task starting queue set acquisition module is used for acquiring an initial task starting queue set when the application is started next time according to the dependency relationship;
and the target task starting queue determining module is used for calculating the total starting time consumption of each initial task starting queue in the initial task starting queue set according to the starting time consumption of each task, and determining the initial task starting queue with the least total starting time consumption as the target task starting queue so as to start according to the target task starting queue when the application is started next time.
In another aspect, a terminal is also provided herein, which includes a storage unit, a processing unit, and a computer program stored on the storage unit and executable on the processing unit, and the processing unit implements the method steps as described above when executing the computer program.
In another aspect, a computer device is also provided herein, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method steps as described above when executing the computer program.
In another aspect, a computer-readable storage medium is also provided herein, which stores an executable computer program, which when executed by a processor implements the method steps as described above.
By adopting the technical scheme, the application starting management method, the device, the terminal and the equipment, disclosed herein, determine the dependency relationship among tasks when starting the application by obtaining the task starting queues in the application when starting the application, and obtain a plurality of groups of initial task starting queues according to the dependency relationship, and determine the outbound task starting queue which is the shortest when starting the total consumption as the target task starting queue by calculating the total starting time consumption of each group of initial task starting queues, namely, the starting task queue when starting the next time, so that the shortest task starting time consumption queue of the next time of the application can be rapidly determined, thereby realizing the automatic adjustment of the starting queues and improving the application starting speed.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram illustrating steps of an application launch management method in an embodiment herein;
FIG. 2 is a diagram illustrating steps of acquiring a task start time in the embodiment of the present disclosure;
FIG. 3 is a schematic diagram illustrating a step of determining dependencies among tasks adjusted in an embodiment of the present disclosure;
FIG. 4 is a schematic diagram illustrating a target task starting queue obtaining step after a task is adjusted in the embodiment of the present disclosure;
FIG. 5 is a schematic diagram illustrating steps of an application launch management method in an embodiment herein;
FIG. 6 is a schematic diagram illustrating a directed acyclic graph in an embodiment herein;
fig. 7 shows a schematic structural diagram of an application start management apparatus in the embodiment of the present disclosure;
fig. 8 shows a schematic structural diagram of a computer device in an embodiment herein.
Description of the symbols of the drawings:
100. starting a time-consuming acquisition module;
200. a dependency determination module;
300. an initial task starting queue set acquisition module;
400. a target task starting queue determining module;
702. a computer device;
704. a processor;
706. a memory;
708. a drive mechanism;
710. an input/output module;
712. an input device;
714. an output device;
716. a presentation device;
718. a graphical user interface;
720. a network interface;
722. a communication link;
724. a communication bus.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments herein without making any creative effort, shall fall within the scope of protection.
It should be noted that the terms "first," "second," and the like in the description and claims herein and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments herein described are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, apparatus, article, or device that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or device.
First, terms used in the examples of the present specification are explained:
instrumentation function (program instrumentation): program instrumentation, originally proposed by professor j.c. huang, is a method of inserting some probes (also called "probes", which are essentially code segments for information acquisition, and may be assignment statements or function calls for acquiring coverage information) into a program on the basis of ensuring the original logic integrity of the program to be tested, and by executing the probes and throwing out characteristic data of program operation, through analysis of the data, control flow and data flow information of the program can be obtained, and further dynamic information such as logic coverage and the like can be obtained, thereby achieving the purpose of testing.
Directed graph: a directed graph D refers to an ordered triple (V (D), A (D), ψ D), where ψ D is the correlation function that makes each element in A (D) (called directed edge or arc) correspond to an ordered pair of elements in V (D) (called vertex or point).
Directed Acyclic Graph (Directed Acyclic Graph): a directed acyclic graph refers to a loop-free directed graph. If there is a non-directed acyclic graph, and point A can go from B to C and back to A, forming a ring. Changing the edge direction from C to A from A to C, the directed acyclic graph is changed. The number of spanning trees of the directed acyclic graph is equal to the in-degree product of nodes with non-zero in-degree. In graph theory, a directed graph is an acyclic directed graph if it cannot go from a vertex back to the point through several edges.
Topological sorting, namely performing topological sorting on a Directed Acyclic Graph (DAG for short) G, wherein all vertexes in the G are arranged into a linear sequence, so that any pair of vertexes u and v in the Graph is subjected to u appearing before v in the linear sequence if the side < u, v > belongs to E (G). Generally, such linear sequences are referred to as sequences satisfying a Topological Order (Topological Order), abbreviated as Topological sequences. Briefly, a partial order on a set results in a full order on the set, which is called topological ordering.
With the increasing dependence of people on terminal devices such as smart phones and the like, improving the experience of the smart phones is also an aspect of important pursuit of each service provider, wherein the smart phones can cover more and more scenes, and the starting speed of each application software becomes an important factor influencing the experience of users.
In order to solve the above problem, an embodiment of the present specification provides an application start management method adapted to an intelligent terminal, which specifically includes: the method includes the steps that a dependency relationship among tasks when a current application program is started is obtained, topological sorting is automatically carried out to obtain a plurality of groups of starting queues, starting time consumption of each group of starting queues is calculated according to the starting time consumption of each task when the current application program is started, and the starting queue with the minimum starting time consumption can be used as the starting queue of the application program when the application program is started next time.
The intelligent terminal can be a vehicle machine control device, a smart phone, a desktop computer, a tablet computer, a notebook computer, a digital assistant, an intelligent wearable device and other entity devices capable of applying application programs; wherein, wearable equipment of intelligence can include intelligent bracelet, intelligent wrist-watch, intelligent glasses, intelligent helmet etc.. Of course, the intelligent terminal is not limited to the electronic device with certain entity, and may also be software running in the electronic device, for example, the intelligent terminal may be a web page or an application provided to a user by a service provider.
The intelligent terminal may include a display screen, a storage device, and a processor connected by a data bus. The display screen is used for displaying an operation interface or interacting with a user and the like, and the display screen can be a touch screen of a vehicle machine, a mobile phone or a tablet computer and the like. The storage device is used for storing program codes, data materials and the like of the shooting device, and the storage device can be a memory of the intelligent terminal, and can also be a storage device such as a smart media card (smart media card), a secure digital card (secure digital card), a flash memory card (flash card) and the like. The processor may be a single core or multi-core processor.
Further, embodiments herein provide an application startup management method, which can perform real-time optimization on an application startup queue, and improve the startup speed of an application. Fig. 1 is a schematic diagram of steps of an application start management method provided in an embodiment herein, and the present specification provides the method operation steps as described in the embodiment or the flowchart, but more or less operation steps may be included based on conventional or non-inventive labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. When an actual system or apparatus product executes, it can execute sequentially or in parallel according to the method shown in the embodiment or the figures. Specifically, as shown in fig. 1, the method may include:
s101: starting an application according to a pre-configured task starting queue, and acquiring the starting time consumption of each task;
s102: determining the dependency relationship among the tasks according to the pre-configured task starting queue;
s103: acquiring an initial task starting queue set when the application is started next time according to the dependency relationship;
s104: and calculating the total starting time consumption of each initial task starting queue in the initial task starting queue set according to the starting time consumption of each task, and determining the initial task starting queue with the least total starting time consumption as a target task starting queue so as to start the application according to the target task starting queue when the application is started next time.
When an application program is started, starting time consumption of each task can be obtained through a pre-configured task starting queue, a dependency relationship between each task can be obtained through the pre-configured task starting queue, a plurality of groups of task starting queues can be obtained through the dependency relationship, the total starting time consumption of each group of task starting queues can be calculated by combining the obtained starting time consumption of each task, and a target task starting queue when application software is started next time can be selected, namely, the target task starting queue is the pre-configured task starting queue when the application is started next time, the starting queue when the application is started next time can be automatically and rapidly adjusted according to the starting condition of the previous application, so that automatic optimization of application starting speed is realized, and the frequency of optimization of the application starting speed is improved, the idle running of the CPU after partial tasks are completed is reduced, and the user experience is improved.
It can be understood that the dependency relationship is an association between tasks, that is, a relationship between start timings of tasks, where a task start queue may be a queue between start threads in a single application start process, and each task may be a thread in the start process, and for example, it may be determined that there are four tasks for a start task through a pre-configured task start queue: A. b, C and D; the method includes the steps that A is an application program starting task, B and C depend on A, D depends on C, and a terminal depends on B and D, so that a dependency relationship among tasks in the application program can be formed, at the moment, topological sorting is conducted on a relationship set to obtain a linear sequence, the task arranged in front is the task needing to be completed first, as shown in FIG. 6, a directed acyclic graph determined through the dependency relationship is used, a pre-configured task starting queue execution time sequence during the application program starting is also used, of course, in some other application programs needing more tasks to be started, the dependency relationship among the tasks is more complex, the determined directed acyclic graph is more, therefore, a path consuming shorter time can be selected from the application programs, and specific selection steps are detailed below.
In practice, the following start-up sequence may be included in the start-up for a specific application: the method comprises the steps of initializing a database, initializing push, initializing various third-party components (a third-party map, third-party sharing and the like), detecting a new version, downloading advertisement data and the like, wherein the correlation between the tasks can be determined according to the starting sequence and the type of the tasks, for example, the execution of the initialization push can be executed only depending on the success of the initialization database, so that the initialization push depends on the initialization database, the third-party map and the third-party in the third-party components share the same type of tasks and do not have a sequence, so that the third-party map and the third-party in the third-party components can be executed simultaneously or have the existing sequence, and the execution of the detection of the new version and the downloading of the advertisement data is not directly related, so that the new version and the downloading of the advertisement data do not have a dependency relationship.
In this embodiment of the present specification, the pre-configured task starting queue is set according to an actual situation of application starting, and specifically includes:
when the application is started for the first time, the pre-configured task starting queue is a manually configured task starting queue;
and when the application is not started for the first time, the pre-configured task starting queue is a target task starting queue determined after the last application starting is finished.
The first start may be a first start after the application program is downloaded, or a first start after the application program version is updated, or a first start after the system of the intelligent terminal is replaced, when the application program is started for the first time, the intelligent terminal memory does not store historical start information of the application program, and therefore the application program needs to be started through a task start queue configured by tasks, it needs to be noted that after the application program version is updated, there may be a case of starting task adjustment, and therefore in order to ensure that the application program is started smoothly, there may be a case of start failure through the task start queue before updating, and therefore in the embodiment of the present specification, after the application program version is updated, the application program is started through the task start queue configured manually.
Further, at present, for the task start time consumption of an application program (APP) on an intelligent terminal, trace codes, such as debug. Therefore, in order to improve the convenience and accuracy of acquiring the start time consumption of each task, as shown in fig. 2, in an embodiment of this specification, acquiring the start time consumption of each task includes:
s201: acquiring starting time and ending time of each task;
s202: and determining the starting time consumption of each task according to the starting time and the ending time.
It can be understood that in the embodiment of the present specification, by inserting a function at the start and the end of each task start, only the start and the end time of each task start needs to be obtained, and the start time of each task can be obtained by calculating the time difference, so that no other code runs during the task start, thereby avoiding the increase of the start time caused by the running of an additional code, and improving the accuracy of the calculation of the start time of each task.
Optionally, the obtaining of the start time and the end time of each task is obtained by: and acquiring the starting time and the ending time of each task by setting a pile inserting function. The instrumentation function (also called program instrumentation) is to insert some probes (code segments) into a program for information acquisition on the basis of ensuring the original logic integrity of the program to be tested, and to obtain program data flow information by executing the probes and throwing out characteristic data of program operation and analyzing the data.
In actual work, in order to accurately obtain the time consumed for starting each task, in an application program development process or in an uploading process of adapting to a target terminal system (such as an IOS system or an Android system), a stub function may be set in advance, so that an intelligent terminal processor corresponding to the target terminal system can obtain the accurate time consumed for starting each task by running the stub function set in advance.
In this embodiment of the present specification, in order to determine a relationship between tasks in an application starting process, determining a dependency relationship between the tasks according to the pre-configured task starting queue may include the following steps:
acquiring the task type and the starting time sequence of each task according to the pre-configured task starting queue;
and determining the correlation among different tasks according to the task type and the starting time sequence so as to determine the dependency among the tasks.
It can be understood that the logical relationship of each task during execution can be obtained through the task type of each task, so that the initial correlation between each task can be comprehensively judged, and then, in combination with the start timing sequence of each task in the pre-configured task start queue, the correlation between each task can be further selected according to the determined initial correlation, such as determining the start task and the final task. By determining the dependency relationship among the tasks, on the basis of the pre-configured task starting queue, other task starting queues capable of smoothly starting the application program can be obtained.
Therefore, in this embodiment of the present specification, the obtaining an initial task starting queue set when the application is started next time according to the dependency relationship includes:
according to the dependency relationship, performing topological sequencing on each task to generate a plurality of groups of directed acyclic graphs, wherein vertexes in each directed acyclic graph are different tasks, a directional edge and an arrow between the vertexes respectively represent the dependency relationship and the starting time sequence before the different tasks, and each directed acyclic graph represents an initial task starting queue;
and determining an initial task starting queue set when the application is started next time according to the multiple groups of directed acyclic graphs.
It can be understood that, in a directed acyclic graph, as shown in fig. 6, each vertex represents one task, and each task can only appear once, and the tasks represented by the vertices at the two ends of the edge have a dependency relationship, where the arrow direction represents the execution sequence of two connected tasks, and specifically, the path from the starting point task to each point may be obtained through a breadth-first algorithm. Each task starting queue in the determined initial task starting queue set may be a queue at the time of starting the application program next time, that is, each task starting path at the time of starting the application program next time, and in order to increase the starting speed at the time of starting the application program next time, the total starting time of each task starting queue may be calculated by the starting time of each task obtained through the above steps, so that the queue with the least total starting time consumption may be selected as the target task starting queue.
In this embodiment of the present specification, the user may further adjust the task at the next time of starting in the process of operating the application program as needed, and specifically, after obtaining the initial task starting queue set at the next time of starting the application according to the dependency relationship, the method may further include:
acquiring an operation instruction for adjusting and starting tasks by a user, and determining the dependency relationship among the adjusted tasks according to the operation instruction;
and acquiring an initial task starting queue set after adjustment when the application is started next time according to the dependency relationship among the adjusted tasks.
The task adjusted by user operation can be a third-party component, for example, by reducing the number of the third-party components, the path of task starting can be reduced, thereby improving the starting time of the application program; correspondingly, the user can also increase the number of tasks as required, during specific operation, the user can enter the selection of the starting item corresponding to the application program through the operation interface of the intelligent terminal, and the starting item can be increased or decreased according to the selection of the requirement, and when the application program is started next time, the application program can be started according to the adjusted task.
In this embodiment of this specification, as shown in fig. 3, the obtaining an operation instruction for adjusting a start task by a user, and determining a dependency relationship between each adjusted task according to the operation instruction may further include the following steps:
s301: determining to increase or decrease the task at the next starting according to the user operation instruction;
s302: determining each task after adjustment when the application is started next time according to the increase or decrease of the tasks when the application is started;
s303: and determining the dependency relationship between the tasks after adjustment when the application is started next time according to the dependency relationship between the tasks during the current starting and the dependency relationship between the tasks in the historical task starting queue.
When the task at the next starting time is determined to be added, the dependency relationship between the added task and each original task is not clear, so that the dependency relationship between the added task and other tasks can be obtained in a historical task starting queue stored by an intelligent means. When the application program is started for the first time, the historical task starting queue does not exist, or when the historical task starting queue does not have added tasks, the application program can be matched with each original task according to the type of the added tasks, so that similar task types are obtained, and the dependency relationship between the added tasks and the tasks which are successfully matched can be established. In some other embodiments, matching may also be performed according to a dependency relationship determination rule or a start queue determination rule preset by a developer, which is not described in detail in this specification.
Correspondingly, when determining that the tasks at the next starting time are reduced, the dependency relationship between the reduced tasks and other tasks can be omitted, so that a new dependency relationship between each task is obtained, and certainly, under some special conditions, the dependency relationship of some tasks in the reduced tasks is not clear, and the dependency relationship can be further determined through a historical task starting queue stored by the intelligent terminal.
It should be noted that, when the developer sets the default startup item option, it is already ensured by the preset logic program that the application program can be smoothly started by the default startup item in any combination, and therefore, by increasing or decreasing the startup task, the crash (startup failure) of the application program is not caused, and the specific preset logic program is not described in detail in this specification.
When the reduced tasks exist during the next starting of the application program, an initial task starting queue set can be determined through the reduced dependency relationship among the tasks, then the total starting time consumption of each queue in the initial task starting queue set is calculated according to the starting time consumption of each task, and the task starting queue with the least total starting time consumption is determined to be a target task starting queue during the next starting of the application program.
Further, as shown in fig. 4, when there is a newly added task when the application is started next time, the determining of the target task starting queue includes:
s401: acquiring the historical starting time consumption of the newly added task;
s402: calculating the total starting time consumption of each initial task starting queue in the adjusted initial task starting queue set according to the historical starting time consumption of the newly added task and the starting time consumption of other non-newly added tasks;
s403: and determining the initial task starting queue with the least total starting time consumption in the adjusted initial task starting queue set as a target task starting queue.
It can be understood that when the starting time consumption of the newly added task is not determined, the starting time consumption can be determined through historical starting time consumption, the historical starting time consumption can be the starting time consumption of the newly added task at the last time, and can also be the average time consumption of starting preset times, so that the starting time consumption of the newly added task at the current stage can be taken as the starting time consumption, the calculation of the total starting time consumption of each queue in the initial task starting queue set is realized, and the target task starting queue with the least total starting time consumption is selected.
Further, when the target task starting queue is determined, namely the target directed acyclic graph is determined, the target task starting queue is stored in the storage unit, so that the application is started according to the target task starting queue when being started next time. And when the application program runs next time, reading the target directed acyclic graph in the storage unit, sequencing tasks according to the target directed acyclic graph, and establishing, scheduling and sequencing the tasks by using the thread pool.
When the application program is started next time, the process of the last start is still followed: the method comprises the steps of performing instrumentation on a function, calculating time consumption, continuously and dynamically adjusting a starting sequence, generating a new target directed acyclic graph for adjusting next starting, continuously performing time consumption analysis on the application through starting at each time, and generating a new directed graph according to an algorithm, so that the application can be started more and more quickly, the intelligent rearrangement of a starting task is realized, and the user experience is improved.
It should be noted that, in order to reduce idle running of the CPU during task execution, when the application is started next time, the thread control unit uses the unified thread pool to create, schedule, and sequence the tasks in the target task start queue, and uses the unified thread pool to manage and schedule, so as to avoid unnecessary CPU preemption among different threads from consuming system performance, which results in increased start time.
As shown in fig. 5, which is a specific example of the embodiment of the present specification, the application management method includes the following steps:
s501: receiving an application starting instruction;
s502: reading each task information set by a user, and determining the dependency relationship among the tasks;
s503: judging whether the task is started for the first time;
s504: if the application is started for the first time, starting according to a preset task starting queue;
s505: if the application is not started for the first time, reading the optimal directed acyclic graph stored in the storage, and sequencing, managing and scheduling tasks;
s506: acquiring the starting time consumption of each task in the starting process of the application;
s507: forming a plurality of groups of directed acyclic graphs according to topological ordering of the dependency relationship among the tasks;
s508: determining a target directed acyclic graph by calculating the total starting time consumption of a plurality of groups of directed acyclic graphs;
s509: the target directed acyclic graph is stored in a storage;
s510: the start is complete.
In the embodiment of the specification, each task starting queue in the starting process of the application program at each time is readjusted, so that the new queue can be started more quickly, the total time consumed by starting the application program is ensured to be automatically adjusted in real time, the next faster starting can be realized when the application program is started at each time, the time consumed and sequencing of the tasks are avoided being manually analyzed by a developer, the effect of accelerating the starting of the mobile client is achieved, and the user experience is improved.
Based on the same inventive concept, as shown in fig. 7, an embodiment of the present specification further provides an application start management device, where the device includes:
a starting time consumption obtaining module 100, configured to start an application according to a pre-configured task starting queue, and obtain starting time consumption of each task;
a dependency relationship determining module 200, configured to determine a dependency relationship between each task according to the pre-configured task start queue;
an initial task starting queue set obtaining module 300, configured to obtain an initial task starting queue set when the application is started next time according to the dependency relationship;
and a target task starting queue determining module 400, configured to calculate total starting time consumption of each initial task starting queue in the initial task starting queue set according to the starting time consumption of each task, and determine the initial task starting queue with the least total starting time consumption as a target task starting queue, so that when the application is started next time, the application is started according to the target task starting queue.
The beneficial effects obtained by the application startup management device provided by the embodiment of the present specification are consistent with the beneficial effects obtained by the above method, and are not described in detail in the present specification.
In another embodiment, the present specification further provides a terminal including a storage unit, a processing unit and a computer program stored on the storage unit and executable on the processing unit, wherein the processing unit implements the method steps as described above when executing the computer program.
As shown in fig. 8, for a computer device provided for embodiments herein, the computer device 802 may include one or more processors 804, such as one or more Central Processing Units (CPUs), each of which may implement one or more hardware threads. The computer device 802 may also include any memory 806 for storing any kind of information, such as code, settings, data, etc. For example, and without limitation, memory 806 may include any one or more of the following in combination: any type of RAM, any type of ROM, flash memory devices, hard disks, optical disks, etc. More generally, any memory may use any technology to store information. Further, any memory may provide volatile or non-volatile retention of information. Further, any memory may represent fixed or removable components of computer device 802. In one case, when the processor 804 executes the associated instructions, which are stored in any memory or combination of memories, the computer device 802 can perform any of the operations of the associated instructions. The computer device 802 also includes one or more drive mechanisms 808, such as a hard disk drive mechanism, an optical disk drive mechanism, etc., for interacting with any memory.
Computer device 802 may also include an input/output module 810(I/O) for receiving various inputs (via input device 812) and for providing various outputs (via output device 814)). One particular output mechanism may include a presentation device 816 and an associated Graphical User Interface (GUI) 818. In other embodiments, input/output module 810(I/O), input device 812, and output device 814 may also be excluded, as just one computer device in a network. Computer device 802 may also include one or more network interfaces 820 for exchanging data with other devices via one or more communication links 822. One or more communication buses 824 couple the above-described components together.
Communication link 822 may be implemented in any manner, such as over a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 822 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc., governed by any protocol or combination of protocols.
Corresponding to the methods in fig. 1-5, the embodiments herein also provide a computer-readable storage medium having stored thereon a computer program, which, when executed by a processor, performs the steps of the above-described method.
Embodiments herein also provide computer readable instructions, wherein when executed by a processor, a program thereof causes the processor to perform the method as shown in fig. 1-5.
It should be understood that, in various embodiments herein, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments herein.
It should also be understood that, in the embodiments herein, the term "and/or" is only one kind of association relation describing an associated object, meaning that three kinds of relations may exist. For example, a and/or B, may represent: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided herein, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments herein.
In addition, functional units in the embodiments herein may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present invention may be implemented in a form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The principles and embodiments of this document are explained herein using specific examples, which are presented only to aid in understanding the methods and their core concepts; meanwhile, for the general technical personnel in the field, according to the idea of this document, there may be changes in the concrete implementation and the application scope, in summary, this description should not be understood as the limitation of this document.

Claims (16)

1. An application launch management method, characterized in that the method comprises:
starting an application according to a pre-configured task starting queue, and acquiring the starting time consumption of each task;
determining the dependency relationship among the tasks according to the pre-configured task starting queue;
acquiring an initial task starting queue set when the application is started next time according to the dependency relationship;
and calculating the total starting time consumption of each initial task starting queue in the initial task starting queue set according to the starting time consumption of each task, and determining the initial task starting queue with the least total starting time consumption as a target task starting queue so as to start the application according to the target task starting queue when the application is started next time.
2. The method of claim 1,
when the application is started for the first time, the pre-configured task starting queue is a manually configured task starting queue;
and when the application is not started for the first time, the pre-configured task starting queue is a target task starting queue determined after the last application starting is finished.
3. The method of claim 1, wherein the obtaining the start-up time of each task comprises:
acquiring starting time and ending time of each task;
and determining the starting time consumption of each task according to the starting time and the ending time.
4. The method of claim 3, wherein obtaining the start time and the end time of each task comprises: and acquiring the starting time and the ending time of each task by setting a pile inserting function.
5. The method of claim 1, wherein determining dependencies between tasks according to the preconfigured task start queue comprises:
acquiring the task type and the starting time sequence of each task according to the pre-configured task starting queue;
and determining the correlation among different tasks according to the task type and the starting time sequence so as to determine the dependency among the tasks.
6. The method according to claim 1, wherein the obtaining an initial task start queue set at the next start of the application according to the dependency relationship comprises:
according to the dependency relationship, performing topological sequencing on each task to generate a plurality of groups of directed acyclic graphs, wherein vertexes in each directed acyclic graph are different tasks, a directional edge and an arrow between the vertexes respectively represent the dependency relationship and the starting time sequence before the different tasks, and each directed acyclic graph represents an initial task starting queue;
and determining an initial task starting queue set when the application is started next time according to the multiple groups of directed acyclic graphs.
7. The method according to claim 1, wherein the obtaining an initial task start queue set at the next start of the application according to the dependency relationship further comprises:
acquiring an operation instruction for adjusting and starting tasks by a user, and determining the dependency relationship among the adjusted tasks according to the operation instruction;
and acquiring an initial task starting queue set after adjustment when the application is started next time according to the dependency relationship among the adjusted tasks.
8. The method of claim 7, wherein the user adjusting the operational instructions to initiate the task comprises increasing or decreasing the initiation task.
9. The method according to claim 8, wherein the obtaining of an operation instruction for adjusting a start task by a user and determining a dependency relationship between the adjusted tasks according to the operation instruction comprises:
determining to increase or decrease the task at the next starting according to the user operation instruction;
determining each task after adjustment when the application is started next time according to the increase or decrease of the tasks when the application is started;
and determining the dependency relationship between the tasks after adjustment when the application is started next time according to the dependency relationship between the tasks during the current starting and the dependency relationship between the tasks in the historical task starting queue.
10. The method of claim 7, wherein when there is a new task added at the next launch of the application, the determining of the target task launch queue comprises:
acquiring the historical starting time consumption of the newly added task;
calculating the total starting time consumption of each initial task starting queue in the adjusted initial task starting queue set according to the historical starting time consumption of the newly added task and the starting time consumption of other non-newly added tasks;
and determining the initial task starting queue with the least total starting time consumption in the adjusted initial task starting queue set as a target task starting queue.
11. The method according to claim 1, wherein the calculating, according to the starting time consumption of each task, a total starting time consumption of each initial task starting queue in the set of initial task starting queues, and determining an initial task starting queue with a minimum total starting time consumption as a target task starting queue, then includes:
and storing the target task starting queue in a storage unit so as to start the application according to the target task starting queue when the application is started next time.
12. The method of claim 1, wherein starting according to the target task start queue when the application is started next time, comprises:
and when the application is started next time, the tasks in the target task starting queue are created, scheduled and sequenced by using the unified thread pool through the thread control unit.
13. An application launch management apparatus, characterized in that the apparatus comprises:
the starting time consumption acquisition module is used for starting the application according to the pre-configured task starting queue and acquiring the starting time consumption of each task;
the dependency relationship determining module is used for determining the dependency relationship among the tasks according to the pre-configured task starting queue;
the initial task starting queue set acquisition module is used for acquiring an initial task starting queue set when the application is started next time according to the dependency relationship;
and the target task starting queue determining module is used for calculating the total starting time consumption of each initial task starting queue in the initial task starting queue set according to the starting time consumption of each task, and determining the initial task starting queue with the least total starting time consumption as the target task starting queue so as to start according to the target task starting queue when the application is started next time.
14. A terminal, characterized in that the terminal comprises a storage unit, a processing unit and a computer program stored on the storage unit and executable on the processing unit, the processing unit realizing the method steps according to any of claims 1 to 12 when executing the computer program.
15. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method steps of any of claims 1 to 12 when executing the computer program.
16. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when being executed by a processor, carries out the method steps of any one of claims 1 to 12.
CN202110295722.4A 2021-03-19 2021-03-19 Application start management method and device, terminal and equipment Pending CN113010291A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110295722.4A CN113010291A (en) 2021-03-19 2021-03-19 Application start management method and device, terminal and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110295722.4A CN113010291A (en) 2021-03-19 2021-03-19 Application start management method and device, terminal and equipment

Publications (1)

Publication Number Publication Date
CN113010291A true CN113010291A (en) 2021-06-22

Family

ID=76403173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110295722.4A Pending CN113010291A (en) 2021-03-19 2021-03-19 Application start management method and device, terminal and equipment

Country Status (1)

Country Link
CN (1) CN113010291A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115543490A (en) * 2022-12-01 2022-12-30 江苏华存电子科技有限公司 Flash memory firmware starting method and system
CN115801694A (en) * 2022-11-16 2023-03-14 浪潮云信息技术股份公司 Kubernet scheduler design method and system based on network perception
CN117934259A (en) * 2024-03-20 2024-04-26 浙江凌迪数字科技有限公司 Task flow chart generation method, electronic device and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115801694A (en) * 2022-11-16 2023-03-14 浪潮云信息技术股份公司 Kubernet scheduler design method and system based on network perception
CN115543490A (en) * 2022-12-01 2022-12-30 江苏华存电子科技有限公司 Flash memory firmware starting method and system
CN117934259A (en) * 2024-03-20 2024-04-26 浙江凌迪数字科技有限公司 Task flow chart generation method, electronic device and storage medium

Similar Documents

Publication Publication Date Title
CN113010291A (en) Application start management method and device, terminal and equipment
CN113535367B (en) Task scheduling method and related device
US10547682B2 (en) Dynamically scaling application components using microservices
US20190196672A1 (en) Visual effects system for &#34;big data&#34; analysis workflow editors, distribution platforms, execution engines, and management systems comprising same
US20210303455A1 (en) Dynamic Management and Control of Test Features in Native Applications
US20140245319A1 (en) Method for enabling an application to run on a cloud computing system
US20140289418A1 (en) Methods and systems for planning execution of an application in a cloud computing system
US20160313874A1 (en) Visual effects system for &#34;big data&#34; analysis workflow editors, distribution platforms, execution engines, and management systems comprising same
US11201806B2 (en) Automated analysis and recommendations for highly performant single page web applications
CN117203612A (en) Intelligent generation and management of computing device application updated estimates
US20140244791A1 (en) Method for intercepting an instruction produced by an application on a computer
CN110532559B (en) Rule processing method and device
CN106157347B (en) Resource exchange data processing method, device and system
CN113760488B (en) Method, apparatus, device and computer readable medium for scheduling tasks
Bader et al. Lotaru: Locally predicting workflow task runtimes for resource management on heterogeneous infrastructures
JP2022125904A (en) Cloud service evaluation device and cloud service evaluation method
CN115329143A (en) Directed acyclic graph evaluation method, device, equipment and storage medium
US11429330B2 (en) Information processing apparatus and non-transitory computer readable medium
CN114924784A (en) Method, system, equipment, storage medium and product for compatibility of new and old interfaces
US10983813B2 (en) Automatic repetition of context-specific code edits
CN112799797B (en) Task management method and device
US11797553B2 (en) Timeline display device, timeline display method and timeline display program
CN110825461B (en) Data processing method and device
US20180341521A1 (en) Managing job schedules
CN112988340A (en) Task scheduling method, device and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination