Flow preview method, device and equipment of distributed task and storage medium

By generating and visualizing task execution flowcharts in the microservice system, the problem that users cannot directly understand the task execution process is solved, and intuitive display and management of microservice task execution is achieved.

CN119496686APending Publication Date: 2025-02-21CHINA TRAVEL DIGITAL TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411484720.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

In the microservice system, users cannot directly understand the latest task execution process and the processing of each task, which leads to inconvenient task management and monitoring.

Method used

By reporting distributed data at the beginning and end of each distributed task node in a microservice, a task execution flow chart is generated and visualized to generate chain data for process previews. Display the process preview diagram to the user based on these data, and redefine the task execution process when the user-defined instructions are received.

Benefits of technology

It realizes an intuitive display of the current task execution process of microservices, allowing reusing task data to be assembled different processes, processing the same or repeatedly submitted task data, displaying the latest execution process and node execution, and helping users understand task execution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119496686A_ABST
    Figure CN119496686A_ABST
Patent Text Reader

Abstract

The invention discloses a process preview method, device and equipment for a distributed task and a storage medium, and the method comprises the steps: carrying out the distributed data reporting when the execution start and end of each distributed task node in a micro-service are detected, and generating a task execution flow chart; performing visualization processing according to the task execution flow chart, and generating chain data of flow preview; the flow preview is displayed to the user according to the chained data, and when the definition instruction of the user is received, the task execution flow is redefined according to the definition instruction, so that the current task execution flow of each micro-service can be visually and effectively displayed, and different flows can be assembled and displayed by repeatedly using the task data; according to the method, the same task can be processed or data is repeatedly submitted for multiple times by the task, the latest execution process of the distributed task, the execution condition of each node in the latest process and a subsequent execution plan are visually displayed, and a user is helped to visually understand the execution condition of each task in the latest process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a distributed task process preview method, device, equipment and storage medium. Background Art

[0002] With the development of computer technology, distributed tasks and microservice systems have been widely used; microservice systems can decompose large-scale systems into various sub-applications, each of which handles different services, thereby improving the system's processing speed and increasing overall stability.

[0003] However, in the task processing of the microservice system, since the data is distributed in different sub-applications and the same task often requires multiple repeated processing scenarios, users cannot directly understand the execution process of the latest task and the processing status of each task, which brings inconvenience to the user's task management and monitoring. Summary of the invention

[0004] The main purpose of the present invention is to provide a distributed task process preview method, device, equipment and storage medium, aiming to solve the technical problem that users of the microservice system in the prior art cannot directly understand the execution process of the latest task and the processing status of each task, which brings inconvenience to the user's management and monitoring of tasks.

[0005] In a first aspect, the present invention provides a distributed task process preview method, the distributed task process preview method comprising the following steps:

[0006] When the start and end of execution of each distributed task node in the microservice is detected, distributed data is reported and a task execution flow chart is generated;

[0007] Perform visualization processing according to the task execution flowchart to generate chain data of process preview;

[0008] A process preview diagram is displayed to the user according to the chain data, and when a definition instruction of the user is received, the task execution process is redefined according to the definition instruction.

[0009] Optionally, when detecting the start and end of execution of each distributed task node in the microservice, before reporting distributed data and generating a task execution flowchart, the distributed task process preview method further includes:

[0010] The corresponding relationship between each distributed task and each process is obtained, and a unique identifier is allocated to each distributed task according to the corresponding relationship.

[0011] Optionally, when detecting the start and end of execution of each distributed task node in the microservice, performing distributed data reporting and generating a task execution flow chart includes:

[0012] When detecting the start and end of node execution of each distributed task in the microservice, obtain the unique identifier of each distributed task;

[0013] After verification and preprocessing at the access layer corresponding to the microservice subsystem according to the unique identifier, the corresponding task status, approval status, task assignment handler, associated business ID, main business ID, start time, end time and related form data are obtained, and the task status, the approval status, the task assignment handler, the associated business ID, the main business ID, the start time, the end time and the related form data are used as distributed data;

[0014] The distributed data is reported to the user's web terminal to generate a task execution flow chart.

[0015] Optionally, reporting the distributed data to a user web terminal and generating a task execution flow chart includes:

[0016] Persisting the distributed data, storing the persisted data in a database, and reporting the persisted data to a user web terminal through the database;

[0017] When it is detected that the reported current distributed task node is a start node, the associated process definition data of the current distributed task node is stored, and a task execution flow chart is generated according to the associated process definition data.

[0018] Optionally, the performing visualization processing according to the task execution flowchart to generate chain data of the process preview includes:

[0019] The task data to be reported is queried through the front end according to the associated business ID or main business ID of each task in the task execution flow chart;

[0020] According to the predefined process, the task data to be reported is subjected to task definition and process definition, and chain data of the process preview is generated.

[0021] Optionally, presenting a preview of the process to a user according to the chain data, and upon receiving a definition instruction from the user, redefining the task execution process according to the definition instruction, includes:

[0022] After the front end performs cache management on the chain data, processing of task instance data, processing of process version data and rendering of process instance data, rendering data is generated, the rendering data is rendered into a process preview image, and the process preview image is displayed to the user on a display screen;

[0023] When receiving the definition instruction of the user, redefine the task execution process according to the definition instruction;

[0024] The unexecuted tasks in each distributed task are executed according to the redefined task execution process, and the executed tasks in each distributed task do not need to be reported repeatedly.

[0025] Optionally, upon receiving the definition instruction from the user, redefining the task execution process according to the definition instruction includes:

[0026] Upon receiving the definition instruction from the user, reorganizing the processes under different scenarios according to the defined task ID corresponding to the definition instruction;

[0027] Put the collected task data into different processes for preview, and generate the redefined target task execution process based on the preview results.

[0028] In a second aspect, in order to achieve the above-mentioned purpose, the present invention further proposes a distributed task process preview device, the distributed task process preview device comprising:

[0029] The flowchart generation module is used to report distributed data and generate a task execution flowchart when the start and end of execution of each distributed task node in the microservice are detected;

[0030] A visualization processing module, used for performing visualization processing according to the task execution flowchart and generating chain data of the process preview;

[0031] The display adjustment module is used to display a preview diagram of the process to the user according to the chain data, and when receiving a definition instruction from the user, redefine the task execution process according to the definition instruction.

[0032] In a third aspect, in order to achieve the above-mentioned purpose, the present invention also proposes a process preview device for distributed tasks, wherein the process preview device for distributed tasks comprises: a memory, a processor, and a process preview program for distributed tasks stored in the memory and executable on the processor, wherein the process preview program for distributed tasks is configured to implement the steps of the process preview method for distributed tasks as described above.

[0033] In a fourth aspect, in order to achieve the above-mentioned purpose, the present invention also proposes a storage medium, on which a process preview program for distributed tasks is stored, and when the process preview program for distributed tasks is executed by a processor, the steps of the process preview method for distributed tasks as described above are implemented.

[0034] The process preview method of distributed tasks proposed in the present invention generates a task execution flowchart by reporting distributed data when detecting the start and end of execution of each distributed task node in a microservice; performs visualization processing according to the task execution flowchart to generate chain data for process preview; displays the process preview diagram to the user according to the chain data, and redefines the task execution process according to the definition instruction when receiving the definition instruction of the user, so as to intuitively and effectively display the current task execution process of each microservice, and can repeatedly use task data to assemble different processes for display, and can process the same task or repeated submission of data for multiple tasks, and intuitively display the latest execution process of the distributed task, the execution status of each node in the latest process and the subsequent execution plan, so as to help the user intuitively understand the execution status of each task in the latest process. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 A schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention;

[0036] Figure 2 It is a flowchart of a first embodiment of a distributed task process preview method of the present invention;

[0037] Figure 3 It is a flowchart of a second embodiment of a distributed task process preview method of the present invention;

[0038] Figure 4 It is a flowchart of a third embodiment of a distributed task process preview method of the present invention;

[0039] Figure 5 It is a flowchart of a fourth embodiment of a distributed task process preview method of the present invention;

[0040] Figure 6 It is a flowchart of a fifth embodiment of a distributed task process preview method of the present invention;

[0041] Figure 7 A schematic diagram of a sixth embodiment of a distributed task process preview method of the present invention;

[0042] Figure 8 A schematic diagram of the system structure corresponding to the distributed task process preview method of the present invention;

[0043] Fig. 9A schematic diagram of the distributed task data collection and display process in the distributed task process preview method of the present invention;

[0044] Fig.10 It is a functional module diagram of the first embodiment of the distributed task process preview device of the present invention.

[0045] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0046] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0047] The solution of the embodiment of the present invention is mainly as follows: when detecting the start and end of execution of each distributed task node in the microservice, distributed data is reported to generate a task execution flowchart; visualization processing is performed according to the task execution flowchart to generate chain data of process preview; the process preview is displayed to the user according to the chain data, and when receiving the definition instruction of the user, the task execution process is redefined according to the definition instruction, so that the current task execution process of each microservice can be displayed intuitively and effectively, and the task data can be reused to assemble different processes for display, and the same task or task can be processed. Repeated submission of data, and the latest execution process of the distributed task, the execution status of each node in the latest process and the subsequent execution plan are intuitively displayed, helping users to intuitively understand the execution status of each task in the latest process, and solving the technical problem that the user of the microservice system in the prior art cannot directly understand the execution process of the latest task and the processing status of each task, which brings inconvenience to the user in the management and monitoring of tasks.

