Mcp protocol-based ai semantic model and robot interconnection method, system and medium
By using an AI semantic model based on the MCP protocol and a robot interconnection method, the semantic gap and real-time issues in the integration of AI and robots are resolved, enabling device-level dynamic authentication and secure and efficient human-machine interaction, and supporting cross-plant collaboration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHONGCHUANG (SHENZHEN) INTERNET OF THINGS CO LTD
- Filing Date
- 2025-08-27
- Publication Date
- 2026-04-21
AI Technical Summary
In existing technologies, semantic gaps exist when integrating large AI models with industrial robots. This requires developers to customize conversion middleware for each type of equipment, resulting in long integration cycles. Protocol expansion necessitates system architecture reconstruction, and the technology cannot meet the real-time needs of industrial scenarios and cross-plant collaboration. Furthermore, it lacks a dynamic binding mechanism for access control and suffers from insufficient data security.
An AI semantic model and robot interconnection method based on the MCP protocol is adopted. Natural language commands are converted into structured operation sequences through a semantic parsing model. Service engine tool identifiers and parameter templates are dynamically matched, device binding relationships and operation permission verification are implemented, security commands are generated, and transmission protocols are dynamically selected to achieve protocol adaptive connection.
It achieves dynamic adaptation between AI and robot commands, ensures data security and real-time performance, provides an efficient human-machine interaction architecture, and supports cross-plant collaboration and device-level dynamic authentication.
Smart Images

