Workflow scheduling method and device, electronic equipment and storage medium
By managing the design of the backend and scheduling analysis center, the card status and execution results in the workflow diagram are resolved, and the problem of workflow diagram analysis and scheduling cannot be isolated due to card logic coupling is improved, and the stability of the system is improved. efficiency.
Patent Information
- Application Number
- CN202411410348.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-01-14
AI Technical Summary
In the existing workflow platform, card logic is coupled in the same service, resulting in the inability to isolate the parsing and scheduling of the workflow graph, affecting efficiency and stability.
By introducing the management backend and scheduling analysis center, the workflow diagram is analyzed to generate scheduling topology diagrams, and the card status and execution results are isolated to avoid mutual interference.
The workflow analysis and scheduling are isolated from each other, avoiding mutual interference between card logic, and improving the stability and efficiency of the system.
Smart Images

Figure CN119311391A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of workflow diagrams, and in particular to a workflow scheduling method, device, electronic device and storage medium. Background Art
[0002] Workflow is a common low-code implementation platform. In the context of the AIGC era, building a flexible and fast-iterable low-code workflow platform is a necessary means. This will not only help promote AI applications, but also allow more people to participate in the construction of AI applications, thereby improving work efficiency and exploring potential AI capabilities.
[0003] Existing workflows are usually designed as a DSL structure of an execution process, in which the cards contained are plug-ins or modules, and the workflow scheduling graph built on the front-end page is executed as the overall logic. At the execution level, when the user builds an executable workflow scheduling graph on the front-end, the graph will be pushed to the back-end service, parsed into an executable DSL and gradually call the relevant logic. However, the cards inside the workflow are called through the plug-in system of the back-end service, and the traffic on different ends is not distinguished. In addition, a large number of card logics are combined in the same service, resulting in the inability to isolate the scheduling and parsing of the graph. Moreover, at the development level, each card needs to be jointly developed by the front-end and back-end, and each release of a new card may affect the operation of other cards because there is no isolation between different cards at the code and deployment service level. Summary of the invention
[0004] The present invention provides a workflow scheduling method, device, electronic device and storage medium, which are used to solve the technical problem that a large number of cards are logically coupled in the same service, resulting in the inability to isolate the analysis and scheduling of the workflow diagram.
[0005] The present invention provides a workflow scheduling method, which is applied to a workflow system, wherein the workflow system includes a management background, a scheduling and analysis center, and a card application; the method includes:
[0006] The management backend receives a workflow diagram triggered by a first user on a management page;
[0007] The management backend sends the workflow diagram to the scheduling and analysis center;
[0008] The scheduling analysis center analyzes the workflow diagram to generate a scheduling topology diagram, and returns the scheduling topology diagram to the management background;
[0009] The management background obtains the current status of each card in the scheduling topology diagram, and sends the current status to the card application;
[0010] The card application receives a scheduling request initiated by the second user at the user end using the workflow API, and sends a target scheduling topology map to the scheduling resolution center;
[0011] The scheduling and analysis center sequentially schedules the target cards in the target scheduling topology diagram, obtains card execution results, and returns the card execution results to the second user.
[0012] Optionally, before the step of the management backend receiving the workflow diagram sent by the first user on the management page, the step further includes:
[0013] Obtaining configuration information of a preset card application service, and registering the configuration information in a configuration file of the management backend;
[0014] The management background reads the configuration information and generates a card list of the card application;
[0015] The step of the management backend receiving a workflow diagram triggered by a first user on a management page includes:
[0016] The management backend receives a selection operation of the first user on the card list on the management page, and generates a workflow diagram.
[0017] Optionally, the card application receives a scheduling request initiated by a second user using a workflow API at a user end, and sends a target scheduling topology map to the scheduling resolution center, including:
[0018] The card application receives a scheduling request initiated by a second user at a user end using a workflow API, parses the scheduling request to obtain a target scheduling topology map from a management background, and sends the target scheduling topology map to the scheduling parsing center.
[0019] Optionally, the step of the scheduling and analysis center scheduling target cards in the target scheduling topology map in sequence, obtaining card execution results, and returning the card execution results to the second user includes:
[0020] The scheduling analysis center obtains the card execution order according to the target scheduling topology map;
[0021] Determine each target card as the current card in turn according to the card execution order;
[0022] Execute the event method of the current card to obtain the event execution result;
[0023] Determine whether the current card is the last target card;
[0024] If not, passing the event execution result to the next target card, determining the next target card as the current card, and returning to execute the event method of the current card to obtain the event execution result;
[0025] If the current card is the last target card, the event execution result is used as the card execution result.
[0026] The present invention also provides a workflow scheduling device, which is applied to a workflow system, wherein the workflow system includes a management background, a scheduling and analysis center, and a card application; the device includes:
[0027] A workflow diagram receiving module, used for the management backend to receive a workflow diagram triggered by a first user on a management page;
[0028] A workflow diagram sending module, used for the management backend to send the workflow diagram to the scheduling and analysis center;
[0029] A scheduling topology map returning module is used for the scheduling analysis center to analyze the workflow map to generate a scheduling topology map, and return the scheduling topology map to the management background;
[0030] A current status sending module, used for the management background to obtain the current status of each card in the scheduling topology diagram, and send the current status to the card application;
[0031] A target scheduling topology map sending module is used for the card application to receive a scheduling request initiated by a second user using a workflow API at a user end, and send a target scheduling topology map to the scheduling resolution center;
[0032] The card execution result returning module is used for the scheduling and analysis center to sequentially schedule the target cards in the target scheduling topology diagram, obtain the card execution result, and return the card execution result to the second user.
[0033] Optionally, it also includes:
[0034] A registration module, used to obtain the configuration information of the preset card application service and register the configuration information in the configuration file of the management background;
[0035] A card list generation module, used for the management background to read the configuration information and generate a card list of the card application;
[0036] The workflow diagram receiving module includes:
[0037] The workflow diagram receiving submodule is used for the management backend to receive the first user's selection operation on the card list on the management page end, and generate a workflow diagram.
[0038] Optionally, the target scheduling topology map sending module includes:
[0039] The target scheduling topology sending submodule is used for the card application to receive a scheduling request initiated by the second user using the workflow API on the user side, parse the scheduling request to obtain the target scheduling topology from the management background, and send the target scheduling topology to the scheduling parsing center.
[0040] Optionally, the card execution result returning module includes:
[0041] A card execution order acquisition submodule is used for the scheduling analysis center to acquire the card execution order according to the target scheduling topology map;
[0042] A current card determination submodule, used to determine each target card as the current card in turn according to the card execution order;
[0043] An event execution result acquisition submodule is used to execute the event method of the current card and obtain the event execution result;
[0044] A judging submodule, used to judge whether the current card is the last target card;
[0045] The return submodule is used to, if not, pass the event execution result to the next target card, determine the next target card as the current card, and return the event method for executing the current card to obtain the event execution result;
[0046] The card execution result determination submodule is used to use the event execution result as the card execution result if the current card is the last target card.
[0047] The present invention also provides an electronic device, the device comprising a processor and a memory:
[0048] The memory is used to store program code and transmit the program code to the processor;
[0049] The processor is used to execute any one of the above workflow scheduling methods according to the instructions in the program code.
[0050] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and the program code is used to execute the workflow scheduling method as described in any one of the above items.
[0051] It can be seen from the above technical scheme that the present invention has the following advantages: the present invention receives the workflow diagram triggered by the first user on the management page end through the management background; the management background sends the workflow diagram to the scheduling analysis center; the scheduling analysis center analyzes the workflow diagram to generate a scheduling topology diagram, and returns the scheduling topology diagram to the management background; the management background obtains the current status of each card in the scheduling topology diagram, and sends the current status to the card application; the card application receives the workflow API initiation request sent by the second user on the user end, and sends the target scheduling topology diagram to the scheduling analysis center; the scheduling analysis center sequentially schedules the target cards in the target scheduling topology diagram, obtains the card execution results, and returns the card execution results to the second user. This isolates the analysis and scheduling of the workflow from each other to avoid mutual interference. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0053] Figure 1 A flowchart of a workflow scheduling method provided by an embodiment of the present invention;
[0054] Figure 2 A flowchart of a workflow scheduling method provided by another embodiment of the present invention;
[0055] Figure 3 This is the overall architecture diagram of the workflow system;
[0056] Figure 4 A schematic diagram of a workflow scheduling process provided by an embodiment of the present invention;
[0057] Figure 5 A structural block diagram of a workflow scheduling device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0058] The embodiments of the present invention provide a workflow scheduling method, device, electronic device and storage medium, which are used to solve the technical problem that a large number of cards are logically coupled in the same service, resulting in the inability to isolate the analysis and scheduling of the workflow diagram.
[0059] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0060] See also Figure 1 , Figure 1 A flowchart of the steps of a workflow scheduling method provided by an embodiment of the present invention.
[0061] A workflow scheduling method provided by the present invention is applied to a workflow system, wherein the workflow system includes a management background, a scheduling and analysis center, and a card application, and specifically may include the following steps:
[0062] Step 101, the management backend receives a workflow diagram triggered by a first user on a management page;
[0063] In the embodiment of the present invention, the management backend may receive a workflow diagram triggered by the first user on the management page.
[0064] The management page refers to the page where the first user (workflow creation manager) operates on the page for building a workflow.
[0065] In the embodiment of the present invention, the management backend can receive the workflow diagram constructed by the management page end, and perform add, delete, modify and query operations on it.
[0066] Step 102, the management backend sends the workflow diagram to the scheduling and analysis center;
[0067] Step 103, the scheduling analysis center analyzes the workflow diagram to generate a scheduling topology diagram, and returns the scheduling topology diagram to the management background;
[0068] In an embodiment of the present invention, after receiving the workflow diagram, the management background can forward the workflow diagram to the scheduling analysis center for analysis to obtain the connection relationship between the cards in the workflow diagram and the processing logic of each card, thereby forming a scheduling topology diagram, which is convenient for the back end to schedule the workflow diagram according to the scheduling topology.
[0069] Step 104, the management background obtains the current status of each card in the scheduling topology diagram, and sends the current status to the card application;
[0070] In the embodiment of the present invention, the workflow diagram is a link diagram formed by connecting different cards to each other, and the scheduling topology diagram is a topology diagram of the connection relationship and processing logic between different cards formed on the basis of the workflow diagram.
[0071] In the embodiment of the present invention, all card applications need to be pre-registered in the management backend. When the workflow diagram is debugged or published, the card event is triggered through the management backend.
[0072] In actual applications, users can adjust the current state of the card and send the current state of the card to the corresponding card application during the process of generating a workflow diagram.
[0073] In one example, the current state of the card can be any of the events such as init, update, remove, event, etc. After receiving the current state of the card, the card application can return the card application's processing result on the card state to the management platform. When the card application returns the feedback information that the current state has been updated to the corresponding card application service, the workflow diagram and the corresponding scheduling topology diagram are released or debugged.
[0074] Step 105, the card application receives the scheduling request initiated by the second user using the workflow API at the user end, and sends the target scheduling topology map to the scheduling analysis center;
[0075] After completing the release or debugging of the workflow diagram, the second user can initiate a scheduling request through the workflow API on the user side. The scheduling request carries the API interface of the workflow diagram. The card application can obtain the corresponding target scheduling topology diagram based on the API interface and send the target scheduling topology diagram to the scheduling resolution center. The scheduling resolution center can schedule the workflow diagram according to the target scheduling topology diagram.
[0076] Step 106, the scheduling and analysis center sequentially schedules the target cards in the target scheduling topology diagram, obtains the card execution results, and returns the card execution results to the second user.
[0077] In the embodiment of the present invention, after determining the target scheduling topology map, the scheduling analysis center may sequentially schedule the target cards in the scheduling topology map, obtain the card execution results, and return the card execution results to the second user.
[0078] The present invention receives the workflow diagram triggered by the first user on the management page end through the management background; the management background sends the workflow diagram to the scheduling analysis center; the scheduling analysis center analyzes the workflow diagram to generate a scheduling topology diagram, and returns the scheduling topology diagram to the management background; the management background obtains the current status of each card in the scheduling topology diagram, and sends the current status to the card application; the card application receives the workflow API initiation request sent by the second user on the user end, and sends the target scheduling topology diagram to the scheduling analysis center; the scheduling analysis center sequentially schedules the target cards in the target scheduling topology diagram, obtains the card execution results, and returns the card execution results to the second user. This makes the analysis and scheduling of the workflow isolated from each other to avoid mutual interference.
[0079] See also Figure 2 , Figure 2 A flowchart of a workflow scheduling method provided by another embodiment of the present invention. Specifically, the following steps may be included:
[0080] Step 201, obtain the configuration information of the preset card application service, and register the configuration information into the configuration file of the management background;
[0081] Step 202, the management background reads the configuration information and generates a card list of the card application;
[0082] In an embodiment of the present invention, the card application can use the workflow framework to implement the external interface, and forward the request to different card application services through the router, so it can be regarded as a card container. The card application needs to define the content of the card, that is, what parameters the card has and what it looks like are largely determined by the backend, and the frontend only needs to provide the corresponding components. For example, when defining the input and output of the card, such as whether a card has code input, what type of code is selected, and what structure of data is output, all rely on the card developer to define. When building a card, the backend can use the frontend components to build a card, that is, the development of a card can be completed independently by the backend.
[0083] After completing the card definition on the card application, all card applications need to be pre-registered in the management backend. A card application may contain multiple cards.
[0084] When registering a card, you first need to write the configuration information (access address, name) of the corresponding card application service in the configuration file of the management background. After the management background is started, it can read the configuration file, request the list interface defined by the protocol according to the registered access address, obtain the structure list of the card, and display it on the front end.
[0085] It should be noted that each card needs to be registered as a function so that the corresponding implementation method can be implemented when scheduling the card.
[0086] In an example, a card's function may include the following implementation:
[0087] 1. Get the card method Name.
[0088] 2. The method Card that obtains the card structure must return a structure data of a predefined structure, in which the card developer needs to define the input and output of the card.
[0089] 3. CardEvent is a method for receiving card events. This method requires card developers to handle various card events. For example, a card has a logic that after the value a is selected in the drop-down list of parameter A, the drop-down selection list of parameter B needs to be updated in conjunction. This depends on the card event method to adjust.
[0090] 4. Card initialization method Init. When a card is created in the workflow, this method will be called to inform the card service to perform corresponding processing.
[0091] 5. Card update time method Update: This method will be called when the workflow card is modified to perform corresponding processing.
[0092] 6. Card deletion method Remove: This method is triggered when a workflow card is deleted.
[0093] 7. Card execution method Exec: This method is executed when the workflow scheduling needs to execute a certain card.
[0094] After registering the card application, the management page can call the Card method of the card to pull the available card list of each card application in real time. That is, the card list on the management page is not the data obtained from the data, but the data dynamically pulled from each card application in real time.
[0095] Step 203: The management backend receives the selection operation of the first user on the card list on the management page, and generates a workflow diagram;
[0096] In the embodiment of the present invention, after obtaining the card list, the first user can select a card in the card list on the management page to generate a workflow diagram.
[0097] Step 204, the management backend sends the workflow diagram to the scheduling and analysis center;
[0098] Step 205: The scheduling analysis center analyzes the workflow diagram to generate a scheduling topology diagram, and returns the scheduling topology diagram to the management backend;
[0099] In the graph analysis phase, the management backend can send the workflow graph to the scheduling analysis center. The scheduling analysis center will parse the workflow graph into a scheduling topology graph that the backend can understand and save it in a Redis. Through this scheduling topology graph, the corresponding cards can be called step by step according to the card process of the workflow graph.
[0100] Step 206, the management background obtains the current status of each card in the scheduling topology diagram, and sends the current status to the card application;
[0101] After obtaining the scheduling topology, the management background can traverse each card and send corresponding init, update, remove and other events to the corresponding card service. That is to say, each card in each workflow diagram will have a current state, such as initialized, modified, deleted, etc.
[0102] Step 207, the card application receives the scheduling request initiated by the second user using the workflow API at the user end, and sends the target scheduling topology map to the scheduling analysis center;
[0103] After the release or debugging of the workflow diagram is completed, the second user can use the workflow API to initiate a scheduling request on the user side. The scheduling request carries the API interface of the workflow diagram. The card application can obtain the corresponding target scheduling topology diagram based on the API interface and send the target scheduling topology diagram to the scheduling resolution center. The scheduling resolution center can schedule the workflow diagram according to the target scheduling topology diagram.
[0104] In one example, the card application receives a scheduling request initiated by a second user using a workflow API, and the step of sending a target scheduling topology map to a scheduling resolution center may include:
[0105] The card application receives a scheduling request initiated by the second user using the workflow API on the user side, parses the scheduling request to obtain a target scheduling topology map from the management background, and sends the target scheduling topology map to the scheduling parsing center.
[0106] In a specific implementation, the second user can initiate a scheduling request to the card application through the workflow API on the user side. The card application can obtain the corresponding target scheduling topology map based on the workflow API and send the target scheduling topology map to the scheduling resolution center. The scheduling resolution center can schedule the workflow map based on the target scheduling topology map.
[0107] A scheduling request is a request that triggers the scheduling of the entire workflow. In an example, the scheduling request format may be as follows:
[0108] curl -v http: / / xxx / api-holder / debug / 755 / api-holder-59tJ3 -H 'Content-type:application / json' -H 'Authorization: funengxuqiuchexxx:ee74a866555993d9243xxx' -d '{"bot_id":"7397735314883870772","query":"Write a poem","token":"pat_iZApNmFnujf5Db21aWrPGnRH45sGNDW55sSgWsIFyfjXNoGLFlnsycYS0T51AU2A"}'.
[0109] Step 208: The scheduling and analysis center sequentially schedules the target cards in the target scheduling topology diagram, obtains the card execution results, and returns the card execution results to the second user.
[0110] After receiving the scheduling request, the scheduling analysis center can obtain the scheduling topology through Redis, and then execute the exec event method of each card step by step, obtain the corresponding results and pass them step by step, and finally end the request and return the actual content.
[0111] In one example, the step of the scheduling and analysis center scheduling the target cards in the target scheduling topology map in sequence, obtaining the card execution results, and returning the card execution results to the second user may include the following sub-steps:
[0112] S81, the scheduling analysis center obtains the card execution order according to the target scheduling topology map;
[0113] S82, determining each target card as the current card in turn according to the card execution order;
[0114] S83, executing the event method of the current card to obtain the event execution result;
[0115] S84, determining whether the current card is the last target card;
[0116] S85, if not, passing the event execution result to the next target card, determining the next target card as the current card, and returning to execute the event method of the current card to obtain the event execution result;
[0117] S86: If the current card is the last target card, the event execution result is used as the card execution result.
[0118] In the specific implementation, the scheduling center can obtain the card execution order according to the target scheduling topology map, and then execute the event method of each card (such as init, remove, etc.) in turn according to the card execution order to obtain the event execution result, and then use the event execution result as the input of the next card to execute the event method of the next card until all cards are executed, and output the final event execution result as the card execution result.
[0119] The present invention receives the workflow diagram triggered by the first user on the management page end through the management background; the management background sends the workflow diagram to the scheduling analysis center; the scheduling analysis center analyzes the workflow diagram to generate a scheduling topology diagram, and returns the scheduling topology diagram to the management background; the management background obtains the current status of each card in the scheduling topology diagram, and sends the current status to the card application; the card application receives the workflow API initiation request sent by the second user on the user end, and sends the target scheduling topology diagram to the scheduling analysis center; the scheduling analysis center sequentially schedules the target cards in the target scheduling topology diagram, obtains the card execution results, and returns the card execution results to the second user. This makes the analysis and scheduling of the workflow isolated from each other to avoid mutual interference.
[0120] For ease of understanding, the embodiments of the present invention are described below by using specific examples:
[0121] See also Figure 3 , Figure 3 This is the overall architecture diagram of the workflow system, including the management background, scheduling and analysis center, and card application.
[0122] The functions of the management backend are as follows:
[0123] 1. Preservation and management of basic workflow data: The workflow diagram data content built on the front end is added, deleted, modified and queried through the management backend;
[0124] 2. Card application management: All card applications must first be registered in the management backend;
[0125] 3. Card event triggering: When debugging or publishing operations on the workflow diagram, the response event is triggered by the management background.
[0126] Scheduling and analysis center: Graph analysis is performed through the B-end and graph scheduling is performed through the C-end.
[0127] Process on the B side: The workflow graph is parsed into a scheduling topology graph that can be understood by the backend through the graph parsing service, and then saved in a Redis. The scheduling topology graph can be used to call the corresponding cards step by step according to the workflow.
[0128] The process of the C end: Receive the scheduling request through the entry card such as HTTP, and forward the request to the scheduling analysis center for analysis and scheduling. The scheduling analysis center can obtain the scheduling topology through Redis, gradually execute the exex event method of each card, obtain the corresponding results and pass them step by step, and finally end the request and return the actual content.
[0129] The card application implements different processes on the B-side and C-side respectively, as follows:
[0130] B side: Building a card: When building a card, the backend can use the frontend components to build a card by itself, that is, the development of a card can be completed independently by the backend. If there is data linkage on the card, such as the first and second level drop-down boxes, it can be updated through the CardEvent event of the card. First, the CardEvent event will be given to the management backend, and the management backend will distribute it to the specified card. After the card content is modified, it will be returned to the frontend, so that the card content can be updated and a linkage effect can be achieved.
[0131] Among them, the cards can include different cards such as Vincent text, Vincent image, intent recognition and entry cards.
[0132] C-end: The scheduling service will request the card's exec method. This method is the specific process of the card, that is, the interface of the C-end process. After processing the logic, the execution of the card is completed.
[0133] Based on the above workflow system, please refer to Figure 4 During the release or debugging phase, the first user can access the workflow construction page through the B side (management page side) and send the workflow diagram to the management background; after receiving the workflow diagram, the management background sends it to the scheduling analysis center for analysis, obtains the scheduling topology diagram, and returns the analysis result to the management background; after obtaining the analysis result, the management background notifies the corresponding card application according to the current status of the card, and the card application responds to the current status of the card and returns the card update result to the management background.
[0134] During the scheduling stage, the second user can use the workflow API on the C-end (user end) to initiate a scheduling request to the card application. The card application can parse the scheduling request and send it to the scheduling resolution center. The scheduling resolution center can schedule the cards in sequence according to the workflow diagram structure based on the analysis results until all cards are executed, and return the workflow execution results to the second user.
[0135] See also Figure 5 , Figure 5 A structural block diagram of a workflow scheduling device provided in an embodiment of the present invention.
[0136] The embodiment of the present invention provides a workflow scheduling device, which is applied to a workflow system. The workflow system includes a management background, a scheduling and analysis center, and a card application. The device includes:
[0137] The workflow diagram receiving module 501 is used for receiving the workflow diagram triggered by the first user on the management page end in the management backend;
[0138] The workflow diagram sending module 502 is used for the management backend to send the workflow diagram to the scheduling and analysis center;
[0139] The scheduling topology map returning module 503 is used for the scheduling analysis center to analyze the workflow map to generate a scheduling topology map, and return the scheduling topology map to the management background;
[0140] The current status sending module 504 is used to manage the background to obtain the current status of each card in the scheduling topology diagram and send the current status to the card application;
[0141] The target scheduling topology map sending module 505 is used for the card application to receive the scheduling request initiated by the second user using the workflow API at the user end, and send the target scheduling topology map to the scheduling analysis center;
[0142] The card execution result returning module 506 is used to schedule the analysis center to schedule the target cards in the target scheduling topology diagram in sequence, obtain the card execution result, and return the card execution result to the second user.
[0143] In an embodiment of the present invention, it also includes:
[0144] The registration module is used to obtain the configuration information of the preset card application service and register the configuration information in the configuration file of the management background;
[0145] The card list generation module is used to manage the background to read the configuration information and generate the card list of the card application;
[0146] The workflow diagram receiving module 501 includes:
[0147] The workflow diagram receiving submodule is used for the management backend to receive the first user's selection operation on the card list on the management page end and generate a workflow diagram.
[0148] In the embodiment of the present invention, the target scheduling topology map sending module 505 includes:
[0149] The target scheduling topology sending submodule is used for the card application to receive the scheduling request initiated by the second user using the workflow API on the user side, parse the scheduling request to obtain the target scheduling topology from the management background, and send the target scheduling topology to the scheduling parsing center.
[0150] In the embodiment of the present invention, the card execution result returning module 506 includes:
[0151] The card execution order acquisition submodule is used by the scheduling analysis center to obtain the card execution order according to the target scheduling topology diagram;
[0152] The current card determination submodule is used to determine each target card as the current card in turn according to the card execution order;
[0153] The event execution result acquisition submodule is used to execute the event method of the current card and obtain the event execution result;
[0154] The judgment submodule is used to judge whether the current card is the last target card;
[0155] The return submodule is used to pass the event execution result to the next target card if no, determine the next target card as the current card, and return the event method for executing the current card to obtain the event execution result;
[0156] The card execution result determination submodule is used to use the event execution result as the card execution result if the current card is the last target card.
[0157] An embodiment of the present invention further provides an electronic device, the device comprising a processor and a memory:
[0158] The memory is used to store the program code and transmit the program code to the processor;
[0159] The processor is used to execute the workflow scheduling method of the embodiment of the present invention according to the instructions in the program code.
[0160] The embodiment of the present invention further provides a computer-readable storage medium, which is used to store program codes, and the program codes are used to execute the workflow scheduling method of the embodiment of the present invention.
[0161] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0162] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0163] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0164] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0165] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0166] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable terminal device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0167] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0168] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal 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 terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0169] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A workflow scheduling method, characterized in that: Applied to a workflow system, the workflow system includes a management background, a scheduling and analysis center, and a card application; the method includes: The management backend receives a workflow diagram triggered by a first user on a management page; The management backend sends the workflow diagram to the scheduling and analysis center; The scheduling analysis center analyzes the workflow diagram to generate a scheduling topology diagram, and returns the scheduling topology diagram to the management background; The management background obtains the current status of each card in the scheduling topology diagram, and sends the current status to the card application; The card application receives a scheduling request initiated by the second user at the user end using the workflow API, and sends a target scheduling topology map to the scheduling resolution center; The scheduling and analysis center sequentially schedules the target cards in the target scheduling topology diagram, obtains card execution results, and returns the card execution results to the second user.
2. The method according to claim 1, characterized in that: Before the step of the management backend receiving the workflow diagram sent by the first user on the management page, the method further includes: Obtaining configuration information of a preset card application service, and registering the configuration information in a configuration file of the management backend; The management background reads the configuration information and generates a card list of the card application; The step of the management backend receiving a workflow diagram triggered by a first user on a management page includes: The management backend receives a selection operation of the first user on the card list on the management page, and generates a workflow diagram.
3. The method according to claim 1, characterized in that The card application receives a scheduling request initiated by a second user using a workflow API at a user end, and sends a target scheduling topology map to the scheduling resolution center, including: The card application receives a scheduling request initiated by a second user at a user end using a workflow API, parses the scheduling request to obtain a target scheduling topology map from a management background, and sends the target scheduling topology map to the scheduling parsing center.
4. The method according to claim 1, characterized in that: The step of the scheduling and analysis center sequentially scheduling target cards in the target scheduling topology diagram, obtaining card execution results, and returning the card execution results to the second user includes: The scheduling analysis center obtains the card execution order according to the target scheduling topology map; Determine each target card as the current card in turn according to the card execution order; Execute the event method of the current card to obtain the event execution result; Determine whether the current card is the last target card; If not, passing the event execution result to the next target card, determining the next target card as the current card, and returning to execute the event method of the current card to obtain the event execution result; If the current card is the last target card, the event execution result is used as the card execution result.
5. A workflow scheduling device, characterized in that: Applied to a workflow system, the workflow system includes a management background, a scheduling and analysis center, and a card application; the device includes: A workflow diagram receiving module, used for the management backend to receive a workflow diagram triggered by a first user on a management page; A workflow diagram sending module, used for the management backend to send the workflow diagram to the scheduling and analysis center; A scheduling topology map returning module is used for the scheduling analysis center to analyze the workflow map to generate a scheduling topology map, and return the scheduling topology map to the management background; A current status sending module, used for the management background to obtain the current status of each card in the scheduling topology diagram, and send the current status to the card application; A target scheduling topology map sending module is used for the card application to receive a scheduling request initiated by a second user using a workflow API at a user end, and send a target scheduling topology map to the scheduling resolution center; The card execution result returning module is used for the scheduling and analysis center to sequentially schedule the target cards in the target scheduling topology diagram, obtain the card execution result, and return the card execution result to the second user.
6. The device according to claim 5, characterized in that Also includes: A registration module, used to obtain the configuration information of the preset card application service and register the configuration information in the configuration file of the management background; A card list generation module, used for the management background to read the configuration information and generate a card list of the card application; The workflow diagram receiving module includes: The workflow diagram receiving submodule is used for the management backend to receive the first user's selection operation on the card list on the management page end, and generate a workflow diagram.
7. The device according to claim 5, characterized in that The target scheduling topology map sending module includes: The target scheduling topology sending submodule is used for the card application to receive a scheduling request initiated by the second user using the workflow API on the user side, parse the scheduling request to obtain the target scheduling topology from the management background, and send the target scheduling topology to the scheduling parsing center.
8. The device according to claim 5, characterized in that The card execution result returning module includes: A card execution order acquisition submodule is used for the scheduling analysis center to acquire the card execution order according to the target scheduling topology map; A current card determination submodule, used to determine each target card as the current card in turn according to the card execution order; An event execution result acquisition submodule is used to execute the event method of the current card and obtain the event execution result; A judging submodule, used to judge whether the current card is the last target card; The return submodule is used to, if not, pass the event execution result to the next target card, determine the next target card as the current card, and return the event method for executing the current card to obtain the event execution result; The card execution result determination submodule is used to use the event execution result as the card execution result if the current card is the last target card.
9. An electronic device, characterized in that: The device comprises a processor and a memory: The memory is used to store program codes and transmit the program codes to the processor; The processor is used to execute the workflow scheduling method according to any one of claims 1 to 4 according to the instructions in the program code.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program codes, and the program codes are used to execute the workflow scheduling method according to any one of claims 1 to 4.