A distributed industrial swarm intelligent collaborative system and method based on OPC UA Robotics

By utilizing OPC UA Robotics' distributed industrial swarm intelligent collaboration method, the interoperability of heterogeneous devices and the single point of failure in centralized architectures are solved. This enables unified semantic interfaces and distributed collaboration between devices, improving the system's flexibility and reliability.

CN121239712BActive Publication Date: 2026-03-10SHENZHEN HUALONG XUNDA INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

In existing industrial systems, heterogeneous devices from multiple vendors are difficult to interoperate at the semantic level. Centralized architectures have the risk of single point of failure, poor data real-time performance, lack of flexibility and reconfigurability, and are difficult to achieve collective intelligent collaboration.

Method used

A distributed industrial group intelligent collaboration method based on OPC UA Robotics is adopted. By creating grasping method nodes in intelligent agent units, configuring workpiece identification parameters and grasping force parameters, a distributed execution plan is generated. A decentralized service capability registry is built through the OPC UA service discovery mechanism to realize a unified semantic interface and distributed collaboration between devices.

Benefits of technology

It enables plug-and-play functionality for heterogeneous devices, improves the system's fault tolerance and reliability, enhances the flexibility and reconfigurability of the manufacturing system, and supports millisecond-level collaborative control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121239712B_ABST
    Figure CN121239712B_ABST
Patent Text Reader

Abstract

This invention relates to the field of industrial swarm intelligence technology, and discloses a distributed industrial swarm intelligent collaborative system and method based on OPC UA Robotics. The method involves: creating a grasping method node in the OPC UA server of the intelligent agent unit and configuring the workpiece identification parameters and grasping force parameters as input method processing functions to obtain a grasping method object, which is then associated and stored with the intelligent agent endpoint address, resulting in a service capability registry; matching the visual recognition method and grasping method required for the production task to generate a distributed execution plan; after the preceding operation nodes in the distributed execution plan complete, sending a service call request message to the intelligent agent endpoint address and passing in the workpiece identification parameters to trigger the method processing function, returning an execution status code. In this invention, intelligent agents can autonomously collaborate and make predictive preparations based on real-time status, and cognitive nodes can make dynamic decisions and handle anomalies based on subscribed global states, thus realizing distributed swarm intelligent collaboration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial swarm intelligence technology, and in particular to a distributed industrial swarm intelligence collaborative system and method based on OPC UA Robotics. Background Technology

[0002] Industrial environments commonly feature heterogeneous equipment from multiple vendors. Different brands of robots, vision systems, conveyors, and other devices employ their own proprietary communication protocols and data models, making semantic-level interoperability difficult. Upper-layer applications require the development of dedicated adaptation code for each device, resulting in extremely high system integration complexity. Existing industrial systems often employ a centralized architecture, using a central SCADA platform or MES system for data acquisition and task scheduling. This presents a single point of failure risk; if the central node fails, the entire system collapses. Furthermore, the centralized polling acquisition method results in poor data real-time performance, failing to meet millisecond-level collaborative control requirements. In addition, traditional task planning modules are tightly coupled to specific equipment models, requiring extensive reprogramming when production lines are restructured or equipment is replaced, lacking flexibility. Moreover, control commands directly manipulate underlying registers, creating a disconnect between cognitive layer optimization and execution layer control, hindering true collective intelligent collaboration. Summary of the Invention

[0003] The main objective of this invention is to provide a distributed industrial swarm intelligent collaboration system and method based on OPC UA Robotics. The intelligent agents of this invention can autonomously collaborate and make predictions based on real-time status, and the cognitive nodes can make dynamic decisions and handle anomalies based on the subscribed global status, thus realizing distributed swarm intelligent collaboration.

[0004] To achieve the above objectives, this invention provides a distributed industrial swarm intelligent collaboration method based on OPC UA Robotics, comprising the following steps:

[0005] In the OPC UA server of the intelligent agent unit, a grasping method node is created and the workpiece identification parameters and grasping force parameters are configured into the input method processing function to obtain the grasping method object;

[0006] Read the node identifier and workpiece identifier parameter of the grasping method object in each intelligent agent unit and store them in association with the intelligent agent endpoint address to obtain the service capability registry;

[0007] Based on the intelligent agent endpoint addresses in the service capability registry, the visual recognition and capture methods required for the production task are matched to generate a distributed execution plan.

[0008] After the preceding operation node in the distributed execution plan completes, it sends a service call request message to the agent endpoint address and passes in the workpiece identifier parameter to trigger the method processing function, and returns the execution status code.

[0009] Optionally, in a first implementation of the first aspect of the present invention, the step of creating a grasping method node and configuring the workpiece identification parameters and grasping force parameters input method processing function in the OPC UA server of the intelligent agent unit to obtain a grasping method object includes:

[0010] In the address space of the OPC UA server in the intelligent agent unit, a motion device system type object is created according to the OPC UA Robotics standard. A method folder is created under the motion device system type object, and a grasping method node is defined.

[0011] Configure the workpiece identification parameters and gripping force parameters for the gripping method node to obtain a gripping method node with parameter definitions;

[0012] The parameterized crawling method node is bound to the method processing function, so that remote calls trigger the execution of the method processing function to obtain the crawling method object.

[0013] Optionally, in a second implementation of the first aspect of the present invention, the step of reading the node identifier and the workpiece identifier parameter of the grasping method object in each intelligent agent unit and storing them in association with the intelligent agent endpoint address to obtain the service capability registry includes:

[0014] After sending a FindServers request to the multicast address of the local discovery server and parsing the agent endpoint addresses of each agent unit from the response message, a secure session is established through the CreateSession and ActivateSession services.

[0015] The browser service traverses the address space of the intelligent agent unit starting from the root node of the object folder, reads the node identifier of the grasping method object in the method folder under the motion device system type object, and reads the input parameter attributes to parse the data type of the workpiece identifier parameter;

[0016] The endpoint address of the intelligent agent is used as an index to associate the data types of the node identifier and the workpiece identifier parameters, and a service capability registry is constructed.

[0017] Optionally, in a third implementation of the first aspect of the present invention, the step of generating a distributed execution plan by matching the visual recognition method and the crawling method required for the production task based on the agent endpoint address in the service capability registry includes:

[0018] The received production task description is semantically parsed to extract the operation object and location information, and the visual recognition method and grasping method and the corresponding intelligent agent endpoint address are matched from the service capability registry.

[0019] The visual recognition method and the grasping method found in the query are used to construct operation nodes according to the task execution order, and each operation node is assigned a node number and the intelligent agent endpoint address to obtain a directed acyclic graph containing multiple method call nodes.

[0020] Based on the execution logic of each operation node in the directed acyclic graph, a dependency node number is labeled for each operation node, and a distributed execution plan is generated.

[0021] Optionally, in a fourth implementation of the first aspect of the present invention, after the preceding operation node in the distributed execution plan completes, sending a service call request message to the agent endpoint address and passing in the workpiece identifier parameter to trigger the method processing function, and returning an execution status code, includes:

[0022] Scan the dependency node numbers of each operation node in the distributed execution plan and check the completion status of the preceding operation nodes, and filter out the operation nodes that meet the dependency conditions to add to the execution queue.

[0023] Construct an OPC UA server call service request message based on the agent endpoint address of the operation node in the execution queue, fill in the node identifier of the capture method object and the workpiece identifier parameter in the call service request message, and then send it to the agent endpoint address.

[0024] The intelligent agent unit receives the service call request message, triggers the method processing function to perform inverse kinematics solution and trajectory planning to control the movement of the device, and returns the execution status code.

