Workflow collaboration management method and system based on multi-agent cooperation

CN122989015APending Publication Date: 2026-10-27BEIJING CHUANGLIAN TIANXIA TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611169923.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-04
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0005]本发明的目的在于克服现有制造调度中工艺解析、资源分配和冲突处置相互割裂,导致设备互斥冲突难以在同一调度闭环内解除且调度结果难以直接驱动制造执行系统的问题,提供一种基于多智能体协作的工作流协同管理方法、系统、计算设备及计算机存储介质

Benefits of technology

[0016]本发明将工艺解析、资源分配和冲突处理分别交由常驻代理承担,并以明确的消息接收位置传递任务调度请求、资源占用申请和设备冲突记录,使不同职责可以并行执行且处理边界清楚。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122989015A_ABST
    Figure CN122989015A_ABST
Patent Text Reader

Abstract

The application provides a workflow collaborative management method and system based on multi-agent cooperation, and relates to the technical field of multi-agent collaborative management. Among them, the application first calls a pre-resident process analysis agent, a resource allocation agent and a conflict processing agent and receives an initial work order sequence, then generates a task scheduling request, then the process analysis agent generates a sub-task set according to the generated task scheduling request and applies for resource occupation to the resource allocation agent, generates and sends a device conflict record to the conflict processing agent when a resource conflict is detected to generate a re-routing scheduling instruction, and revises the front-end dependency relationship until the device conflict record is eliminated, and finally the resource allocation agent converts the confirmed resource occupation application into an event flow conversion sequence and controls the manufacturing execution system to update the work order issuing queue. The technical scheme provided by the application not only can eliminate device occupation conflicts under the premise of meeting process constraints, but also can improve the consistency of work order scheduling and manufacturing execution system issuing queue.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of multi-agent collaborative management technology, and in particular to a workflow collaborative management method and system based on multi-agent collaboration. Background Technology

[0002] In the field of intelligent manufacturing, especially in scenarios where manufacturing execution systems continuously receive multiple work orders and need to coordinate the parallel operation of multiple processes and equipment, there is a demand for efficient and reliable workflow collaborative management technologies.

[0003] Currently, for collaborative scheduling of manufacturing tasks, one existing technical solution is to use task agents, resource agents, and management agents, combined with ant colony genetic algorithms to allocate manufacturing tasks. The task execution equipment and order are determined through interaction between agents, thereby forming the manufacturing scheduling result.

[0004] However, the existing solutions mentioned above have limitations in continuous work order scenarios. When the expected time periods of multiple sub-tasks overlap, it is difficult to identify continuous conflicts based on the real-time status of the equipment. Furthermore, no specific mechanism is provided to rewrite the equipment sorting dependency while retaining the mandatory process constraints. The conflict resolution results are also not converted into an event sequence that can directly drive the manufacturing execution system to update the work order issuance queue, which can easily lead to inconsistencies between the scheduling plan and the execution queue. Summary of the Invention

[0005] The purpose of this invention is to overcome the problem that in existing manufacturing scheduling, process analysis, resource allocation and conflict handling are separated, making it difficult to resolve equipment mutual exclusion conflicts within the same scheduling closed loop and making it difficult for scheduling results to directly drive the manufacturing execution system. The invention provides a workflow collaborative management method, system, computing device and computer storage medium based on multi-agent collaboration.

[0006] Firstly, this application provides a workflow collaborative management method based on multi-agent cooperation, including: Invoke the pre-resident process resolution agent, resource allocation agent, and conflict resolution agent, and receive the initial work order sequence issued by the manufacturing execution system; Extract the process constraint information and equipment mutual exclusion information of each work order in the initial work order sequence to generate a task scheduling request; The process parsing agent generates a set of subtasks with prerequisite dependencies based on the process constraint information, and sends a resource allocation request carrying the device mutual exclusion information to the resource allocation agent; The resource allocation agent processes the resource occupation request based on the current device occupation status, and generates and sends a device conflict record to the conflict handling agent when a resource conflict is detected. The conflict handling agent generates a rerouting scheduling instruction to unbind the mutual exclusion of the devices, and the process parsing agent rewrites the preceding dependencies according to the rerouting scheduling instruction until the device conflict record is eliminated. After the equipment conflict record is eliminated, the resource allocation agent converts the confirmed resource occupation request into an event flow sequence, and controls the manufacturing execution system to update the work order issuance queue according to the event flow sequence.

[0007] Optionally, the pre-resident process resolution agent, resource allocation agent, and conflict resolution agent are invoked, and the initial work order sequence issued by the manufacturing execution system is received, including: The process parsing agent, the resource allocation agent, and the conflict handling agent are pre-established in the operating environment of the manufacturing execution system. Configure the receiving locations for task scheduling requests, resource allocation requests, and equipment conflict records for the process parsing agent, the resource allocation agent, and the conflict handling agent respectively, so that the process parsing agent, the resource allocation agent, and the conflict handling agent remain in a waiting-to-be-called state; Upon receiving the initial work order sequence, the process parsing agent, the resource allocation agent, and the conflict handling agent are activated, enabling them to read the information to be processed according to their corresponding receiving positions.

[0008] Optionally, process constraint information and equipment mutual exclusion information of each work order in the initial work order sequence are extracted to generate a task scheduling request, including: Read each work order one by one according to the initial work order sequence; Extract the sequence of processes, duration of each process, and completion conditions of the preceding processes from each work order as the process constraint information. Extract the equipment identifier of the equipment to be occupied and the corresponding process relationship that prohibits simultaneous occupation of the equipment to be occupied from each work order, as the equipment mutual exclusion information; The process constraint information and equipment mutual exclusion information are associated with the work order identifier, the association result is encapsulated into the task scheduling request and sent to the process parsing agent.

[0009] Optionally, the process parsing agent generates a set of subtasks with prerequisite dependencies based on the process constraint information, and sends a resource allocation request carrying the device mutual exclusion information to the resource allocation agent, including: The process parsing agent reads the task scheduling request and divides the work orders according to the process steps; Each process is recorded as a subtask, and the corresponding work order identifier, process duration, and equipment identifier of the equipment to be occupied are written into the subtask. Based on the completion conditions of the preceding process, establish the preceding dependency relationship between adjacent subtasks; Based on the aforementioned prerequisite dependencies and process duration, the estimated equipment occupancy period for each subtask is determined, and subtasks belonging to the same work order are grouped into the same subtask set. The set of subtasks, the expected device occupancy period, and device mutual exclusion information are encapsulated into the resource occupancy request and sent to the resource allocation agent.