Figure CN120791784B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent manufacturing, and more specifically, to a method, system, and medium for interconnecting an AI semantic model with a robot based on the MCP protocol. Background Technology
[0002] In the field of intelligent manufacturing, the deep integration of large-scale AI models with industrial robots has become a key technological trend for improving production flexibility. However, traditional robots rely on dedicated industrial protocols, while AI models output natural language or general API commands. This semantic gap necessitates developers customizing conversion middleware for each type of device, resulting in long integration cycles and requiring system architecture reconstruction for protocol expansion. Currently, general communication frameworks based on HTTP / RPC struggle to meet the millisecond-level real-time requirements of industrial scenarios, while dedicated real-time networks cannot adapt to long-distance transmission in cross-plant collaboration, severely restricting high-precision operations. Furthermore, traditional solutions rely on static account systems for access control, failing to dynamically bind devices and operating permissions; data security often employs one-way encryption at the transport layer, exposing sensitive fields in plaintext at the application layer.
[0003] Existing technologies, employing a ROS-based robot scheduling framework, while optimizing the real-time performance of local control, fail to address issues of dynamic protocol adaptation and cross-network reliability. Furthermore, the authentication scheme lacks a device binding mechanism, leading to risks of unauthorized operations. Therefore, a novel interconnect architecture supporting protocol adaptation, device-level dynamic authentication, and easy scalability is urgently needed to overcome the technical bottlenecks in the integration of AI and robotics. Summary of the Invention
[0004] In view of the above problems, the purpose of this invention is to provide an AI semantic model and robot interconnection method, system and medium based on the MCP protocol. It employs dynamic mapping between semantics and tools, specifically converting natural language instructions into structured operation sequences through a semantic parsing model, and extracting semantic tags to dynamically match tool identifiers and parameter templates in the service engine. It also includes a dual closed-loop mechanism: verifying the device binding relationship and operation scope of the security token, triggering secondary user authorization for unauthorized operations to achieve a closed-loop permission system; and generating secure instructions with integrity verification codes by performing structured encapsulation and field-level encryption on operation parameters to achieve a closed-loop data system. Furthermore, it dynamically allocates protocol channels based on a real-time flag to achieve adaptive protocol connection.
[0005] The first aspect of this invention provides a method for interconnecting AI semantic models and robots based on the MCP protocol, the method comprising:
[0006] Natural language instructions are obtained, and a structured operation sequence is derived based on a pre-defined semantic parsing model.
[0007] Extract semantic tags from the structured operation sequence, dynamically match pre-stored service engines, and generate operation requests including tool identifiers and parameter templates;
[0008] Verify that the security token of the operation request matches the operation permissions;
[0009] If the operation is unauthorized, a second authorization request will be sent to the user.
[0010] If the permission verification passes, a security instruction is obtained based on the preset encryption rules and the operation request.
[0011] Based on the real-time flag of the security instruction, the transmission protocol is dynamically selected and a transmission protocol channel is established to generate an executable instruction stream;
[0012] Based on the executable instruction stream, the control tool executes instruction operations and obtains execution status data;
[0013] Based on the execution status data and a preset encryption rule, the execution status is generated and fed back.
[0014] In this solution, the verification of the security token matching operation permission for the operation request specifically includes:
[0015] Extract the device identifier from the security token of the operation request and establish a binding relationship with the target robot serial number;
[0016] Match the target robot's operation type based on the permission scope in the security token;
[0017] When an operation parameter exceeds the limit or a high-risk action command is detected, it is determined to be an unauthorized operation, triggering user authorization interception;
[0018] Generate a secondary authorization request containing a description of the operational risks, and pause the executable instruction flow of the target robot;
[0019] When the operation permission requirements are met, the verification is deemed successful, and a security instruction is obtained based on the preset encryption rules and the operation request.
[0020] In this solution, obtaining security instructions based on preset encryption rules and the operation request specifically includes:
[0021] The operation parameters of the operation request are encapsulated in a structured manner according to the parameter template corresponding to the tool identifier to obtain structured parameters;
[0022] Based on the parameter template, perform field-level encryption on the parameters of the specified fields;
[0023] The encrypted structured parameters are filtered based on a preset JSON format validation.
[0024] The filtered structured parameters are used to generate and bind integrity check codes, which are then integrated to obtain security instructions.
[0025] In this solution, the step of dynamically selecting the transmission protocol and establishing a transmission protocol channel based on the real-time flag of the security command specifically includes:
[0026] Based on the real-time flag of the security command, the command is classified, including at least real-time control commands, streaming feedback commands, or cross-network transmission commands.
[0027] If it is a real-time control command, then allocate a local process communication protocol channel;
[0028] If it is a streaming feedback command, then allocate a long-connection streaming push protocol channel;
[0029] If it is a cross-network transmission command, then allocate a disconnection self-healing transmission protocol channel;
[0030] All protocol channels maintain instruction continuity through a unified session identifier.
[0031] In this solution, controlling the tool to execute instruction operations based on the executable instruction stream specifically includes:
[0032] The executable instruction stream is extracted using the tool identifier, which is used to match a pre-registered robot control tool library;
[0033] If it is a legitimate tool, the structured parameters extracted from the executable instruction stream are translated into industrial control instructions based on preset protocol conversion rules;
[0034] When executing industrial control commands, feedback data is monitored in real time based on pre-deployed sensors;
[0035] When feedback data triggers a preset exception rule, the current operation sequence is dynamically interrupted.
[0036] In this solution, the translation of structured parameters extracted from the executable instruction stream into industrial control instructions based on preset protocol conversion rules specifically includes:
[0037] The operation parameters are obtained by parsing the JSON in the preset format;
[0038] The industrial protocol instruction template is obtained by matching the tool identifier with a predefined industrial protocol instruction mapping rule library.
[0039] Fill the operation parameters into the industrial protocol instruction template;
[0040] Add an industrial protocol checksum and tool address prefix to the industrial protocol instruction template after filling in the parameters, and output the binary instruction stream of the target industrial control bus standard.
[0041] A second aspect of the present invention provides an AI semantic model and robot interconnection system based on the MCP protocol, including an AI semantic model and robot interconnection method program based on the MCP protocol. When the AI semantic model and robot interconnection method program based on the MCP protocol is executed by the processor, it performs the following steps:
[0042] Natural language instructions are obtained, and a structured operation sequence is derived based on a pre-defined semantic parsing model.
[0043] Extract semantic tags from the structured operation sequence, dynamically match pre-stored service engines, and generate operation requests including tool identifiers and parameter templates;
[0044] Verify that the security token of the operation request matches the operation permissions;
[0045] If the operation is unauthorized, a second authorization request will be sent to the user.
[0046] If the permission verification passes, a security instruction is obtained based on the preset encryption rules and the operation request.
[0047] Based on the real-time flag of the security instruction, the transmission protocol is dynamically selected and a transmission protocol channel is established to generate an executable instruction stream;
[0048] Based on the executable instruction stream, the control tool executes instruction operations and obtains execution status data;
[0049] Based on the execution status data and a preset encryption rule, the execution status is generated and fed back.
[0050] In this solution, the verification of the security token matching operation permission for the operation request specifically includes:
[0051] Extract the device identifier from the security token of the operation request and establish a binding relationship with the target robot serial number;
[0052] Match the target robot's operation type based on the permission scope in the security token;
[0053] When an operation parameter exceeds the limit or a high-risk action command is detected, it is determined to be an unauthorized operation, triggering user authorization interception;
[0054] Generate a secondary authorization request containing a description of the operational risks, and pause the executable instruction flow of the target robot;
[0055] When the operation permission requirements are met, the verification is deemed successful, and a security instruction is obtained based on the preset encryption rules and the operation request.
[0056] In this solution, obtaining security instructions based on preset encryption rules and the operation request specifically includes:
[0057] The operation parameters of the operation request are encapsulated in a structured manner according to the parameter template corresponding to the tool identifier to obtain structured parameters;
[0058] Based on the parameter template, perform field-level encryption on the parameters of the specified fields;
[0059] The encrypted structured parameters are filtered based on a preset JSON format validation.
[0060] The filtered structured parameters are used to generate and bind integrity check codes, which are then integrated to obtain security instructions.
[0061] A third aspect of the present invention provides a computer-readable storage medium comprising an AI semantic model and robot interconnection method program based on the MCP protocol, wherein when the AI semantic model and robot interconnection method program based on the MCP protocol is executed by a processor, it implements the steps of the AI semantic model and robot interconnection method based on the MCP protocol as described in any of the preceding claims.
[0062] This invention provides a method, system, and medium for AI semantic model and robot interconnection based on the MCP protocol. It receives natural language instructions and generates structured operation sequences through a semantic parsing model; extracts semantic tags from the sequences and dynamically matches them with a service engine to generate operation requests containing tool identifiers and parameter templates; verifies operation permissions based on a security token, triggering secondary authorization if unauthorized access is detected, and encapsulating the operation request into a secure instruction according to encryption rules if authorization is granted; dynamically selects the transmission protocol channel based on a real-time flag to generate an executable instruction stream, thereby driving the target tool to perform operations and providing feedback on execution status data. This invention solves the heterogeneity problem between AI and robot instructions through dynamic matching of semantics and robot tools, intercepts unauthorized operations based on permission verification, and ensures data security through field-level encryption, providing a secure and efficient human-machine interaction architecture for intelligent manufacturing. Attached Figure Description
[0063] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope.
[0064] Figure 1A flowchart of an AI semantic model and robot interconnection method based on the MCP protocol of the present invention is shown;
[0065] Figure 2 A flowchart illustrating an operation permission matching process provided by an embodiment of the present invention is shown;
[0066] Figure 3 A flowchart illustrating the generation process of a security instruction provided by an embodiment of the present invention is shown;
[0067] Figure 4 The diagram shows a block diagram of an AI semantic model and robot interconnection system based on the MCP protocol according to the present invention. Detailed Implementation
[0068] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0069] Unless otherwise defined, all terms (including technical and scientific terms) used in embodiments of this invention shall have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in a common dictionary shall be interpreted as having a meaning consistent with their meaning in the context of the relevant art, and not as being interpreted in an idealized or highly formalized sense, unless expressly defined in this embodiment of the invention.
[0070] The terms "first," "second," and similar words used in the embodiments of this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "an," "a," or "the" do not indicate a quantity limitation, but rather indicate the presence of at least one. Similarly, terms such as "including" or "comprising" mean that the element or object preceding the word encompasses the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. The steps preceding or following the steps in the method of the embodiments of this invention are not necessarily performed precisely in sequence. Instead, various steps can be processed in reverse order or simultaneously. Furthermore, other operations can be added to these processes, or one or more steps can be removed from these processes.
[0071] In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0072] Figure 1 The flowchart of an AI semantic model and robot interconnection method based on the MCP protocol of the present invention is shown.
[0073] like Figure 1 As shown, the first aspect of this invention discloses a method for interconnecting an AI semantic model with a robot based on the MCP protocol, the method comprising:
[0074] S102, Obtain natural language instructions and obtain a structured operation sequence based on a preset semantic parsing model;
[0075] S104, extract the semantic tags of the structured operation sequence, dynamically match the pre-stored service engine, and generate an operation request including tool identifier and parameter template;
[0076] S106, verify that the security token of the operation request matches the operation permissions;
[0077] S108. If the operation is unauthorized, a secondary authorization request will be sent to the user.
[0078] S110, If the permission verification passes, a security instruction is obtained based on the preset encryption rules and the operation request.
[0079] S112, Based on the real-time flag of the security instruction, dynamically select the transmission protocol and establish a transmission protocol channel to generate an executable instruction stream;
[0080] S114, Based on the executable instruction stream, control the tool to execute instruction operations and obtain execution status data;
[0081] S116. Based on the execution status data and a preset encryption rule, generate and feed back the execution status.
[0082] It should be noted that in this embodiment, the process is first initiated by receiving natural language instructions. These instructions are then broken down into a structured operation sequence by a pre-defined semantic parsing model, clarifying the action type, target object, and parameter constraints. Semantic tags are then extracted from the sequence, dynamically associated with pre-stored robot tool identifiers and parameter templates in the service engine, and an operation request containing the tool call path and input specifications is generated. Next, the permission scope of the security token in the operation request is verified to ensure it covers the current operation type. If out-of-bounds parameters or high-risk instructions are detected, a secondary authorization mechanism is triggered, and the instruction flow is paused until manual confirmation is received and the restriction is lifted. If the permission verification passes, the operation request is structured and encapsulated according to encryption rules, with field-level encryption applied to sensitive fields such as coordinates and device numbers, and a session identifier is bound to generate a secure instruction. Then, a transmission protocol channel is dynamically allocated based on the real-time flag within the instruction. As one implementation, critical control instructions are directly connected to the local process communication channel, long-term tasks are allocated to a streaming push channel, and cross-network instructions utilize a self-healing channel after disconnection. Finally, the target tool is driven to perform industrial operations through a protocol-adapted instruction flow, real-time sensor data is collected, and the execution status is encrypted and fed back, forming a closed-loop control from semantic understanding to physical execution.
[0083] Figure 2 A flowchart illustrating the matching process for operation permissions provided in an embodiment of the present invention is shown.
[0084] According to embodiments of the present invention, such as Figure 2 As shown, the verification of the security token matching operation permission for the operation request specifically includes:
[0085] S202, Extract the device identifier from the security token of the operation request and establish a binding relationship with the target robot serial number;
[0086] S204, Match the target robot's operation type according to the permission scope in the security token;
[0087] S206: When an operation parameter exceeds the limit or a high-risk action command is detected, it is determined to be an unauthorized operation and user authorization is blocked.
[0088] S208, generate a secondary authorization request containing a description of operational risks, and suspend the executable instruction flow of the target robot;
[0089] S210, when the operation permission requirements are met, it is determined that the verification is passed, and a security instruction is obtained based on the preset encryption rules and the operation request.
[0090] It should be noted that in this embodiment, the security token verification process first extracts the device identifier and establishes a hardware-level binding with the target robot serial number to ensure that the command only applies to the specified device. Then, it matches the compatibility of the token permission scope with the operation type. For example, robotic arm movement requires "robot_move" permission, while force control operations require higher permissions such as "robot_force_control". When the parameter detection module identifies speed, torque, or other values exceeding preset safety thresholds, or when the command involves high-risk actions such as emergency stop or high-power mode, it determines it as an unauthorized operation and activates the user authorization interceptor. When an unauthorized operation is determined, the system also generates a secondary authorization request containing risk details and pushes it to the user terminal, for example, risk details such as "speeding 30%, collision risk 25%"; in addition, it simultaneously freezes all pending command streams for the robot. The system only unfreezes the process and injects the encrypted security command into the transmission flow after the user returns a permission signal through the confirmation interface, thus implementing a dual confirmation mechanism for risky operations.
[0091] Figure 3 A flowchart illustrating the generation process of a security instruction provided by an embodiment of the present invention is shown.
[0092] According to embodiments of the present invention, such as Figure 3 As shown, the security instruction obtained based on the preset encryption rules and the operation request specifically includes:
[0093] S302, the operation parameters of the operation request are encapsulated in a structured manner according to the parameter template corresponding to the tool identifier to obtain structured parameters;
[0094] S304, Perform field-level encryption on the parameters of the specified fields according to the parameter template;
[0095] S306, Based on the preset JSON format verification, the encrypted structured parameters are filtered;
[0096] S308, generate and bind integrity check codes to the filtered structured parameters, and integrate them to obtain security instructions.
[0097] It should be noted that in this embodiment, when executing the generation process of encrypted security instructions, the operation parameters are first structurally reorganized. As one implementation method, based on the parameter template corresponding to the tool identifier, the original input is standardized into a key-value pair structure; for example, coordinate parameters are encapsulated as {x:1.2, y:3.4}. Subsequently, for sensitive fields such as location coordinates and device serial numbers, field-level encryption is implemented using a dynamic key bound to the session to ensure that a single data leak does not affect overall security. Secondly, a mandatory JSON format verification layer filters unstructured data and potential injection code, blocking malicious instruction penetration. Then, an integrity checksum based on the session identifier is generated for the encrypted dataset; this checksum verifies whether the data has been tampered with during transmission. Finally, the integrated data forms a secure instruction package containing encrypted parameters, a checksum, and the tool call path, providing standardized input for subsequent protocol transmission.
[0098] According to an embodiment of the present invention, the step of dynamically selecting a transmission protocol and establishing a transmission protocol channel based on the real-time flag of the security instruction specifically includes:
[0099] Based on the real-time flag of the security command, the command is classified, including at least real-time control commands, streaming feedback commands, or cross-network transmission commands.
[0100] If it is a real-time control command, then allocate a local process communication protocol channel;
[0101] If it is a streaming feedback command, then allocate a long-connection streaming push protocol channel;
[0102] If it is a cross-network transmission command, then allocate a disconnection self-healing transmission protocol channel;
[0103] All protocol channels maintain instruction continuity through a unified session identifier.
[0104] It should be noted that in this embodiment, when executing the dynamic protocol selection mechanism, the real-time flag in the security instructions is first parsed and classified into three scenarios: real-time control instructions, streaming feedback instructions, and cross-network transmission instructions. For real-time control instructions, such as motion control instructions, the instructions are assigned to the local process communication protocol channel, and memory sharing enables the instructions to directly reach the robot drive layer, eliminating the impact of network latency. For streaming feedback instructions, such as task progress information transmission set instructions, the instructions are assigned to the long-connection streaming push channel, continuously transmitting percentage status updates. For cross-network instruction scenarios, such as cloud collaboration instructions, the instructions are assigned to the disconnection self-healing transmission protocol channel, which has session caching and automatic reconnection capabilities within 50ms. In this embodiment, all channels embed a unified session identifier, automatically inheriting the task context when switching protocols. Task continuity is ensured through instruction queue reordering and state snapshot recovery, ensuring that industrial control timing is maintained even under extreme network fluctuations.
[0105] According to an embodiment of the present invention, controlling the tool to execute instruction operations based on the executable instruction stream specifically includes:
[0106] The executable instruction stream is extracted using the tool identifier, which is used to match a pre-registered robot control tool library;
[0107] If it is a legitimate tool, the structured parameters extracted from the executable instruction stream are translated into industrial control instructions based on preset protocol conversion rules;
[0108] When executing industrial control commands, feedback data is monitored in real time based on pre-deployed sensors;
[0109] When feedback data triggers a preset exception rule, the current operation sequence is dynamically interrupted.
[0110] It should be noted that, in this embodiment, during the robot tool execution phase, the pre-registered tool library is first retrieved based on the tool identifier in the instruction stream. After verifying the tool's legitimacy, the protocol conversion engine is activated. During protocol conversion, JSON structured parameters are translated into target industrial protocol instructions according to mapping rules. For example, {speed:0.8} is converted into the target motor speed control function code 0x06 and the instruction to write the speed register address. Feedback data from force sensors, vision systems, etc., is received in real time during instruction execution. When data triggers preset abnormal rules, such as a sudden increase in torque exceeding a threshold or detection of personnel intrusion into the area, the current operation sequence is immediately interrupted and the relevant equipment is frozen. The system automatically generates an anomaly recovery workflow, including a safe rollback path and protocol channel switching. After the environmental risk is eliminated, the task is re-executed according to the optimized sequence.
[0111] According to an embodiment of the present invention, the translation of the structured parameters extracted from the executable instruction stream into industrial control instructions based on preset protocol conversion rules specifically includes:
[0112] The operation parameters are obtained by parsing the JSON in the preset format;
[0113] The industrial protocol instruction template is obtained by matching the tool identifier with a predefined industrial protocol instruction mapping rule library.
[0114] Fill the operation parameters into the industrial protocol instruction template;
[0115] Add an industrial protocol checksum and tool address prefix to the industrial protocol instruction template after filling in the parameters, and output the binary instruction stream of the target industrial control bus standard.
[0116] It should be noted that in this embodiment, the protocol converter first parses the JSON parameters and extracts key operation values. Based on the tool identifier, it matches the industrial protocol instruction mapping rule library to locate the target protocol template. Then, the parameter values are filled into specified fields of the protocol template, and data type casting is performed. Next, the necessary checksum and device address prefix for the industrial protocol are added, ultimately generating low-level control instructions conforming to the industrial bus standard. The protocol conversion process ensures that the semantic instructions output by the AI are adapted to heterogeneous industrial equipment with zero errors.
[0117] It is worth mentioning that it also includes:
[0118] When a registration request for a new robot tool is received;
[0119] Generate a second tool identifier;
[0120] Extract the second semantic tag and the second parameter template from the registration request;
[0121] After associating the second tool identifier with the second semantic tag, store it in the service engine;
[0122] Update the robot's capability list and broadcast it to all AI semantic model nodes.
[0123] It should be noted that in this embodiment, upon receiving a request to register a new tool, the expansion process for the new tool is triggered. First, a globally unique tool identifier is generated, and semantic tags and parameter templates are extracted from the description text. Then, the mapping relationship between the tool identifier and semantic tags is stored in the service discovery engine, updating the global robot capability list. Next, an update message is pushed to all AI semantic model nodes via a broadcast mechanism, providing a functional description and invocation interface for the new tool. During subsequent natural language instruction parsing, the semantic tag matching module automatically associates the new tool, enabling immediate discovery and invocation of new device capabilities without retraining the AI model.
[0124] It is worth mentioning that it also includes dynamic authentication chain logic for determining operation permissions, specifically:
[0125] Based on the security token of the operation request, determine whether it was issued by a legitimate user and whether it has expired;
[0126] If so, then verify whether the device identifier in the security token matches the target robot;
[0127] If so, verify whether the permission scope in the security token includes the operation type of the target tool;
[0128] If so, check whether the real-time environmental parameters trigger the high-risk operation rule library;
[0129] If not, then the permission verification is considered successful.
[0130] It should be noted that this embodiment provides a four-level authentication and verification mechanism. The initial authentication confirms that the security token was issued by a legitimate server and has not expired. Next, device binding authentication is performed, verifying that the device identifier embedded in the token completely matches the target robot's serial number. Then, operation scope authentication is performed, verifying that the token's permission list includes the operation type of the current tool; for example, calling a grabbing tool requires "robot_grasp" permission. Finally, environmental risk authentication is performed, through real-time analysis of sensor data, including but not limited to regional thermal imaging showing personnel approaching; if a high-risk rule is matched, such as prohibiting high-speed movement within a 1-meter radius of a person, operation interception is triggered. Authorization commands are executed only when all four levels of verification pass, forming a defense-in-depth system covering identity, device, operation, and environment.
[0131] Figure 4 The diagram shows a block diagram of an AI semantic model and robot interconnection system based on the MCP protocol according to the present invention.
[0132] like Figure 4 As shown, the second aspect of the present invention discloses an AI semantic model and robot interconnection system 4 based on the MCP protocol, including a memory 41 and a processor 42. The memory includes an AI semantic model and robot interconnection method program based on the MCP protocol. When the processor executes the AI semantic model and robot interconnection method program based on the MCP protocol, it performs the following steps:
[0133] Natural language instructions are obtained, and a structured operation sequence is derived based on a pre-defined semantic parsing model.
[0134] Extract semantic tags from the structured operation sequence, dynamically match pre-stored service engines, and generate operation requests including tool identifiers and parameter templates;
[0135] Verify that the security token of the operation request matches the operation permissions;
[0136] If the operation is unauthorized, a second authorization request will be sent to the user.
[0137] If the permission verification passes, a security instruction is obtained based on the preset encryption rules and the operation request.
[0138] Based on the real-time flag of the security instruction, the transmission protocol is dynamically selected and a transmission protocol channel is established to generate an executable instruction stream;
[0139] Based on the executable instruction stream, the control tool executes instruction operations and obtains execution status data;
[0140] Based on the execution status data and a preset encryption rule, the execution status is generated and fed back.
[0141] It should be noted that in this embodiment, the process is first initiated by receiving natural language instructions. These instructions are then broken down into a structured operation sequence by a pre-defined semantic parsing model, clarifying the action type, target object, and parameter constraints. Semantic tags are then extracted from the sequence, dynamically associated with pre-stored robot tool identifiers and parameter templates in the service engine, and an operation request containing the tool call path and input specifications is generated. Next, the permission scope of the security token in the operation request is verified to ensure it covers the current operation type. If out-of-bounds parameters or high-risk instructions are detected, a secondary authorization mechanism is triggered, and the instruction flow is paused until manual confirmation is received and the restriction is lifted. If the permission verification passes, the operation request is structured and encapsulated according to encryption rules, with field-level encryption applied to sensitive fields such as coordinates and device numbers, and a session identifier is bound to generate a secure instruction. Then, a transmission protocol channel is dynamically allocated based on the real-time flag within the instruction. As one implementation, critical control instructions are directly connected to the local process communication channel, long-term tasks are allocated to a streaming push channel, and cross-network instructions utilize a self-healing channel after disconnection. Finally, the target tool is driven to perform industrial operations through a protocol-adapted instruction flow, real-time sensor data is collected, and the execution status is encrypted and fed back, forming a closed-loop control from semantic understanding to physical execution.
[0142] Figure 2 A flowchart illustrating the matching process for operation permissions provided in an embodiment of the present invention is shown.
[0143] According to embodiments of the present invention, such as Figure 2 As shown, the verification of the security token matching operation permission for the operation request specifically includes:
[0144] Extract the device identifier from the security token of the operation request and establish a binding relationship with the target robot serial number;
[0145] Match the target robot's operation type based on the permission scope in the security token;
[0146] When an operation parameter exceeds the limit or a high-risk action command is detected, it is determined to be an unauthorized operation, triggering user authorization interception;
[0147] Generate a secondary authorization request containing a description of the operational risks, and pause the executable instruction flow of the target robot;
[0148] When the operation permission requirements are met, the verification is deemed successful, and a security instruction is obtained based on the preset encryption rules and the operation request.
[0149] It should be noted that in this embodiment, the security token verification process first extracts the device identifier and establishes a hardware-level binding with the target robot serial number to ensure that the command only applies to the specified device. Then, it matches the compatibility of the token permission scope with the operation type. For example, robotic arm movement requires "robot_move" permission, while force control operations require higher permissions such as "robot_force_control". When the parameter detection module identifies speed, torque, or other values exceeding preset safety thresholds, or when the command involves high-risk actions such as emergency stop or high-power mode, it determines it as an unauthorized operation and activates the user authorization interceptor. When an unauthorized operation is determined, the system also generates a secondary authorization request containing risk details and pushes it to the user terminal, for example, risk details such as "speeding 30%, collision risk 25%"; in addition, it simultaneously freezes all pending command streams for the robot. The system only unfreezes the process and injects the encrypted security command into the transmission flow after the user returns a permission signal through the confirmation interface, thus implementing a dual confirmation mechanism for risky operations.
[0150] Figure 3 A flowchart illustrating the generation process of a security instruction provided by an embodiment of the present invention is shown.
[0151] According to embodiments of the present invention, such as Figure 3 As shown, the security instruction obtained based on the preset encryption rules and the operation request specifically includes:
[0152] The operation parameters of the operation request are encapsulated in a structured manner according to the parameter template corresponding to the tool identifier to obtain structured parameters;
[0153] Based on the parameter template, perform field-level encryption on the parameters of the specified fields;
[0154] The encrypted structured parameters are filtered based on a preset JSON format validation.
[0155] The filtered structured parameters are used to generate and bind integrity check codes, which are then integrated to obtain security instructions.
[0156] It should be noted that in this embodiment, when executing the generation process of encrypted security instructions, the operation parameters are first structurally reorganized. As one implementation method, based on the parameter template corresponding to the tool identifier, the original input is standardized into a key-value pair structure; for example, coordinate parameters are encapsulated as {x:1.2, y:3.4}. Subsequently, for sensitive fields such as location coordinates and device serial numbers, field-level encryption is implemented using a dynamic key bound to the session to ensure that a single data leak does not affect overall security. Secondly, a mandatory JSON format verification layer filters unstructured data and potential injection code, blocking malicious instruction penetration. Then, an integrity checksum based on the session identifier is generated for the encrypted dataset; this checksum verifies whether the data has been tampered with during transmission. Finally, the integrated data forms a secure instruction package containing encrypted parameters, a checksum, and the tool call path, providing standardized input for subsequent protocol transmission.
[0157] According to an embodiment of the present invention, the step of dynamically selecting a transmission protocol and establishing a transmission protocol channel based on the real-time flag of the security instruction specifically includes:
[0158] Based on the real-time flag of the security command, the command is classified, including at least real-time control commands, streaming feedback commands, or cross-network transmission commands.
[0159] If it is a real-time control command, then allocate a local process communication protocol channel;
[0160] If it is a streaming feedback command, then allocate a long-connection streaming push protocol channel;
[0161] If it is a cross-network transmission command, then allocate a disconnection self-healing transmission protocol channel;
[0162] All protocol channels maintain instruction continuity through a unified session identifier.
[0163] It should be noted that in this embodiment, when executing the dynamic protocol selection mechanism, the real-time flag in the security instructions is first parsed and classified into three scenarios: real-time control instructions, streaming feedback instructions, and cross-network transmission instructions. For real-time control instructions, such as motion control instructions, the instructions are assigned to the local process communication protocol channel, and memory sharing enables the instructions to directly reach the robot drive layer, eliminating the impact of network latency. For streaming feedback instructions, such as task progress information transmission set instructions, the instructions are assigned to the long-connection streaming push channel, continuously transmitting percentage status updates. For cross-network instruction scenarios, such as cloud collaboration instructions, the instructions are assigned to the disconnection self-healing transmission protocol channel, which has session caching and automatic reconnection capabilities within 50ms. In this embodiment, all channels embed a unified session identifier, automatically inheriting the task context when switching protocols. Task continuity is ensured through instruction queue reordering and state snapshot recovery, ensuring that industrial control timing is maintained even under extreme network fluctuations.
[0164] According to an embodiment of the present invention, controlling the tool to execute instruction operations based on the executable instruction stream specifically includes:
[0165] The executable instruction stream is extracted using the tool identifier, which is used to match a pre-registered robot control tool library;
[0166] If it is a legitimate tool, the structured parameters extracted from the executable instruction stream are translated into industrial control instructions based on preset protocol conversion rules;
[0167] When executing industrial control commands, feedback data is monitored in real time based on pre-deployed sensors;
[0168] When feedback data triggers a preset exception rule, the current operation sequence is dynamically interrupted.
[0169] It should be noted that, in this embodiment, during the robot tool execution phase, the pre-registered tool library is first retrieved based on the tool identifier in the instruction stream. After verifying the tool's legitimacy, the protocol conversion engine is activated. During protocol conversion, JSON structured parameters are translated into target industrial protocol instructions according to mapping rules. For example, {speed:0.8} is converted into the target motor speed control function code 0x06 and the instruction to write the speed register address. Feedback data from force sensors, vision systems, etc., is received in real time during instruction execution. When data triggers preset abnormal rules, such as a sudden increase in torque exceeding a threshold or detection of personnel intrusion into the area, the current operation sequence is immediately interrupted and the relevant equipment is frozen. The system automatically generates an anomaly recovery workflow, including a safe rollback path and protocol channel switching. After the environmental risk is eliminated, the task is re-executed according to the optimized sequence.
[0170] According to an embodiment of the present invention, the translation of the structured parameters extracted from the executable instruction stream into industrial control instructions based on preset protocol conversion rules specifically includes:
[0171] The operation parameters are obtained by parsing the JSON in the preset format;
[0172] The industrial protocol instruction template is obtained by matching the tool identifier with a predefined industrial protocol instruction mapping rule library.
[0173] Fill the operation parameters into the industrial protocol instruction template;
[0174] Add an industrial protocol checksum and tool address prefix to the industrial protocol instruction template after filling in the parameters, and output the binary instruction stream of the target industrial control bus standard.
[0175] It should be noted that in this embodiment, the protocol converter first parses the JSON parameters and extracts key operation values. Based on the tool identifier, it matches the industrial protocol instruction mapping rule library to locate the target protocol template. Then, the parameter values are filled into specified fields of the protocol template, and data type casting is performed. Next, the necessary checksum and device address prefix for the industrial protocol are added, ultimately generating low-level control instructions conforming to the industrial bus standard. The protocol conversion process ensures that the semantic instructions output by the AI are adapted to heterogeneous industrial equipment with zero errors.
[0176] It is worth mentioning that it also includes:
[0177] When a registration request for a new robot tool is received;
[0178] Generate a second tool identifier;
[0179] Extract the second semantic tag and the second parameter template from the registration request;
[0180] After associating the second tool identifier with the second semantic tag, store it in the service engine;
[0181] Update the robot's capability list and broadcast it to all AI semantic model nodes.
[0182] It should be noted that in this embodiment, upon receiving a request to register a new tool, the expansion process for the new tool is triggered. First, a globally unique tool identifier is generated, and semantic tags and parameter templates are extracted from the description text. Then, the mapping relationship between the tool identifier and semantic tags is stored in the service discovery engine, updating the global robot capability list. Next, an update message is pushed to all AI semantic model nodes via a broadcast mechanism, providing a functional description and invocation interface for the new tool. During subsequent natural language instruction parsing, the semantic tag matching module automatically associates the new tool, enabling immediate discovery and invocation of new device capabilities without retraining the AI model.
[0183] It is worth mentioning that it also includes dynamic authentication chain logic for determining operation permissions, specifically:
[0184] Based on the security token of the operation request, determine whether it was issued by a legitimate user and whether it has expired;
[0185] If so, then verify whether the device identifier in the security token matches the target robot;
[0186] If so, verify whether the permission scope in the security token includes the operation type of the target tool;
[0187] If so, check whether the real-time environmental parameters trigger the high-risk operation rule library;
[0188] If not, then the permission verification is considered successful.
[0189] It should be noted that this embodiment provides a four-level authentication and verification mechanism. The initial authentication confirms that the security token was issued by a legitimate server and has not expired. Next, device binding authentication is performed by verifying that the device identifier embedded in the token completely matches the target robot's serial number. Then, operation scope authentication is performed by verifying that the token's permission list includes the operation type of the current tool; for example, calling a grabbing tool requires "robot_grasp" permission. Finally, environmental risk authentication is performed by analyzing sensor data in real time, including but not limited to regional thermal imaging showing people approaching. If a high-risk rule is matched, such as prohibiting high-speed movement within a 1-meter radius of a person, operation interception is triggered. Authorization commands are executed only when all four levels of verification pass, forming a defense-in-depth system covering identity, device, operation, and environment.
[0190] A third aspect of the present invention provides a computer-readable storage medium comprising an AI semantic model and robot interconnection method program based on the MCP protocol, wherein when the AI semantic model and robot interconnection method program based on the MCP protocol is executed by a processor, it implements the steps of the AI semantic model and robot interconnection method based on the MCP protocol as described in any of the preceding claims.
[0191] In summary, this invention provides a method, system, and medium for AI semantic model and robot interconnection based on the MCP protocol. It receives natural language instructions and generates structured operation sequences through a semantic parsing model; extracts semantic tags from the sequences and dynamically matches them with a service engine to generate operation requests containing tool identifiers and parameter templates; verifies operation permissions based on a security token, triggering secondary authorization if unauthorized access is detected, and encapsulating the operation request into a secure instruction according to encryption rules if authorization is granted; dynamically selects the transmission protocol channel based on a real-time flag to generate an executable instruction stream, thereby driving the target tool to perform operations and providing feedback on execution status data. This invention solves the heterogeneity problem between AI and robot instructions through dynamic matching of semantics and robot tools, intercepts unauthorized operations based on permission verification, and ensures data security through field-level encryption, providing a secure and efficient human-machine interaction architecture for intelligent manufacturing.
[0192] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes 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.
[0193] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for interconnecting AI semantic models and robots based on the MCP protocol, characterized in that, The method includes: Natural language instructions are obtained, and a structured operation sequence is derived based on a pre-defined semantic parsing model. Extract semantic tags from the structured operation sequence, dynamically match pre-stored service engines, and generate operation requests including tool identifiers and parameter templates; Verifying the security token of the operation request to match the operation permissions specifically includes: extracting the device identifier from the security token of the operation request and establishing a binding relationship with the target robot's serial number; matching the operation type of the target robot according to the permission range in the security token; when an operation parameter exceeding the limit or a high-risk action instruction is detected, it is determined to be an unauthorized operation, triggering user authorization interception; generating a secondary authorization request containing an operation risk description and pausing the executable instruction stream of the target robot; when the operation permission requirements are met, it is determined to pass the verification, and then, based on preset encryption rules, a secure instruction is obtained according to the operation request. If the operation is unauthorized, a second authorization request will be sent to the user. If the permission verification passes, a security instruction is obtained based on the preset encryption rules and the operation request. Based on the real-time flag of the security instruction, the transmission protocol is dynamically selected and a transmission protocol channel is established to generate an executable instruction stream; According to the executable instruction stream, the control tool executes instruction operations and obtains execution status data, specifically including: extracting the tool identifier from the executable instruction stream for matching with a pre-registered robot control tool library; if it is a legitimate tool, translating the structured parameters extracted from the executable instruction stream into industrial control instructions based on preset protocol conversion rules; when executing industrial control instructions, monitoring feedback data in real time based on pre-deployed sensors; and dynamically interrupting the current operation sequence when the feedback data triggers preset anomaly rules. Specifically, the process of translating the structured parameters extracted from the executable instruction stream into industrial control instructions based on preset protocol conversion rules includes: parsing operation parameters based on a preset JSON format; matching the tool identifier with a predefined industrial protocol instruction mapping rule library to obtain an industrial protocol instruction template; filling the operation parameters into the industrial protocol instruction template; adding an industrial protocol checksum and a tool address prefix to the industrial protocol instruction template after parameter filling; and outputting a binary instruction stream of the target industrial control bus standard. Based on the execution status data and a preset encryption rule, the execution status is generated and fed back. Upon receiving a registration request for a new robot tool, a second tool identifier is generated; Extract the second semantic tag and the second parameter template from the registration request; After associating the second tool identifier with the second semantic tag, store it in the service engine; Update the robot's capability list and broadcast it to all AI semantic model nodes.
2. The method for interconnecting an AI semantic model with a robot based on the MCP protocol according to claim 1, characterized in that, The security instruction obtained based on the preset encryption rules and the operation request specifically includes: The operation parameters of the operation request are encapsulated in a structured manner according to the parameter template corresponding to the tool identifier to obtain structured parameters; Based on the parameter template, perform field-level encryption on the parameters of the specified fields; The encrypted structured parameters are filtered based on a preset JSON format validation. The filtered structured parameters are used to generate and bind integrity check codes, which are then integrated to obtain security instructions.
3. The method for interconnecting an AI semantic model with a robot based on the MCP protocol according to claim 1, characterized in that, The step of dynamically selecting a transmission protocol and establishing a transmission protocol channel based on the real-time flag of the security instruction specifically includes: Based on the real-time flag of the security command, the command is classified, including at least real-time control commands, streaming feedback commands, or cross-network transmission commands. If it is a real-time control command, then allocate a local process communication protocol channel; If it is a streaming feedback command, then allocate a long-connection streaming push protocol channel; If it is a cross-network transmission command, then allocate a disconnection self-healing transmission protocol channel; All protocol channels maintain instruction continuity through a unified session identifier.
4. An AI semantic model and robot interconnection system based on the MCP protocol, characterized in that, The system includes a memory and a processor. The memory includes a program for an AI semantic model and robot interconnection method based on the MCP protocol, which implements the steps of the AI semantic model and robot interconnection method based on the MCP protocol as described in any one of claims 1 to 3: Natural language instructions are obtained, and a structured operation sequence is derived based on a pre-defined semantic parsing model. Extract semantic tags from the structured operation sequence, dynamically match pre-stored service engines, and generate operation requests including tool identifiers and parameter templates; Verifying the security token of the operation request to match the operation permissions specifically includes: extracting the device identifier from the security token of the operation request and establishing a binding relationship with the target robot's serial number; matching the operation type of the target robot according to the permission range in the security token; when an operation parameter exceeding the limit or a high-risk action instruction is detected, it is determined to be an unauthorized operation, triggering user authorization interception; generating a secondary authorization request containing an operation risk description and pausing the executable instruction stream of the target robot; when the operation permission requirements are met, it is determined to pass the verification, and then, based on preset encryption rules, a secure instruction is obtained according to the operation request. If the operation is unauthorized, a second authorization request will be sent to the user. If the permission verification passes, a security instruction is obtained based on the preset encryption rules and the operation request. Based on the real-time flag of the security instruction, the transmission protocol is dynamically selected and a transmission protocol channel is established to generate an executable instruction stream; Based on the executable instruction stream, the control tool executes instruction operations and obtains execution status data; Based on the execution status data and a preset encryption rule, an execution status is generated and fed back. Specifically, this includes: matching the executable instruction stream extraction tool identifier with a pre-registered robot control tool library; if it is a legitimate tool, translating the structured parameters extracted from the executable instruction stream into industrial control instructions based on a preset protocol conversion rule; when executing industrial control instructions, real-time monitoring and feedback data based on pre-deployed sensors; and dynamically interrupting the current operation sequence when the feedback data triggers a preset anomaly rule. Specifically, the process of translating the structured parameters extracted from the executable instruction stream into industrial control instructions based on preset protocol conversion rules includes: parsing operation parameters based on a preset JSON format; matching the tool identifier with a predefined industrial protocol instruction mapping rule library to obtain an industrial protocol instruction template; filling the operation parameters into the industrial protocol instruction template; adding an industrial protocol checksum and a tool address prefix to the industrial protocol instruction template after parameter filling; and outputting a binary instruction stream of the target industrial control bus standard. Upon receiving a registration request for a new robot tool, a second tool identifier is generated; Extract the second semantic tag and the second parameter template from the registration request; After associating the second tool identifier with the second semantic tag, store it in the service engine; Update the robot's capability list and broadcast it to all AI semantic model nodes.
5. The AI semantic model and robot interconnection system based on the MCP protocol according to claim 4, characterized in that, The security instruction obtained based on the preset encryption rules and the operation request specifically includes: The operation parameters of the operation request are encapsulated in a structured manner according to the parameter template corresponding to the tool identifier to obtain structured parameters; Based on the parameter template, perform field-level encryption on the parameters of the specified fields; The encrypted structured parameters are filtered based on a preset JSON format validation. The filtered structured parameters are used to generate and bind integrity check codes, which are then integrated to obtain security instructions.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer-readable storage medium includes an AI semantic model and robot interconnection method program based on the MCP protocol. When the AI semantic model and robot interconnection method program based on the MCP protocol is executed by a processor, it implements the steps of the AI semantic model and robot interconnection method based on the MCP protocol as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Equipment management method and system based on industrial internet identification analysis system
CN120091071A
Agent-based tool combination and task processing method and device, equipment and medium
CN120276875A
Security protection method, system and device for target network and medium
CN120321646A