[0048] Reference Figure 1 , Figure 1 The figure is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention.

[0049] like Figure 1As shown, the device may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed RAM memory, or it may be a stable memory (Non-Volatile Memory), such as a disk memory. The memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.

[0050] Those skilled in the art will understand that Figure 1 The device structure shown in the figure does not constitute a limitation of the device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0051] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating device, a network communication module, a user interface module, and a process preview program of a distributed task.

[0052] The device of the present invention calls the process preview program of the distributed task stored in the memory 1005 through the processor 1001, and performs the following operations:

[0053] When the start and end of execution of each distributed task node in the microservice is detected, distributed data is reported and a task execution flow chart is generated;

[0054] Perform visualization processing according to the task execution flowchart to generate chain data of process preview;

[0055] A process preview diagram is displayed to the user according to the chain data, and when a definition instruction of the user is received, the task execution process is redefined according to the definition instruction.

[0056] The device of the present invention calls the process preview program of the distributed task stored in the memory 1005 through the processor 1001, and also performs the following operations:

[0057] The corresponding relationship between each distributed task and each process is obtained, and a unique identifier is allocated to each distributed task according to the corresponding relationship.

[0058] The device of the present invention calls the process preview program of the distributed task stored in the memory 1005 through the processor 1001, and also performs the following operations:

[0059] When detecting the start and end of node execution of each distributed task in the microservice, obtain the unique identifier of each distributed task;

[0060] After verification and preprocessing at the access layer corresponding to the microservice subsystem according to the unique identifier, the corresponding task status, approval status, task assignment handler, associated business ID, main business ID, start time, end time and related form data are obtained, and the task status, the approval status, the task assignment handler, the associated business ID, the main business ID, the start time, the end time and the related form data are used as distributed data;

[0061] The distributed data is reported to the user's web terminal to generate a task execution flow chart.

[0062] The device of the present invention calls the process preview program of the distributed task stored in the memory 1005 through the processor 1001, and also performs the following operations:

[0063] Persisting the distributed data, storing the persisted data in a database, and reporting the persisted data to a user web terminal through the database;

[0064] When it is detected that the reported current distributed task node is a start node, the associated process definition data of the current distributed task node is stored, and a task execution flow chart is generated according to the associated process definition data.

[0065] The device of the present invention calls the process preview program of the distributed task stored in the memory 1005 through the processor 1001, and also performs the following operations:

[0066] The task data to be reported is queried through the front end according to the associated business ID or main business ID of each task in the task execution flow chart;

[0067] According to the predefined process, the task data to be reported is subjected to task definition and process definition, and chain data of the process preview is generated.

[0068] The device of the present invention calls the process preview program of the distributed task stored in the memory 1005 through the processor 1001, and also performs the following operations:

[0069] After the front end performs cache management on the chain data, processing of task instance data, processing of process version data and rendering of process instance data, rendering data is generated, the rendering data is rendered into a process preview image, and the process preview image is displayed to the user on a display screen;

[0070] When receiving the definition instruction of the user, redefine the task execution process according to the definition instruction;

[0071] The unexecuted tasks in each distributed task are executed according to the redefined task execution process, and the executed tasks in each distributed task do not need to be reported repeatedly.

[0072] The device of the present invention calls the process preview program of the distributed task stored in the memory 1005 through the processor 1001, and also performs the following operations:

[0073] Upon receiving the definition instruction from the user, reorganizing the processes under different scenarios according to the defined task ID corresponding to the definition instruction;

[0074] Put the collected task data into different processes for preview, and generate the redefined target task execution process based on the preview results.

[0075] Through the above scheme, this embodiment generates a task execution flowchart by reporting distributed data when detecting the start and end of execution of each distributed task node in the microservice; performs visualization processing according to the task execution flowchart to generate chain data for process preview; displays the process preview to the user according to the chain data, and redefines the task execution process according to the definition instruction when receiving the user's definition instruction, so as to intuitively and effectively display the current task execution process of each microservice, and can reuse task data to assemble different processes for display, and can handle the same task or repeated submission of data for multiple tasks, and intuitively display the latest execution process of the distributed task, the execution status of each node in the latest process and the subsequent execution plan, so as to help the user intuitively understand the execution status of each task in the latest process.