[0010] Optionally, the resource allocation agent processes the resource allocation request based on the current device occupancy status, and generates and sends a device conflict record to the conflict handling agent when a resource conflict is detected, including: Obtain tasks in the manufacturing execution system that are in the process of manufacturing, and record the corresponding equipment identifier, subtask identifier, equipment occupancy period and occupancy status to form an equipment occupancy status record; The received resource usage requests are grouped according to the device identifier, and resource usage requests corresponding to different device identifiers are processed simultaneously. Compare the estimated equipment occupancy period in each resource occupancy request with the equipment occupancy period in the equipment occupancy status record; When corresponding time periods overlap, the resource usage requests that are processed later are placed in a waiting state and reprocessed after the current device usage ends; When the mutual exclusion information of the same device is still associated with multiple sets of incomplete subtasks, it is determined that the resource conflict exists, and a device conflict record is generated. The device conflict record includes the device identifier, subtask identifier, prerequisite dependencies, and device occupancy period.

[0011] Optionally, the conflict handling agent generates a rerouting scheduling instruction to unbind the mutual exclusion of the devices, and the process parsing agent rewrites the preceding dependencies according to the rerouting scheduling instruction until the device conflict record is eliminated, including: Before processing the device conflict records, set subtask record items corresponding to each subtask and device record items corresponding to each device. Connect the corresponding subtask record items according to the aforementioned prerequisite dependencies, and connect the corresponding subtask record items and device record items according to the aforementioned resource occupancy requests, thereby constructing and storing a resource allocation graph; Based on the subtask identifier and device identifier in the device conflict record, determine the subtask record item and device record item in the resource allocation diagram where the device occupancy conflict occurs. Search for dependency paths that all point to the device record item along the preceding dependencies, and determine alternative dependency paths that satisfy the process constraint information from the remaining dependency paths. Based on the alternative dependency path, a rerouting scheduling instruction containing the predecessor dependencies to be deleted and the predecessor dependencies to be established is generated. The process parsing agent rewrites the predecessor dependencies, and the resource allocation agent reprocesses the corresponding resource occupancy requests.

[0012] Optionally, after the equipment conflict record is cleared, the resource allocation agent converts the confirmed resource occupancy request into an event flow sequence, and controls the manufacturing execution system to update the work order issuance queue according to the event flow sequence, including: Resource usage requests that do not generate device conflict records after reprocessing are marked as confirmed resource usage requests; The confirmed resource usage requests are arranged according to the aforementioned prerequisite dependencies and the time period of device occupancy corresponding to the same device. Set up a subtask start event, a device occupancy event, a subtask completion event, and a device release event for each subtask; Events corresponding to different subtasks are connected according to the aforementioned prerequisite dependencies, and events corresponding to the same device are connected according to the device occupancy time period to form the event flow sequence; The event flow sequence is sent to the workflow engine, which then sequentially calls the corresponding events and modifies the work order issuance queue in the manufacturing execution system based on the called events.

[0013] Secondly, this application provides a workflow collaborative management system based on multi-agent cooperation, including: The receiving module is used to invoke the pre-resident process parsing agent, resource allocation agent, and conflict handling agent, and to receive the initial work order sequence issued by the manufacturing execution system; The extraction module is used to extract the process constraint information and equipment mutual exclusion information of each work order in the initial work order sequence and generate a task scheduling request; The generation module is used to generate a set of subtasks with prerequisite dependencies by the process parsing agent based on the process constraint information, and send a resource occupation request carrying the equipment mutual exclusion information to the resource allocation agent. The processing module is used to process the resource allocation agent based on the current device occupancy status, and generate and send a device conflict record to the conflict handling agent when a resource conflict is detected. The rewriting module is used to generate a rerouting scheduling instruction from the conflict handling agent to unbind the mutual exclusion of the devices, and the process parsing agent rewrites the preceding dependencies according to the rerouting scheduling instruction until the device conflict record is eliminated. The conversion module is used to convert the confirmed resource occupation request into an event flow sequence by the resource allocation agent after the device conflict record is eliminated, and to control the manufacturing execution system to update the work order issuance queue according to the event flow sequence.

[0014] Thirdly, this application provides a computing device, including a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are invoked and executed by the processing component to implement a workflow collaborative management method based on multi-agent cooperation as described in the first aspect above.

[0015] Fourthly, this application provides a computer storage medium storing a computer program, which, when executed by a computer, implements a workflow collaborative management method based on multi-agent cooperation as described in the first aspect.

[0016] This invention delegates process analysis, resource allocation, and conflict handling to resident agents, and transmits task scheduling requests, resource allocation applications, and equipment conflict records through clearly defined message receiving locations, enabling different responsibilities to be executed in parallel with clear processing boundaries.

[0017] This invention describes subtasks using process pre-process relationships and expected time periods. By grouping equipment, determining interval overlap, and identifying persistent conflicts, it can detect equipment mutual exclusion issues before work orders enter the execution queue.

[0018] This invention organizes subtasks, devices, and their connections into a resource allocation graph. During rerouting, it only rewrites adjustable device ordering dependencies and retains mandatory process dependencies, which can prevent the disruption of process sequence conditions while removing device mutual exclusion bindings.

[0019] This invention converts confirmed resource occupancy requests into an event flow sequence with dependency order and device time order, enabling the scheduling result to directly drive the manufacturing execution system to update the work order issuance queue, thereby reducing the inconsistency between the scheduling plan and the execution queue.

[0020] These or other aspects of this application will become more apparent in the following description of the embodiments. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1This is a schematic diagram of the overall process of the workflow collaborative management method based on multi-agent collaboration according to an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the agent's residing location and message interaction relationship in an embodiment of the present invention; Figure 3 This is a schematic diagram of the network structure of the resource allocation graph in an embodiment of the present invention; Figure 4 This is a schematic diagram of the state transition of device conflict detection and rerouting processing in an embodiment of the present invention; Figure 5 This is a timing diagram of the event flow sequence according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the composition structure of the workflow collaborative management system based on multi-agent collaboration in an embodiment of the present invention. Detailed Implementation

