Application service process scheduling method, system and device and storage medium
By splitting complex business processes into parallel and serial stages, prioritizing the parallel stage and processing the serial stage in sequence, the problems of low efficiency and poor flexibility of business process processing in mobile applications are solved, and more efficient and flexible business process processing is achieved.
Patent Information
- Application Number
- CN202411602086.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-03-07
AI Technical Summary
Complex business processes are inefficient in processing and lack flexibility in mobile applications, and complex code development and maintenance affecting the maintenance and expansion of business processing logic.
By splitting business processes into parallel stages and serial stages, priority is given to the parallel stages, and serial stages are executed in the order of task queues, simplifying the processing of complex business processes.
It improves the efficiency and flexibility of business process processing, improves the response speed and user experience of business services.
Smart Images

Figure CN119576490A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular, to an application business process scheduling method, system, device and storage medium. Background Art
[0002] At present, in the operation scenarios of mobile applications, it is often necessary to handle various types of complex business processes. Taking the sending of video messages as an example, it is necessary to go through the steps of preprocessing, inserting into the database, preparing to send, sending, and updating. Each major step contains several smaller steps. The execution and end of each step node are nested layer by layer. The step node needs to trigger a callback after the asynchronous processing is completed, and then execute the next step node, so as to realize the processing of complex business processes.
[0003] However, for complex business processes, the asynchronous processing and callback process of step nodes are relatively complicated and cumbersome, the business process processing lacks flexibility, and the processing efficiency is relatively low. In addition, the nested step nodes and callback methods also make the code development and maintenance process extremely complicated, affecting the maintenance and expansion of business processing logic. Summary of the invention
[0004] The embodiments of the present application provide an application business process scheduling method, system, device and storage medium, which can improve the processing efficiency and flexibility of complex business processes and solve the cumbersome and complex technical problems in the business process processing process.
[0005] In a first aspect, an embodiment of the present application provides an application business process scheduling method, including:
[0006] Write the current business process sequence into the task queue, and determine the parallel task nodes and serial task nodes of the current business process. Any parallel task node is processed in parallel with other parallel task nodes of the current business process and / or parallel task nodes of other business processes. The serial task nodes are processed in the serial order of the current business process.
[0007] Process the parallel task nodes of the current business process. After the parallel task nodes of the current business process are processed, detect the queue order of the current business process in the task queue;
[0008] When the queue is ranked first in the task queue, the serial task nodes of the current business process are processed, and the current business process is ended after the serial task nodes of the current business process are processed.
[0009] In a second aspect, an embodiment of the present application provides an application business process scheduling system, including:
[0010] A writing module is configured to write the current business process sequence into the task queue, and determine the parallel task nodes and serial task nodes of the current business process, any parallel task node is processed in parallel with other parallel task nodes of the current business process and / or parallel task nodes of other business processes, and the serial task nodes are processed in the serial order of the current business process;
[0011] A parallel processing module is configured to process the parallel task nodes of the current business process, and after the parallel task nodes of the current business process are processed, detect the queue order of the current business process in the task queue;
[0012] The serial processing module is configured to process the serial task nodes of the current business process when the queue is ranked first in the task queue, and end the current business process after the serial task nodes of the current business process are processed.
[0013] In a third aspect, an embodiment of the present application provides an application business process scheduling device, including:
[0014] memory and one or more processors;
[0015] The memory is configured to store one or more programs;
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the application business process scheduling method as described in the first aspect.
[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions, when executed by a computer processor, are configured to execute the application business process scheduling method as described in the first aspect.
[0018] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes instructions. When the instructions are executed on a computer or a processor, the computer or the processor executes the application business process scheduling method as described in the first aspect.
[0019] The embodiment of the present application writes the current business process into the task queue in order, and determines the parallel task nodes and serial task nodes of the current business process. Any parallel task node is processed in parallel with other parallel task nodes of the current business process and / or parallel task nodes of other business processes, and the serial task node is processed in the serial order of the current business process; the parallel task nodes of the current business process are processed, and after the parallel task nodes of the current business process are processed, the queue sorting of the current business process in the task queue is detected; when the queue sorting is the first in the task queue, the serial task nodes of the current business process are processed, and the current business process is terminated after the serial task nodes of the current business process are processed. The above-mentioned technical means are adopted, by splitting the business process into parallel stages and serial stages, the parallel stages of all business processes are executed first, and the serial stages of the business processes are executed one by one in the order of the task queue, so as to simplify the processing process of complex business processes and improve the efficiency and flexibility of business process processing. Then the response speed of business services is improved, and the user's application service experience is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a flow chart of an application business process scheduling method provided by an embodiment of the present application;
[0021] Figure 2 This is a task node diagram of the business process in the embodiment of the present application;
[0022] Figure 3 It is a processing flow chart of the business process in the embodiment of the present application;
[0023] Figure 4 is an error handling flowchart of the business process in an embodiment of the present application;
[0024] Figure 5 It is a structural diagram of an application business process scheduling system provided by an embodiment of the present application;
[0025] Figure 6 It is a structural diagram of an application business process scheduling device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
[0027] The application business process scheduling method provided in this application aims to simplify the processing of complex business processes by splitting the business process into parallel stages and serial stages, giving priority to executing the parallel stages of all business processes, and executing the serial stages one by one in the order of task queues.
[0028] In the relevant mobile application scenario, a business process contains multiple large steps, and each large step contains several smaller steps. The execution and end of each step node are nested layer by layer. The step node needs to trigger a callback after asynchronous processing is completed, and then execute the next step node, so as to realize the processing of complex business processes. Since the execution and end of each step node are nested layer by layer, it is extremely complicated in terms of code reading and maintenance of subsequent business functions. And each node may fail to execute, and it is impossible to track whether the node is successfully processed or failed in a unified place. Moreover, this nested method causes the process processing to be unable to be canceled once it starts. The business processes are completely serial or completely parallel between business processes, and it is impossible to flexibly schedule the partial processing nodes of each process to be processed in parallel with the nodes of other processes, resulting in a lack of flexibility in business process processing and relatively low processing efficiency. Based on this, a method for scheduling an application business process in an embodiment of the present application is provided to solve the cumbersome and complex technical problems of the business process processing process.
[0029] Example:
[0030] Figure 1A flowchart of an application business process scheduling method provided in an embodiment of the present application is given. The application business process scheduling method provided in this embodiment can be executed by an application business process scheduling device, which can be implemented by software and / or hardware. The application business process scheduling device can be composed of two or more physical entities, or can be composed of one physical entity. Generally speaking, the application business process scheduling device can be a mobile terminal device such as a computer, a mobile phone, and a tablet.
[0031] The following description is made by taking the application business process scheduling device as an example of the subject of executing the application business process scheduling method. Figure 1 , the application business process scheduling method specifically includes:
[0032] S110. Write the current business process sequence into the task queue, and determine the parallel task nodes and serial task nodes of the current business process. Any parallel task node is processed in parallel with other parallel task nodes of the current business process and / or parallel task nodes of other business processes, and the serial task nodes are processed in the serial order of the current business process.
[0033] This application builds a task queue, writes the application's business process into the task queue, and then manages each business process through the task queue. When the system starts or when a specific business logic is triggered, a task queue is first built. The task queue is used to store business process tasks to be executed. The task queue can be for a type of business process (such as video message sending) or for different types of business processes (such as video message sending, audio message sending, etc.). By building corresponding task queues for different types of business processes, it is easy to manage the corresponding types of business processes and achieve efficient processing of business processes.
[0034] Furthermore, when each business process is triggered, it will be written into the task queue. Take the sending of a video message as an example. Figure 2As shown, its business process includes multiple task nodes such as verifying file size, obtaining sliced images, obtaining graffiti images, inserting messages into database, exporting video files, uploading encrypted files, uploading encrypted covers, uploading encrypted graffiti files, building data structures to be encrypted, encrypting, sending and updating status. Among the above-mentioned task nodes, except for the "Send" and "Status Update" nodes, the remaining nodes can be executed in parallel with the corresponding task nodes of other video message sending tasks, so this application defines these task nodes as parallel task nodes in advance. In addition, for task nodes that can be executed in parallel within the same business process, such as "Get Cover Image" and "Get Graffiti Image", these task nodes are also defined as parallel task nodes. The remaining task nodes are defined as serial task nodes and need to be executed strictly in the order of their task nodes. For example, the task node "Status Update" can only be executed after the task node "Send" is executed.
[0035] In addition, for different business processes, the processing of their serial nodes needs to be executed sequentially according to the queue order in the task queue. Assuming that the current user sends multiple pictures, the parallel task nodes of each picture sending business process can be processed in parallel, and the serial nodes are executed sequentially according to the order in which each picture sending task is placed in the task queue. In this way, the processing efficiency of multiple complex business processes can be improved and the task processing time can be shortened. At the same time, it also ensures that the order of sending pictures is consistent with the user's sending operation.
[0036] Optionally, determining the parallel task nodes and serial task nodes of the current business process includes:
[0037] Query the pre-configured scheduling relationship information of the task queue, determine the parallel task nodes of the current business process based on the scheduling relationship information, determine that other task nodes of the current business process are serial task nodes, the scheduling relationship information pre-identifies the node type of the parallel task node, and identifies the parallel task nodes and the execution order of each business process of the task queue based on the scheduling operator.
[0038] It is understandable that a parallel task node can share processing resources or processing time with other parallel task nodes of the current business process or parallel task nodes of other business processes, so they can be scheduled for execution at the same time. The serial task node must wait for its predecessor task node of the current business process to complete before it can start execution, and each business process is processed strictly in the queue order of the task queue. Therefore, this application constructs corresponding scheduling relationship information by pre-demarcating parallel task nodes and serial task nodes. The scheduling relationship information is expressed as:
[0039] IMSendingTask=(Task0|||Task1|||…|||Task_n)>>>TaskA>>>TaskB
[0040] Among them, IMSendingTask represents a business process, and Task 0 to Task n are triggered and executed in parallel. When Task 0 to Task n are all executed, Task A will be executed. After Task A is completed, Task B will be executed. After Task B is completed, the IMSendingTask process will be completed. Task is a basic task node of a business process, which is used to encapsulate the execution logic. It describes both the entire business process (such as IMSendingTask) and each small task node in the business process (i.e. Task 0 to Task n, Task A, Task B). By constructing corresponding scheduling relationship information for each type of business process, parallel task nodes and serial task nodes can be configured according to the scheduling relationship information to achieve efficient processing of business processes.
[0041] It should be noted that for different business processes, the configuration method of their task nodes is different. According to actual needs and system processing resource configuration, the task nodes can be adaptively selected and configured as parallel task nodes. This application does not impose fixed restrictions on the selection and configuration of parallel task nodes and serial task nodes, and will not be elaborated here.
[0042] S120 , processing the parallel task nodes of the current business process, and after the processing of the parallel task nodes of the current business process is completed, detecting the queue order of the current business process in the task queue.
[0043] Further, for a business process, refer to Figure 3 When it is submitted to the task queue, its parallel task nodes are first screened. Since these task nodes can share the processing resources or processing time of other related task nodes in the system, these task nodes are processed first. By processing the corresponding task nodes in parallel, the task processing efficiency is improved.
[0044] It should be noted that during the processing of parallel task processing nodes, if multiple parallel task processing nodes of the current business process have a serial processing relationship, then when processing these parallel task processing nodes, they can be executed in the order of the serial processing relationship. For example, if the parallel task processing nodes A1, A2, and A3 of business process A correspond to the parallel task processing nodes B1, B2, and B3 of business process B, A1 and B1 can share processing resources, A2 and B2 can share processing resources, and A3 and B3 can share processing resources. However, A1, A2, A3 and B1, B2, and B3 all need to be executed in a serial processing order. Then, when processing A1, A2, and A3 in parallel, each task node can be processed in a serial processing order.
[0045] After completing the task processing in the above parallel stage, the queue sorting position of the current business process in the task queue will be checked. If the business process is found to be the first in the queue, the serial task node processing of the business process will be triggered at this time. The task queue processes the serial nodes of each business process in the queue order to ensure that the task processing order is consistent with the order of writing to the queue.
[0046] S130 . When the queue is ranked first in the task queue, the serial task nodes of the current business process are processed, and the current business process is terminated after the serial task nodes of the current business process are processed.
[0047] When the queue of the current business process is ranked first in the task queue, that is, there are no other serial node tasks being processed in the current task queue, the task queue updates the current business process as the current task, triggering the execution of each serial task node of the current business process. After the serial task node is processed, the current business process is processed, and the current business process is deleted from the task queue, ending the current business process.
[0048] In the serial processing stage, the task queue processes the serial task nodes of each business process in sequence according to the queue order. In this way, by managing the execution of parallel and serial task nodes, the efficient scheduling and execution of multiple tasks is ensured.
[0049] Optionally, for a business process, the Task class contains a context attribute of type Context (the context throughout the execution of the Task task, used to temporarily store the input and output of each Task). This means that each Task instance has a Context instance associated with it. In UML diagrams, this relationship represents a strong composition relationship. The Task class can be a generic type whose type parameter Context is a subclass of Context. The Task class can also contain other Task instances as subtasks. Context is mainly responsible for handling cancellation logic and context management. It contains methods such as cancellation state, subcontext management, and cancellation checking. The Task class focuses on the execution logic of the task, including state management, callback handling, and task construction. Context (the type parameter of Task) is a subclass of Context. This means that Task can use all the functions of Context, and can also be extended with additional context-specific functions. Context is responsible for managing cancellation state and subcontexts, which can be used to manage the life cycle of complex task trees. Task uses these functions to coordinate the execution, cancellation, and state changes of tasks.
[0050] The business process Task and the corresponding Context design allow flexible task management and execution while maintaining separation of concerns. Context handles the underlying context and cancellation logic, while Task focuses on the execution and state management of specific tasks, making the system easier to expand and maintain.
[0051] Based on the above embodiment, the application business process scheduling method further includes:
[0052] Receive a cancellation request for the current business process, call the context instance of the current business process, recursively check the sub-context information of each task node of the current business process based on the context instance, and end the current business process if it is determined that the current business process can be canceled based on each sub-context information.
[0053] During the execution of a business process, if the user triggers or the system triggers the cancellation request of the current business process (cancellation caused by task conflict or exception, etc.), the cancellation request is initialized. Then, according to the type and other attributes of the current task, check whether the task is cancelable. By recursively checking the cancelability of the subcontext of all task nodes, if it is determined that the task is cancelable, the actual cancellation operation of the business process is executed. Otherwise, the task process continues to be executed.
[0054] End the current business process, including:
[0055] It is detected that the current business process is in the execution state, the current business process is interrupted, and the resources of the current business process are deleted from the task queue;
[0056] It is detected that the current business process is in a waiting state, the current business process is prohibited from starting, and the resources of the current business process are deleted from the task queue.
[0057] Specifically, when the current business process ends, by determining the execution status of the current business process, the running tasks and the tasks that have not yet started are processed according to whether the current business process is in the execution state or the waiting state. If the business process is being executed, the current business process is interrupted; if the business process is in the waiting state, the current business process is prohibited from starting. If the above operation is successful, the resources of the current business process are deleted from the task queue, and the cancellation operation of the current business process is completed. If the above process fails or the task node cannot be cancelled, the business process continues to be executed. The cancellation operation of the business process is performed only when the task node of the business process can be cancelled and the cancellation process is successful.
[0058] Optionally, after writing the current business process sequence into the task queue, it also includes:
[0059] Based on the context instance, the execution process of each task node of the current business process is monitored, the sub-context information of each task node of the current business process is updated in real time, and the business status of the current business process is updated based on the sub-context information.
[0060] The business status of this application includes:
[0061] a. Pending: the task has not started yet and is waiting to be triggered for execution;
[0062] b.Concurrency, the task is executing its own parallel part;
[0063] c.readySequence, the task has completed the parallel part of the execution and is ready to execute the serial part at any time
[0064] d.Sequence, the task is executing the serial part;
[0065] e.finish, the task has been completed. This is an enumeration type (Enum) that can return three states, including: a.Completed, indicating that the task is completed normally; b.failed (Error), indicating that the task fails to execute and will bring the cause of the failure (Error); c.canceled, indicating that the task is canceled.
[0066] Based on the business status set above, by detecting the sub-context information of each task node, it is determined whether the input and output status of each task node is correct, and then the corresponding business status can be determined according to the completion status of each task node.
[0067] Optionally, the application business process scheduling method further includes:
[0068] When an error is detected in the process of processing the parallel task node of the current business process, the parallel task node is processed based on the exception capture processor configured on the parallel task node;
[0069] When an error is detected in the serial task node processing the current business process, the exception capture processor configured based on the serial task node processes the parallel task node and the serial task node.
[0070] Reference Figure 4, when the task starts executing and enters the concurrent phase. Check whether the concurrent task node has processed an error. If the concurrent phase is completed successfully, the task enters the Ready for Sequence state and is ready to execute the serial phase. If an error occurs in the concurrent phase, check whether there is a catch (exception capture) processor. If there is a catch processor, execute the concurrent phase of the catch task. If there is no catch processor, the task ends in an error state. If the concurrent phase of the catch task succeeds, enter the Ready for Sequence state. If it fails, the task ends in an error state.
[0071] After that, when the business process enters the serial phase, if the serial phase is successfully completed, the task ends successfully. If there is an error in the sequence phase, check again whether there is a catch processor. If there is a catch processor, execute the complete process of the catch task (concurrent and sequential). If there is no catch processor, the task ends with an error status. If the complete process of the catch task succeeds, the task ends successfully. If it fails, the task ends with an error status.
[0072] This allows the business process to handle errors at two key points, namely after the concurrent phase and in the sequence phase. It provides a flexible error handling mechanism and allows alternative tasks to be executed when errors occur, thereby increasing the chances of successful task completion. By selectively capturing errors thrown during process execution, it is decided whether to interrupt the process or enter the fallback process based on the specific error type, thereby enhancing the robustness of the business.
[0073] In the above, by writing the current business process into the task queue in sequence and determining the parallel task nodes and serial task nodes of the current business process, any parallel task node is processed in parallel with other parallel task nodes of the current business process and / or parallel task nodes of other business processes, and the serial task node is processed in the serial order of the current business process; the parallel task nodes of the current business process are processed, and after the parallel task nodes of the current business process are processed, the queue order of the current business process in the task queue is detected; when the queue order is the first in the task queue, the serial task nodes of the current business process are processed, and the current business process is terminated after the serial task nodes of the current business process are processed. By adopting the above technical means, by splitting the business process into parallel stages and serial stages, the parallel stages of all business processes are executed first, and the serial stages of the business processes are executed one by one in the order of the task queue, the processing process of complex business processes can be simplified, and the efficiency and flexibility of business process processing can be improved. In turn, the response speed of business services can be improved, and the user's application service experience can be improved.
[0074] Based on the above embodiments, Figure 5A schematic diagram of the structure of an application business process scheduling system provided by this application. Figure 5 The application business process scheduling system provided in this embodiment specifically includes: a writing module 21, a parallel processing module 22 and a serial processing module 23.
[0075] Wherein, the writing module 21 is configured to write the current business process sequence into the task queue, and determine the parallel task nodes and serial task nodes of the current business process, any parallel task node is processed in parallel with other parallel task nodes of the current business process and / or parallel task nodes of other business processes, and the serial task nodes are processed in the serial order of the current business process;
[0076] The parallel processing module 22 is configured to process the parallel task nodes of the current business process, and after the parallel task nodes of the current business process are processed, detect the queue order of the current business process in the task queue;
[0077] The serial processing module 23 is configured to process the serial task nodes of the current business process when the queue is ranked first in the task queue, and end the current business process after the serial task nodes of the current business process are processed.
[0078] Specifically, the parallel task nodes and serial task nodes of the current business process are determined, including:
[0079] Query the pre-configured scheduling relationship information of the task queue, determine the parallel task nodes of the current business process based on the scheduling relationship information, determine that other task nodes of the current business process are serial task nodes, the scheduling relationship information pre-identifies the node type of the parallel task node, and identifies the parallel task nodes and the execution order of each business process of the task queue based on the scheduling operator.
[0080] Specifically, the method further includes:
[0081] Receive a cancellation request for the current business process, call the context instance of the current business process, recursively check the sub-context information of each task node of the current business process based on the context instance, and end the current business process if it is determined that the current business process can be canceled based on each sub-context information.
[0082] Specifically, ending the current business process includes:
[0083] It is detected that the current business process is in the execution state, the current business process is interrupted, and the resources of the current business process are deleted from the task queue;
[0084] It is detected that the current business process is in a waiting state, the current business process is prohibited from starting, and the resources of the current business process are deleted from the task queue.
[0085] Specifically, after the current business process is sequentially written into the task queue, it also includes:
[0086] Based on the context instance, the execution process of each task node of the current business process is monitored, the sub-context information of each task node of the current business process is updated in real time, and the business status of the current business process is updated based on the sub-context information.
[0087] Specifically, the method further includes:
[0088] When an error is detected in the process of processing the parallel task node of the current business process, the parallel task node is processed based on the exception capture processor configured on the parallel task node;
[0089] When an error is detected in the serial task node processing the current business process, the exception capture processor configured based on the serial task node processes the parallel task node and the serial task node.
[0090] In the above, by writing the current business process into the task queue in sequence and determining the parallel task nodes and serial task nodes of the current business process, any parallel task node is processed in parallel with other parallel task nodes of the current business process and / or parallel task nodes of other business processes, and the serial task node is processed in the serial order of the current business process; the parallel task nodes of the current business process are processed, and after the parallel task nodes of the current business process are processed, the queue order of the current business process in the task queue is detected; when the queue order is the first in the task queue, the serial task nodes of the current business process are processed, and the current business process is terminated after the serial task nodes of the current business process are processed. By adopting the above technical means, by splitting the business process into parallel stages and serial stages, the parallel stages of all business processes are executed first, and the serial stages of the business processes are executed one by one in the order of the task queue, the processing process of complex business processes can be simplified, and the efficiency and flexibility of business process processing can be improved. In turn, the response speed of business services can be improved, and the user's application service experience can be improved.
[0091] The application business process scheduling system provided in the embodiment of the present application can be configured to execute the application business process scheduling method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0092] Based on the above practical example, the embodiment of the present application also provides an application business process scheduling device, with reference to FIG. ..., the application business process scheduling device includes: a processor, a memory, a communication module, an input device and an output device. The memory, as a computer-readable storage medium, can be configured to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the application business process scheduling method described in any embodiment of the present application (for example, a write module, a parallel processing module and a serial processing module in the application business process scheduling system). The communication module is configured to perform data transmission. The processor executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory, that is, realizing the above-mentioned application business process scheduling method. The input device can be configured to receive input digital or character information, and generate key signal input related to the user settings and function control of the device. The output device may include a display device such as a display screen. The above-mentioned application business process scheduling device can be configured to execute the application business process scheduling method provided in the above-mentioned embodiment, and has corresponding functions and beneficial effects.
[0093] On the basis of the above embodiments, the embodiments of the present application further provide a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, wherein the computer-executable instructions are configured to execute an application business process scheduling method when executed by a computer processor, and the storage medium may be any of various types of memory devices or storage devices. Of course, the computer-executable instructions of the computer-readable storage medium provided in the embodiments of the present application are not limited to the application business process scheduling method described above, and may also execute related operations in the application business process scheduling method provided in any embodiment of the present application.
[0094] On the basis of the above embodiments, the embodiments of the present application also provide a computer program product. The essence of the technical solution of the present application or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer program product is stored in a storage medium, including a number of instructions for enabling a computer device, a mobile terminal or a processor therein to execute all or part of the steps of the application business process scheduling method described in each embodiment of the present application.
Claims
1. A method for scheduling an application business process, characterized in that: include: Write the current business process sequence into the task queue, and determine the parallel task nodes and serial task nodes of the current business process, any of the parallel task nodes is processed in parallel with other parallel task nodes of the current business process and / or parallel task nodes of other business processes, and the serial task nodes are processed in the serial order of the current business process; Processing the parallel task nodes of the current business process, and after the processing of the parallel task nodes of the current business process is completed, detecting the queue order of the current business process in the task queue; When the queue is ranked first in the task queue, the serial task nodes of the current business process are processed, and the current business process is ended after the serial task nodes of the current business process are processed.
2. The application business process scheduling method according to claim 1, characterized in that: The step of determining the parallel task nodes and serial task nodes of the current business process includes: Query the pre-configured scheduling relationship information of the task queue, determine the parallel task nodes of the current business process based on the scheduling relationship information, determine that other task nodes of the current business process are serial task nodes, the scheduling relationship information pre-identifies the node type of the parallel task node, and identifies the parallel task node and the execution order of each business process of the task queue based on the scheduling operator.
3. The application business process scheduling method according to claim 1, characterized in that: The method further comprises: Receive a cancellation request for the current business process, call the context instance of the current business process, recursively check the sub-context information of each task node of the current business process based on the context instance, and end the current business process if it is determined that the current business process can be canceled based on each sub-context information.
4. The application business process scheduling method according to claim 3, characterized in that: The ending of the current business process includes: Detecting that the current business process is in an execution state, interrupting the current business process, and deleting resources of the current business process from the task queue; It is detected that the current business process is in a waiting state, the current business process is prohibited from starting, and the resources of the current business process are deleted from the task queue.
5. The application business process scheduling method according to claim 3, characterized in that: After writing the current business process sequence into the task queue, the method further includes: Based on the context instance, the execution process of each task node of the current business process is monitored, the sub-context information of each task node of the current business process is updated in real time, and the business state of the current business process is updated based on the sub-context information.
6. The application business process scheduling method according to any one of claims 1 to 5, characterized in that: The method further comprises: When an error is detected in the process of processing the parallel task node of the current business process, the parallel task node is processed based on the exception capture processor configured on the parallel task node; When an error is detected in the serial task node processing the current business process, the parallel task node and the serial task node are processed based on the exception capture processor configured on the serial task node.
7. An application business process scheduling system, characterized in that: include: A writing module is configured to write the current business process sequence into the task queue, and determine the parallel task nodes and serial task nodes of the current business process, any of the parallel task nodes is processed in parallel with other parallel task nodes of the current business process and / or the parallel task nodes of other business processes, and the serial task nodes are processed in the serial order of the current business process; A parallel processing module is configured to process the parallel task nodes of the current business process, and after the parallel task nodes of the current business process are processed, detect the queue order of the current business process in the task queue; The serial processing module is configured to process the serial task node of the current business process when the queue is ranked first in the task queue, and end the current business process after the serial task node of the current business process is processed.
8. An application business process scheduling device, characterized in that: include: memory and one or more processors; The memory is configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the application business process scheduling method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a computer processor, they are configured to execute the application business process scheduling method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The computer program product includes instructions, and when the instructions are executed on a computer or a processor, the computer or the processor executes the application business process scheduling method according to any one of claims 1 to 6.