[0076] Based on the above hardware structure, an embodiment of a process preview method for distributed tasks of the present invention is proposed.

[0077] Reference Figure 2 , Figure 2 It is a flowchart of the first embodiment of the distributed task process preview method of the present invention.

[0078] In a first embodiment, the distributed task process preview method includes the following steps:

[0079] Step S10: When the start and end of execution of each distributed task node in the microservice is detected, distributed data reporting is performed to generate a task execution flow chart.

[0080] It should be noted that when each task node in the microservice starts and ends execution, data is reported and a task execution flowchart is generated.

[0081] Step S20: Perform visualization processing according to the task execution flowchart to generate chain data of the process preview.

[0082] It should be understood that visualizing the flowchart of task execution can generate chain data of process preview.

[0083] Step S30: displaying a preview of the process to the user according to the chain data, and upon receiving a definition instruction from the user, redefining the task execution process according to the definition instruction.

[0084] It can be understood that a corresponding process preview diagram can be generated based on the chain data, and then displayed to the user so that the user can understand the task execution process and subsequent processes. The user can use the existing task definition to redefine a new process, that is, when receiving the user's definition instruction, redefine the task execution process according to the definition instruction.

[0085] Through the above scheme, this embodiment generates a task execution flowchart by reporting distributed data when detecting the start and end of execution of each distributed task node in the microservice; performs visualization processing according to the task execution flowchart to generate chain data for process preview; displays the process preview to the user according to the chain data, and redefines the task execution process according to the definition instruction when receiving the user's definition instruction, so as to intuitively and effectively display the current task execution process of each microservice, and can reuse task data to assemble different processes for display, and can handle the same task or repeated submission of data for multiple tasks, and intuitively display the latest execution process of the distributed task, the execution status of each node in the latest process and the subsequent execution plan, so as to help the user intuitively understand the execution status of each task in the latest process.

[0086] Further, Figure 3 FIG. 1 is a flow chart of a second embodiment of a distributed task process preview method according to the present invention. Figure 3 As shown, a second embodiment of the distributed task process preview method of the present invention is proposed based on the first embodiment. In this embodiment, before the step S10, the distributed task process preview method further includes the following steps:

[0087] Step S01: Obtain the corresponding relationship between each distributed task and each process, and assign a unique identifier to each distributed task according to the corresponding relationship.

[0088] It should be noted that tasks and processes are defined, and a unique identifier is assigned to each task and process. Tasks are the smallest unit of preview services. Assigning a unique identifier to a task facilitates future process summarization and data statistics. There is a many-to-many relationship between tasks and processes. A unique identifier is assigned to each distributed task based on the corresponding relationship.

[0089] It can be understood that when defining tasks and processes, a unique identifier can be assigned to each task and process, that is, a task can belong to different processes, and a process can contain multiple tasks; the process is the front-end dependency relationship of each task, and a unique identifier is defined for the process to facilitate the preview and rendering of the process later; the identifier can use any unique identification method, such as a number, a string, etc., and this embodiment does not limit this.

[0090] Through the above scheme, this embodiment obtains the correspondence between each distributed task and each process, and assigns a unique identifier to each distributed task according to the correspondence. It is possible to assign a unique identifier to each task, thereby improving the ability of distributed task allocation and processing, and improving the efficiency of process preview of distributed tasks.

[0091] Further, Figure 4 FIG. 1 is a flow chart of a third embodiment of a distributed task process preview method according to the present invention. Figure 4 As shown, a third embodiment of the distributed task process preview method of the present invention is proposed based on the first embodiment. In this embodiment, the step S10 specifically includes the following steps:

[0092] Step S11: When detecting the start and end of node execution of each distributed task in the microservice, obtain a unique identifier of each distributed task.

[0093] It should be noted that when the start and end of the node execution of each distributed task in the microservice is detected, the unique identifier of each distributed task can be obtained.

[0094] Step S12: After verification and preprocessing at the access layer corresponding to the microservice subsystem according to the unique identifier, the corresponding task status, approval status, task assignment handler, associated business ID, main business ID, start time, end time and related form data are obtained, and the task status, the approval status, the task assignment handler, the associated business ID, the main business ID, the start time, the end time and the related form data are used as distributed data.

[0095] It can be understood that when a task starts and ends, the task data is reported through the unique identifier of the task, including the task status, approval status, the person assigned to the task, the related business ID, the main business ID, the start time, the end time and the related form data, etc., and then the task status, the approval status, the person assigned to the task, the related business ID, the main business ID, the start time, the end time and the related form data are used as distributed data.

