CN112948068A - Task scheduling method and device and electronic equipment - Google Patents

Task scheduling method and device and electronic equipment Download PDF

Info

Publication number
CN112948068A
CN112948068A CN202010977315.7A CN202010977315A CN112948068A CN 112948068 A CN112948068 A CN 112948068A CN 202010977315 A CN202010977315 A CN 202010977315A CN 112948068 A CN112948068 A CN 112948068A
Authority
CN
China
Prior art keywords
task
execution
tasks
executed
client
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.)
Granted
Application number
CN202010977315.7A
Other languages
Chinese (zh)
Other versions
CN112948068B (en
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.)
Shenzhen Mingyuan Cloud Technology Co Ltd
Original Assignee
Shenzhen Mingyuan Cloud Technology Co Ltd
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 Shenzhen Mingyuan Cloud Technology Co Ltd filed Critical Shenzhen Mingyuan Cloud Technology Co Ltd
Priority to CN202010977315.7A priority Critical patent/CN112948068B/en
Publication of CN112948068A publication Critical patent/CN112948068A/en
Application granted granted Critical
Publication of CN112948068B publication Critical patent/CN112948068B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a task scheduling method, a task scheduling device and electronic equipment, and relates to the technical field of background task scheduling, wherein the method comprises the following steps: determining a plurality of tasks to be executed according to the execution instruction, then executing each task, determining the execution state of each task, and finally notifying the execution progress of the execution instruction to the client according to the execution state of each task, wherein the execution instruction is triggered by a user in the webpage application of the client. According to the technical scheme, the execution progress of the execution instruction is determined according to the execution state of each task, the execution progress is notified to the client, the client can feed back the processing state in time, and the use experience of a user is improved.

Description

