CN116880992A - Task processing system, method and device, electronic equipment and storage medium - Google Patents

Task processing system, method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116880992A
CN116880992A CN202311010929.8A CN202311010929A CN116880992A CN 116880992 A CN116880992 A CN 116880992A CN 202311010929 A CN202311010929 A CN 202311010929A CN 116880992 A CN116880992 A CN 116880992A
Authority
CN
China
Prior art keywords
data
node
service
task
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311010929.8A
Other languages
Chinese (zh)
Inventor
孔祥亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikrobot Co Ltd
Original Assignee
Hangzhou Hikrobot Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikrobot Co Ltd filed Critical Hangzhou Hikrobot Co Ltd
Priority to CN202311010929.8A priority Critical patent/CN116880992A/en
Publication of CN116880992A publication Critical patent/CN116880992A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Abstract

The embodiment of the application provides a task processing system, a task processing method, a task processing device, electronic equipment and a storage medium, and relates to the technical field of communication. The task processing system comprises an interface layer, a service layer and a data layer; the interface layer displays a plurality of processing nodes to be selected in a first display area, determines a data acquisition node and a data issuing node in response to a node selection instruction of a user for the processing nodes displayed in the first display area, generates a target flow chart containing the determined data acquisition node and data issuing node, and displays the target flow chart in a second display area; the service layer responds to the trigger instruction aiming at the target flow chart, and loads node data of processing nodes in the target flow chart based on the execution sequence among the processing nodes in the target flow chart recorded by the data layer so as to acquire first task data from the first service and send second task data to the second service. Therefore, the labor cost can be reduced, the efficiency of task data integration is improved, and the efficiency of task execution is improved.

Description