[0023] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. The described embodiments are used to explain the present invention and not to limit the present invention.

[0024] To facilitate understanding, some terms involved in this invention will be explained first.

[0025] The agent refers to a software execution unit residing in the manufacturing execution system's operating environment or a computing node communicating with it, possessing a message receiving location, internal state, and message processing program. Agents can be implemented as independent processes, container instances, or thread services.

[0026] The process parsing agent is responsible for converting the process description in the work order into subtasks and prerequisite dependencies, and updating the adjustable dependencies after receiving the rerouting scheduling instruction.

[0027] The resource allocation agent refers to an agent responsible for maintaining the equipment occupancy status, determining whether the equipment time period conflicts, confirming resource occupancy requests, and generating an event flow sequence.

[0028] The conflict handling agent refers to the agent responsible for constructing or reading the resource allocation graph based on the device conflict record, searching for alternative dependency paths, and generating rerouting scheduling instructions.

[0029] The device mutual exclusion information refers to a constraint record that specifies that the same device cannot be occupied by two subtasks simultaneously during the same time period. This record must at least contain the correspondence between the device identifier and the constrained subtask.

[0030] The aforementioned prerequisite dependency refers to a directed relationship where the completion conditions of one subtask must be met before the start of another subtask. This embodiment distinguishes between mandatory process dependencies and adjustable equipment order dependencies. Mandatory process dependencies originate from the process route and cannot be deleted by rerouting instructions; adjustable equipment order dependencies are used to express the order of subtasks competing for the same equipment and can be rewritten under the condition that the mandatory process dependency is satisfied.

[0031] The resource allocation graph refers to a directed heterogeneous graph with subtask records and device records as nodes, and prerequisite dependencies and resource allocation requests as edges. Heterogeneity means that the graph includes at least two types of nodes: subtask nodes and device nodes, and two types of edges: dependency edges and allocation edges.

[0032] The alternative dependency path refers to a path formed by changing the direction or connection position of one or more adjustable device sorting dependencies while retaining all mandatory process dependencies, and which can eliminate target device occupation conflicts.

[0033] The event flow sequence refers to an executable event directed acyclic graph formed by connecting subtask dependencies, device occupancy time, and internal event sequence within subtasks. Its linear output order is obtained by topological sorting.

[0034] refer to Figure 1 Step S101 first determines which agents will process the information and from where the information will be read. Step S102, based on this, organizes the initial work order into a task scheduling request with clearly defined fields. Step S103 converts the request into subtask dependencies and expected equipment requirements. Step S104 compares the expected equipment requirements with the actual occupancy status and distributes the requests according to the comparison results. If there are persistent conflicts, step S105 rewrites the adjustable dependencies and sends the results back to step S104 for review. If there are no conflicts, step S106 converts the confirmation results into events that the manufacturing execution system can call sequentially. The following explanation follows this input-output relationship step by step.

[0035] refer to Figure 1 and Figure 2 Step S101 first establishes the execution entity and information entry point required for subsequent processing. Specifically, it calls the pre-resident process parsing agent 210, resource allocation agent 220, and conflict handling agent 230, and the receiving module 110 receives the initial work order sequence issued by the manufacturing execution system 300. Pre-resident agents are used to initialize the equipment list, process field mapping, and message processing program before the work order arrives, allowing subsequent steps to directly process the work order without repeatedly establishing the runtime environment after each batch of work orders arrives.

[0036] In one implementation, three persistent services are deployed in the application server of the manufacturing execution system 300: a task scheduling request receiving location 211 is configured for the process parsing agent 210, a resource allocation agent 220 is configured with a resource occupancy request receiving location 221, and a device conflict record receiving location 231 is configured for the conflict resolution agent 230. The receiving location can be a message queue topic, a partition in a shared message table, or an inter-process communication endpoint. The registry records the agent identifier, receiving location, agent status, heartbeat time, and configuration version. After the agent starts, it periodically writes a heartbeat and sets its status to "waiting to be called."

[0037] The receiving module 110 receives the initial work order sequence through the manufacturing execution system interface and generates a batch identifier and a monotonically increasing message sequence number for each batch. To avoid duplicate processing caused by network retransmissions, each message is also assigned an idempotent identifier, which is calculated by concatenating the batch identifier, work order identifier, and message type to obtain a hash value. Before reading a message, the agent queries the set of already processed idempotent identifiers; if an identifier already exists, it returns the existing processing result without creating a new subtask.

[0038] Upon receiving the initial work order sequence, the receiving module 110 changes the status of the three agents to "runnable" and writes activation messages to the corresponding receiving locations. The process parsing agent 210 reads the task scheduling request, the resource allocation agent 220 reads the resource allocation request, and the conflict handling agent 230 reads the equipment conflict record. Message reading employs an acknowledgment mechanism; messages are only acknowledged after the processing result is persisted. In case of processing failure, the message is retained and re-delivered according to the configured retry interval. The retry interval can be set by the equipment status update cycle. For example, if the equipment status updates every 10 seconds, the initial retry interval is set to 10 seconds, and subsequent intervals can be increased arithmetically.

[0039] At this point, step S101 yields two results: first, three agents in a runnable state with clearly defined receiving locations; and second, an initial work order sequence with batch identifiers, work order order order order sequence, and idempotency identifiers. The agent states provide the execution conditions for subsequent message passing, while the initial work order sequence serves as the direct input for step S102. Step S101 only addresses who processes the information and from where it is read; which fields in the work order participate in scheduling needs to be further determined in step S102.

[0040] Step S102 follows the initial work order sequence obtained in step S101, with the extraction module 120 reading the work orders one by one according to the sequence. Reading them one by one preserves the order of the work orders given by the manufacturing execution system and provides a basis for determining the first-in, first-out (FIFO) rule when processing equipment requests in step S104. When reading each work order, the work order identifier, process identifier, equipment identifier, and duration are first verified to be complete. Work orders lacking necessary fields are marked as needing completion and are not included in this round of resource allocation to prevent incomplete data from generating unexecutable subtasks in subsequent steps.