Task scheduling method and device and electronic equipment
Technical Field
The application relates to a task scheduling technology, in particular to a task scheduling method, a task scheduling device and electronic equipment, and belongs to the technical field of background task scheduling.
Background
With the development of cloud computing, more and more local applications are replaced by web applications, and the web applications have characteristics incomparable to the local applications, for example, the web applications do not occupy a local storage space, the web applications do not need to be installed, and the web applications can be conveniently switched among different devices.
The webpage application mainly depends on the server at the cloud end to complete task processing, when a user needs the webpage application to execute an operation, a corresponding option in a webpage can be clicked, the click operation triggers a corresponding execution instruction, the client can send the execution instruction to the server, the server can execute the corresponding task according to the execution instruction, and an execution result is returned to the client after the task execution is finished.
In order to meet the requirements of users with higher level and complexity, the number of tasks corresponding to a single option is increased, and the single task is also more and more complex. Therefore, the server needs to spend more time in multitasking, and correspondingly, the time for the web page to feed back the execution result to the user is longer. For the user, if the webpage has no feedback for a long time after the option is clicked, the user may mistakenly think that the webpage is jammed or the option is not successfully triggered, and the like, thereby affecting the user experience.
Disclosure of Invention
In view of this, the application provides a task scheduling method, a task scheduling device, and an electronic device, which are used for feeding back a processing state of a web application in time and improving user experience.
In order to achieve the above object, in a first aspect, an embodiment of the present application provides a task scheduling method, which is applied to a server, and includes:
determining a plurality of tasks to be executed according to an execution instruction, wherein the execution instruction is triggered by a user in a webpage application of a client;
executing tasks and determining the execution state of each task;
and notifying the execution progress of the execution instruction to the client according to the execution state of each task.
Optionally, the task is executed, including:
for each task, a task model corresponding to the task is constructed according to the execution relation between the task and other tasks, the task model comprises the task and a tree structure of the task, and the tree structure comprises a parent-child relation and a brother relation of the task;
and sequentially executing the tasks in each task model according to the tree structure of each task model.
Optionally, sequentially executing the tasks in each task model according to the tree structure of each task model, including:
determining a task queue according to the tree structure of each task model, wherein the task queue comprises an execution sequence and an execution state of the task model;
for each task model, executing the tasks in the task model according to the execution sequence, and updating the execution state of the task model;
correspondingly, the step of determining the execution state of each task comprises the following steps:
and determining the execution state of each task according to the execution state of each task model in the task queue.
Optionally, notifying the execution progress of the execution instruction to the client according to the execution state of each task, including:
determining an execution progress according to the execution state of each task;
and sending the execution progress to the client so that the client can show the execution progress.
Optionally, after the task is executed, the method further includes:
in case of a task execution failure, all executed tasks are rolled back.
Optionally, in the case of a failure in task execution, rolling back all executed tasks, including:
if the task fails to be executed, the task is executed again;
and if the task fails to execute again, rolling back all executed tasks.
Optionally, the execution state includes incomplete execution, successful execution, or failed execution;
when the execution states of all the tasks are successfully executed, the execution progress comprises indication information of successful execution of the execution instruction;
when the execution state of at least one task is not completely executed, the execution progress comprises proportion information of the number of the tasks which are successfully executed to the total number of the tasks;
when the execution state of at least one task is execution failure, the execution progress comprises indication information of execution failure of the execution instruction.
In a second aspect, an embodiment of the present application provides a task scheduling apparatus, which is applied to a server, and includes:
the execution module is used for determining a plurality of tasks to be executed according to the execution instruction, wherein the execution instruction is triggered by a user in the webpage application of the client, executing the tasks and determining the execution state of each task;
and the notification module is used for notifying the execution progress of the execution instruction to the client according to the execution state of each task.
Optionally, the execution module is specifically configured to:
for each task, a task model corresponding to the task is constructed according to the execution relation between the task and other tasks, the task model comprises the task and a tree structure of the task, and the tree structure comprises a parent-child relation and a brother relation of the task;
and sequentially executing the tasks in each task model according to the tree structure of each task model.
Optionally, the execution module is specifically configured to:
determining a task queue according to the tree structure of each task model, wherein the task queue comprises an execution sequence and an execution state of the task model;
for each task model, executing the tasks in the task model according to the execution sequence, and updating the execution state of the task model;
correspondingly, the execution module is specifically configured to:
and determining the execution state of each task according to the execution state of each task model in the task queue.
Optionally, the notification module is specifically configured to:
determining an execution progress according to the execution state of each task;
and sending the execution progress to the client so that the client can show the execution progress.
Optionally, the execution module is further configured to:
in case of a task execution failure, all executed tasks are rolled back.
Optionally, the execution module is specifically configured to:
if the task fails to be executed, the task is executed again;
and if the task fails to execute again, rolling back all executed tasks.
Optionally, the execution state includes incomplete execution, successful execution, or failed execution;
when the execution states of all the tasks are successfully executed, the execution progress comprises indication information of successful execution of the execution instruction;
when the execution state of at least one task is not completely executed, the execution progress comprises proportion information of the number of the tasks which are successfully executed to the total number of the tasks;
when the execution state of at least one task is execution failure, the execution progress comprises indication information of execution failure of the execution instruction.
In a third aspect, an embodiment of the present application provides an electronic device, including: a memory for storing a computer program and a processor; the processor is configured to perform the method of the first aspect or any of the embodiments of the first aspect when the computer program is invoked.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method according to the first aspect or any embodiment of the first aspect.
According to the task scheduling method, the task scheduling device and the electronic equipment, the server can determine a plurality of tasks to be executed according to the execution instruction, then execute each task, determine the execution state of each task, and finally notify the execution progress of the execution instruction to the client according to the execution state of each task, wherein the execution instruction is triggered by a user in a webpage application of the client. The server can determine the execution progress of the execution instruction according to the execution state of each task, and inform the execution progress to the client, so that the client can feed back the processing state in time, and the use experience of a user is improved.
Drawings
Fig. 1 is a schematic flowchart of a task scheduling method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a tree structure provided in an embodiment of the present application;
fig. 3 is a schematic structural diagram of a task scheduling device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The task scheduling method provided by the embodiment of the application can be applied to electronic equipment such as a server, a server group or a computing center, and the specific type of the electronic equipment is not limited at all.
The technical solution of the present application will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
In the task scheduling system, the client and the server are connected with each other through a network, the client is provided with the webpage application, the server is provided with the system background of the webpage application, a user can trigger the corresponding function through the webpage application, and the system background executes the function to meet the requirements of the user.
Fig. 1 is a schematic flowchart of a task scheduling method provided in an embodiment of the present application, and as shown in fig. 1, the method includes the following steps:
and S110, determining a plurality of tasks to be executed according to the execution instruction.
When a user triggers a certain function option in a webpage application of a client, a corresponding execution instruction can be generated, and the execution instruction can comprise generation time, a server address for receiving the execution instruction, option content and the like. The client can send the execution instruction to the corresponding server according to the address. Each execution instruction corresponds to a plurality of tasks in the system background, the corresponding tasks are executed to complete corresponding functions, and after the server receives the execution instructions, the plurality of tasks to be executed can be determined according to option contents in the execution instructions.
For example, when a user clicks the option of "create application" in a development collaboration platform (a web application), the client may generate an execution instruction of the create application, and send the execution instruction of the create application to the server. The server can determine tasks such as creating a code warehouse, restoring a database, pulling a creating tool and the like according to the execution instruction, and complete the function of creating the application by executing the tasks.
Specifically, each task may include a name, execution content, and rollback content of the task, where the execution content and the rollback content are paired, for example, if the execution content of the task of creating the code repository is "create a corresponding code repository according to an identifier input by a user", the rollback content is "delete a created code repository according to an identifier input by a user"; the execution content of the order generating task is 'generate an order', and the rollback content is 'cancel the generated order'.
And S120, executing the tasks and determining the execution state of each task.
For each function, the tasks corresponding to the function have a set execution relationship, and the execution relationship comprises serial execution, parallel execution and mixed execution. For example, the server determines task 1, task 2 and task 3 to be executed according to the execution instruction, wherein when the execution relation among the three tasks is serial, task 1, task 2 and task 3 can be executed in sequence; when the execution relation among the three tasks is parallel, the task 1, the task 2 and the task 3 can be executed simultaneously; when the execution relation between the three tasks is mixed execution, the task 1 and the task 2 are in series, that is, the task 2 is executed after the task 1 is executed, and the task 1 and the task 3 are in parallel, that is, the server can execute the task 1 and the task 3 at the same time.
The server can sequentially execute a plurality of tasks according to a preset execution relation and determine the execution state of each task, wherein when the tasks are not executed or are being executed, the execution state is not finished; when the task is successfully executed, the execution state is successful; when the task fails to execute, the execution state is execution failure.
Specifically, for each task, the server may construct a task model corresponding to the task according to an execution relationship between the task and another task, where the task model may include the task and a tree structure of the task, and the tree structure includes a parent-child relationship and a sibling relationship of the task. Fig. 2 is a schematic diagram of a tree structure provided in the embodiment of the present application, where a task model includes a tree structure of a task 3 and a task 3, and fig. 2 is a tree structure of the task 3. The task 1 and the task 3 are in a serial execution relationship, and the task 1 is executed firstly and then the task 3 is executed during execution, so that the task 1 and the task 3 are in a parent-child relationship, wherein the task 1 is a parent task, and the task 3 is a child task; task 4 and task 3 are also in a serial execution relationship, and when the execution is performed, task 3 is executed first, and then task 4 is executed, so that task 3 and task 4 are also in a parent-child relationship, wherein task 3 is a parent task, and task 4 is a child task; task 2 and task 3 are in parallel execution relationship, and task 2 and task 3 are executed simultaneously during execution, so task 2 and task 3 are in sibling relationship.
When the scheme of the application is actually implemented, the system background can provide a task constructor, then the system background can sequentially input a plurality of tasks to be executed into the task constructor, and the task constructor generates a corresponding tree structure according to the execution relation of the tasks and generates a corresponding task model. The task model may also include, among other things, the name of the task model and the execution model (serial or parallel).
After each task model is constructed, the server can sequentially execute tasks in each task model according to the tree structure of each task model. After a task is executed, the server may determine a corresponding subtask according to the tree structure of the task model, and then execute the subtask until all tasks are executed. When the scheme of the application is actually implemented, the system background can provide a plurality of task executors, and the task executors are responsible for identifying the content of the task model and executing the task according to the execution model of the task.
Specifically, the server may further determine a task queue according to a tree structure of each task model, where the task queue may include an execution order and an execution state of the task model. For each task model, the server can execute the tasks in the task model according to the execution sequence in the task queue and update the execution state of the task model, wherein the execution state of the task model can include enqueued, waiting, executing successfully executing, and executing unsuccessfully.
For example, after the task queue is determined, the execution states of all task models are enqueued, and then the server may execute the tasks in the first task model according to the execution sequence, at this time, the server may update the execution state of the first task model to be in execution, and update the execution state of the second to-be-executed task model to be in wait; after the task execution of the first task model is finished, the server may update the execution state of the first task model to be successful in execution, update the execution state of the second task model to be in execution, update the execution state of the third to-be-executed task model to be in waiting, and then sequentially complete the execution of the tasks in all the task models in the task queue.
When the server determines the execution state of each task, the execution state of each task may be determined according to the execution state of each task model in the task queue. For example, when the execution state of the task model is enqueued, waiting, or executing, the execution state of the corresponding task may be determined to be not executed; when the execution state of the task model is successful, determining the execution state of the corresponding task as successful execution; when the execution state of the task model is an execution failure, the execution state of the corresponding task may be determined as an execution failure.
Specifically, for the execution instruction, it is indicated that the execution of the execution instruction is successful only when all tasks corresponding to the execution instruction are successfully executed, and if any task fails to be executed, it is indicated that the execution of the execution instruction fails, and at this time, the system background needs to rollback all executed tasks to recover the state before the execution of the execution instruction. In order to improve the execution success rate of the execution instruction, the scheme of the application further comprises a retry mechanism, namely when the current task fails to be executed, the server can execute the task again, and if the task fails to be executed again, all executed tasks are rolled back.
In the application, the execution state of the detailed task model can be recorded through the task queue, and then the execution state of the task is determined according to the execution state of the task model, so that in the actual application, a maintainer at a system background can know the detailed progress of each task, and a user can also know the overall progress of the execution instruction.
And S130, notifying the execution progress of the execution command to the client according to the execution state of each task.
The server can determine the execution progress of the execution instruction according to the execution state of each task and send the execution progress to the client. The server may preset a determination period of the execution progress, and then determine and send the execution progress every other period, so that the client displays the execution progress. After the client receives the execution progress, the content of the execution progress can be displayed in the webpage application, so that the user can know that the webpage application processes the operation of the user.
Specifically, when the execution states of the tasks are all successfully executed, the server may determine that the execution progress includes indication information that the execution of the execution instruction is successful; when the execution state of at least one task is not completely executed, the server can determine that the execution progress comprises proportion information of the number of successfully executed tasks to the total number of tasks; when there is an execution status of at least one task as an execution failure, the server may determine that the execution progress includes indication information of the execution failure of the execution instruction.
In the embodiment of the application, the server may determine a plurality of tasks to be executed according to the execution instruction, then execute each task, determine the execution state of each task, and finally notify the execution progress of the execution instruction to the client according to the execution state of each task, where the execution instruction is triggered by the user in the web application of the client. According to the method and the device, the server can determine the execution progress of the execution instruction according to the execution state of each task, and inform the client of the execution progress, so that the client can feed back the processing state in time, and the use experience of a user is improved.
Based on the same inventive concept, as an implementation of the foregoing method, an embodiment of the present application provides a task scheduling apparatus, where the apparatus embodiment corresponds to the foregoing method embodiment, and for convenience of reading, details in the foregoing method embodiment are not repeated in this apparatus embodiment one by one, but it should be clear that the apparatus in this embodiment can correspondingly implement all the contents in the foregoing method embodiment.
Fig. 3 is a schematic structural diagram of a task scheduling device according to an embodiment of the present application, and as shown in fig. 3, the device according to the embodiment includes:
the execution module 110 is configured to determine multiple tasks to be executed according to an execution instruction, where the execution instruction is triggered by a user in a web application of a client, execute the tasks, and determine an execution state of each task;
and a notification module 120, configured to notify the client of the execution progress of the execution instruction according to the execution state of each task.
Optionally, the execution module 110 is specifically configured to:
for each task, a task model corresponding to the task is constructed according to the execution relation between the task and other tasks, the task model comprises the task and a tree structure of the task, and the tree structure comprises a parent-child relation and a brother relation of the task;
and sequentially executing the tasks in each task model according to the tree structure of each task model.
Optionally, the execution module 110 is specifically configured to:
determining a task queue according to the tree structure of each task model, wherein the task queue comprises an execution sequence and an execution state of the task model;
for each task model, executing the tasks in the task model according to the execution sequence, and updating the execution state of the task model;
correspondingly, the execution module 110 is specifically configured to:
and determining the execution state of each task according to the execution state of each task model in the task queue.
Optionally, the notification module 120 is specifically configured to:
determining an execution progress according to the execution state of each task;
and sending the execution progress to the client so that the client can show the execution progress.
Optionally, the execution module 110 is further configured to:
in case of a task execution failure, all executed tasks are rolled back.
Optionally, the execution module 110 is specifically configured to:
if the task fails to be executed, the task is executed again;
and if the task fails to execute again, rolling back all executed tasks.
Optionally, the execution state includes incomplete execution, successful execution, or failed execution;
when the execution states of all the tasks are successfully executed, the execution progress comprises indication information of successful execution of the execution instruction;
when the execution state of at least one task is not completely executed, the execution progress comprises proportion information of the number of the tasks which are successfully executed to the total number of the tasks;
when the execution state of at least one task is execution failure, the execution progress comprises indication information of execution failure of the execution instruction.
The task scheduling device provided in this embodiment may perform the above method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Based on the same inventive concept, the embodiment of the application also provides the electronic equipment. Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application, and as shown in fig. 4, the electronic device according to the embodiment includes: a memory 21 and a processor 20, the memory 21 being for storing a computer program; the processor 20 is arranged to perform the method according to the above-described method embodiment when the computer program 22 is invoked.
The electronic device provided by this embodiment may perform the above method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
Embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the method described in the above method embodiments.
The integrated unit may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable storage medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal apparatus, a recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signal, telecommunication signal, and software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. 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 application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/device and method may be implemented in other ways. For example, the above-described apparatus/device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be 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 be in an electrical, mechanical or other form.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A task scheduling method is applied to a server and comprises the following steps:
determining a plurality of tasks to be executed according to an execution instruction, wherein the execution instruction is triggered by a user in a webpage application of a client;
executing the tasks and determining the execution state of each task;
and notifying the execution progress of the execution instruction to the client according to the execution state of each task.
2. The method of claim 1, wherein the performing the task comprises:
for each task, according to an execution relation between the task and other tasks, a task model corresponding to the task is constructed, wherein the task model comprises the task and a tree structure of the task, and the tree structure comprises a parent-child relation and a brother relation of the task;
and sequentially executing the tasks in each task model according to the tree structure of each task model.
3. The method according to claim 2, wherein the sequentially executing the tasks in each task model according to the tree structure of each task model comprises:
determining a task queue according to the tree structure of each task model, wherein the task queue comprises the execution sequence and the execution state of the task model;
for each task model, executing the tasks in the task model according to the execution sequence, and updating the execution state of the task model;
correspondingly, the determining the execution state of each task includes:
and determining the execution state of each task according to the execution state of each task model in the task queue.
4. The method according to claim 1, wherein the notifying the client of the execution progress of the execution instruction according to the execution state of each task includes:
determining the execution progress according to the execution state of each task;
and sending the execution progress to the client so that the client can display the execution progress.
5. The method of claim 1, wherein after the performing the task, the method further comprises:
and rolling back all executed tasks in the case of the task execution failure.
6. The method of claim 5, wherein rolling back all executed tasks if the task fails to execute comprises:
if the task fails to be executed, the task is executed again;
and if the task fails to be executed again, rolling back all executed tasks.
7. The method of any of claims 1-6, wherein the execution status comprises incomplete execution, successful execution, or failed execution;
when the execution states of all tasks are successfully executed, the execution progress comprises indication information of successful execution of the execution instruction;
when the execution state of at least one task is not completely executed, the execution progress comprises proportion information of the number of the tasks which are successfully executed to the total number of the tasks;
when the execution state of at least one task is execution failure, the execution progress comprises indication information of the execution failure of the execution instruction.
8. A task scheduling device, applied to a server, includes:
the execution module is used for determining a plurality of tasks to be executed according to an execution instruction, wherein the execution instruction is triggered by a user in a webpage application of a client, executing the tasks and determining the execution state of each task;
and the notification module is used for notifying the execution progress of the execution instruction to the client according to the execution state of each task.
9. An electronic device, comprising: a memory for storing a computer program and a processor; the processor is adapted to perform the method of any of claims 1-7 when the computer program is invoked.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202010977315.7A 2020-09-16 2020-09-16 Task scheduling method and device and electronic equipment Active CN112948068B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010977315.7A CN112948068B (en) 2020-09-16 2020-09-16 Task scheduling method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010977315.7A CN112948068B (en) 2020-09-16 2020-09-16 Task scheduling method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN112948068A true CN112948068A (en) 2021-06-11
CN112948068B CN112948068B (en) 2024-03-12