Task processing system, method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a task processing system, a task processing method, a task processing device, an electronic device, and a storage medium.
Background
Currently, robots are widely used in various scenes to perform various tasks instead of manpower to meet the needs of users. For example, a factory may use robots to handle goods and a hotel may use robots to deliver goods to customers. The robot scheduling service needs to acquire task data to be issued by a user (may be referred to as an upstream service), and further, the robot scheduling service may forward the task data to the robot to execute a task corresponding to the task data.
However, the communication protocols and data formats supported by the different upstream services may be different, as may the communication protocols and data formats supported by the different robotic dispatch services. In the related art, for each upstream service and a corresponding one of the robot scheduling services, a user may manually write a code for a task processing procedure of the upstream service and the robot scheduling service based on a communication protocol and a data format supported by the upstream service and the robot scheduling service in a platform (may be referred to as an interface platform) for data integration, so as to process task data issued by the upstream service based on the task processing procedure and forward the processed task data to the robot scheduling service. As such, the user is required to have specialized code writing capabilities, resulting in high labor costs. Meanwhile, efficiency of acquiring task data and forwarding the task data is reduced, namely efficiency of integrating the task data is reduced, and efficiency of executing the task is low.
Disclosure of Invention
The embodiment of the application aims to provide a task processing system, a task processing method, a task processing device, electronic equipment and a storage medium, so that the labor cost is reduced, the task data integration efficiency is improved, and the task execution efficiency is improved. The specific technical scheme is as follows:
in a first aspect of the embodiment of the present application, there is provided a task processing system, including an interface layer, a service layer, and a data layer;
the interface layer is used for displaying a plurality of processing nodes to be selected in the first display area;
the interface layer is further configured to determine, in response to a node selection instruction of a user for a processing node displayed in the first display area, a data acquisition node for acquiring first task data from the first service according to a communication protocol supported by the first service, and a data transmission node for transmitting second task data to the second service according to a communication protocol supported by the second service, and generate a target flowchart including the determined data acquisition node and the data transmission node, and display the target flowchart in the second display area; the second task data is obtained based on the first task data, and the data format of the second task data is the data format supported by the second service;
The service layer is used for responding to a trigger instruction aiming at the target flow chart, loading node data of processing nodes in the target flow chart based on an execution sequence among the processing nodes in the target flow chart recorded by the data layer, so as to acquire the first task data from the first service and send the second task data to the second service; wherein the node data of any processing node comprises: configuration parameters of the processing node and program code representing execution logic of the processing node.
In some embodiments, the interfacial layer is further to: responding to an execution period setting instruction of a user for the target flow chart, and displaying a first window for setting the execution period of the target flow chart;
and the service layer is used for loading the node data of the processing nodes in the target flow chart based on the execution sequence among the processing nodes in the target flow chart recorded by the data layer when the execution period acquired through the first window is reached, so as to acquire the first task data from the first service and send the second task data to the second service.
In some embodiments, the service layer is specifically configured to:
under the condition that the data acquisition node comprises a message middleware monitoring node, loading node data of the message middleware monitoring node to monitor the message middleware of the first service according to configuration parameters of the message middleware representing the first service in the node data, and acquiring the first task data from the task data to be consumed when the task data to be consumed are monitored; and/or, when the data acquisition node comprises an interface monitoring node, loading node data of the interface monitoring node to monitor a first interface according to configuration parameters representing the first interface in the node data, and acquiring first service data sent by the first service through the first interface when the first service calls the first interface; the first interface is an interface corresponding to the first service in the interfaces of the first interface; and/or, in the case that the data acquisition node includes a file reading node, loading node data of the file reading node, so as to read the first task data from the currently unprocessed task data recorded in the shared file of the first service according to the configuration parameters of the shared file of the first service in the node data; and/or, in the case that the data acquisition node includes an interface reading node, loading node data of the interface reading node, so as to call an interface of the first service to acquire the first task data according to configuration parameters of the interface of the first service in the node data; and/or, in the case that the data acquisition node comprises a database reading node, loading node data of the database reading node, so as to read the first task data from the currently unprocessed task data recorded in the database of the first service according to the configuration parameters of the database of the first service in the node data.
In some embodiments, the service layer is specifically configured to:
loading node data of an interface writing node under the condition that the data issuing node comprises the interface writing node, so as to call an interface of the second service to send the second task data according to configuration parameters of the interface of the second service in the node data;
and/or, in case that the data issuing node includes a message middleware writing node, loading node data of the message middleware writing node, so as to write the second task data in the message middleware of the second service according to configuration parameters of the message middleware of the second service in the node data; and/or, in case that the data issuing node comprises a database writing node, loading node data of the database writing node, so as to write the second task data in the database of the second service according to the configuration parameters of the database of the second service represented in the node data; and/or loading node data of the file writing node under the condition that the data issuing node comprises the file writing node, so as to write the second task data in the shared file of the second service according to the configuration parameters of the shared file of the second service in the node data.
In some embodiments, the service layer is further configured to:
loading node data of a feedback judging node under the condition that the target flow chart comprises the feedback judging node, so as to judge whether the task represented by the second task data is successfully executed according to an execution result of the second task data returned by the second service;
and if the task represented by the second task data is not successfully executed, loading node data of the retry node in the target flow chart so as to resend the second task data to the second service.
In some embodiments, the service layer is specifically configured to:
and loading node data of the conversion node to convert the first task data into a data format supported by the second service to obtain the second task data when the target flow chart comprises the conversion node.
In some embodiments, the service layer is further configured to:
loading node data of a preprocessing node to perform preprocessing operation on the first task data to obtain the second task data when the target flow chart contains the preprocessing node; wherein the preprocessing operation includes at least one of: task data verification, task data splitting, task data merging and redundant data filtering.
In some embodiments, the data layer further records configuration parameters of the processing node in the target flowchart;
the interface layer is further configured to display a second window for editing configuration parameters of the processing node in the target flowchart in response to an editing instruction of the user for the processing node in the target flowchart;
the service layer is further configured to obtain the configuration parameters received through the second window, and update the configuration parameters of the processing node in the target flowchart stored in the data layer based on the obtained configuration parameters.
In some embodiments, the first service is used for issuing task data of a task to be executed by the robot; the data acquisition node is used for acquiring task data of a task required to be executed by the robot from the first service according to a communication protocol supported by the first service, and the task data is used as the first task data;
the second service is a robot scheduling service; the data issuing node is used for sending the second task data to the robot scheduling service according to a communication protocol supported by the robot scheduling service;
the robot scheduling service is used for sending a robot control instruction to a robot based on the received second task data so that the robot executes a task represented by the robot control instruction; the robot control instruction is obtained based on the second task data.
In some embodiments, the interfacial layer is further to: responding to an interface configuration instruction of a user aiming at the interface of the user, and displaying a third window for configuring the interface of the user;
the service layer is further configured to obtain interface information received through the third window, and issue an own interface based on the obtained interface information.
In some embodiments, the interfacial layer is further to: responding to a node creation instruction of a user, and displaying a fourth window for creating the node;
the service layer is further configured to obtain node data received through the fourth window, generate a custom processing node, and store the node data of the custom processing node to the data layer;
the interface layer is further used for displaying the generated custom processing nodes.
In some embodiments, the first service is a plurality of the first services, and the configuration parameter of the data acquisition node includes respective addresses of the plurality of the first services;
and/or the number of the second services is multiple, and the configuration parameters of the data issuing node comprise respective addresses of the second services.
In a second aspect of the embodiment of the present application, a task processing method is provided, where the method is applied to a task processing system, and the task processing system includes an interface layer, a service layer, and a data layer;
The method comprises the following steps:
the interface layer displays a plurality of processing nodes to be selected in a first display area;
the interface layer responds to a node selection instruction of a user for a processing node displayed in the first display area, determines a data acquisition node for acquiring first task data from a first service according to a communication protocol supported by the first service, and a data issuing node for sending second task data to a second service according to a communication protocol supported by the second service, generates a target flow chart comprising the determined data acquisition node and the data issuing node, and displays the target flow chart in the second display area; the second task data is obtained based on the first task data, and the data format of the second task data is the data format supported by the second service;
the service layer responds to a trigger instruction aiming at the target flow chart, and loads node data of processing nodes in the target flow chart based on an execution sequence among the processing nodes in the target flow chart recorded by the data layer so as to acquire the first task data from the first service and send the second task data to the second service; wherein the node data of any processing node comprises: configuration parameters of the processing node and program code representing execution logic of the processing node.
In some embodiments, the method further comprises:
the interface layer responds to an execution period setting instruction of a user aiming at the target flow chart, and displays a first window for setting the execution period of the target flow chart;
and when the service layer reaches the execution period acquired through the first window, loading node data of processing nodes in the target flow chart based on the execution sequence among the processing nodes in the target flow chart recorded by the data layer, so as to acquire the first task data from the first service and send the second task data to the second service.
In some embodiments, when the data acquisition node includes a message middleware monitoring node, the service layer loads node data of the message middleware monitoring node, monitors a message middleware of the first service according to a configuration parameter of the message middleware representing the first service in the node data, and acquires the first task data from the task data to be consumed when the task data to be consumed is monitored; and/or, the service layer loads node data of an interface monitoring node when the data acquisition node comprises the interface monitoring node, monitors a first interface according to configuration parameters representing the first interface in the node data, and acquires first task data sent by the first service through the first interface when the first service calls the first interface; the first interface is an interface corresponding to the first service in the interfaces of the first interface; and/or, the service layer loads node data of a file reading node when the data acquisition node comprises the file reading node, so as to read the first task data from the current unprocessed task data recorded in the shared file of the first service according to the configuration parameters of the shared file of the first service in the node data; and/or, the service layer loads node data of an interface reading node when the data acquisition node comprises the interface reading node, so as to call the interface of the first service to acquire the first task data according to configuration parameters of the interface of the first service in the node data; and/or, the service layer loads node data of a database reading node when the data acquisition node comprises the database reading node, so as to read the first task data from the currently unprocessed task data recorded in the database of the first service according to the configuration parameters of the database of the first service in the node data.
In some embodiments, when the data issuing node includes an interface writing node, the service layer loads node data of the interface writing node, so as to call an interface of the second service to send the second task data according to configuration parameters of the interface of the second service in the node data; and/or, the service layer loads node data of the message middleware writing node when the data issuing node comprises the message middleware writing node, so as to write the second task data in the message middleware of the second service according to the configuration parameters of the message middleware representing the second service in the node data; and/or, the service layer loads node data of the database writing node when the data issuing node comprises the database writing node, so as to write the second task data in the database of the second service according to the configuration parameters of the database of the second service in the node data; and/or, the service layer loads node data of the file writing node when the data issuing node comprises the file writing node, so as to write the second task data in the shared file of the second service according to the configuration parameters of the shared file of the second service in the node data.
In some embodiments, the method further comprises:
the service layer loads node data of a feedback judging node under the condition that the target flow chart comprises the feedback judging node, so as to judge whether the task represented by the second task data is successfully executed according to an execution result of the second task data returned by the second service; and if the task represented by the second task data is not successfully executed, loading node data of the retry node in the target flow chart so as to resend the second task data to the second service.
In some embodiments, the service layer loads node data of a conversion node in a case that the target flowchart includes the conversion node, so as to convert the first task data into a data format supported by the second service, and obtain the second task data.
In some embodiments, the service layer loads node data of a preprocessing node when the target flowchart includes the preprocessing node, so as to perform preprocessing operation on the first task data to obtain the second task data; wherein the preprocessing operation includes at least one of: task data verification, task data splitting, task data merging and redundant data filtering.
In some embodiments, the data layer further records configuration parameters of the processing node in the target flowchart;
the method further comprises the steps of:
the interface layer responds to an editing instruction of a user for the processing node in the target flow chart, and displays a second window for editing configuration parameters of the processing node in the target flow chart;
the service layer obtains the configuration parameters received through the second window, and updates the configuration parameters of the processing nodes in the target flow chart stored in the data layer based on the obtained configuration parameters.
In some embodiments, the first service is used for issuing task data of a task to be executed by the robot; the data acquisition node is used for acquiring task data of a task required to be executed by the robot from the first service according to a communication protocol supported by the first service, and the task data is used as the first task data;
the second service is a robot scheduling service; the data issuing node is used for sending the second task data to the robot scheduling service according to a communication protocol supported by the robot scheduling service;
the robot scheduling service is used for sending a robot control instruction to a robot based on the received second task data so that the robot executes a task represented by the robot control instruction; the robot control instruction is obtained based on the second task data.
In some embodiments, the method further comprises:
the interface layer responds to an interface configuration instruction of a user aiming at the interface of the interface layer, and a third window for configuring the interface of the interface layer is displayed;
the service layer acquires interface information received through the third window and issues own interfaces based on the acquired interface information.
In some embodiments, the method further comprises:
the interface layer responds to a node creation instruction of a user, and a fourth window for creating the node is displayed;
the service layer acquires node data received through the fourth window, generates a custom processing node, and stores the node data of the custom processing node to the data layer;
and the interface layer displays the generated custom processing nodes.
In some embodiments, the first service is a plurality of the first services, and the configuration parameter of the data acquisition node includes respective addresses of the plurality of the first services; and/or the number of the second services is multiple, and the configuration parameters of the data issuing node comprise respective addresses of the second services.
In a third aspect of the embodiment of the present application, a task processing device is provided, where the device is applied to a task processing system, and the task processing system includes an interface layer, a service layer, and a data layer; the device comprises:
The display module is used for controlling the interface layer to display a plurality of processing nodes to be selected in the first display area;
the display module is further configured to control the interface layer to determine a data acquisition node for acquiring first task data from a first service according to a communication protocol supported by the first service in response to a node selection instruction of a user for a processing node displayed in the first display area, and a data transmission node for transmitting second task data to a second service according to a communication protocol supported by the second service, and generate a target flowchart including the determined data acquisition node and the determined data transmission node, and display the target flowchart in the second display area; the second task data is obtained based on the first task data, and the data format of the second task data is the data format supported by the second service;
the operation module is used for controlling the service layer to respond to a trigger instruction aiming at the target flow chart, and loading node data of processing nodes in the target flow chart based on an execution sequence among the processing nodes in the target flow chart recorded by the data layer so as to acquire the first task data from the first service and send the second task data to the second service; wherein the node data of any processing node comprises: configuration parameters of the processing node and program code representing execution logic of the processing node.
In some embodiments, the apparatus further comprises:
the first module is used for controlling the interface layer to respond to an execution period setting instruction of a user for the target flow chart and displaying a first window for setting the execution period of the target flow chart; and when the service layer reaches the execution period acquired through the first window, loading node data of processing nodes in the target flow chart based on the execution sequence among the processing nodes in the target flow chart recorded by the data layer, so as to acquire the first task data from the first service and send the second task data to the second service.
In some embodiments, the operation module is specifically configured to control the service layer to load node data of a message middleware monitoring node when the data acquisition node includes the message middleware monitoring node, monitor a message middleware of the first service according to a configuration parameter of the message middleware representing the first service in the node data, and acquire the first task data from the task data to be consumed when the task data to be consumed is monitored; and/or, the service layer loads node data of an interface monitoring node when the data acquisition node comprises the interface monitoring node, monitors a first interface according to configuration parameters representing the first interface in the node data, and acquires first task data sent by the first service through the first interface when the first service calls the first interface; the first interface is an interface corresponding to the first service in the interfaces of the first interface; and/or, the service layer loads node data of a file reading node when the data acquisition node comprises the file reading node, so as to read the first task data from the current unprocessed task data recorded in the shared file of the first service according to the configuration parameters of the shared file of the first service in the node data; and/or, the service layer loads node data of an interface reading node when the data acquisition node comprises the interface reading node, so as to call the interface of the first service to acquire the first task data according to configuration parameters of the interface of the first service in the node data; and/or, the service layer loads node data of a database reading node when the data acquisition node comprises the database reading node, so as to read the first task data from the currently unprocessed task data recorded in the database of the first service according to the configuration parameters of the database of the first service in the node data.
In some embodiments, the operation module is specifically configured to control the service layer to load node data of an interface writing node when the data issuing node includes the interface writing node, so as to call an interface of the second service to send the second task data according to configuration parameters of the interface of the second service in the node data; and/or, the service layer loads node data of the message middleware writing node when the data issuing node comprises the message middleware writing node, so as to write the second task data in the message middleware of the second service according to the configuration parameters of the message middleware representing the second service in the node data; and/or, the service layer loads node data of the database writing node when the data issuing node comprises the database writing node, so as to write the second task data in the database of the second service according to the configuration parameters of the database of the second service in the node data; and/or, the service layer loads node data of the file writing node when the data issuing node comprises the file writing node, so as to write the second task data in the shared file of the second service according to the configuration parameters of the shared file of the second service in the node data.
In some embodiments, the apparatus further comprises:
the second module is used for controlling the service layer to load node data of the feedback judging node when the target flow chart comprises the feedback judging node so as to judge whether the task represented by the second task data is successfully executed according to an execution result of the second task data returned by the second service; and if the task represented by the second task data is not successfully executed, loading node data of the retry node in the target flow chart so as to resend the second task data to the second service.
In some embodiments, the operation module is specifically configured to control the service layer to load node data of a conversion node when the target flowchart includes the conversion node, so as to convert the first task data into a data format supported by the second service, and obtain the second task data.
In some embodiments, the operation module is specifically configured to control the service layer to load node data of a preprocessing node when the target flowchart includes the preprocessing node, so as to perform a preprocessing operation on the first task data, and obtain the second task data; wherein the preprocessing operation includes at least one of: task data verification, task data splitting, task data merging and redundant data filtering.
In some embodiments, the data layer further records configuration parameters of the processing node in the target flowchart;
the apparatus further comprises:
the third module is used for controlling the interface layer to respond to an editing instruction of a user for the processing node in the target flow chart and displaying a second window for editing the configuration parameters of the processing node in the target flow chart; the service layer obtains the configuration parameters received through the second window, and updates the configuration parameters of the processing nodes in the target flow chart stored in the data layer based on the obtained configuration parameters.
In some embodiments, the first service is used for issuing task data of a task to be executed by the robot; the data acquisition node is used for acquiring task data of a task required to be executed by the robot from the first service according to a communication protocol supported by the first service, and the task data is used as the first task data;
the second service is a robot scheduling service; the data issuing node is used for sending the second task data to the robot scheduling service according to a communication protocol supported by the robot scheduling service;
The robot scheduling service is used for sending a robot control instruction to a robot based on the received second task data so that the robot executes a task represented by the robot control instruction; the robot control instruction is obtained based on the second task data.
In some embodiments, the apparatus further comprises:
a fourth module, configured to control the interface layer to respond to an interface configuration instruction of a user for an own interface, and display a third window for configuring the own interface; the service layer acquires interface information received through the third window and issues own interfaces based on the acquired interface information.
In some embodiments, the apparatus further comprises:
a fifth module, configured to control the interface layer to display a fourth window for creating a node in response to a node creation instruction of a user; the service layer acquires node data received through the fourth window, generates a custom processing node, and stores the node data of the custom processing node to the data layer; and the interface layer displays the generated custom processing nodes.
In some embodiments, the first service is a plurality of the first services, and the configuration parameter of the data acquisition node includes respective addresses of the plurality of the first services; and/or the number of the second services is multiple, and the configuration parameters of the data issuing node comprise respective addresses of the second services.
In a fourth aspect of an embodiment of the present application, there is provided an electronic device, including:
a memory for storing a computer program;
and the processor is used for realizing any one of the task processing methods when executing the programs stored in the memory.
In a fifth aspect of the embodiments of the present application, there is provided a computer-readable storage medium having stored therein a computer program which, when executed by a processor, implements any of the task processing methods described above.
The embodiments of the present application also provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform any of the task processing methods described above.
The embodiment of the application has the beneficial effects that:
the embodiment of the application provides a task processing system, which comprises an interface layer, a service layer and a data layer; the interface layer is used for displaying a plurality of processing nodes to be selected in the first display area; the interface layer is further used for responding to a node selection instruction of a user for the processing nodes displayed in the first display area, determining a data acquisition node used for acquiring first task data from the first service according to a communication protocol supported by the first service, and a data issuing node used for sending second task data to the second service according to a communication protocol supported by the second service, and generating a target flow chart comprising the determined data acquisition node and the data issuing node and displaying the target flow chart in the second display area; the second task data is obtained based on the first task data, and the data format of the second task data is the data format supported by the second service; the service layer is used for responding to the trigger instruction aiming at the target flow chart, loading the node data of the processing nodes in the target flow chart based on the execution sequence among the processing nodes in the target flow chart recorded by the data layer, so as to acquire the first task data from the first service and send the second task data to the second service; wherein the node data of any processing node comprises: configuration parameters of the processing node and program code representing execution logic of the processing node.
Based on the above processing, since the processing node in the target flowchart includes the data acquisition node for acquiring the first task data from the first service according to the communication protocol supported by the first service, and the data delivery node for sending the second task data to the second service according to the communication protocol supported by the second service, the service layer may implement integration of the task data between the first service upstream and the second service downstream based on the task processing flow indicated by the target flowchart, so as to acquire the first task data from the first service and send the second task data to the second service.
In addition, the interface layer can display a plurality of processing nodes to be selected in the first display area, namely the task processing system can provide a visual node selection function, so that a user can conveniently determine the processing nodes for generating the target flow chart according to the requirements, and the target flow chart is obtained. Furthermore, the task processing system can respond to the trigger instruction for the target flow chart, load the node data of the processing nodes in the target flow chart based on the execution sequence among the processing nodes in the target flow chart recorded by the data layer, and because the node data of any processing node is recorded with the program code representing the execution logic of the processing node, a user does not need to write the program code for realizing the function of the processing node, namely, the user does not need to have professional code writing capability, and the labor cost can be reduced. Furthermore, the efficiency of task data integration can be improved, and further, the efficiency of task execution is improved.
Of course, it is not necessary for any one product or method of practicing the application to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the application, and other embodiments may be obtained according to these drawings to those skilled in the art.
FIG. 1 is a schematic diagram of a task processing system according to an embodiment of the present application;
FIG. 2 is an exemplary diagram of an interface layer of a task processing system when creating a flow chart according to an embodiment of the present application;
FIG. 3 is a schematic diagram of another task processing system according to an embodiment of the present application;
FIG. 4 is an exemplary diagram of fields included in task data according to an embodiment of the present application;
FIG. 5 is a schematic flow chart of a task processing system for processing task data according to an embodiment of the present application;
FIG. 6 is an exemplary diagram of a processing node included in a flow chart representing task processing flow provided in an embodiment of the present application;
FIG. 7 is a schematic flow chart of a task processing method according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a task processing device according to an embodiment of the present application;
fig. 9 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. Based on the embodiments of the present application, all other embodiments obtained by the person skilled in the art based on the present application are included in the scope of protection of the present application.
Currently, robots are widely used in various scenes to perform various tasks instead of manpower to meet the needs of users. For example, a factory may use robots to handle goods and a hotel may use robots to deliver goods to customers. The robot scheduling service needs to acquire task data to be issued by a user (may be referred to as an upstream service), and further, the robot scheduling service may forward the task data to the robot to execute a task corresponding to the task data.
However, the communication protocols and data formats supported by the different upstream services may be different, as may the communication protocols and data formats supported by the different robotic dispatch services. In the related art, for each upstream service and a corresponding one of the robot scheduling services, a user may manually write codes for task processing flows of the upstream service and the robot scheduling service based on communication protocols and data formats supported by the upstream service and the robot scheduling service in a platform (may be referred to as an interface platform), so as to process task data issued by the upstream service based on the task processing flows and forward the processed task data to the robot scheduling service. As such, the user is required to have specialized code writing capabilities, resulting in high labor costs. Meanwhile, efficiency of acquiring task data and forwarding the task data is reduced, namely efficiency of integrating the task data is reduced, and efficiency of executing the task is low.
In order to reduce labor cost, improve task data integration efficiency and improve task execution efficiency, the embodiment of the application provides a task processing system.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a task processing system according to an embodiment of the present application. As shown in fig. 1, the task processing system 100 includes an interface layer 101, a service layer 102, and a data layer 103.
And the interface layer is used for displaying interfaces corresponding to the functions provided by the task processing system so as to realize the corresponding functions. For example, when it is detected that the user clicks a button corresponding to a certain function, the interface layer may display an interface corresponding to the function. For example, after the user clicks the button corresponding to the creation flow chart, the interface layer may display an interface corresponding to the creation flow chart, where the interface includes a first display area that displays a plurality of processing nodes to be selected. Further, the user may select a processing node for generating the target flowchart from the plurality of processing nodes to be selected, and correspondingly, the second display area included in the interface may display the target flowchart created by the user. The processing nodes to be selected may be used to perform corresponding processing on task data, for example, the data acquisition node may be used to acquire first task data from the first service, and the data issuing node may be used to send second task data to the second service.
The service layer can execute corresponding task data processing flow according to the information recorded by the data layer, and the operations of acquiring, processing, transmitting and the like of task data are completed. For example, the service layer may respond to a trigger instruction of any flow chart recorded for the data layer, and load node data of processing nodes in the flow chart based on an execution sequence between processing nodes in the target flow chart, so as to obtain first task data from a first service corresponding to the flow chart and send second task data to a second service corresponding to the flow chart. And the service layer is also used for receiving information input by the user at the interface layer and storing the information in the data layer. For example, the service layer may obtain a target flow chart generated by the user at the interface layer, and store the target flow chart at the data layer.
And the data layer is used for recording the flowcharts generated by the user and information set when each flowchart is generated. For example, for a flowchart, the data layer may record the execution sequence between processing nodes included in the flowchart, and the configuration parameters of each processing node, and the execution period corresponding to the flowchart. In addition, the data layer can also record user-defined processing nodes created by users and record execution information generated by the service layer when task data processing is carried out according to the generated flow chart. The manner in which the above information is specifically recorded will be described in the following embodiments.
In one embodiment, an interface layer is configured to display a plurality of processing nodes to be selected in a first display area.
And the interface layer is also used for responding to a node selection instruction of a user for the processing nodes displayed in the first display area, determining a data acquisition node for acquiring first task data from the first service according to a communication protocol supported by the first service, and a data issuing node for sending second task data to the second service according to a communication protocol supported by the second service, and generating a target flow chart comprising the determined data acquisition node and the data issuing node and displaying the target flow chart in the second display area.
The second task data is obtained based on the first task data, and the data format of the second task data is the data format supported by the second service.
And the service layer is used for responding to the trigger instruction aiming at the target flow chart, loading the node data of the processing nodes in the target flow chart based on the execution sequence among the processing nodes in the target flow chart recorded by the data layer, so as to acquire the first task data from the first service and send the second task data to the second service.
Wherein the node data of any processing node comprises: configuration parameters of the processing node and program code representing execution logic of the processing node.
According to the task processing system provided by the embodiment of the application, the processing node in the target flow chart comprises the data acquisition node for acquiring the first task data from the first service according to the communication protocol supported by the first service and the data issuing node for sending the second task data to the second service according to the communication protocol supported by the second service, so that the service layer can integrate the task data between the first service at the upstream and the second service at the downstream based on the task processing flow indicated by the target flow chart, and acquire the first task data from the first service and send the second task data to the second service.
In addition, the interface layer can display a plurality of processing nodes to be selected in the first display area, namely the task processing system can provide a visual node selection function, so that a user can conveniently determine the processing nodes for generating the target flow chart according to the requirements, and the target flow chart is obtained. Furthermore, the task processing system can respond to the trigger instruction for the target flow chart, load the node data of the processing nodes in the target flow chart based on the execution sequence among the processing nodes in the target flow chart recorded by the data layer, and because the node data of any processing node is recorded with the program code representing the execution logic of the processing node, a user does not need to write the program code for realizing the function of the processing node, namely, the user does not need to have professional code writing capability, and the labor cost can be reduced. Furthermore, the efficiency of task data integration can be improved, and further, the efficiency of task execution is improved.
In the present application, a task processing system is used to forward data (including task data) between an upstream system and a downstream system. The system for generating task data may be referred to as an upstream system, and the upstream system may provide a plurality of upstream services (also referred to as source services) for issuing task data, which are the first services in the present application. Accordingly, the downstream system may receive the task data and process the task data, and the downstream system may also provide a plurality of downstream services (may also be referred to as target services) for receiving the task data and processing the task data, which are the second services in the present application.
Therefore, the task processing system provided by the application can realize the forwarding of task data between an upstream system and a downstream system, namely, can realize the function of system butt joint. In addition, the task processing system provided by the application is suitable for forwarding task data among the plurality of management systems, so that the communication between any two heterogeneous systems can be completed.
For example, in the scenario where the user (e.g., factory) uses a robot to handle goods, the upstream system is a system used by the user who purchases the robot service, and the system used by the user may provide a plurality of upstream services for issuing task data. Accordingly, the downstream system, i.e., the robot scheduling system developed by the supplier of the robot, may provide a plurality of robot scheduling services for receiving task data, and in turn, the robot scheduling service forwards the received task data to the robot controlled thereby to cause the robot to perform the task represented by the task data.
For another example, in a transaction scenario of an enterprise and a bank, the enterprise needs to transmit generated transaction data to the bank, the enterprise terminal may provide a service for transmitting the transaction data, and the bank host may provide a service for receiving the transaction data. The business data which the enterprise needs to issue to the bank is the task data in the application; the service provided by the enterprise terminal for transmitting transaction data, namely, the upstream service in the application, and the service provided by the bank host for receiving transaction data, namely, the downstream service in the application.
In some embodiments, the downstream service may control an intelligent terminal, e.g., a robot, for performing tasks. Correspondingly, the first service is used for issuing task data of tasks required to be executed by the robot; the data acquisition node is used for acquiring task data of a task required to be executed by the robot from the first service according to a communication protocol supported by the first service as first task data. The second service is a robot scheduling service; the data issuing node is used for sending second task data to the robot scheduling service according to a communication protocol supported by the robot scheduling service. The robot scheduling service is used for sending a robot control instruction to the robot based on the received second task data so that the robot executes the task represented by the robot control instruction; the robot control instruction is obtained based on the second task data.
In the embodiment of the application, the robot scheduling service can directly forward the second task data to the robot after receiving the second task data so as to enable the robot to execute the task represented by the second task data.
Alternatively, the robotic dispatch service may split the task represented by the second task data into a plurality of subtasks. The robot scheduling service may then send a plurality of robot control instructions to the robot, one for controlling the robot to perform one subtask. For example, it is possible to split into: multiple sub-tasks of picking, distributing and placing, etc.
For example, in the scenario that the user uses the robot to carry goods, the task processing system provided by the embodiment of the application may acquire the first task data to be issued by the first service, further, may send the second task data to the second service (i.e. the robot scheduling service), and after receiving the second task data, the robot scheduling service may forward the second task data to the robot, and further, the robot may execute a task corresponding to the second task data.
In the present application, the functions that can be implemented by displaying a plurality of processing nodes to be selected (may be referred to as preset processing nodes) in the first display area of the interface layer include, but are not limited to: acquiring task data, issuing the task data, converting the data format of the task data and preprocessing the task data.
For either of the first service and the second service, the communication protocol it supports may be either: an interface-based communication protocol, a shared file-based communication protocol, a message-middleware-based communication protocol, and a database-based communication protocol.
Wherein the interface-based communication protocol comprises: HTTP (hypertext transfer protocol ), HTTPS (HyperText Transfer Protocol over Secure Socket Layer), webservice, TCP (transmission control protocol ), and the like. The shared file-based communication protocol includes: FTP (file transfer protocol ). The message middleware comprises: MQTT (Message Queuing Telemetry Transport, message queue telemetry transport protocol) message middleware, TIBCO message middleware, and rabhitmq message middleware, among others. The database comprises: SQLSever database, postgreSQL database, mySQL database, etc.
Correspondingly, when task data needs to be acquired from the first service, different data acquisition modes can be set according to a communication protocol supported by the first service. For example, task data may be obtained from the first service by listening to message middleware of the first service; task data can be acquired from the first service in a monitoring mode through an interface of the first service, wherein the interface is called when the first service sends the task data; task data can also be obtained from the first service by reading the shared file of the first service; task data can also be acquired from the first service by calling an interface of the first service; task data may also be obtained from the first service by reading a database of the first service.
For any of the above approaches, the functionality of that approach may be implemented by one processing node. For example, for the function of acquiring task data, the processing nodes implementing each mode may be respectively referred to as a message middleware monitoring node, an interface monitoring node, a file reading node, an interface reading node and a database reading node.
Correspondingly, when the task data needs to be sent to the second service, different data issuing modes can be set according to the communication protocol supported by the second service. For example, the task data may be sent to the second service by way of invoking an interface of the second service; the task data can also be sent to the second service by writing the task data into the message middleware of the second service; the task data can also be sent to the second service by writing the task data into a database of the second service; the task data may also be sent to the second service by writing the task data to a shared file of the second service.
For any of the above approaches, the functionality of that approach may be implemented by one processing node. For example, for the function of issuing task data, the processing nodes implementing each mode may be respectively referred to as an interface writing node, a message middleware writing node, a database writing node, and a file writing node.
For any one of the first task data and the second task data, the data format may be any one of the following: XML (extensible markup language ), JSON (JavaScript Object Notation, JS object profile), excel/CSV (tabular), TXT (text format).
Correspondingly, when the data format of the first task data is different from the data format of the second task data, the data format of the first task data can be converted, which comprises the following steps: analyzing the first task data in the first data format, mapping each field obtained by analysis, and constructing second task data in the second data format based on the data obtained by mapping.
For multiple processing steps in the above-described conversion process, one of the processing steps may be implemented by one processing node. For example, a processing node that parses first task data in a first data format may be referred to as a parsing node, a processing node that maps fields obtained by parsing may be referred to as a field mapping node, and a processing node that constructs second task data in a second data format may be referred to as a constructing node. Alternatively, multiple processing steps described above may be implemented simultaneously by one processing node. For example, parsing, mapping, and building functions are implemented by the conversion nodes.
Correspondingly, the task data is preprocessed, which comprises the following processing operations: checking task data, splitting one piece of task data, combining a plurality of pieces of task data, and filtering repeated or erroneous task data.
For any of the above processing operations, the functionality of the processing operation may be implemented by a processing node. For example, for a function of performing a preprocessing operation on task data, processing nodes implementing each processing operation may be respectively referred to as: the system comprises a task data check node, a task data splitting node, a task data merging node and a redundant data filtering node.
In the present application, node data of one processing node includes: configuration parameters of the processing node and program code representing execution logic of the processing node.
The preset processing node may be a processing node of the task processing system itself, in which case a plug-in containing the program code of the preset processing node may be generated in advance and installed in a hard disk of a server of the task processing system. It will be appreciated that when a user uses a preset processing node, the user may set the configuration parameters of the preset processing node, and the task processing system may store the configuration parameters set by the user in the data layer.
Alternatively, the preset processing node may be a processing node customized by the user through the task processing system (i.e., the customized processing node in the present application), and descriptions related to node data of the customized processing node will be described in detail in the following embodiments.
For any two processing nodes mentioned in the present application, if the functions to be implemented by the two processing nodes are consistent, the node data of the two processing nodes includes a program code consistent. However, the configuration parameters of the two processing nodes may be different. For example, a processing node is configured to obtain task data from the upstream service a, and accordingly, a configuration parameter of the processing node may represent the upstream service a; the other processing node is configured to obtain task data from the upstream service B, and accordingly, the configuration parameter of the processing node may represent the upstream service B.
It will be appreciated that for any two processing nodes, the node data for the two processing nodes contains different program code if the functions to be implemented by the two processing nodes are different.
The task processing system provided by the application can provide the function of creating the custom processing node. In some embodiments, the interface layer is further configured to: responding to a node creation instruction of a user, and displaying a fourth window for creating the node; the service layer is also used for acquiring the node data received through the fourth window, generating a custom processing node and storing the node data of the custom processing node to the data layer; and the interface layer is also used for displaying the generated custom processing nodes.
In the embodiment of the application, if the preset processing node provided by the current task processing system does not meet the requirement of the user, the user can write the node data of the custom processing node according to the function to be realized. The node data of the custom processing node comprises: configuration parameters of the custom processing node, and program code representing execution logic of the custom processing node.
For example, since the data formats that can be parsed by the conversion nodes in the preset processing nodes are limited, the current conversion node may not be able to parse the task data in the newly added data format. Therefore, the user can trigger the node creation instruction at the interface layer and input the pre-written node data of the custom processing node in the fourth window. Furthermore, the service layer can receive the node data of the custom processing node through the fourth window to generate the custom processing node, and the custom processing node can realize the function of analyzing the task data in the newly added data format.
At this time, since the node data of the custom processing node (the configuration parameters of the custom processing node and the program code representing the execution logic of the custom processing node) are all input by the user, the node data of the custom processing node can be stored in the data layer of the task processing system, so that the user can edit and modify the node data conveniently.
In addition, the task processing system can also support the expansion of a self-defined script, namely, a user can write a plug-in for realizing corresponding functions through the script, correspondingly, the plug-in can also be installed in a hard disk of a server of the task processing system, and further, the task processing system can also display nodes corresponding to the plug-in an interface layer. For example, plug-ins developed based on JavaScript language, java language, and Groovy language may be supported.
In addition, in the subsequent process of creating the flow chart, the custom processing node can also be used as a preset processing node for selection by a user.
The data layer may also store node data for custom processing nodes. For example, the node data of the custom processing node may be recorded in a table of a database (i.e., custom script table).
Based on the above processing, the task processing system may generate a custom processing node according to the actual requirement of the user, and the custom processing node may also be used as a preset processing node. That is, in the process of creating the flow chart later, the user can determine the custom processing node as the processing node for generating the target flow chart, and can reuse the node data of the custom processing node, that is, the program code for realizing the function of the custom processing node does not need to be repeatedly written.
In addition, the custom nodes are generated according to the actual demands of the users, so that the personalized demands of the users can be met, the flexibility of the task processing system is improved, the applicable scene of the task processing system is increased, and the usage scene of extreme bias is covered.
The task processing system provided by the application can provide the function of creating the flow chart. At this time, the interface displayed by the interface layer includes: a first display area of the plurality of processing nodes to be selected is displayed, and a second display area of the user-created flow chart is displayed.
That is, the user may trigger a node selection instruction for a processing node (i.e., a preset processing node) displayed in the first display area at an interface layer of the task processing system, and generate a target flowchart indicating an execution sequence between the selected processing nodes.
For example, the user may select at least one preset processing node from the displayed plurality of preset processing nodes in a click or drag manner as a processing node for generating the target flowchart, and correspondingly, the user may delete one or more processing nodes from the selected processing nodes. In addition, the user can determine the sequence among the selected multiple processing nodes according to the current service requirement, namely, set the execution sequence among the multiple processing nodes to obtain a target flow chart, and the interface layer can display the target flow chart in the second display area.
Therefore, the task processing system provided by the application can provide a graphical development interface for the user, and the user can generate and obtain the flow chart for indicating the task processing flow by triggering the node selection instruction aiming at the processing nodes displayed in the first display area, so that the usability of the system is improved.
In some embodiments, for any processing node in the target flowchart selected by the user, its current configuration parameter may be a preset configuration parameter. For example, the preset configuration parameter of the processing node may be a default configuration parameter of the processing node when the task processing system is online, where the default configuration parameter may be null. Or, the preset configuration parameters of the processing node may also be configuration parameters set by the user according to the actual requirements last time.
In some embodiments, when generating the flowchart, if the current configuration parameters of the processing node selected by the user do not meet the requirement, the user may modify the current configuration parameters of the processing node. That is, for any processing node selected by the user, its configuration parameters may be set by the user according to the actual requirements.
Correspondingly, the data layer also records configuration parameters of the processing nodes in the target flow chart; the interface layer is also used for responding to an editing instruction of a user for the processing node in the target flow chart and displaying a second window for editing the configuration parameters of the processing node in the target flow chart; the service layer is further configured to obtain the configuration parameters received through the second window, and update the configuration parameters of the processing node in the target flowchart stored in the data layer based on the obtained configuration parameters.
In one implementation, a user may trigger an edit instruction for any processing node in the target flow chart by clicking on that processing node.
In the embodiment of the application, when the interface layer receives the editing instruction of the user for the processing node, a window (namely a second window) for editing the configuration parameters of the processing node can be displayed, and further, the user can set the configuration parameters of the processing node in the second window, and correspondingly, the interface layer can receive the configuration parameters through the second window.
For example, the second window may contain an input text box for receiving configuration parameters for the processing node. The interface layer may receive the configuration parameters input by the user through the input text box in the second window, and further, the service layer may update the configuration parameters of the processing node stored in the data layer to the configuration parameters input by the user.
For another example, the service layer may obtain, according to the type of configuration parameter of the processing node (may be referred to as a target type), alternative configuration parameters of all target types currently recorded by the data layer. For example, if the processing node is a file reading node, the service layer may obtain the IP addresses (i.e. alternative configuration parameters) of the shared files of all the upstream services currently recorded by the data layer. Furthermore, the interface layer may display all the alternative configuration parameters in a list form, and the service layer may update the configuration parameters of the processing node to the alternative configuration parameters selected by the user by using the alternative configuration parameters selected by the user as the received configuration parameters.
It can be understood that, the user may set the configuration parameters of the data acquisition node included in the target flowchart according to the service information of the first service that needs to issue the task data, and set the configuration parameters of the data issue node included in the target flowchart according to the service information of the second service that needs to receive the task data.
Based on the above processing, the user can change the configuration parameters of the processing node to realize the functions of the processing node in combination with the actual scene. For example, the user may implement reading task data from the shared file of the current first service by modifying the configuration parameters of the file reading node included in the target flowchart. Thus, the user can simplify the operation without modifying the code by the user. In addition, the applicability of the system can be improved, and the application range of the system is enlarged.
In one implementation, a user may create multiple flowcharts based on his own needs. Correspondingly, the service layer can realize the parallel forwarding of task data according to task processing flows indicated by a plurality of flow charts, so that the efficiency of task processing can be improved. In addition, the data layer may record all of the user created flowcharts. For example, all of the user created flowcharts, as well as the identity of each flowchart, may be recorded in a table (i.e., a flowchart) of the database.
The task processing system provided by the application can provide the function of timing tasks (namely setting the execution period of the flow chart).
In some embodiments, when the processing node of the target flowchart comprises: when the file reading node, the interface reading node or the database reading node is used, the user can set the execution period of the target flow chart. Correspondingly, the interface layer is also used for: responding to an execution period setting instruction of a user for the target flow chart, and displaying a first window for setting the execution period of the target flow chart; and the service layer is used for loading the node data of the processing nodes based on the execution sequence among the processing nodes in the target flow chart recorded by the data layer when the execution period acquired through the first window is reached, so as to acquire the first task data from the first service and send the second task data to the second service.
In the embodiment of the application, when the interface layer receives the execution period setting instruction for the target flow chart, a window (i.e., a first window) for setting the execution period of the target flow chart can be displayed, and further, the user can set the execution period of the target flow chart in the first window, and correspondingly, the interface layer can receive the execution period of the target flow chart through the first window. For example, the user may trigger an execution cycle setting instruction for the target flowchart by clicking on the target flowchart.
Because the first service may not directly send the first task data to the task processing system after generating the first task data to be issued, but records the first task data, so as to wait for the task processing system to actively acquire and process the first task data. Therefore, the user can set the execution period of the target flow chart, and when the execution period of the target flow chart is reached, the service layer can realize the forwarding of the task data between the first service and the second service according to the task processing flow indicated by the target flow chart.
In the application, when the execution period of the target flow chart is reached, the service layer realizes the forwarding mode of the task data between the first service and the second service according to the task processing flow indicated by the target flow chart, which can be called active triggering.
In one implementation, the interface layer may also display all of the flowcharts that have been created. Accordingly, the user may select one or more of the created flowcharts and set the execution period of the user-selected flowcharts based on the manner of setting the execution period described above.
In addition, the data layer may record the execution cycles of the flowcharts. For example, the identification of the flow chart for which execution cycles have been set and the corresponding execution cycles may be recorded in a table (i.e., a timed task table) of the database.
Based on the above processing, the execution period of the flow chart can be set, so that when the service layer reaches the execution period of any flow chart, the task data between the first service and the second service can be forwarded according to the task processing flow indicated by the flow chart, and the task data generated by the upstream service can be timely processed, so that the task processing efficiency is improved.
In some embodiments, when the processing node of the target flowchart includes a message middleware monitoring node, the service layer may determine a first message middleware indicated by a configuration parameter of the message middleware monitoring node, monitor the first message middleware, acquire first task data (i.e., the first task data) when the first message middleware is monitored to have the first task data, and process the first task data according to a task processing flow indicated by the target flowchart.
When the processing node of the target flow chart comprises an interface monitoring node, the service layer can determine that the configuration parameter of the interface monitoring node represents a first interface of the service layer, determine that the first interface is called by a first service, and process the first task data according to the task processing flow indicated by the target flow chart when the task data (i.e. the first task data) sent by the first service is received.
In the embodiment of the present application, the service layer acquires the first task data in a listening manner, and further processes the first task data according to the task processing flow indicated by the target flow chart, which may be referred to as passive triggering. It can be understood that, based on the above-mentioned monitoring manner, task data can be obtained, and when the task data to be processed is monitored, the task data can be processed according to the task processing flow indicated by the target flow chart, so that the task data to be processed can be processed in time, and accordingly, under the condition that the processing node of the target flow chart includes a message middleware monitoring node or an interface monitoring node, the user does not need to set the execution period of the target flow chart.
For any flow chart, when the number of the corresponding first services is one, the node data of the data acquisition node in the flow chart includes a configuration parameter indicating the first service, and the server side can acquire the first task data of the first service.
In some embodiments, the configuration parameters of the data acquisition node include respective addresses of the plurality of first services.
In the embodiment of the present application, the configuration parameter of the data acquisition node includes an address of the first service. For any flow chart, when the number of the corresponding first services is a plurality of, the number of the data acquisition nodes in the flow chart can be one, and the node data of the data acquisition nodes contains addresses representing the plurality of first services; alternatively, the number of data acquisition nodes in the flowchart may be plural, that is, the plural data acquisition nodes may acquire the first task data from the plural first services in parallel, and the node data of each data acquisition node includes an address indicating one of the plural first services.
In some embodiments, the types of data acquisition nodes are different, as are the configuration parameters of the data acquisition nodes. Accordingly, the service layer may obtain the first task data from the first service based on at least one of the following manners 1-5.
Mode 1: and under the condition that the data acquisition node comprises a message middleware monitoring node, loading node data of the message middleware monitoring node to monitor the message middleware of the first service according to the configuration parameters of the message middleware representing the first service in the node data, and acquiring the first task data from the task data to be consumed when the task data to be consumed is monitored.
In the embodiment of the application, after the first service generates the task data to be consumed, the task data to be consumed can be written into the message middleware of the first service.
The configuration parameters of the message middleware monitoring node comprise: the IP address of the message middleware to be listened to, i.e. the IP address of the message middleware of the first service. Furthermore, the service layer may monitor the message middleware of the first service pointed to by the IP address, and acquire task data (i.e., the first task data) from the task data to be consumed when it is monitored that the task data to be consumed exists in the message middleware of the first service.
Based on the above processing, the first service may directly record the task data to be issued in the message middleware after generating the task data to be issued, and subsequently, the service layer may acquire and process the task data of the first service recorded in the message middleware. That is, the first service only needs to write the task data to be issued into the message middleware, and does not need to wait for completion of processing of one task data and issue other task data to be issued, so that the operation pressure of the first service can be reduced.
Mode 2: and under the condition that the data acquisition node comprises an interface monitoring node, loading node data of the interface monitoring node to monitor the first interface according to configuration parameters representing the first interface in the node data, and acquiring first task data sent by the first service through the first interface when the first service calls the first interface.
The first interface is an interface corresponding to the first service in the interfaces of the first interface.
It can be appreciated that the task processing system may issue its own interface in advance, and correspondingly, the upstream service may call the interface issued by the task processing system to send task data to the task processing system. Wherein the published interfaces may be generated according to interface standards provided by upstream services.
In the embodiment of the application, after the first service generates the task data to be issued, the first interface corresponding to the first service in the interfaces of the task processing system can be called, and the task data to be issued is sent to the first interface.
The configuration parameters of the interface monitoring node include: the IP address and the interface name of the interface to be monitored, i.e. the IP address and the interface name of the first interface. Further, the service layer may monitor the first interface, and acquire task data (i.e., first task data) sent by the first service through the first interface when the first service calls the first interface.
The task processing system provided by the application can also provide the function of interface configuration (i.e. issuing own interfaces). In some embodiments, the own interface corresponding to the first service is pre-published for the task processing system. Correspondingly, the interface layer is also used for: and responding to an interface configuration instruction of a user aiming at the interface of the user, and displaying a third window for configuring the interface of the user.
The service layer is further configured to obtain interface information received through the third window, and issue an own interface based on the obtained interface information.
In the embodiment of the application, aiming at an upstream service, if the upstream service needs to send task data to be issued to a task processing system in a mode of calling an interface of the task processing system, a corresponding interface can be generated and issued according to an interface standard required by the upstream service.
For example, when the interface layer receives an interface configuration instruction for its own interface, a window (i.e., a third window) for configuring its own interface may be displayed. Further, the user can input interface information of the interface to be published acquired from the upstream service in the third window. Further, the service layer may obtain interface information of an interface to be published, generate an interface based on the interface information, and publish the interface. The upstream service may call the interface after the interface is published to send the task data to be issued to the task processing system.
The interface information of the interface includes: communication protocols supported by the interface, interface names, incoming parameters, outgoing parameters, etc. Wherein the incoming parameters may represent data formats and contained fields of data incoming through the interface and the outgoing parameters may represent data formats and contained fields of data outgoing through the interface.
In addition, the data layer may record interface information of all interfaces of itself, interface information of interfaces provided by the upstream service, and interface information of interfaces provided by the downstream service. For example, the interface information of the above-described interface may be recorded in a table of the database (i.e., an interface information table).
Based on the above processing, the task processing system provided by the embodiment of the present application may generate and issue an own interface, so that an upstream service may send task data to be issued to the task processing system by calling the interface, so that first task data to be issued in a first service may be obtained. In addition, the user can input interface information of the interface through the graphical interface to generate and release the required interface, the user does not need to write corresponding codes for generating the interface, usability of the task processing system can be improved, efficiency of interface release can be improved, code quantity of the system is reduced, and requirements of the user are met rapidly.
Mode 3: and when the data acquisition node comprises a file reading node, loading node data of the file reading node to read the first task data from the currently unprocessed task data recorded in the shared file of the first service according to the configuration parameters of the shared file representing the first service in the node data.
In the embodiment of the application, after the first service generates the task data to be processed, the task data can be written into the shared file of the first service.
The configuration parameters of the file reading node include: the IP address of the shared file to be read, i.e., the IP address of the shared file of the first service. Further, the service layer may read the task data (i.e., the first task data) in the shared file of the first service to which the IP address points.
Based on the above processing, the first service may directly record the task data to be issued in the shared file after generating the task data to be issued, and subsequently, the service layer may acquire and process the task data of the first service recorded in the shared file. That is, the first service only needs to write the task data to be issued into the shared file, and does not need to wait for completing the processing of one task data and issue other task data to be issued, so that the operation pressure of the first service can be reduced.
Mode 4: and under the condition that the data acquisition node comprises an interface reading node, loading node data of the interface reading node to call the interface of the first service to acquire the first task data according to the configuration parameters of the interface representing the first service in the node data.
In the embodiment of the present application, the configuration parameters of the interface reading node include: the IP address of the interface to be read, i.e. the IP address of the interface of the first service. Further, the service layer may call an interface of the first service pointed to by the IP address, and obtain task data (i.e., first task data) to be issued in the first service.
Mode 5: and when the data acquisition node comprises a database reading node, loading node data of the database reading node to read the first task data from the currently unprocessed task data recorded in the database of the first service according to the configuration parameters of the database representing the first service in the node data.
In the embodiment of the application, after the first service generates the task data to be issued, the task data can be written into the database of the first service.
The configuration parameters of the database reading node include: the IP address, database type and rights information of the database to be read, i.e. the IP address, database type and rights information of the database of the first service. Further, the service layer may read the task data (i.e., the first task data) in the database of the first service to which the IP address points.
It can be appreciated that when the first service is a supported communication protocol is: in the case of the interface-based communication protocol, the first task data may be acquired from the first service in the above-described mode 2 or mode 4. In this case, the target flowchart includes: interface listening nodes, or interface reading nodes.
The communication protocol when the first service is supported is: in the case of a communication protocol based on a shared file, the first task data may be acquired from the first service in the above-described manner 3. In this case, the target flowchart includes: and (5) a file reading node.
The communication protocol when the first service is supported is: the first service data may be obtained from the first service in the above-described manner 1 when based on the communication protocol of the message middleware. In this case, the target flowchart includes: message middleware listens for nodes.
The communication protocol when the first service is supported is: in the case of a database-based communication protocol, the first task data may be obtained from the first service in the manner 5 described above. In this case, the target flowchart includes: the database reads the nodes.
In addition, the first service may also support multiple communication protocols, and accordingly, the service layer may acquire the first task data from the first service in any manner corresponding to the communication protocol supported by the first service.
Based on the above processing, different types of data acquisition nodes may be selected according to the communication protocol supported by the first service to acquire the first task data from the first service in different manners. That is, the user may select a data acquisition node matching the first service from among the preset processing nodes as a processing node for generating the target flowchart according to the communication protocol supported by the first service. The personalized requirements of the user can be met, the flexibility of the task processing system is improved, and the applicable scene of the task processing system is increased.
In the present application, the process of acquiring the first task data from the first service in the above-described modes 1 and 2 may be understood as one atomic action; the process of acquiring the first task data from the first service in the above-described ways 3, 4 and 5 may be understood as one atomic action. Namely, the task processing system provided by the application can realize two kinds of atomic actions of reading and monitoring. Atomic actions represent a complete process and cannot be split.
For any flow chart, when the number of the corresponding second services is one, the node data of the data issuing node in the flow chart includes configuration parameters indicating the second services, and the server side can send second task data to the second services.
In some embodiments, the configuration parameters of the data delivery node include respective addresses of the plurality of second services.
In the embodiment of the present application, the configuration parameter of the data issuing node includes an address of the second service. For any flow chart, when the number of the corresponding second services is a plurality of, the number of the data issuing nodes in the flow chart can be one, and the node data of one data issuing node contains addresses representing the plurality of second services; alternatively, the number of data delivery nodes in the flowchart may be multiple, that is, the multiple data delivery nodes may send the second task data to the multiple second services in a parallel manner, where the node data of each data delivery node includes an address that indicates one of the multiple second services.
Therefore, the task processing system provided by the application can realize task data transmission between a plurality of first services and a plurality of second services based on one task processing flow.
In some embodiments, if the data format supported by the second service is consistent with the data format supported by the first service, no conversion of the data format of the first task data is required, and accordingly, the target flowchart may not include a conversion node for implementing conversion of the data format of the task data.
In some embodiments, if the data format supported by the second service is inconsistent with the data format supported by the first service, the data format of the first task data needs to be converted to obtain task data (i.e., second task data) in the data format supported by the second service. Correspondingly, the service layer is specifically configured to:
and in the case that the target flow chart comprises a conversion node, loading node data of the conversion node to convert the first task data into a data format supported by the second service, and obtaining second task data.
In the embodiment of the application, the conversion node is used for converting the first task data in the first data format into the second task data in the second data format. Specifically, the conversion node may implement: and a function of analyzing the task data in the first data format, a function of mapping the values of the fields obtained by analysis, and a function of constructing the task data in the second data format. The first data format may be any one of XML, JSON, excel, TXT, the second data format may be any one of XML, JSON, excel, TXT, and the first data format and the second data format are different.
In one implementation, a single conversion node may implement one of the functions described above.
For example, a processing node for parsing task data in XML format may be referred to as an XML parsing node; the processing node for parsing the task data in the JSON format may be referred to as a JSON parsing node; the processing node for parsing the task data in the Excel format may be referred to as an Excel parsing node; the processing node for parsing the task data in the TXT format may be referred to as a TXT parsing node.
Accordingly, a processing node for constructing task data in an XML format may be referred to as an XML construction node; the processing node for constructing the task data in JSON format may be referred to as a JSON construction node; the processing node for building the task data in the Excel format may be referred to as an Excel building node; the processing node used to construct the task data in the TXT format may be referred to as a TXT construction node.
The processing node for mapping the values of the fields may be referred to as a field mapping node. If the first data format is different from the second data format, the fields in the first task data and the second task data that represent the same physical meaning may not be the same, so the data layer may record in advance the mapping relationship between any field in the first data format and the field in the second data format that represents the same physical meaning. Further, for any field in the second task data, the value of the corresponding field in the first task data may be determined as the value of the field in the second task data.
In another implementation, one conversion node may implement multiple of the functions described above. In this case, the conversion node is understood as a processing node obtained by combining the above-described plurality of processing nodes having different functions.
Based on the above processing, the user can determine the corresponding conversion node as the processing node for generating the target flow chart when constructing the target flow chart according to the data format supported by the first service and the data format supported by the second service, so that the data format conversion can be performed on the first task data to obtain the second task data of the data format supported by the second service. Therefore, the personalized requirements of the user can be met, the flexibility of the task processing system is improved, and the application scene of the task processing system is increased.
In some embodiments, the task processing system may perform preprocessing operation on the first task data according to a requirement of a user to obtain second task data, and further send the second task data to the second service. Correspondingly, the service layer is further configured to:
and under the condition that the target flow chart comprises a preprocessing node, loading node data of the preprocessing node to perform preprocessing operation on the first task data so as to obtain second task data.
Wherein the preprocessing operation includes at least one of: task data verification, task data splitting, task data merging and redundant data filtering.
In the embodiment of the application, the preprocessing node can realize: the method comprises the steps of checking first task data, splitting the first task data, combining the first task data and filtering the first task data.
In one implementation, a preprocessing node may implement one of the functions described above.
The processing node for checking the first task data may be referred to as a task data check node. When the target flow chart contains a task data check node, the service layer can check the task data transmitted to the node based on the task data check rule stored in the data layer. For example, it is checked whether the value of a certain field in the first task data is a legal value. If the task data does not pass the verification, the service layer may stop processing the task data without sending the task data to the second service. Therefore, the preprocessing node can verify the task data transmitted to the node, delete the wrong task data based on the rule of task data verification stored in the database, and improve the accuracy of task processing.
The processing node for splitting the first task data may be referred to as a task data splitting node. When the target flow chart includes a task data splitting node, the service layer can split the task data transmitted to the node based on the rule of splitting the task data stored by the data layer. For example, the service layer may split task data of a task with a larger data amount into task data of a plurality of tasks with smaller data amounts. Therefore, the situation that the data volume of the single task data is too large and the execution process of the single task is too long can be avoided, and the task processing efficiency can be improved.
The processing node for merging the first task data may be referred to as a task data merge node. When the target flow chart contains a task data merging node, the service layer can merge task data transmitted to the node based on the task data merging rule stored by the data layer. For example, in the above-described scenario in which a factory uses a robot to perform a transport task, the service layer may combine task data of a transport task having a smaller data amount and a uniform destination. Further, the repeated workload of the subsequent robot in processing the task can be reduced. Therefore, the service layer can combine the considered data of a plurality of tasks based on the task data combining rule stored in the data layer, and the task processing efficiency can be improved.
The processing node for filtering the first task data may be referred to as a redundant data filtering node. When the target flow chart includes a redundant data filtering node, the service layer can filter and de-duplicate task data transmitted to the node based on the redundant data filtering rules stored by the data layer. For example, the service layer may filter the task data with the consistent multiple first task data, that is, reserve one of the task data, and delete the remaining task data except the task data. For another example, due to system version update, the task data generated by the first service may include useless data, and accordingly, the service layer may delete the useless data in the first task data.
Therefore, the preprocessing node can filter the task data transmitted to the node based on the redundant data filtering rule stored in the data layer, and delete repeated task data, so that repeated execution of the same task can be avoided. In addition, the preprocessing node can also filter the data of the non-task data, so that the waste of communication resources is avoided.
In some embodiments, task data for other services than the second service may also be issued by the first service. Therefore, when the target flow chart includes the screening node, the service layer can load the node data of the screening node to screen the received task data issued by the first service, so as to obtain the task data required to be issued to the second service. Wherein the configuration parameters of the screening node comprise an identifier representing the second service.
Based on the processing, the task processing system can filter the task data, so that the waste of communication resources caused by the fact that the second service receives the task data aiming at other services is avoided.
In some embodiments, the service layer may send the second task data to the second service based on at least one of the following.
Mode one: and under the condition that the data issuing node comprises an interface writing node, loading node data of the interface writing node to call an interface of the second service to send second task data according to configuration parameters of the interface of the second service in the node data.
In the embodiment of the present application, the configuration parameters of the interface writing node include: the IP address of the interface to which the writing is required, i.e. the IP address of the interface of the second service. Further, the service layer may invoke an interface of a second service to which the IP address points, sending task data (i.e., second task data) to the second service.
Mode two: and loading node data of the message middleware writing node under the condition that the data issuing node comprises the message middleware writing node so as to write second task data in the message middleware of the second service according to the configuration parameters of the message middleware representing the second service in the node data.
In the embodiment of the application, the configuration parameters of the message middleware writing node comprise: the IP address of the message middleware to be written, i.e., the IP address of the message middleware of the second service. Further, the service layer may write task data (i.e., second task data) to message middleware of the second service to which the IP address points.
Mode three: and under the condition that the data issuing node comprises a database writing node, loading node data of the database writing node to write second task data in the database of the second service according to the configuration parameters of the database of the second service in the node data.
In the embodiment of the present application, the configuration parameters of the database writing node include: the IP address of the database, the database type, the rights information of the database to be written, i.e. the IP address of the database of the second service, the database type and the rights information. Further, the service layer may write task data (i.e., second task data) into a database of the second service to which the IP address points.
Mode four: and loading node data of the file writing node under the condition that the data issuing node comprises the file writing node so as to write second task data in the shared file of the second service according to the configuration parameters of the shared file of the second service in the node data.
In the embodiment of the present application, the configuration parameters of the file writing node include: the IP address of the shared file to be written, i.e., the IP address of the shared file of the second service. Further, the service layer may write task data (i.e., second task data) into a shared file of the second service to which the IP address points.
In the present application, the process of transmitting the second task data to the second service in one to four ways described above can be understood as one atomic action. That is, the task processing system provided by the application can also realize the written atomic actions.
In some embodiments, after sending the second task data to the second service, the service layer may further receive a result of the second service feedback of the execution of the second task data.
Correspondingly, the service layer is further configured to: under the condition that the target flow chart comprises a feedback judging node, loading node data of the feedback judging node to judge whether the task represented by the second task data is successfully executed according to an execution result of the second task data returned by the second service; and if the task represented by the second task data is not successfully executed, loading the node data of the retry node in the target flow chart to send the second task data to the second service again.
In the embodiment of the application, when the target flow chart contains the feedback judging node, the service layer can load the node data of the feedback judging node, receive the execution result of the second task data returned by the second service, and judge whether the task represented by the second task data is successfully executed based on the judging rule of the execution result stored by the data layer.
For example, the feedback determination node may obtain feedback data, which is returned by the second service and indicates an execution result of the second task data, and further may analyze the feedback data to obtain a value of a field that indicates the execution result of the second task data, and determine, based on the value of the field, whether the task corresponding to the second task data is successfully executed.
In addition, after the service layer executes the task processing flow indicated by the primary flow chart, the data layer may record the execution information of the primary task processing flow, that is, the execution result of the task data corresponding to the primary task processing flow, and the timestamp of executing the task processing flow. For example, the data layer may record execution information for each task processing flow in a table (i.e., a message log table) of the database.
The retry node is a processing node selected from the processing nodes in the target flow chart according to the actual demand of the user. For example, since the service layer has currently acquired the first task data issued by the first service, the retry node may be the next processing node of the data acquisition node included in the target flowchart. Alternatively, the retry node may be a data delivery node included in the target flowchart, since the service layer has currently acquired the second task data.
Based on the processing, when the task corresponding to the second task data fails to execute, the second task data can be sent to the second service again, so that the stability of the task processing system can be improved, the probability of successful task execution can be improved, and the consistency of the first task data sent by the first service and the second task data received by the second service is ensured.
In one implementation, if the task corresponding to the second task data fails to execute, the service layer may end the task processing procedure for the second task data. Thus, the situation that the task data is repeatedly processed according to the task processing flow indicated by the target flow chart and a large amount of calculation waste is caused by the execution of the task due to the fact that the task data has errors can be avoided.
In some embodiments, the database of the first service may also record the status of each task data as it is recorded. For example, the task data may be recorded as processed or unprocessed. It will be appreciated that the task processing system may obtain task data in an unprocessed state from the database of the first service for forwarding. Further, the service layer may modify the state of the first task data recorded in the database of the first service after determining that the task represented by the second task data obtained based on the first task data is successfully executed.
That is, the user may set the database write node after the feedback decision node in the target flowchart. The node data written in the node by the database comprises configuration information of the database representing the first service. And after the feedback judgment node acquires feedback data which is returned by the second service and indicates that the execution of the second task data is successful, loading the node data of the database writing node, and modifying the first task data recorded in the database of the first service. For example, the state of the first task data recorded on the database of the first service is modified to: processed.
In this way, it is possible to avoid repetitive processing of task data for which a successful task has been executed. In addition, for task data of the task which fails to be executed, the task data can be reprocessed after the task data is not processed, so that omission of the task is avoided.
The task processing system provided by the application can also provide the function of message log, namely, the execution information of all task processing flows executed by the task processing system is queried.
In some embodiments, after receiving a query instruction for a message log triggered by a user, the interface layer may display execution information of all task processing flows recorded by the data layer, that is, execution results of task data corresponding to all task processing flows, and corresponding timestamps for executing the task processing flows.
The task processing system provided by the application can also provide the function of abnormal information, namely, the task processing flow with failed execution result in the execution information of all task processing flows executed by the task processing system is inquired.
In some embodiments, after receiving the query instruction triggered by the user for the exception message, the interface layer may display execution information of all task processing flows recorded in the data layer, where the execution result of the task data is execution information of the failed task processing flow.
Referring to fig. 2, fig. 2 is an exemplary diagram of an interface layer of a task processing system when creating a flowchart according to an embodiment of the present application. As shown in fig. 2, when a user uses a function of creating a flowchart, an interface layer of the task processing system includes: the function selection area, the preset processing node area (i.e. the first display area), the flow chart editing area (i.e. the second display area) and the node data display area.
Wherein the function selection area is used to display functions provided by the task processing system, such as creating a flow chart, timing tasks, interface configuration, message log, exception messages, etc. The preset processing node area is used for displaying all preset processing nodes. The flow chart editing area is used for displaying a flow chart currently created by a user. The node data display area is used for displaying configuration parameters of any processing node when a user clicks the processing node.
Fig. 3 is a schematic structural diagram of another task processing system according to an embodiment of the present application.
In fig. 3, the external system 1 is an upstream system to which the first service belongs in the present application. The upstream system may communicate with a service reader and/or a service listener of the interface platform.
The external system 2 is a downstream system to which the second service belongs in the present application. The downstream system may communicate with a service writer of the interface platform.
The interface platform (DataBus) is a task processing system in the application, and consists of an interface layer, a service layer and a data layer.
The interface layer may also be called as a WEB front end, where the interface layer is used to display functions provided by the task processing system, and includes: service configuration, interface configuration, creation of a flow chart, timing tasks, message logs, exception messages.
Wherein the service is configured to receive service information of the service (first service and second service) input by the user. The interface configuration is used for responding to the interface configuration instruction of the user aiming at the interface of the user and issuing the interface of the user. The creating flow chart is used for responding to a node selection instruction of a user for processing nodes displayed in a first display area, determining a data acquisition node used for acquiring first task data from a first service according to a communication protocol supported by the first service, and a data issuing node used for sending second task data to a second service according to a communication protocol supported by the second service, and generating a target flow chart comprising the determined data acquisition node and the data issuing node and displaying the target flow chart in the second display area. The timing task is used for setting an execution period for any flow chart in response to an execution period setting instruction by a user for that flow chart. The message log is used for displaying the execution information of each task processing flow in response to the message log query instruction of the user. The abnormal information is used for displaying the query instruction responding to the abnormal information of the user, and displaying the execution information of all task processing flows recorded in the data layer, wherein the execution result of the task data is the execution information of the failed task processing flow.
The service layer is composed of a service reader, a service monitor, a message converter, a message router, a service writer and a data processing engine. The service reader and the service listener may communicate with the external system 1, the service writer may communicate with the external system 2, and in addition, the service reader may communicate with the service writer through the message converter and the message router, and the service listener may also communicate with the service writer through the message converter and the message router.
Wherein the communication protocol supported by the service reader comprises: webservice, HTTP/HTTPS, FTP protocol, etc., and in addition, the service reader supports reading task data from databases such as the Oracle database, the sql server database, etc., and reading task data from shared files.
The communication protocols supported by the service listener include: webservice, HTTP/HTTPS, TCP protocol, etc., in addition, the service listener supports listening to message middleware such as MQ.
The communication protocols supported by the service writer include: webservice, HTTP/HTTPS, FTP, HTTPS, TCP protocol, etc., in addition, the service writer supports writing task data into databases such as Oracle database, sql server database, etc., supports writing task data into message middleware such as MQTT, rabbitMQ, TIBCO, supports sending task data to RFC (remote function call ) interface of SAP system, supports writing task data into shared files, and sends task data based on other custom plug-ins (custom processing).
The message converter supports the functions of data analysis, data construction, field mapping, task splitting (i.e. task data splitting), task merging (i.e. task data merging), task filtering, task deduplication (i.e. redundant data filtering), script expansion, custom plug-in and the like. Wherein, the data parsing includes: XML parsing, JSON parsing, excel parsing, TXT parsing and other functions in the application. The data construction includes: in the application, the functions of XML construction, JSON construction, excel construction, TXT construction and the like are realized. Script extensions represent that task processing systems support development in different languages, such as: javaScript language, java language, and Groovy language. Custom plug-in representations may provide functionality to create custom processing nodes.
The check rules in the message router represent: the task processing system supports verification of task data based on a verification rule; branching rules represent: the task processing system supports branching forwarding of task data based on branching rules; success/failure means: the task processing system can determine whether the task represented by the task data was successfully executed.
The data processing engine is used for calling the service reader, the service monitor, the message converter, the message router and the service writer to integrate task data between the first service at the upstream and the second service at the downstream.
The data layer comprises a service information table, an interface information table, a flow chart, a custom script table, a timing task table and a message log table.
The service information table is used for recording service information of the current first service and the current second service. The interface information table is used for recording interface information of the interfaces of the first service, interface information of the interfaces of the second service and interface information of the interfaces of the second service. The flow chart is used to record all flow charts created by the user. The custom script table is used for recording custom processing nodes created by users. The timing task table is used for recording the execution period corresponding to each flow chart. The message log table records the execution information for recording each task processing flow.
In the above-mentioned scenario where a factory uses a robot to perform a transport task, the upstream service will typically write task data of the transport task to be issued into a task table in a database of the upstream service, and further, the robot scheduling service may read the task data in the table. Fig. 4 is an exemplary diagram of fields included in task data according to an embodiment of the present application.
The table shown in fig. 4 is a task table in the database of the upstream service, and one row of data in the table is used to indicate a field included in task data of one task, where reqCode (identification code) indicates an identification of a robot scheduling service corresponding to the transport task. the taskType indicates a task type of the transfer task, for example, the task type may indicate that the transfer task is a cross-floor task. Destination is used to indicate the Destination location of the transfer task. The positionCodePath (position code path) indicates the position of the robot path when the transport task is executed. The positionCodePathType may represent the type of the destination location described above, and the type of the location of the robot path, for example, the type of the location may be: the position represents an area, or the position represents a coordinate point.
Fig. 5 is a schematic flow chart of processing task data by the task processing system according to the embodiment of the present application, as shown in fig. 5.
S501: starting.
S502: the interface platform reads the task list in real time.
That is, the target flowchart is triggered when the execution cycle of the target flowchart is reached. The processing node in the target flow chart comprises a database reading node, and the service layer calls and loads node data of the database reading node so as to read first task data from the task data which are not processed currently and recorded in the database of the upstream service according to the configuration parameters of the database which represents the upstream service in the node data.
S503: and analyzing each parameter according to the read row information.
I.e. one line of data in the upstream service (as shown in fig. 4), i.e. one piece of task data (first task data) in the present application. After the service layer reads the first task data, the service layer can analyze the acquired first task data to acquire the values of the fields.
S504: and assembling an interface request message and transmitting the interface request message to a corresponding interface.
That is, the second task data is constructed by mapping based on the values of the respective fields. And writing the second task data into the node through the interface, and sending the second task data to the interface corresponding to the robot scheduling service.
S505: and judging whether the task is successfully executed. If yes, go to step S506; if not, go to step S504.
That is, in the case where the target flowchart includes the feedback determination node, the node data of the feedback determination node is loaded to determine whether or not the task represented by the second task data is successfully executed according to the execution result of the second task data returned by the second service. If the task represented by the second task data is successfully executed, S506 is executed. If the task represented by the second task data is not successfully executed, S504 is executed.
S506: the database is written back, and the marked line item is issued.
That is, the first task data recorded in the database of the upstream service is modified, and the state of the first task data is modified to be processed.
S507: and (5) ending.
Referring to fig. 6, fig. 6 is an exemplary diagram of processing nodes included in a flowchart illustrating a task processing flow according to an embodiment of the present application. The flow chart shown in fig. 6 includes: database read node 601, first build node 602, interface write node 603, first parse node 604, feedback decision node 605, and database write node 606.
The service layer may acquire and load node data of the database reading node 601 to read task data (i.e., first task data) in the database of the first service. The service layer may then obtain and load node data of the first construction node 602 to map values of fields in the first task data to construct task data in JSON format (i.e., second task data). The service layer may then obtain and load node data of the interface write node 603 to invoke an interface of the second service and send second task data to the second service. Then, the service layer may acquire and load node data of the first parsing node 604 to parse the received feedback data for the second task data in JSON format. The service layer may then obtain and load node data of the feedback determination node 605 to determine whether the task represented by the second task data was successfully performed. In the case that the task represented by the second task data is successfully executed, the service layer may acquire and load node data of the database write node 606 to modify the first task data recorded in the database of the first service, and modify the state of the first task data to be processed.
Based on the same inventive concept, the embodiment of the application also provides a task processing method, which is applied to a task processing system, wherein the task processing system comprises an interface layer, a service layer and a data layer.
Referring to fig. 7, fig. 7 is a flow chart of a task processing method according to an embodiment of the present application. As shown in fig. 7, the method includes:
s701: the interface layer displays a plurality of processing nodes to be selected in the first display area.
S702: the interface layer responds to a node selection instruction of a user for a processing node displayed in the first display area, determines a data acquisition node for acquiring first task data from the first service according to a communication protocol supported by the first service, and a data issuing node for sending second task data to the second service according to a communication protocol supported by the second service, generates a target flow chart containing the determined data acquisition node and the data issuing node, and displays the target flow chart in the second display area.
The second task data is obtained based on the first task data, and the data format of the second task data is the data format supported by the second service.
S703: the service layer responds to the trigger instruction aiming at the target flow chart, and loads node data of processing nodes in the target flow chart based on the execution sequence among the processing nodes in the target flow chart recorded by the data layer so as to acquire first task data from the first service and send second task data to the second service.
Wherein the node data of any processing node comprises: configuration parameters of the processing node and program code representing execution logic of the processing node.
In some embodiments, the method further comprises: the interface layer responds to an execution period setting instruction of a user aiming at the target flow chart, and displays a first window for setting the execution period of the target flow chart; and when the service layer reaches the execution period acquired through the first window, loading node data of processing nodes in the target flow chart based on the execution sequence among the processing nodes in the target flow chart recorded by the data layer, so as to acquire the first task data from the first service and send the second task data to the second service.
In some embodiments, when the data acquisition node includes a message middleware monitoring node, the service layer loads node data of the message middleware monitoring node, monitors a message middleware of the first service according to a configuration parameter of the message middleware representing the first service in the node data, and acquires the first task data from the task data to be consumed when the task data to be consumed is monitored; and/or, the service layer loads node data of an interface monitoring node when the data acquisition node comprises the interface monitoring node, monitors a first interface according to configuration parameters representing the first interface in the node data, and acquires first task data sent by the first service through the first interface when the first service calls the first interface; the first interface is an interface corresponding to the first service in the interfaces of the first interface; and/or, the service layer loads node data of a file reading node when the data acquisition node comprises the file reading node, so as to read the first task data from the current unprocessed task data recorded in the shared file of the first service according to the configuration parameters of the shared file of the first service in the node data; and/or, the service layer loads node data of an interface reading node when the data acquisition node comprises the interface reading node, so as to call the interface of the first service to acquire the first task data according to configuration parameters of the interface of the first service in the node data; and/or, the service layer loads node data of a database reading node when the data acquisition node comprises the database reading node, so as to read the first task data from the currently unprocessed task data recorded in the database of the first service according to the configuration parameters of the database of the first service in the node data.
In some embodiments, when the data issuing node includes an interface writing node, the service layer loads node data of the interface writing node, so as to call an interface of the second service to send the second task data according to configuration parameters of the interface of the second service in the node data; and/or, the service layer loads node data of the message middleware writing node when the data issuing node comprises the message middleware writing node, so as to write the second task data in the message middleware of the second service according to the configuration parameters of the message middleware representing the second service in the node data; and/or, the service layer loads node data of the database writing node when the data issuing node comprises the database writing node, so as to write the second task data in the database of the second service according to the configuration parameters of the database of the second service in the node data; and/or, the service layer loads node data of the file writing node when the data issuing node comprises the file writing node, so as to write the second task data in the shared file of the second service according to the configuration parameters of the shared file of the second service in the node data.
In some embodiments, the method further comprises: the service layer loads node data of a feedback judging node under the condition that the target flow chart comprises the feedback judging node, so as to judge whether the task represented by the second task data is successfully executed according to an execution result of the second task data returned by the second service; and if the task represented by the second task data is not successfully executed, loading node data of the retry node in the target flow chart so as to resend the second task data to the second service.
In some embodiments, the service layer loads node data of a conversion node in a case that the target flowchart includes the conversion node, so as to convert the first task data into a data format supported by the second service, and obtain the second task data.
In some embodiments, the service layer loads node data of a preprocessing node when the target flowchart includes the preprocessing node, so as to perform preprocessing operation on the first task data to obtain the second task data; wherein the preprocessing operation includes at least one of: task data verification, task data splitting, task data merging and redundant data filtering.
In some embodiments, the data layer further records configuration parameters of the processing node in the target flowchart; the method further comprises the steps of: the interface layer responds to an editing instruction of a user for the processing node in the target flow chart, and displays a second window for editing configuration parameters of the processing node in the target flow chart; the service layer obtains the configuration parameters received through the second window, and updates the configuration parameters of the processing nodes in the target flow chart stored in the data layer based on the obtained configuration parameters.
In some embodiments, the first service is used for issuing task data of a task to be executed by the robot; the data acquisition node is used for acquiring task data of a task required to be executed by the robot from the first service according to a communication protocol supported by the first service, and the task data is used as the first task data; the second service is a robot scheduling service; the data issuing node is used for sending the second task data to the robot scheduling service according to a communication protocol supported by the robot scheduling service; the robot scheduling service is used for sending a robot control instruction to a robot based on the received second task data so that the robot executes a task represented by the robot control instruction; the robot control instruction is obtained based on the second task data.
In some embodiments, the method further comprises: the interface layer responds to an interface configuration instruction of a user aiming at the interface of the interface layer, and a third window for configuring the interface of the interface layer is displayed; the service layer acquires interface information received through the third window and issues own interfaces based on the acquired interface information.
In some embodiments, the method further comprises: the interface layer responds to a node creation instruction of a user, and a fourth window for creating the node is displayed; the service layer acquires node data received through the fourth window, generates a custom processing node, and stores the node data of the custom processing node to the data layer; and the interface layer displays the generated custom processing nodes.
In some embodiments, the first service is a plurality of the first services, and the configuration parameter of the data acquisition node includes respective addresses of the plurality of the first services; and/or the number of the second services is multiple, and the configuration parameters of the data issuing node comprise respective addresses of the second services.
Fig. 8 is a schematic structural diagram of a task processing device according to an embodiment of the present application. As shown in fig. 8, the apparatus is applied to a task processing system, the task processing system including an interface layer, a service layer, and a data layer, and the apparatus includes:
A display module 801, configured to control the interface layer to display a plurality of processing nodes to be selected in a first display area;
the display module 801 is further configured to control the interface layer to determine, in response to a node selection instruction of a user for a processing node displayed in the first display area, a data acquisition node for acquiring first task data from the first service according to a communication protocol supported by the first service, and a data transmission node for transmitting second task data to the second service according to a communication protocol supported by the second service, and generate a target flowchart including the determined data acquisition node and the data transmission node, and display the target flowchart in the second display area; the second task data is obtained based on the first task data, and the data format of the second task data is the data format supported by the second service;
an operation module 802, configured to control the service layer to respond to a trigger instruction for the target flowchart, and load node data of processing nodes in the target flowchart based on an execution sequence between processing nodes in the target flowchart recorded by the data layer, so as to obtain the first task data from the first service and send the second task data to the second service; wherein the node data of any processing node comprises: configuration parameters of the processing node and program code representing execution logic of the processing node.
In some embodiments, the apparatus further comprises: the first module is used for controlling the interface layer to respond to an execution period setting instruction of a user for the target flow chart and displaying a first window for setting the execution period of the target flow chart; and when the service layer reaches the execution period acquired through the first window, loading node data of processing nodes in the target flow chart based on the execution sequence among the processing nodes in the target flow chart recorded by the data layer, so as to acquire the first task data from the first service and send the second task data to the second service.
In some embodiments, the operation module 802 is specifically configured to control the service layer to load node data of a message middleware monitoring node when the data acquisition node includes the message middleware monitoring node, monitor a message middleware of the first service according to a configuration parameter of the message middleware representing the first service in the node data, and acquire the first task data from the task data to be consumed when the task data to be consumed is monitored; and/or, the service layer loads node data of an interface monitoring node when the data acquisition node comprises the interface monitoring node, monitors a first interface according to configuration parameters representing the first interface in the node data, and acquires first task data sent by the first service through the first interface when the first service calls the first interface; the first interface is an interface corresponding to the first service in the interfaces of the first interface; and/or, the service layer loads node data of a file reading node when the data acquisition node comprises the file reading node, so as to read the first task data from the current unprocessed task data recorded in the shared file of the first service according to the configuration parameters of the shared file of the first service in the node data; and/or, the service layer loads node data of an interface reading node when the data acquisition node comprises the interface reading node, so as to call the interface of the first service to acquire the first task data according to configuration parameters of the interface of the first service in the node data; and/or, the service layer loads node data of a database reading node when the data acquisition node comprises the database reading node, so as to read the first task data from the currently unprocessed task data recorded in the database of the first service according to the configuration parameters of the database of the first service in the node data.
In some embodiments, the operation module 802 is specifically configured to control the service layer to load node data of the interface writing node when the data issuing node includes the interface writing node, so as to call an interface of the second service to send the second task data according to a configuration parameter of the interface representing the second service in the node data; and/or, the service layer loads node data of the message middleware writing node when the data issuing node comprises the message middleware writing node, so as to write the second task data in the message middleware of the second service according to the configuration parameters of the message middleware representing the second service in the node data; and/or, the service layer loads node data of the database writing node when the data issuing node comprises the database writing node, so as to write the second task data in the database of the second service according to the configuration parameters of the database of the second service in the node data; and/or, the service layer loads node data of the file writing node when the data issuing node comprises the file writing node, so as to write the second task data in the shared file of the second service according to the configuration parameters of the shared file of the second service in the node data.
In some embodiments, the apparatus further comprises: the second module is used for controlling the service layer to load node data of the feedback judging node when the target flow chart comprises the feedback judging node so as to judge whether the task represented by the second task data is successfully executed according to an execution result of the second task data returned by the second service; and if the task represented by the second task data is not successfully executed, loading node data of the retry node in the target flow chart so as to resend the second task data to the second service.
In some embodiments, the operation module 802 is specifically configured to control the service layer to load node data of a conversion node in a case where the target flowchart includes the conversion node, so as to convert the first task data into a data format supported by the second service, and obtain the second task data.
In some embodiments, the operation module 802 is specifically configured to control the service layer to load node data of a preprocessing node when the target flowchart includes the preprocessing node, so as to perform a preprocessing operation on the first task data, and obtain the second task data; wherein the preprocessing operation includes at least one of: task data verification, task data splitting, task data merging and redundant data filtering.
In some embodiments, the data layer further records configuration parameters of the processing node in the target flowchart; the apparatus further comprises: the third module is used for controlling the interface layer to respond to an editing instruction of a user for the processing node in the target flow chart and displaying a second window for editing the configuration parameters of the processing node in the target flow chart; the service layer obtains the configuration parameters received through the second window, and updates the configuration parameters of the processing nodes in the target flow chart stored in the data layer based on the obtained configuration parameters.
In some embodiments, the first service is used for issuing task data of a task to be executed by the robot; the data acquisition node is used for acquiring task data of a task required to be executed by the robot from the first service according to a communication protocol supported by the first service, and the task data is used as the first task data; the second service is a robot scheduling service; the data issuing node is used for sending the second task data to the robot scheduling service according to a communication protocol supported by the robot scheduling service; the robot scheduling service is used for sending a robot control instruction to a robot based on the received second task data so that the robot executes a task represented by the robot control instruction; the robot control instruction is obtained based on the second task data.
In some embodiments, the apparatus further comprises: a fourth module, configured to control the interface layer to respond to an interface configuration instruction of a user for an own interface, and display a third window for configuring the own interface; the service layer acquires interface information received through the third window and issues own interfaces based on the acquired interface information.
In some embodiments, the apparatus further comprises: a fifth module, configured to control the interface layer to display a fourth window for creating a node in response to a node creation instruction of a user; the service layer acquires node data received through the fourth window, generates a custom processing node, and stores the node data of the custom processing node to the data layer; and the interface layer displays the generated custom processing nodes.
In some embodiments, the first service is a plurality of the first services, and the configuration parameter of the data acquisition node includes respective addresses of the plurality of the first services; and/or the number of the second services is multiple, and the configuration parameters of the data issuing node comprise respective addresses of the second services.
The embodiment of the application also provides an electronic device, as shown in fig. 9, including:
A memory 901 for storing a computer program;
a processor 902, configured to implement the steps of any of the task processing methods in the foregoing embodiments when executing the program stored in the memory 901.
And the electronic device may further include a communication bus and/or a communication interface, where the processor 902, the communication interface, and the memory 901 perform communication with each other via the communication bus.
The communication bus mentioned above for the electronic devices may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present application, there is also provided a computer readable storage medium having stored therein a computer program which when executed by a processor implements the steps of any of the task processing methods described above.
In yet another embodiment of the present application, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the task processing methods of the above embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a storage medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for method, apparatus, electronic device, computer readable storage medium embodiments, the description is relatively simple as it is substantially similar to system embodiments, with reference to the section descriptions of method embodiments being merely illustrative.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (28)

