A heterogeneous device control method and system based on AIAgent and MCP protocol
By constructing a heterogeneous device topology diagram and an MCP instruction conversion mapping table, the problem of protocol fragmentation between the Internet of Things and industrial control equipment is solved, realizing unified adaptation and secure collaborative control of heterogeneous devices, and avoiding action conflicts between devices.
Patent Information
- Application Number
- CN202611250866.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-18
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies cannot effectively solve the problem of protocol fragmentation between IoT and industrial control equipment, resulting in AIAgent being unable to universally adapt to hardware devices in multiple scenarios, high cost of modifying existing third-party devices, and poor adaptability and low reusability of AI hardware control solutions.
By constructing a heterogeneous device topology diagram, obtaining the device action interlock combination table and MCP instruction conversion mapping table, unified adaptation and control of heterogeneous devices are achieved, and device information acquisition and instruction conversion are performed using AIAgent and the MCP protocol.
It achieves precise quantitative modeling of coupling strength, energy flow direction and interaction attributes between devices, identifies risks of device linkage and precipitates them in a rule-based manner, realizes a safe closed loop and precise implementation of multi-device collaborative control, and avoids cross-protocol action conflicts.
Smart Images

Figure CN123185233A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of equipment control technology, specifically to a heterogeneous equipment control method and system based on AIAgent and MCP protocols. Background Technology
[0002] With the rapid iteration of large-scale models and AI Agent digital employee technologies, utilizing AI intelligent agents to autonomously control smart home and industrial control hardware has become a core development direction in the industry. However, existing technical solutions face insurmountable technical bottlenecks when dealing with massive amounts of existing heterogeneous third-party devices, specifically as follows:
[0003] First, the protocols of the Internet of Things (IoT) and industrial control equipment are highly fragmented and their systems are disconnected. Existing smart home devices generally use wireless protocols such as MQTT, Zigbee, BLE, HTTP, Matter, and KNX, while industrial control equipment generally uses bus protocols such as Modbus, OPCUA, EtherCAT, PROFINET, BACnet, and CANopen. The communication mechanisms, message structures, and interaction logic of these various protocols are completely incompatible, and the industry lacks a unified standard for calling upper-layer AI, resulting in AI agents that cannot be universally adapted to hardware devices in multiple scenarios.
[0004] Secondly, existing third-party devices are closed and cannot be modified, making intelligent transformation extremely costly. Commercial smart home and industrial control terminals on the market are all pre-built devices with fixed firmware from manufacturers. Users cannot modify the device firmware, embed AI adaptation protocols, or add MCP protocol stacks. Traditional AI hardware control solutions rely on native device modifications or manufacturer cloud API integration, which cannot achieve localized and autonomous direct AI control.
[0005] Secondly, existing AI hardware control solutions suffer from poor adaptability and low reusability. Traditional technologies are mostly based on a fixed development model of "single protocol adaptation and single scenario binding," which can only adapt to the single MQTT protocol and cannot be compatible with industrial buses and multiple home protocols. Each type of device requires independent development of plugins, encapsulation of interfaces, and writing of parsing logic, resulting in a large amount of development redundancy, long iteration cycles, and inability to be deployed on a large scale. Summary of the Invention
[0006] To address the aforementioned technical issues, this paper provides a heterogeneous device control method and system based on AIAgent and MCP protocol. This technical solution solves the problems mentioned in the background technology, such as the highly fragmented and disconnected systems of IoT and industrial control equipment protocols, the complete incompatibility of various protocol communication mechanisms, message structures, and interaction logics, the lack of a unified upper-layer AI calling standard in the industry, the inability of AIAgent to be universally adapted to hardware devices in multiple scenarios, the closed and unmodifiable nature of existing third-party devices, the extremely high cost of intelligent transformation, and the poor adaptability and low reusability of AI hardware control solutions.
[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0008] A heterogeneous device control method based on AIAgent and MCP protocol, comprising:
[0009] Obtain heterogeneous device information, which includes heterogeneous device communication protocol information and device parameter information;
[0010] Based on heterogeneous device information, obtain the corresponding physical connection relationships and logical dependencies between different heterogeneous devices;
[0011] Based on the physical connections and logical dependencies between heterogeneous devices, a heterogeneous device topology diagram is constructed.
[0012] Based on the heterogeneous equipment topology diagram, and using topology correlation analysis, obtain the equipment action interlock combination table;
[0013] Based on the communication protocol information of heterogeneous devices, deploy mutually isolated MCP protocol adaptation gateways for each type of heterogeneous device with different communication protocols.
[0014] According to the MCP protocol adaptation gateway, based on the device parameter information, obtain the MCP instruction conversion mapping table corresponding to each heterogeneous device;
[0015] Natural language instruction information is obtained, and based on the AI Agent, the corresponding MCP semantic control instruction is obtained. The MCP semantic control instruction includes the target device identifier, action identifier, and control parameters.
[0016] Based on MCP semantic control instructions, MCP instruction conversion mapping table and device action interlock combination table, heterogeneous device control is realized.
[0017] Preferably, the construction of a heterogeneous device topology diagram based on the corresponding physical connection relationships and logical dependencies between heterogeneous devices specifically includes:
[0018] Based on the heterogeneous device information, each heterogeneous device is treated as a topology node, and the topology node information is obtained.
[0019] Based on the topology node information, and on the basis of the physical connection relationships and logical dependencies between heterogeneous devices, topology edges are constructed.
[0020] If two topological nodes are physically connected but have no logical dependency, then an undirected edge is constructed between the topological nodes.
[0021] If there is a logical dependency between two topological nodes, a directed edge is constructed between the topological nodes, and the direction of the edge indicates the flow of materials, energy or information.
[0022] Based on the physical connection and logical dependency relationships between heterogeneous devices, obtain the response time and coupling type identifier of the two heterogeneous devices corresponding to the topological edge;
[0023] Based on response time and coupling type identifier, obtain the initial weights corresponding to the topological edges;
[0024] The edge weights are obtained by normalizing the edges based on their initial weights.
[0025] Construct a heterogeneous device topology graph based on topology node information, topology edges, and corresponding edge weights.
[0026] Preferably, the step of obtaining the equipment action interlock combination table based on the heterogeneous equipment topology diagram and topology association analysis specifically includes:
[0027] Based on the heterogeneous device topology graph, obtain the set of device nodes and the set of topology edges;
[0028] Specifically, for each directed edge in the topological edge set, the upstream and downstream devices are determined;
[0029] Based on the upstream and downstream equipment, determine the executable actions corresponding to the equipment;
[0030] For any action of an upstream device and any action of a downstream device, a device matching action group is constructed, wherein the device matching action group includes the actions of the upstream device and the actions of the downstream device.
[0031] Based on the device matching action group, obtain the output resource identifier and output parameter definition of the upstream device action and the input resource identifier and input parameter definition of the downstream device action;
[0032] Based on the output parameter definition and the input parameter definition, obtain the maximum output rate of the upstream equipment action and the maximum consumption rate of the downstream equipment action allowed in the task instruction;
[0033] The maximum output rate and the maximum consumption rate are used to determine whether an interlocking action is constituted. If the maximum consumption rate exceeds the maximum output rate, the equipment matching action group is determined to constitute an interlocking action pair.
[0034] For each undirected edge in the topological edge set, obtain the device matching action group of the heterogeneous device corresponding to the undirected edge and the resource identifier or status field corresponding to each executable action, and construct the capability-resource association matrix;
[0035] If the device matches the action group and it acts on the same resource and causes a conflict in the state of the resource, then the action pair is determined to be an interlocked action pair.
[0036] Traverse all device matching action groups and their actions, and summarize them to obtain the device action interlock combination table.
[0037] Preferably, the step of adapting the gateway according to the MCP protocol and obtaining the MCP instruction conversion mapping table corresponding to each heterogeneous device based on device parameter information specifically includes:
[0038] Based on the connection established between the MCP protocol adapter gateway and heterogeneous devices, the original protocol messages of the devices are obtained.
[0039] Based on the original protocol messages of the device, the protocol type identifier and address model are identified. The address model represents the addressing method and data organization structure of the device in the underlying protocol.
[0040] Based on the protocol type identifier, obtain the protocol parsing template corresponding to the protocol type;
[0041] Based on the protocol parsing template and the original protocol message of the device, obtain the list of executable capabilities, status field definitions and parameter range raw data corresponding to the heterogeneous device. The parameter range raw data includes the upper limit and lower limit values of each device parameter.
[0042] Based on the original data of the parameter range, calculate the parameter boundary coefficient for each parameter corresponding to each executable capability;
[0043] The mean value of the parameter boundary coefficients of the equipment parameters corresponding to the heterogeneous equipment is used as the comprehensive capability weight of the heterogeneous equipment.
[0044] The protocol capability descriptor is obtained by combining the protocol type identifier, address model, list of executable capabilities, state field definition, parameter upper and lower limits, parameter boundary coefficients and comprehensive capability weights.
[0045] Based on the protocol capability descriptor, according to the MCP protocol adaptation gateway, obtain the MCP instruction conversion mapping table corresponding to each heterogeneous device;
[0046] Specifically, the parameter boundary coefficients are:
[0047]
[0048] In the formula, Indicates the first The parameter boundary coefficients of the equipment parameters, Indicates the first The upper limit of the parameters of this type of equipment, Indicates the first The lower limit of the parameters of this type of equipment. This is a correction item.
[0049] Preferably, the step of obtaining the MCP instruction conversion mapping table corresponding to each heterogeneous device based on the protocol capability descriptor and the MCP protocol adaptation gateway specifically includes:
[0050] Based on the protocol capability descriptor, extract the list of executable capabilities and the definition of status fields;
[0051] For each capability in the list of executable capabilities, obtain its capability name string and corresponding parameter list;
[0052] Based on the requirements of the MCP protocol, an MCP standard tool name library is obtained. The MCP standard tool name library includes the names of all common tool call interfaces in the MCP protocol system and their corresponding parameter definition templates. The parameter definition templates include the input parameter names, data types and value ranges required by the MCP standard tools.
[0053] Based on the word vector model, the capability name string is converted into a capability semantic vector, and each standard tool name in the MCP standard tool name library is converted into a standard semantic vector;
[0054] Based on cosine similarity, obtain the cosine similarity between the capability semantic vector and each standard semantic vector;
[0055] The standard tool with the highest cosine similarity and greater than the preset matching threshold is used as the matching tool. If there is no standard tool with cosine similarity greater than the preset matching threshold, the capability is marked as requiring manual mapping.
[0056] Based on the parameter definition template of the matching tool, extract the required parameter names and data types;
[0057] Calculate the string similarity between each parameter name in the parameter list and the parameter name in the parameter definition template, and obtain the corresponding parameter mapping coefficient;
[0058] Based on the parameter mapping coefficients, the range of mapped parameter values is constrained according to the original parameter range data;
[0059] Combine the capability name string with the corresponding matching tool, parameter mapping coefficient, and constraint conditions to generate an MCP tool mapping entry;
[0060] Summarize the MCP tool mapping entries corresponding to all executable capabilities in the executable capability list to form an MCP instruction conversion mapping table for heterogeneous devices corresponding to the executable capability list.
[0061] Preferably, the heterogeneous device control based on MCP semantic control instructions, MCP instruction conversion mapping table, and device action interlock combination table specifically includes:
[0062] Based on MCP semantic control instructions, the target device identifier and action identifier corresponding to each instruction are obtained to form an instruction action set;
[0063] Based on the device action interlock combination table, the instruction action set is traversed to determine whether there is a device action interlock. If so, the device action pair with interlock is taken as the feature action pair, and the heterogeneous device corresponding to the feature action pair is obtained.
[0064] Based on the heterogeneous device topology map, obtain the standard topology distance of the heterogeneous devices corresponding to the feature action pairs;
[0065] Based on the comprehensive capability weights of the heterogeneous devices corresponding to the feature action pairs, obtain the priority coefficient corresponding to each device action in the feature action pair;
[0066] Based on the equipment action interlock requirements, set distance thresholds and priority deviation thresholds;
[0067] Based on the distance threshold and priority deviation threshold, the MCP semantic control instructions are adjusted to obtain the instructions to be executed;
[0068] Based on the instruction to be executed, the native protocol message of the heterogeneous device is obtained using the MCP instruction conversion mapping table;
[0069] Control heterogeneous devices based on their native protocol messages.
[0070] Furthermore, a heterogeneous device control system based on AIAgent and MCP protocol is proposed to implement the control method described above, including:
[0071] The main control module is used to traverse the instruction action set according to the device action interlock combination table, determine whether there is a device action interlock, deploy mutually isolated MCP protocol adaptation gateways for heterogeneous devices of each type of communication protocol according to the heterogeneous device communication protocol information, obtain the MCP instruction conversion mapping table corresponding to each heterogeneous device according to the MCP protocol adaptation gateway, obtain the native protocol message of the heterogeneous device according to the instruction to be executed based on the MCP instruction conversion mapping table, and control the heterogeneous device.
[0072] The information acquisition module is used to acquire heterogeneous device information, acquire the physical connection relationship and logical dependency relationship between different heterogeneous devices based on the heterogeneous device information, acquire natural language instruction information, and obtain the corresponding MCP semantic control instruction based on AI Agent.
[0073] The topology analysis module is used to construct a heterogeneous device topology diagram based on the corresponding physical connection relationships and logical dependencies between heterogeneous devices, and to obtain a device action interlock combination table based on the topology association analysis according to the heterogeneous device topology diagram.
[0074] The display module interacts with the main control module and is used to output and display heterogeneous device information, device action interlock combination table, MCP instruction conversion mapping table, natural language instruction information and MCP semantic control instructions.
[0075] Optionally, the main control module specifically includes:
[0076] The control unit is configured to deploy mutually isolated MCP protocol adaptation gateways for heterogeneous devices with different communication protocols according to the heterogeneous device communication protocol information, obtain the MCP instruction conversion mapping table corresponding to each heterogeneous device based on the device parameter information according to the MCP protocol adaptation gateway, obtain the native protocol message of the heterogeneous device according to the instruction to be executed based on the MCP instruction conversion mapping table, and control the heterogeneous device according to the native protocol message of the heterogeneous device.
[0077] An information receiving unit interacts with an information acquisition module and a topology analysis module to receive data and transmit it to an interlock identification unit.
[0078] An interlock identification unit is used to traverse the instruction action set according to the device action interlock combination table, determine whether there is a device action interlock, and if so, adjust the MCP semantic control instruction to obtain the instruction to be executed.
[0079] Optionally, the information acquisition module specifically includes:
[0080] The first acquisition unit is used to acquire heterogeneous device information and, based on the heterogeneous device information, acquire the corresponding physical connection relationship and logical dependency relationship between different heterogeneous devices.
[0081] The second acquisition unit is used to acquire natural language instruction information and obtain the corresponding MCP semantic control instructions based on the AI Agent.
[0082] Optionally, the topology analysis module specifically includes:
[0083] A topology building unit is used to construct a heterogeneous device topology diagram based on the corresponding physical connection relationships and logical dependencies between heterogeneous devices.
[0084] The topology analysis unit is used to obtain the device action interlock combination table based on the topology diagram of heterogeneous devices and topology association analysis.
[0085] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0086] This invention proposes a heterogeneous device control method and system based on AIAgent and MCP protocol. Through a heterogeneous device topology diagram, it achieves accurate quantitative modeling of coupling strength, energy flow direction and interaction attributes between devices. Through a device action interlock combination table, it achieves pre-identification and rule-based accumulation of device linkage risks. Through an MCP instruction conversion mapping table, it achieves unified adaptation and conversion of multiple native protocols to the MCP standard interface. Through pre-verification of interlock rules combined with a dynamic instruction adjustment mechanism based on topology distance and priority coefficient, it converts compliant instructions into device native protocol messages for execution, realizing a safe closed loop and accurate implementation of multi-device collaborative control, and avoiding the impact of cross-protocol action conflicts. Attached Figure Description
[0087] Figure 1 This is a flowchart of a heterogeneous device control method based on AIAgent and MCP protocol proposed in this invention;
[0088] Figure 2 This is a flowchart of the process for obtaining the heterogeneous device topology diagram in this invention;
[0089] Figure 3 This is a flowchart of the process for obtaining the equipment action interlock combination table in this invention;
[0090] Figure 4 This is a flowchart of the process for obtaining the MCP instruction conversion mapping table in this invention;
[0091] Figure 5 This is a block diagram of a heterogeneous device control system based on AIAgent and MCP protocol proposed in this invention. Detailed Implementation
[0092] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.
[0093] Reference Figure 1 - Figure 4 As shown in the figure, a heterogeneous device control method based on AIAgent and MCP protocol in an embodiment of the present invention includes:
[0094] Obtain heterogeneous device information, which includes heterogeneous device communication protocol information and device parameter information;
[0095] Based on heterogeneous device information, obtain the corresponding physical connection relationships and logical dependencies between different heterogeneous devices;
[0096] Based on the physical connections and logical dependencies between heterogeneous devices, a heterogeneous device topology diagram is constructed.
[0097] Specifically, the construction of a heterogeneous device topology diagram based on the corresponding physical connection relationships and logical dependencies between heterogeneous devices includes:
[0098] Based on the heterogeneous device information, each heterogeneous device is treated as a topology node, and the topology node information is obtained.
[0099] Based on the topology node information, and on the basis of the physical connection relationships and logical dependencies between heterogeneous devices, topology edges are constructed.
[0100] If two topological nodes are physically connected but have no logical dependency, then an undirected edge is constructed between the topological nodes.
[0101] If there is a logical dependency between two topological nodes, a directed edge is constructed between the topological nodes, and the direction of the edge indicates the flow of materials, energy or information.
[0102] Based on the physical connection and logical dependency relationships between heterogeneous devices, obtain the response time and coupling type identifier of the two heterogeneous devices corresponding to the topological edge;
[0103] Based on response time and coupling type identifier, obtain the initial weights corresponding to the topological edges;
[0104] The edge weights are obtained by normalizing the edges based on their initial weights.
[0105] Construct a heterogeneous device topology graph based on topology node information, topology edges, and corresponding edge weights.
[0106] In this scheme, each heterogeneous device is abstracted as a standardized topology node. Undirected and directed topology edges are constructed based on physical connections and logical dependencies, and the flow of materials, energy, and information is labeled. This achieves structured differentiation and modeling of upstream and downstream dependencies and physical links, providing a clear link association foundation for subsequent upstream and downstream action matching and interlock action identification. Initial weights are calculated by collecting device response times and coupling type identifiers, and after normalization, topology edge weights with unified dimensions are obtained, enabling a quantifiable representation of the tightness of coupling between devices and providing a standardized numerical basis for calculating topology distance and action priority coefficients. A global heterogeneous device topology graph is constructed by integrating topology nodes, categorized topology edges, and normalized edge weights, achieving a complete and unified characterization of the interaction relationships of all heterogeneous devices. This provides comprehensive global topology support for topology association analysis and the generation of device action interlock combination tables.
[0107] In this embodiment, the initial weights corresponding to the topology edges are obtained by using the response time (in milliseconds) and the coupling type identifier. The value of the coupling type identifier is preset according to the connection medium as follows: rigid mechanical connection = 1, fluid pipeline connection = 2, electrical hardwired = 3, fieldbus communication = 4, Ethernet communication = 5.
[0108] For each topological edge, calculate its initial weight:
[0109]
[0110] In the formula, Indicates the first The original weights of the topological edges, Indicates heterogeneous devices Response time Indicates heterogeneous devices Response time Used as a reference delay baseline value;
[0111] The initial weights are min-max normalized to obtain the standardized edge weights.
[0112] Based on the heterogeneous equipment topology diagram, and using topology correlation analysis, obtain the equipment action interlock combination table;
[0113] Specifically, based on the heterogeneous device topology diagram and topology correlation analysis, a device action interlock combination table is obtained, which includes:
[0114] Based on the heterogeneous device topology graph, obtain the set of device nodes and the set of topology edges;
[0115] Specifically, for each directed edge in the topological edge set, the upstream and downstream devices are determined;
[0116] Based on the upstream and downstream equipment, determine the executable actions corresponding to the equipment;
[0117] For any action of an upstream device and any action of a downstream device, a device matching action group is constructed, wherein the device matching action group includes the actions of the upstream device and the actions of the downstream device.
[0118] Based on the device matching action group, obtain the output resource identifier and output parameter definition of the upstream device action and the input resource identifier and input parameter definition of the downstream device action;
[0119] Based on the output parameter definition and the input parameter definition, obtain the maximum output rate of the upstream equipment action and the maximum consumption rate of the downstream equipment action allowed in the task instruction;
[0120] The maximum output rate and the maximum consumption rate are used to determine whether an interlocking action is constituted. If the maximum consumption rate exceeds the maximum output rate, the equipment matching action group is determined to constitute an interlocking action pair.
[0121] For each undirected edge in the topological edge set, obtain the device matching action group of the heterogeneous device corresponding to the undirected edge and the resource identifier or status field corresponding to each executable action, and construct the capability-resource association matrix;
[0122] If the device matches the action group and it acts on the same resource and causes a conflict in the state of the resource, then the action pair is determined to be an interlocked action pair.
[0123] Traverse all device matching action groups and their actions, and summarize them to obtain the device action interlock combination table.
[0124] This solution decomposes the node set and directed / undirected topological edges of the topology graph, distinguishes between upstream and downstream cascaded devices and peer-to-peer interconnected devices, and constructs corresponding matching action groups. This achieves hierarchical decomposition of heterogeneous device linkage behavior, providing a link segmentation basis for identifying action interlock risks in different scenarios. By extracting the output and input resource identifiers and production / consumption rate parameters of upstream and downstream devices, and comparing the maximum output and maximum consumption rates, capacity-related interlock action pairs are determined, enabling accurate quantitative identification of supply and demand imbalances and conflicts in material and energy transmission links. By constructing a capability resource association matrix for peer-to-peer devices with undirected edges, preemptive interlock action pairs are determined based on shared resource state conflicts, achieving complete capture of linkage risks related to resource contention. By traversing all matching action pairs in the links, rate conflict and resource conflict interlock relationships are summarized to generate a standardized device action interlock combination table, achieving unified accumulation of device linkage risk rules across all scenarios, providing a complete judgment basis for subsequent control command verification and conflict resolution. By designing differentiated interlocking judgment logic for directed cascading and undirected peer-to-peer links, the system covers all device linkage risks under different topologies, avoiding the shortcomings of traditional solutions such as missing link differentiation and one-sided omissions in interlocking identification, and ensuring the stability and security of multi-device collaborative control processes.
[0125] It is understandable that the executable action corresponding to the device refers to the action corresponding to the executable capability in the protocol capability descriptor of the device. For example, if the device has a cooling capability, then the executable action is cooling.
[0126] Specifically, based on the protocol capability descriptor, and according to the MCP protocol adaptation gateway, the MCP instruction conversion mapping table corresponding to each heterogeneous device is obtained, including:
[0127] Based on the protocol capability descriptor, extract the list of executable capabilities and the definition of status fields;
[0128] For each capability in the list of executable capabilities, obtain its capability name string and corresponding parameter list;
[0129] Based on the requirements of the MCP protocol, an MCP standard tool name library is obtained. The MCP standard tool name library includes the names of all common tool call interfaces in the MCP protocol system and their corresponding parameter definition templates. The parameter definition templates include the input parameter names, data types and value ranges required by the MCP standard tools.
[0130] Based on the word vector model, the capability name string is converted into a capability semantic vector, and each standard tool name in the MCP standard tool name library is converted into a standard semantic vector;
[0131] Based on cosine similarity, obtain the cosine similarity between the capability semantic vector and each standard semantic vector;
[0132] The standard tool with the highest cosine similarity and greater than the preset matching threshold is used as the matching tool. If there is no standard tool with cosine similarity greater than the preset matching threshold, the capability is marked as requiring manual mapping.
[0133] Based on the parameter definition template of the matching tool, extract the required parameter names and data types;
[0134] Calculate the string similarity between each parameter name in the parameter list and the parameter name in the parameter definition template, and obtain the corresponding parameter mapping coefficient;
[0135] Based on the parameter mapping coefficients, the range of mapped parameter values is constrained according to the original parameter range data;
[0136] Combine the capability name string with the corresponding matching tool, parameter mapping coefficient, and constraint conditions to generate an MCP tool mapping entry;
[0137] Summarize the MCP tool mapping entries corresponding to all executable capabilities in the executable capability list to form an MCP instruction conversion mapping table for heterogeneous devices corresponding to the executable capability list.
[0138] This solution extracts the native executable capabilities and status fields of devices from the protocol capability descriptor and introduces a unified MCP standard tool name library as the conversion benchmark. This establishes a benchmarking framework between the native functions of heterogeneous devices and the standardized MCP interfaces, providing a unified standard basis for automatic cross-protocol instruction conversion. Device capabilities and MCP standard tools are transformed into semantic vectors using a word vector model. Cosine similarity is then used to achieve automatic function matching, enabling automatic matching between device capabilities and standard MCP tools without human intervention. Parameter mapping coefficients are calculated using parameter string similarity, and the upper and lower limits of the converted parameters are constrained by the original parameter range of the device. This achieves precise constraint mapping between native device parameters and MCP standard parameters, preventing device anomalies caused by parameters exceeding limits after instruction conversion.
[0139] In this embodiment, the word vector model is the FastText model, the preset matching threshold is 0.75, and the parameter mapping coefficients are as follows:
[0140]
[0141] In the formula, Represents the parameter mapping coefficients. This represents the string representing the parameter name in the parameter list. This represents the parameter name string in the parameter definition template. This represents the Levenstein distance, which is the minimum number of editing operations (allowed operations are: inserting a character, deleting a character, and replacing a character) required to convert a device parameter name string into a standard tool parameter name string.
[0142] Based on the communication protocol information of heterogeneous devices, deploy mutually isolated MCP protocol adaptation gateways for each type of heterogeneous device with different communication protocols.
[0143] According to the MCP protocol adaptation gateway, based on the device parameter information, obtain the MCP instruction conversion mapping table corresponding to each heterogeneous device;
[0144] Specifically, based on the MCP protocol adaptation gateway and device parameter information, the MCP instruction conversion mapping table corresponding to each heterogeneous device is obtained, including:
[0145] Based on the connection established between the MCP protocol adapter gateway and heterogeneous devices, the original protocol messages of the devices are obtained.
[0146] Based on the original protocol messages of the device, the protocol type identifier and address model are identified. The address model represents the addressing method and data organization structure of the device in the underlying protocol.
[0147] Based on the protocol type identifier, obtain the protocol parsing template corresponding to the protocol type;
[0148] Based on the protocol parsing template and the original protocol message of the device, obtain the list of executable capabilities, status field definitions and parameter range raw data corresponding to the heterogeneous device. The parameter range raw data includes the upper limit and lower limit values of each device parameter.
[0149] Based on the original data of the parameter range, calculate the parameter boundary coefficient for each parameter corresponding to each executable capability;
[0150] The mean value of the parameter boundary coefficients of the equipment parameters corresponding to the heterogeneous equipment is used as the comprehensive capability weight of the heterogeneous equipment.
[0151] The protocol capability descriptor is obtained by combining the protocol type identifier, address model, list of executable capabilities, state field definition, parameter upper and lower limits, parameter boundary coefficients and comprehensive capability weights.
[0152] Based on the protocol capability descriptor, according to the MCP protocol adaptation gateway, obtain the MCP instruction conversion mapping table corresponding to each heterogeneous device;
[0153] Specifically, the parameter boundary coefficients are:
[0154]
[0155] In the formula, Indicates the first The parameter boundary coefficients of the equipment parameters, Indicates the first The upper limit of the parameters of this type of equipment, Indicates the first The lower limit of the parameters of this type of equipment. This is a correction item.
[0156] This solution collects raw device messages through an MCP-adaptive gateway, identifies protocol identifiers and underlying address models, and matches corresponding protocol parsing templates to achieve standardized parsing of underlying communication rules for heterogeneous devices. This provides the raw data foundation for the complete extraction of device capabilities and parameters. By parsing messages, it extracts executable capabilities, status fields, and parameter upper and lower limits, enabling a comprehensive digital analysis of the control functions of heterogeneous devices from different manufacturers, thus resolving the fragmented and inconsistent information barriers in device capability descriptions. Parameter boundary coefficients are calculated using parameter upper and lower limits, and the average value is used to obtain the device's comprehensive capability weight. This provides a quantitative representation of the device's adjustable range and control capability strength, offering a quantitative basis for subsequent interlock command priority calculations. By integrating protocol identifiers, addressing models, device capabilities, parameter boundaries, and comprehensive weights, a unified protocol capability descriptor is generated, constructing a standardized device capability metadata carrier and establishing a data interoperability channel between native devices and the MCP standard system.
[0157] Natural language instruction information is obtained, and based on the AI Agent, the corresponding MCP semantic control instruction is obtained. The MCP semantic control instruction includes the target device identifier, action identifier, and control parameters.
[0158] It is understandable that, based on natural language task instructions, the task semantic vector is obtained through a pre-trained language model;
[0159] Pre-trained language models can use bidirectional encoder models based on the Transformer architecture (such as the BERT model) to receive natural language task instruction strings and segment them into word sequences;
[0160] The input is fed into the forward propagation process of the language model to obtain the last layer of hidden state matrix.
[0161] Based on the [CLS] tag pooling strategy, the hidden vector corresponding to the first word is used as the task semantic vector;
[0162] The context semantic vector sequence of the most recent k rounds of interaction is obtained from the MCP context cache, and the context enhancement vector is obtained by attention weighted fusion. The task semantic vector and the context enhancement vector are concatenated to obtain the comprehensive task vector.
[0163] Specifically, the most recent k rounds of interaction are read from the MCP context cache, and each round of interaction contains a historical instruction or its corresponding task semantic vector;
[0164] A scaled dot product attention mechanism is employed, using the current task semantic vector as the query vector and the historical task semantic vector as the context vector, to calculate the similarity score between the query vector and each context vector:
[0165]
[0166] In the formula, Indicates the similarity score. For query vector, For context vectors, For model dimensions;
[0167] The similarity scores are normalized into attention weights using the softmax function;
[0168] The historical context vector is weighted and summed using attention weights to obtain the context enhancement vector;
[0169] Obtain the protocol capability descriptor for each device from the capability model library, extract the executable capability description text from it, and encode the text into a device function vector using the BERT model;
[0170] The functional matching degree between the task and each device is calculated based on the cosine similarity formula using the device function vector and the comprehensive task vector.
[0171] The device with the highest functional matching degree and exceeding the preset acceptance threshold is identified as the target device; if the highest matching degree is lower than the acceptance threshold, a clarification request is sent to the user.
[0172] Based on the MCP tool mapping table of the target device, select the corresponding MCP tool;
[0173] The natural language task instructions are subjected to entity recognition and intent slot filling to extract parameter entities and their values. The parameter boundaries are used to verify the validity of the parameter values, and values that exceed the boundaries are automatically corrected to the nearest boundary value.
[0174] The verified parameters are filled into the parameter slots of the MCP tool to form a sequence of MCP semantic control instructions;
[0175] Understandably, in this embodiment, the acceptance threshold is 0.6. This ensures that the AIAgent can automatically complete most explicit task-device matching while reliably identifying ambiguous instructions, promptly returning decision-making power to the user, and effectively avoiding the risk of misoperation caused by forcibly matching the wrong device. Converting natural language instructions into MCP protocol format instructions via the AIAgent is a well-known and conventional technique for those skilled in the art, and therefore will not be described in detail here.
[0176] Based on MCP semantic control instructions, MCP instruction conversion mapping table and device action interlock combination table, heterogeneous device control is realized.
[0177] Specifically, heterogeneous device control is achieved based on MCP semantic control instructions, MCP instruction conversion mapping tables, and device action interlock combination tables, including:
[0178] Based on MCP semantic control instructions, the target device identifier and action identifier corresponding to each instruction are obtained to form an instruction action set;
[0179] Based on the device action interlock combination table, the instruction action set is traversed to determine whether there is a device action interlock. If so, the device action pair with interlock is taken as the feature action pair, and the heterogeneous device corresponding to the feature action pair is obtained.
[0180] Based on the heterogeneous device topology map, obtain the standard topology distance of the heterogeneous devices corresponding to the feature action pairs;
[0181] Based on the comprehensive capability weights of the heterogeneous devices corresponding to the feature action pairs, obtain the priority coefficient corresponding to each device action in the feature action pair;
[0182] Based on the equipment action interlock requirements, set distance thresholds and priority deviation thresholds;
[0183] Based on the distance threshold and priority deviation threshold, the MCP semantic control instructions are adjusted to obtain the instructions to be executed;
[0184] Based on the instruction to be executed, the native protocol message of the heterogeneous device is obtained using the MCP instruction conversion mapping table;
[0185] Control heterogeneous devices based on their native protocol messages.
[0186] This solution extracts target device and action identifiers from MCP semantic control commands and organizes them into command action sets, enabling structured decomposition of multi-device parallel control tasks and providing a standardized data carrier for batch interlock risk verification. By matching pre-generated device action interlock combination tables and screening conflicting action pairs, it achieves pre-identification of risks such as multi-device resource contention and capacity imbalance. By retrieving standard distances from heterogeneous topology maps and calculating the priority coefficients of each action based on device comprehensive capability weights, it achieves a two-dimensional quantitative assessment of device spatial coupling and hardware adjustability, providing objective numerical basis for command selection under interlock conflicts. By configuring topology distance and priority deviation dual thresholds for hierarchical handling of interlock commands, it achieves intelligent command correction for different scenarios, balancing system operational safety and control execution efficiency.
[0187] In this embodiment, the distance threshold is 0.35. If it is less than 0.35, the coupling between the devices is extremely strong, and the risk of unlocking the interlock is extremely high. Therefore, strict interlocking or priority interlocking must be adopted. If there are buffer tanks, heat exchangers, or long pipelines in between, the physical response is delayed or can be isolated, and the conditions for automatic unlocking are met.
[0188] Extract the comprehensive capability weights of all devices in the system, calculate the standard deviation of their distribution, and use it as the priority deviation threshold. If the difference exceeds one standard deviation, it means that the high-priority device has a significant advantage in terms of security level and parameter boundary sensitivity, and the system can confidently and automatically select to execute the high-priority instruction.
[0189] The standard topology distance for heterogeneous devices is as follows:
[0190]
[0191] in, Represents standard topological distance. To represent heterogeneous devices and heterogeneous devices The shortest topological distance between heterogeneous devices and heterogeneous devices The sum of edge weights of the shortest topological path between them. This represents the maximum value of the shortest topological distance among all device pairs in the heterogeneous device topology graph. Represents a collection of heterogeneous devices;
[0192] Based on the comprehensive capability weights of the heterogeneous devices corresponding to the feature action pair, the priority coefficient corresponding to each device action in the feature action pair is obtained, specifically as follows:
[0193]
[0194] In the formula, This is the priority coefficient. The overall capability weight of heterogeneous devices, , It is understandable that the comprehensive capability weight is obtained by taking the average value of the boundary coefficients of all parameters of the equipment, which directly reflects the parameter adjustment margin, control safety level and functional authority level of the equipment, and is the core intrinsic basis for determining the priority of actions; while the standard topology distance only represents the degree of coupling between devices and is an external correction item for priority.
[0195] When adjusting MCP semantic control instructions based on distance and priority deviation thresholds, if the heterogeneous device corresponding to the feature action has a directed edge in the heterogeneous device topology graph:
[0196] If the standard topology distance does not exceed the distance threshold, and the difference in priority coefficients corresponding to each device action in the feature action pair does not exceed the priority deviation threshold, then discard the MCP semantic control instruction corresponding to the feature action pair and provide an interlock prompt to the user.
[0197] If the standard topology distance does not exceed the distance threshold, and the difference in priority coefficients corresponding to each device action in the feature action pair exceeds the priority deviation threshold, then the device action with the highest priority coefficient in the feature action pair is retained, and the device actions with lower scores are discarded.
[0198] If the standard topology distance exceeds the distance threshold, then query whether there is a device with unlocking capability on the path of the two heterogeneous devices corresponding to the connection feature action pair in the device topology association graph. If so, generate an unlocking MCP semantic control command and insert it between the original interlocking commands.
[0199] The unlocking action refers to changing the device state to a state that does not conflict with the downstream device action after the upstream device instruction in the original interlocking instruction. Therefore, the device with unlocking capability refers to the device and device action that are not interlocked with the two heterogeneous devices on the path of the connecting feature action pair in the device topology association diagram. If there is no interlock, an interlock prompt is given to the user.
[0200] If the heterogeneous device corresponding to the characteristic action pair has an undirected edge in the heterogeneous device topology graph, then:
[0201] If the standard topology distance does not exceed the distance threshold and the difference in priority coefficients corresponding to each device action in the feature action pair does not exceed the priority deviation threshold, or if the standard topology distance exceeds the distance threshold, or if the difference in priority coefficients corresponding to each device action in the feature action pair exceeds the priority deviation threshold, then the device action with the highest priority coefficient in the feature action pair is retained, and the device action with the lower score is discarded.
[0202] If the standard topology distance exceeds the distance threshold, then query whether there is a device with unlocking capability on the path of the two heterogeneous devices corresponding to the connection feature action pair in the device topology association graph. If so, generate an unlocking MCP semantic control instruction and insert it between the original interlock instructions.
[0203] It should be noted that the specific values of all the above parameters are a preferred embodiment of the present invention and do not constitute a limitation on the scope of protection of the present invention. The core of the present invention lies in accurately evaluating the device topology association, analyzing the device interlocking state corresponding to different topology association situations, and realizing the dynamic processing of interlocking of different device actions, rather than relying on a specific weight coefficient or threshold value. Under the technical concept of the present invention, those skilled in the art can obtain specific parameter values applicable to different scenarios without creative effort.
[0204] Reference Figure 5 As shown, further, combining the above-mentioned heterogeneous device control method based on AIAgent and MCP protocol, a heterogeneous device control system based on AIAgent and MCP protocol is proposed, including:
[0205] The main control module is used to traverse the instruction action set according to the device action interlock combination table, determine whether there is a device action interlock, deploy mutually isolated MCP protocol adaptation gateways for heterogeneous devices of each type of communication protocol according to the heterogeneous device communication protocol information, obtain the MCP instruction conversion mapping table corresponding to each heterogeneous device according to the MCP protocol adaptation gateway, obtain the native protocol message of the heterogeneous device according to the instruction to be executed based on the MCP instruction conversion mapping table, and control the heterogeneous device.
[0206] The information acquisition module is used to acquire heterogeneous device information, acquire the physical connection relationship and logical dependency relationship between different heterogeneous devices based on the heterogeneous device information, acquire natural language instruction information, and obtain the corresponding MCP semantic control instruction based on AI Agent.
[0207] The topology analysis module is used to construct a heterogeneous device topology diagram based on the corresponding physical connection relationships and logical dependencies between heterogeneous devices, and to obtain a device action interlock combination table based on the topology association analysis according to the heterogeneous device topology diagram.
[0208] The display module interacts with the main control module and is used to output and display heterogeneous device information, device action interlock combination table, MCP instruction conversion mapping table, natural language instruction information and MCP semantic control instructions.
[0209] The main control module specifically includes:
[0210] The control unit is configured to deploy mutually isolated MCP protocol adaptation gateways for heterogeneous devices with different communication protocols according to the heterogeneous device communication protocol information, obtain the MCP instruction conversion mapping table corresponding to each heterogeneous device based on the device parameter information according to the MCP protocol adaptation gateway, obtain the native protocol message of the heterogeneous device according to the instruction to be executed based on the MCP instruction conversion mapping table, and control the heterogeneous device according to the native protocol message of the heterogeneous device.
[0211] An information receiving unit interacts with an information acquisition module and a topology analysis module to receive data and transmit it to an interlock identification unit.
[0212] An interlock identification unit is used to traverse the instruction action set according to the device action interlock combination table, determine whether there is a device action interlock, and if so, adjust the MCP semantic control instruction to obtain the instruction to be executed.
[0213] The information acquisition module specifically includes:
[0214] The first acquisition unit is used to acquire heterogeneous device information and, based on the heterogeneous device information, acquire the corresponding physical connection relationship and logical dependency relationship between different heterogeneous devices.
[0215] The second acquisition unit is used to acquire natural language instruction information and obtain the corresponding MCP semantic control instructions based on the AI Agent.
[0216] The topology analysis module specifically includes:
[0217] A topology building unit is used to construct a heterogeneous device topology diagram based on the corresponding physical connection relationships and logical dependencies between heterogeneous devices.
[0218] The topology analysis unit is used to obtain the device action interlock combination table based on the topology diagram of heterogeneous devices and topology association analysis.
[0219] In summary, the advantages of this invention are as follows: Through a heterogeneous device topology diagram, it achieves precise quantitative modeling of coupling strength, energy flow, and interaction attributes between devices; through a device action interlock combination table, it achieves pre-identification and rule-based accumulation of device linkage risks; through an MCP instruction conversion mapping table, it achieves unified adaptation and conversion of multiple native protocols to the MCP standard interface; and through pre-verification of interlock rules combined with a dynamic instruction adjustment mechanism based on topology distance and priority coefficients, it converts compliant instructions into native device protocol messages for execution, achieving a secure closed loop and precise implementation of multi-device collaborative control, and avoiding the impact of cross-protocol action conflicts.
[0220] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.
Claims
1. A heterogeneous device control method based on AIAgent and MCP protocol, characterized in that, include: Obtain heterogeneous device information, which includes heterogeneous device communication protocol information and device parameter information; Based on heterogeneous device information, obtain the corresponding physical connection relationships and logical dependencies between different heterogeneous devices; Based on the physical connections and logical dependencies between heterogeneous devices, a heterogeneous device topology diagram is constructed. Based on the heterogeneous equipment topology diagram, and using topology correlation analysis, obtain the equipment action interlock combination table; Based on the communication protocol information of heterogeneous devices, deploy mutually isolated MCP protocol adaptation gateways for heterogeneous devices of each type of communication protocol. According to the MCP protocol adaptation gateway, based on the device parameter information, obtain the MCP instruction conversion mapping table corresponding to each heterogeneous device; Natural language instruction information is obtained, and based on the AI Agent, the corresponding MCP semantic control instruction is obtained. The MCP semantic control instruction includes the target device identifier, action identifier, and control parameters. Based on MCP semantic control instructions, MCP instruction conversion mapping table and device action interlock combination table, heterogeneous device control is realized.
2. The heterogeneous device control method based on AIAgent and MCP protocol according to claim 1, characterized in that, The construction of a heterogeneous device topology diagram based on the physical connections and logical dependencies between heterogeneous devices specifically includes: Based on the heterogeneous device information, each heterogeneous device is treated as a topology node, and the topology node information is obtained. Based on the topology node information, and on the basis of the physical connection relationships and logical dependencies between heterogeneous devices, topology edges are constructed. If two topological nodes are physically connected but have no logical dependency, then an undirected edge is constructed between the topological nodes. If there is a logical dependency between two topological nodes, a directed edge is constructed between the topological nodes, and the direction of the edge indicates the flow of materials, energy or information. Based on the physical connection and logical dependency relationships between heterogeneous devices, obtain the response time and coupling type identifier of the two heterogeneous devices corresponding to the topological edge; Based on response time and coupling type identifier, obtain the initial weights corresponding to the topological edges; The edge weights are obtained by normalizing the edges based on their initial weights. Construct a heterogeneous device topology graph based on topology node information, topology edges, and corresponding edge weights.
3. The heterogeneous device control method based on AIAgent and MCP protocol according to claim 2, characterized in that, The step of obtaining the equipment action interlock combination table based on the heterogeneous equipment topology diagram and topology association analysis specifically includes: Based on the heterogeneous device topology graph, obtain the set of device nodes and the set of topology edges; Specifically, for each directed edge in the topological edge set, the upstream and downstream devices are determined; Based on the upstream and downstream equipment, determine the executable actions corresponding to the equipment; For any action of an upstream device and any action of a downstream device, a device matching action group is constructed, wherein the device matching action group includes the actions of the upstream device and the actions of the downstream device. Based on the device matching action group, obtain the output resource identifier and output parameter definition of the upstream device action and the input resource identifier and input parameter definition of the downstream device action; Based on the output parameter definition and the input parameter definition, obtain the maximum output rate of the upstream equipment action and the maximum consumption rate of the downstream equipment action allowed in the task instruction; The maximum output rate and the maximum consumption rate are used to determine whether an interlocking action is constituted. If the maximum consumption rate exceeds the maximum output rate, the equipment matching action group is determined to constitute an interlocking action pair. For each undirected edge in the topological edge set, obtain the device matching action group of the heterogeneous device corresponding to the undirected edge and the resource identifier or status field corresponding to each executable action, and construct the capability-resource association matrix; If the device matches the action group and it acts on the same resource and causes a conflict in the state of the resource, then the action pair is determined to be an interlocked action pair. Traverse all device matching action groups and their actions, and summarize them to obtain the device action interlock combination table.
4. The heterogeneous device control method based on AIAgent and MCP protocol according to claim 3, characterized in that, The step of adapting the gateway according to the MCP protocol and obtaining the MCP instruction conversion mapping table corresponding to each heterogeneous device based on device parameter information specifically includes: Based on the connection established between the MCP protocol adapter gateway and heterogeneous devices, the original protocol messages of the devices are obtained. Based on the original protocol messages of the device, the protocol type identifier and address model are identified. The address model represents the addressing method and data organization structure of the device in the underlying protocol. Based on the protocol type identifier, obtain the protocol parsing template corresponding to the protocol type; Based on the protocol parsing template and the original protocol message of the device, obtain the list of executable capabilities, status field definitions and parameter range raw data corresponding to the heterogeneous device. The parameter range raw data includes the upper limit and lower limit values of each device parameter. Based on the original data of the parameter range, calculate the parameter boundary coefficient for each parameter corresponding to each executable capability; The mean value of the parameter boundary coefficients of the equipment parameters corresponding to the heterogeneous equipment is used as the comprehensive capability weight of the heterogeneous equipment. The protocol capability descriptor is obtained by combining the protocol type identifier, address model, list of executable capabilities, state field definition, parameter upper and lower limits, parameter boundary coefficients and comprehensive capability weights. Based on the protocol capability descriptor, the MCP protocol adaptation gateway is used to obtain the MCP instruction conversion mapping table for each heterogeneous device. Specifically, the parameter boundary coefficients are: In the formula, Indicates the first The parameter boundary coefficients of the equipment parameters, Indicates the first The upper limit of the parameters of this type of equipment, Indicates the first The lower limit of the parameters of this type of equipment. This is a correction item.
5. The heterogeneous device control method based on AIAgent and MCP protocol according to claim 4, characterized in that, The process of obtaining the MCP instruction conversion mapping table for each heterogeneous device based on the protocol capability descriptor and the MCP protocol adaptation gateway specifically includes: Based on the protocol capability descriptor, extract the list of executable capabilities and the definition of status fields; For each capability in the list of executable capabilities, obtain its capability name string and corresponding parameter list; Based on the requirements of the MCP protocol, an MCP standard tool name library is obtained. The MCP standard tool name library includes the names of all common tool call interfaces in the MCP protocol system and their corresponding parameter definition templates. The parameter definition templates include the input parameter names, data types and value ranges required by the MCP standard tools. Based on the word vector model, the capability name string is converted into a capability semantic vector, and each standard tool name in the MCP standard tool name library is converted into a standard semantic vector; Based on cosine similarity, obtain the cosine similarity between the capability semantic vector and each standard semantic vector; The standard tool with the highest cosine similarity and greater than the preset matching threshold is used as the matching tool. If there is no standard tool with cosine similarity greater than the preset matching threshold, the capability is marked as requiring manual mapping. Based on the parameter definition template of the matching tool, extract the required parameter names and data types; Calculate the string similarity between each parameter name in the parameter list and the parameter name in the parameter definition template, and obtain the corresponding parameter mapping coefficient; Based on the parameter mapping coefficients, the range of mapped parameter values is constrained according to the original parameter range data; Combine the capability name string with the corresponding matching tool, parameter mapping coefficient, and constraint conditions to generate an MCP tool mapping entry; Summarize the MCP tool mapping entries corresponding to all executable capabilities in the executable capability list to form an MCP instruction conversion mapping table for heterogeneous devices corresponding to the executable capability list.
6. The heterogeneous device control method based on AIAgent and MCP protocol according to claim 5, characterized in that, The control of heterogeneous devices based on MCP semantic control instructions, MCP instruction conversion mapping table, and device action interlock combination table specifically includes: Based on MCP semantic control instructions, the target device identifier and action identifier corresponding to each instruction are obtained to form an instruction action set; Based on the device action interlock combination table, the instruction action set is traversed to determine whether there is a device action interlock. If so, the device action pair with interlock is taken as the feature action pair, and the heterogeneous device corresponding to the feature action pair is obtained. Based on the heterogeneous device topology map, obtain the standard topology distance of the heterogeneous devices corresponding to the feature action pairs; Based on the comprehensive capability weights of the heterogeneous devices corresponding to the feature action pairs, obtain the priority coefficient corresponding to each device action in the feature action pair; Based on the equipment action interlock requirements, set distance thresholds and priority deviation thresholds; Based on the distance threshold and priority deviation threshold, the MCP semantic control instructions are adjusted to obtain the instructions to be executed; Based on the instruction to be executed, the native protocol message of the heterogeneous device is obtained using the MCP instruction conversion mapping table; Control heterogeneous devices based on their native protocol messages.
7. A heterogeneous device control system based on AIAgent and MCP protocol, used to implement the control method as described in any one of claims 1-6, characterized in that, include: The main control module is used to traverse the instruction action set according to the device action interlock combination table, determine whether there is a device action interlock, deploy mutually isolated MCP protocol adaptation gateways for heterogeneous devices of each type of communication protocol according to the heterogeneous device communication protocol information, obtain the MCP instruction conversion mapping table corresponding to each heterogeneous device according to the MCP protocol adaptation gateway, obtain the native protocol message of the heterogeneous device according to the instruction to be executed based on the MCP instruction conversion mapping table, and control the heterogeneous device. The information acquisition module is used to acquire heterogeneous device information, acquire the physical connection relationship and logical dependency relationship between different heterogeneous devices based on the heterogeneous device information, acquire natural language instruction information, and obtain the corresponding MCP semantic control instruction based on AIAgent. The topology analysis module is used to construct a heterogeneous device topology diagram based on the corresponding physical connection relationships and logical dependencies between heterogeneous devices, and to obtain a device action interlock combination table based on the topology association analysis according to the heterogeneous device topology diagram. The display module interacts with the main control module and is used to output and display heterogeneous device information, device action interlock combination table, MCP instruction conversion mapping table, natural language instruction information and MCP semantic control instructions.
8. A heterogeneous device control system based on AIAgent and MCP protocol according to claim 7, characterized in that, The main control module specifically includes: The control unit is configured to deploy mutually isolated MCP protocol adaptation gateways for heterogeneous devices with different communication protocols according to the heterogeneous device communication protocol information, obtain the MCP instruction conversion mapping table corresponding to each heterogeneous device based on the device parameter information according to the MCP protocol adaptation gateway, obtain the native protocol message of the heterogeneous device according to the instruction to be executed based on the MCP instruction conversion mapping table, and control the heterogeneous device according to the native protocol message of the heterogeneous device. An information receiving unit interacts with an information acquisition module and a topology analysis module to receive data and transmit it to an interlock identification unit. An interlock identification unit is used to traverse the instruction action set according to the device action interlock combination table, determine whether there is a device action interlock, and if so, adjust the MCP semantic control instruction to obtain the instruction to be executed.
9. A heterogeneous device control system based on AIAgent and MCP protocol according to claim 7, characterized in that, The information acquisition module specifically includes: The first acquisition unit is used to acquire heterogeneous device information and, based on the heterogeneous device information, acquire the corresponding physical connection relationship and logical dependency relationship between different heterogeneous devices. The second acquisition unit is used to acquire natural language instruction information and obtain the corresponding MCP semantic control instructions based on the AI Agent.
10. A heterogeneous device control system based on AIAgent and MCP protocol according to claim 7, characterized in that, The topology analysis module specifically includes: A topology building unit is used to construct a heterogeneous device topology diagram based on the corresponding physical connection relationships and logical dependencies between heterogeneous devices. The topology analysis unit is used to obtain the device action interlock combination table based on the topology diagram of heterogeneous devices and topology association analysis.