[0025] Optionally, in a fifth implementation of the first aspect of the present invention, the intelligent agent unit receives the service call request message, triggers the method processing function to execute inverse kinematics solution and trajectory planning to control the motion of the device and returns an execution status code, including:

[0026] The intelligent agent unit parses the service call request message, obtains the workpiece identification parameters, queries the grasping pose coordinates corresponding to the workpiece identification parameters from the database, and performs Jacobian matrix iterative solution in combination with the robot DH parameter matrix to obtain the target joint angle value.

[0027] The current joint angle value read by the intelligent agent unit and the target joint angle value are used as boundary conditions to solve the trajectory, and a time-series joint angle trajectory sequence is obtained.

[0028] The intelligent agent unit sends the angle values ​​in the time-series joint angle trajectory sequence to each joint servo driver via the fieldbus to perform position closed-loop control. When the target position is reached, it controls the gripper to close and uses the force sensor reading to determine whether the gripping was successful or failed. The corresponding execution status code is then filled into the response message and returned.

[0029] Optionally, in a sixth implementation of the first aspect of the present invention, the distributed industrial swarm intelligent collaboration method based on OPC UA Robotics further includes:

[0030] The current joint angle values ​​collected by the intelligent agent unit are converted into an end-effector Cartesian pose containing position coordinates and attitude quaternions;

[0031] Write the end Cartesian pose into the value attribute of the tool pose variable node and update the source timestamp attribute to obtain a tool pose variable node with a timestamp;

[0032] Add the timestamped tool pose variable node to the publishing dataset and configure the publishing cycle. Send it to the network multicast address via UDP protocol in UADP encoding format to obtain real-time pose data packets.

[0033] The system compares the position coordinates in the subscribed real-time pose data messages with the target position to determine the position status of the agent unit. When an abnormal gripper force value is detected, a method cancellation request is sent to the agent unit, and the cooperative completion status or fault recovery trigger signal is output.

[0034] Optionally, in the seventh implementation of the first aspect of the present invention, the step of comparing the position coordinates in the subscribed real-time pose data message with the target position, determining the arrival status of the intelligent agent unit, and sending a method cancellation request to the intelligent agent unit when an abnormal gripper force value is detected, and outputting a cooperative completion status or fault recovery trigger signal, includes:

[0035] Subscribe to the real-time pose data packets published by the network multicast address and parse the UADP encoded data packets to extract the position coordinates and gripper force values ​​of each intelligent agent unit;

[0036] The distance error between the extracted position coordinates and the target position is calculated. When the distance error is less than a threshold, the position is marked as being in place. At the same time, the gripper force value is compared with the upper and lower limits of the normal force value range, and an abnormal state is marked.

[0037] Based on the arrival status and the abnormal status, when all intelligent agent units are in place and there are no abnormalities, the collaborative completion status is output. When the abnormal status is detected, a method cancellation request is sent to the corresponding intelligent agent endpoint address and a fault recovery trigger signal is output.

[0038] Optionally, in an eighth implementation of the first aspect of the present invention, the step of outputting a collaborative completion status when all agent units are in place and there are no abnormalities, based on the arrival status and the abnormal status, and sending a method cancellation request to the corresponding agent endpoint address and outputting a fault recovery trigger signal when the abnormal status is detected, includes:

[0039] Traverse the in-place and out-of-place states of each agent unit involved in the distributed execution plan and count the number of agents marked as in-place and the identifiers of agents marked as out-of-place.

[0040] When the number of agents in the "in place" state equals the planned total and the agent flag for the "abnormal state" is empty, send a task completion message and output the collaborative completion status.

[0041] When the agent identifier in an abnormal state is not empty, the corresponding agent endpoint address is queried from the service capability registry based on the agent identifier in the abnormal state. Then, a cancellation method request is constructed and sent to the agent endpoint address to suspend the execution of the current method. At the same time, a fault recovery trigger signal is output.

[0042] This invention also provides a distributed industrial swarm intelligent collaborative system based on OPC UA Robotics, comprising:

[0043] The module is created to create a grasping method node in the OPC UA server of the intelligent agent unit and configure the workpiece identification parameters and grasping force parameters input method processing function to obtain the grasping method object;

[0044] The associated storage module is used to read the node identifier and the workpiece identifier parameter of the grasping method object in each intelligent agent unit and associate them with the intelligent agent endpoint address to obtain the service capability registry;

[0045] The matching module is used to match the visual recognition method and crawling method required for the production task based on the intelligent agent endpoint address in the service capability registry, and generate a distributed execution plan;

[0046] The execution module is used to send a service call request message to the agent endpoint address and pass in the workpiece identifier parameter to trigger the method processing function after the preceding operation node in the distributed execution plan is completed, and return the execution status code.

[0047] In summary, this invention encapsulates the underlying motion control logic of devices into standardized method objects within the intelligent agent unit according to the OPC UA Robotics standard. This enables heterogeneous devices to provide a unified semantic interface, completely eliminating the semantic gap between devices. Upper-layer applications can invoke the capabilities of any standard-compliant device as if calling a web service, without needing to write adaptation code for specific device models, truly achieving plug-and-play functionality. A decentralized service capability registry is constructed through a distributed OPC UA service discovery mechanism. Each intelligent agent maintains a local copy of the global capability view. Even if some intelligent agents or network nodes fail, the remaining intelligent agents can continue to work collaboratively, improving fault tolerance and reliability. Device-independent intelligent task planning is performed based on the service capability registry. The generated distributed execution plan is a high-level semantic method call sequence rather than low-level control instructions. When production line equipment is replaced, as long as the new equipment exposes services according to the standard, it can be automatically included in the planning without modifying the upper-layer code, greatly improving the flexibility and reconfigurability of the manufacturing system. Through a millisecond-level state publish-subscribe mechanism, intelligent agents can autonomously coordinate and make predictions based on real-time states. Cognitive nodes make dynamic decisions and handle anomalies based on the subscribed global states, thus achieving an organic combination of global optimization at the cognitive layer and local autonomy at the execution layer, forming a truly distributed swarm intelligence collaborative architecture. Attached Figure Description

[0048] Figure 1 This is a schematic diagram of the steps of a distributed industrial group intelligent collaboration method based on OPC UA Robotics in one embodiment of the present invention;

[0049] Figure 2 This is a block diagram of a distributed industrial group intelligent collaborative system based on OPC UA Robotics in one embodiment of the present invention.

[0050] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0052] Reference Figure 1 This embodiment provides a distributed industrial swarm intelligent collaboration method based on OPC UA Robotics, including the following steps:

[0053] S1. Create a grasping method node in the OPC UA server of the intelligent agent unit and configure the workpiece identification parameters and grasping force parameters input method processing function to obtain the grasping method object;