1. A task processing system, wherein the task processing system comprises an interface layer, a service layer and a data layer;
the interface layer is used for displaying a plurality of processing nodes to be selected in the first display area;
the interface layer is further configured to determine, in response to a node selection instruction of a user for a processing node displayed in the first display area, a data acquisition node for acquiring first task data from the first service according to a communication protocol supported by the first service, and a data transmission node for transmitting second task data to the second service according to a communication protocol supported by the second service, and generate a target flowchart including the determined data acquisition node and the data transmission node, and display the target flowchart in the second display area; the second task data is obtained based on the first task data, and the data format of the second task data is the data format supported by the second service;
The service layer is used for responding to a trigger instruction aiming at the target flow chart, loading node data of processing nodes in the target flow chart based on an execution sequence among the processing nodes in the target flow chart recorded by the data layer, so as to acquire the first task data from the first service and send the second task data to the second service; wherein the node data of any processing node comprises: configuration parameters of the processing node and program code representing execution logic of the processing node.
2. The system of claim 1, wherein the interface layer is further configured to: responding to an execution period setting instruction of a user for the target flow chart, and displaying a first window for setting the execution period of the target flow chart;
and the service layer is used for loading the node data of the processing nodes in the target flow chart based on the execution sequence among the processing nodes in the target flow chart recorded by the data layer when the execution period acquired through the first window is reached, so as to acquire the first task data from the first service and send the second task data to the second service.
3. The system according to claim 1, characterized in that said service layer is specifically configured to:
under the condition that the data acquisition node comprises a message middleware monitoring node, loading node data of the message middleware monitoring node to monitor the message middleware of the first service according to configuration parameters of the message middleware representing the first service in the node data, and acquiring the first task data from the task data to be consumed when the task data to be consumed are monitored;
and/or the number of the groups of groups,
loading node data of an interface monitoring node under the condition that the data acquisition node comprises the interface monitoring node, monitoring a first interface according to configuration parameters representing the first interface in the node data, and acquiring first task data sent by the first service through the first interface when the first interface is monitored to be called by the first service; the first interface is an interface corresponding to the first service in the interfaces of the first interface;
and/or the number of the groups of groups,
loading node data of a file reading node under the condition that the data acquisition node comprises the file reading node, so as to read first task data from currently unprocessed task data recorded in a shared file of the first service according to configuration parameters of the shared file of the first service in the node data;
And/or the number of the groups of groups,
loading node data of an interface reading node under the condition that the data acquisition node comprises the interface reading node, so as to call the interface of the first service to acquire the first task data according to configuration parameters of the interface of the first service in the node data;
and/or the number of the groups of groups,
and under the condition that the data acquisition node comprises a database reading node, loading node data of the database reading node to read the first task data from the currently unprocessed task data recorded in the database of the first service according to the configuration parameters of the database representing the first service in the node data.
4. The system according to claim 1, characterized in that said service layer is specifically configured to:
loading node data of an interface writing node under the condition that the data issuing node comprises the interface writing node, so as to call an interface of the second service to send the second task data according to configuration parameters of the interface of the second service in the node data;
and/or the number of the groups of groups,
loading node data of a message middleware writing node under the condition that the data issuing node comprises the message middleware writing node, so as to write the second task data in the message middleware of the second service according to configuration parameters of the message middleware of the second service in the node data;
And/or the number of the groups of groups,
loading node data of a database writing node under the condition that the data issuing node comprises the database writing node, so as to write the second task data in the database of the second service according to the configuration parameters of the database of the second service in the node data;
and/or the number of the groups of groups,
and loading node data of the file writing node under the condition that the data issuing node comprises the file writing node, so as to write the second task data in the shared file of the second service according to the configuration parameters of the shared file of the second service in the node data.
5. The system of claim 1, wherein the service layer is further configured to:
loading node data of a feedback judging node under the condition that the target flow chart comprises the feedback judging node, so as to judge whether the task represented by the second task data is successfully executed according to an execution result of the second task data returned by the second service;
and if the task represented by the second task data is not successfully executed, loading node data of the retry node in the target flow chart so as to resend the second task data to the second service.
6. The system according to claim 1, characterized in that said service layer is specifically configured to:
and loading node data of the conversion node to convert the first task data into a data format supported by the second service to obtain the second task data when the target flow chart comprises the conversion node.
7. The system of claim 1, wherein the service layer is further configured to:
loading node data of a preprocessing node to perform preprocessing operation on the first task data to obtain the second task data when the target flow chart contains the preprocessing node; wherein the preprocessing operation includes at least one of: task data verification, task data splitting, task data merging and redundant data filtering.
8. The system of claim 1, wherein the data layer further records configuration parameters of processing nodes in the target flow chart;
the interface layer is further configured to display a second window for editing configuration parameters of the processing node in the target flowchart in response to an editing instruction of the user for the processing node in the target flowchart;
The service layer is further configured to obtain the configuration parameters received through the second window, and update the configuration parameters of the processing node in the target flowchart stored in the data layer based on the obtained configuration parameters.
9. The system of claim 1, wherein the first service is configured to issue task data for a task that the robot is required to perform; the data acquisition node is used for acquiring task data of a task required to be executed by the robot from the first service according to a communication protocol supported by the first service, and the task data is used as the first task data;
the second service is a robot scheduling service; the data issuing node is used for sending the second task data to the robot scheduling service according to a communication protocol supported by the robot scheduling service;
the robot scheduling service is used for sending a robot control instruction to a robot based on the received second task data so that the robot executes a task represented by the robot control instruction; the robot control instruction is obtained based on the second task data.
10. The system of claim 1, wherein the interface layer is further configured to: responding to an interface configuration instruction of a user aiming at the interface of the user, and displaying a third window for configuring the interface of the user;
The service layer is further configured to obtain interface information received through the third window, and issue an own interface based on the obtained interface information.
11. The system of claim 1, wherein the interface layer is further configured to: responding to a node creation instruction of a user, and displaying a fourth window for creating the node;
the service layer is further configured to obtain node data received through the fourth window, generate a custom processing node, and store the node data of the custom processing node to the data layer;
the interface layer is further used for displaying the generated custom processing nodes.
12. The system of claim 1, wherein the first service is a plurality of the first services, and the configuration parameters of the data acquisition node comprise respective addresses of the plurality of the first services;
and/or the number of the groups of groups,
the second services are multiple, and the configuration parameters of the data issuing node comprise respective addresses of the multiple second services.
13. A task processing method, wherein the method is applied to a task processing system, and the task processing system comprises an interface layer, a service layer and a data layer;
The method comprises the following steps:
the interface layer displays a plurality of processing nodes to be selected in a first display area;
the interface layer responds to a node selection instruction of a user for a processing node displayed in the first display area, determines a data acquisition node for acquiring first task data from a first service according to a communication protocol supported by the first service, and a data issuing node for sending second task data to a second service according to a communication protocol supported by the second service, generates a target flow chart comprising the determined data acquisition node and the data issuing node, and displays the target flow chart in the second display area; the second task data is obtained based on the first task data, and the data format of the second task data is the data format supported by the second service;
the service layer responds to a trigger instruction aiming at the target flow chart, and loads node data of processing nodes in the target flow chart based on an execution sequence among the processing nodes in the target flow chart recorded by the data layer so as to acquire the first task data from the first service and send the second task data to the second service; wherein the node data of any processing node comprises: configuration parameters of the processing node and program code representing execution logic of the processing node.
14. The method of claim 13, wherein the method further comprises:
the interface layer responds to an execution period setting instruction of a user aiming at the target flow chart, and displays a first window for setting the execution period of the target flow chart;
and when the service layer reaches the execution period acquired through the first window, loading node data of processing nodes in the target flow chart based on the execution sequence among the processing nodes in the target flow chart recorded by the data layer, so as to acquire the first task data from the first service and send the second task data to the second service.
15. The method according to claim 13, wherein the service layer, in case the data acquisition node comprises a message middleware listening node, loads node data of the message middleware listening node to listen to the message middleware of the first service according to configuration parameters of the message middleware representing the first service in the node data, and acquires the first task data from the task data to be consumed when the task data to be consumed is monitored;
And/or the number of the groups of groups,
the service layer loads node data of an interface monitoring node under the condition that the data acquisition node comprises the interface monitoring node, monitors a first interface according to configuration parameters representing the first interface in the node data, and acquires first service data sent by the first service through the first interface when the first service calls the first interface; the first interface is an interface corresponding to the first service in the interfaces of the first interface;
and/or the number of the groups of groups,
the service layer loads node data of a file reading node under the condition that the data acquisition node comprises the file reading node, so as to read first task data from current unprocessed task data recorded in a shared file of the first service according to configuration parameters of the shared file of the first service in the node data;
and/or the number of the groups of groups,
the service layer loads node data of an interface reading node under the condition that the data acquisition node comprises the interface reading node, and calls an interface of the first service to acquire the first task data according to configuration parameters of the interface of the first service in the node data;
And/or the number of the groups of groups,
and the service layer loads node data of the database reading node under the condition that the data acquisition node comprises the database reading node so as to read the first task data from the current unprocessed task data recorded in the database of the first service according to the configuration parameters of the database of the first service in the node data.
16. The method according to claim 13, wherein the service layer loads node data of the interface writing node in a case that the data issuing node includes the interface writing node, so as to call an interface of the second service to send the second task data according to configuration parameters of the interface representing the second service in the node data;
and/or the number of the groups of groups,
the service layer loads node data of the message middleware writing node when the data issuing node comprises the message middleware writing node, so that the second task data is written in the message middleware of the second service according to configuration parameters of the message middleware of the second service in the node data;
and/or the number of the groups of groups,
the service layer loads node data of the database writing node when the data issuing node comprises the database writing node, so that the second task data is written in the database of the second service according to the configuration parameters of the database of the second service represented in the node data;
And/or the number of the groups of groups,
and the service layer loads node data of the file writing node under the condition that the data issuing node comprises the file writing node so as to write the second task data in the shared file of the second service according to the configuration parameters of the shared file of the second service in the node data.
17. The method of claim 13, wherein the method further comprises:
the service layer loads node data of a feedback judging node under the condition that the target flow chart comprises the feedback judging node, so as to judge whether the task represented by the second task data is successfully executed according to an execution result of the second task data returned by the second service; and if the task represented by the second task data is not successfully executed, loading node data of the retry node in the target flow chart so as to resend the second task data to the second service.
18. The method of claim 13, wherein the service layer loads node data of a conversion node to convert the first task data into a data format supported by the second service to obtain the second task data if the target flow diagram includes the conversion node.
19. The method according to claim 13, wherein the service layer loads node data of a preprocessing node to perform preprocessing operation on the first task data to obtain the second task data in the case that the target flowchart includes the preprocessing node; wherein the preprocessing operation includes at least one of: task data verification, task data splitting, task data merging and redundant data filtering.
20. The method of claim 13, wherein the data layer further records configuration parameters of processing nodes in the target flow chart;
the method further comprises the steps of:
the interface layer responds to an editing instruction of a user for the processing node in the target flow chart, and displays a second window for editing configuration parameters of the processing node in the target flow chart;
the service layer obtains the configuration parameters received through the second window, and updates the configuration parameters of the processing nodes in the target flow chart stored in the data layer based on the obtained configuration parameters.
21. The method of claim 13, wherein the first service is used for issuing task data of a task to be performed by the robot; the data acquisition node is used for acquiring task data of a task required to be executed by the robot from the first service according to a communication protocol supported by the first service, and the task data is used as the first task data;
The second service is a robot scheduling service; the data issuing node is used for sending the second task data to the robot scheduling service according to a communication protocol supported by the robot scheduling service;
the robot scheduling service is used for sending a robot control instruction to a robot based on the received second task data so that the robot executes a task represented by the robot control instruction; the robot control instruction is obtained based on the second task data.
22. The method of claim 13, wherein the method further comprises:
the interface layer responds to an interface configuration instruction of a user aiming at the interface of the interface layer, and a third window for configuring the interface of the interface layer is displayed;
the service layer acquires interface information received through the third window and issues own interfaces based on the acquired interface information.
23. The method of claim 13, wherein the method further comprises:
the interface layer responds to a node creation instruction of a user, and a fourth window for creating the node is displayed;
the service layer acquires node data received through the fourth window, generates a custom processing node, and stores the node data of the custom processing node to the data layer;
And the interface layer displays the generated custom processing nodes.
24. The method of claim 13, wherein the first service is a plurality of the first services, and wherein the configuration parameters of the data acquisition node comprise respective addresses of the plurality of the first services;
and/or the number of the groups of groups,
the second services are multiple, and the configuration parameters of the data issuing node comprise respective addresses of the multiple second services.
25. A task processing device, wherein the device is applied to a task processing system, and the task processing system comprises an interface layer, a service layer and a data layer; the device comprises:
the display module is used for controlling the interface layer to display a plurality of processing nodes to be selected in the first display area;
the display module is further configured to control the interface layer to determine a data acquisition node for acquiring first task data from a first service according to a communication protocol supported by the first service in response to a node selection instruction of a user for a processing node displayed in the first display area, and a data transmission node for transmitting second task data to a second service according to a communication protocol supported by the second service, and generate a target flowchart including the determined data acquisition node and the determined data transmission node, and display the target flowchart in the second display area; the second task data is obtained based on the first task data, and the data format of the second task data is the data format supported by the second service;
The operation module is used for controlling the service layer to respond to a trigger instruction aiming at the target flow chart, and loading node data of processing nodes in the target flow chart based on an execution sequence among the processing nodes in the target flow chart recorded by the data layer so as to acquire the first task data from the first service and send the second task data to the second service; wherein the node data of any processing node comprises: configuration parameters of the processing node and program code representing execution logic of the processing node.
26. The apparatus of claim 25, wherein the apparatus further comprises:
the first module is used for controlling the interface layer to respond to an execution period setting instruction of a user for the target flow chart and displaying a first window for setting the execution period of the target flow chart; when the service layer reaches the execution period acquired through the first window, loading node data of processing nodes in the target flow chart based on the execution sequence among the processing nodes in the target flow chart recorded by the data layer so as to acquire the first task data from the first service and send the second task data to the second service;
The operation module is specifically configured to control the service layer to load node data of a message middleware monitoring node when the data acquisition node includes the message middleware monitoring node, monitor a message middleware of the first service according to a configuration parameter of the message middleware representing the first service in the node data, and acquire the first task data from the task data to be consumed when the task data to be consumed is monitored;
and/or the number of the groups of groups,
the service layer loads node data of an interface monitoring node under the condition that the data acquisition node comprises the interface monitoring node, monitors a first interface according to configuration parameters representing the first interface in the node data, and acquires first service data sent by the first service through the first interface when the first service calls the first interface; the first interface is an interface corresponding to the first service in the interfaces of the first interface;
and/or the number of the groups of groups,
the service layer loads node data of a file reading node under the condition that the data acquisition node comprises the file reading node, so as to read first task data from current unprocessed task data recorded in a shared file of the first service according to configuration parameters of the shared file of the first service in the node data;
And/or the number of the groups of groups,
the service layer loads node data of an interface reading node under the condition that the data acquisition node comprises the interface reading node, and calls an interface of the first service to acquire the first task data according to configuration parameters of the interface of the first service in the node data;
and/or the number of the groups of groups,
the service layer loads node data of a database reading node under the condition that the data acquisition node comprises the database reading node, so as to read the first task data from the current unprocessed task data recorded in the database of the first service according to the configuration parameters of the database of the first service in the node data;
the operation module is specifically configured to control the service layer to load node data of an interface writing node when the data issuing node includes the interface writing node, so as to call an interface of the second service to send the second task data according to configuration parameters of the interface of the second service in the node data;
and/or the number of the groups of groups,
the service layer loads node data of the message middleware writing node when the data issuing node comprises the message middleware writing node, so that the second task data is written in the message middleware of the second service according to configuration parameters of the message middleware of the second service in the node data;
And/or the number of the groups of groups,
the service layer loads node data of the database writing node when the data issuing node comprises the database writing node, so that the second task data is written in the database of the second service according to the configuration parameters of the database of the second service represented in the node data;
and/or the number of the groups of groups,
the service layer loads node data of the file writing node under the condition that the data issuing node comprises the file writing node, so that the second task data is written in the shared file of the second service according to the configuration parameters of the shared file of the second service in the node data;
the apparatus further comprises:
the second module is used for controlling the service layer to load node data of the feedback judging node when the target flow chart comprises the feedback judging node so as to judge whether the task represented by the second task data is successfully executed according to an execution result of the second task data returned by the second service; if the task represented by the second task data is not successfully executed, loading node data of a retry node in the target flow chart to resend the second task data to the second service;
The operation module is specifically configured to control the service layer to load node data of a conversion node when the target flowchart includes the conversion node, so as to convert the first task data into a data format supported by the second service, and obtain the second task data;
the operation module is specifically configured to control the service layer to load node data of a preprocessing node when the target flowchart includes the preprocessing node, so as to perform preprocessing operation on the first task data, and obtain the second task data; wherein the preprocessing operation includes at least one of: task data verification, task data splitting, task data merging and redundant data filtering;
the data layer also records configuration parameters of the processing nodes in the target flow chart;
the apparatus further comprises:
the third module is used for controlling the interface layer to respond to an editing instruction of a user for the processing node in the target flow chart and displaying a second window for editing the configuration parameters of the processing node in the target flow chart; the service layer acquires the configuration parameters received through the second window, and updates the configuration parameters of the processing nodes in the target flow chart stored in the data layer based on the acquired configuration parameters;
The first service is used for issuing task data of tasks required to be executed by the robot; the data acquisition node is used for acquiring task data of a task required to be executed by the robot from the first service according to a communication protocol supported by the first service, and the task data is used as the first task data;
the second service is a robot scheduling service; the data issuing node is used for sending the second task data to the robot scheduling service according to a communication protocol supported by the robot scheduling service;
the robot scheduling service is used for sending a robot control instruction to a robot based on the received second task data so that the robot executes a task represented by the robot control instruction; wherein the robot control instruction is obtained based on the second task data;
the apparatus further comprises:
a fourth module, configured to control the interface layer to respond to an interface configuration instruction of a user for an own interface, and display a third window for configuring the own interface; the service layer acquires interface information received through the third window and issues an own interface based on the acquired interface information;
The apparatus further comprises:
a fifth module, configured to control the interface layer to display a fourth window for creating a node in response to a node creation instruction of a user; the service layer acquires node data received through the fourth window, generates a custom processing node, and stores the node data of the custom processing node to the data layer; the interface layer displays the generated custom processing nodes;
the plurality of first services are provided, and the configuration parameters of the data acquisition node comprise respective addresses of the plurality of first services; and/or the number of the second services is multiple, and the configuration parameters of the data issuing node comprise respective addresses of the second services.
27. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the method of any of claims 13-24 when executing a program stored on a memory.
28. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, implements the method of any of claims 13-24.
CN202311010929.8A 2023-08-11 2023-08-11 Task processing system, method and device, electronic equipment and storage medium Pending CN116880992A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311010929.8A CN116880992A (en) 2023-08-11 2023-08-11 Task processing system, method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311010929.8A CN116880992A (en) 2023-08-11 2023-08-11 Task processing system, method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116880992A true CN116880992A (en) 2023-10-13