[0096] Step S13: reporting the distributed data to the user's web terminal and generating a task execution flow chart.

[0097] It should be understood that the distributed data is reported to the user's web terminal, and then a task execution flowchart is generated.

[0098] Through the above scheme, this embodiment obtains the unique identifier of each distributed task when the node execution start and end of each distributed task in the microservice is detected; after verification and preprocessing at the access layer corresponding to the microservice subsystem according to the unique identifier, the corresponding task status, approval status, task assignment handler, related business ID, main business ID, start time, end time and related form data are obtained, and the task status, the approval status, the task assignment handler, the related business ID, the main business ID, the start time, the end time and the related form data are used as distributed data; the distributed data is reported to the user web end to generate a task execution flow chart, which can generate a task execution flow chart and intuitively and effectively display the current task execution process of each microservice.

[0099] Further, Figure 5 FIG. 4 is a flow chart of a fourth embodiment of a distributed task process preview method according to the present invention. Figure 5 As shown, a fourth embodiment of the distributed task process preview method of the present invention is proposed based on the third embodiment. In this embodiment, the step S13 specifically includes the following steps:

[0100] Step S131: persist the distributed data, store the persisted data in a database, and report the persisted data to a user web terminal through the database.

[0101] It is understandable that the data is persistently stored in the database after being reported, that is, after the distributed data is persisted, the persisted data can be stored in the database, and the persistent data can be reported to the user web terminal through the database.

[0102] Step S132: When it is detected that the reported current distributed task node is a start node, the associated process definition data of the current distributed task node is stored, and a task execution flow chart is generated according to the associated process definition data.

[0103] It should be noted that if the reporting node is the start node, the process-related definition data associated with the task node when it is reported is stored to realize the preview of flowcharts of different historical versions. That is, when it is detected that the reported current distributed task node is the start node, the associated process definition data of the current distributed task node is stored, and the task execution flowchart is generated according to the associated process definition data.

[0104] This embodiment uses the above scheme to persist the distributed data, store the persisted data in a database, and report the persisted data to the user web terminal through the database; when it is detected that the reported current distributed task node is a start node, the associated process definition data of the current distributed task node is stored, and a task execution flowchart is generated according to the associated process definition data. The task execution flowchart can be generated to intuitively and effectively display the current task execution process of each microservice, thereby improving the processing efficiency of the process preview of distributed tasks.

[0105] Further, Figure 6 FIG. 5 is a flow chart of a fifth embodiment of a distributed task process preview method according to the present invention. Figure 6 As shown, a fifth embodiment of the distributed task process preview method of the present invention is proposed based on the first embodiment. In this embodiment, the step S21 specifically includes the following steps:

[0106] Step S21: The front end queries the task data to be reported according to the associated business ID or main business ID of each task in the task execution flow chart.

[0107] It should be noted that the front end queries the data based on the unique identifier of the process and the business ID or main business ID associated when reporting the task data, that is, the front end queries the task data to be reported based on the associated business ID or main business ID of each task in the task execution flowchart.

[0108] Step S22: perform task definition and process definition on the task data to be reported according to the predefined process, and generate chain data of the process preview.

[0109] It is understandable that, through the predefined process, the task data to be reported can be subjected to task definition and process definition, and chain data of the process preview can be generated.

[0110] In the specific implementation, the server first obtains the task unique identifier set of the process definition based on the process unique identifier, and then queries all reported task data from the database based on the task unique identifier set and the associated business ID, and builds the chain data of the process preview according to the process definition.

[0111] Through the above scheme, this embodiment queries the task data to be reported through the front end according to the associated business ID or main business ID of each task in the task execution flowchart; performs task definition and process definition on the task data to be reported according to the predefined process, and generates chain data for process preview; can intuitively and effectively display the current task execution process of each microservice, and can reuse task data to assemble different processes for display.

[0112] Further, Figure 7 FIG. 6 is a flow chart of a sixth embodiment of a distributed task process preview method according to the present invention. Figure 7 As shown, a sixth embodiment of the distributed task process preview method of the present invention is proposed based on the first embodiment. In this embodiment, the step S30 specifically includes the following steps:

[0113] Step S31, after the front end performs cache management on the chain data, processing of task instance data, processing of process version data and rendering of process instance data, generates rendering data, renders the rendering data into a process preview image, and displays the process preview image to the user on the display screen.

[0114] It should be noted that the front end renders graphics and displays them to the user based on the returned process data, and displays the process preview to the user so that the user can understand the task execution process and subsequent processes. The front end performs cache management on the chain data, processes task instance data, processes process version data, and renders process instance data to generate rendering data. The rendering data can be rendered into a process preview, and then the process preview is displayed to the user on the display screen.