[0054] Within each intelligent agent unit with grasping capabilities, an OPC UA server is launched, and a standard information model conforming to the OPC UA Robotics Companion Specification is constructed. Within the OPC UA server's address space, a MotionDeviceSystemType object node representing the device itself is instantiated according to the specification. This object node is named, for example, "RobotAgent_01," and its NodeId is set to the number node under namespace 2, such as "ns=2;i=1000." Under this object node, a folder node named "Methods" is created as a container for method nodes. Within the "Methods" folder, a grasping method node named "Pick" is defined, and its input parameter fields are configured. The workpiece identifier parameter is configured as a String type input field named "PartIdentifier," used by the remote client to pass the logical number of the target to be grasped. The grasping force parameter is configured as a Double type input field named "GripForce," in Newtons, used to specify the expected clamping force value during grasping execution, thus forming a grasping method interface with both parameter semantics and physical meaning. Define output parameter fields for the "Pick" method node, for example, set it to an Int32 type output named "ExecutionStatus" to return the status code of the execution result, where 0 indicates successful execution, 1 indicates kinematic solution failure, 2 indicates trajectory planning failure, and 3 indicates abnormal feedback from the gripping force sensor. The gripping method node is mapped to the local processing logic function "PickMethodHandler" through a method binding mechanism. The local processing function encapsulates the underlying operation sequence, including parsing standard pose data from the workpiece identifier, calling the inverse kinematics module to solve the target joint angles, generating the interpolation trajectory and driving each servo axis to execute the motion process, controlling the gripper to close after reaching the gripping point at the end effector, and collecting force sensor feedback values ​​to determine whether the gripping was successful. When a remote client triggers the "Pick" method call through the OPC UA Call service, the bound processing function is automatically called to execute the corresponding action. After execution, the processing result is encapsulated in the OutputArguments field and returned to the caller, obtaining the gripping method object.

[0055] S2, read the node identifier and workpiece identifier parameters of the grasping method object in each intelligent agent unit and store them in association with the intelligent agent endpoint address to obtain the service capability registry;

[0056] Specifically, during the initialization phase, the cognitive optimization node broadcasts a FindServers request to the pre-defined OPC UA LocalDiscovery Server multicast address (e.g., opc.udp: / / 224.0.1.187:4840) within the local network. This FindServers request retrieves all online and registered agent unit OPC UA server instances in the current network. The node extracts the endpoint address (EndpointUrl) for each agent from the received response message, such as "opc.tcp: / / 192.168.1.101:4840," as the communication entry point identifying the agent. The cognitive optimization node uses this endpoint address as the target, establishes a logical session with the agent's OPC UA server via the CreateSession service, and completes authentication and encryption negotiation via ActivateSession. After the session is established, the cognitive node starts from the agent's root node "ObjectsFolder" (NodeId=i=85) and traverses the address space hierarchy from top to bottom using the Browse service. It searches for the MotionDeviceSystemType object node conforming to the OPC UA Robotics standard and locates the "Methods" folder node under that object. Within this folder, it searches for the grabbing method node named "Pick" and calls the Read service to obtain its MethodId (node ​​identifier) ​​and InputArguments properties. During the parsing of the InputArguments field, the cognitive node identifies the parameter item representing the artifact identifier based on the parameter array content. Its Name field is "PartIdentifier," and it reads the specific value of its DataType field, such as the standard OPC UA basic type String. After completing the above parsing, the cognitive node structurally binds the agent's endpoint address to its grabbing method node identifier and the type information of the artifact identifier parameter in the grabbing method's input parameters. This binding is constructed as a triple {EndpointUrl, MethodNodeId, ParameterType} and written to the local service capability registry data structure.

[0057] S3, based on the agent endpoint address in the service capability registry, matches the visual recognition method and grasping method required for the production task, and generates a distributed execution plan;

[0058] It should be noted that the cognitive optimization node receives a structured production task description from the upper-level scheduling system or human-computer interaction interface, which includes fields such as task type, target object identifier, source location and target location. The task description is semantically parsed to extract core operation elements, including the operation object name (e.g., workpiece number WorkpieceA), operation start point (e.g., Conveyor_Zone1), and end point location (e.g., Bin_02). Based on the core operation elements, the node queries the locally maintained service capability registry for method nodes with relevant capabilities and their corresponding intelligent agent endpoint addresses. The visual recognition method required to identify the spatial location of the workpiece is a parameterless OPC UA method node named "Identify", and the method required to execute the grasping action is a parameterized method node named "Pick". The two correspond to intelligent agent units with VisionSystemType and MotionDeviceSystemType object nodes, respectively. After service matching is completed, the cognitive optimization node constructs a structured task graph containing multiple ordered operation nodes based on the implicit operation sequence logic in the task, such as needing to identify the workpiece position before performing the grasping action and then the placement operation. In the structured task graph, each operation node is assigned a unique node number (e.g., StepID=1, 2, 3), and the corresponding OPC UA method name, target agent endpoint address, method node identifier, parameter signature, and input value are filled into the node attribute field. Pointing edges are established between operation nodes according to their task dependencies, forming a set of acyclic task sequence structures, i.e., a directed acyclic graph (DAG). Each edge in the DAG clearly identifies the preceding node number that the current node depends on. For example, if node 3's grasping operation depends on node 1's successful visual recognition and node 2's conveyor belt placement, then node 3's dependent node numbers are marked as [1, 2]. After the DAG is constructed, a distributed execution plan containing multiple distributed method call nodes and their scheduling order constraints is generated.

[0059] S4, after the preceding operation node in the distributed execution plan is completed, sends a service call request message to the agent endpoint address and passes in the workpiece identifier parameter to trigger the method processing function, and returns the execution status code.

[0060] Specifically, a task scheduling engine for distributed scheduling is established in the cognitive optimization node. The task scheduling engine organizes the various operation nodes in the distributed execution plan in the form of a directed acyclic graph. It continuously scans the list of dependent node numbers of each operation node in the task graph through polling or event-driven methods. During the scanning process, it identifies operation nodes whose predecessor dependent nodes have all completed and returned a success status, and marks these nodes as "schedulingable" and adds them to the execution queue. The task scheduling engine traverses the execution queue. For each node to be executed, it queries the service capability registry for the corresponding OPC UA server endpoint information, grasping method node identifier, and input parameter structure based on its pre-labeled agent endpoint address field. Based on this, it constructs a standard OPC UA service call request message. The message content includes an ObjectId field pointing to the MotionDeviceSystemType object node of the target agent, a MethodId field filled with the NodeId of the "Pick" method node, an InputArguments field filled with the workpiece identifier parameter passed from the task context (such as PartIdentifier as "WorkpieceA"), and other optional parameters such as grasping force (GripForce).The constructed service call message is sent to the server endpoint address corresponding to the target agent through the OPC UA session channel, such as "opc.tcp: / / 192.168.1.101:4840". If the session expires during transmission, it is automatically recreated to ensure secure communication. The agent unit's OPC... After receiving the call message, the UA server will call the corresponding processing function, such as the PickMethodHandler function, according to the method binding logic. The processing function retrieves the workpiece grasping pose data from the local workpiece database or cache based on the passed PartIdentifier parameter. Then, it calls the inverse kinematics solution module to calculate the joint angle combination corresponding to the target end pose. If the solution is successful, it starts the trajectory planning module to generate multiple segments of fifth-order polynomial or spline trajectory. Based on the internal periodic scheduling mechanism, it continuously sends interpolation trajectory points to the servo drive channel at 1ms intervals to complete the joint space control. After the robot end moves to the target grasping position, it controls the pneumatic or electric gripper to apply force and close according to the passed GripForce parameter. At the same time, it calls the sensor feedback interface to read the grasping force value in real time and evaluate the physical effectiveness of the grasping action. If the gripper force value is within the expected range and there is no out-of-bounds alarm during the movement, it returns ExecutionStatus of 0 to indicate success. Otherwise, it returns a non-zero status code according to the exception type, such as 1 for inverse kinematics failure, 2 for trajectory interpolation interruption, and 3 for grasping failure. The status code is encapsulated in OPC. The UA calls the service response message and returns it to the cognitive optimization node through the session channel. After parsing the response message, the task scheduling engine marks the execution status of the operation node as "success" or "failure" and decides whether to trigger subsequent dependent nodes to enter the executable state or to stop the current execution chain and enter the exception handling process.

[0061] In one example, a gripping method node is created in the OPC UA server of the agent unit, and the workpiece identification parameters and gripping force parameters are configured into the input method processing function to obtain a gripping method object, including:

[0062] In the address space of the OPC UA server in the intelligent agent unit, create a motion device system type object according to the OPC UA Robotics standard, create a method folder under the motion device system type object and define the grabbing method node;

[0063] Configure the workpiece identification parameters and gripping force parameters for the gripping method node to obtain the gripping method node with parameter definitions;

[0064] Bind the parameterized crawling method node to the method processing function so that remote calls trigger the execution of the method processing function and obtain the crawling method object.

[0065] In this example, an OPC UA server is started and configured in an intelligent agent unit with motion control capabilities. Within its address space, a standard-compliant device object node is created according to the OPC UA Robotics Companion Specification. The node type is MotionDeviceSystemType, used to abstractly represent the actual motion device entity, such as a six-axis robot. Its name is set to a DisplayName like "RobotAgent_01", and a unique NodeId is assigned to it, such as "ns=2;i=1000". Under the object node, a folder node named "Methods" is created as a logical container to organize the service-oriented actions that the motion device can expose. Within this folder, a method node named "Pick" is created. The method node represents the standard encapsulated interface for the grasping operation. To give this method structured input semantics, its In... The `putArguments` property defines the necessary parameters. The "PartIdentifier" parameter is a String type, representing the unique identifier of the workpiece to be gripped. The "GripForce" parameter is a Double type, in Newtons, used to specify the force value that the end gripper should apply during the gripping process to meet the workpiece characteristics or gripping strategy requirements. At the same time, the `OutputArguments` field defines the return value structure, which is set as an Int32 type field named "ExecutionStatus" to represent the status code of the call result. Its value of 0 represents successful gripping, and non-zero values ​​represent different abnormal states such as kinematics unsolvable, trajectory planning failure, or gripper feedback abnormality. After the parameters are defined, the OPC UA server implementation layer establishes a correspondence between the "Pick" method node and the local implementation function "PickMethodHandler" through a method binding mechanism. The local implementation function, as the callback entry point, contains a complete execution control flow. Internally, it searches for the standard grasping pose in the device's local cache or database based on the PartIdentifier, and solves the joint angles of the pose through the inverse kinematics module. If the solution is successful, it enters the trajectory planning module to generate a sequence of interpolated trajectory points from the current position to the target position. Then, at a fixed period such as 1ms, these trajectory points are sent to each joint driver through the bus interface to control the robot to perform motion. After the end effector is in place, it controls the pneumatic or electric gripper to apply the gripping force specified by GripForce, and calls the built-in force sensor or position encoder interface to determine whether the gripping action is successful. The judgment result is converted into the corresponding status code and written into the return field of the method node. This realizes the encapsulation closed loop from OPC UA semantic definition to actual control logic. When the remote OPC UA client calls the method node, it triggers the corresponding control flow to be fully executed on the device side, completing the standardized skill service encapsulation.

[0066] In one example, the node identifier and workpiece identifier parameters of the grasping method object in each intelligent agent unit are read and associated with the intelligent agent endpoint address for storage, resulting in a service capability registry, including:

[0067] After sending a FindServers request to the multicast address of the local discovery server and parsing the agent endpoint addresses of each agent unit from the response message, a secure session is established through the CreateSession and ActivateSession services.

[0068] By browsing the address space of the intelligent agent unit starting from the root node of the object folder, the node identifier of the method object under the method folder of the motion equipment system type object is retrieved and the data type of the workpiece identifier parameter is parsed.

[0069] The agent endpoint address is used as the data type for the index associated node identifier and workpiece identifier parameters, and a service capability registry is constructed.

[0070] In this example, the cognitive optimization node implements multicast discovery logic conforming to the OPC UA Discovery mechanism. It sends a standard FindServers request message to the multicast address listened to by the local OPC UA Local Discovery Server (LDS-ME), such as "opc.udp: / / 224.0.1.187:4840". This request message is broadcast to all connected OPC UA device instances in the entire local area network. After receiving response messages from each agent, the node parses the ApplicationDescription field in the message to extract the OPC for each agent. The endpoint address (EndpointUrl) corresponding to the UA server, such as "opc.tcp: / / 192.168.1.101:4840", is used to identify the service entry point for all online agent units. Afterward, the cognitive optimization node sequentially creates a logical session for each agent endpoint address using the CreateSession service. Upon receiving the session token and security policy negotiation parameters from the server, it submits authentication information and completes the session activation process via the ActivateSession service, establishing a communication channel that meets the security policy requirements. After successfully establishing the session, the cognitive node calls the Browse service, starting with the ObjectsFolder (i=85), and recursively traverses the object hierarchy of the target agent's OPC UA address space to find objects matching the OPC UA obotics compiler. The Specification standard's MotionDeviceSystemType type node represents a robot or other motion-capable device object. Under its child nodes, the system searches for a folder node named "Methods," within which it looks for a method node named "Pick." The method object's unique identifier in the address space is obtained by reading its NodeId property. Simultaneously, the InputArguments property of the method node is read via the Read service to obtain the list of input parameters. The field named "PartIdentifier" is identified in the parameter array, and its DataType property is parsed to determine its data type. If a "GripForce" parameter also exists, its type is read as Double (i=11). The parsed data structure is encapsulated into service capability items, using the agent's endpoint address as the index key. An entry structure is created in the local service capability registry, recording fields including endpoint address, method name, method node identifier, input parameter structure, and data type descriptions for each parameter, thus forming the service capability registry.

[0071] In one example, a distributed execution plan is generated by matching the visual recognition and fetching methods required for the production task with the agent endpoint addresses in the service capability registry, including:

[0072] The received production task description is semantically parsed to extract the operation object and location information, and the visual recognition method and grasping method and the corresponding intelligent agent endpoint address are matched from the service capability registry.

[0073] The visual recognition and grasping methods found in the query are used to construct operation nodes according to the task execution order. Each operation node is assigned a node number and an agent endpoint address, resulting in a directed acyclic graph containing multiple method call nodes.

[0074] Based on the execution logic of each operation node in the directed acyclic graph, a dependent node number is labeled for each operation node, and a distributed execution plan is generated.

[0075] In this example, the cognitive optimization node receives a production task description from the upper-level scheduling system or the human-computer interaction interface. The production task description adopts a structured data format, including fields such as task type, target workpiece identifier, source location coordinates, target container location, allowed equipment type, and priority. The cognitive node calls the built-in semantic parsing module to parse the task field by field according to the task type label (such as "PickAndPlace"), and extracts the logical identifier of the operation object (such as "WorkpieceA"), the original location information (such as "ConveyorZone_01"), and the target pose (such as "Bin_03 at {X,Y,Z}"). In the constructed registry, methods with visual recognition capabilities and methods with crawling capabilities are filtered out. The visual recognition method is identified as "Identify" and is provided by the agent unit with the VisionSystemType node, while the crawling method is "Pick". Its input parameters must include a string field that matches the artifact identifier extracted from the task. By comparing metadata such as method name, parameter structure, server endpoint address, and current running status, the cognitive node selects the most suitable recognition agent and crawling agent and records them as subsequent call targets. The cognitive node constructs a method call sequence based on the task's operational flow. An operation node is inserted into this sequence, representing a call to the "Identify" method of the identification agent, and assigned a unique number, such as StepID=1. The node's attributes record MethodId, ObjectId, agent endpoint address, no input parameters, and an output result structure. A second operation node is constructed, representing a call to the "Pick" method of the grasping agent, with its StepID set to 2. This node contains input parameter fields, such as PartIdentifier, passed from the output of StepID=1, and records the target endpoint address and method identification information. If the task also includes a placement operation, a method node, such as "Place," is added with StepID=3, and the target pose parameters are configured. The cognitive node progressively constructs a task execution graph containing multiple method call nodes, establishing topological connections according to the input / output data flow and logical dependencies between nodes. This is structured as an acyclic directed graph (DAG), where each node represents a method call, and each edge represents a prerequisite for the current node's execution: the completion of the preceding node's execution. The cognitive node adds a "DependsOn" field to each node in the DAG, which lists the upstream node numbers it depends on, clarifies the triggering conditions of each operation, and forms a distributed execution plan.