Family

ID=88258737

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311010929.8A Pending CN116880992A (en) 2023-08-11 2023-08-11 Task processing system, method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116880992A (en)

Similar Documents

Publication Publication Date Title
CN111083225B (en) Data processing method and device in Internet of things platform and Internet of things platform
US8918377B2 (en) Multiple source data management using a conflict rule
US8407520B2 (en) System and method for definition, creation, management, transmission, and monitoring of errors in SOA environment
EP3374890B1 (en) Event stream processing cluster manager
US8538793B2 (en) System and method for managing real-time batch workflows
US11409760B2 (en) Data array of objects indexing
CN111371898B (en) Message monitoring method, device, equipment and storage medium
US9015731B2 (en) Event handling system and method
CN104991821A (en) Monitor task batch processing method and apparatus
US20090083325A1 (en) System and method for end to end testing solution for middleware based applications
Rattanapoka et al. An MQTT-based IoT cloud platform with flow design by Node-RED
JP5268589B2 (en) Information processing apparatus and information processing apparatus operating method
CN110737655B (en) Method and device for reporting data
CN111104181A (en) Webpage data filling system for visually editing task flow
CN113821254A (en) Interface data processing method, device, storage medium and equipment
US10922207B2 (en) Method, apparatus, and computer-readable medium for maintaining visual consistency
CN116841758A (en) Workflow task processing method, device, computer equipment and storage medium
CN113298331A (en) Work order processing method, device and system and electronic equipment
CN116880992A (en) Task processing system, method and device, electronic equipment and storage medium
CN114443343A (en) Method, device, equipment and storage medium for service interface to feed back abnormal information
CN115185841A (en) System reconfiguration test method, device, equipment and storage medium
CN114880321A (en) Service early warning method and device
CN110377401B (en) Transaction request processing method, device, server and storage medium based on IDEA
CN112416980A (en) Data service processing method, device and equipment
CN112579325A (en) Business object processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination