A multi-device intelligent linkage control method based on self-description of internet of things devices

By generating standardized capability models through IoT device self-description protocols, the problems of long device expansion cycles and high maintenance costs are solved, enabling zero-code access and intelligent linkage control of multiple devices, reducing maintenance costs and improving the autonomous scheduling capabilities of devices.

CN123145288APending Publication Date: 2026-11-20GUANGDONG STAR SOURCE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611438932.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-16
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing smart home control solutions have long device expansion cycles, rely on central control nodes, require pre-programmed automation rules for cross-device linkage, cannot be autonomously reasoned and judged by artificial intelligence, and large language model tools cannot be dynamically expanded. The separation of device capabilities and tool definitions leads to high maintenance costs.

Method used

By generating standardized device capability models through IoT device self-description protocols, and generating large language models that can call tools to describe information, zero-code access and intelligent linkage control of multiple devices can be achieved.

Benefits of technology

It enables automatic exposure of device capabilities and registration of tools without manual intervention, supports dynamic deployment and hot-swapping of devices, reduces maintenance costs in heterogeneous multi-device scenarios, and empowers large language models with direct perception and autonomous scheduling capabilities of physical devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123145288A_ABST
    Figure CN123145288A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of Internet of Things and large language model interaction, and proposes a multi-device intelligent linkage control method based on Internet of Things device self-description, which comprises the following steps: obtaining and analyzing Internet of Things device self-description protocol data to generate a standardized device capability model; generating large language model callable tool description information containing tool input parameter structure and calling mapping relationship according to the model, and registering to the tool calling set; determining target tool calling information based on user control intent, and verifying in combination with the standardized device capability model; after verification, converting the target calling information into device executable control instructions according to the calling mapping relationship and sending. The present application realizes accurate calling and linkage control of large language model on heterogeneous Internet of Things devices, and improves the intelligent level and execution reliability of interaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet of Things (IoT) and large language model interaction technology, and in particular to a multi-device intelligent linkage control method based on IoT device self-description. Background Technology

[0002] Existing centralized control solutions for smart homes generally employ predefined device-driven models. Each new device requires manually written adaptation code to define its attributes, states, and control commands before it can be connected to the platform. This results in long device expansion cycles and reliance on fixed central control nodes; a failure of the central control node leads to complete loss of control over the entire house. Simultaneously, traditional voice assistants, based on predefined intent recognition, cannot understand open, complex commands, and cross-device interaction requires pre-programmed automation rules, preventing autonomous reasoning and judgment by artificial intelligence. Furthermore, while existing large language model tool invocation schemes allow the model to select predefined functions during inference, the tool list is fixed at dialogue initialization and cannot be dynamically expanded with new devices. Moreover, existing tool definitions are software-interface oriented, lacking a standardized mapping mechanism for physical IoT devices, and cannot coordinate execution in multi-device scenarios. Even with model context protocols, services and tools still need to be pre-implemented and defined on the server side; the device side does not directly participate in the generation of tool definitions, making it difficult to deploy complete services on resource-constrained embedded terminals. The common drawback of the above solutions is that the generation of tool definitions is separate from the actual capabilities of the devices, requiring manual bridging in the middle layer. This results in the tool definitions not being able to be automatically updated when device capabilities are expanded, and maintenance costs in heterogeneous multi-device scenarios increase linearly with the type of device, making it impossible to achieve true zero-code device access. Summary of the Invention

[0003] To address the aforementioned shortcomings, the present invention aims to propose a multi-device intelligent linkage control method based on IoT device self-description. This method aims to achieve zero-code access and multi-device intelligent linkage control by having IoT devices actively report structured self-description protocols and having the server automatically map and generate large language model callable tools.

[0004] To achieve this objective, the present invention adopts the following technical solution: A multi-device intelligent linkage control method based on IoT device self-description includes: S1: Obtain device self-description protocol data sent by the connected IoT devices; S2: Parse the device self-description protocol data and generate a standardized device capability model corresponding to the IoT device; S3: Generate large language model callable tool description information based on the standardized equipment capability model. The large language model callable tool description information includes the tool input parameter structure and the call mapping relationship corresponding to the IoT device control interface. S4: Register the description information of the callable tools of the large language model to the tool call set, and determine the target tool call information from the tool call set based on the user's control intent; S5: Verify the target tool call information according to the standardized equipment capability model; S6: If the target tool call information passes the verification, the target tool call information is converted into a device control command executable by the IoT device according to the call mapping relationship, and the device control command is sent to the corresponding IoT device.

[0005] Preferably, in step S1, the device self-description protocol data includes device name, device function description, readable attribute data, and callable method data; The readable attribute data includes attribute name, attribute meaning, attribute type, and current attribute value; the callable method data includes method name, method function description, and method parameters. When parsing the device self-description protocol data, the device status reading capability in the standardized device capability model is generated based on the readable attribute data, and the device control invocation capability in the standardized device capability model is generated based on the callable method data.

[0006] Preferably, step S3 includes: Based on the device status reading capability in the standardized device capability model, generate query tool description information corresponding to the readable attributes of IoT devices; Based on the device control invocation capabilities in the standardized device capability model, generate control tool description information corresponding to the methods that can be invoked by IoT devices; When generating the query tool description information and the control tool description information, the tool name is generated based on the device identifier, device name and corresponding attribute name or method name of the IoT device, and the device identifier is used as the prefix of the tool name to distinguish the tools corresponding to different IoT devices. Map the device function descriptions of IoT devices and their corresponding attribute meanings or method function descriptions to tool function descriptions; The method parameters of the callable method are mapped to the tool input parameter structure, and response template parameters that represent the response content for successful execution and the response content for failed execution are injected into the tool input parameter structure.

[0007] Preferably, after registering the large language model callable tool description information to the tool call set, the method further includes: Configure a tool type identifier for each tool in the tool call set, and establish a correspondence between the tool type identifier and the tool executor; When the target tool call information is received, the corresponding large language model callable tool description information is searched in the tool call set according to the tool name in the target tool call information, and the tool type identifier corresponding to the large language model callable tool description information is determined; Select the corresponding tool executor based on the tool type identifier; The tool name is reverse-parsed using the tool executor to determine the target IoT device and the target operation; The target tool call information is verified based on the online status and session identifier of the target IoT device; After the verification is passed, a device control command is constructed based on the call parameters in the target tool call information, and the device control command is sent to the target IoT device through the tool executor; Receive the execution result returned by the target IoT device, and generate a tool execution response based on the execution result and the response template parameters in the target tool call information.

[0008] Preferably, step S1 further includes performing registration status management on the IoT device, the registration status management including: Establish a device registration record corresponding to the IoT device. The device registration record includes device identifier, session identifier, device name, device connection reference, device self-description protocol data, standardized device capability model, device status cache, and device online status. The device registry is maintained according to the device registration record, and the device online status is set to online status when the IoT device is successfully connected and the device self-description protocol data is reported. When the IoT device is detected to be disconnected, the online status of the device is switched from the online status to the grace status, and the device status cache and the query tool description information corresponding to the IoT device are retained in the grace status. In the grace period, the device control command corresponding to the control tool description information corresponding to the IoT device is rejected, and the response to the query tool description information corresponding to the IoT device is cached based on the device status. If the IoT device reconnects before the grace period ends, the session identifier and device connection reference in the device registration record are updated, and the device online status is switched to the online status. If the IoT device does not reconnect before the end of the grace period, the device's online state is switched to offline state, and the large language model callable tool description information corresponding to the IoT device is removed from the tool call set.

[0009] Preferably, maintaining the device registry based on the device registration records includes: Set a tool version number for the tool call set, and update the tool version number when a new IoT device is added, when an IoT device switches from a grace state to an offline state, or when the device self-description protocol data changes; Before providing the tool call set to the large language model, obtain the local cache tool version number and compare the local cache tool version number with the tool version number; When the version number of the local caching tool matches the version number of the tool, the set of tool calls in the local cache is provided to the large language model; When the local caching tool version number is inconsistent with the tool version number, the tool call set is regenerated based on the device registration records in the device registry that are in an available state, and the tool call set of the local cache and the local caching tool version number are updated with the regenerated tool call set.

[0010] Preferably, step S6 includes: Based on the tool name in the target tool call information, the target IoT device and target operation are parsed from the tool name; Locate the device registration record corresponding to the target IoT device in the device registry; Based on the device online status and session identifier in the device registration record, the callability of the target IoT device is verified; When the target tool call information corresponds to the query tool description information, and the target IoT device is in an online or grace period state, the query result is generated based on the device status cache in the device registration record; When the target tool call information corresponds to the control tool description information, and the target IoT device is online and the session identifier verification is successful, the device connection reference in the device registration record is obtained, a device control command is constructed based on the target operation and the call parameters in the target tool call information, and the device control command is sent to the target IoT device through the device connection reference; When the target tool call information corresponds to the control tool description information, and the target IoT device is not online or the session identifier verification fails, the device control command will not be sent. The execution result is returned based on the query result or the execution feedback of the target IoT device to the device control command.

[0011] Preferably, it further includes dynamically injecting device topology information, including: Create a connection processing object for the connected IoT device and assign a session identifier to the IoT device; Receive the device self-description protocol data reported by the IoT device based on the session identifier; A descriptor object is created based on the device self-description protocol data, and the descriptor object is stored in the descriptor set corresponding to the IoT device; The standardized device capability model is generated based on the descriptor object, and the large language model callable tool description information is generated based on the standardized device capability model; Register the description information of the callable tools of the large language model to the tool manager cache as a tool collection, and register the device registration record of the Internet of Things device to the device registry; Based on the device name, online status, device status cache, and corresponding large language model callable tool description information of the registered IoT devices in the device registry, a device topology summary is generated. When a new IoT device is added, an IoT device is deregistered, or the device self-description protocol data changes, the device topology summary is updated, and the updated device topology summary is injected into the conversation prompt words of the large language model.

[0012] One of the above technical solutions has the following advantages or beneficial effects: This invention enables IoT terminals to proactively declare their capabilities by acquiring device self-description protocol data sent by access devices. This allows the server to perceive device attributes and control interfaces without manual coding or pre-registration. Subsequently, by parsing this protocol data, a standardized device capability model is generated, transforming the original descriptions of heterogeneous devices into a unified and structured capability expression, laying the foundation for subsequent automatic tool generation. Following this standardized model, a large language model callable tool description is generated, encapsulating device capabilities into a tool format conforming to the large language model function call specification. Simultaneously, by establishing a mapping relationship between tool input parameter structure and call functionality, the invention ensures that tool calls are consistent with physical devices. The invention achieves accurate correspondence between control interfaces; then, it registers tool description information to the tool call set, enabling the large language model to autonomously determine the target tool from a unified set based on user control intent, realizing intelligent mapping from open natural language commands to device operations; furthermore, it verifies the target tool call information through a standardized device capability model to prevent call mismatches caused by changes in device status or descriptor updates, ensuring the security and accuracy of command issuance; finally, after successful verification, it converts the target tool call information into executable device control commands for IoT devices based on the call mapping relationship and sends them to the corresponding devices, completing closed-loop control from understanding user intent to physical device execution. In summary, this invention fundamentally solves the defects of existing technologies where tool definition and actual device capabilities are separated, requiring manual bridging. It enables automatic capability exposure and tool registration during device access without any manual intervention, supports dynamic online and hot-swappable devices during system operation, significantly reduces maintenance costs in multi-device heterogeneous scenarios, and empowers the large language model with direct perception and autonomous scheduling capabilities for physical devices, achieving true zero-code device access and end-to-end intelligent linkage control. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0014] Figure 1 This is a flowchart of a multi-device intelligent linkage control method based on the self-description of Internet of Things devices provided in an embodiment of the present invention; Figure 2 This is a flowchart of the tool routing execution provided in an embodiment of the present invention; Figure 3 This is a flowchart of the device lifecycle management provided in an embodiment of the present invention. Figure 4 This is a flowchart of the execution process of the remote IoT actuator provided in an embodiment of the present invention. Detailed Implementation

[0015] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0016] In this invention, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0017] A method for intelligent linkage control of multiple devices based on the self-description of IoT devices, such as Figure 1 As shown, a preferred embodiment of the present invention includes: S1: Obtain device self-description protocol data sent by the connected IoT devices; It should be noted that IoT devices refer to physical terminal entities that have network communication modules and can connect to intelligent control servers, such as smart fans, smart speakers, and smart desk lamps. These devices establish data connections with the server via WiFi or Ethernet. Device self-description protocol data refers to structured data packets that IoT devices actively report to the server. These packets are used to declare the device's name, functional description, readable attributes, and callable methods. For example, the JSON format message reported by a smart fan contains attribute information such as power switch status, fan speed, and oscillation function, as well as the corresponding control methods. This data allows the server to understand the device's capability boundaries without prior knowledge of the device model.

[0018] Understandably, by acquiring the device self-description protocol data sent by the connected IoT devices, the server can automatically perceive and identify the capabilities of physical devices, avoiding the shortcomings of traditional solutions that rely on manual pre-writing of device drivers or adaptation code to identify new devices. This allows heterogeneous devices to report their capabilities without manual intervention, achieving the technical effect of plug-and-play devices and zero-code access.

[0019] S2: Parse the device self-description protocol data and generate a standardized device capability model corresponding to the IoT device; It should be noted that the standardized device capability model refers to the internal object formed after the device self-description protocol data is structured and parsed according to a unified standard. This object contains two types of information: device status reading capability and device control invocation capability. The device status reading capability corresponds to the readable attributes reported by the device, which is used to characterize the query interface for the device's current operating parameters. The device control invocation capability corresponds to the callable methods reported by the device, which is used to characterize the action command interface that the device can execute. For example, for a smart fan, the standardized device capability model records that the power attribute is of Boolean type, the fan speed attribute is of numerical type, and the fan speed setting method includes the gear parameter. This model serves as the unified semantic basis for subsequent tool generation and command conversion.

[0020] It is understandable that by parsing device self-description protocol data and generating standardized device capability models, the original custom descriptions of heterogeneous devices can be converted into a unified structured expression within the server. This avoids the problem of the server being unable to recognize devices from different manufacturers due to differences in description formats, thereby enabling subsequent tool generation and instruction mapping to have a unified semantic benchmark, achieving the technical effect of cross-vendor device compatibility processing and reducing the complexity of heterogeneous integration.

[0021] S3: Generate large language model callable tool description information based on the standardized equipment capability model. The large language model callable tool description information includes the tool input parameter structure and the call mapping relationship corresponding to the IoT device control interface. It should be noted that the description information of callable tools in the large language model refers to structured metadata that conforms to the function call specification of the large language model. It is used to enable the large language model to identify and select specific device operations during the inference process. The tool input parameter structure refers to a JSON Schema format object that defines the parameter name, parameter type, and parameter meaning required when the tool is called. For example, the tool for setting the wind speed requires a numeric parameter of type speed. The call mapping relationship refers to the association data that records the correspondence between the tool name and the physical control interface of the IoT device. For example, the tool remote_aabbccdd_smartfan_set_speed is mapped to the method for setting the wind speed of a smart fan with the device identifier AA:BB:CC:DD. This mapping relationship ensures that the logical tool selected by the large language model can be accurately converted into the actual control command of the physical device.

[0022] Understandably, by generating a large language model that can call tool description information based on a standardized device capability model, the hardware capabilities of physical devices can be encapsulated into semantic tools that the large language model can understand. This enables the large language model to directly perceive and call IoT devices based on natural language intent, avoiding the problem of decoupling the large language model tool list from physical devices in traditional solutions. As a result, open natural language commands can be directly mapped to specific device operations, achieving a seamless connection between natural language control and physical device execution.

[0023] S4: Register the description information of the callable tools of the large language model to the tool call set, and determine the target tool call information from the tool call set based on the user's control intent; It should be noted that the tool call set refers to the total set of available tool metadata maintained by the server, which includes descriptions of all callable tools corresponding to the large language model for all registered IoT devices, serving as the candidate range when the large language model selects tools; user control intent refers to the user's control needs for IoT devices expressed through natural language input, such as the user's voice input to adjust the bedroom fan speed to level two; target tool call information refers to the specific tool call scheme that the large language model infers and selects from the tool call set based on the user control intent, including the name of the selected tool and the parameter values ​​assigned for tool execution, such as the large language model selecting the remote_aabbccdd_smartfan_set_speed tool and assigning the speed parameter a value of 2.

[0024] It is understandable that by registering the description information of the callable tools of the large language model to the tool call set and determining the target tool call information based on the user's control intent, the dispersed device capabilities can be unified into a standardized tool library. This enables the large language model to autonomously reason and select the optimal combination of device operations based on open natural language instructions in a global perspective. This avoids the problem that traditional voice assistants cannot understand compound instructions due to the limited number of predefined intent slots, thus enabling complex linkage control in multi-device scenarios to complete the decision through a single reasoning.

[0025] S5: Verify the target tool call information according to the standardized equipment capability model; It should be noted that verification refers to the technical process by which the server verifies the legality, parameter type, and parameter range of the tool call based on a standardized device capability model before converting the target tool call information into physical device instructions. For example, for a wind speed setting tool, the verification process checks whether the input speed parameter is a numerical type and whether it falls within the range supported by the device. At the same time, it verifies whether the device corresponding to the target tool exists in the current registry. This verification mechanism is used to prevent the issuance of illegal instructions due to deviations in the generation of parameters from the large language model or changes in device status.

[0026] Understandably, by verifying the target tool call information based on the standardized equipment capability model, the legality constraints and security protection of the results generated by the large language model are achieved. This avoids the risk of parameter type errors, numerical out-of-bounds errors, or calls to offline equipment tools due to inference errors in the model, thereby ensuring that only call requests that conform to the actual capability boundaries of the equipment and that the target equipment is in an available state can enter the execution phase.

[0027] S6: If the target tool call information passes the verification, the target tool call information is converted into a device control command executable by the IoT device according to the call mapping relationship, and the device control command is sent to the corresponding IoT device.

[0028] It should be noted that device control commands refer to the underlying command messages that can be directly parsed and executed by IoT device hardware, formed by the server converting the target tool call information according to the call mapping relationship. For example, for a call to set the fan speed of a smart fan, the converted device control command is a JSON message containing the opcode set_speed and the parameter value 2. This message is sent to the target device through the device connection channel, and the device executes the corresponding hardware driver action after receiving it.

[0029] It is understandable that by converting the target tool call information into executable device control commands for IoT devices based on the call mapping relationship after verification, a closed-loop conversion is achieved from the abstract tool call of the large language model to the execution of the underlying actions of the physical device. This avoids the problem of calls not being implemented due to the separation of tool definition and actual device capabilities, so that the inference results of the large language model can directly drive the hardware device to complete the physical state change.

[0030] Preferably, in step S1, the device self-description protocol data includes device name, device function description, readable attribute data, and callable method data; The readable attribute data includes attribute name, attribute meaning, attribute type, and current attribute value; the callable method data includes method name, method function description, and method parameters. When parsing the device self-description protocol data, the device status reading capability in the standardized device capability model is generated based on the readable attribute data, and the device control invocation capability in the standardized device capability model is generated based on the callable method data.

[0031] It should be noted that device self-description protocol data refers to structured data packets proactively reported by IoT devices through a preset communication channel when connecting to the server. Encoded in JSON or XML format, it is used to fully declare the device's identity and capability boundaries to the server without manual intervention. The device name is a string used to identify the device type or instance, serving as a semantic anchor in the protocol data, enabling the server to recognize the device category. The device function description is a textual description of the device's overall purpose, used to provide semantic context for the large language model during subsequent tool generation. Readable attribute data is a set of state variables exposed by the device. The attribute name is a unique identifier for the state variable, the attribute meaning is a natural language description of the physical meaning of the state variable, the attribute type limits the data type of the state variable to Boolean, numeric, or string, and the current value of the attribute... The status variable is the real-time sampled value at the time of device reporting. The above attribute data together constitute the semantic basis of device status reading capability. Callable method data is the set of control interfaces exposed by the device. The method name is the unique identifier of the control interface, the method function description is the natural language description of the action performed by the interface, and the method parameters are the set of variables and their type definitions that need to be passed when calling the interface. The above method data together constitute the semantic basis of device control calling capability. The standardized device capability model is a unified data structure built by the server in memory. It is used to convert the reported data of heterogeneous devices into a standardized expression that is independent of the device manufacturer. The device status reading capability refers to the set of logical interfaces for obtaining real-time operating parameters from the device, and the device control calling capability refers to the set of logical interfaces for issuing action commands to the device. Together, they constitute a complete view of the server's understanding of the device capability boundary.