[0115] In the specific implementation, see Figure 8 , Figure 8 This is a schematic diagram of the system structure corresponding to the distributed task process preview method of the present invention, see Figure 8 , the user web side can predefine, that is, preview definition, including task definition and process definition. The microservice subsystem needs to collect data before reporting data, that is, including collecting data at the access layer (HTTP / MQ), and verifying and preprocessing the collected data, and then storing the data, that is, data storage or caching, and then performing preview data rendering, cache management, task instance data processing, process version data processing and process instance data rendering, completing the rendering data, and then the user web side.

[0116] In the early stage, the task definition and process definition are used to configure the basic information of the task, while the process definition is used to specify the task association and execution order of the process preview. The module based on the task definition data is responsible for collecting, verifying, preprocessing, and storing the task instance data reported by each microservice sub-application. When the user needs to preview the process, the flowchart is rendered in real time based on the collected task instance data and displayed to the customer. First, based on the task definition and process definition of the preview definition module, the preview data with a standard structure for front-end Web page rendering is processed and constructed according to the task definition order and dependency relationship in the process definition. The front-end Web renders a visual flowchart for display based on the different nodes, order, and status of the preview data.

[0117] Step S32: upon receiving the definition instruction from the user, redefine the task execution process according to the definition instruction.

[0118] It is understandable that after receiving the definition instruction from the user, the task execution process can be redefined according to the definition instruction.

[0119] In the specific implementation, the user can use the currently defined task ID to reorganize the process under different scenarios and put the collected task data into different processes for preview; the program displays different processes to the user according to the task ID in different processes and the business ID or main business ID that needs to be previewed, without the need to repeatedly report the task data. This embodiment displays the process preview diagram generated by different tasks of different systems to the user through a custom assembly flowchart, so that the user can understand the process execution process and the subsequent nodes to be executed; after the task data is reported, it can be reused in different processes without repeated reporting. The user can redefine the new process and the task ID it contains as needed to preview the business process.

[0120] Step S33: the unexecuted tasks in each distributed task are executed according to the redefined task execution process, and there is no need to repeatedly report the executed tasks in each distributed task.

[0121] It is understandable that the user can use the existing task definition to redefine a new process, and execute the unexecuted tasks in each distributed task according to the redefined task execution process, and there is no need to repeatedly report the executed tasks in each distributed task.

[0122] In the specific implementation, see Fig. 9 , Fig. 9 The distributed task data collection and display process principle diagram in the distributed task process preview method of the present invention is as follows: Fig. 9As shown, after receiving the task defined by the front end, the workflow system saves the task definition, then checks a business process for data aggregation, renders the business process diagram after data aggregation, saves the process definition after receiving the defined process, generates task instance data, and the business system processes the task after the task starts until the task ends. At the start and end of the task, the task data can be synchronized and the task instance data can be updated.

[0123] Through the above scheme, this embodiment generates rendering data after the front end performs cache management, task instance data processing, process version data processing and process instance data rendering on the chain data, and renders the rendering data. The rendering data is rendered into a process preview image, and the process preview image is displayed to the user on the display screen; when receiving the user's definition instruction, the task execution process is redefined according to the definition instruction; the unexecuted tasks in each distributed task are executed according to the redefined task execution process, and there is no need to repeatedly report the executed tasks in each distributed task; the current task execution process of each microservice can be displayed intuitively and effectively, and the task data can be reused to assemble different processes for display, and the same task or task can be processed. Repeated submission of data can be processed, and the latest execution process of the distributed task, the execution status of each node in the latest process and the subsequent execution plan can be intuitively displayed, helping users to intuitively understand the execution status of each task in the latest process.

[0124] Accordingly, the present invention further provides a distributed task process preview device.

[0125] Reference Fig.10 , Fig.10 It is a functional module diagram of the first embodiment of the distributed task process preview device of the present invention.

[0126] In a first embodiment of a distributed task process preview device of the present invention, the distributed task process preview device comprises:

[0127] The flowchart generation module 10 is used to report distributed data and generate a task execution flowchart when detecting the start and end of execution of each distributed task node in the microservice.

[0128] The visualization processing module 20 is used to perform visualization processing according to the task execution flowchart and generate chain data of the process preview.

[0129] The display adjustment module 30 is used to display a preview diagram of the process to the user according to the chain data, and when receiving a definition instruction from the user, redefine the task execution process according to the definition instruction.

[0130] The flowchart generating module 10 is further used to obtain the corresponding relationship between each distributed task and each process, and assign a unique identifier to each distributed task according to the corresponding relationship.