[0076] The distributed industrial group intelligent collaboration method based on OPC UA Robotics, before executing the distributed execution plan, also includes: reading the precondition attributes of the corresponding method objects of each operation node in the distributed execution plan through a browsing service, and parsing the state variable node identifiers and constraint expressions defined in the precondition attributes; subscribing to or reading the real-time state variable values ​​of the corresponding intelligent agent unit according to the state variable node identifiers, including operation mode variable values, safety status variable values, and equipment busy flags; substituting the read real-time state variable values ​​into the constraint expressions for logical operation and judgment, and marking the operation node as executable when the operation mode variable value is in automatic mode, the safety status variable value is in normal state, and the equipment busy flag is idle; counting the executable status of all operation nodes in the distributed execution plan, and generating an execution blocking report when an operation node does not meet the preconditions and feeding back the blocking reason and the intelligent agent endpoint address involved to the upper layer system, and waiting for the conditions to be met before starting execution.

[0077] The distributed industrial swarm intelligent collaboration method based on OPC UA Robotics, prior to executing the distributed execution plan, further includes: topological sorting the directed acyclic graph in the distributed execution plan, calculating the in-degree value of each operation node and marking operation nodes with an in-degree value of zero as level zero, iteratively deleting processed nodes and their outgoing edges, calculating the in-degree value of the remaining nodes and marking their levels to obtain a hierarchical concurrent execution structure; traversing each operation node in the same level of the hierarchical concurrent execution structure to extract the corresponding agent endpoint address, detecting whether multiple operation nodes in the same level point to the same agent endpoint address, and marking them as a group of mutually exclusive operation nodes when resource conflicts are detected; and retrieving the service capability registry from the mutually exclusive operation node group. The system queries other available agent endpoint addresses that provide the same method capability type. Based on the current queue length of each candidate agent and the spatial distance between the tool pose and the task target location, it calculates a comprehensive load score. The agent endpoint address with the best score is selected to replace the agent endpoint addresses of some nodes in the mutual exclusion operation node group, thereby resolving resource conflicts. A concurrent execution schedule table is generated based on the resolved hierarchical concurrent execution structure. The concurrent execution schedule table records the set of operation nodes that can be called simultaneously within each level and the synchronization waiting points between levels. During execution, the system concurrently initiates method calls on all operation nodes in the same level and waits for all calls in that level to be completed before executing the next level.

[0078] In one example, after the preceding operation node completes in the distributed execution plan, it sends a service call request message to the agent endpoint address, passing in the artifact identifier parameter to trigger the method processing function, and returns an execution status code, including:

[0079] Scan the dependency node numbers of each operation node in the distributed execution plan and check the completion status of the preceding operation nodes, then filter out the operation nodes that meet the dependency conditions and add them to the execution queue.

[0080] Construct an OPC UA server call service request message based on the agent endpoint address of the operation node in the execution queue, fill in the node identifier and artifact identifier parameters of the capture method object in the call service request message, and then send it to the agent endpoint address.

[0081] The intelligent agent unit receives a service request message, triggers the method processing function to execute inverse kinematics solution and trajectory planning to control the movement of the device, and returns an execution status code.

[0082] In this example, a distributed task scheduling engine is built in the cognitive optimization node. This engine periodically or in an event-driven manner scans all method call nodes in the distributed execution plan and reads the "DependsOn" field of each node to obtain the set of node numbers of its preceding dependent operations. Based on the status record of each completed node in the task context, it determines whether all its dependencies are satisfied. When all dependent nodes of an operation node are in the "completed" and "successfully returned" state, the operation node is marked as "schedulable" and dynamically added to the execution queue. In the execution queue, the scheduling engine retrieves the operation nodes to be executed one by one, and constructs a Call request message conforming to the OPC UA calling specification based on the recorded agent endpoint address information such as "opc.tcp: / / 192.168.1.103:4840" and the method node identifier NodeId (e.g., "ns=2;i=1100"). The message structure includes the target ObjectId field pointing to the device object node to which the method belongs, the MethodId field pointing to the grabbing method node to be called, and the InputArguments field. The PartIdentifier parameter is extracted and filled in by the identification result passed by the preceding identification node. If there is a grabbing force parameter GripForce, it is also filled in the request parameter list. The constructed request message is sent to the OPC UA server of the target agent unit through the established OPC UA secure session channel. After receiving the request message, the server automatically parses its structure and forwards the request to the corresponding method node's processing function binding entry point, such as PickMethodHandler. The processing function internally calls the inverse kinematics solution module to calculate the target angle solution in joint space based on the input workpiece pose and the robot's current state. If the solution is successful, it continues to call the trajectory planning module to generate an interpolation trajectory point sequence that conforms to dynamic constraints based on the joint angle difference. These trajectory points are then sent sequentially to the servo drivers of each axis via the EtherCAT bus at a fixed control period of 1ms to control the robot to perform point-to-point motion. After the end effector approaches the gripping point, it drives the actuator to control the gripper to apply a predetermined gripping force according to the GripForce parameter value. At the same time, it activates the force sensor to detect whether the current force application state meets the requirements. If the sensor feedback result is within a reasonable range, the result is marked as successful and the status code ExecutionStatus is set to 0. Otherwise, it is considered a gripping failure and ExecutionStatus is set to a non-zero error code such as 1, 2, or 3, indicating inverse kinematics failure, path planning failure, or gripping feedback abnormality. The status code is encapsulated in the OPC UA call response message and returned to the cognitive optimization node through the same session channel.After receiving the response message, the cognitive node parses the status code and marks the execution status of the current node as "success" or "failure". If successful, it notifies the task scheduling engine to continue to advance the subsequent operations that depend on the node. If it fails, it starts the exception recovery mechanism, such as rolling back to the recognition node to reacquire the workpiece position or replacing the backup grasping smart weight for retry.

[0083] When the execution status code indicates execution failure, the distributed industrial group intelligent collaboration method based on OPC UA Robotics further includes: parsing the execution status code to obtain the failure type identifier; querying the corresponding failure reason and adjustable parameter type in a preset failure reason mapping table according to the failure type identifier; determining the adjustable parameter type as the gripping force parameter when the failure type identifier is insufficient gripping force; determining the adjustable parameter type as the target pose parameter when the failure type identifier is no solution for inverse kinematics; querying successful execution records with the same workpiece identifier parameter from the historical execution record database according to the adjustable parameter type; extracting the parameter values ​​used in the successful execution records and calculating the mean and standard deviation of the parameter values; and adding the mean and standard deviation to the preset value. Set the multiplier as the adjusted parameter value. When the adjustable parameter type is the grasping force parameter, increase the original grasping force parameter value by 20% to obtain the adjusted grasping force parameter value. Fill the adjusted parameter value into the new service call request message and resend it to the agent endpoint address. Record the number of retries and determine whether the number of retries exceeds the preset maximum retry threshold. If the number of retries does not exceed the maximum retry threshold and the returned execution status code still indicates failure, the parameter adjustment and retry operation is executed repeatedly. If the number of retries exceeds the threshold or fails three times in a row using different parameters, an unrecoverable failure mark is generated for the operation node and the fault information requiring manual intervention is reported to the upper layer system.