[0032] Understandably, by requiring the device self-description protocol data to include the device name, device function description, readable attribute data, and callable method data, IoT terminals can proactively declare the complete semantic information of their capabilities upon access, thus avoiding the shortcomings of traditional solutions where the server relies on predefined driver templates to identify devices. Furthermore, by mapping readable attribute data to device status reading capabilities and callable method data to device control calling capabilities, the original descriptions of heterogeneous devices are converted into a unified and standardized device capability model within the server. This establishes an automatic mapping channel from physical devices to digital semantic models during the device access phase, achieving the technical effect of eliminating device heterogeneity and realizing plug-and-play awareness.

[0033] For example, when a smart fan with device identification AA:BB:CC:DD connects to the system, the device self-description protocol data it reports via WebSocket is in JSON format. The device name is SmartFan, the device function description is that the bedroom smart fan supports three speed settings and oscillation control, and the readable attribute data includes an attribute named "power" (meaning power on / off status, boolean type, current value false) and an attribute named "speed" (meaning current fan speed setting, number type, current value 1). The callable method data includes a method named "t". The `turn_on` method, whose function description is to turn on the fan and whose method parameters are empty, and the `set_speed` method, whose function description is to set the fan speed level and whose method parameters include a numerical parameter named `speed`, of type `number`, and described as a speed level of 1 to 3, are used in the standardized device capability model generated after parsing by the server. The device status reading capability includes interfaces for reading real-time values ​​of the `power` and `speed` attributes, and the device control call capability includes the `turn_on` parameterless call interface and the `set_speed` single-parameter call interface. This allows the capability boundary of the fan to be completely mapped into a structured model that can be recognized by the server.

[0034] Preferably, step S3 includes: Based on the device status reading capability in the standardized device capability model, generate query tool description information corresponding to the readable attributes of IoT devices; Based on the device control invocation capabilities in the standardized device capability model, generate control tool description information corresponding to the methods that can be invoked by IoT devices; When generating the query tool description information and the control tool description information, the tool name is generated based on the device identifier, device name and corresponding attribute name or method name of the IoT device, and the device identifier is used as the prefix of the tool name to distinguish the tools corresponding to different IoT devices. Map the device function descriptions of IoT devices and their corresponding attribute meanings or method function descriptions to tool function descriptions; The method parameters of the callable method are mapped to the tool input parameter structure, and response template parameters that represent the response content for successful execution and the response content for failed execution are injected into the tool input parameter structure.

[0035] It should be noted that the query tool description information refers to structured metadata that conforms to the function call specification of the large language model, used to enable the large language model to recognize and invoke query operations on readable attributes of IoT devices. It typically includes a tool type declaration, tool name, and tool function description. The control tool description information also refers to structured metadata that conforms to the function call specification of the large language model, used to enable the large language model to recognize and invoke control operations on callable methods of IoT devices. The device identifier is a unique identifier assigned to an IoT device during manufacturing or access, such as a MAC address or a custom string. In tool name generation, it is used as a prefix to isolate the same-name capability of different devices in the global namespace, preventing tool name conflicts in multi-device scenarios. The tool name is an identifier string composed of the device identifier, device name, and attribute or method name concatenated according to deterministic rules. It needs to be cleaned to conform to the character specifications of the large language model for function names. The tool function description is natural language text formed by semantically fusing the device function description with the attribute meaning or method function description, used to describe the specific purpose and invocation scenario of the tool to the large language model. The tool input parameter structure uses JSON. The schema format defines the tool call input parameter specifications, including parameter name, parameter type, and parameter description. The response template parameter is a special field injected into the tool input parameter structure, including the response_success field representing the content of the successful execution response and the response_failure field representing the content of the failed execution response. Both are used to directly generate the response template by the large language model during the tool call phase, thereby avoiding secondary large language model inference after the tool is executed.

[0036] Understandably, by generating query tool descriptions based on device status reading capabilities and control tool descriptions based on device control call capabilities, the physical capabilities of IoT devices are automatically encapsulated into semantic tools understandable by the large language model. By incorporating device identifiers as prefixes into tool names and establishing independent namespaces for each device in the global tool registry, tool name conflicts arising from different devices defining the same descriptor name are avoided. By mapping device function descriptions and attribute meanings or method function descriptions to tool function descriptions, the large language model obtains sufficient semantic context when selecting tools. By mapping method parameters to tool input parameter structures and injecting response template parameters into them, the large language model can synchronously output natural language response templates of execution results when generating tool calls. This merges the secondary reasoning process after tool execution in traditional solutions into a single tool call, achieving the effects of reducing response latency and token consumption.

[0037] For example, for a smart fan with device identifier AA:BB:CC:DD and device name SmartFan, the server generates query tool description information based on the power attribute in its standardized device capability model. The tool name is remote_aabbccdd_get_smartfan_power, and the tool function description is to query the power switch status of the bedroom smart fan. The tool input parameter structure includes response_success and response_failure parameters of type string. Simultaneously, the server generates control tool description information based on the set_speed method. The tool name is remote_aabbccdd_smartfan_set_speed, and the tool function description is for the bedroom smart fan... The tool input parameter structure for setting wind speed levels includes a speed parameter of type number and response_success and response_failure parameters of type string. The description of the speed parameter is inherited from the descriptions of levels 1 to 3 in the method parameters. The required field contains speed, response_success, and response_failure, which means that the large language model must provide the wind speed value and the response templates for success and failure when calling the set_speed tool.

[0038] Preferably, after registering the large language model callable tool description information to the tool call set, the method further includes: Configure a tool type identifier for each tool in the tool call set, and establish a correspondence between the tool type identifier and the tool executor; When the target tool call information is received, the corresponding large language model callable tool description information is searched in the tool call set according to the tool name in the target tool call information, and the tool type identifier corresponding to the large language model callable tool description information is determined; Select the corresponding tool executor based on the tool type identifier; The tool name is reverse-parsed using the tool executor to determine the target IoT device and the target operation; The target tool call information is verified based on the online status and session identifier of the target IoT device; After the verification is passed, a device control command is constructed based on the call parameters in the target tool call information, and the device control command is sent to the target IoT device through the tool executor; Receive the execution result returned by the target IoT device, and generate a tool execution response based on the execution result and the response template parameters in the target tool call information.