[0131] The flowchart generation module 10 is also used to obtain the unique identifier of each distributed task when the start and end of the node execution of each distributed task in the microservice are detected; after verification and preprocessing at the access layer corresponding to the microservice subsystem according to the unique identifier, the corresponding task status, approval status, task assignment handler, related business ID, main business ID, start time, end time and related form data are obtained, and the task status, the approval status, the task assignment handler, the related business ID, the main business ID, the start time, the end time and the related form data are used as distributed data; the distributed data is reported to the user web end to generate a task execution flowchart.

[0132] The flowchart generation module 10 is also used to persist the distributed data, store the persisted data in a database, and report the persisted data to the user web terminal through the database; when it is detected that the reported current distributed task node is a start node, the associated process definition data of the current distributed task node is stored, and a task execution flowchart is generated according to the associated process definition data.

[0133] The visualization processing module 20 is also used to query the task data to be reported according to the associated business ID or main business ID of each task in the task execution flowchart through the front end; perform task definition and process definition on the task data to be reported according to the predefined process, and generate chain data for process preview.

[0134] The display adjustment module 30 is also used to generate rendering data after performing cache management, task instance data processing, process version data processing and process instance data rendering on the chain data through the front end, render the rendering data into a process preview image, and display the process preview image to the user on the display screen; when receiving the user's definition instruction, redefine the task execution process according to the definition instruction; execute the unexecuted tasks in each distributed task according to the redefined task execution process, and there is no need to repeatedly report the executed tasks in each distributed task.

[0135] The display adjustment module 30 is also used to, when receiving the user's definition instruction, reorganize the process under different scenarios according to the defined task ID corresponding to the definition instruction; put the collected task data into different processes for preview, and generate the redefined target task execution process according to the preview result.

[0136] The steps implemented by the functional modules of the distributed task process preview device can refer to the various embodiments of the distributed task process preview method of the present invention, which will not be described in detail here.

[0137] In addition, an embodiment of the present invention further provides a storage medium, on which a distributed task process preview program is stored. When the distributed task process preview program is executed by a processor, the following operations are implemented:

[0138] When the start and end of execution of each distributed task node in the microservice is detected, distributed data is reported and a task execution flow chart is generated;

[0139] Perform visualization processing according to the task execution flowchart to generate chain data of process preview;

[0140] A process preview diagram is displayed to the user according to the chain data, and when a definition instruction of the user is received, the task execution process is redefined according to the definition instruction.

[0141] Furthermore, when the distributed task process preview program is executed by the processor, the following operations are also implemented:

[0142] The corresponding relationship between each distributed task and each process is obtained, and a unique identifier is allocated to each distributed task according to the corresponding relationship.

[0143] Furthermore, when the distributed task process preview program is executed by the processor, the following operations are also implemented:

[0144] When detecting the start and end of node execution of each distributed task in the microservice, obtain the unique identifier of each distributed task;

[0145] After verification and preprocessing at the access layer corresponding to the microservice subsystem according to the unique identifier, the corresponding task status, approval status, task assignment handler, associated business ID, main business ID, start time, end time and related form data are obtained, and the task status, the approval status, the task assignment handler, the associated business ID, the main business ID, the start time, the end time and the related form data are used as distributed data;

[0146] The distributed data is reported to the user's web terminal to generate a task execution flow chart.

[0147] Furthermore, when the distributed task process preview program is executed by the processor, the following operations are also implemented:

[0148] Persisting the distributed data, storing the persisted data in a database, and reporting the persisted data to a user web terminal through the database;

[0149] When it is detected that the reported current distributed task node is a start node, the associated process definition data of the current distributed task node is stored, and a task execution flow chart is generated according to the associated process definition data.

[0150] Furthermore, when the distributed task process preview program is executed by the processor, the following operations are also implemented:

[0151] The task data to be reported is queried through the front end according to the associated business ID or main business ID of each task in the task execution flow chart;

[0152] According to the predefined process, the task data to be reported is subjected to task definition and process definition, and chain data of the process preview is generated.

[0153] Furthermore, when the distributed task process preview program is executed by the processor, the following operations are also implemented:

[0154] After the front end performs cache management on the chain data, processing of task instance data, processing of process version data and rendering of process instance data, rendering data is generated, the rendering data is rendered into a process preview image, and the process preview image is displayed to the user on a display screen;

[0155] When receiving the definition instruction of the user, redefine the task execution process according to the definition instruction;

[0156] The unexecuted tasks in each distributed task are executed according to the redefined task execution process, and the executed tasks in each distributed task do not need to be reported repeatedly.

[0157] Furthermore, when the distributed task process preview program is executed by the processor, the following operations are also implemented:

[0158] Upon receiving the definition instruction from the user, reorganizing the processes under different scenarios according to the defined task ID corresponding to the definition instruction;

[0159] Put the collected task data into different processes for preview, and generate the redefined target task execution process based on the preview results.

[0160] Those skilled in the art will appreciate that all or part of the steps in the above-mentioned implementation method can be accomplished by instructing related hardware through a program, and the program is stored in a storage medium, including a number of instructions for enabling a device (which may be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each implementation method of the present application; and the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.

[0161] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0162] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0163] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A distributed task process preview method, characterized in that: The distributed task process preview method includes: When the start and end of execution of each distributed task node in the microservice is detected, distributed data is reported and a task execution flow chart is generated; Perform visualization processing according to the task execution flowchart to generate chain data of process preview; A process preview diagram is displayed to the user according to the chain data, and when a definition instruction of the user is received, the task execution process is redefined according to the definition instruction.

2. The distributed task process preview method according to claim 1, characterized in that: When detecting the start and end of execution of each distributed task node in the microservice, reporting distributed data, and generating a task execution flowchart, the distributed task process preview method also includes: The corresponding relationship between each distributed task and each process is obtained, and a unique identifier is allocated to each distributed task according to the corresponding relationship.

3. The distributed task process preview method according to claim 1, characterized in that: When the start and end of execution of each distributed task node in the microservice is detected, distributed data reporting is performed to generate a task execution flow chart, including: When detecting the start and end of node execution of each distributed task in the microservice, obtain the unique identifier of each distributed task; After verification and preprocessing at the access layer corresponding to the microservice subsystem according to the unique identifier, the corresponding task status, approval status, task assignment handler, associated business ID, main business ID, start time, end time and related form data are obtained, and the task status, the approval status, the task assignment handler, the associated business ID, the main business ID, the start time, the end time and the related form data are used as distributed data; The distributed data is reported to the user's web terminal to generate a task execution flow chart.

4. The distributed task process preview method according to claim 3, characterized in that: The step of reporting the distributed data to the user web terminal and generating a task execution flow chart includes: Persisting the distributed data, storing the persisted data in a database, and reporting the persisted data to a user web terminal through the database; When it is detected that the reported current distributed task node is a start node, the associated process definition data of the current distributed task node is stored, and a task execution flow chart is generated according to the associated process definition data.

5. The distributed task process preview method according to claim 1, characterized in that: The step of performing visualization processing according to the task execution flowchart to generate chain data of the process preview includes: The task data to be reported is queried through the front end according to the associated business ID or main business ID of each task in the task execution flow chart; According to the predefined process, the task data to be reported is subjected to task definition and process definition, and chain data of process preview is generated.

6. The distributed task process preview method according to claim 1, characterized in that: The step of displaying a preview of the process to the user according to the chain data, and redefining the task execution process according to the definition instruction upon receiving the definition instruction of the user, comprises: After the front end performs cache management on the chain data, processing of task instance data, processing of process version data and rendering of process instance data, rendering data is generated, the rendering data is rendered into a process preview image, and the process preview image is displayed to the user on a display screen; When receiving the definition instruction of the user, redefine the task execution process according to the definition instruction; The unexecuted tasks in each distributed task are executed according to the redefined task execution process, and the executed tasks in each distributed task do not need to be reported repeatedly.

7. The distributed task process preview method according to claim 6, characterized in that: When receiving the definition instruction from the user, redefining the task execution process according to the definition instruction includes: Upon receiving the definition instruction from the user, reorganizing the processes under different scenarios according to the defined task ID corresponding to the definition instruction; Put the collected task data into different processes for preview, and generate the redefined target task execution process based on the preview results.

8. A distributed task process preview device, characterized in that: The distributed task process preview device includes: The flowchart generation module is used to report distributed data and generate a task execution flowchart when the start and end of execution of each distributed task node in the microservice are detected; A visualization processing module, used for performing visualization processing according to the task execution flowchart and generating chain data of the process preview; The display adjustment module is used to display a preview diagram of the process to the user according to the chain data, and when receiving a definition instruction from the user, redefine the task execution process according to the definition instruction.

9. A distributed task process preview device, characterized in that: The distributed task process preview device includes: a memory, a processor, and a distributed task process preview program stored in the memory and executable on the processor, wherein the distributed task process preview program is configured to implement the steps of the distributed task process preview method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium stores a distributed task process preview program, and when the distributed task process preview program is executed by the processor, the steps of the distributed task process preview method according to any one of claims 1 to 7 are implemented.