Multi-device knowledge graph semantic embodied interaction control method and system
By constructing a device knowledge graph for pre-verification, the problem of inconsistency between industrial equipment control requests generated by the large language model and the address space of the OPC UA server is solved, thus achieving more reliable and interpretable industrial equipment control.
Patent Information
- Application Number
- CN202611572426.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-12
- Publication Date
- 2026-11-20
AI Technical Summary
The industrial equipment control requests generated by the large language model are inconsistent with the actual address space of the OPC UA server, leading to control risks and erroneous execution issues.
By constructing a device knowledge graph, the address space and related execution constraint information actually exposed by the OPC UA server are pre-stored. After receiving candidate requests generated by the large language model, device entity verification, node ownership verification, method call object verification, method parameter template verification, variable access permission verification, and device status and business rule verification are performed to ensure that the request is consistent with the actual address space before it is sent to the OPC UA server.
It reduces the risk of erroneous control caused by large language model illusion, node attribution confusion and parameter errors, and improves the reliability and interpretability of semantic embodied interactive control processes for industrial equipment.
Smart Images

Figure CN123145292A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of industrial automation and intelligent control technology, and in particular to a multi-device knowledge graph semantic embodied interactive control method and system. Background Technology
[0002] With the development of the Industrial Internet and Embodied Intelligence, heterogeneous devices in industrial settings expose device objects, variables, methods, and reference relationships to upper-layer systems through OPC Unified Architecture (OPC UA) servers. This allows clients to access device status and control functions through services such as reading, writing, and method calls. Simultaneously, the Large Language Model (LLM) can generate candidate tool call requests based on user natural language control requests. However, the target device, node identifier, method call object, and input parameter values in the candidate requests generated by the LLM may be inconsistent with the address space information actually exposed by the target OPC UA server, or may mismatch with the parameter template corresponding to the target method node. This can easily lead to problems such as non-existent nodes, incorrect method call objects, parameter template mismatches, or confusion regarding device attribution. Directly sending unverified candidate requests to the OPC UA server may result in execution failure or incorrect control.
[0003] In summary, how to perform fact verification based on the actual address space of the device before sending industrial equipment control requests generated by the large language model to the OPC UA server, in order to reduce the control risks caused by the inconsistency between the content generated by the large language model and the actual address space, is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0004] The purpose of this application is to provide a multi-device knowledge graph semantic embodied interactive control method. This method can perform joint fact verification on candidate requests based on a pre-built device knowledge graph before sending industrial equipment control requests generated by a large language model to the OPC UA server, thereby reducing the control risk caused by inconsistencies between the content generated by the large language model and the actual address space. Another purpose of this application is to provide a multi-device knowledge graph semantic embodied interactive control system, equipment, and computer-readable storage medium.
[0005] To solve the above-mentioned technical problems, this application provides the following technical solution: A multi-device knowledge graph semantic embodiment interaction control method, applied to a tool invocation server, includes: Receive candidate tool invocation requests; wherein, the candidate tool invocation requests are generated by the large language model based on the user's natural language control request and the tool list declared by the tool invocation server; In response to the candidate tool invocation request, the graph query tool is invoked to send a graph query request to the knowledge graph storage unit, and the graph evidence returned by the knowledge graph storage unit is received; wherein, the knowledge graph storage unit pre-stores a device knowledge graph formed by mapping the address space and related execution constraint information actually exposed by the OPC UA server; Based on the graph evidence, the candidate tool call request is subjected to joint verification before execution; wherein, the joint verification before execution includes at least one of the following: device entity verification, node attribution verification, method call object verification, method parameter template verification, variable access permission verification, and device status and business rule verification. If the verification fails, a message prohibiting the sending of service requests to the OPC UA server will be returned to the sender of the candidate tool call request. If the verification passes, an OPC UA service request is generated and sent to the target OPC UA server to perform read, write, or method calls on the target industrial device.
[0006] In one specific embodiment of this application, joint verification before execution of the candidate tool invocation request includes: The device entity verification determines whether the device object in the candidate tool call request corresponds to an industrial equipment entity or an OPC UA server instance in the device knowledge graph. The node attribution verification is used to determine whether the node to be operated belongs to the address space range corresponding to the target device. The method is used to call object verification to determine whether the target method node is a callable method of the target object node; The method parameter template is used to verify whether the number of input parameters, parameter names, data types, array dimensions, parameter order, engineering units, and value range meet the input parameter definition of the target method node. The variable access permission check determines whether the variable node is allowed to be read or written. The device status and business rule verification determines whether the current online status, enabled status, alarm status, and business rule constraints of the target device meet the preconditions for the control action.
[0007] In one specific embodiment of this application, when the verification fails, it further includes: Return at least one of the following to the sending end: reason for refusal to execute, supplementary query items, or parameter correction prompt.
[0008] In one specific embodiment of this application, generating an OPC UA service request and sending it to the target OPC UA server includes: Establish or reuse OPC UA client connections, secure channels, and sessions based on verified server endpoints; The type of the OPC UA service request and the target node identifier are determined based on the graph evidence; wherein, the type of the OPC UA service request includes one or more of the following: read request, write request, or method call request; Obtain the corresponding service metadata according to the type of the OPC UA service request; wherein, the service metadata includes at least one of variable node identifier, variable node attribute information, method node identifier, method to which object node identifier is located, method node attribute information, input parameter definition, and output parameter definition; The OPCUA service request is constructed based on the verified server endpoint, node identifier, node attribute information, and input parameter values. The OPC UA service request is sent to the target OPC UA server.
[0009] In one specific embodiment of this application, it further includes: The system receives one or more of the following: execution result, exception information, or device status feedback returned by the target OPC UA server. Based on the received information, it generates a tool call result message and returns the tool call result message to the sending end to instruct the sending end to generate a user-oriented natural language response.
[0010] In one specific embodiment of this application, it further includes: The task status in the knowledge graph storage unit is updated based on one or more of the execution results, exception information, or device status feedback returned by the target OPC UA server; wherein, the task status is used to characterize the execution progress, completion status, or exception status of the current control task.
[0011] In one specific embodiment of this application, before receiving the candidate tool invocation request, the method further includes: Access the service registry center at a preset period to obtain information on OPC UA service instances in a healthy state; wherein, the service instance information includes one or more of the following: server endpoint, server identifier, device identifier, device name, device type, and service status; When an OPC UA service instance is detected to be added, taken offline, or brought back online, the address space browsing and graph synchronization of the corresponding service instance are triggered to update the device knowledge graph in the knowledge graph storage unit.
[0012] A multi-device knowledge graph semantic embodied interaction control system, applied to a tool invocation server, includes: The request receiving module is used to receive candidate tool invocation requests; wherein, the candidate tool invocation requests are generated by the large language model based on the user's natural language control request and the tool list declared by the tool invocation server; The graph evidence receiving module is used to respond to the candidate tool call request, call the graph query tool to send a graph query request to the knowledge graph storage unit, and receive the graph evidence returned by the knowledge graph storage unit; wherein, the knowledge graph storage unit pre-stores a device knowledge graph formed by mapping the address space and related execution constraint information actually exposed by the OPC UA server; The joint verification module is used to perform pre-execution joint verification on the candidate tool call request based on the graph evidence; wherein, the pre-execution joint verification includes at least one of device entity verification, node attribution verification, method call object verification, method parameter template verification, variable access permission verification, and device status and business rule verification. The prompt message sending module is used to return a prompt message to the sender of the candidate tool call request if the verification fails, prohibiting the sending of service requests to the OPC UA server; The request sending module is used to generate an OPC UA service request and send it to the target OPC UA server if the verification passes, so as to perform read, write or method call on the target industrial device.
[0013] A multi-device knowledge graph semantic embodied interactive control device includes: Memory, used to store computer programs; A processor is used to implement the steps of the multi-device knowledge graph semantic embodied interactive control method as described above when executing the computer program.
[0014] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the multi-device knowledge graph semantic embodied interactive control method as described above.
[0015] As can be seen from the above technical solution, since the address space and related execution constraint information actually exposed by the OPC UA server are pre-mapped into a device knowledge graph, and after receiving the candidate tool call request generated by the large language model, the graph evidence is first queried from the knowledge graph storage unit, and then the candidate request is subjected to joint pre-execution verification based on the graph evidence, including device entity verification, node attribution verification, method call object verification, method parameter template verification, variable access permission verification, and device status and business rule verification. Only after the verification is passed will the OPC UA service request be generated and sent to the target OPC UA server. Therefore, the technical problem of lack of fact verification based on the real address space in industrial equipment control requests generated by the large language model can be solved. This achieves the technical effect of reducing the risk of erroneous control caused by large language model illusion, node attribution confusion and parameter errors, and improves the reliability and interpretability of the semantic embodied interactive control process of industrial equipment.
[0016] Accordingly, this application also provides a multi-device knowledge graph semantic embodied interaction control system, device, and computer-readable storage medium corresponding to the above-mentioned multi-device knowledge graph semantic embodied interaction control method, which have the above-mentioned technical effects, and will not be elaborated here. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating the implementation of a multi-device knowledge graph semantic embody interaction control method in this application. Figure 2 This is a schematic diagram of a multi-device knowledge graph semantic embodiment interactive control system architecture in an embodiment of this application; Figure 3 This is a schematic diagram of a device knowledge graph data model in an embodiment of this application; Figure 4 This is a schematic diagram of an industrial heterogeneous device access and unified control scenario in an embodiment of this application; Figure 5 This is a structural block diagram of a multi-device knowledge graph semantic embodiment interactive control system according to an embodiment of this application; Figure 6 This is a structural block diagram of a multi-device knowledge graph semantic embody interactive control device according to an embodiment of this application; Figure 7This is a schematic diagram illustrating the specific structure of a multi-device knowledge graph semantic embody interactive control device provided in an embodiment of this application. Detailed Implementation
[0019] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus 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, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0021] See Figure 1 , Figure 1 This is a flowchart illustrating an implementation of a multi-device knowledge graph semantic embody interaction control method in this application, applied to a tool invocation server. The method may include the following steps: S101: Receive candidate tool call request.
[0022] Among them, the candidate tool invocation request is generated by the large language model based on the user's natural language control request and the tool list declared by the tool invocation server.
[0023] The tool invocation server pre-declares a tool list to the agent client side where the large language model resides. This tool list includes the tool names, descriptions, and parameter definitions of graph query tools and OPC UA execution tools. When a user inputs natural language control commands through a user interaction terminal, the large language model parses the natural language control request, identifies the task intent and control action intent, and generates candidate tool invocation requests based on the tool list declared by the tool invocation server. Candidate tool invocation requests may include information such as the target device name, operation type (read, write, or method call), node identifier, parameter name, and parameter value.
[0024] S102: In response to the candidate tool call request, invoke the graph query tool to send a graph query request to the knowledge graph storage unit, and receive the graph evidence returned by the knowledge graph storage unit.
[0025] The knowledge graph storage unit pre-stores a device knowledge graph formed by mapping the address space and related execution constraint information actually exposed by the OPC UA server.
[0026] Upon receiving a candidate tool invocation request, the tool invocation server does not directly forward the request to the OPC UA server. Instead, it prioritizes invoking the graph query tool to initiate a graph query request to the knowledge graph storage unit. The knowledge graph storage unit pre-stores a device knowledge graph mapped from the object nodes, variable nodes, method nodes, node attributes, reference relationships, variable access permissions, method parameter templates, device status, and business rules actually exposed by the OPC UA server. Based on the query conditions, the knowledge graph storage unit returns graph evidence, which includes the OPC UA server instance information corresponding to the target industrial equipment, address space node identifiers, method parameter templates, variable access permissions, device status, business rule constraints, and device affiliation. The knowledge graph storage unit can be implemented using a graph database, such as Neo4j, and the graph query can be implemented using the Cypher query language.
[0027] S103: Based on the graph evidence, perform joint verification on the candidate tool call request before execution.
[0028] The pre-execution joint verification includes at least one of the following: device entity verification, node ownership verification, method call object verification, method parameter template verification, variable access permission verification, and device status and business rule verification.
[0029] The tool invocation server uses the graph evidence returned by the knowledge graph storage unit as factual basis to perform pre-execution joint verification on the target device, node identifier, method invocation object, and request parameter values in the candidate tool invocation request. Based on the graph evidence, it determines or verifies the server endpoint corresponding to the target device, node affiliation, method parameter template, and variable access permissions to confirm that the candidate tool invocation request is consistent with the address space information actually exposed by the target OPC UA server. This avoids problems such as non-existent nodes, confused node affiliations, incorrect method invocation objects, or mismatched input parameters caused by the illusion of a large language model. Through pre-execution joint verification, each element of the candidate request can be verified one by one based on graph-based factual evidence.
[0030] S104: If the verification fails, a message prohibiting the sending of service requests to the OPC UA server will be returned to the sender of the candidate tool call request.
[0031] If any check fails during the pre-execution joint verification, the tool call server prevents the candidate tool call request from being forwarded to the OPC UA server. Instead, it returns a message prohibiting the sending of service requests to the sending end where the large language model is located, thereby effectively intercepting incorrect control actions.
[0032] S105: If the verification passes, an OPC UA service request is generated and sent to the target OPC UA server to perform read, write, or method call operations on the target industrial device.
[0033] When all pre-execution joint verifications pass, the tool invokes the server to construct a service request conforming to the OPC UA specification based on the verified server endpoints, node identifiers, parameter names, and parameter values. This service request is then sent to the target OPC UA server, which performs the corresponding data reading, parameter writing, or control method invocation operations. Through these steps, graph-based fact verification and secure execution of natural language control requests are achieved.
[0034] As can be seen from the above technical solution, since the address space and related execution constraint information actually exposed by the OPC UA server are pre-mapped into a device knowledge graph, and after receiving the candidate tool call request generated by the large language model, the graph evidence is first queried from the knowledge graph storage unit, and then the candidate request is subjected to joint pre-execution verification based on the graph evidence, including device entity verification, node attribution verification, method call object verification, method parameter template verification, variable access permission verification, and device status and business rule verification. Only after the verification is passed will the OPC UA service request be generated and sent to the target OPC UA server. Therefore, the technical problem of lack of fact verification based on the real address space in industrial equipment control requests generated by the large language model can be solved. This achieves the technical effect of reducing the risk of erroneous control caused by large language model illusion, node attribution confusion and parameter errors, and improves the reliability and interpretability of the semantic embodied interactive control process of industrial equipment.
[0035] It should be noted that, based on the above embodiments, this application also provides corresponding improvement solutions. In subsequent embodiments, steps that are the same as or corresponding to those in the above embodiments can be referred to each other, and the corresponding beneficial effects can also be referred to each other. These improvements will not be elaborated upon in the following improved embodiments.
[0036] In one specific embodiment of this application, performing joint verification on candidate tool invocation requests before execution may include the following steps: Step 1: Determine whether the device object in the candidate tool call request corresponds to an industrial equipment entity or an OPC UA server instance in the device knowledge graph through device entity verification; Step 2: Determine whether the node to be operated belongs to the address space range corresponding to the target device through node attribution verification; Step 3: Determine whether the target method node is a callable method of the target object node by verifying the method call object; Step 4: Use the method parameter template validation to determine whether the number of input parameters, parameter names, data types, array dimensions, parameter order, engineering units, and value range meet the input parameter definition of the target method node; Step 5: Determine whether the variable node is allowed to be read or written by checking the variable access permissions; Step Six: Verify the target device's current online status, enabled status, alarm status, and business rule constraints to determine whether they meet the preconditions for control actions.
[0037] For ease of description, the above six steps can be combined for explanation.
[0038] Device entity verification determines whether the device object name in a candidate tool call request has a corresponding industrial device entity or OPC UA server instance in the device knowledge graph, and whether the device instance is accessible, thus avoiding control operations on non-existent devices or offline servers. In scenarios with multiple OPC UA servers and multiple industrial devices connected simultaneously, different OPC UA server address spaces may contain the same or similar node identifiers, browsing names, or display names. Node attribution verification confirms whether the target node in the candidate request truly belongs to the OPC UA server address space range corresponding to the target device by querying the node attribution relationships in the device knowledge graph, thus avoiding node attribution confusion and cross-device misoperations. In the OPC UA address space, method nodes are associated with specific object nodes through reference relationships, meaning a specific method belongs to a specific object. Method call object verification determines whether the target method node in the candidate request truly belongs to a callable method of the target object node by querying the containing component (HasComponent) reference relationships in the device knowledge graph, thus avoiding calls to methods that do not belong to that object.
[0039] Method parameter template validation compares the input parameters generated by the large language model in the candidate tool call request with the input parameter templates of the target method node stored in the knowledge graph storage unit. This checks whether the number of input parameters matches, parameter names are consistent, data types are compatible, array dimensions are correct, parameter order conforms to the template definition, and engineering units and value ranges are within allowable ranges. Method parameter template validation effectively avoids call failures caused by discrepancies between parameter values generated by the large language model and their actual definitions.
[0040] The pre-execution joint verification of candidate tool call requests also includes variable access permission verification and device status and business rule verification. Variable access permission verification determines whether a target variable node is allowed to read or write operations based on the access permission attributes of variable nodes recorded in the device knowledge graph. For example, some variable nodes may only allow reading and not writing; during verification, write requests to read-only variables will be prevented. Device status and business rule verification determines whether the target device meets the preconditions for executing the corresponding control action based on the target device's current online status, enabled status, alarm status, and business rule constraints recorded in the device knowledge graph. For example, when the device is in an alarm state or executing a task, new control requests will be prevented.
[0041] In one specific embodiment of this application, when the verification fails, the method may further include the following steps: Return at least one of the following to the sending end: reason for refusal, supplementary query items, or parameter correction prompt.
[0042] When validation fails, the tool invocation server, in addition to returning a message prohibiting the sending of service requests to the OPC UA server, can also return at least one of the following: a reason for refusal, supplementary query items, or parameter correction suggestions. The reason for refusal explains the type of validation that failed, such as a non-existent device entity, mismatched parameter counts, or incompatible data types. Supplementary query items suggest specific information that the large language model needs to query, such as confirming the target device name or providing motor speed parameters to regenerate a more accurate candidate tool invocation request. Parameter correction suggestions indicate the specific direction for parameter correction to the large language model, such as indicating the correct value range when the input parameter value exceeds the range. By returning these additional information, the large language model can be assisted in request correction and retries while ensuring security control, thereby improving interaction efficiency and control reliability.
[0043] In one specific embodiment of this application, generating an OPC UA service request and sending it to the target OPC UA server may include the following steps: Step 1: Establish or reuse OPC UA client connections, secure channels, and sessions based on the verified server endpoint; Step 2: Determine the type of OPC UA service request and the target node identifier based on the graph evidence; among which, the OPC UA service request type includes one or more of the following: read request, write request, or method call request; Step 3: Obtain the corresponding service metadata according to the type of OPC UA service request; wherein, the service metadata includes at least one of the following: variable node identifier, variable node attribute information, method node identifier, method object node identifier, method node attribute information, input parameter definition, and output parameter definition; Step 4: Construct an OPC UA service request based on the verified server endpoint, node identifier, node attribute information, and input parameter values; Step 5: Send the OPC UA service request to the target OPC UA server.
[0044] For ease of description, the five steps above can be combined for explanation.
[0045] After successful verification, the tool calls the server and checks whether an existing OPC UA client connection, secure channel, and session exist for that server endpoint, based on the verified server endpoint information. If an existing connection is available, it is reused to reduce the overhead and latency of repeatedly establishing connections. If no connection has been established or an existing connection has been broken, a new OPC UA client connection, secure channel, and session are created based on the server endpoint and its security policy. Security policies may include one or more of username / password authentication, certificate authentication, or anonymous access.
[0046] The tool invocation server determines the type of OPC UA service request to be constructed based on the operation type in the candidate tool invocation requests and information confirmed by graph evidence. For example, if the user's intention is to obtain the current temperature of the device, it is determined to be a read request; if the user's intention is to modify the motor speed setting, it is determined to be a write request; and if the user's intention is to control the robotic arm to return to its origin, it is determined to be a method invocation request. Simultaneously, it determines the target node identifier based on graph evidence, including object node identifiers (NodeId), variable node identifiers, or method node identifiers. For read requests, it needs to obtain attribute information such as the target variable node identifier and data type; for write requests, it needs to obtain attribute information such as the target variable node identifier, data type, and write permissions; for method invocation requests, it needs to obtain service metadata such as the target method node identifier, object node identifier, input parameter definitions (including parameter name, data type, value rank, and array dimension), and output parameter definitions. Service metadata can be obtained from the device knowledge graph in the knowledge graph storage unit to ensure consistency with the actual OPC UA address space.
[0047] The tool invocation server constructs corresponding read, write, or method invocation requests according to the OPC UA protocol specification, based on the verified server endpoint information, target node identifier, node attributes, and input parameter values. For method invocation requests, the server also constructs the request by filling in the input parameter list in the parameter order according to the method parameter template and input parameter values. After constructing the OPC UA service request, the tool invocation server sends the request to the target OPC UA server through the established OPC UA client connection, and the target OPC UA server executes the corresponding operation. Data reading, parameter writing, and method invocation of the target industrial equipment are still completed through the services provided by the OPC UA server. The knowledge graph storage unit only provides knowledge query and constraint verification basis for tool invocation and does not replace the real-time communication channel of the OPC UA server.
[0048] In one specific embodiment of this application, the method may further include the following steps: Receive one or more of the following from the target OPC UA server: execution result, exception information, or device status feedback. Generate a tool call result message based on the received information and return the tool call result message to the sender to instruct the sender to generate a user-oriented natural language response.
[0049] After sending an OPC UA service request to the target OPC UA server, the tool invocation server also receives one or more of the following from the target OPC UA server: execution results, exception information, or device status feedback. After performing a read, write, or method call operation, the target OPC UA server returns the corresponding execution result, such as a variable read value, write confirmation information, method call return value, or status code. When an exception occurs during execution, the OPC UA server returns exception information, including error code, error description, and diagnostic information. Based on the received execution results, exception information, or device status feedback, the tool invocation server generates a structured tool invocation result message and returns it to the sending end where the large language model resides. The large language model then generates a user-oriented natural language response based on the tool invocation result message, enabling operators to understand the operation execution status and device status changes in natural language.
[0050] In one specific embodiment of this application, the method may further include the following steps: Update the task status in the knowledge graph storage unit based on one or more of the execution results, exception information, or device status feedback returned by the target OPC UA server; wherein, the task status is used to characterize the execution progress, completion status, or exception status of the current control task.
[0051] After receiving the execution results, exception information, or device status feedback from the target OPC UA server, the tool invocation server returns these information to the agent client and updates the task status in the knowledge graph storage unit based on the received information. The task status characterizes the execution progress, completion status, or abnormal state of the current control task. This execution feedback closed-loop mechanism allows subsequent graph queries, pre-execution verification, and control decisions to incorporate the latest task status and execution feedback information, thereby improving the system's responsiveness to execution feedback and abnormal states.
[0052] In one specific embodiment of this application, before step S101, the method may further include the following steps: Step 1: Access the service registry at a preset period to obtain information on OPC UA service instances in a healthy state; the service instance information includes one or more of the following: server endpoint, server identifier, device identifier, device name, device type, and service status. Step 2: When an OPC UA service instance is detected to be added, taken offline, or brought back online, the address space browsing and graph synchronization of the corresponding service instance are triggered to update the device knowledge graph in the knowledge graph storage unit.
[0053] For ease of description, the two steps above can be combined for explanation.
[0054] Before receiving requests to invoke candidate tools, a device knowledge graph needs to be pre-built. The construction and updating of the device knowledge graph depend on the awareness of OPC UA service instances. The service discovery module accesses the service registry at preset intervals to obtain information on all OPC UA service instances with the OPC UA service tag and in a healthy state. The service registry can be implemented using Consul. The service discovery module reads the registration information, service metadata, and health check results of OPC UA service instances from the Consul service registry. Service instance information includes one or more of the following: server endpoint, server identifier, device identifier, device name, device type, and service status. If no service registry is deployed, OPC UA server endpoints and service metadata can also be read from a pre-configured service list. When an OPC UA service instance is detected to be added, offline, or re-online, the address space browsing and graph synchronization of the corresponding service instance are triggered to update the device knowledge graph in the knowledge graph storage unit.
[0055] The address space browsing and graph synchronization process includes: For newly added or re-launched OPC UA service instances, establishing OPC UA client connections, secure channels, and sessions based on the server endpoint and its security policies, and recursively browsing the address space of the OPC UA server starting from the specified root node. During address space browsing, the node identifiers, namespace information, browsing names, display names, node categories, data types, variable access permissions, method executable attributes, description information, and reference relationships of object nodes, variable nodes, and method nodes are collected. For method nodes, their input parameter definitions and output parameter definitions are further read, and parameter names, parameter order, data types, value rank, array dimensions, and parameter descriptions are parsed to form a method parameter template.
[0056] After completing the address space browsing, the collected OPC UA address space information is standardized, and a composite unique identifier for the graph node is constructed based on the server identifier and node identifier. For example, the composite unique identifier for the graph node is generated using the format "server_id::node_id", where server_id represents the OPC UA server instance identifier and node_id represents the OPC UA node identifier, which is used to distinguish node identifiers, browsing names, or display names that may be duplicated in different OPC UA servers.
[0057] After normalization, object nodes, variable nodes, and method nodes in the OPC UA address space are written into the knowledge graph storage unit, and the reference relationships in the OPC UA address space are mapped to relationship or attribute information in the knowledge graph storage unit. Reference relationships include one or more of HasComponent, HasProperty, Organizes, and HasOrderedComponent; where HasComponent represents the composition relationship between a source node and its constituent nodes, HasProperty represents the attribution relationship between a node and its variable nodes (which are its attributes), Organizes represents the organizational relationship of nodes in the address space, and HasOrderedComponent represents a composition relationship with a defined order. In embodiments where it is necessary to preserve type hierarchy and the association relationship between instance nodes and type definition nodes, HasSubtype and HasTypeDefinition reference relationships can also be extended; where HasSubtype reference relationships represent the subtype hierarchy relationship between type nodes, and HasTypeDefinition reference relationships represent the association relationship between an object instance node or variable instance node and its corresponding type definition node.
[0058] For offline OPC UA servers, their corresponding server nodes and device nodes are marked as offline in the knowledge graph storage unit, while the existing graph structure is retained. When an OPC UA server comes back online, the address space is re-browsed and the graph is synchronized, and the changed parts are written, updated, or cleaned up. Through the above-mentioned periodic service status monitoring, dynamic address space synchronization, and graph update mechanism, the device knowledge graph can be dynamically updated with the addition, offline, and re-online of OPC UA servers and changes in the address space, ensuring that subsequent graph queries and pre-execution verifications are always based on the latest graph-based factual evidence.
[0059] See Figure 2 , Figure 2 This is a schematic diagram of a multi-device knowledge graph semantic embodied interaction control system architecture according to an embodiment of this application. The system includes a user interaction terminal, an intelligent agent client side, a tool invocation server, a service registry center, a knowledge graph enhancement module, an execution feedback closed-loop module, an OPC UA server, and industrial heterogeneous devices. The user interaction terminal is used to receive user natural language input and display natural language responses to the user. The user interaction terminal can be any of a desktop application, a web page, a mobile terminal application, or a voice interaction terminal. The intelligent agent client side is deployed with a large language model invocation module and a tool invocation interface connection component, used to receive user natural language input, obtain the tool list declared by the tool invocation server, generate a structured tool invocation request according to the tool description and parameter structure, and generate a user-oriented natural language response according to the tool invocation result and embodied execution feedback. The intelligent agent client side can be a Model Context Protocol (MCP) client side. The intelligent agent client side does not communicate directly with the OPC UA server, but communicates through the tool invocation server, adopting a knowledge graph priority strategy. Before generating an OPC UA read, write, or method invocation request, it first calls the graph query tool declared by the tool invocation server to obtain graph evidence.
[0060] The tool invocation server declares the knowledge graph query tool and OPC UA execution tool to the agent client, receives and parses tool invocation requests, initiates knowledge graph query requests to the knowledge graph storage unit, receives query results and verification criteria, and completes pre-execution verification, OPC UA service request construction, and execution result feedback. The tool invocation server can be an MCP server. The OPC UA client execution module within the tool invocation server, after successful verification, establishes or reuses the OPC UA client connection, secure channel, and session corresponding to the target OPC UA server, and communicates with the target OPC UA server through read, write, or method invocation services.
[0061] The service registry is used to dynamically obtain OPC UA server endpoints and corresponding device identifiers, and to maintain the online status of services. When Consul is used as the service registry, the service discovery module reads registered instances with OPC UA service tags, service metadata, and health check results from the Consul service registry. The service registry supports OPC UA servers registering their server endpoints, device names, device types, and service tags to the service registry after startup, and automatically deregistering or marking them as unhealthy when the server goes offline.
[0062] The knowledge graph enhancement module provides graph-based factual evidence for pre-execution verification. Internally, it includes an address space mapping unit, a knowledge graph storage unit, and a knowledge graph query and verification unit. The address space mapping unit connects to the OPC UA server, recursively browses the address space, reads node attributes, reference relationships, and method parameter definitions, and synchronously maps this information to the knowledge graph storage unit. The knowledge graph storage unit stores and manages the device knowledge graph formed by the OPC UA address space and related constraint information. The knowledge graph storage unit is implemented using a graph database, such as Neo4j, and represents entities, associations, and attribute information in the device knowledge graph through nodes, relationships, tags, and attributes. The knowledge graph query and verification unit queries the knowledge graph storage unit based on graph query requests initiated by the tool invocation server and returns query results or verification evidence to the tool invocation server, including the target device, OPC UA server endpoint, node affiliation, method invocation object, method parameter template, variable access permissions, device status, and business rules.
[0063] The execution feedback closed-loop module is used for receiving execution results, returning execution feedback, and updating task status. Specifically, it receives one or more of the following from the target OPC UA server: execution results, exception information, or device status feedback. It then returns these results to the tool invocation server and the agent client, and updates the task status in the knowledge graph storage unit based on the feedback. Through this module, a closed-loop process is achieved, from natural language control requests, graph queries, pre-execution verification, OPC UA service execution, to execution feedback and task status updates.
[0064] An OPC UA server exposes the address space node set of industrial devices according to the OPC UA specification. This address space node set includes object nodes, variable nodes, method nodes, type nodes, view nodes, and reference relationships. It also translates verified OPC UA service requests into data reading, parameter writing, or action execution for heterogeneous industrial devices. Industrial devices from different manufacturers access the upper-layer system through their respective corresponding OPC UA servers or OPC UA gateways.
[0065] Industrial heterogeneous equipment includes, but is not limited to, industrial robots, programmable logic controllers (PLCs), sensors, CNC equipment, detection devices, conveying devices, warehouse execution equipment, and other industrial field equipment. These heterogeneous industrial devices expose their device objects, state variables, control variables, and executable control methods to upper-layer systems through corresponding OPC UA servers or OPC UA gateways. Upper-layer systems do not directly access the devices' private interfaces; instead, they access the devices through read, write, or method call services provided by the OPC UA server.
[0066] See Figure 3 , Figure 3 This is a schematic diagram of a device knowledge graph data model according to an embodiment of this application. See also... Figure 4 , Figure 4 This is a schematic diagram of an industrial heterogeneous device access and unified control scenario according to an embodiment of this application. In a specific application example, taking an industrial robotic arm control scenario, the solution of this application is further explained. The industrial robotic arm establishes robot object nodes (e.g., robotic arm A), variable nodes, and method nodes in its address space through its OPCUA server (e.g., OPC UA server A). The variable nodes include one or more of the following: joint angle variables, Cartesian pose variables, motion speed variables, device state variables, enable state variables, and error information variables. The method nodes include one or more of the following: setting joint angle, setting Cartesian pose, returning to origin, enabling, disabling, reading joint angle, reading Cartesian pose, gripper control, and suction cup control. The method nodes are associated with the robot object nodes through reference relationships, indicating that the method belongs to that robot object.
[0067] When an operator inputs a natural language command into the user interface terminal, "Move the end effector of robotic arm A to the position at coordinates X=500, Y=200, Z=300," the large language model parses the command, identifies the target device as robotic arm A, and the intended action as setting a Cartesian pose with parameters X=500, Y=200, Z=300. Based on the tool list declared by the tool invocation server (including the graph query tool and the OPC UA execution tool), it generates candidate tool invocation requests. Upon receiving a candidate tool invocation request, the tool invocation server does not directly send a request to the OPC UA server. Instead, it first calls the graph query tool to query the knowledge graph storage unit for the device entity corresponding to robotic arm A, the OPC UA server endpoint, the input parameter template for the Cartesian pose setting method node, and related constraints. The knowledge graph storage unit returns graph evidence, including the server endpoint of OPC UA server A, the node identifier of the robotic arm A object node, the node identifier of the node for setting the Cartesian pose method, and the input parameter template (requires three Double type parameters for X, Y, and Z, with a value range of 0-1000mm for each axis).
[0068] The tool invocation server performs joint verification before execution based on the knowledge graph evidence: First, it verifies the device entity to confirm that robotic arm A has a corresponding entity in the knowledge graph and is online; then, it verifies the node affiliation to confirm that the "Set Cartesian Pose Method" node belongs to the robotic arm A object node; next, it verifies the method parameter template to confirm that the number of parameters in the candidate request is 3, the parameter names correspond to X / Y / Z coordinates, the data type is numeric, and the parameter values (500 / 200 / 300) are all within the value range; finally, it verifies the device status and business rules to confirm that the robot is currently in an enabled state and not in an alarm state, and that the current business rule constraints allow the execution of the control action. If all verifications pass, the tool invocation server establishes an OPC UA client connection with OPC UA server A, constructs an OPC UA method invocation request based on the server endpoint, the method invocation object node identifier, the method node identifier, and the input parameter values, and sends the request to OPC UA server A. OPC UA server A executes the "Set Cartesian Pose Method" to control the robotic arm's movement and returns the execution result and device status after execution. After receiving the execution result, the tool invocation server encapsulates it into a tool invocation result message and returns it to the agent client. The agent client then generates a natural language response indicating that robotic arm A has successfully moved to coordinates X=500, Y=200, Z=300 and returns it to the user interaction terminal. Simultaneously, the tool invocation server updates the task status corresponding to robotic arm A in the knowledge graph storage unit based on the execution result. If, during the pre-execution joint verification, a parameter value is found to be outside its range (e.g., X=1500 exceeds the allowable range of 0-1000mm), the tool invocation server returns a reason for refusal and a parameter correction prompt, indicating that the X value of the large language model is out of range and needs to be adjusted before regenerating the candidate tool invocation request.
[0069] The device knowledge graph data model in the knowledge graph storage unit includes device entity nodes, OPC UA server nodes, object nodes, variable nodes, method nodes, and method parameter nodes. Device entity nodes represent industrial equipment, such as robotic arm A; OPC UA server nodes represent the OPC UA server instance corresponding to the industrial equipment, such as OPC UA server A; object nodes, variable nodes, and method nodes correspond to object nodes, variable nodes, and method nodes in the OPC UA address space, respectively; method parameter nodes represent the input and output parameter definitions of the method node. A service ownership relationship is established between device entity nodes and OPC UA server nodes; a server object relationship is established between OPC UA server nodes and object nodes; object nodes establish object-node relationships with variable nodes and method nodes through HasComponent reference relationships; and method nodes are associated with method parameter nodes through either an input parameter (HAS_INPUT_ARG) relationship or an output parameter (HAS_OUTPUT_ARG) relationship. Object nodes, variable nodes, and method nodes store one or more of the following: composite unique identifier, OPC UA node identifier, browsing name, display name, description information, node category, namespace index, parent node identifier, and server instance identifier. Additionally, variable nodes store one or more of the following: data type, value rank, access permissions, and default value. Method parameter nodes store one or more of the following: parameter name, data type, value rank, parameter order, and description information. OPC UA server nodes store one or more of the following: server identifier, server endpoint, device name, device type, and online status. The entities and relationships in the device knowledge graph collectively constitute the graph-based factual basis for tools to query, verify, and trace the server.
[0070] Corresponding to the above method embodiments, this application also provides a multi-device knowledge graph semantic embodied interaction control system. The multi-device knowledge graph semantic embodied interaction control system described below can be referred to in correspondence with the multi-device knowledge graph semantic embodied interaction control method described above.
[0071] See Figure 5 , Figure 5 This is a structural block diagram of a multi-device knowledge graph semantic embody interaction control system according to an embodiment of this application, applied to a tool invocation server. The system may include: The request receiving module 51 is used to receive candidate tool invocation requests; wherein, the candidate tool invocation requests are generated by the large language model based on the user's natural language control request and the tool list declared by the tool invocation server; The graph evidence receiving module 52 is used to respond to the candidate tool call request, call the graph query tool to send a graph query request to the knowledge graph storage unit, and receive the graph evidence returned by the knowledge graph storage unit; wherein, the knowledge graph storage unit pre-stores a device knowledge graph formed by mapping the address space actually exposed by the OPC UA server and related execution constraint information; The joint verification module 53 is used to perform pre-execution joint verification on candidate tool call requests based on graph evidence; wherein, the pre-execution joint verification includes at least one of the following: device entity verification, node attribution verification, method call object verification, method parameter template verification, variable access permission verification, and device status and business rule verification. The prompt message sending module 54 is used to return a prompt message to the sender of the candidate tool call request, prohibiting the sending of service requests to the OPC UA server, if the verification fails; The request sending module 55 is used to generate an OPC UA service request and send it to the target OPC UA server if the verification passes, so as to perform reading, writing or method calls on the target industrial equipment.
[0072] As can be seen from the above technical solution, since the address space and related execution constraint information actually exposed by the OPC UA server are pre-mapped into a device knowledge graph, and after receiving the candidate tool call request generated by the large language model, the graph evidence is first queried from the knowledge graph storage unit, and then the candidate request is subjected to joint pre-execution verification based on the graph evidence, including device entity verification, node attribution verification, method call object verification, method parameter template verification, variable access permission verification, and device status and business rule verification. Only after the verification is passed will the OPC UA service request be generated and sent to the target OPC UA server. Therefore, the technical problem of lack of fact verification based on the real address space in industrial equipment control requests generated by the large language model can be solved. This achieves the technical effect of reducing the risk of erroneous control caused by large language model illusion, node attribution confusion and parameter errors, and improves the reliability and interpretability of the semantic embodied interactive control process of industrial equipment.
[0073] In one specific embodiment of the present invention, the joint verification module 53 may include: The device entity verification submodule is used to determine whether the device object in the candidate tool call request corresponds to an industrial equipment entity or an OPC UA server instance in the device knowledge graph through device entity verification. The node attribution verification submodule is used to determine whether the node to be operated belongs to the address space range corresponding to the target device through node attribution verification. The Method Call Object Validation submodule is used to determine whether a target method node is a callable method of a target object node through method call object validation. The method parameter template validation submodule is used to determine whether the number of input parameters, parameter names, data types, array dimensions, parameter order, engineering units, and value range meet the input parameter definition of the target method node through method parameter template validation. The variable access permission verification submodule is used to determine whether a variable node is allowed to be read or written by verifying its access permissions. The Device Status and Business Rule Verification Submodule is used to determine whether the current online status, enabled status, alarm status, and business rule constraints of the target device meet the preconditions for control actions through device status and business rule verification.
[0074] In one specific embodiment of the present invention, the prompt information sending module 54 is further configured to return at least one of the following to the sending end when the verification fails: reason for refusal to execute, supplementary query item, or parameter correction prompt.
[0075] In one specific embodiment of the present invention, the request sending module 55 may include: The session establishment or reuse submodule is used to establish or reuse OPC UA client connections, secure channels, and sessions based on the verified server endpoint; The node identifier determination submodule is used to determine the type of OPC UA service request and the target node identifier based on graph evidence; wherein, the OPC UA service request type includes one or more of the following: read request, write request, or method call request; The service metadata acquisition submodule is used to acquire the corresponding service metadata according to the type of OPC UA service request; wherein, the service metadata includes at least one of the following: variable node identifier, variable node attribute information, method node identifier, method to which the object node identifier is located, method node attribute information, input parameter definition, and output parameter definition; The service request construction submodule is used to construct an OPC UA service request based on the verified server endpoint, node identifier, node attribute information and input parameter values. The request sending submodule is used to send OPC UA service requests to the target OPC UA server.
[0076] In one specific embodiment of the present invention, the system may further include: The result feedback module is used to receive one or more of the execution results, exception information, or device status feedback returned by the target OPC UA server, generate a tool call result message based on the received information, and return the tool call result message to the sending end to instruct the sending end to generate a user-oriented natural language response.
[0077] In one specific embodiment of the present invention, the system may further include: The first graph update module is used to update the task status in the knowledge graph storage unit based on one or more of the execution results, exception information, or device status feedback returned by the target OPC UA server; wherein, the task status is used to characterize the execution progress, completion status, or exception status of the current control task.
[0078] In one specific embodiment of the present invention, the system may further include: The service instance information acquisition module is used to access the service registry center at preset intervals to obtain OPC UA service instance information that is in a healthy state; wherein, the service instance information includes one or more of the following: server endpoint, server identifier, device identifier, device name, device type, and service status; The second graph update module is used to trigger address space browsing and graph synchronization of the corresponding service instance when an OPC UA service instance is detected to be added, taken offline, or re-brought online, so as to update the device knowledge graph in the knowledge graph storage unit.
[0079] For the method embodiments described above, see [link to relevant documentation]. Figure 6 , Figure 6 This is a schematic diagram of the multi-device knowledge graph semantic embody interactive control device provided in this application. The device may include: Memory 332 is used to store computer programs; The processor 322 is used to implement the steps of the multi-device knowledge graph semantic embody interactive control method of the above method embodiments when executing a computer program.
[0080] For details, please refer to Figure 7 , Figure 7 This is a schematic diagram illustrating the specific structure of a multi-device knowledge graph semantic embody interactive control device provided in this embodiment. This multi-device knowledge graph semantic embody interactive control device can vary significantly due to different configurations or performance. It may include a processor (central processing unit, CPU) 322 (e.g., one or more processors) and a memory 332. The memory 332 stores one or more computer programs 342 or data 344. The memory 332 can be temporary or persistent storage. The program stored in the memory 332 may include one or more modules (not shown in the diagram), each module may include a series of instruction operations on the data processing device. Furthermore, the processor 322 may be configured to communicate with the memory 332 to execute the series of instruction operations stored in the memory 332 on the multi-device knowledge graph semantic embody interactive control device 301.
[0081] The multi-device knowledge graph semantic embodied interactive control device 301 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input / output interfaces 358, and / or one or more operating systems 341.
[0082] The steps in the multi-device knowledge graph semantic embodied interaction control method described above can be implemented by the structure of the multi-device knowledge graph semantic embodied interaction control device.
[0083] Corresponding to the above method embodiments, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can perform the following steps: The system receives candidate tool invocation requests; these requests are generated by a large language model based on the user's natural language control request and the tool list declared by the tool invocation server. In response to the candidate tool invocation requests, a graph query tool is invoked to send a graph query request to the knowledge graph storage unit, and graph evidence returned by the knowledge graph storage unit is received. The knowledge graph storage unit pre-stores a device knowledge graph mapped from the address space actually exposed by the OPC UA server and related execution constraint information. Based on the graph evidence, a pre-execution joint verification is performed on the candidate tool invocation requests. This pre-execution joint verification includes at least one of the following: device entity verification, node attribution verification, method call object verification, method parameter template verification, variable access permission verification, and device status and business rule verification. If the verification fails, a message prohibiting the sending of service requests to the OPC UA server is returned to the sender of the candidate tool invocation requests. If the verification passes, an OPC UA service request is generated and sent to the target OPC UA server to perform reading, writing, or method invocation on the target industrial equipment.
[0084] The computer-readable storage medium may include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0085] For a description of the computer-readable storage medium provided in this application, please refer to the above method embodiments; further details will not be repeated here.
[0086] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. The systems, devices, and computer-readable storage media disclosed in the embodiments are described simply because they correspond to the methods disclosed in the embodiments; relevant details can be found in the method section.
[0087] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the technical solutions and core ideas of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of this application.
Claims
1. A multi-device knowledge graph semantic embodied interactive control method, characterized in that, Applications to tool call servers include: Receive candidate tool invocation requests; wherein, the candidate tool invocation requests are generated by the large language model based on the user's natural language control request and the tool list declared by the tool invocation server; In response to the candidate tool invocation request, the graph query tool is invoked to send a graph query request to the knowledge graph storage unit, and the graph evidence returned by the knowledge graph storage unit is received; wherein, the knowledge graph storage unit pre-stores a device knowledge graph formed by mapping the address space and related execution constraint information actually exposed by the OPC UA server; Based on the graph evidence, the candidate tool call request is subjected to joint verification before execution; wherein, the joint verification before execution includes at least one of the following: device entity verification, node attribution verification, method call object verification, method parameter template verification, variable access permission verification, and device status and business rule verification. If the verification fails, a message prohibiting the sending of service requests to the OPC UA server will be returned to the sender of the candidate tool call request. If the verification passes, an OPC UA service request is generated and sent to the target OPC UA server to perform read, write, or method calls on the target industrial device.
2. The multi-device knowledge graph semantic embody interaction control method according to claim 1, characterized in that, Pre-execution joint verification of the candidate tool invocation request includes: The device entity verification determines whether the device object in the candidate tool call request corresponds to an industrial equipment entity or an OPC UA server instance in the device knowledge graph. The node attribution verification is used to determine whether the node to be operated belongs to the address space range corresponding to the target device. The method is used to call object verification to determine whether the target method node is a callable method of the target object node; The method parameter template is used to verify whether the number of input parameters, parameter names, data types, array dimensions, parameter order, engineering units, and value range meet the input parameter definition of the target method node. The variable access permission check determines whether the variable node is allowed to be read or written. The device status and business rule verification determines whether the current online status, enabled status, alarm status, and business rule constraints of the target device meet the preconditions for the control action.
3. The multi-device knowledge graph semantic embody interaction control method according to claim 1, characterized in that, When the validation fails, it also includes: Return at least one of the following to the sending end: reason for refusal to execute, supplementary query items, or parameter correction prompt.
4. The multi-device knowledge graph semantic embody interaction control method according to claim 1, characterized in that, Generate an OPC UA service request and send it to the target OPC UA server, including: Establish or reuse OPC UA client connections, secure channels, and sessions based on verified server endpoints; The type of the OPC UA service request and the target node identifier are determined based on the graph evidence; wherein, the OPC UA service request type includes one or more of the following: read request, write request, or method call request; Obtain the corresponding service metadata according to the type of the OPC UA service request; wherein, the service metadata includes at least one of variable node identifier, variable node attribute information, method node identifier, method to which object node identifier is located, method node attribute information, input parameter definition, and output parameter definition; The OPC UA service request is constructed based on the verified server endpoint, node identifier, node attribute information, and input parameter values. The OPC UA service request is sent to the target OPC UA server.
5. The multi-device knowledge graph semantic embody interaction control method according to claim 1, characterized in that, Also includes: The system receives one or more of the following: execution result, exception information, or device status feedback returned by the target OPC UA server. Based on the received information, it generates a tool call result message and returns the tool call result message to the sending end to instruct the sending end to generate a user-oriented natural language response.
6. The multi-device knowledge graph semantic embody interaction control method according to claim 1, characterized in that, Also includes: The task status in the knowledge graph storage unit is updated based on one or more of the execution results, exception information, or device status feedback returned by the target OPC UA server; wherein, the task status is used to characterize the execution progress, completion status, or exception status of the current control task.
7. The multi-device knowledge graph semantic embody interaction control method according to claim 1, characterized in that, Before receiving candidate tool invocation requests, the process also includes: Access the service registry center at a preset period to obtain information on OPC UA service instances in a healthy state; wherein, the service instance information includes one or more of the following: server endpoint, server identifier, device identifier, device name, device type, and service status; When an OPC UA service instance is detected to be added, taken offline, or brought back online, the address space browsing and graph synchronization of the corresponding service instance are triggered to update the device knowledge graph in the knowledge graph storage unit.
8. A multi-device knowledge graph semantic embody interactive control system, characterized in that, Applications to tool call servers include: The request receiving module is used to receive candidate tool invocation requests; wherein, the candidate tool invocation requests are generated by the large language model based on the user's natural language control request and the tool list declared by the tool invocation server; The graph evidence receiving module is used to respond to the candidate tool call request, call the graph query tool to send a graph query request to the knowledge graph storage unit, and receive the graph evidence returned by the knowledge graph storage unit; wherein, the knowledge graph storage unit pre-stores a device knowledge graph formed by mapping the address space and related execution constraint information actually exposed by the OPC UA server; The joint verification module is used to perform pre-execution joint verification on the candidate tool call request based on the graph evidence; wherein, the pre-execution joint verification includes at least one of device entity verification, node attribution verification, method call object verification, method parameter template verification, variable access permission verification, and device status and business rule verification. The prompt message sending module is used to return a prompt message to the sender of the candidate tool call request if the verification fails, prohibiting the sending of service requests to the OPC UA server; The request sending module is used to generate an OPC UA service request and send it to the target OPC UA server if the verification passes, so as to perform read, write or method call on the target industrial device.
9. A multi-device knowledge graph semantic embody interactive control device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the multi-device knowledge graph semantic embodied interactive control method as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the multi-device knowledge graph semantic embodied interactive control method as described in any one of claims 1 to 7.