[0041] The extraction module 120 extracts the sequence of operations from the process route field, the duration of operations from standard working hours or process parameters, and the completion conditions of preceding operations from completion markers, quality confirmation markers, or material arrival markers. These three elements together constitute process constraint information. The duration is uniformly converted into acceptable international units of time, such as seconds or minutes, and the original units are recorded for auditing purposes.

[0042] The extraction module 120 extracts the equipment identifier of the equipment to be occupied from the equipment requirement field, and reads the process correspondence that prohibits simultaneous occupation of the equipment from the equipment capacity table and the mutual exclusion configuration table to form equipment mutual exclusion information. The mutual exclusion configuration table is established according to the equipment identifier, and the table entries include equipment capacity, mutual exclusion group identifier, and allowed parallel quantity. This embodiment describes a dedicated equipment with a capacity of one; for equipment with a capacity greater than one, the available capacity can be treated as multiple logical device slots.

[0043] Subsequently, process constraint information and equipment mutual exclusion information are associated according to the work order identifier and encapsulated into a task scheduling request. Encapsulation, rather than sending the two types of information separately, ensures that the process parsing agent 210 can simultaneously determine the equipment requirements of each subtask when establishing subtask dependencies, avoiding subsequent matching based on unstable text names. Example fields of the task scheduling request are shown in Table 1.

[0044] Table 1. Main fields of a task scheduling request

[0045] Through the above extraction and association, the work orders, originally intended for business records, are organized into task scheduling requests with clearly defined field meanings and complete relationships between work orders and equipment. This request also includes process constraint information needed to establish process dependencies and equipment mutual exclusion information needed to calculate equipment requirements, thus eliminating the need to re-examine the work order text in subsequent steps. The task scheduling request is sent by the extraction module 120 to the task scheduling request receiving location 211 as the single input for step S103.

[0046] Step S103 receives the task scheduling request generated in step S102. The generation module 130 writes this request to the task scheduling request receiving location 211. The process parsing agent 210 divides the work order according to the sequence of processes, recording each process as a subtask. Subtasks are divided first because the equipment can only allocate time slots to specific processes, not directly allocate a continuous time slot to an entire work order containing multiple processes. Each subtask record must include at least the subtask identifier, work order identifier, process duration, equipment identifier, earliest start time, latest completion time, and status. The subtask identifier can be formed by combining the work order identifier and the process identifier to maintain global uniqueness.

[0047] Process analysis agent 210 establishes mandatory process dependencies based on the completion conditions of preceding processes. A process dependency graph is formed with subtasks as vertices and mandatory process dependencies as directed edges. If an edge points from subtask u to subtask v, it means that u must be completed before v can begin. The agent uses Karn's topological sorting algorithm to check for cycles in the graph: first, it counts the in-degree of each vertex, adds vertices with an in-degree of zero to a queue, and then removes vertices one by one and deletes their outgoing edges. If the final number of removed vertices is less than the total number of vertices, a circular dependency exists, and the corresponding work order is marked as a process configuration anomaly. This check prevents unexecutable process dependencies from entering the resource allocation phase.

[0048] For the checked process dependency graph, the process parsing agent 210 calculates the earliest start time for each subtask along the topology order. The earliest start time for subtasks without predecessors is the work order's allowed start time; for subtasks with predecessors, the earliest start time is the maximum value among all the expected completion times of the predecessors. The calculation formula is:

[0049] If subtask No forerunner (i.e.) = ),but Get the allowed start time for this work order.

[0050] In the formula, Subtasks The earliest start time, express The set of precursor subtasks, Indicates the precursor task The earliest start time, express The duration of the process. If Without a front-wheel drive, then Allowed start time for work order retrieval. Estimated end time. equal and Duration sum. Depend on to The half-open time interval is used as the expected equipment occupancy period. Using a half-open interval allows a subtask to be scheduled at time... The task ends and the other subtask is not misjudged as overlapping at time t.

[0051] The process parsing agent 210 groups subtasks belonging to the same work order into the same subtask set, and then encapsulates the subtask set, the expected equipment occupancy period, and equipment mutual exclusion information into a resource allocation request. The resource allocation request also carries the process dependency graph version number. The version number ensures that if the work order is modified externally during conflict resolution, the old rerouting scheduling instructions will not overwrite the new process relationships.

[0052] Therefore, step S103 converts the textual process constraints in step S102 into a computable dependency graph, and converts the estimated time period calculated from the dependency graph into equipment requirements. These equipment requirements are still planned values ​​and have not yet been compared with the real-time occupancy status in the manufacturing execution system, so they cannot be directly confirmed. The process parsing agent 210 sends the resource occupancy request to the resource occupancy request receiving location 221, and step S104 continues the executability verification.

[0053] Step S104 receives the resource occupancy request sent in step S103 and compares the projected equipment demand with the actual equipment status. To obtain a comparison benchmark, processing module 140 instructs resource allocation agent 220 to obtain tasks in the in-process state from manufacturing execution system 300, and records the equipment identifier, subtask identifier, equipment occupancy period, and occupancy status to form an equipment occupancy status record. The occupancy status includes at least idle, reserved, occupied, and releasing. The status record stores a version number, and resource allocation agent 220 writes it using a version comparison and exchange method to prevent concurrent requests from overwriting the latest status of the same equipment.

[0054] Resource allocation agent 220 hashes resource allocation requests based on device identifiers. Requests with the same device identifier enter the same serial queue, while queues with different device identifiers are processed in parallel by a thread pool. This allows for the simultaneous processing of requests from different devices while ensuring that the same exclusive device is not repeatedly confirmed under contention conditions.

[0055] For the same equipment application, resource allocation agent 220 will determine the overlap between the expected equipment occupancy period and the occupancy period in the equipment occupancy status record. Assume the application... The time period is the starting time. Until the end time ,Record The time period is the starting time. Until the end time The overlap length is calculated as follows:

[0056] In the formula, Indicates the overlap length between two time periods. When device identifiers are the same, mutual exclusion groups are the same, and... When the value is greater than zero, it is determined that the corresponding time period overlaps. In implementation, a balanced interval tree can be built according to the start time, and existing intervals that intersect with the newly applied interval can be queried. The complexity of a single query increases logarithmically with the number of existing intervals, plus the number of intersecting intervals returned.

[0057] When an overlap occurs, the resource allocation agent 220 places the resource allocation request that enters the processing later into a waiting state, moves its candidate start time to the current equipment occupation end time, and then updates the estimated time period of its successor subtasks according to the process dependency graph. After the current equipment release event arrives, the waiting request is reprocessed. The reason for waiting before determining a persistent conflict is that a single time overlap can usually be eliminated through natural serialization without modifying the dependency graph.

[0058] After reprocessing, if the mutual exclusion information of the same device is still associated with multiple sets of incomplete subtasks, and a simple shift will result in any of the following situations, then a resource conflict is determined to exist: (1) the mandatory prerequisite relationship is not satisfied; (2) the latest completion time is exceeded; (3) there is a conflict with the occupancy relationship of other devices. The resource allocation agent 220 generates a device conflict record, which records the device identifier, conflicting subtask identifier, work order identifier, prerequisite dependency relationship, device occupancy period, waiting relationship and current graph version, and sends it to the device conflict record receiving location 231.

[0059] In one implementation, the resource allocation agent 220 also constructs a waiting graph. Waiting subtasks are vertices, and directed waiting edges are established when a subtask waits for another subtask to release its device. If a depth-first search discovers a directed cycle, it indicates that multiple subtask sets are forming a circular wait, and a device conflict record is immediately generated without further retries. This waiting graph is used to quickly identify the risk of deadlock caused by mutual waiting between devices.

[0060] After step S104 is completed, two mutually exclusive processing branches are formed. If the application no longer conflicts after comparison and necessary waiting and retries, the resource allocation agent 220 marks it as a confirmed resource occupancy application and directly hands it over to step S106 to be converted into an event. If the application still has persistent conflicts or circular waiting, the device conflict record summarizes the device, subtask, dependencies, and time period that need to be modified and serves as input for step S105. This branching ensures that step S105 only handles conflicts that cannot be eliminated by natural waiting.

[0061] Step S105 follows the device conflict record generated in step S104. The device conflict record can identify directly overlapping subtasks and devices, but it cannot individually show which predecessor and successor constraints these subtasks are subject to. To determine whether the conflict can be resolved by changing the device order, the rewrite module 150 causes the conflict handling agent 230 to restore the conflict record to the complete dependency relationship. (See reference...) Figure 3The conflict handling agent 230 creates a subtask record item 410 for each subtask and a device record item 420 for each device. The subtask record item stores the subtask identifier, the work order to which it belongs, the duration, the expected time period, and the dependency type; the device record item stores the device identifier, the device capacity, and the set of occupied intervals.

[0062] The conflict resolution agent 230 establishes directed dependency edges 430 between subtask record items 410 according to prior dependencies, and establishes occupancy edges 440 between subtask record items 410 and equipment record items 420 according to resource occupancy requests, thereby constructing a resource allocation graph 400. The dependency edges 430 are labeled with either mandatory process dependencies or adjustable equipment sorting dependencies. The resource allocation graph 400 is persisted by batch identifiers and graph versions, enabling rerouting results to be traced to the corresponding work order version.

[0063] Based on the subtask identifier and device identifier in the device conflict record, the conflict handling agent 230 identifies the subtask record item and device record item in the resource allocation diagram 400 where the device occupancy conflict occurred. For example, Figure 3 Subtasks A2 and B1 both point to device M2 via the occupied edge, and their expected time periods overlap. Therefore, device M2 is a conflicting device record.

[0064] The conflict resolution agent 230 searches backwards along the dependency edges from each conflicting subtask to find the predecessor, obtaining the dependency path that commonly points to the conflicting device record. It then enumerates the adjustable device order dependencies in the remaining dependency paths. The enumeration uses a bounded depth-first search: each time, an adjustable device order dependency is selected as the edge to be deleted, and attempts are made to establish a new dependency edge in the opposite direction between the two conflicting subtasks or insert it after the adjacent device task. Forced process dependencies are not included in the deletion set.

[0065] For each candidate alternative dependency path generated, three feasibility checks are performed. First, Kahn topological sorting is used to confirm that the rewritten dependency graph is acyclic. Second, the earliest start time is recalculated along the topological order to confirm that all mandatory process dependencies and the latest completion time are satisfied. Third, interval overlap judgment is performed again to confirm that there are no new mutually exclusive overlaps between the target device and other devices affected by propagation. Candidate paths that pass the three checks are considered to satisfy the process constraint information.

[0066] When multiple feasible candidate paths exist, the conflict resolution agent 230 calculates the cost of each candidate path and selects the one with the lowest cost. The cost calculation formula is as follows:

[0067] In the formula, Indicates candidate alternative dependency paths, This indicates the increase in the estimated completion time after the revision compared to the original plan. This indicates the number of adjustable dependency edges that have been modified. This indicates the number of risks of overlap between the rewritten data and the time periods occupied by other devices. , and The weights are non-negative. They are generated by the scheduling strategy configuration of the manufacturing execution system; they are increased when delivery time is prioritized. Prioritize reducing process changes to improve Reduce the priority of recurring conflicts and increase To make different units comparable, the three terms can be normalized by the upper limit of allowed delay, the maximum number of modifiable edges, and the total number of candidate conflicts, respectively.

[0068] Based on the selected alternative dependency path, conflict resolution agent 230 generates a rerouting scheduling instruction. This instruction includes at least the graph version, the predecessor dependencies to be deleted, the predecessor dependencies to be established, the set of affected subtasks, and the new estimated equipment occupancy period. Upon receiving the instruction, process resolution agent 210 first compares the graph version, then only rewrites the edges of type adjustable equipment sorting dependency, and recalculates the estimated occupancy period of the affected subgraph; resource allocation agent 220 then reprocesses the corresponding resource occupancy request.