[0084] In one example, the intelligent agent receives a service request message, triggers a method processing function to execute inverse kinematics solving and trajectory planning to control the device's motion, and returns an execution status code, including:

[0085] The intelligent agent unit parses the service call request message, obtains the workpiece identification parameters, queries the database for the grasping pose coordinates corresponding to the workpiece identification parameters, and combines the robot DH parameter matrix to perform Jacobian matrix iterative solution to obtain the target joint angle value.

[0086] The current joint angle value read by the intelligent agent unit and the target joint angle value are used as boundary conditions to solve the trajectory, and a temporal joint angle trajectory sequence is obtained.

[0087] The intelligent agent unit sends the angle values ​​in the time-series joint angle trajectory sequence to each joint servo driver via the fieldbus to perform position closed-loop control. When the target position is reached, it controls the gripper to close and uses the force sensor reading to determine whether the gripping was successful or failed. The corresponding execution status code is then filled into the response message and returned.

[0088] In this example, the agent unit parses the service request message, analyzes its structure, extracts the PartIdentifier parameter from the InputArguments field, and uses the identifier as a key field to perform a query operation in a locally deployed real-time database or structured workpiece parameter table to retrieve the standard grasping pose information of the corresponding workpiece. This includes the target position coordinates (X, Y, Z) in three-dimensional space and the target end-effector pose information (such as Euler angles or pose quaternions). After successfully acquiring the pose data, the agent unit establishes a forward kinematics model based on the Denavit-Hartenberg (DH) parameter matrix configured in its own robot arm structure. It then uses the forward kinematics model to perform an iterative inverse Jacobian matrix solution for the end-effector pose. That is, starting from the initial joint angle estimate, the difference error between the target end-effector pose and the current forward solution is used to calculate the joint angle correction through the Jacobian pseudo-inverse matrix and iteratively converges to obtain the target joint angle vector that satisfies the pose constraints. The intelligent agent unit calls the built-in trajectory planning module to read the current angle feedback values ​​of each joint as the trajectory starting boundary, and uses the target joint angle value obtained by inverse solution as the target boundary. It then performs time parameterization solution on the trajectory of each joint through fifth-order polynomial interpolation or spline function to generate a time-series joint angle trajectory sequence. Each time step in the sequence contains complete multi-axis angle values. The intelligent agent unit sends the angle values ​​from the time-series joint angle trajectory sequence to each joint servo driver via industrial fieldbus protocols such as EtherCAT or CANopen. After receiving the target angle command, the driver performs position closed-loop control in conjunction with encoder feedback to achieve a smooth transition from the current position to the target posture. After the end effector reaches the target posture, the intelligent agent unit sends a gripper closing control signal through the IO control interface or electromagnetic relay and calls the force sensor interface inside the gripper to read the applied force value in real time. When the applied force value is within the set force threshold range and remains stable for a longer than a preset period (e.g., 50ms), the gripping is considered successful. Otherwise, if the force value is 0 or fluctuates, the gripping is considered to have failed. Based on the judgment result, the execution status code is set to 0 (success) or 3 (failure), and the status code is written into the OutputArguments field of the OPC UA method call to construct a response message. The response message is returned to the calling cognitive node through the established OPC UA secure session channel.

[0089] In one example, the distributed industrial swarm intelligent collaboration method based on OPC UA Robotics also includes:

[0090] The current joint angle values ​​collected by the agent unit are converted into an end-effector Cartesian pose containing position coordinates and attitude quaternions.

[0091] Write the end Cartesian pose to the value attribute of the tool pose variable node and update the source timestamp attribute to obtain the tool pose variable node with timestamp;

[0092] Add the timestamped tool pose variable node to the published dataset and configure the publication period. Send it to the network multicast address via UDP protocol in UADP encoding format to obtain real-time pose data packets.

[0093] The system compares the position coordinates in the subscribed real-time pose data messages with the target position to determine the position status of the agent unit. When an abnormal gripper force value is detected, a method cancellation request is sent to the agent unit, and the cooperative completion status or fault recovery trigger signal is output.

[0094] In this example, within each robot-type agent unit, the current angle feedback values ​​of each joint are collected. The angle sequence is obtained from encoder data returned by the servo driver. The kinematics processing module inside the agent unit, based on the DH structural parameters of the robot body or an equivalent rigid body chain model, inputs the joint angles into the forward kinematics solution function. The output result is the Cartesian pose of the current end effector in three-dimensional space, including the end position coordinates (X, Y, Z) and the pose quaternion (w, x, y, z). The pose information is encapsulated into a custom structure data object and written to the Value attribute of the tool pose variable node in the OPC UA address space. At the same time, the current system time is assigned to the SourceTimestamp field of the node, making the variable node a state data unit with semantic time identification. The intelligent agent unit configures the variable node for Pub / Sub publishing. It creates a PublishedDataSet object in the OPC UA server and adds the ToolPose variable node to the publishing list. Then, it creates a WriterGroup object and sets the publishing period parameter to a high-frequency period, such as 1ms. It selects UDP as the network protocol and specifies the UADP encoding format. It configures the target multicast address as, for example, 239.0.0.1:4840. After starting the publishing logic, it packages the current value and timestamp of ToolPose into a UADP message in each period and broadcasts it to all nodes in the network that have subscribed to the variable via the UDP protocol, forming a set of high-frequency real-time pose data packets. Meanwhile, the cognitive optimization node or other collaborative intelligent agent units, acting as subscribers, listen to the UADP messages of the target multicast address in their subscription parsing thread and parse the ToolPose variable content in each frame of the message in real time. They extract the end position coordinates from these messages and compare the end position coordinates with the preset task target position. When the error is within a specified tolerance range, such as ±0.1mm, it is determined to be in "positioned". The subscriber synchronously receives the gripper force sensor value variable messages. When the gripper force value is detected to be far below the set threshold or the reading is zero for multiple consecutive cycles, it is determined to be a gripping failure or workpiece slippage. The subscriber sends a Cancel method request to the intelligent agent unit through the OPC UACall service, passing in the call context ID of the target method to stop the control flow it is executing, preventing subsequent actions from being triggered erroneously. At the same time, the cognitive node generates and outputs a collaborative control completion status code (if the gripping is successful and in position) or a fault flag signal that triggers the abnormal recovery process (if the gripping is abnormal or the force feedback is lost).

[0095] The distributed industrial group intelligent collaboration method based on OPC UA Robotics further includes: configuring intelligent agent units to subscribe to real-time pose data messages and device status variable nodes published by their collaborating intelligent agent units, and establishing a point-to-point status subscription channel; parsing the subscribed and received real-time pose data messages to extract the position coordinates and operation completion flag of the collaborating intelligent agent units, and reading the device ready status variable values ​​published by the collaborating intelligent agent units; generating an autonomous collaboration trigger signal when the position coordinates reach the designated area and the operation completion flag and device ready status variable values ​​both meet the conditions according to the preset collaboration trigger rules; and actively performing pre-prepared actions after receiving the autonomous collaboration trigger signal, moving the device to the standby position and updating its own status to ready and waiting for the formal call instruction, even without receiving a call instruction from the cognitive node.