[0039] It's important to note that the tool type identifier is an enumerated value used to distinguish the tool's source and execution path. For example, `DEVICE_IOT` indicates an IoT tool originating from a device-side self-describing protocol, while `SERVER_PLUGIN` indicates a tool originating from a server-side local plugin. This identifier enables the system to select the correct execution channel when heterogeneous tools coexist. The tool executor is a processing module that implements the specific tool type's invocation logic, such as a remote IoT executor. It is responsible for converting abstract tool calls into concrete physical actions or remote requests. Different tool type identifiers correspond to different executor instances. The target tool invocation information is a specific invocation scheme selected from the tool invocation set based on the user's control intent by the large language model, including the tool name and parameter assignments. Reverse parsing refers to extracting the target IoT device identifier and target operation from the tool name. The process employs a prefix matching algorithm instead of string splitting to avoid ambiguity caused by underscores in device or attribute names; the target IoT device is the physical terminal entity to which the tool call points; the target operation is the specific capability corresponding to the tool call, such as attribute query or method control; online status is the device connection status recorded in the device registry, including three values: online, grace period, and offline; the session identifier is a unique handle assigned by the server for each device connection, used to distinguish successive connection instances of the same device and prevent race conditions during disconnection and reconnection; the device control command is a low-level command message that can be directly parsed and executed by the IoT device hardware, converted by the server based on the call parameters and target operation; the tool execution response is the final reply text generated by the server after replacing placeholders based on the execution result returned by the device and the response template parameters.

[0040] Understandably, by configuring type identifiers for tools and establishing a mapping relationship with executors, the system can quickly route to the correct processing channel based on the tool's origin when it receives target tool call information. The executor performs reverse parsing of the tool name to accurately locate the target IoT device and target operation from the globally unique tool name, thus establishing a deterministic mapping from abstract tools to physical devices. By combining online status and session identifiers for dual verification, it ensures that only devices with stable connections and valid sessions can receive control commands, preventing commands from being sent to offline or disconnected devices. After successful verification, device control commands are constructed and sent, and then a tool execution response is generated based on the execution result and response template parameters. This allows a single tool call to complete a complete closed loop from intent parsing, device addressing, command execution to result feedback, thereby improving system security and reducing end-to-end latency.

[0041] For example, when the large language model generates target tool call information in response to a user command to adjust the bedroom fan speed to level two, with the tool name being remote_aabbccdd_smartfan_set_speed, parameters being speed=2, response_success=OK, adjusted to level {value}, and response_failure=Operation failed, please check device connection, the server finds the tool description information in the tool call set and determines its tool type identifier as DEVICE_IOT; the tool manager selects the DeviceIoTExecutor executor, which parses the target IoT device identifier as AA:BB:CC:DD and the target operation name as set_speed from the tool name through prefix matching; then it queries the device registry to confirm that the device is online and the session identifier matches the current registration record, thus passing the verification; the executor constructs the device control command as a JSON message {op: set_speed, args: {speed: 2}}, sent to the smart fan via WebSocket connection; after the fan executes successfully, it returns the result. The executor selects the response_success template, replaces the placeholder {value} with 2, and the generation tool executes the response, which has been adjusted to level 2 and returns it to the user.

[0042] like Figure 2 As shown, when the large language model initiates a tool call via function calling, the system first retrieves the corresponding tool description information from the tool call set based on the tool name to determine its tool type identifier; the tool manager selects the corresponding tool executor based on the type identifier; the executor performs reverse parsing of the tool name to determine the target IoT device and the target operation; subsequently, the system performs callability verification based on the target device's online status and session identifier; after the verification passes, the executor constructs the device control command based on the target operation and call parameters, and sends it to the target IoT device through the device connection reference; after the device completes the execution, it returns the execution result, and the executor generates a tool execution response based on the execution result and response template parameters, completing the entire routing execution closed loop.

[0043] Preferably, step S1 further includes performing registration status management on the IoT device, the registration status management including: Establish a device registration record corresponding to the IoT device. The device registration record includes device identifier, session identifier, device name, device connection reference, device self-description protocol data, standardized device capability model, device status cache, and device online status. The device registry is maintained according to the device registration record, and the device online status is set to online status when the IoT device is successfully connected and the device self-description protocol data is reported. When the IoT device is detected to be disconnected, the online status of the device is switched from the online status to the grace status, and the device status cache and the query tool description information corresponding to the IoT device are retained in the grace status. In the grace period, the device control command corresponding to the control tool description information corresponding to the IoT device is rejected, and the response to the query tool description information corresponding to the IoT device is cached based on the device status. If the IoT device reconnects before the grace period ends, the session identifier and device connection reference in the device registration record are updated, and the device online status is switched to the online status. If the IoT device does not reconnect before the end of the grace period, the device's online state is switched to offline state, and the large language model callable tool description information corresponding to the IoT device is removed from the tool call set.

[0044] It should be noted that the device registration record is a comprehensive data structure maintained by the server in memory for each access device, used to persist the device's full lifecycle information; the device connection reference is a channel handle held by the server for low-level communication with the device, such as a WebSocket connection object or an MQTT client instance, used for command issuance and data reception; the device registry is a global device index structure maintained by the server, with the device identifier as the key and the device registration record as the value, supporting concurrent and safe read and write operations; the device status cache is a snapshot of the latest device attribute values ​​saved by the server in memory, updated when the device actively reports attribute changes or the server actively queries the device status; the online status is a status variable representing the current connection availability of the device, with a value of online indicating that the device connection is stable and can accept query and control operations; the grace period status is a transitional state between online and offline, with its duration determined by a preset grace period of seconds, used to cover brief disconnections caused by network jitter or access point switching; the offline status represents a state where the device connection has failed and is unavailable, and after entering this state, device-related tools will be removed from the tool call set.

[0045] Understandably, by establishing device registration records that include device identifiers, session identifiers, device connection references, device self-description protocol data, standardized device capability models, device status caches, and online status, the server can maintain complete digital twin information of the devices. By setting the device status to online after a successful connection and completion of self-description protocol reporting, the device possesses complete query and control capabilities. By switching to a grace period when a connection loss is detected while retaining the device status cache and query tools, the system can still respond to query requests based on cached data during brief network fluctuations, while preventing uncontrollable operations on disconnected devices by rejecting control tool commands. By updating the session identifier and device connection reference when reconnecting before the grace period ends, the new connection can seamlessly replace the old connection and restore full capabilities. By switching to an offline state and removing tools when the grace period expires without reconnection, the tool list of the large language model is kept synchronized with the actual availability of physical devices, thereby improving the system's tolerance to network fluctuations and maintaining the stability of the tool list.

[0046] For example, when a smart fan with device identifier AA:BB:CC:DD disconnects its WebSocket connection due to a home router restart, the server detects the disconnection event, switches the fan's online status from online to a grace period, starts a 30-second offline timer, retains the fan's device status cache (power = false, speed = 1), and keeps its query tool `remote_aabbccdd_get_smartfan_power` in the tool call set. During this period, if the user queries the fan's current fan speed, the large language model calls the query tool, and the server uses the cached value `speed`. The system returns a query result of 1. When a user requests to turn off the fan, the large language model calls the control tool remote_aabbccdd_smartfan_turn_off. The server refuses to execute the control command because the device is in a grace period. After 15 seconds, the router recovers, the fan automatically reconnects, the server generates a new session identifier such as session_b, updates the device connection reference to the new WebSocket connection, and restores the online status to online. After that, control commands can be issued normally. If the fan does not reconnect within the 30-second grace period, the server switches its status to offline and removes all its tool description information from the tool call set.

[0047] like Figure 3As shown, this invention implements three-state lifecycle management for IoT devices: online, grace period, and offline. After a device successfully connects and completes self-describing protocol data reporting, it enters the online state. When a connection loss is detected, the device state switches from online to grace period, and an offline grace period timer is started. In this state, the device state cache and query tool description information are retained, but control commands corresponding to the control tool description information are rejected. If the device reconnects before the grace period ends, the session identifier and device connection reference in the device registration record are updated, restoring the online state. If the grace period expires without reconnection, the device switches to the offline state, and the description information of the large language model callable tools corresponding to the device is removed from the tool call set, thereby ensuring that the large language model tool list is synchronized with the actual availability of the physical device in real time.

[0048] Preferably, maintaining the device registry based on the device registration records includes: Set a tool version number for the tool call set, and update the tool version number when a new IoT device is added, when an IoT device switches from a grace state to an offline state, or when the device self-description protocol data changes; Before providing the tool call set to the large language model, obtain the local cache tool version number and compare the local cache tool version number with the tool version number; When the version number of the local caching tool matches the version number of the tool, the set of tool calls in the local cache is provided to the large language model; When the local caching tool version number is inconsistent with the tool version number, the tool call set is regenerated based on the device registration records in the device registry that are in an available state, and the tool call set of the local cache and the local caching tool version number are updated with the regenerated tool call set.

[0049] It should be noted that the tool version number is a global integer counter maintained by the server, used to represent the overall generation of the tool call set. Its initial value is zero, and it increments each time a capability change affecting the composition of the tool set occurs. The local cached tool version number is a cached copy version marker maintained locally by the tool provider or executor instance, used for consistency comparison with the server's global tool version number. The available status refers to the set of devices in the device registry whose online status is online or in a grace period. The tool description information of devices in these statuses should be included in the tool call set provided to the large language model. Regeneration refers to the process of traversing the registration records of all currently available devices, re-executing the tool description information generation process according to their standardized device capability models, and constructing a full tool list.

[0050] Understandably, by setting a global tool version number for the tool call set and updating this version number when a new device is added, a device switches from a grace period to an offline state, or the device's self-description protocol data changes, the system can accurately track when the tool set changes. By comparing the locally cached tool version number with the global tool version number before providing the tool call set to the large language model, the system can directly return the cached result when the tool set has not changed, avoiding the computational overhead of repeatedly traversing all devices and regenerating tool description information. When the version numbers are inconsistent, by regenerating the tool call set based on the available devices and updating the local cache, the large language model always obtains the latest tool list consistent with the current physical device availability. Thus, in the scenario of dynamic hot-plugging of devices, the time complexity of tool acquisition is optimized from a linear complexity related to the product of the number of devices and the number of attribute methods to a constant level, thereby improving system performance and reducing the waiting time of the large language model.

[0051] For example, suppose the system initially has 3 devices online, the global tool version number is 3, and the local cached tool version number of RemoteIoTExecutor is also 3. The cached tool call set contains 12 tool descriptions for these 3 devices. When a new robot vacuum cleaner is added, it reports self-describing protocol data after powering on and connecting. The server generates 4 new tool descriptions for it and adds them to the tool call set, then increments the global tool version number from 3 to 4. When the user initiates a dialogue request to the large language model again, RemoteIoTExecutor obtains the local cached tool version number 3, compares it with the global tool version number 4, finds an inconsistency, then it iterates through the 4 devices currently in an available state in the device registry, regenerates the full tool call set containing 16 tool descriptions, updates the local cached tool call set and the local cached tool version number to 4, and then provides the new tool call set to the large language model. If a dialogue request is initiated again in a short period of time, both the local cached tool version number and the global tool version number are 4, and the executor directly returns the cached 16 tool descriptions without needing to regenerate them.

[0052] Preferably, step S6 includes: Based on the tool name in the target tool call information, the target IoT device and target operation are parsed from the tool name; Locate the device registration record corresponding to the target IoT device in the device registry; Based on the device online status and session identifier in the device registration record, the callability of the target IoT device is verified; When the target tool call information corresponds to the query tool description information, and the target IoT device is in an online or grace period state, the query result is generated based on the device status cache in the device registration record; When the target tool call information corresponds to the control tool description information, and the target IoT device is online and the session identifier verification is successful, the device connection reference in the device registration record is obtained, a device control command is constructed based on the target operation and the call parameters in the target tool call information, and the device control command is sent to the target IoT device through the device connection reference; When the target tool call information corresponds to the control tool description information, and the target IoT device is not online or the session identifier verification fails, the device control command will not be sent. The execution result is returned based on the query result or the execution feedback of the target IoT device to the device control command.

[0053] Callability verification refers to the process by which the server checks and verifies whether the target device has the conditions to receive and execute the call before converting the target tool call information into physical device instructions. Query results refer to the data objects returned by the server when responding to query-type tool calls, the content of which comes from the device status cache in the device registration record or the real-time data transmitted back by the device. Execution feedback refers to the response message containing the execution status code and result payload returned by the IoT device to the server after receiving and executing the device control command. Refusal to send refers to the security mechanism by which the server terminates the command issuance process and returns an error response to the caller when the callability verification fails.

[0054] Understandably, by parsing the target IoT device and target operation from the tool name, the system can reconstruct the specific physical addressing information from the abstract tool call; by searching the registration record in the device registry and combining online status and session identifier for callability verification, the system can confirm whether the device currently has the conditions to execute before issuing the instruction, thereby preventing the sending of invalid instructions to offline or connected devices; when the target tool call information corresponds to a query tool and the device is online or in a grace period, the query results are generated directly based on the device status cache, ensuring the availability of the query service by providing the most recent known status even when the network is unstable or the device is in a grace period; when the target tool call information corresponds to a control tool and the device is online and the session identifier verification passes, the device control instruction is constructed and issued by obtaining the device connection reference, ensuring that the control instruction is accurately delivered to the currently valid connection; when the control tool call fails verification, sending is rejected to prevent uncontrolled operation, thereby implementing differentiated processing strategies based on the different security requirements of query and control.

