Experiment task processing system
Through the automated management of the experimental task processing system, the problems of equipment configuration errors and resource waste in traditional laboratory management are solved, and efficient experimental task execution and equipment utilization are achieved.
Patent Information
- Application Number
- CN202510487430.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-07-29
AI Technical Summary
The traditional laboratory management model based on manual operation has problems such as high error rate in equipment configuration, waste of resources and low experimental efficiency, and cannot effectively schedule batch experiments, resulting in low equipment utilization.
An experimental task processing system is designed, including a task configuration unit, a task board unit, a workflow server, an experiment scheduling server, an experiment message queue pool and a device driver server. The experimental step workflow is edited through visual tools, and the experimental tasks are automatically parsed and executed, providing a device control interface and an immediate feedback mechanism.
It reduces the difficulty of configuration of experimental tasks, reduces the configuration error rate, improves experimental efficiency and equipment utilization, and reduces resource waste.
Smart Images

Figure CN120386599A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and particularly relates to an experimental task processing system. Background Art
[0002] In the fields of scientific research and technological development, laboratories are the core places for innovation and practice. However, with the increase in the complexity of experimental projects and the variety of experimental equipment, some problems have gradually emerged in the traditional laboratory management mode implemented based on manual operation: 1) Affected by manual experience, problems of incorrect equipment configuration often occur in the experimental preparation / execution stage, which not only reduces the experimental efficiency but also causes waste of resources; 2) Limited by the number of personnel and working hours, continuous scheduling of batch experiments cannot be carried out, which not only fails to improve the experimental efficiency but also fails to improve the utilization rate of experimental equipment. To improve this situation, we provide an experimental task processing mechanism for an automated laboratory through the present invention. Summary of the Invention
[0003] The object of the present invention is to provide an experimental task processing system in view of the defects of the prior art. The system includes: a task configuration unit, a task dashboard unit, a workflow server, an experimental scheduling server, an experimental message queue pool, and a device driver server; wherein, the task configuration unit is used to provide a visual experimental task workflow editing tool for users, and send the experimental step workflow configured by the user through the tool, i.e., the first workflow, to the workflow server; the task dashboard unit is used to display information of each first task feedback regularly sent by the workflow server through the visual task dashboards corresponding to each experimental task; the workflow server is used to send the first workflow to the experimental scheduling server side for experimental task execution, and forward to the task dashboard unit the instant feedback information of each experimental task, i.e., the first task feedback, obtained by querying the experimental message queue pool; the experimental scheduling server at least includes a main control unit, an action parsing unit, and a task instance running environment; the main control unit is used to automatically parse and process the first workflow from experimental steps to device-level operation actions through the action parsing unit to obtain a corresponding first action flow, create a corresponding first message queue for each first workflow in the experimental message queue pool, create and run a corresponding first task instance for each first workflow in the task instance running environment, and each first task instance performs experimental task execution processing according to the corresponding first action flow and the device driver server, and publishes instant experimental messages according to the corresponding first message queue during the task execution process; the experimental message queue pool is used to store multiple first message queues; the device driver server configures corresponding device control action driver interfaces for each experimental device, and provides a query interface for querying the device attributes of all experimental devices. On the one hand, the present invention can reduce the configuration difficulty of experimental tasks, reduce the configuration error rate, and reduce the resource waste rate. On the other hand, it can improve the experimental efficiency and the utilization rate of experimental devices.
[0004] To achieve the above object, an embodiment of the present invention provides an experimental task processing system, the system includes: a task configuration unit, a task dashboard unit, a workflow server, an experimental scheduling server, an experimental message queue pool, and a device driver server;
[0005] The task configuration unit is respectively connected to the workflow server and the device driver server; the task dashboard unit is connected to the workflow server; the workflow server is respectively connected to the experimental scheduling server and the experimental message queue pool; the experimental scheduling server is respectively connected to the experimental message queue pool and the device driver server; the device driver server is connected to the experimental message queue pool, and is also connected to multiple first experimental devices;
[0006] The task configuration unit is used to query the device driver server to obtain a first device list; and provide the first device list and a visual experimental task workflow editing tool to the user for corresponding experimental task workflow editing processing to obtain a corresponding first workflow and save it; and when the user selects a first workflow for execution through the tool interface, send the current first workflow to the workflow server;
[0007] The task dashboard unit is used to create corresponding visual task dashboard instances for each first task package sent by the workflow server, denoted as the first task dashboard; and refresh the corresponding first task dashboard according to the first task feedback sent by the workflow server;
[0008] The workflow server is used to, when receiving each first workflow sent by the task configuration unit, send the current first workflow to the experimental scheduling server; and receive the first queue identifier and the first action stream sent back by the experimental scheduling server; and form a first task package with the current first workflow and its corresponding first queue identifier and first action stream and send it to the task dashboard unit; and mark the current first workflow as an unfinished workflow;
[0009] The workflow server is also used to periodically identify the feedback information of each first workflow marked as an unfinished workflow according to the experimental message queue pool to obtain the corresponding first task feedback and send it to the task dashboard unit;
[0010] The workflow server is also used to, when receiving each completed workflow set sent by the experimental scheduling server, change the mark of the first workflow corresponding to each workflow identifier in the current completed workflow set from an unfinished workflow to a completed workflow;
[0011] The experimental scheduling server at least includes a main control unit, an action parsing unit, and a task instance running environment; the main control unit is respectively connected to the workflow server, the experimental message queue pool, the action parsing unit, and the task instance running environment; the task instance running environment is respectively connected to the experimental message queue pool and the device driver server;
[0012] The master control unit is configured to, upon receiving each first workflow sent by the workflow server, send the current first workflow to the action parsing unit; receive the first action stream sent back by the action parsing unit; create a corresponding first message queue in the experimental message queue pool for the current first workflow; use the queue identifier of the first message queue as the corresponding first queue identifier; send the first queue identifier and the first action stream back to the workflow server; create and run a corresponding experimental task execution instance in the task instance running environment for the current first workflow, denoted as the first task instance, and send the first queue identifier and the first action stream to the first task instance;
[0013] The master control unit is further configured to, upon receiving the set of ended instances sent by the task instance running environment, form a corresponding set of completed workflows from the workflow identifiers of the first workflows corresponding to the instance identifiers of each instance in the current set of ended instances and send it to the workflow server;
[0014] The action parsing unit is configured to perform operation action parsing processing on the experimental steps of the received first workflow to obtain the corresponding first action stream and send it back to the master control unit;
[0015] The first task instance is configured to perform experimental task execution processing based on the device driver server, the experimental message queue pool, the first queue identifier, and the first action stream;
[0016] The task instance running environment is further configured to periodically perform instance deletion operations on the first task instances that have ended their runs, and form a corresponding set of ended instances from the instance identifiers of all the first task instances deleted this time and send it to the master control unit;
[0017] The experimental message queue pool is configured to store multiple first message queues;
[0018] The device driver server is configured to set corresponding device management attributes for each first experimental device, denoted as the first device attributes; configure corresponding device control action driver interfaces for each first experimental device, denoted as the first device driver interfaces; and provide a processing interface for querying information about all the first device attributes, denoted as the first query interface.
[0019] Preferably, the first device list includes a plurality of the first device attributes; the first device attributes include a first device identifier, a first device type, a first device name, a first device nominal parameter set, and a first device occupancy status; the first device type includes at least an experimental environment sensor device, an experimental instrument device, a mechanical control device, and a simulation workstation; the first device occupancy status includes idle and occupied, and the first device occupancy status is initially set to idle;
[0020] The first workflow is sequentially sorted by a plurality of first experimental steps; the first experimental steps include a first step index, a first step device set, a first step instruction header, and a first step instruction parameter; the first step device set is composed of one or more first step devices; the first step devices include the first device identifier, the first device type, the first device name, and the first device nominal parameter set; the first step index is an index parameter that starts counting from 1 and increments in a step-by-step manner by 1;
[0021] The first action flow corresponds to the first workflow one-to-one; the first action flow is sequentially sorted by a plurality of first device actions; the first device actions include a first action index, a first parent step index, a first action device identifier, a first action instruction header, and a first action instruction parameter; the first action index is an index parameter that starts counting from 1 and increments in a step-by-step manner by 1;
[0022] The first task feedback corresponds to the first workflow one-to-one; the first task feedback includes a first task status and a first step feedback sequence; the first task status includes not started, in execution, and ended; the first step feedback sequence is sequentially sorted by a plurality of first step feedbacks, and the first step feedback corresponds to the first experimental step one-to-one; the first step feedback includes a first step status and a first action feedback sequence; the first step status includes not started, in execution, and ended; the first action feedback sequence is sequentially sorted by one or more first action feedbacks, and the first action feedback corresponds to the first device action one-to-one; the first action feedback includes a first action status, a first action execution period, and first action output data; the first action status includes not started, in execution, and ended; the first action execution period includes a start execution time and an end execution time;
[0023] The first message queue corresponds to the first workflow one by one; the first message queue is used to store and manage multiple first message records according to the first-in, first-out principle; the first message record includes a first message type and a first message body; the first message type includes a device driver type and a device feedback type; when the first message type is the device driver type, the first message body includes a first message timestamp, a first message step index, a first message action index, a first drive device identifier, a first interface input instruction header, and first interface input instruction parameters; when the first message type is the device feedback type, the first message body includes the first message timestamp, the first message step index, the first message action index, and first interface output data.
[0024] Preferably, when the first query interface of the device driver server receives each first query request:
[0025] Step 31, use the sender of the current first query request as the corresponding current requestor; and extract the first query type and the first query parameter of the current first query request as the corresponding current query type and current query parameter;
[0026] Among them, the first query request includes the first query type and the first query parameter; the first query type at least includes a full query and a conditional query; when the first query type is a full query, the first query parameter is empty; when the first query type is a conditional query, the first query parameter is a corresponding first logical expression, and the first logical expression is composed of one or more sub-logical expressions; each sub-logical expression is composed of a conditional field item, a sub-logical operator, and a corresponding field value range, and in the sub-logical expression, the conditional field item is on the left side of the sub-logical operator and the field value range is on the right side; the conditional field items include a device identifier, a device type, a device name, and a device occupancy status; the sub-logical operators at least include less than, less than or equal to, greater than, greater than or equal to, not equal to, equal to, contains, does not contain; when the number of sub-logical expressions in the first logical expression is not unique, every two adjacent sub-logical expressions are connected by a parent logical operator, and the parent logical operators at least include AND and OR;
[0027] Step 32, identify the current query type; if the current query type is a full query, send back a corresponding first query list composed of all the first device attributes to the current requestor; if the current query type is a conditional query, send back a corresponding first query list composed of the first device attributes that meet the current query parameter to the current requestor.
[0028] Preferably, when the task configuration unit is specifically used to obtain the first device list by querying the device driver server, it sets the corresponding first query type to full query and sets the corresponding first query parameter to be empty; and forms a corresponding first query request with the obtained first query type and the first query parameter and sends it to the first query interface of the device driver server; and uses the first query list returned by the first query interface as the corresponding first device list.
[0029] Preferably, when the workflow server is specifically used to regularly identify the corresponding first task feedback from the feedback information of each first workflow marked as an unfinished workflow according to the experimental message queue pool and send it to the task dashboard unit:
[0030] Step 51, regularly use each first action stream marked as an unfinished workflow as the corresponding current workflow at a preset first time frequency; and use the first action stream corresponding to the current workflow as the corresponding current action stream; and use the first message queue corresponding to the current workflow in the experimental message queue pool as the corresponding current message queue;
[0031] Step 52, and perform a round of traversal on all the first device actions of the current action stream; during this round of traversal, regard the currently traversed first device action as the corresponding current device action; and regard the first action index, the first parent step index, the first action device identifier, the first action instruction header, and the first action instruction parameters of the current device action as the corresponding current action index, current step index, current device identifier, current instruction header, and current instruction parameters; and regard the first message records in the current message queue whose first message type is the device driver type and whose first message step index, first message action index, first driver device identifier, first interface input instruction header, and first interface input instruction parameters of the first message body respectively match the current step index, the current action index, the current device identifier, the current instruction header, and the current instruction parameters as the corresponding first matching records; and regard the first message records in the current message queue whose first message type is the device feedback type and whose first message step index and first message action index of the first message body respectively match the current step index and the current action index as the corresponding second matching records; and identify the first and second matching records; if both the first and second matching records are empty, set the corresponding first action status to not started, set both the start and end execution times of the corresponding first action execution period to be empty, and set the corresponding first action output data to be empty; if the first matching record is not empty but the second matching record is empty, set the corresponding first action status to in execution, set the start execution time of the corresponding first action execution period to be the first timestamp of the first matching record, the end execution time to be empty, and set the corresponding first action output data to be empty; if both the first and second matching records are not empty, set the corresponding first action status to ended, set the start and end execution times of the corresponding first action execution period to be the first timestamps of the first and second matching records respectively, and set the corresponding first action output data to be the first interface output data of the second matching record; and form a corresponding first action feedback from the first action status, the first action execution period, and the first action output data corresponding to the current device action.
[0032] Step 53, perform a round of traversal on all the first experimental steps of the current workflow; during this round of traversal, regard the currently traversed first experimental step as the corresponding current experimental step; regard the first device actions in the current action stream whose respective first parent step indices match the first step index of the current experimental step as the corresponding current step actions; form a corresponding first action feedback sequence by sorting, in the order of the respective first action indices, all the first action feedbacks corresponding to the current step actions; and identify the current first action feedback sequence; if the first first action state of the current first action feedback sequence is not started, set the corresponding first step state to not started; if the last first action state of the current first action feedback sequence is ended, set the corresponding first step state to ended; if the first first action state of the current first action feedback sequence is not not started and the last first action state is not ended, set the corresponding first step state to in execution; and form a corresponding first step feedback from the first step state corresponding to the current experimental step and the first action feedback sequence; and at the end of this round of traversal, form a corresponding first step feedback sequence by sorting, in the order of the respective first step indices, all the obtained first step feedbacks.
[0033] Step 54, identify the first step feedback sequence; if the first first step state of the first step feedback sequence is not started, set the corresponding first task state to not started; if the last first step state of the first step feedback sequence is ended, set the corresponding first task state to ended; if the first first step state of the first step feedback sequence is not not started and the last first step state is not ended, set the corresponding first task state to in execution.
[0034] Step 55, form a corresponding first task feedback from the obtained first task state and the first step feedback sequence and send it to the task board unit.
[0035] Preferably, when the action parsing unit specifically performs operation action parsing processing on the experimental steps of the received first workflow and sends the corresponding first action flow back to the main control unit:
[0036] Step 61, regard the first first experimental step of the first workflow as the corresponding current experimental step; and initialize the first counter to 0.
[0037] Step 62: Use the first step index of the current experimental step as the corresponding current parent step index; use the first step device set, the first step instruction header, and the first step instruction parameters of the current experimental step as the corresponding current step device set, current step instruction header, and current step instruction parameters; and according to the preset experimental step-device action flow parsing protocol, perform corresponding device action flow parsing processing based on the current step device set, the current step instruction header, and the current step instruction parameters to obtain the corresponding first step workflow.
[0038] Among them, the experimental step-device action flow parsing protocol is divided into multiple first device action flow parsing protocols according to the step instruction header; each of the first device action flow parsing protocols corresponds to a specified step instruction header; each of the first device action flow parsing protocols includes the first step device configuration requirements and the first step device sequence rules; the first step device configuration requirements give the device type and device nominal parameter requirements of all experimental devices required for the current experimental step; the first device operation sequence gives the execution sequence of the device operation actions of all experimental devices in the current experimental step, as well as the action instruction header of each device operation action, as well as the action instruction parameters corresponding to each action instruction header, and the corresponding relationship between the step instruction parameters and some or all of the action instruction parameters.
[0039] The first step workflow is sorted by multiple first parsed device action sequences; the first parsed device action includes a first parsed action index, a first parsed action device identifier, a first parsed action instruction header, and a first parsed action instruction parameter; the first parsed action index of the first step workflow is an index parameter that starts counting from 1 and increments in a step-by-step plus 1 manner.
[0040] Step 63, perform a round of traversal on all the first parsing device actions of the first step workflow; and during this round of traversal, take the currently traversed first parsing device action as the corresponding current parsing device action; and take the first parsing action index, the first parsing action device identifier, the first parsing action instruction header, and the first parsing action instruction parameters of the current parsing device action as the corresponding current parsing action index, current parsing action device identifier, current parsing action instruction header, and current parsing action instruction parameters; and take the sum of the first counter and the current parsing action index as a corresponding first action index; and take the current parsing action device identifier, the current parsing action instruction header, and the current parsing action instruction parameters as the corresponding first action device identifier, first action instruction header, and first action instruction parameters; and take the current parent step index as a corresponding first parent step index; and form a corresponding first device action from the first action index, the first parent step index, the first action device identifier, the first action instruction header, and the first action instruction parameters corresponding to the current parsing device action; and at the end of this round of traversal, count the total number of the first parsing device actions of the first step workflow to obtain a corresponding first total N; and add N to the first counter;
[0041] Step 64, identify whether the current experimental step is the last first experimental step of the first workflow; if so, go to Step 65; if not, extract the next first experimental step of the first workflow as the new current experimental step, and return to Step 62;
[0042] Step 65, sort all the obtained first device actions in ascending order of the first action index and form a corresponding first action flow to send back to the main control unit.
[0043] Preferably, each of the first device driver interfaces of the device driver server is used to, when receiving a first action execution request each time:
[0044] Step 71, take the first action execution request received this time as the corresponding current action execution request; and take the first experimental device corresponding to the current driver interface as the corresponding current device; and set the first device occupancy status of the first device attribute of the current device to occupied; and extract the corresponding first instruction header, first instruction parameters, first write-back queue identifier, first write-back index, and second write-back index from the current action execution request;
[0045] Among them, the first action execution request includes the first instruction header, the first instruction parameter, the first write-back queue identifier, the first write-back index, and the second write-back index;
[0046] Step 72, and based on a preset device operation processing flow, use the first instruction header and the first instruction parameter as the current device driver instruction and the current driver instruction parameter to perform an operation on the current device; and at the end of this operation, use the output result of this operation as the corresponding current output result;
[0047] Step 73, after obtaining the current output result, use the first message queue corresponding to the first write-back queue identifier in the experimental message queue pool as the corresponding current message queue; and set a corresponding first message type to the device feedback type; and use the current time as the corresponding first message timestamp; and use the first and second write-back indexes as the corresponding first message step index and the first message action index; and use the current output result as a corresponding first interface output data; and form a corresponding first message body from the obtained first message timestamp, the first message step index, the first message action index, and the first interface output data; and form a corresponding first message record from the obtained first message type and the first message body and add it to the current message queue; and when the record addition is successful, set the first device occupancy status of the first device attribute of the current device to idle.
[0048] Preferably, the first task instance is specifically used for when performing experimental task execution processing according to the device driver server, the experimental message queue pool, the first queue identifier, and the first action flow:
[0049] Step 81, use the first message queue corresponding to the first queue identifier in the experimental message queue pool as the corresponding current message queue; and use the first device action of the first action flow as the corresponding current device action;
[0050] Step 82, use the first action index, the first parent step index, the first action device identifier, the first action instruction header, and the first action instruction parameter of the current device action as the corresponding current action index, current parent step index, current action device identifier, current action instruction header, and current action instruction parameter;
[0051] Step 83, set the corresponding first message type to the device driver type; use the current time as the corresponding first message timestamp; use the current parent step index, the current action index, the current action device identifier, the current action instruction header, and the current action instruction parameters as the corresponding first message step index, the first message action index, the first drive device identifier, the first interface input instruction header, and the first interface input instruction parameters; form a corresponding first message body from the obtained first message timestamp, the first message step index, the first message action index, the first drive device identifier, the first interface input instruction header, and the first interface input instruction parameters; and add a corresponding first message record composed of the first message type and the first message body to the first message queue.
[0052] Step 84, use the current parent step index, the current action index, the current action instruction header, and the current action instruction parameters as the corresponding first write-back index, the second write-back index, the first instruction header, and the first instruction parameters; use the first queue identifier as the corresponding first write-back queue identifier; and form a corresponding first action execution request from the first instruction header, the first instruction parameters, the first write-back queue identifier, the first write-back index, and the second write-back index.
[0053] Step 85, use the first experimental device corresponding to the current action device identifier as the corresponding current experimental device; use the first device driver interface corresponding to the current experimental device as the corresponding current device driver interface; use the first device occupancy status of the first device attributes corresponding to the current experimental device as the corresponding current device occupancy status; and identify the current device occupancy status; if the current device occupancy status is idle, send the first action execution request to the current device driver interface; if the current device occupancy status is occupied, continuously poll the current device occupancy status at a preset status polling frequency until the latest current device occupancy status is idle.
[0054] Step 86, after sending the first action execution request to the current device driver interface, use the first message record with the latest time in the current message queue as the corresponding current message record every preset first waiting duration; and identify the current message record; if the first message type of the current message record is the device feedback type, go to Step 87; if the first message type of the current message record is the device driver type, continue to wait until the first message type of the latest current message record is the device feedback type.
[0055] Step 87, after confirming that the first message type of the latest current message record is the device feedback type, confirm that the execution process of the current experimental task has been completed, and end the running state of the current task instance.
[0056] An embodiment of the present invention provides an experimental task processing system, which includes: a task configuration unit, a task dashboard unit, a workflow server, an experimental scheduling server, an experimental message queue pool, and a device driver server; wherein, the task configuration unit is used to provide a user with a visual experimental task workflow editing tool, and send the experimental step workflow configured by the user through the tool, that is, the first workflow, to the workflow server; the task dashboard unit is used to display information about each first task feedback regularly sent by the workflow server through the visual task dashboard corresponding to each experimental task; the workflow server is used to send the first workflow to the experimental scheduling server side for experimental task execution, and forward to the task dashboard unit the instant feedback information of each experimental task, that is, the first task feedback, obtained by querying the experimental message queue pool; the experimental scheduling server at least includes a main control unit, an action parsing unit, and a task instance running environment; the main control unit is used to automatically parse and process the first workflow from the experimental steps to the device-level operation actions through the action parsing unit to obtain the corresponding first action flow, create a corresponding first message queue for each first workflow in the experimental message queue pool, create and run a corresponding first task instance for each first workflow in the task instance running environment, and each first task instance performs experimental task execution processing according to the corresponding first action flow and the device driver server, and publishes instant experimental messages according to the corresponding first message queue during the task execution process; the experimental message queue pool is used to store multiple first message queues; the device driver server configures a corresponding device control action driver interface for each experimental device, and provides a query interface for querying the device attributes of all experimental devices. Through the embodiment of the present invention, on the one hand, the configuration difficulty of the experimental task is reduced, the configuration error rate is reduced, and the resource waste rate is reduced, and on the other hand, the experimental efficiency is improved and the utilization rate of the experimental equipment is improved. Description of the Drawings
[0057] Figure 1 It is a module structure diagram of an experimental task processing system provided by an embodiment of the present invention. Detailed Embodiments
[0058] To make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Apparently, the described embodiments are only some of the embodiments of the present invention, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention.
[0059] As Figure 1 As shown in the module structure diagram of an experimental task processing system provided by an embodiment of the present invention, the experimental task processing system 1 provided by the embodiment of the present invention mainly includes: a task configuration unit 11, a task dashboard unit 12, a workflow server 13, an experimental scheduling server 14, an experimental message queue pool 15, and a device driver server 16.
[0060] The connection relationships of the system components of the system in the embodiment of the present invention are as follows: the task configuration unit 11 is respectively connected to the workflow server 13 and the device driver server 16; the task dashboard unit 12 is connected to the workflow server 13; the workflow server 13 is respectively connected to the experimental scheduling server 14 and the experimental message queue pool 15; the experimental scheduling server 14 is respectively connected to the experimental message queue pool 15 and the device driver server 16; the device driver server 16 is connected to the experimental message queue pool 15, and is also connected to a plurality of first experimental devices 2.
[0061] (1) Task configuration unit 11:
[0062] The task configuration unit 11 in the embodiment of the present invention is used to query the device driver server 16 to obtain a first device list; provide the first device list and a visual experimental task workflow editing tool to the user for corresponding experimental task workflow editing processing to obtain a corresponding first workflow and save it; and when the user selects a first workflow to run through the tool interface, send the current first workflow to the workflow server 13.
[0063] In a specific implementation manner of the embodiment of the present invention, when the task configuration unit 11 is specifically used to query the device driver server 16 to obtain a first device list: set a corresponding first query type to full query, and set a corresponding first query parameter to be empty; form a corresponding first query request from the obtained first query type and first query parameter and send it to the first query interface of the device driver server 16; and use the first query list returned by the first query interface as the corresponding first device list. As can be seen from the following, the first device list in the embodiment of the present invention is actually composed of all first device attributes including the first experimental device 2.
[0064] It should be noted that the first workflow of the embodiments of the present invention is sequentially sorted by a plurality of first experimental steps; the first experimental step includes a first step index, a first step device set, a first step instruction header, and a first step instruction parameter; the first step device set is composed of one or more first step devices; the first step device includes a first device identifier, a first device type, a first device name, and a first device nominal parameter set; wherein, the first step index is an index parameter starting from 1 and incrementing by 1 step by step. Here, the embodiments of the present invention summarize various experimental steps of various types of experiments, allocate a step instruction for each experimental step, specify the corresponding step instruction parameter format and the set of mandatory experimental devices for each step instruction, and enable the user to simply set each experimental step in a modular configuration manner through an experimental task workflow editing tool. In this way, the configuration difficulty and error rate on the user side are greatly reduced, and the configuration efficiency is also effectively improved.
[0065] (2) Task Kanban Unit 12:
[0066] The task kanban unit 12 of the embodiments of the present invention is used to create a corresponding visual task kanban instance, denoted as the first task kanban, for each first task package sent by the workflow server 13; and refresh the corresponding first task kanban according to the first task feedback sent by the workflow server 13.
[0067] Here, the task kanban unit 12 of the embodiments of the present invention can obtain all information of each experimental task, such as: the first workflow, the first queue identifier, and the first action flow in the first task package of each experimental task; and the first task feedback of each experimental task. The visual task kanban instance of the embodiments of the present invention can be customized according to application requirements, and can display the global / local information of each experimental task in a personalized manner through any static or dynamic graphic display method.
[0068] (3) Workflow Server 13:
[0069] The workflow server 13 of the embodiments of the present invention is used to send the current first workflow to the experimental scheduling server 14 every time it receives a first workflow sent by the task configuration unit 11; receive the first queue identifier and the first action flow sent back by the experimental scheduling server 14; form a first task package with the current first workflow and its corresponding first queue identifier and first action flow and send it to the task kanban unit 12; and mark the current first workflow as an unfinished workflow.
[0070] Here, the first action stream corresponds one-to-one with the first workflow; the first action stream is formed by sequencing multiple first device actions in order; the first device action includes a first action index, a first parent step index, a first action device identifier, a first action instruction header, and first action instruction parameters; the first action index is an index parameter that starts counting from 1 and increments in a step-by-step manner by 1.
[0071] The workflow server 13 is further configured to regularly identify the feedback information of each first workflow marked as an unfinished workflow according to the experimental message queue pool 15 to obtain the corresponding first task feedback and send it to the task kanban unit 12.
[0072] Here, the first task feedback corresponds one-to-one with the first workflow; the first task feedback includes a first task status and a first step feedback sequence; the first task status includes not started, in execution, and ended; the first step feedback sequence is formed by sequencing multiple first step feedbacks in order, and the first step feedback corresponds one-to-one with the first experimental step; the first step feedback includes a first step status and a first action feedback sequence; the first step status includes not started, in execution, and ended; the first action feedback sequence is formed by sequencing one or more first action feedbacks in order, and the first action feedback corresponds one-to-one with the first device action; the first action feedback includes a first action status, a first action execution period, and first action output data; the first action status includes not started, in execution, and ended; the first action execution period includes a start execution time and an end execution time.
[0073] The workflow server 13 is further configured to, when receiving each completed workflow set sent by the experimental scheduling server 14, change the mark of the first workflow corresponding to each workflow identifier in the current completed workflow set from an unfinished workflow to a completed workflow.
[0074] In another specific implementation manner of the embodiment of the present invention, when the workflow server 13 specifically identifies the feedback information of each first workflow marked as an unfinished workflow according to the experimental message queue pool 15 to obtain the corresponding first task feedback and sends it to the task kanban unit 12:
[0075] Step A1, regularly use each first action stream marked as an unfinished workflow as the corresponding current workflow at a preset first time frequency; use the first action stream corresponding to the current workflow as the corresponding current action stream; and use the first message queue 151 corresponding to the current workflow in the experimental message queue pool 15 as the corresponding current message queue.
[0076] Here, the first time frequency is a preset frequency parameter.
[0077] Step A2, and perform a round of traversal on all the first device actions of the current action stream; and during this round of traversal, take the currently traversed first device action as the corresponding current device action; and take the first action index, first parent step index, first action device identifier, first action instruction header, and first action instruction parameters of the current device action as the corresponding current action index, current step index, current device identifier, current instruction header, and current instruction parameters; and record the first message record in the current message queue whose first message type is the device driver type and whose first message step index, first message action index, first driver device identifier, first interface input instruction header, and first interface input instruction parameters of the first message body match the current step index, current action index, current device identifier, current instruction header, and current instruction parameters respectively as the corresponding first matching record; and record the first message record in the current message queue whose first message type is the device feedback type and whose first message step index and first message action index match the current step index and current action index respectively as the corresponding second matching record; and identify the first and second matching records; if both the first and second matching records are empty, set the corresponding first action status to not started, and set the start and end execution times of the corresponding first action execution period to be empty, and set the corresponding first action output data to be empty; if the first matching record is not empty but the second matching record is empty, set the corresponding first action status to in execution, and set the start execution time of the corresponding first action execution period to the first timestamp of the first matching record and the end execution time to be empty, and set the corresponding first action output data to be empty; if both the first and second matching records are not empty, set the corresponding first action status to ended, and set the start and end execution times of the corresponding first action execution period to the first timestamps of the first and second matching records respectively, and set the corresponding first action output data to the first interface output data of the second matching record; and form a corresponding first action feedback from the first action status, first action execution period, and first action output data corresponding to the current device action.
[0078] Step A3, and perform a round of traversal on all the first experimental steps of the current workflow; during this round of traversal, regard the currently traversed first experimental step as the corresponding current experimental step; regard the first device actions in the current action stream whose respective first parent step indices match the first step index of the current experimental step as the corresponding current step actions; and form a corresponding first action feedback sequence by sorting all the first action feedbacks corresponding to the current step actions in the order of the corresponding first action indices; and identify the current first action feedback sequence; if the first first action status of the current first action feedback sequence is not started, set the corresponding first step status to not started; if the last first action status of the current first action feedback sequence is ended, set the corresponding first step status to ended; if the first first action status of the current first action feedback sequence is not not started and the last first action status is not ended, set the corresponding first step status to in execution; and form a corresponding first step feedback from the first step status corresponding to the current experimental step and the first action feedback sequence; and at the end of this round of traversal, form a corresponding first step feedback sequence by sorting all the obtained first step feedbacks in the order of the corresponding first step indices.
[0079] Step A4, identify the first step feedback sequence; if the first first step status of the first step feedback sequence is not started, set the corresponding first task status to not started; if the last first step status of the first step feedback sequence is ended, set the corresponding first task status to ended; if the first first step status of the first step feedback sequence is not not started and the last first step status is not ended, set the corresponding first task status to in execution.
[0080] Step A5, form a corresponding first task feedback from the obtained first task status and the first step feedback sequence and send it to the task board unit 12.
[0081] (IV) Experimental scheduling server 14:
[0082] The experimental scheduling server 14 of the embodiment of the present invention at least includes a main control unit 141, an action parsing unit 142, and a task instance running environment 143; the main control unit 141 is respectively connected to the workflow server 13, the experimental message queue pool 15, the action parsing unit 142, and the task instance running environment 143; the task instance running environment 143 is respectively connected to the experimental message queue pool 15 and the device driver server 16.
[0083] The main control unit 141 is configured to send the current first workflow to the action parsing unit 142 each time a first workflow sent by the workflow server 13 is received; receive the first action stream sent back by the action parsing unit 142; create a corresponding first message queue 151 for the current first workflow in the experimental message queue pool 15; use the queue identifier of the first message queue 151 as the corresponding first queue identifier; send the first queue identifier and the first action stream back to the workflow server 13; create and run a corresponding experimental task execution instance, denoted as the first task instance 1431, for the current first workflow in the task instance running environment 143, and send the first queue identifier and the first action stream to the first task instance 1431.
[0084] The main control unit 141 is further configured to, when receiving the set of ended instances sent by the task instance running environment 143, form a corresponding set of completed workflows from the workflow identifiers of the first workflows corresponding to the instance identifiers of each instance in the current set of ended instances and send it to the workflow server 13.
[0085] The action parsing unit 142 is configured to perform operation action parsing processing on the experimental steps of the received first workflow to obtain a corresponding first action stream and send it back to the main control unit 141.
[0086] The first task instance 1431 is configured to perform experimental task execution processing according to the device driver server 16, the experimental message queue pool 15, the first queue identifier, and the first action stream.
[0087] The task instance running environment 143 is further configured to periodically perform an instance deletion operation on the first task instance 1431 that has ended running, and form a corresponding set of ended instances from the instance identifiers of all the first task instances 1431 deleted this time and send it to the main control unit 141.
[0088] In another specific implementation manner of the embodiment of the present invention, when the action parsing unit 142 is specifically configured to perform operation action parsing processing on the experimental steps of the received first workflow to obtain a corresponding first action stream and send it back to the main control unit 141:
[0089] Step B1, use the first first experimental step of the first workflow as the corresponding current experimental step; and initialize the first counter to 0;
[0090] Step B2: Use the first step index of the current experimental step as the corresponding current parent step index; use the first step device set, first step instruction header, and first step instruction parameters of the current experimental step as the corresponding current step device set, current step instruction header, and current step instruction parameters; and according to the preset experimental step-device action flow parsing protocol, perform corresponding device action flow parsing based on the current step device set, current step instruction header, and current step instruction parameters to obtain the corresponding first step workflow;
[0091] Here, the embodiment of the present invention will pre-summarize the experimental equipment operation process of the specific experimental steps corresponding to each step instruction. This experimental equipment operation process may be a single-step operation of an experimental equipment, a continuous operation of an experimental equipment, a cyclic operation of an experimental equipment, or a sequential operation sequence consisting of single-step / continuous / cyclic operations of multiple experimental equipment. By programming the experimental equipment operation process of all summarized step instructions, a solidified program or protocol rule can be obtained that can perform device-level workflow conversion based on step instructions and step instruction parameters, which is the experimental step-device action flow parsing protocol of the embodiment of the present invention.
[0092] The experimental step-device action flow parsing protocol of the embodiment of the present invention is divided into multiple first device action flow parsing protocols according to the step instruction header; each first device action flow parsing protocol corresponds to a specified step instruction header; each first device action flow parsing protocol includes a first-step device configuration requirement and a first-step device sequence rule; the first device configuration requirement provides the device type and device nominal parameter requirements of all experimental devices required for the current experimental step; the first device operation sequence provides the execution order of the device operation actions of all experimental devices in the current experimental step, as well as the action instruction header of each device operation action, the action instruction parameters corresponding to each action instruction header, and the correspondence between the step instruction parameters and part or all of the action instruction parameters;
[0093] The first-step workflow obtained by the experimental step-device action flow parsing protocol of an embodiment of the present invention is composed of a plurality of first parsed device actions arranged in sequence; the first parsed device action includes a first parsed action index, a first parsed action device identifier, a first parsed action instruction header, and first parsed action instruction parameters; the first parsed action index of the first-step workflow is an index parameter that starts counting from 1 and increments by 1;
[0094] Step B3: Traverse all the first parsing device actions of the first-step workflow once; during this traversal, take the currently traversed first parsing device action as the corresponding current parsing device action; take the first parsing action index, the first parsing action device identifier, the first parsing action instruction header, and the first parsing action instruction parameters of the current parsing device action as the corresponding current parsing action index, the current parsing action device identifier, the current parsing action instruction header, and the current parsing action instruction parameters; take the sum of the first counter and the current parsing action index as a corresponding first action index; take the current parsing action device identifier, the current parsing action instruction header, and the current parsing action instruction parameters as the corresponding first action device identifier, the first action instruction header, and the first action instruction parameters; take the current parent step index as a corresponding first parent step index; and form a corresponding first device action from the first action index, the first parent step index, the first action device identifier, the first action instruction header, and the first action instruction parameters corresponding to the current parsing device action; at the end of this traversal, count the total number of the first parsing device actions of the first-step workflow to obtain the corresponding first total N; and add N to the first counter.
[0095] Step B4: Identify whether the current experimental step is the last first experimental step of the first workflow; if so, go to Step B5; if not, extract the next first experimental step of the first workflow as the new current experimental step, and return to Step B2.
[0096] Step B5: Sort all the obtained first device actions in ascending order of the first action index and form a corresponding first action flow to be sent back to the main control unit 141.
[0097] In another specific implementation manner of the embodiment of the present invention, the first task instance 1431 is specifically used for when performing experimental task execution processing according to the device driver server 16, the experimental message queue pool 15, the first queue identifier, and the first action flow:
[0098] Step C1: Take the first message queue 151 corresponding to the first queue identifier in the experimental message queue pool 15 as the corresponding current message queue; and take the first device action of the first action flow as the corresponding current device action.
[0099] Step C2: Take the first action index, the first parent step index, the first action device identifier, the first action instruction header, and the first action instruction parameters of the current device action as the corresponding current action index, the current parent step index, the current action device identifier, the current action instruction header, and the current action instruction parameters.
[0100] Step C3, set a corresponding first message type as the device driver type; use the current time as the corresponding first message timestamp; use the current parent step index, current action index, current action device identifier, current action instruction header, and current action instruction parameters as the corresponding first message step index, first message action index, first drive device identifier, first interface input instruction header, and first interface input instruction parameters; form a corresponding first message body from the obtained first message timestamp, first message step index, first message action index, first drive device identifier, first interface input instruction header, and first interface input instruction parameters; and form a corresponding first message record from the first message type and the first message body and add it to the first message queue 151.
[0101] Step C4, use the current parent step index, current action index, current action instruction header, and current action instruction parameters as the corresponding first write-back index, second write-back index, first instruction header, and first instruction parameters; use the first queue identifier as the corresponding first write-back queue identifier; and form a corresponding first action execution request from the first instruction header, first instruction parameters, first write-back queue identifier, first write-back index, and second write-back index.
[0102] Step C5, use the first experimental device 2 corresponding to the current action device identifier as the corresponding current experimental device; use the first device driver interface corresponding to the current experimental device as the corresponding current device driver interface; use the first device occupancy status of the first device attribute corresponding to the current experimental device as the corresponding current device occupancy status; and identify the current device occupancy status; if the current device occupancy status is idle, send the first action execution request to the current device driver interface; if the current device occupancy status is occupied, continuously poll the current device occupancy status at a preset status polling frequency until the latest current device occupancy status is idle.
[0103] Here, the status polling frequency is a preset frequency parameter.
[0104] Step C6, after sending the first action execution request to the current device driver interface, use the first message record with the latest time in the current message queue as the corresponding current message record every preset first waiting duration; and identify the current message record; if the first message type of the current message record is the device feedback type, go to Step C7; if the first message type of the current message record is the device driver type, continue to wait until the first message type of the latest current message record is the device feedback type.
[0105] Here, the first waiting duration is a preset time length parameter.
[0106] Step C7, after confirming that the first message type of the latest current message record is the device feedback type, confirm that the execution process of the current experimental task has been completed, and end the running state of the current task instance.
[0107] (V) Experimental message queue pool 15:
[0108] The experimental message queue pool 15 of the embodiment of the present invention is used to store a plurality of first message queues 151.
[0109] The first message queue 151 of the embodiment of the present invention corresponds to the first workflow one by one; the first message queue 151 is used to store and manage a plurality of first message records according to the first-in, first-out principle; the first message record includes a first message type and a first message body; the first message type includes a device driver type and a device feedback type; when the first message type is the device driver type, the first message body includes a first message timestamp, a first message step index, a first message action index, a first driving device identifier, a first interface input instruction header, and first interface input instruction parameters; when the first message type is the device feedback type, the first message body includes a first message timestamp, a first message step index, a first message action index, and first interface output data.
[0110] (VI) Device driver server 16:
[0111] The device driver server 16 of the embodiment of the present invention is used to set corresponding device management attributes for each first experimental device 2, denoted as the first device attributes; and configure corresponding device control action driver interfaces for each first experimental device 2, denoted as the first device driver interfaces; and provide a processing interface for querying information about all the first device attributes, denoted as the first query interface.
[0112] Here, the first device attributes of the embodiment of the present invention include a first device identifier, a first device type, a first device name, a first device nominal parameter set, and a first device occupancy state; wherein, the first device type includes at least an experimental environment sensor device, an experimental instrument device, a mechanical control device, and a simulation workstation; the first device occupancy state includes idle and occupied, and the first device occupancy state is initially set to idle.
[0113] The first query interface of the device driver server 16 is used to, when receiving a first query request each time:
[0114] Step D1, use the sender of the current first query request as the corresponding current requestor; and extract the first query type and the first query parameter of the current first query request as the corresponding current query type and current query parameter;
[0115] Among them, the first query request includes a first query type and a first query parameter; the first query type includes at least a full query and a conditional query; when the first query type is a full query, the first query parameter is empty; when the first query type is a conditional query, the first query parameter is a corresponding first logical expression, and the first logical expression is composed of one or more sub-logical expressions; each sub-logical expression is composed of a conditional field item, a sub-logical operator, and a corresponding field value range. On the left side of the sub-logical operator in the sub-logical expression is the conditional field item, and on the right side is the field value range; the conditional field items include device identifier, device type, device name, and device occupancy status; the sub-logical operators include at least less than, less than or equal to, greater than, greater than or equal to, not equal to, equal to, contains, does not contain; the field value range is a value range corresponding to the conditional field item; when the number of sub-logical expressions in the first logical expression is not unique, every two adjacent sub-logical expressions are connected by a parent-logical operator, and the parent-logical operators include at least AND and OR.
[0116] Step D2, and identify the current query type; if the current query type is a full query, send back a corresponding first query list composed of all first device attributes to the current requester; if the current query type is a conditional query, send back a corresponding first query list composed of first device attributes that meet the current query parameters to the current requester.
[0117] Each first device driver interface of the device driver server 16 is used to, when receiving a first action execution request each time:
[0118] Step E1, regard the first action execution request received this time as the corresponding current action execution request; regard the first experimental device 2 corresponding to the current driver interface as the corresponding current device; set the first device occupancy status of the first device attributes of the current device to occupied; and extract the corresponding first instruction header, first instruction parameter, first write-back queue identifier, first write-back index, and second write-back index from the current action execution request.
[0119] Among them, the first action execution request includes a first instruction header, a first instruction parameter, a first write-back queue identifier, a first write-back index, and a second write-back index.
[0120] Step E2, and perform an operation on the current device once with the first instruction header and the first instruction parameter as the current device driver instruction and the current driver instruction parameter based on a preset device operation processing flow; and at the end of this operation, regard the output result of this operation as the corresponding current output result.
[0121] Here, in the embodiment of the present invention, the operation processes of the decomposition actions of each type of experimental device will be pre-programmed and solidified to form a corresponding device operation processing flow.
[0122] Step E3: After obtaining the current output result, use the first message queue 151 corresponding to the first write-back queue identifier in the experimental message queue pool 15 as the corresponding current message queue; set a corresponding first message type as the device feedback type; use the current time as the corresponding first message timestamp; use the first and second write-back indexes as the corresponding first message step index and first message action index; use the current output result as a corresponding first interface output data; form a corresponding first message body from the obtained first message timestamp, first message step index, first message action index, and first interface output data; form a corresponding first message record from the obtained first message type and first message body and add it to the current message queue; when the record addition is successful, set the first device occupancy status of the first device attribute of the current device to idle.
[0123] It should be noted that the above division of each module of the system is only a division of logical functions. In actual implementation, it can be fully or partially integrated into a physical entity, or physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also all be implemented in the form of hardware; or some modules can be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the task board unit can be a separately established processing element, or can be integrated in a certain chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a certain processing element of the above system to perform the functions of the above determined module. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or can be independently implemented. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each method step of the foregoing method or each module processing step of the foregoing system can be completed by the integrated logic circuit in the hardware of the processor element or the instruction in the form of software.
[0124] For example, these modules of the above system can be one or more integrated circuits configured to implement the foregoing method. For example: one or more Application Specific Integrated Circuits (ASICs), or one or more Digital Signal Processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), etc. Again, when a certain module of the above system is implemented in the form of a processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processors that can call program code. Again, these modules can be integrated together and implemented in the form of a System-on-a-chip (SOC).
[0125] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can 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 the computer program instructions are loaded and executed on a computer, the processes or functions described in the foregoing method embodiments are generated in whole or in part. The above computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The above computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the above computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, Bluetooth, microwave, etc.). The above computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more integrated available media. The above available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)), etc.
[0126] An embodiment of the present invention provides an experimental task processing system, which includes: a task configuration unit, a task dashboard unit, a workflow server, an experimental scheduling server, an experimental message queue pool, and a device driver server; wherein, the task configuration unit is used to provide a user with a visual experimental task workflow editing tool, and send the experimental step workflow configured by the user through the tool, that is, the first workflow, to the workflow server; the task dashboard unit is used to display information on each first task feedback regularly sent by the workflow server through the visual task dashboards corresponding to each experimental task; the workflow server is used to send the first workflow to the experimental scheduling server side for experimental task execution, and forward to the task dashboard unit the instant feedback information of each experimental task, that is, the first task feedback, obtained by querying the experimental message queue pool; the experimental scheduling server at least includes a main control unit, an action parsing unit, and a task instance running environment; the main control unit is used to automatically parse and process the first workflow from experimental steps to device-level operation actions through the action parsing unit to obtain a corresponding first action flow, create a corresponding first message queue for each first workflow in the experimental message queue pool, create and run a corresponding first task instance for each first workflow in the task instance running environment, and have each first task instance perform experimental task execution processing according to the corresponding first action flow and the device driver server and perform instant experimental message publishing according to the corresponding first message queue during the task execution process; the experimental message queue pool is used to store multiple first message queues; the device driver server configures a corresponding device control action driver interface for each experimental device, and provides a query interface for querying the device attributes of all experimental devices. Through the embodiment of the present invention, on the one hand, the configuration difficulty of experimental tasks is reduced, the configuration error rate is reduced, and the resource waste rate is reduced, and on the other hand, the experimental efficiency is improved and the utilization rate of experimental devices is improved.
[0127] Those skilled in the art should also be able to further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0128] The steps of the methods or algorithms described in connection with the embodiments disclosed herein may be implemented in hardware, software modules executed by a processor, or a combination of both. The software modules may be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0129] The specific embodiments described above further elaborate on the objectives, technical solutions, and beneficial effects of the present invention. It should be understood that the above are only specific embodiments of the present invention and are not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims
1. An experimental task processing system, characterized in that, The system includes: a task configuration unit, a task dashboard unit, a workflow server, an experiment scheduling server, an experiment message queue pool, and a device driver server; The task configuration unit is respectively connected to the workflow server and the device driver server; the task dashboard unit is connected to the workflow server; the workflow server is respectively connected to the experiment scheduling server and the experiment message queue pool; the experiment scheduling server is respectively connected to the experiment message queue pool and the device driver server; the device driver server is connected to the experiment message queue pool and is also connected to a plurality of first experimental devices; The task configuration unit is used to query the device driver server to obtain a first device list; and provide the first device list and a visual experiment task workflow editing tool to the user for corresponding experiment task workflow editing processing to obtain a corresponding first workflow and save it; and when the user selects one of the first workflows for execution through the tool interface, send the current first workflow to the workflow server; The task dashboard unit is used to create a corresponding visual task dashboard instance for each first task package sent by the workflow server, denoted as the first task dashboard; and refresh the corresponding first task dashboard according to the first task feedback sent by the workflow server; The workflow server is used to, when receiving each first workflow sent by the task configuration unit, send the current first workflow to the experiment scheduling server; and receive a first queue identifier and a first action flow sent back by the experiment scheduling server; and form a first task package with the current first workflow and its corresponding first queue identifier and first action flow and send it to the task dashboard unit; and mark the current first workflow as an unfinished workflow; The workflow server is also used to regularly identify the feedback information of each first workflow marked as an unfinished workflow according to the experiment message queue pool to obtain a corresponding first task feedback and send it to the task dashboard unit; The workflow server is also used to, when receiving each set of completed workflows sent by the experiment scheduling server, change the mark of the first workflow corresponding to each workflow identifier in the current set of completed workflows from an unfinished workflow to a completed workflow; The experiment scheduling server at least includes a main control unit, an action parsing unit, and a task instance running environment; the main control unit is respectively connected to the workflow server, the experiment message queue pool, the action parsing unit, and the task instance running environment; the task instance running environment is respectively connected to the experiment message queue pool and the device driver server; The master control unit is configured to send the current first workflow to the action parsing unit each time it receives the first workflow sent by the workflow server; receive the first action stream sent back by the action parsing unit; create a corresponding first message queue for the current first workflow in the experimental message queue pool; use the queue identifier of the first message queue as the corresponding first queue identifier; send the first queue identifier and the first action stream back to the workflow server; create and run a corresponding experimental task execution instance, denoted as the first task instance, for the current first workflow in the task instance running environment, and send the first queue identifier and the first action stream to the first task instance; The master control unit is further configured to, when receiving the set of ended instances sent by the task instance running environment, form a corresponding set of completed workflows from the workflow identifiers of the first workflows corresponding to the instance identifiers of the current set of ended instances and send them to the workflow server; The action parsing unit is configured to perform operation action parsing on the experimental steps of the received first workflow to obtain the corresponding first action stream and send it back to the master control unit; The first task instance is configured to perform experimental task execution processing according to the device driver server, the experimental message queue pool, the first queue identifier, and the first action stream; The task instance running environment is further configured to periodically perform an instance deletion operation on the first task instances that have ended running, and form a corresponding set of ended instances from the instance identifiers of all the first task instances deleted this time and send them to the master control unit; The experimental message queue pool is configured to store multiple first message queues; The device driver server is configured to set corresponding device management attributes, denoted as the first device attributes, for each of the first experimental devices; configure corresponding device control action driver interfaces, denoted as the first device driver interfaces, for each of the first experimental devices; and provide a processing interface, denoted as the first query interface, for querying information about all the first device attributes.
2. The experimental task processing system according to claim 1, wherein The first device list includes multiple first device attributes; the first device attributes include a first device identifier, a first device type, a first device name, a first device nominal parameter set, and a first device occupancy status; the first device type includes at least experimental environment sensor devices, experimental instrument devices, mechanical control devices, and simulation workstations; the first device occupancy status includes idle and occupied, and the first device occupancy status is initially set to idle; The first workflow is sequentially sorted by a plurality of first experimental steps; the first experimental step includes a first step index, a first step device set, a first step instruction header, and a first step instruction parameter; the first step device set is composed of one or more first step devices; the first step device includes the first device identifier, the first device type, the first device name, and the first device nominal parameter set; the first step index is an index parameter starting from 1 and incrementing by 1 step by step. The first action flow corresponds one-to-one with the first workflow; the first action flow is sequentially sorted by a plurality of first device actions; the first device action includes a first action index, a first parent step index, a first action device identifier, a first action instruction header, and a first action instruction parameter; the first action index is an index parameter starting from 1 and incrementing by 1 step by step. The first task feedback corresponds one-to-one with the first workflow; the first task feedback includes a first task status and a first step feedback sequence; the first task status includes not started, in execution, and ended; the first step feedback sequence is sequentially sorted by a plurality of first step feedbacks, and the first step feedback corresponds one-to-one with the first experimental step; the first step feedback includes a first step status and a first action feedback sequence; the first step status includes not started, in execution, and ended; the first action feedback sequence is sequentially sorted by one or more first action feedbacks, and the first action feedback corresponds one-to-one with the first device action; the first action feedback includes a first action status, a first action execution period, and first action output data; the first action status includes not started, in execution, and ended; the first action execution period includes a start execution time and an end execution time. The first message queue corresponds one-to-one with the first workflow; the first message queue is used to store and manage a plurality of first message records according to the first-in, first-out principle; the first message record includes a first message type and a first message body; the first message type includes a device driver type and a device feedback type; when the first message type is the device driver type, the first message body includes a first message timestamp, a first message step index, a first message action index, a first drive device identifier, a first interface input instruction header, and a first interface input instruction parameter; when the first message type is the device feedback type, the first message body includes the first message timestamp, the first message step index, the first message action index, and first interface output data.
3. The experimental task processing system according to claim 2, wherein The first query interface of the device driver server is used to, when receiving a first query request each time: Step 31, take the sender of the current first query request as the corresponding current requestor; And extract the first query type and the first query parameter of the current first query request as the corresponding current query type and current query parameter; Among them, the first query request includes the first query type and the first query parameter; the first query type includes at least full query and conditional query; when the first query type is a full query, the first query parameter is empty; when the first query type is a conditional query, the first query parameter is a corresponding first logical expression, and the first logical expression is composed of one or more sub-logical expressions; each sub-logical expression is composed of a conditional field item, a sub-logical operator, and a corresponding field value range, and in the sub-logical expression, the conditional field item is on the left side of the sub-logical operator and the field value range is on the right side; the conditional field items include device identifier, device type, device name, and device occupancy status; the sub-logical operators include at least less than, less than or equal to, greater than, greater than or equal to, not equal to, equal to, contains, does not contain; the field value range is a value range corresponding to the conditional field item; when the number of sub-logical expressions in the first logical expression is not unique, every two adjacent sub-logical expressions are connected by a parent logical operator, and the parent logical operators include at least AND and OR. Step 32, and identify the current query type; if the current query type is a full query, send back a corresponding first query list composed of all the first device attributes to the current requester; if the current query type is a conditional query, send back a corresponding first query list composed of the first device attributes that meet the current query parameter to the current requester.
4. The experimental task processing system according to claim 3, wherein The task configuration unit is specifically used for setting the corresponding first query type to a full query and setting the corresponding first query parameter to be empty when querying the device driver server to obtain the first device list; And forming a corresponding first query request composed of the obtained first query type and the first query parameter and sending it to the first query interface of the device driver server; And taking the first query list sent back by the first query interface as the corresponding first device list.
5. The experimental task processing system according to claim 2, wherein The workflow server is specifically used for, when regularly identifying the feedback information of each first workflow marked as an unfinished workflow according to the experimental message queue pool to obtain the corresponding first task feedback and sending it to the task dashboard unit: Step 51, regularly taking each first action stream marked as an unfinished workflow as the corresponding current workflow at a preset first time frequency; and taking the first action stream corresponding to the current workflow as the corresponding current action stream; and taking the first message queue corresponding to the current workflow in the experimental message queue pool as the corresponding current message queue; Step 52, and performing a round of traversal on all the first device actions of the current action stream; During this round of traversal, the currently traversed first device action is used as the corresponding current device action; and the first action index, the first parent step index, the first action device identifier, the first action instruction header, and the first action instruction parameters of the current device action are used as the corresponding current action index, current step index, current device identifier, current instruction header, and current instruction parameters; and the first message records in the current message queue whose first message type is the device driver type and whose first message step index, first message action index, first driver device identifier, first interface input instruction header, and first interface input instruction parameters of the first message body match the current step index, the current action index, the current device identifier, the current instruction header, and the current instruction parameters respectively are recorded as the corresponding first matching records; and the first message records in the current message queue whose first message type is the device feedback type and whose first message step index and first message action index of the first message body match the current step index and the current action index respectively are recorded as the corresponding second matching records; and the first and second matching records are identified; if both the first and second matching records are empty, the corresponding first action status is set to not started, and the start and end execution times of the corresponding first action execution period are both set to be empty, and the corresponding first action output data is set to be empty; if the first matching record is not empty but the second matching record is empty, the corresponding first action status is set to in execution, and the start execution time of the corresponding first action execution period is set to the first timestamp of the first matching record, the end execution time is set to be empty, and the corresponding first action output data is set to be empty; if both the first and second matching records are not empty, the corresponding first action status is set to ended, and the start and end execution times of the corresponding first action execution period are set to the first timestamps of the first and second matching records respectively, and the corresponding first action output data is set to the first interface output data of the second matching record; And a corresponding first action feedback is formed by the first action status, the first action execution period, and the first action output data corresponding to the current device action; Step 53, perform a round of traversal on all the first experimental steps of the current workflow; during this round of traversal, regard the currently traversed first experimental step as the corresponding current experimental step; regard the first device actions in the current action flow whose first parent step indices match the first step index of the current experimental step as the corresponding current step actions; form a corresponding first action feedback sequence by sorting all the first action feedbacks corresponding to the current step actions in the order of the corresponding first action indices; identify the current first action feedback sequence; if the first action state of the first action in the current first action feedback sequence is not started, set the corresponding first step state to not started; if the last action state of the first action in the current first action feedback sequence is ended, set the corresponding first step state to ended; if the first action state of the first action in the current first action feedback sequence is not not started and the last action state is not ended, set the corresponding first step state to in execution; form a corresponding first step feedback by the first step state corresponding to the current experimental step and the first action feedback sequence; at the end of this round of traversal, form a corresponding first step feedback sequence by sorting all the obtained first step feedbacks in the order of the corresponding first step indices. Step 54, identify the first step feedback sequence; if the first step state of the first step in the first step feedback sequence is not started, set the corresponding first task state to not started; if the last step state of the first step in the first step feedback sequence is ended, set the corresponding first task state to ended; if the first step state of the first step in the first step feedback sequence is not not started and the last step state is not ended, set the corresponding first task state to in execution. Step 55, send the corresponding first task feedback formed by the obtained first task state and the first step feedback sequence to the task board unit.
6. The experimental task processing system according to claim 2, wherein when the action parsing unit specifically performs operation action parsing processing on the experimental steps of the received first workflow and sends the corresponding first action flow back to the main control unit: Step 61, regard the first first experimental step of the first workflow as the corresponding current experimental step; and initialize the first counter to 0. Step 62: Use the first step index of the current experimental step as the corresponding current parent step index; use the first step device set, the first step instruction header, and the first step instruction parameters of the current experimental step as the corresponding current step device set, current step instruction header, and current step instruction parameters; and according to the preset experimental step-device action flow parsing protocol, perform corresponding device action flow parsing processing based on the current step device set, the current step instruction header, and the current step instruction parameters to obtain the corresponding first step workflow. Among them, the experimental step-device action flow parsing protocol is divided into multiple first device action flow parsing protocols according to the step instruction header; each of the first device action flow parsing protocols corresponds to a specified step instruction header; each of the first device action flow parsing protocols includes the first step device configuration requirements and the first step device sequence rules; the first step device configuration requirements give the device type and device nominal parameter requirements of all experimental devices required for the current experimental step; the first device operation sequence gives the execution sequence of the device operation actions of all experimental devices in the current experimental step, as well as the action instruction header of each device operation action, as well as the action instruction parameters corresponding to each action instruction header, and the corresponding relationship between the step instruction parameters and some or all of the action instruction parameters. The first step workflow is sorted by multiple first parsed device action sequences; the first parsed device action includes a first parsed action index, a first parsed action device identifier, a first parsed action instruction header, and a first parsed action instruction parameter; the first parsed action index of the first step workflow is an index parameter that starts counting from 1 and increments in a step-by-step manner by 1. Step 63: Perform a round of traversal on all the first parsing device actions of the first step workflow; during this round of traversal, use the currently traversed first parsing device action as the corresponding current parsing device action; use the first parsing action index, the first parsing action device identifier, the first parsing action instruction header, and the first parsing action instruction parameters of the current parsing device action as the corresponding current parsing action index, current parsing action device identifier, current parsing action instruction header, and current parsing action instruction parameters; use the sum of the first counter and the current parsing action index as a corresponding first action index; use the current parsing action device identifier, the current parsing action instruction header, and the current parsing action instruction parameters as the corresponding first action device identifier, first action instruction header, and first action instruction parameters; use the current parent step index as a corresponding first parent step index; and form a corresponding first device action from the first action index, the first parent step index, the first action device identifier, the first action instruction header, and the first action instruction parameters corresponding to the current parsing device action; at the end of this round of traversal, count the total number of the first parsing device actions of the first step workflow to obtain a corresponding first total N; and add N to the first counter. Step 64: Identify whether the current experimental step is the last first experimental step of the first workflow; if so, go to Step 65; if not, extract the next first experimental step of the first workflow as the new current experimental step, and return to Step 62. Step 65: Sort all the obtained first device actions in ascending order of the first action index and send them back to the main control unit in the corresponding first action flow.
7. The experimental task processing system according to claim 2, wherein each of the first device driver interfaces of the device driver server is used to, when receiving a first action execution request each time: Step 71: Use the first action execution request received this time as the corresponding current action execution request. Use the first experimental device corresponding to the current driver interface as the corresponding current device; and set the first device occupancy status of the first device attributes of the current device to occupied. Extract the corresponding first instruction header, first instruction parameters, first write-back queue identifier, first write-back index, and second write-back index from the current action execution request. Wherein, the first action execution request includes the first instruction header, the first instruction parameters, the first write-back queue identifier, the first write-back index, and the second write-back index. Step 72, and based on a preset device operation processing flow, perform an operation on the current device using the first instruction header and the first instruction parameter as the current device driver instruction and the current driver instruction parameter; and at the end of this operation, use the output result of this operation as the corresponding current output result; Step 73, after obtaining the current output result, use the first message queue corresponding to the first write-back queue identifier in the experimental message queue pool as the corresponding current message queue; and set a corresponding first message type to the device feedback type; and use the current time as the corresponding first message timestamp; and use the first and second write-back indexes as the corresponding first message step index and the first message action index; and use the current output result as a corresponding first interface output data; and form a corresponding first message body from the obtained first message timestamp, the first message step index, the first message action index, and the first interface output data; and form a corresponding first message record from the obtained first message type and the first message body and add it to the current message queue; and when the record addition is successful, set the first device occupancy status of the first device attribute of the current device to idle.
8. The experimental task processing system according to claim 7, wherein The first task instance is specifically used for performing experimental task execution processing according to the device driver server, the experimental message queue pool, the first queue identifier, and the first action flow: Step 81, use the first message queue corresponding to the first queue identifier in the experimental message queue pool as the corresponding current message queue; and use the first device action of the first action flow as the corresponding current device action; Step 82, use the first action index, the first parent step index, the first action device identifier, the first action instruction header, and the first action instruction parameter of the current device action as the corresponding current action index, current parent step index, current action device identifier, current action instruction header, and current action instruction parameter; Step 83, set a corresponding first message type to the device driver type; And use the current time as the corresponding first message timestamp; And use the current parent step index, the current action index, the current action device identifier, the current action instruction header, and the current action instruction parameters as the corresponding first message step index, the first message action index, the first drive device identifier, the first interface input instruction header, and the first interface input instruction parameters; and form a corresponding first message body from the obtained first message timestamp, the first message step index, the first message action index, the first drive device identifier, the first interface input instruction header, and the first interface input instruction parameters; and form a corresponding first message record from the first message type and the first message body and add it to the first message queue. Step 84, and use the current parent step index, the current action index, the current action instruction header, and the current action instruction parameters as the corresponding first write-back index, the second write-back index, the first instruction header, and the first instruction parameters. And use the first queue identifier as the corresponding first write-back queue identifier; and form a corresponding first action execution request from the first instruction header, the first instruction parameters, the first write-back queue identifier, the first write-back index, and the second write-back index. Step 85, and use the first experimental device corresponding to the current action device identifier as the corresponding current experimental device. And use the first device drive interface corresponding to the current experimental device as the corresponding current device drive interface. And use the first device occupancy status of the first device attribute corresponding to the current experimental device as the corresponding current device occupancy status; and identify the current device occupancy status. If the current device occupancy status is idle, then send the first action execution request to the current device drive interface. If the current device occupancy status is occupied, then continuously poll the current device occupancy status at a preset status polling frequency until the latest current device occupancy status is idle. Step 86, after sending the first action execution request to the current device drive interface, take the first message record with the latest time in the current message queue as the corresponding current message record every preset first waiting duration; and identify the current message record; if the first message type of the current message record is the device feedback type, then go to step 87; if the first message type of the current message record is the device drive type, then continue to wait until the first message type of the latest current message record is the device feedback type. Step 87, after confirming that the first message type of the latest current message record is the device feedback type, confirm that the execution process of the current experimental task has been completed, and end the running status of the current task instance.