[0096] In the process of publishing real-time pose data messages, based on OPC UA Robotics' distributed industrial swarm intelligent collaboration method also includes: creating a sliding time window cache structure to store the real-time pose data messages received from subscriptions; the sliding time window cache structure stores the position coordinates and pose quaternions of the most recent one hundred moments in timestamp order; performing numerical differentiation calculations on the position coordinate sequence in the sliding time window cache structure to obtain the instantaneous velocity vector at each moment; calculating the Euclidean distance between velocity vectors at adjacent moments to obtain the acceleration change sequence; counting the number of abnormal points in the acceleration change sequence that exceed the normal acceleration threshold; when the number of abnormal points exceeds a preset abnormal threshold, it is determined that the motion trajectory is abnormal; extracting the operation node information currently executed by the intelligent agent and the endpoint addresses of surrounding collaborative intelligent agents from the service capability registry; calculating the minimum spatial distance between the tool pose of the intelligent agent and the tool poses of surrounding intelligent agents; when the minimum spatial distance is less than the safe distance threshold and the motion trajectory abnormality determination is established, generating a collision risk warning signal; sending an emergency deceleration command to the endpoint address of the involved intelligent agent to reduce the motion speed to a safe speed; sending a warning notification to the cognitive node to request replanning of the execution path; and writing the abnormality detection results and the identifiers of the involved intelligent agents into the log database for subsequent fault analysis.

[0097] In one example, the position coordinates in the subscribed real-time pose data packets are compared with the target position to determine the agent's position status. Upon detecting an abnormal gripper force value, a method cancellation request is sent to the agent, and the cooperative completion status or fault recovery trigger signal is output, including:

[0098] Subscribe to the real-time pose data packets published by the network multicast address and parse the UADP encoded data packets to extract the position coordinates and gripper force values ​​of each agent unit;

[0099] The distance error between the extracted position coordinates and the target position is calculated. When the distance error is less than the threshold, the position is marked as being in place. At the same time, the gripper force value is compared with the upper and lower limits of the normal force value range, and an abnormal state is marked.

[0100] Based on the arrival status and abnormal status, when all intelligent agent units are in place and there are no abnormalities, the collaborative completion status is output. When an abnormal status is detected, a method cancellation request is sent to the corresponding intelligent agent endpoint address and a fault recovery trigger signal is output.

[0101] In this example, an OPC UAPub / Sub client module is configured in the cognitive optimization node or the central intelligent unit responsible for scheduling and monitoring. The client module listens to a preset network multicast address, such as 239.0.0.1:4840, and binds a UDP port to receive status data packets periodically broadcast by each intelligent agent unit in UADP encoding format. After receiving the data frame from the network layer, the parsing module decodes the packet field by field according to the UADP frame format specification, identifies the PublishedDataSet field in the Payload part, and extracts the identifier and corresponding value fields of each variable node, including the ToolPose structure describing the spatial position of the tool's end effector, its position coordinate fields (such as X, Y, Z), and the GriperForce variable value describing the gripper state. After parsing, these values ​​are organized into a state snapshot structure categorized by agent unit. Combined with the target pose parameters preset during the task planning phase, Euclidean distance is calculated between each position coordinate and the corresponding target position. When the distance error is less than a set threshold (e.g., 0.5mm), the agent's state is marked as "in place." Simultaneously, the agent's gripper force value is compared with the upper and lower limits of the normal gripping force specified by the task parameters (e.g., 10.0N to 20.0N). If the value is outside the range or continuously changes abnormally (e.g., zero for three consecutive cycles), the agent is marked as "abnormal." Each cycle polls the state tables of all agents. When all participating agents are detected to be in the "in place" state and none are in the "abnormal" state, a collaborative completion status is triggered, notifying the upper-layer system that the task execution loop is complete. If any agent exhibits an abnormal state during the detection process, its unique identifier is used to retrieve the OPC UA endpoint address from the service capability registry. A CancelMethod request message is constructed and sent to the target device's OPC UA session channel. The UA server is instructed to terminate the current action flow or cancel the task status, while simultaneously outputting a fault recovery trigger signal within the cognitive node.

[0102] In one example, based on the arrival status and abnormal status, a collaborative completion status is output when all agent units are in place and there are no abnormalities. When an abnormal status is detected, a method cancellation request is sent to the corresponding agent endpoint address and a fault recovery trigger signal is output, including:

[0103] Traverse the in-place and out-of-place states of each agent unit involved in the distributed execution plan, and count the number of agents marked as in-place and the identifiers of agents marked as out-of-place.

[0104] When the number of agents in the "in place" state equals the planned total and the agent flag for the "abnormal state" is empty, send a task completion message and output the collaborative completion status.

[0105] When the agent identifier in an abnormal state is not empty, the corresponding agent endpoint address is queried from the service capability registry based on the agent identifier in the abnormal state. Then, a cancellation method request is constructed and sent to the agent endpoint address to suspend the execution of the current method. At the same time, a fault recovery trigger signal is output.

[0106] In this example, a runtime state monitoring cache is established in the cognitive optimization node. It periodically retrieves key variables such as end position and gripper state reported by each agent unit from the subscribed state data stream, and updates the cache in real time in the form of a hash table or a structured state dictionary after parsing. Each agent is assigned a unique identifier as the key name, and its value includes a boolean "in-place state" field and a boolean "abnormal state" field. In the scheduling loop, all participating agent nodes registered in the distributed execution plan are traversed. For each node, its corresponding status field is searched and a counter for nodes with a "true" status is incremented. Simultaneously, agent identifiers with an "true" abnormal status are recorded in the abnormal list. After the statistics are completed, the results are compared with the total number of target agents registered in the execution plan. When the count of the "true" status is equal to the number of agents involved in the planned task and the abnormal status list is empty, it is determined that all agents are ready and without potential faults. A task completion message is generated, encapsulated into a structured task report, and the collaborative completion status is output. If the abnormal status list is not empty, it indicates that at least one or more agents have malfunctioned in terms of current position determination, gripper force feedback, or communication response. In this case, agent identifiers are read one by one from the abnormal status list, and the corresponding OPC UA server endpoint address is found based on the information recorded in the service capability registry. Then, a CancelMethod standard call message is constructed, filled with the currently active method call context identifier of the abnormal node, and sent to the OPC of the abnormal agent through the existing secure session channel. The UA server forcibly terminates its ongoing control flow to prevent it from performing unexpected actions or causing coordination conflicts with other normal nodes. After the cancellation method command is issued, it synchronously outputs a fault recovery trigger signal and marks the current task status as "interrupted and awaiting recovery".

[0107] The distributed industrial group intelligent collaboration method based on OPC UA Robotics, after outputting the fault recovery trigger signal, further includes: subscribing to server status change events published by the local discovery server; parsing the event message to extract the status change type and the corresponding agent endpoint address when a server status change event message is received; determining that an agent is offline or faulty based on the status change type; searching for the record corresponding to the agent endpoint address in the service capability registry and marking the available status field of the record as unavailable, while extracting the method capability type provided by the faulty agent from the record; filtering a list of backup agent endpoint addresses in the service capability registry based on the method capability type, where the available status is available and the method capability type matches; calculating the current load rate and spatial distance to the target location for each backup agent in the list; selecting the backup agent endpoint address with the lowest load rate and shortest spatial distance as the replacement address; replacing the agent endpoint address field of all operation nodes using the faulty agent endpoint address in the distributed execution plan with the replacement address, and sending a task takeover notification message to the agent unit corresponding to the replacement address before re-executing the unfinished operation nodes in the distributed execution plan.

[0108] Reference Figure 2 This embodiment provides a distributed industrial swarm intelligent collaborative system based on OPC UA Robotics, including:

[0109] Create module 1, which is used to create a grasping method node in the OPC UA server of the intelligent agent unit and configure the workpiece identification parameters and grasping force parameters input method processing function to obtain the grasping method object;

[0110] The associated storage module 2 is used to read the node identifier and workpiece identifier parameters of the grasping method object in each intelligent agent unit and associate them with the intelligent agent endpoint address to obtain the service capability registry;

[0111] Matching module 3 is used to match the visual recognition method and grasping method required for the production task based on the intelligent agent endpoint address in the service capability registry, and generate a distributed execution plan;

[0112] Execution module 4 is used to send a service call request message to the intelligent agent endpoint address after the pre-operation node in the distributed execution plan has completed, and to pass in the workpiece identifier parameter to trigger the method processing function and return the execution status code.

[0113] In this embodiment, the specific implementation of each unit in the above system embodiment is described in the above method embodiment, and will not be repeated here.

[0114] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, system, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, system, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, system, article, or method that includes that element.

[0115] The above description is only a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A distributed industrial swarm intelligence collaboration method based on OPC UA Robotics, characterized in that, The method comprises the following steps: creating a grabbing method node in an OPC UA server of an agent unit and configuring a workpiece identification parameter and a grabbing force parameter input method processing function to obtain a grabbing method object; reading the node identification of the grabbing method object and the workpiece identification parameter in each agent unit and storing them in association with an agent endpoint address to obtain a service capability registry; matching a visual recognition method and a grabbing method required by a production task according to the agent endpoint address in the service capability registry to generate a distributed execution plan; after a pre-operation node in the distributed execution plan is completed, sending a call service request message to the agent endpoint address and inputting the workpiece identification parameter to trigger the method processing function to return an execution status code; specifically comprising: scanning the dependent node number of each operation node in the distributed execution plan and checking the completion state of the pre-operation node, screening out operation nodes that meet the dependent conditions to join an execution queue; constructing an OPC UA server call service request message according to the agent endpoint address of the operation node in the execution queue, filling in the node identification of the grabbing method object and the workpiece identification parameter in the call service request message and sending it to the agent endpoint address; the agent unit analyzes the call service request message, obtains the workpiece identification parameter, queries the grabbing pose coordinates corresponding to the workpiece identification parameter from a database and combines a robot DH parameter matrix to iteratively solve a Jacobian matrix to obtain target joint angle values; the current joint angle values read by the agent unit and the target joint angle values are taken as boundary conditions for trajectory solving to obtain a time sequence joint angle trajectory sequence; the agent unit sends the angle values in the time sequence joint angle trajectory sequence to each joint servo driver through a field bus to perform position closed-loop control, controls the gripper to close when the target position is reached, judges whether the grabbing is successful or failed through force sensor reading, fills in the corresponding execution status code in the response message and returns; Convert the current joint angle value collected by the agent unit into an end Cartesian pose containing position coordinates and attitude quaternion; write the end Cartesian pose into the value attribute of the tool pose variable node and update the source timestamp attribute to obtain a tool pose variable node with a timestamp; add the tool pose variable node with a timestamp to the publication dataset and configure the publication period, and send it to the network multicast address in UADP encoding format through the UDP protocol to obtain a real-time pose data packet; subscribe to the real-time pose data packet published by the network multicast address and parse the UADP encoded format data packet to extract the position coordinates and gripper force value of each agent unit; calculate the distance error between the extracted position coordinates and the target position, and when the distance error is less than a threshold value, mark the in-place state, and at the same time, compare the gripper force value with the upper and lower limits of the normal force value interval to mark the abnormal state; according to the in-place state and the abnormal state, output a cooperative completion state when all agent units are in place and there is no abnormality, and when the abnormal state is detected, send a method cancellation request to the corresponding agent endpoint address and output a fault recovery trigger signal. 2.The distributed industrial swarm intelligence collaboration method based on OPC UA Robotics according to claim 1, wherein, The method comprises the following steps: In the address space of the OPC UA server in the agent unit, a motion device system type object is created according to the OPC UA Robotics standard, a method folder is created under the motion device system type object, and a grabbing method node is defined; The grabbing method node is configured with a workpiece identification parameter and a grabbing force parameter to obtain a grabbing method node with parameter definition; The grabbing method node with parameter definition is bound to a method processing function, so that remote invocation triggers the execution of the method processing function to obtain a grabbing method object. 3.The distributed industry swarm intelligence collaboration method based on OPC UA Robotics according to claim 1, wherein, The node identifier and the workpiece identification parameter of the grabbing method object in each agent unit are read and stored in association with the agent endpoint address to obtain a service capability registry, comprising: A FindServers request is sent to the multicast address of the local discovery server, and after the agent endpoint address of each agent unit is parsed from the response packet, a secure session is established through CreateSession and ActivateSession services; The node identifier of the grabbing method object in the method folder under the motion device system type object is read by traversing the address space of the agent unit from the root node of the object folder through the browsing service, and the data type of the workpiece identification parameter is parsed by reading the input parameter attribute; The agent endpoint address is used as an index to associate the node identifier and the data type of the workpiece identification parameter, and a service capability registry is constructed.

4. The OPC UA Robotics-based distributed industrial swarm intelligence collaboration method according to claim 1, characterized in that, The visual recognition method and the grabbing method required by the production task are matched according to the agent endpoint address in the service capability registry, and a distributed execution plan is generated, comprising: performing semantic analysis on the received production task description, extracting operation objects and position information, and matching visual recognition methods and grabbing methods and corresponding agent endpoint addresses from the service capability registry; constructing operation nodes according to the queried visual recognition methods and grabbing methods in the order of task execution, assigning node numbers and the agent endpoint addresses to each operation node, and obtaining a directed acyclic graph containing multiple method call nodes; annotating dependent node numbers for each operation node according to the front and rear execution logic of each operation node in the directed acyclic graph, and generating a distributed execution plan. 5.The distributed industry swarm intelligence collaboration method based on OPC UA Robotics according to claim 1, wherein, The method according to the in-place state and the abnormal state, when all agent units are in place and there is no abnormality, outputs a cooperative completion state, when the abnormal state is detected, sends a method cancellation request to the corresponding agent endpoint address and outputs a fault recovery trigger signal, comprising: traversing the in-place state and the abnormal state of each agent unit involved in the distributed execution plan and counting the number of agents marked as in place and the agent identifier marked as abnormal; when the number of agents in the in-place state is equal to the total number of plans and the agent identifier in the abnormal state is empty, sending a task completion message and outputting a cooperative completion state; when the agent identifier in the abnormal state is not empty, querying the corresponding agent endpoint address from the service capability registry according to the agent identifier in the abnormal state, constructing a cancellation method request and sending it to the agent endpoint address to stop the current method execution, and outputting a fault recovery trigger signal.

6. A distributed industrial swarm intelligence collaboration system based on OPC UA Robotics, characterized in that, The steps for implementing the distributed industrial swarm intelligence cooperative method based on OPC UA Robotics according to any one of claims 1-5, comprising: a creation module for creating a grabbing method node in the OPC UA server of the agent unit and configuring a workpiece identifier parameter and a grabbing force parameter input method processing function, obtaining a grabbing method object; an associated storage module for reading the node identifier of the grabbing method object in each agent unit and the workpiece identifier parameter and storing them in association with the agent endpoint address, obtaining a service capability registry; a matching module for matching the visual recognition method and the grabbing method required by the production task according to the agent endpoint address in the service capability registry, generating a distributed execution plan; an execution module for sending a call service request message to the agent endpoint address and inputting the workpiece identifier parameter to trigger the method processing function after the front operation node in the distributed execution plan is completed, and returning an execution status code.

Citation Information

Patent Citations

  • Multi-agent platform cooperation system, method, equipment and medium

    CN120822538A

  • Multi-agent task collaboration method, equipment and medium

    CN120909775A