[0055] Specifically, during the execution of step S6, the server first receives the target tool call information returned by the large language model, extracts the tool name string, and uses a prefix matching algorithm to compare the tool name with the known set of device identifiers in the device registry to parse out the device identifier and target operation name of the target IoT device. Subsequently, the server uses the device identifier as an index to retrieve the corresponding device registration record in the device registry, extracting the online status field and current session identifier field. If the tool name in the target tool call information contains the "get" prefix, it is determined that it corresponds to the query tool description information. At this point, regardless of whether the device is online or in a grace period, the server directly reads the device status cache in the device registration record and encapsulates the current attribute value in the cache as the query result. If the tool name in the target tool call information does not contain the "get" prefix, it is determined that it corresponds to the control tool description information. At this point, the server strictly verifies that the device's online status must be online and that the session identifier carried by the target tool call information or the session identifier in the context is completely identical to the session identifier in the registration record. Upon successful verification, the server retrieves the device connection reference from the registration record, constructs a device control command based on the target operation name and the specific values ​​in the call parameters, and sends the command to the target IoT device through the WebSocket or MQTT channel corresponding to the connection reference. If the device corresponding to the control tool is not online or the session identifier does not match, the server immediately refuses to send the device control command and returns a tool execution response containing the error reason. After the device completes execution, the server receives the execution feedback returned by the device. If it was a query operation, the query result is returned directly; if it was a control operation, the execution feedback is combined with the response template parameters in the target tool call information to generate the final execution result. In one implementation, for query tools, the server prioritizes issuing real-time query commands to obtain the latest status when the device is online, and only uses caching when the device is in a grace period. In another implementation, when constructing the device control command, the server performs type checking and range validation on the call parameters to ensure that the parameters conform to the definitions in the standardized device capability model.

[0056] For example, when the target tool's call information is named remote_aabbccdd_get_smartfan_power, and the parameters include response_success and response_failure, the server resolves the target IoT device identifier as AA:BB:CC:DD and the target operation name as get_power through prefix matching; it then finds the fan's registration record in the device registry, indicating its online status is in grace mode and its session identifier is session_old; since this tool is a query tool and the device is in grace mode, the server directly reads the current value of the power attribute (false) from the device status cache and generates a query... The server queries and returns the result. Subsequently, when the target tool's call information shows the tool name as remote_aabbccdd_smartfan_set_speed, and the parameters include speed=2, response_success, and response_failure, the server parses the target device identifier as AA:BB:CC:DD and the target operation as set_speed. At this time, the device registration record shows an online status and a session identifier of session_new, which matches the current connection session identifier, so the verification passes. The server obtains the WebSocket connection reference from the registration record, constructs a JSON-formatted device control command {method: set_speed, params:{speed: 2}}, and sends it to the smart fan through this connection reference. After the fan executes successfully, it returns an execution feedback {status:ok}, and the server selects the response_success template to generate the execution result. If the fan is offline or the session identifier is session_old, the server will refuse to send the control command and return a result indicating execution failure.

[0057] like Figure 4 As shown, the remote IoT actuator implements differentiated execution strategies based on the tool type when processing tool calls. For query tools, if the target IoT device is online or in a grace period, the actuator generates query results based on the device status cache in the device registration record, providing the most recent known status even if the device is in a grace period with unstable network. For control tools, the actuator strictly verifies that the target IoT device must be online and that the session identifier verification is successful. After successful verification, it obtains the device connection reference from the device registration record, constructs device control commands based on the target operation and call parameters, and sends them to the target device. If the device corresponding to the control tool is not online or the session identifier verification fails, the actuator refuses to send device control commands. This differentiated processing design maximizes the availability of the query service while ensuring the determinism of control operations.

[0058] Preferably, it further includes dynamically injecting device topology information, including: Create a connection processing object for the connected IoT device and assign a session identifier to the IoT device; Receive the device self-description protocol data reported by the IoT device based on the session identifier; A descriptor object is created based on the device self-description protocol data, and the descriptor object is stored in the descriptor set corresponding to the IoT device; The standardized device capability model is generated based on the descriptor object, and the large language model callable tool description information is generated based on the standardized device capability model; Register the description information of the callable tools of the large language model to the tool manager cache as a tool collection, and register the device registration record of the Internet of Things device to the device registry; Based on the device name, online status, device status cache, and corresponding large language model callable tool description information of the registered IoT devices in the device registry, a device topology summary is generated. When a new IoT device is added, an IoT device is deregistered, or the device self-description protocol data changes, the device topology summary is updated, and the updated device topology summary is injected into the conversation prompt words of the large language model.

[0059] It should be noted that the connection processing object is a session-level management entity created by the server for each connected IoT device, responsible for maintaining the communication context and lifecycle state between the device and the server; the descriptor object is a structured data entity instantiated in memory after parsing the device's self-description protocol data, containing the device's name, functional description, attribute set, and method set; the descriptor set is a container within the connection processing object used to store all descriptor objects for the device, supporting scenarios where the device reports multiple sets of descriptors; the tool manager cache is a centralized data structure in the server responsible for storing and managing all registered tool description information, providing interfaces for tool registration, querying, and deregistration; the device topology summary is a structured text description generated by the server based on the real-time status of currently registered devices, covering a list of device names, the online status of each device, key status cache values, and a list of available tools, used to provide a global device view to the large language model; and the conversation prompt is a system-level instruction text appended to the large language model's dialogue context, used to guide the large language model to understand the physical devices and their capability relationships involved in the current dialogue environment.

[0060] Understandably, by creating connection processing objects and assigning session identifiers to access devices, the server can establish a unique session binding with the device; by receiving device self-description protocol data reported based on the session identifier and creating descriptor objects and storing them in the descriptor set, device capabilities are given structured storage on the server; by generating standardized device capability models based on descriptor objects and further generating description information for large language model callable tools, device capabilities are encapsulated into model callable tools; by registering tools to the tool manager cache and adding device registration records to the device registry, the system forms a complete device management view; by generating a device topology summary containing device name, online status, status cache, and tool information based on the device registry, and updating the summary and injecting it with the large language model's session prompts when devices change, the large language model can obtain real-time panoramic information of all currently online devices before each inference, thus possessing the capabilities of device disambiguation, multi-device linkage inference, and status-aware responses.

[0061] For example, when the living room desktop robot device A, the bedroom lamp device B, and the living room air conditioner device C are connected to the system, the server creates connection processing objects for each of them and assigns session identifiers session_A, session_B, and session_C respectively. After receiving the self-describing protocol data reported by the three devices, the server creates corresponding descriptor objects and generates standardized device capability models, then registers their respective tool description information to the tool manager cache, and simultaneously creates device registration records and adds them to the device registry. The server generates a device topology summary based on the current registry, the content of which includes: Device A's name is DesktopRobot, online status is online, cached with no special attributes, tools include remote IoT tools for controlling B and C; Device B's name is BedroomLamp, online status is online, cached with power... The `false` tool includes tools for querying and controlling power; device C, named LivingRoomAC, is online with a cached temperature of 24; the tool includes tools for querying temperature and controlling the switch to set the temperature. This topology summary is injected into the conversation prompt of device A. When the user tells device A that they want to sleep, the large language model identifies the presence of the bedroom lamp and the living room air conditioner based on the topology summary, infers that the lamp needs to be turned off and the air conditioner needs to be put into sleep mode, and generates a power-off call for device B and a temperature setting call for device C, realizing cross-device linkage control. When device B disconnects due to network fluctuations and enters a grace period state, the server updates the online status of device B in the topology summary to a grace period state and re-injects the updated summary into the conversation prompt of device A, so that the large language model knows that the lamp may be temporarily offline.