Family

ID=76234579

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010977315.7A Active CN112948068B (en) 2020-09-16 2020-09-16 Task scheduling method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112948068B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114697334A (en) * 2022-03-29 2022-07-01 中国工商银行股份有限公司 Execution method and device for scheduling tasks
CN114816948A (en) * 2022-06-27 2022-07-29 统信软件技术有限公司 Method and device for checking task progress of working area and recording method and device

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100223324A1 (en) * 2009-03-02 2010-09-02 Hitachi, Ltd. Application executing method, application changing apparatus, and application changing program
CN103677973A (en) * 2013-09-01 2014-03-26 西安重装渭南光电科技有限公司 Distributed multi-task scheduling management system
CN104243438A (en) * 2013-06-24 2014-12-24 阿里巴巴集团控股有限公司 Database transaction processing method and server
US20150293764A1 (en) * 2014-04-10 2015-10-15 Omprakash VISVANATHAN Method and system to compose and execute business rules
CN109523187A (en) * 2018-11-27 2019-03-26 北京字节跳动网络技术有限公司 Method for scheduling task, device and equipment
CN109788043A (en) * 2018-12-28 2019-05-21 亚信科技(中国)有限公司 Task processing method, device, computer equipment and storage medium
CN110362394A (en) * 2019-07-22 2019-10-22 北京明略软件系统有限公司 Task processing method and device, storage medium, electronic device
CN110427252A (en) * 2019-06-18 2019-11-08 平安银行股份有限公司 Method for scheduling task, device and the storage medium of task based access control dependence
CN110858158A (en) * 2018-08-23 2020-03-03 北京京东金融科技控股有限公司 Distributed task scheduling method and device, electronic equipment and storage medium
CN111010313A (en) * 2019-12-05 2020-04-14 深圳联想懂的通信有限公司 Batch processing state monitoring method, server and storage medium
CN111290854A (en) * 2020-01-20 2020-06-16 腾讯科技(深圳)有限公司 Task management method, device and system, computer storage medium and electronic equipment
CN111400179A (en) * 2020-03-13 2020-07-10 苏宁云计算有限公司 Method and device for terminal application program interaction, computer equipment and storage medium
US10747576B1 (en) * 2020-02-13 2020-08-18 Capital One Services, Llc Computer-based systems configured for persistent state management and configurable execution flow and methods of use thereof

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100223324A1 (en) * 2009-03-02 2010-09-02 Hitachi, Ltd. Application executing method, application changing apparatus, and application changing program
CN104243438A (en) * 2013-06-24 2014-12-24 阿里巴巴集团控股有限公司 Database transaction processing method and server
CN103677973A (en) * 2013-09-01 2014-03-26 西安重装渭南光电科技有限公司 Distributed multi-task scheduling management system
US20150293764A1 (en) * 2014-04-10 2015-10-15 Omprakash VISVANATHAN Method and system to compose and execute business rules
CN110858158A (en) * 2018-08-23 2020-03-03 北京京东金融科技控股有限公司 Distributed task scheduling method and device, electronic equipment and storage medium
CN109523187A (en) * 2018-11-27 2019-03-26 北京字节跳动网络技术有限公司 Method for scheduling task, device and equipment
CN109788043A (en) * 2018-12-28 2019-05-21 亚信科技(中国)有限公司 Task processing method, device, computer equipment and storage medium
CN110427252A (en) * 2019-06-18 2019-11-08 平安银行股份有限公司 Method for scheduling task, device and the storage medium of task based access control dependence
CN110362394A (en) * 2019-07-22 2019-10-22 北京明略软件系统有限公司 Task processing method and device, storage medium, electronic device
CN111010313A (en) * 2019-12-05 2020-04-14 深圳联想懂的通信有限公司 Batch processing state monitoring method, server and storage medium
CN111290854A (en) * 2020-01-20 2020-06-16 腾讯科技(深圳)有限公司 Task management method, device and system, computer storage medium and electronic equipment
US10747576B1 (en) * 2020-02-13 2020-08-18 Capital One Services, Llc Computer-based systems configured for persistent state management and configurable execution flow and methods of use thereof
CN111400179A (en) * 2020-03-13 2020-07-10 苏宁云计算有限公司 Method and device for terminal application program interaction, computer equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
GIL JOON MIN 等: "A Log Analysis System with REST Web Services for Desktop Grids and its Application to Resource Group-based Task Scheduling", 《 JOURNAL OF INFORMATION PROCESSING SYSTEMS》 *
冯涛 等: "在Web应用中实现计划任务调度", 《河北工程技术高等专科学校学报》 *
潘娅 等: "Web-Server集群结构与多任务实时调度的应用研究", 《计算机测量与控制》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114697334A (en) * 2022-03-29 2022-07-01 中国工商银行股份有限公司 Execution method and device for scheduling tasks
CN114697334B (en) * 2022-03-29 2023-11-03 中国工商银行股份有限公司 Method and device for executing scheduling task
CN114816948A (en) * 2022-06-27 2022-07-29 统信软件技术有限公司 Method and device for checking task progress of working area and recording method and device

Also Published As

Publication number Publication date
CN112948068B (en) 2024-03-12

Similar Documents

Publication Publication Date Title
US5790779A (en) Method and system for consolidating related error reports in a computer system
US8209669B2 (en) System and method for supporting software
KR101730513B1 (en) Managing task execution
CN111666189B (en) Method and system for declaratively visually configuring Prometheus monitoring alarm
US20090260011A1 (en) Command line transactions
CN106649084A (en) Function call information obtaining method and apparatus, and test device
CN112948068B (en) Task scheduling method and device and electronic equipment
CN108595316A (en) Life cycle management method, manager, equipment and the medium of Distributed Application
CN109840830A (en) A kind of information feedback method and terminal based on order
CN113706022A (en) Business process execution method and device, storage medium and electronic equipment
CN112702255A (en) Instant messaging message processing method and device and electronic equipment
CN113900650A (en) Data processing method and device, electronic equipment and readable storage medium
US20220214872A1 (en) Dynamic review of software updates after pull requests
CN112825525B (en) Method and apparatus for processing transactions
EP4273670A1 (en) Interaction method and apparatus, and storage medium
CN111367564B (en) Program iteration wire management system for operation and maintenance platform
US20220179649A1 (en) Configuration properties management for software
US20220027135A1 (en) Model driven user interface
CN113835835A (en) Method and device for creating consistency group and computer-readable storage medium
CN113051355B (en) Document generation method and device, computer equipment and storage medium
CN112836907B (en) Processing method, device and system for incompatible job information
US12026509B2 (en) Dynamic review of software updates after pull requests
US10691521B2 (en) Using telemetry to drive high impact accessibility issues
CN115543659A (en) Git-based jenkins notification method and system
CN116166162A (en) Visual operation method and device of database and computer readable medium

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
GR01 Patent grant
GR01 Patent grant