[0069] refer to Figure 4 If a conflict still arises during reprocessing, the conflict signature is updated, and the process proceeds to the next round of candidate path search. The conflict signature is calculated from the device identifier, the set of conflicting subtasks, and the dependency graph version. Attempted candidate paths and their conflict signatures are written to the access set to avoid duplicate searches. Due to the limited number of adjustable dependency edges, the candidate path set is finite; if a conflict-free path is found, the corresponding device conflict record is deleted, and the application is confirmed. If all candidate paths are infeasible, lower-priority applications are removed from the current allocation set and placed for manual or subsequent batch processing; the corresponding conflict records are closed, thus ensuring the processing process terminates.

[0070] Therefore, the output of step S105 is not a directly executed work order, but rather a rewritten dependency relationship and a correspondingly updated resource allocation request. This request must return to step S104 for comparison with the latest equipment occupancy status; only after verification and no further equipment conflict records are generated does it become a confirmed resource allocation request and proceed to step S106. Requests removed from the current allocation set do not enter event generation, thus avoiding bringing unresolved conflicts into the manufacturing execution system.

[0071] Step S106 follows the resource occupancy requests confirmed in step S104. The confirmed requests specify when each subtask will use which equipment, but they are still scheduling data. The manufacturing execution system 300 cannot determine when to start a process, lock equipment, or release equipment solely based on this record. Therefore, the conversion module 160 first marks requests that do not generate equipment conflict records as confirmed resource occupancy requests, and then converts the confirmation results into events that can be invoked item by item. The confirmation record includes the resource version and validity period; an event can be generated if the equipment status remains unchanged within the validity period, and if the equipment status version changes, the process returns to step S104 for re-verification to prevent the confirmation results from becoming disconnected from the actual equipment status.

[0072] Resource allocation agent 220 first arranges confirmed resource usage requests according to their prerequisite dependencies, and then arranges the subtasks using the same device according to the device's usage time period. Specifically, it merges forced process dependencies, device ordering dependencies retained after rerouting, and the time period sequence of the same device into an event constraint graph, and obtains a stable order through Kahn topology sorting. When the in-degree is zero, the expected start time, the work order's sequence number in the initial sequence, and the subtask identifier are used as sorting keys in sequence to ensure that the same input produces the same output.

[0073] For each subtask, set a subtask start event, a device occupancy event, a subtask completion event, and a device release event. The subtask start event indicates that the subtask has met the prerequisites and entered the startable state; the device occupancy event atomically changes the device status from reserved to occupied; the subtask completion event writes the process result; the device release event changes the device status to idle and wakes it up to wait for application. Each event includes an event identifier, a subtask identifier, a device identifier, a predecessor event identifier, a planned trigger time, a status, and an idempotency identifier.

[0074] For the same subtask, events are linked together as follows: subtask start event, device occupancy event, subtask completion event, and device release event. Only after a successful device occupancy event is the manufacturing execution instruction allowed to enter the device execution interface; if atomic occupancy fails, the event remains pending and triggers a re-verification of the resource status. For different subtasks, the completion event of the preceding subtask is linked to the start event of the succeeding subtask; for the same device, the release event of the preceding subtask is linked to the device occupancy event of the following subtask. These connections form an event flow sequence.

[0075] refer to Figure 5The event flow sequence is sent to the workflow engine 500. The workflow engine 500 only calls events where all preceding events have succeeded, and persists the event state after each call. When the subtask start event is called, the corresponding work order or process is moved to the dispatchable area of ​​the manufacturing execution system 300; when the equipment occupancy event succeeds, it is moved to the execution area; when the subtask completion event succeeds, the completed quantity and quality status are updated; when the equipment release event succeeds, it is removed from the execution area and the subsequent process is added to the dispatchable area. Thus, the scheduling result drives the work order dispatch queue to be updated through changes in event state.

[0076] To handle duplicate notifications, the workflow engine 500 queries the event log with an idempotent event flag before modifying the work order distribution queue; if a successful record already exists in the log, the queue will not be modified again. To handle event failures, the event log saves the reason for the failure and the number of retries; if the equipment is temporarily unavailable, it will retry according to the equipment status update cycle; if the process data is invalid, the corresponding work order will be returned to the pending parsing state.

[0077] When the device release event is completed, the release result enables subsequent events to be executed and also writes back the device occupancy status record used in step S104. In this way, the execution result of this batch of work orders becomes the real-time comparison benchmark for the next batch of resource occupancy requests, and steps S101 to S106 extend from a single scheduling chain into a continuously updated workflow collaborative closed loop.

[0078] The following uses two competing work orders for equipment M2 as an example to illustrate the complete processing procedure according to the sequence of steps S101 to S106. Step S101 invokes three resident agents, and the Manufacturing Execution System 300 issues two work orders in the order of WO-A and WO-B. Step S102 extracts the process sequence, duration, equipment identifier, and mutual exclusion relationship from the work orders, generating two task scheduling requests. The subtasks and process constraints corresponding to the two requests are shown in Table 2. All dependencies in the table are mandatory process dependencies, and the duration is in minutes.

[0079] Table 2 Subtasks and process constraints of the two work orders

[0080] Step S103 reads the above task scheduling request and establishes subtask dependencies. Assume the allowed start time for WO-A is 08:00 and the release time for WO-B is 08:15. The process parsing agent 210 calculates that the expected time period for A1 to occupy M1 is from 08:00 to 08:20, the expected time period for A2 to occupy M2 is from 08:20 to 08:35, and the expected time period for A3 to occupy M3 is from 08:35 to 08:45; the expected time period for B1 to occupy M2 is from 08:15 to 08:40, and the expected time period for B2 to occupy M4 is from 08:40 to 09:00. The above set of subtasks and their expected time periods are then encapsulated into a resource allocation request, becoming the input for step S104.

[0081] Step S104 groups the applications according to the device identifier and performs an overlap judgment on A2 and B1 in group M2, finding that the overlap period is from 08:20 to 08:35, with an overlap length of 15 minutes. WO-A is processed first, so A2 is temporarily confirmed, and B1 is placed in a waiting state. If B1 is simply moved back to 08:35, the expected end time of B2 becomes 09:20, which exceeds the latest completion time of WO-B, 09:10. Natural waiting cannot eliminate this constraint contradiction, so the same mutually exclusive group MG-M2 is still associated with two sets of incomplete subtasks. Step S104 generates a device conflict record and sends the record to step S105.