[0062] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0063] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims

1. A multi-device intelligent linkage control method based on the self-description of Internet of Things (IoT) devices, characterized in that, include: S1: Obtain device self-description protocol data sent by the connected IoT devices; S2: Parse the device self-description protocol data and generate a standardized device capability model corresponding to the IoT device; S3: Generate large language model callable tool description information based on the standardized equipment capability model. The large language model callable tool description information includes the tool input parameter structure and the call mapping relationship corresponding to the IoT device control interface. S4: Register the description information of the callable tools of the large language model to the tool call set, and determine the target tool call information from the tool call set based on the user's control intent; S5: Verify the target tool call information according to the standardized equipment capability model; S6: If the target tool call information passes the verification, the target tool call information is converted into a device control command executable by the IoT device according to the call mapping relationship, and the device control command is sent to the corresponding IoT device.

2. The multi-device intelligent linkage control method based on IoT device self-description according to claim 1, characterized in that, In step S1, the device self-description protocol data includes device name, device function description, readable attribute data, and callable method data; The readable attribute data includes attribute name, attribute meaning, attribute type, and current attribute value; the callable method data includes method name, method function description, and method parameters. When parsing the device self-description protocol data, the device status reading capability in the standardized device capability model is generated based on the readable attribute data, and the device control invocation capability in the standardized device capability model is generated based on the callable method data.

3. The multi-device intelligent linkage control method based on IoT device self-description according to claim 1, characterized in that, Step S3 includes: Based on the device status reading capability in the standardized device capability model, generate query tool description information corresponding to the readable attributes of IoT devices; Based on the device control invocation capabilities in the standardized device capability model, generate control tool description information corresponding to the methods that can be invoked by IoT devices; When generating the query tool description information and the control tool description information, the tool name is generated based on the device identifier, device name and corresponding attribute name or method name of the IoT device, and the device identifier is used as the tool name prefix to distinguish the tools corresponding to different IoT devices. Map the device function descriptions of IoT devices and their corresponding attribute meanings or method function descriptions to tool function descriptions; The method parameters of the callable method are mapped to the tool input parameter structure, and response template parameters that represent the response content for successful execution and the response content for failed execution are injected into the tool input parameter structure.

4. The multi-device intelligent linkage control method based on IoT device self-description according to claim 1, characterized in that, After registering the large language model's callable tool description information to the tool call set, the following is also included: Configure a tool type identifier for each tool in the tool call set, and establish a correspondence between the tool type identifier and the tool executor; When the target tool call information is received, the corresponding large language model callable tool description information is searched in the tool call set according to the tool name in the target tool call information, and the tool type identifier corresponding to the large language model callable tool description information is determined; Select the corresponding tool executor based on the tool type identifier; The tool name is reverse-parsed using the tool executor to determine the target IoT device and the target operation; The target tool call information is verified based on the online status and session identifier of the target IoT device; After the verification is passed, a device control command is constructed based on the call parameters in the target tool call information, and the device control command is sent to the target IoT device through the tool executor; Receive the execution result returned by the target IoT device, and generate a tool execution response based on the execution result and the response template parameters in the target tool call information.

5. The multi-device intelligent linkage control method based on IoT device self-description according to claim 1, characterized in that, Step S1 further includes performing registration status management on the IoT device, the registration status management including: Establish a device registration record corresponding to the IoT device. The device registration record includes device identifier, session identifier, device name, device connection reference, device self-description protocol data, standardized device capability model, device status cache, and device online status. The device registry is maintained according to the device registration record, and the device online status is set to online status when the IoT device is successfully connected and the device self-description protocol data is reported. When the IoT device is detected to be disconnected, the online status of the device is switched from the online status to the grace status, and the device status cache and the query tool description information corresponding to the IoT device are retained in the grace status. In the grace period, the device control command corresponding to the control tool description information corresponding to the IoT device is rejected, and the response to the query tool description information corresponding to the IoT device is cached based on the device status. If the IoT device reconnects before the grace period ends, the session identifier and device connection reference in the device registration record are updated, and the device online status is switched to the online status. If the IoT device does not reconnect before the end of the grace period, the device's online state is switched to offline state, and the large language model callable tool description information corresponding to the IoT device is removed from the tool call set.

6. The multi-device intelligent linkage control method based on IoT device self-description according to claim 5, characterized in that, Maintaining the device registry based on the device registration records includes: Set a tool version number for the tool call set, and update the tool version number when a new IoT device is added, when an IoT device switches from a grace state to an offline state, or when the device self-description protocol data changes; Before providing the tool call set to the large language model, obtain the local cache tool version number and compare the local cache tool version number with the tool version number; When the version number of the local cache tool matches the version number of the tool, the set of tool calls in the local cache is provided to the large language model; When the local caching tool version number is inconsistent with the tool version number, the tool call set is regenerated based on the device registration records in the device registry that are in an available state, and the tool call set of the local cache and the local caching tool version number are updated with the regenerated tool call set.

7. The multi-device intelligent linkage control method based on IoT device self-description according to claim 1, characterized in that, Step S6 includes: Based on the tool name in the target tool call information, the target IoT device and target operation are parsed from the tool name; Locate the device registration record corresponding to the target IoT device in the device registry; Based on the device online status and session identifier in the device registration record, the callability of the target IoT device is verified; When the target tool call information corresponds to the query tool description information, and the target IoT device is in an online or grace period state, the query result is generated based on the device status cache in the device registration record; When the target tool call information corresponds to the control tool description information, and the target IoT device is online and the session identifier verification is successful, the device connection reference in the device registration record is obtained, a device control command is constructed based on the target operation and the call parameters in the target tool call information, and the device control command is sent to the target IoT device through the device connection reference; When the target tool call information corresponds to the control tool description information, and the target IoT device is not online or the session identifier verification fails, the device control command will not be sent. The execution result is returned based on the query result or the execution feedback of the target IoT device to the device control command.

8. The multi-device intelligent linkage control method based on IoT device self-description according to claim 1, characterized in that, It also includes the dynamic injection of device topology information, including: Create a connection processing object for the connected IoT device and assign a session identifier to the IoT device; Receive the device self-description protocol data reported by the IoT device based on the session identifier; A descriptor object is created based on the device self-description protocol data, and the descriptor object is stored in the descriptor set corresponding to the IoT device; The standardized device capability model is generated based on the descriptor object, and the large language model callable tool description information is generated based on the standardized device capability model; Register the description information of the callable tools of the large language model to the tool manager cache as a tool collection, and register the device registration record of the IoT device to the device registry; Based on the device name, online status, device status cache, and corresponding large language model callable tool description information of the registered IoT devices in the device registry, a device topology summary is generated. When a new IoT device is added, an IoT device is deregistered, or the device self-description protocol data changes, the device topology summary is updated, and the updated device topology summary is injected into the conversation prompt words of the large language model.