Process scheduling system and its operation method, operation device and readable storage medium
By introducing processing unit clusters and message repositories into the process scheduling system, the stability and performance problems of WebSocket service under cluster deployment are solved, and efficient processing of multiple task requests is achieved.
Patent Information
- Application Number
- CN202211534206.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-02
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2042-12-02
AI Technical Summary
Traditional WebSocket services only support stand-alone services and do not support cluster deployment, resulting in stability and performance problems when there are many RPA clients.
A method of operation of a process scheduling system is designed. Through the processing unit cluster and message repository, client task requests are received, processing unit randomly selects processing units to process the request, and generates broadcast messages when they cannot be processed and pushed to the message repository, so as to determine that they can be processed. The second processing unit of the task ensures processing and response of the task request.
It improves the operation stability and efficiency of the process scheduling system, ensures that the processing unit cluster can handle multiple task requests, and improves the performance of the system.
Smart Images

Figure CN115866058B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of process automation, and in particular to a process scheduling system and an operating method, an operating device and a readable storage medium thereof. Background Art
[0002] With the development of Robotic Process Automation (RPA) technology and the large-scale use of RPA in various industries, the use of RPA robots to automate processes and complete digital transformation has become an inevitable trend. It can not only help enterprise users significantly improve work efficiency, but also improve the office experience of enterprise employees.
[0003] At present, the RPA console needs to schedule the running, suspension, and deployment of RPA robots on the RPA client. The RPA console and the RPA client need to communicate using the WebSocket protocol (a communication protocol), but traditional WebSocket services only support single-machine services and do not support cluster deployment. When there are many RPA clients, there will be stability and performance issues. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems existing in the prior art or related art.
[0005] To this end, a first aspect of the present invention is to propose an operating method of a process scheduling system.
[0006] The second aspect of the present invention is to provide an operating device for a process scheduling system.
[0007] The third aspect of the present invention is to provide an operating device for a process scheduling system.
[0008] A fourth aspect of the present invention is to provide a readable storage medium.
[0009] A fifth aspect of the present invention is to propose a process scheduling system.
[0010] In view of this, according to the first aspect of the present invention, a method for operating a process scheduling system is proposed, the process scheduling system includes a processing unit cluster and a message storage repository, the processing unit cluster includes multiple processing units, and the method for operating the process scheduling system includes: receiving a task request from a client, and randomly determining a first processing unit among multiple processing units; when the first processing unit cannot process the task request, determining a broadcast message corresponding to the task request, and pushing the broadcast message to the message storage repository; determining a second processing unit through the broadcast message in the message storage repository, the second processing unit being a processing unit that can process the task request; determining a reply message to the broadcast message through the second processing unit, and sending the reply message to the client.
[0011] In this technical solution, a method for operating a process scheduling system is provided. The process scheduling system is a system for automatically scheduling process tasks. The process scheduling system includes a processing unit cluster and a message storage repository. It should be noted that the message storage repository is a cache space for storing messages, and the processing unit cluster includes multiple processing units. The processing unit cluster is an operation set composed of multiple processing units, wherein the processing unit is an operation unit that executes tasks.
[0012] Exemplarily, the process scheduling system may be specifically a process application system composed of PRA (robotic process automation) software, the multiple processing units may specifically include multiple PRA console instances, and the message storage repository may be specifically an MQ (message queue).
[0013] Furthermore, the processing unit cluster establishes a communication connection with the client and receives a task request sent by the client. After receiving the task request, the processing unit cluster randomly selects a first processing unit from multiple processing units and processes the client's task request through the first processing unit, wherein the task request is a request for a process task and the first processing unit is a processing unit selected from multiple processing units.
[0014] Exemplarily, the processing unit cluster and the client can communicate via the WebSocket (a communication protocol) protocol, the task request can be specifically a task request to run or stop the PRA robot, and the first processing unit can be specifically the PRA console instance 1 in the processing unit cluster.
[0015] Furthermore, the first processing unit determines whether it can process the task request. If the first processing unit cannot process the task request, it generates a broadcast message corresponding to the task request and pushes the broadcast message to the message repository, wherein the broadcast message is a notification message that is publicly disseminated.
[0016] Exemplarily, the first processing unit may specifically be a PRA console instance 1 in the processing unit cluster, and the broadcast message may specifically be a message that the PRA console instance 1 cannot process the task request.
[0017] Furthermore, multiple processing units monitor messages in the message storage library. When a broadcast message is received in the message storage library, multiple processing units respectively judge the task request, determine the processing unit that can process the task request, and determine the above processing unit as the second processing unit, wherein the second processing unit is a processing unit that can process the task request.
[0018] Exemplarily, the multiple processing units may specifically include multiple PRA console instances, and the second processing unit may specifically be PRA console instance 2.
[0019] Furthermore, the second processing unit processes the task request, generates a response message corresponding to the task request, and sends the response message to the client, wherein the response message is a feedback message corresponding to the task request.
[0020] It should be noted that the processing unit cluster can simultaneously receive multiple task requests respectively sent by multiple clients, and select multiple processing units capable of processing the multiple task requests in turn through the message storage library, thereby enabling the processing unit cluster to process the multiple task requests.
[0021] Exemplarily, the response message may specifically include an instruction message for running or stopping the PRA robot.
[0022] Exemplarily, in the case that the first processing unit can process the task request, the first processing unit processes the task request and sends a response message of the task request to the client.
[0023] The operation method of the process scheduling system in the present technical solution processes the task request through the first processing unit among multiple processing units after receiving the task request from the client. If the first processing unit cannot process the task request, a broadcast message of the task request is generated and the broadcast message is pushed to the message repository. Through the broadcast message in the message repository, the multiple processing units determine the second processing unit that can process the task request, and send a reply message of the broadcast message to the client through the second processing unit, thereby ensuring the operation stability and operation efficiency of the process scheduling system. At the same time, the message repository is used to ensure that the processing unit cluster can process multiple task requests, thereby improving the operation performance of the process scheduling system.
[0024] The operation method of the process scheduling system according to the present invention may also have the following additional technical features:
[0025] In the above technical solution, determining the second processing unit through the broadcast message in the message storage library specifically includes: monitoring whether the message storage library receives the broadcast message; and determining the second processing unit when the broadcast message is received in the message storage library.
[0026] The operation method of the process scheduling system in the present technical solution ensures the operation stability of the process scheduling system by monitoring the broadcast messages in the message storage repository, and at the same time, further improves the scheduling efficiency of the process scheduling system.
[0027] In the above technical solution, determining the second processing unit specifically includes: determining the storage status of the connection identifier corresponding to the client in any processing unit among the multiple processing units; and determining the processing unit storing the connection identifier as the second processing unit.
[0028] The operation method of the process scheduling system in the present technical solution determines the second processing unit through the storage status of the connection identifier inside the processing unit, thereby ensuring the accuracy of determining the second processing unit among multiple processing units. At the same time, the completion efficiency of the task request is ensured through the second processing unit.
[0029] In the above technical solution, the second processing unit determines the response message of the broadcast message, specifically including: obtaining task information corresponding to the task request; and determining the broadcast message according to the task information.
[0030] The operation method of the process scheduling system in the present technical solution determines the broadcast message corresponding to the task request through the task information corresponding to the task request, thereby ensuring the information integrity of the broadcast message and further ensuring the information accuracy of the task determined by the broadcast message.
[0031] In the above technical solution, the process scheduling system includes a task repository. When the first processing unit is unable to process the task request, the operation method of the process scheduling system also includes: obtaining the task result from the task repository; combining the task request and the broadcast message into a process task corresponding to the task request, and storing the process task in the task repository.
[0032] The operation method of the process scheduling system in this technical solution determines the process task corresponding to the task request, and stores the process task in the task repository. The task repository ensures the completion of the process task corresponding to the task request, thereby ensuring the processing efficiency of the process scheduling system for the process task.
[0033] In the above technical solution, after the process task is stored in the task repository, it also includes: the second processing unit obtains the process task in the task repository according to the broadcast message, executes the task request in the process task, and generates a response message.
[0034] The operation method of the process scheduling system in this technical solution determines the process task corresponding to the task request, and stores the process task in the task repository. The task repository ensures the completion of the process task corresponding to the task request, thereby improving the processing efficiency of the process scheduling system for the process task.
[0035] According to a second aspect of the present invention, an operating device of a process scheduling system is proposed. The process scheduling system includes a processing unit cluster and a message repository. The processing unit cluster includes multiple processing units. The operating device of the process scheduling system includes: a processing module, which is used to receive a task request from a client and randomly determine a first processing unit among multiple processing units; the processing module is also used to determine a broadcast message corresponding to the task request when the first processing unit cannot process the task request, and push the broadcast message to the message repository; the processing module is also used to determine a second processing unit through the broadcast message in the message repository, the second processing unit being a processing unit that can process the task request; the processing module is also used to determine a reply message of the broadcast message through the second processing unit, and send the reply message to the client.
[0036] In this technical solution, a running device of a process scheduling system is provided. The process scheduling system is a system for automatically scheduling process tasks. The process scheduling system internally includes a processing unit cluster and a message storage repository. It should be noted that the message storage repository is a cache space for storing messages, and the processing unit cluster includes multiple processing units. The processing unit cluster is an operation set composed of multiple processing units, wherein the processing unit is an operation unit that executes tasks.
[0037] Exemplarily, the process scheduling system may be specifically a process application system composed of PRA (robotic process automation) software, the multiple processing units may specifically include multiple PRA console instances, and the message storage repository may be specifically an MQ (message queue).
[0038] Furthermore, the processing module controls the processing unit cluster to establish a communication connection with the client and receive a task request sent by the client. After receiving the task request, the processing unit cluster randomly selects a first processing unit from multiple processing units and processes the client's task request through the first processing unit, wherein the task request is a request for a process task and the first processing unit is a processing unit selected from multiple processing units.
[0039] Exemplarily, the processing unit cluster and the client can communicate via the WebSocket (a communication protocol) protocol, the task request can be specifically a task request to run or stop the PRA robot, and the first processing unit can be specifically the PRA console instance 1 in the processing unit cluster.
[0040] Furthermore, the first processing unit determines whether it can process the task request. If the first processing unit cannot process the task request, it generates a broadcast message corresponding to the task request and pushes the broadcast message to the message repository, wherein the broadcast message is a notification message that is publicly disseminated.
[0041] Exemplarily, the first processing unit may specifically be a PRA console instance 1 in the processing unit cluster, and the broadcast message may specifically be a message that the PRA console instance 1 cannot process the task request.
[0042] Furthermore, multiple processing units monitor messages in the message storage library. When a broadcast message is received in the message storage library, multiple processing units respectively judge the task request, determine the processing unit that can process the task request, and determine the above processing unit as the second processing unit, wherein the second processing unit is a processing unit that can process the task request.
[0043] Exemplarily, the multiple processing units may specifically include multiple PRA console instances, and the second processing unit may specifically be PRA console instance 2.
[0044] Furthermore, the second processing unit processes the task request, generates a response message corresponding to the task request, and sends the response message to the client, wherein the response message is a feedback message corresponding to the task request.
[0045] It should be noted that the processing unit cluster can simultaneously receive multiple task requests respectively sent by multiple clients, and select multiple processing units capable of processing the multiple task requests in turn through the message storage library, thereby enabling the processing unit cluster to process the multiple task requests.
[0046] Exemplarily, the response message may specifically include an instruction message for running or stopping the PRA robot.
[0047] Exemplarily, in the case that the first processing unit can process the task request, the first processing unit processes the task request and sends a response message of the task request to the client.
[0048] After receiving the task request from the client, the operating device of the process scheduling system in the present technical solution processes the task request through the first processing unit among multiple processing units. If the first processing unit cannot process the task request, a broadcast message of the task request is generated and the broadcast message is pushed to the message repository. Through the broadcast message in the message repository, the multiple processing units determine the second processing unit that can process the task request, and send a reply message of the broadcast message to the client through the second processing unit, thereby ensuring the operating stability and operating efficiency of the process scheduling system. At the same time, the message repository is used to ensure that the processing unit cluster can process multiple task requests, thereby improving the operating performance of the process scheduling system.
[0049] According to the third aspect of the present invention, a process scheduling system operation device is proposed, comprising a processor and a memory, wherein a program or instruction is stored in the memory, and when the program or instruction is executed by the processor, the steps of the process scheduling system operation method in any of the above technical solutions are implemented. Therefore, the process scheduling system operation device has all the beneficial effects of the process scheduling system operation method in any of the above technical solutions, which will not be repeated here.
[0050] According to a fourth aspect of the present invention, a readable storage medium is provided, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the operating method of the process scheduling system in any of the above technical solutions is implemented. Therefore, the readable storage medium has all the beneficial effects of the operating method of the process scheduling system in any of the above technical solutions, which will not be repeated here.
[0051] According to a fifth aspect of the present invention, a process scheduling system is proposed, comprising: an operating device of the process scheduling system as defined in the above second aspect, or an operating device of the process scheduling system as defined in the above third aspect, and / or a readable storage medium as defined in the above fourth aspect, thereby having all the beneficial technical effects of the operating device of the process scheduling system as defined in the above second aspect, or an operating device of the process scheduling system as defined in the above third aspect, and / or the readable storage medium as defined in the above fourth aspect, and no further details will be given here.
[0052] Additional aspects and advantages of the present invention will become apparent in the following description or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0054] Figure 1 One of the flowchart diagrams of the operation method of the process scheduling system in the first embodiment of the present invention is shown;
[0055] Figure 2 A second flowchart diagram of the operation method of the process scheduling system in the first embodiment of the present invention is shown;
[0056] Figure 3 A third flowchart diagram of the operation method of the process scheduling system in the first embodiment of the present invention is shown;
[0057] Figure 4 A fourth flowchart diagram of the operation method of the process scheduling system in the first embodiment of the present invention is shown;
[0058] Figure 5 A fifth flowchart diagram of the operation method of the process scheduling system in the first embodiment of the present invention is shown;
[0059] Figure 6 A sixth flowchart diagram showing the operating method of the process scheduling system in the first embodiment of the present invention;
[0060] Figure 7 A structural block diagram showing an operating device of a process scheduling system in a second embodiment of the present invention is shown;
[0061] Figure 8 One of the schematic diagrams showing the operating device of the process scheduling system in the second embodiment of the present invention;
[0062] Fig. 9 A second schematic diagram showing an operating device of a process scheduling system in a second embodiment of the present invention;
[0063] Fig.10 A third schematic diagram showing an operating device of a process scheduling system in a second embodiment of the present invention;
[0064] Fig.11 A fourth schematic diagram showing the operating device of the process scheduling system in the second embodiment of the present invention;
[0065] Fig.12 A structural block diagram of an operating device of a process scheduling system in a third embodiment of the present invention is shown. DETAILED DESCRIPTION
[0066] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.
[0067] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0068] Combine the following Figures 1 to 12 , the process scheduling system and its operation method, operation device and readable storage medium provided in the embodiments of the present application are described in detail through specific embodiments and their application scenarios.
[0069] Embodiment 1:
[0070] like Figure 1 As shown, a first embodiment of the present invention provides an operating method of a process scheduling system, the process scheduling system includes a processing unit cluster and a message storage library, the processing unit cluster includes multiple processing units, and the operating method of the process scheduling system includes:
[0071] Step 102, receiving a task request from a client, and randomly determining a first processing unit among a plurality of processing units;
[0072] Step 104, when the first processing unit cannot process the task request, determine a broadcast message corresponding to the task request, and push the broadcast message to the message storage;
[0073] Step 106, determining a second processing unit through the broadcast message in the message storage library, where the second processing unit is a processing unit capable of processing the task request;
[0074] Step 108: Determine a response message for the broadcast message through the second processing unit, and send the response message to the client.
[0075] In this embodiment, a method for operating a process scheduling system is provided. The process scheduling system is a system for automatically scheduling process tasks. The process scheduling system includes a processing unit cluster and a message storage repository. It should be noted that the message storage repository is a cache space for storing messages, and the processing unit cluster includes multiple processing units. The processing unit cluster is an operation set composed of multiple processing units, wherein the processing unit is an operation unit that executes tasks.
[0076] Exemplarily, the process scheduling system may be specifically a process application system composed of PRA (robotic process automation) software, the multiple processing units may specifically include multiple PRA console instances, and the message storage repository may be specifically an MQ (message queue).
[0077] Furthermore, the processing unit cluster establishes a communication connection with the client and receives a task request sent by the client. After receiving the task request, the processing unit cluster randomly selects a first processing unit from multiple processing units and processes the client's task request through the first processing unit, wherein the task request is a request for a process task and the first processing unit is a processing unit selected from multiple processing units.
[0078] Exemplarily, the processing unit cluster and the client can communicate via the WebSocket (a communication protocol) protocol, the task request can be specifically a task request to run or stop the PRA robot, and the first processing unit can be specifically the PRA console instance 1 in the processing unit cluster.
[0079] Furthermore, the first processing unit determines whether it can process the task request. If the first processing unit cannot process the task request, it generates a broadcast message corresponding to the task request and pushes the broadcast message to the message repository, wherein the broadcast message is a notification message that is publicly disseminated.
[0080] Exemplarily, the first processing unit may specifically be a PRA console instance 1 in the processing unit cluster, and the broadcast message may specifically be a message that the PRA console instance 1 cannot process the task request.
[0081] Furthermore, multiple processing units monitor messages in the message storage library. When a broadcast message is received in the message storage library, multiple processing units respectively judge the task request, determine the processing unit that can process the task request, and determine the above processing unit as the second processing unit, wherein the second processing unit is a processing unit that can process the task request.
[0082] Exemplarily, the multiple processing units may specifically include multiple PRA console instances, and the second processing unit may specifically be PRA console instance 2.
[0083] Furthermore, the second processing unit processes the task request, generates a response message corresponding to the task request, and sends the response message to the client, wherein the response message is a feedback message corresponding to the task request.
[0084] It should be noted that the processing unit cluster can simultaneously receive multiple task requests respectively sent by multiple clients, and select multiple processing units capable of processing the multiple task requests in turn through the message storage library, thereby enabling the processing unit cluster to process the multiple task requests.
[0085] Exemplarily, the response message may specifically include an instruction message for running or stopping the PRA robot.
[0086] Exemplarily, in the case that the first processing unit can process the task request, the first processing unit processes the task request and sends a response message of the task request to the client.
[0087] The operation method of the process scheduling system in this embodiment processes the task request through the first processing unit among multiple processing units after receiving the task request from the client. When the first processing unit cannot process the task request, a broadcast message of the task request is generated and the broadcast message is pushed to the message repository. Through the broadcast message in the message repository, the multiple processing units determine the second processing unit that can process the task request, and send a reply message of the broadcast message to the client through the second processing unit, thereby ensuring the operation stability and operation efficiency of the process scheduling system. At the same time, the message repository is used to ensure that the processing unit cluster can process multiple task requests, thereby improving the operation performance of the process scheduling system.
[0088] like Figure 2 As shown, in any of the above embodiments, the operation method of the process scheduling system includes:
[0089] Step 202, receiving a task request from a client, and randomly determining a first processing unit among a plurality of processing units;
[0090] Step 204, when the first processing unit cannot process the task request, determine the broadcast message corresponding to the task request, and push the broadcast message to the message storage;
[0091] Step 206, monitoring whether the message storage repository receives the broadcast message;
[0092] Step 208, when a broadcast message is received in the message storage, determining a second processing unit;
[0093] Step 210: Determine a response message for the broadcast message through the second processing unit, and send the response message to the client.
[0094] In this embodiment, multiple processing units in the processing unit cluster monitor the broadcast message in the message storage.
[0095] Furthermore, when it is monitored that the message repository receives a broadcast message, it means that the first processing unit cannot process the task request. Multiple processing units respectively determine whether they can process the task request corresponding to the broadcast message, and set the processing unit that can process the task request as the second processing unit.
[0096] Exemplarily, the multiple processing units may specifically include multiple PRA console instances, the second processing unit may specifically be PRA console instance 2, and the second processing unit may determine whether the second processing unit can process the task request by whether there is a session (conference object) in the internal cache of the second processing unit.
[0097] Exemplarily, the message storage repository may specifically be a Kafka (a messaging system) message repository.
[0098] The operation method of the process scheduling system in this embodiment ensures the operation stability of the process scheduling system by monitoring the broadcast messages in the message storage library, and at the same time, further improves the scheduling efficiency of the process scheduling system.
[0099] like Figure 3 As shown, in any of the above embodiments, the operation method of the process scheduling system includes:
[0100] Step 302, receiving a task request from a client, and randomly determining a first processing unit among a plurality of processing units;
[0101] Step 304, when the first processing unit cannot process the task request, determine the broadcast message corresponding to the task request, and push the broadcast message to the message storage;
[0102] Step 306, monitoring whether the message storage repository receives the broadcast message;
[0103] Step 308, when a broadcast message is received in the message storage repository, determining a storage state of a connection identifier corresponding to the client in any processing unit among the plurality of processing units;
[0104] Step 310, determining the processing unit storing the connection identifier as the second processing unit;
[0105] Step 312: Determine a response message for the broadcast message through the second processing unit, and send the response message to the client.
[0106] In this embodiment, multiple processing units in the processing unit cluster monitor the broadcast messages in the message storage repository. When they monitor that the message storage repository receives the broadcast message, it means that the first processing unit cannot process the task request. The multiple processing units respectively determine the storage status of the connection identifier inside the processing unit, wherein the connection identifier is an identifier for establishing a communication connection between the processing unit and the client, and the storage status is the storage status of the connection identifier inside the processing unit.
[0107] It should be noted that, when the connection identifier is stored inside the processing unit, it means that the processing unit can process the task request, and when the connection identifier is not stored inside the processing unit, it means that the processing unit cannot process the task request.
[0108] Exemplarily, the connection identifier may specifically be a session (conference object) within the PRA console instance.
[0109] Furthermore, the multiple processing units determine a processing unit storing a connection identifier in an internal cache, and set the processing unit as the second processing unit.
[0110] Exemplarily, the multiple processing units may specifically include multiple PRA console instances, and PRA console instance 2 among the multiple PRA console instances may process the task request, and PRA console instance 2 may be set as the second processing unit.
[0111] The operation method of the process scheduling system in this embodiment determines the second processing unit through the storage status of the internal connection identifier of the processing unit, thereby ensuring the accuracy of determining the second processing unit among multiple processing units. At the same time, the completion efficiency of the task request is guaranteed through the second processing unit.
[0112] like Figure 4 As shown, in any of the above embodiments, the operation method of the process scheduling system includes:
[0113] Step 402, receiving a task request from a client, and randomly determining a first processing unit among a plurality of processing units;
[0114] Step 404, when the first processing unit cannot process the task request, determine the broadcast message corresponding to the task request, and push the broadcast message to the message storage;
[0115] Step 406, determining a second processing unit through the broadcast message in the message storage library, where the second processing unit is a processing unit capable of processing the task request;
[0116] Step 408, obtaining task information corresponding to the task request through the second processing unit;
[0117] Step 410, determine the broadcast message according to the task information, and send a response message to the client.
[0118] In this embodiment, the second processing unit obtains task information corresponding to the task request, wherein the task information includes information such as a sequence number of the task and a status of the task.
[0119] Furthermore, the second processing unit determines message parameters, combines the task information and the message parameters into a broadcast message, and sends a response message to the client, wherein the message parameters include parameters such as a message sequence number and a message time.
[0120] Exemplarily, the format of the broadcast message can be specifically the data format shown in Table 1. The broadcast message can specifically include information such as messageId, businessId, status, expired and boby, where messageId is the unique serial number of the broadcast message, businessId is the serial number of the task, status is the status of the task, expired is the valid time of the message, and boby is the message body, indicating the data format of the broadcast message.
[0121] Table 1
[0122] "messageId": "XXX" "businessId": "XXX" "status": "XXX" "expired": "XXX" "boby": "XXX"
[0123] The operation method of the process scheduling system in this embodiment determines the broadcast message corresponding to the task request through the task information corresponding to the task request, thereby ensuring the information integrity of the broadcast message and further ensuring the information accuracy of the task determined by the broadcast message.
[0124] like Figure 5 As shown, in any of the above embodiments, the operation method of the process scheduling system includes:
[0125] Step 502, receiving a task request from a client, and randomly determining a first processing unit among a plurality of processing units;
[0126] Step 504, when the first processing unit cannot process the task request, determine the broadcast message corresponding to the task request, and push the broadcast message to the message storage;
[0127] Step 506, obtaining the task result from the task repository;
[0128] Step 508, combining the task request and the broadcast message into a process task corresponding to the task request, and storing the process task in a task repository;
[0129] Step 510, determining a second processing unit through the broadcast message in the message storage library, where the second processing unit is a processing unit capable of processing the task request;
[0130] Step 512: Determine a response message for the broadcast message through the second processing unit, and send the response message to the client.
[0131] In this embodiment, a task repository is provided inside the process scheduling system, and the task repository is a storage area for storing process tasks, wherein the process tasks are tasks corresponding to task requests.
[0132] Exemplarily, the process task may specifically be a task of running or stopping an RPA robot.
[0133] Further, in the case that the first processing unit cannot process the task request, the first processing unit obtains the task result corresponding to the task repository.
[0134] Exemplarily, the task repository may specifically be a local task queue, and the task result may specifically be a result returned asynchronously by the local task queue.
[0135] Furthermore, the first processing unit performs data combination processing on the task request and the broadcast message to obtain a process task corresponding to the task request, and stores the process task in a task storage repository.
[0136] Exemplarily, the first processing unit can package the broadcast message and the DeferredResult class (deferred result class) that can asynchronously return results into a process task and put it into the task repository, where the DeferredResult class is a functional class that can implement asynchronous processing. The DeferredResult class can set the preset time of the process task. When the processing time of the process task exceeds the preset time and the process task has not been processed, a response message indicating that the task request processing failed can be generated.
[0137] Furthermore, the first processing unit acquires the task status of the process task and stores the task status of the process task in a task status set, wherein the task status includes states such as unprocessed task and processed task, and the task status set is a data set for storing the task status.
[0138] Exemplarily, the task status set may specifically be Redis (a type of database).
[0139] The operation method of the process scheduling system in this embodiment determines the process task corresponding to the task request, and stores the process task in the task repository. The task repository ensures the completion of the process task corresponding to the task request, thereby ensuring the processing efficiency of the process scheduling system for the process task.
[0140] like Figure 6 As shown, in any of the above embodiments, the operation method of the process scheduling system includes:
[0141] Step 602, receiving a task request from a client, and randomly determining a first processing unit among a plurality of processing units;
[0142] Step 604, when the first processing unit cannot process the task request, determine the broadcast message corresponding to the task request, and push the broadcast message to the message storage;
[0143] Step 606, obtaining the task result from the task repository;
[0144] Step 608, combining the task request and the broadcast message into a process task corresponding to the task request, and storing the process task in a task repository;
[0145] Step 610, determining a second processing unit through the broadcast message in the message storage library, where the second processing unit is a processing unit capable of processing the task request;
[0146] Step 612: The second processing unit obtains the process task in the task repository according to the broadcast message, executes the task request in the process task, generates a response message, and sends the response message to the client.
[0147] In this embodiment, the second processing unit determines the task request of the client according to the broadcast message, and then obtains the process task from the task repository according to the task request.
[0148] Furthermore, the second processing unit processes the flow task, generates a response message corresponding to the task request, and sends the response message to the client.
[0149] Exemplarily, the process task may specifically be to stop the RPA robot, and the second processing unit may execute the task of stopping the RPA robot.
[0150] Further, after processing the process task, the second processing unit deletes the process task in the task repository, and at the same time, the second processing unit updates the task status in the task status set.
[0151] Exemplarily, the second processing unit may modify the task status of the process task from unprocessed to processed.
[0152] The operation method of the process scheduling system in this embodiment determines the process task corresponding to the task request, and stores the process task in the task repository. The task repository ensures the completion of the process task corresponding to the task request, thereby improving the processing efficiency of the process scheduling system for the process task.
[0153] Embodiment 2:
[0154] like Figure 7 As shown, in a second embodiment of the present invention, a running device of a process scheduling system is provided. The process scheduling system includes a processing unit cluster and a message storage repository. The processing unit cluster includes multiple processing units. The running device of the process scheduling system includes:
[0155] The processing module 702 is used to receive a task request from a client and randomly determine a first processing unit among a plurality of processing units;
[0156] The processing module 702 is further used to determine the broadcast message corresponding to the task request and push the broadcast message to the message storage repository when the first processing unit cannot process the task request;
[0157] The processing module 702 is further used to determine a second processing unit through the broadcast message in the message storage library, where the second processing unit is a processing unit capable of processing the task request;
[0158] The processing module 702 is further configured to determine a response message to the broadcast message through the second processing unit, and send the response message to the client.
[0159] In this embodiment, a running device of a process scheduling system is provided. The process scheduling system is a system for automatically scheduling process tasks. The process scheduling system includes a processing unit cluster and a message storage repository. It should be noted that the message storage repository is a cache space for storing messages, and the processing unit cluster includes multiple processing units. The processing unit cluster is an operation set composed of multiple processing units, wherein the processing unit is an operation unit that executes tasks.
[0160] Exemplarily, the process scheduling system may be specifically a process application system composed of PRA (robotic process automation) software, the multiple processing units may specifically include multiple PRA console instances, and the message storage repository may be specifically an MQ (message queue).
[0161] Furthermore, the processing module 702 controls the processing unit cluster to establish a communication connection with the client and receive a task request sent by the client. After receiving the task request, the processing unit cluster randomly selects a first processing unit from multiple processing units and processes the client's task request through the first processing unit, wherein the task request is a request for a process task and the first processing unit is a processing unit selected from multiple processing units.
[0162] Exemplarily, the processing unit cluster and the client can communicate via the WebSocket (a communication protocol) protocol, the task request can be specifically a task request to run or stop the PRA robot, and the first processing unit can be specifically the PRA console instance 1 in the processing unit cluster.
[0163] Furthermore, the first processing unit determines whether it can process the task request. If the first processing unit cannot process the task request, it generates a broadcast message corresponding to the task request and pushes the broadcast message to the message repository, wherein the broadcast message is a notification message that is publicly disseminated.
[0164] Exemplarily, the first processing unit may specifically be a PRA console instance 1 in the processing unit cluster, and the broadcast message may specifically be a message that the PRA console instance 1 cannot process the task request.
[0165] Furthermore, multiple processing units monitor messages in the message storage library. When a broadcast message is received in the message storage library, multiple processing units respectively judge the task request, determine the processing unit that can process the task request, and determine the above processing unit as the second processing unit, wherein the second processing unit is a processing unit that can process the task request.
[0166] Exemplarily, the multiple processing units may specifically include multiple PRA console instances, and the second processing unit may specifically be PRA console instance 2.
[0167] Furthermore, the second processing unit processes the task request, generates a response message corresponding to the task request, and sends the response message to the client, wherein the response message is a feedback message corresponding to the task request.
[0168] It should be noted that the processing unit cluster can simultaneously receive multiple task requests respectively sent by multiple clients, and select multiple processing units capable of processing the multiple task requests in turn through the message storage library, thereby enabling the processing unit cluster to process the multiple task requests.
[0169] Exemplarily, the response message may specifically include an instruction message for running or stopping the PRA robot.
[0170] Exemplarily, in the case that the first processing unit can process the task request, the first processing unit processes the task request and sends a response message of the task request to the client.
[0171] For example, Figure 8 As shown, the processing unit cluster can be specifically Figure 8 The processing unit cluster may include RPA console instance 1, RPA console instance 2, and RPA console instance 3. The message repository may be specifically Figure 8 In the basic middleware of kafka (a messaging system), the first processing unit can be specifically Figure 8 In the RPA console instance 3, the second processing unit can be specifically Figure 8 RPA console instance 1 in (RPA console instance 1 can push messages to the client), the broadcast message can be specifically Figure 8 In the example "Instance 3 cannot process broadcast information", the client can specify Figure 8In the client 1 or RPA console front end, the client can register with the processing unit cluster. Multiple processing units can listen to the message repository by listening to the topic. The process scheduling system also includes the local task queue of instance 3, where task1, task2 and task3 can be stored in the local task queue. The basic middleware also includes redis (a database) and mysql (a database).
[0172] For example, Fig. 9 As shown, the task request can be specifically Fig. 9 The processing unit cluster can be specifically Fig. 9 The rpa-socket (an interface) cluster in the embodiment specifically includes n nodes from node 1 to node n, wherein each node belongs to a different consumer group to listen to the same topic, and each node processes the same message automatically ack (confirmation character) for subscription information. Meanwhile, the first processing unit can be specifically Fig. 9 In node 1, the first processing unit determines whether the broadcast message is sent by itself, and locally caches whether there is a processed message and sets the status of the task message according to the message id of the broadcast message. After the asynchronous thread corresponding to the first processing unit ends, the message is fed back to the processing unit cluster.
[0173] For example, Fig. 9 As shown, the processing unit cluster starts to asynchronously wait for tasks to be put into the task queue and sets a timeout. When the timeout is triggered, it determines whether the message is processed and sends a reply message to the client. The message repository can be specifically Fig. 9 MQ (message queue) in.
[0174] For example, Fig. 9 As shown, the first processing unit may be specifically Fig. 9 In node 1, the first processing unit determines whether there is a session (conference object) in the local cache. If the session exists, the first processing unit sends a broadcast message to the client. If the session does not exist, the first processing unit can determine whether the client has registered the instance. If not, the process ends. If already registered, the first processing unit puts the message id of the broadcast message into the set list of redis and broadcasts the message through MQ. The process scheduling system can also include a redis (a database) cache.
[0175] After receiving the task request from the client, the operating device of the process scheduling system in this embodiment processes the task request through the first processing unit among multiple processing units. If the first processing unit cannot process the task request, a broadcast message of the task request is generated and the broadcast message is pushed to the message repository. Through the broadcast message in the message repository, the multiple processing units determine the second processing unit that can process the task request, and send a reply message of the broadcast message to the client through the second processing unit, thereby ensuring the operating stability and operating efficiency of the process scheduling system. At the same time, the message repository is used to ensure that the processing unit cluster can process multiple task requests, thereby improving the operating performance of the process scheduling system.
[0176] In any of the above embodiments, the operation device 700 of the process scheduling system includes:
[0177] Processing module 702, used to monitor whether the message storage repository receives the broadcast message;
[0178] The processing module 702 is further configured to determine a second processing unit when a broadcast message is received in the message storage repository.
[0179] The operation device of the process scheduling system in this embodiment ensures the operation stability of the process scheduling system by monitoring the broadcast messages in the message storage library, and at the same time, further improves the scheduling efficiency of the process scheduling system.
[0180] In any of the above embodiments, the operation device 700 of the process scheduling system includes:
[0181] The processing module 702 is used to determine the storage status of the connection identifier corresponding to the client in any processing unit among the multiple processing units;
[0182] The processing module 702 is further configured to determine the processing unit storing the connection identifier as the second processing unit.
[0183] The operating device of the process scheduling system in this embodiment determines the second processing unit through the storage status of the internal connection identifier of the processing unit, thereby ensuring the accuracy of determining the second processing unit among multiple processing units. At the same time, the completion efficiency of the task request is guaranteed through the second processing unit.
[0184] In any of the above embodiments, the operation device 700 of the process scheduling system includes:
[0185] Processing module 702, used to obtain task information corresponding to the task request;
[0186] The processing module 702 is further configured to determine a broadcast message according to the task information.
[0187] The running device of the process scheduling system in this embodiment determines the broadcast message corresponding to the task request through the task information corresponding to the task request, thereby ensuring the information integrity of the broadcast message and further ensuring the information accuracy of the task determined by the broadcast message.
[0188] In any of the above embodiments, the operation device 700 of the process scheduling system includes:
[0189] Processing module 702, used to obtain the task result of the task repository;
[0190] The processing module 702 is further configured to combine the task request and the broadcast message into a process task corresponding to the task request, and store the process task in a task repository.
[0191] For example, Fig.10 As shown, the second processing unit can obtain the processing status of the message. Specifically, the second processing unit determines the status of the process task according to the message processing scenario, wherein the status of the process task can be represented by State, State = 0 indicates that the message has just been sent, State = 1 indicates that the process task is processed by a certain node, State = 2 indicates that the broadcast message has timed out, after scenario 1 is correctly processed, State changes from 0 to 1, and when the broadcast message of scenario 2 times out, State changes from 0 to 2, wherein the cache used to mark the processing status can store the broadcast message, and the format of the broadcast message can be specifically as follows: Fig.10 The data format shown in the figure, where messageId is the unique serial number of the broadcast message, businessId is the serial number of the process task, State is the state of the process task, expired is a timestamp indicating the validity period of the message, and Msg indicates the processing result.
[0192] For example, Fig.10 As shown, the task repository can be specifically Fig.10 The task queue in the task repository may include multiple task queues. The second processing unit may obtain the task from the task repository and may obtain the state (State) of the process task in the cache. When State=0, the process task is skipped and the process task is re-acquired. When State=1, the correct value is returned and the cache is deleted. When State=2, the cache is deleted.
[0193] The running device of the process scheduling system in this embodiment determines the process task corresponding to the task request and stores the process task in the task repository. The task repository ensures the completion of the process task corresponding to the task request, thereby ensuring the processing efficiency of the process scheduling system for the process task.
[0194] In any of the above embodiments, the operation device 700 of the process scheduling system includes:
[0195] The processing module 702 is used for the second processing unit to obtain the process task in the task repository according to the broadcast message, execute the task request in the process task, and generate a response message.
[0196] For example, Fig.11 As shown, the task repository can be specifically a local task queue, including multiple process tasks such as Task 1, Task 2, Task 3, Task 4, etc. The processing unit cluster receives the task request, and the task request can be specifically an Http (a communication protocol) request. The first processing unit puts the process task corresponding to the task request into the task repository, and then the processing unit cluster performs business thread processing. After the second processing unit listens to the broadcast message, it obtains the process task from the task repository and processes the process task. At the same time, it generates a response message and sends the response message to the client, ending the entire Http request. The process of processing the task request includes the life cycle of the Servlet (service connector) thread and the life cycle of the Http request.
[0197] The running device of the process scheduling system in this embodiment determines the process task corresponding to the task request and stores the process task in the task repository. The task repository ensures the completion of the process task corresponding to the task request, thereby improving the processing efficiency of the process scheduling system for the process task.
[0198] Embodiment three:
[0199] like Fig.12 As shown, in the third embodiment of the present invention, a running device of a process scheduling system is provided, and the running device 1200 of the process scheduling system includes a processor 1202 and a memory 1204, and the memory 1204 stores a program or instruction, and when the program or instruction is executed by the processor 1202, the steps of the running method of the process scheduling system in any of the above technical solutions are implemented. Therefore, the running device of the process scheduling system has all the beneficial effects of the running method of the process scheduling system in any of the above technical solutions, which will not be repeated here.
[0200] Embodiment 4:
[0201] A fourth embodiment of the present invention provides a readable storage medium on which a program is stored. When the program is executed by a processor, it implements an operating method of a process scheduling system as in any of the above embodiments, thereby having all the beneficial technical effects of the operating method of a process scheduling system in any of the above embodiments.
[0202] The readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0203] Embodiment five:
[0204] A fifth embodiment of the present invention provides a process scheduling system, including: an operating device of the process scheduling system in any of the above embodiments, and / or a readable storage medium in any of the above embodiments, and thus has all the beneficial technical effects of the operating device of the process scheduling system in any of the above embodiments, and / or the readable storage medium in any of the above embodiments, and no further details will be given here.
[0205] It should be clarified that in the claims, specification and drawings of the present invention, the term "multiple" refers to two or more than two. Unless otherwise clearly defined, the orientation or position relationship indicated by the terms "upper" and "lower" is based on the orientation or position relationship shown in the drawings, which is only for the purpose of more conveniently describing the present invention and making the description process simpler, rather than indicating or implying that the device or element referred to must have the specific orientation described, be constructed and operated in a specific orientation, so these descriptions cannot be understood as limiting the present invention; the terms "connect", "install", "fix" and the like should be understood in a broad sense. For example, "connection" can be a fixed connection between multiple objects, or a detachable connection between multiple objects, or an integral connection; it can be a direct connection between multiple objects, or an indirect connection between multiple objects through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances of the above data.
[0206] In the claims, specification and drawings of the present invention, the description of the terms "one embodiment", "some embodiments", "specific embodiments" and the like means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In the claims, specification and drawings of the present invention, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0207] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for operating a process scheduling system, characterized in that: The process scheduling system includes a processing unit cluster, a task repository and a message repository, the processing unit cluster includes a plurality of processing units, and the operation method of the process scheduling system includes: receiving a task request from a client, and randomly determining a first processing unit among the plurality of processing units; In the case where the first processing unit cannot process the task request, determining a broadcast message corresponding to the task request, and pushing the broadcast message to the message repository; and; obtaining a task result from the task repository, combining the task request and the broadcast message into a process task corresponding to the task request, and storing the process task in the task repository; Determining a second processing unit through the broadcast message in the message storage repository, where the second processing unit is a processing unit capable of processing the task request; Determine, by the second processing unit, a response message for the broadcast message, and send the response message to the client; The determining, by the second processing unit, a response message to the broadcast message specifically includes: The second processing unit obtains the process task in the task repository according to the broadcast message, executes the task request in the process task, and generates the response message; The determining the second processing unit by using the broadcast message in the message storage repository specifically includes: Monitoring whether the message storage repository receives the broadcast message; In case the broadcast message is received in the message storage repository, the second processing unit is determined.
2. The operation method of the process scheduling system according to claim 1, characterized in that: The determining the second processing unit by using the broadcast message in the message storage repository specifically includes: Determine a storage status of a connection identifier corresponding to the client in any processing unit among the multiple processing units; A processing unit storing the connection identifier is determined as the second processing unit.
3. The operation method of the process scheduling system according to claim 1, characterized in that: The determining the second processing unit specifically includes: Obtaining task information corresponding to the task request; The broadcast message is determined according to the task information.
4. An operating device of a process scheduling system, characterized in that: The operating method of the process scheduling system according to any one of claims 1 to 3 is adopted; the process scheduling system comprises a processing unit cluster, a task repository and a message repository, the processing unit cluster comprises a plurality of processing units, and the operating device of the process scheduling system comprises: A processing module, configured to receive a task request from a client and randomly determine a first processing unit among the plurality of processing units; The processing module is further used to determine a broadcast message corresponding to the task request and push the broadcast message to the message storage repository when the first processing unit cannot process the task request; The processing module is further configured to, when the first processing unit cannot process the task request, obtain a task result from the task repository, combine the task request and the broadcast message into a process task corresponding to the task request, and store the process task in the task repository; The processing module is further used to determine a second processing unit through the broadcast message in the message storage repository, where the second processing unit is a processing unit capable of processing the task request; The processing module is further used to determine a response message of the broadcast message through the second processing unit, and send the response message to the client; The determining, by the second processing unit, a response message to the broadcast message specifically includes: The second processing unit obtains the process task in the task repository according to the broadcast message, executes the task request in the process task, and generates the response message; The determining the second processing unit by using the broadcast message in the message storage repository specifically includes: Monitoring whether the message storage repository receives the broadcast message; In case the broadcast message is received in the message storage repository, the second processing unit is determined.
5. An operating device of a process scheduling system, characterized in that: include: processor; A memory, wherein a program or instruction is stored in the memory, and when the processor executes the program or instruction in the memory, the processor implements the steps of the operation method of the process scheduling system as described in any one of claims 1 to 3.
6. A readable storage medium, characterized in that: The readable storage medium stores programs or instructions, and when the programs or instructions are executed by the processor, the steps of the operation method of the process scheduling system as described in any one of claims 1 to 3 are implemented.
7. A process scheduling system, characterized in that: include: An operating device for a process scheduling system as claimed in claim 4 or 5; and / or The readable storage medium as claimed in claim 6.