[0082] Step S105 locates A2, B1, and M2 in the resource allocation graph 400 based on the device conflict record, and retains the mandatory process dependencies of A1 pointing to A2, A2 pointing to A3, and B1 pointing to B2. The current adjustable device ordering dependency used to serialize device M2 is A2 pointing to B1. The conflict resolution agent 230 attempts to delete this edge and establish B1 pointing to A2, obtaining an alternative dependency path. After recalculation, B1 occupies M2 from 08:15 to 08:40, A2 subsequently changes to 08:40 to 08:55, and A3 changes to 08:55 to 09:05. This candidate path is acyclic and does not violate the mandatory process dependency. Simultaneously, B2 of WO-B can occupy M4 from 08:40 to 09:00, satisfying the latest completion time.

[0083] Table 3 Dependencies and Timeframes Before and After Conflict Resolution

[0084] After generating the rerouting scheduling instruction in step S105, the process parsing agent 210 rewrites the adjustable equipment sorting dependency and sends the updated resource occupancy request back to step S104. The resource allocation agent 220 re-verifies the two time periods of M2 and finds that the overlap length is zero, thus deleting the equipment conflict record and confirming the two resource occupancy requests. After the confirmation result enters step S106, it is converted into an event flow sequence; where the equipment release event of B1 precedes the equipment occupancy event of A2, and the completion event of A1 still precedes the start event of A2, so the equipment mutual exclusion and process sequence conditions are simultaneously satisfied. The workflow engine 500 updates the distribution positions of WO-A and WO-B according to the event sequence, thus completing the complete chain from work order to queue update.

[0085] refer to Figure 6 This invention also provides a workflow collaborative management system 100 based on multi-agent collaboration, including a receiving module 110, an extraction module 120, a generation module 130, a processing module 140, a rewriting module 150, and a conversion module 160.

[0086] The receiving module 110 invokes the pre-resident process parsing agent 210, resource allocation agent 220, and conflict handling agent 230, and receives the initial work order sequence issued by the manufacturing execution system 300. The receiving result is passed to the extraction module 120, which extracts the process constraint information and equipment mutual exclusion information of each work order and generates a task scheduling request.

[0087] The task scheduling request is passed to the generation module 130, which instructs the process parsing agent 210 to generate a set of subtasks with prerequisite dependencies and send a resource allocation request. The resource allocation request is passed to the processing module 140, which instructs the resource allocation agent 220 to verify the request based on the current equipment occupancy status; if the verification results in a persistent conflict, the processing module 140 generates an equipment conflict record.

[0088] Equipment conflict records are transmitted to the rewriting module 150, which instructs the conflict handling agent 230 to generate rerouting scheduling instructions and causes the process parsing agent 210 to rewrite the prerequisite dependencies. The rewritten request is returned to the processing module 140 for review; after approval, the confirmed resource usage request is transmitted to the conversion module 160. The conversion module 160 converts it into an event flow sequence and controls the manufacturing execution system 300 to update the work order issuance queue.

[0089] Each module can be implemented by different program segments executed by the same processing component, or it can be distributed across multiple computing nodes. The generation module 130, processing module 140, and rewriting module 150 respectively call their corresponding agents to complete the processing. The modules are associated with each other through batch identifiers, work order identifiers, and graph version data, thereby maintaining consistency with the aforementioned method steps.

[0090] This invention also provides a computing device, including a processing component, a storage component, a network interface, and a device status interface. The processing component may include one or more central processing units or processing units adapted to execute computer instructions. The storage component may include volatile memory and non-volatile memory for storing agent programs, message receiving location configurations, resource allocation graphs, device occupancy status records, event logs, and one or more computer instructions. When the processing component invokes the computer instructions, it implements steps S101 to S106.

[0091] This invention also provides a computer storage medium storing a computer program. When the computer program is executed by a computer, it implements the aforementioned workflow collaborative management method based on multi-agent cooperation. The computer storage medium can be a read-only memory, random access memory, solid-state memory, disk, optical disk, or other non-transitory medium capable of storing program code.

[0092] The above description represents an embodiment of the present invention. Without departing from the technical concept defined in the claims, those skilled in the art can make equivalent substitutions for the agent deployment method, message receiving location type, graph search data structure, and event persistence method.

Claims

1. A workflow collaborative management method based on multi-agent cooperation, characterized in that, include: Invoke the pre-resident process resolution agent, resource allocation agent, and conflict resolution agent, and receive the initial work order sequence issued by the manufacturing execution system; Extract the process constraint information and equipment mutual exclusion information of each work order in the initial work order sequence to generate a task scheduling request; The process parsing agent generates a set of subtasks with prerequisite dependencies based on the process constraint information, and sends a resource allocation request carrying the device mutual exclusion information to the resource allocation agent; The resource allocation agent processes the resource occupation request based on the current device occupation status, and generates and sends a device conflict record to the conflict handling agent when a resource conflict is detected. The conflict handling agent generates a rerouting scheduling instruction to unbind the mutual exclusion of the devices, and the process parsing agent rewrites the preceding dependencies according to the rerouting scheduling instruction until the device conflict record is eliminated. After the equipment conflict record is eliminated, the resource allocation agent converts the confirmed resource occupation request into an event flow sequence, and controls the manufacturing execution system to update the work order issuance queue according to the event flow sequence.

2. The method according to claim 1, characterized in that, Invoke the pre-resident process resolution agent, resource allocation agent, and conflict resolution agent, and receive the initial work order sequence issued by the manufacturing execution system, including: The process parsing agent, the resource allocation agent, and the conflict handling agent are pre-established in the operating environment of the manufacturing execution system. Configure the receiving locations for task scheduling requests, resource allocation requests, and equipment conflict records for the process parsing agent, the resource allocation agent, and the conflict handling agent respectively, so that the process parsing agent, the resource allocation agent, and the conflict handling agent remain in a waiting-to-be-called state; Upon receiving the initial work order sequence, the process parsing agent, the resource allocation agent, and the conflict handling agent are activated, enabling them to read the information to be processed according to their corresponding receiving positions.

3. The method according to claim 1, characterized in that, Extract the process constraint information and equipment mutual exclusion information of each work order in the initial work order sequence, and generate a task scheduling request, including: Read each work order one by one according to the initial work order sequence; Extract the sequence of processes, duration of each process, and completion conditions of the preceding processes from each work order as the process constraint information. Extract the equipment identifier of the equipment to be occupied and the corresponding process relationship that prohibits simultaneous occupation of the equipment to be occupied from each work order, as the equipment mutual exclusion information; The process constraint information and equipment mutual exclusion information are associated with the work order identifier, the association result is encapsulated into the task scheduling request and sent to the process parsing agent.

4. The method according to claim 1, characterized in that, The process parsing agent generates a set of subtasks with prerequisite dependencies based on the process constraint information, and sends a resource allocation request carrying the device mutual exclusion information to the resource allocation agent, including: The process parsing agent reads the task scheduling request and divides the work orders according to the process steps; Each process is recorded as a subtask, and the corresponding work order identifier, process duration, and equipment identifier of the equipment to be occupied are written into the subtask. Based on the completion conditions of the preceding process, establish the preceding dependency relationship between adjacent subtasks; Based on the aforementioned prerequisite dependencies and process duration, the estimated equipment occupancy period for each subtask is determined, and subtasks belonging to the same work order are grouped into the same subtask set. The set of subtasks, the expected device occupancy period, and device mutual exclusion information are encapsulated into the resource occupancy request and sent to the resource allocation agent.

5. The method according to claim 1, characterized in that, The resource allocation agent processes the resource allocation request based on the current device occupancy status, and generates and sends a device conflict record to the conflict handling agent when a resource conflict is detected, including: Obtain tasks in the manufacturing execution system that are in the process of manufacturing, and record the corresponding equipment identifier, subtask identifier, equipment occupancy period and occupancy status to form an equipment occupancy status record; The received resource usage requests are grouped according to the device identifier, and resource usage requests corresponding to different device identifiers are processed simultaneously. Compare the estimated equipment occupancy period in each resource occupancy request with the equipment occupancy period in the equipment occupancy status record; When corresponding time periods overlap, the resource usage requests that are processed later are placed in a waiting state and reprocessed after the current device usage ends; When the mutual exclusion information of the same device is still associated with multiple sets of incomplete subtasks, it is determined that the resource conflict exists, and a device conflict record is generated. The device conflict record includes the device identifier, subtask identifier, prerequisite dependencies, and device occupancy period.

6. The method according to claim 1, characterized in that, The conflict handling agent generates a rerouting scheduling instruction to unbind the mutual exclusion of the devices. The process parsing agent rewrites the preceding dependencies according to the rerouting scheduling instruction until the device conflict record is eliminated, including: Before processing the device conflict records, set subtask record items corresponding to each subtask and device record items corresponding to each device. Connect the corresponding subtask record items according to the aforementioned prerequisite dependencies, and connect the corresponding subtask record items and device record items according to the aforementioned resource occupancy requests, thereby constructing and storing a resource allocation graph; Based on the subtask identifier and device identifier in the device conflict record, determine the subtask record item and device record item in the resource allocation diagram where the device occupancy conflict occurs. Search for dependency paths that all point to the device record item along the preceding dependencies, and determine alternative dependency paths that satisfy the process constraint information from the remaining dependency paths. Based on the alternative dependency path, a rerouting scheduling instruction containing the predecessor dependencies to be deleted and the predecessor dependencies to be established is generated. The process parsing agent rewrites the predecessor dependencies, and the resource allocation agent reprocesses the corresponding resource occupancy requests.

7. The method according to claim 1, characterized in that, After the equipment conflict record is cleared, the resource allocation agent converts the confirmed resource occupancy request into an event flow sequence, and controls the manufacturing execution system to update the work order issuance queue according to the event flow sequence, including: Resource usage requests that do not generate device conflict records after reprocessing are marked as confirmed resource usage requests; The confirmed resource usage requests are arranged according to the aforementioned prerequisite dependencies and the time period of device occupancy corresponding to the same device. Set up a subtask start event, a device occupancy event, a subtask completion event, and a device release event for each subtask; Events corresponding to different subtasks are connected according to the aforementioned prerequisite dependencies, and events corresponding to the same device are connected according to the device occupancy time period to form the event flow sequence; The event flow sequence is sent to the workflow engine, which then sequentially calls the corresponding events and modifies the work order issuance queue in the manufacturing execution system based on the called events.

8. A workflow collaborative management system based on multi-agent cooperation, characterized in that, The system is used to implement the workflow collaborative management method based on multi-agent collaboration as described in any one of claims 1-7; the system includes: The receiving module is used to invoke the pre-resident process parsing agent, resource allocation agent, and conflict handling agent, and to receive the initial work order sequence issued by the manufacturing execution system; The extraction module is used to extract the process constraint information and equipment mutual exclusion information of each work order in the initial work order sequence and generate a task scheduling request; The generation module is used to generate a set of subtasks with prerequisite dependencies by the process parsing agent based on the process constraint information, and send a resource occupation request carrying the equipment mutual exclusion information to the resource allocation agent. The processing module is used to process the resource allocation agent based on the current device occupancy status, and generate and send a device conflict record to the conflict handling agent when a resource conflict is detected. The rewriting module is used to generate a rerouting scheduling instruction from the conflict handling agent to unbind the mutual exclusion of the devices, and the process parsing agent rewrites the preceding dependencies according to the rerouting scheduling instruction until the device conflict record is eliminated. The conversion module is used to convert the confirmed resource occupation request into an event flow sequence by the resource allocation agent after the device conflict record is eliminated, and to control the manufacturing execution system to update the work order issuance queue according to the event flow sequence.

9. A computing device, characterized in that, It includes a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are invoked and executed by the processing component to implement a workflow collaborative management method based on multi-agent cooperation as described in any one of claims 1-7.

10. A computer storage medium, characterized in that, The system contains a computer program that, when executed by a computer, implements a workflow collaborative management method based on multi-agent cooperation as described in any one of claims 1-7.