A method for connecting a device with an Internet of Things platform using a large language model

Through large language model and deep packet detection algorithm, network traffic data of IoT devices are automatically extracted and matched, and the device communication plug-in code is automatically generated, which solves the cumbersome and complex problems of the IoT platform equipment docking process, and realizes efficient and accurate device identification and automatic docking.

CN118509471BActive Publication Date: 2025-03-14SHENZHEN GEMDALE BUILDING ENG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410569498.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-09
Publication Date
2025-03-14
Estimated Expiration
2044-05-09

AI Technical Summary

Technical Problem

The docking process of existing IoT platform equipment is complicated and complex, requiring manual protocol interpretation, object model construction and code writing, resulting in high threshold, long time and high difficulty.

Method used

The large language model is used to combine the deep packet detection algorithm and the graph query algorithm to automatically extract the network traffic data of the IoT device, generate device description information, and match the target device parameters through graph query and the generative algorithm, and automatically generate device communication plug-in code to realize automatic docking between the device and the IoT platform.

Benefits of technology

It greatly reduces the need for manual participation, improves the efficiency and accuracy of equipment identification, simplifies the process of object model construction and communication plug-in generation, reduces the workload of developers in coding, improves development efficiency, and enhances the security and flexibility of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118509471B_ABST
    Figure CN118509471B_ABST
Patent Text Reader

Abstract

The present application relates to the field of data processing technology, and discloses a method for docking a device with an Internet of Things platform using a large language model. The method includes: collecting network traffic data of Internet of Things devices, extracting traffic fingerprints from the network traffic data, obtaining traffic fingerprint data, and constructing device description information based on the traffic fingerprint data; matching the traffic fingerprint data and device description information with the Internet of Things knowledge base to obtain target device parameters; defining device service attributes, and creating a physical model based on the device service attributes; matching the communication mode and device communication protocol to the physical model, inputting the communication mode and device communication protocol into the large language model to generate device communication plug-in code, and obtaining communication plug-in code; transmitting the communication plug-in code to the plug-in management unit to generate a device communication plug-in, and establishing the physical model and the device docking of the Internet of Things platform through the device communication plug-in. The present application improves the efficiency of docking between the device and the Internet of Things platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a method for connecting a device using a large language model with an Internet of Things platform. Background Art

[0002] With the rapid development of the Internet, information exchange between people has become very convenient, but the Internet is difficult to achieve direct connection and information exchange between objects. Driven by information technology and intelligent technology, the Internet of Things technology has emerged and the Internet of Things (IOT) platform has been born; through information sensing equipment, according to the agreed protocol, any object is connected to the network, and the data is uniformly collected on the Internet of Things platform for management and control, so that objects can exchange information and communicate, thus realizing intelligent identification, positioning, tracking, supervision and other functions.

[0003] At present, the Internet of Things (IOT) platform requires a series of tasks such as interpreting the device communication protocol, building a physical model, configuring physical model parameters, registering and establishing a connection with the device, authenticating the device and adapting the communication protocol, uploading and synchronizing data, managing and verifying data, etc. The traditional processing method requires manual processing of all work contents, which is very cumbersome and complicated and requires a huge amount of human workload. For example, in the work of interpreting the communication protocol and building a physical model, it is necessary to first read the communication protocol document and understand the definition and logical relationship expressed in the communication protocol document. Based on the understanding of the protocol document, for example, Java code is used to write the data encoding and decoding program. In the process, it is necessary to establish a connection with the device, authenticate, parse the device data, verify the data, and process the data, which all need to be hard-coded, and professional developers are required to write the code, resulting in problems such as high threshold, long time, and high difficulty. Summary of the invention

[0004] The present application provides a method for connecting a device to an Internet of Things platform using a large language model, which is used to improve the efficiency of connecting the device to the Internet of Things platform.

[0005] In a first aspect, the present application provides a method for connecting a device using a large language model to an Internet of Things platform, the method for connecting a device using a large language model to an Internet of Things platform comprising: collecting network traffic data of an Internet of Things device, extracting traffic fingerprints from the network traffic data using a deep packet inspection algorithm to obtain traffic fingerprint data, and constructing device description information according to the traffic fingerprint data;

[0006] Based on a preset large language model, the traffic fingerprint data and the device description information are matched with a preset IoT knowledge base through a graph query algorithm and a generative algorithm to obtain target device parameters;

[0007] Defining device service attributes on the IoT platform based on the target device parameters, and creating a thing model according to the device service attributes;

[0008] Matching the object model with a communication mode and a preset device communication protocol, and inputting the communication mode and the device communication protocol into a preset large language model to generate a device communication plug-in code, thereby obtaining a communication plug-in code;

[0009] The communication plug-in code is transmitted to the plug-in management unit of the Internet of Things platform to generate a device communication plug-in, and the object model is connected to the device of the Internet of Things platform through the device communication plug-in.

[0010] In combination with the first aspect, in a first implementation of the first aspect of the present application, the collecting of network traffic data of the IoT device, extracting traffic fingerprints from the network traffic data through a deep packet inspection algorithm to obtain traffic fingerprint data, and constructing device description information according to the traffic fingerprint data, including:

[0011] Collecting network traffic data of the IoT device, wherein the network traffic data includes a plurality of data packets;

[0012] Extracting data packet parameters from each data packet through the deep packet inspection algorithm to obtain data packet parameters of each data packet, wherein the data packet parameters include: data volume, transmission interval, and data transmission protocol;

[0013] Identify the port number of each data packet respectively to obtain the source port number and destination port number of each data packet;

[0014] Extracting features from the data packet parameters of each data packet respectively to obtain a data feature set of each data packet, wherein the data feature set includes: a data identifier and a control code;

[0015] Perform feature fusion on the data identifier and control code of each data packet respectively to obtain a fused feature vector of each data packet;

[0016] Performing hash value conversion on the fused feature vector of each data packet respectively to obtain the hash value of each data packet, performing weighted average on the hash value of each data packet to obtain a target hash value, and using the target hash value as the traffic fingerprint data;

[0017] The device description information is constructed according to the traffic fingerprint data.

[0018] In combination with the first aspect, in a second implementation of the first aspect of the present application, the traffic fingerprint data and the device description information are matched with a preset IoT knowledge base through a large language model to obtain target device parameters, including:

[0019] Perform parameter traversal on the device description information to obtain a traversal parameter set, wherein the traversal parameter set includes: device type, device model, and device communication protocol;

[0020] Performing data protocol format matching on the traversal parameter set to obtain a target data protocol format;

[0021] Based on the target data protocol format, performing prompt word analysis on the traversal parameter set to obtain a first prompt word set;

[0022] Based on the target data protocol format, performing prompt word analysis on the traffic fingerprint data to obtain a second prompt word set;

[0023] The first prompt word set and the second prompt word set are respectively input into the large language model and the Internet of Things knowledge base for data matching to obtain the target device parameters.

[0024] In combination with the first aspect, in a third implementation of the first aspect of the present application, defining device service attributes on the Internet of Things platform based on the target device parameters, and creating a thing model according to the device service attributes, includes:

[0025] Parsing the target device parameters by using a natural semantic analysis algorithm to obtain a device support protocol and a device control protocol;

[0026] Perform service type matching based on the device support protocol and the device control protocol to obtain a target service type;

[0027] Constructing service parameters for the target service type to obtain a service parameter set, wherein the service parameter set includes: device operation time, device control mode, and device control index;

[0028] Defining the device service attribute based on the service parameter set, and extracting data from the device service attribute to obtain execution events, execution instructions, and instruction element information;

[0029] The object model is constructed through the execution event, the execution instruction and the instruction element information.

[0030] In combination with the first aspect, in a fourth implementation of the first aspect of the present application, matching the communication mode and the device communication protocol to the object model, and inputting the communication mode and the device communication protocol into a preset large language model to generate a device communication plug-in code to obtain the communication plug-in code, including:

[0031] Performing device simulation operation on the physical model and monitoring simulated communication behavior data in real time;

[0032] Matching the simulated communication behavior data with a communication mode to obtain the communication mode;

[0033] Performing communication node matching on the simulated communication behavior to obtain a corresponding communication node set;

[0034] Performing communication protocol matching on the communication node set to obtain the device communication protocol;

[0035] Inputting the communication mode and the device communication protocol into the large language model to perform context information extraction and semantic enhancement processing to obtain context information and semantic enhancement information;

[0036] Perform communication plug-in type matching based on the context information and the semantic enhancement information to obtain a target communication plug-in type;

[0037] Matching plug-in parameters according to the target communication plug-in type to obtain a plug-in parameter set, wherein the plug-in parameter set includes: functional domain parameters, plug-in state parameters, and plug-in operation parameters;

[0038] The communication plug-in code is generated based on the functional domain parameters, the plug-in state parameters, and the plug-in operation parameters.

[0039] In combination with the first aspect, in a fifth implementation of the first aspect of the present application, the transmitting of the communication plug-in code to the plug-in management unit of the Internet of Things platform to generate a device communication plug-in, and establishing the object model through the device communication plug-in to connect with the device of the Internet of Things platform includes:

[0040] Transmitting the communication plug-in code to the plug-in management unit of the Internet of Things platform for code integrity verification;

[0041] When the verification is passed, the communication plug-in code is packaged to obtain a plug-in container;

[0042] Performing dynamic dependency analysis on the plug-in container to obtain a code runtime library and code dependency data corresponding to the plug-in container;

[0043] Generate a sandbox execution environment based on the code runtime library and the code dependency data;

[0044] Based on the sandbox execution environment and the plug-in container, a device communication plug-in is generated through the code runtime and the code dependency data, and the object model is connected to the device of the Internet of Things platform through the device communication plug-in.

[0045] In combination with the first aspect, in a sixth implementation of the first aspect of the present application, based on the sandbox execution environment and the plug-in container, generating a device communication plug-in through the code runtime library and the code dependency data, and establishing the object model through the device communication plug-in and the device docking of the Internet of Things platform, including:

[0046] Based on the sandbox execution environment and the plug-in container, the code runtime library and the code dependent data plug-in configuration information are analyzed by a plug-in adaptive configuration algorithm to obtain target configuration information, wherein the target configuration information includes: message queue length and retry strategy;

[0047] Activate the device communication plug-in based on the message queue length and the retry strategy, and register the device communication plug-in to the Internet of Things platform;

[0048] The communication link of the device communication plug-in is verified, and when the verification is passed, the device communication plug-in is used to establish the connection between the object model and the device of the Internet of Things platform.

[0049] In a second aspect, the present application provides a device for connecting a device using a large language model to an Internet of Things platform, wherein the device for connecting a device using a large language model to an Internet of Things platform comprises:

[0050] A collection module is used to collect network traffic data of IoT devices, extract traffic fingerprints from the network traffic data through a deep packet inspection algorithm to obtain traffic fingerprint data, and construct device description information based on the traffic fingerprint data;

[0051] A matching module, for matching the traffic fingerprint data and the device description information with a preset IoT knowledge base through a graph query algorithm and a generative algorithm based on a preset large language model to obtain target device parameters;

[0052] A creation module, used to define device service attributes on the Internet of Things platform based on the target device parameters, and create a thing model according to the device service attributes;

[0053] A generation module, used for matching the communication mode and the preset device communication protocol to the object model, and inputting the communication mode and the device communication protocol into a preset large language model to generate a device communication plug-in code, thereby obtaining a communication plug-in code;

[0054] The docking module is used to transmit the communication plug-in code to the plug-in management unit of the Internet of Things platform to generate a device communication plug-in, and establish the device docking between the object model and the device of the Internet of Things platform through the device communication plug-in.

[0055] The third aspect of the present application provides a device for docking a device using a large language model with an Internet of Things platform, comprising: a memory and at least one processor, wherein instructions are stored in the memory; the at least one processor calls the instructions in the memory so that the docking device using the large language model executes the above-mentioned method for docking a device using a large language model with an Internet of Things platform.

[0056] A fourth aspect of the present application provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on a computer, the computer executes the above-mentioned method for connecting a device using a large language model with an Internet of Things platform.

[0057] In the technical solution provided by the present application, the network traffic data of the IoT device is automatically extracted by the deep packet inspection algorithm, and the device description information is generated by the large language model. This method reduces the need for manual participation and improves the efficiency and accuracy of device identification. The automation process ensures the comprehensive capture of device features, including those details that may be overlooked by manual operation. The extracted traffic fingerprint data and device description information are matched with the IoT knowledge base by the graph query algorithm and the generative algorithm, and the target device parameters can be identified efficiently and accurately. This process greatly enhances the accuracy of device identification and ensures the pertinence and effectiveness of the docking process. The process of automatically defining device service attributes and creating object models based on the target device parameters provides a flexible and efficient method for building object models. This not only speeds up the development cycle of the object model, but also ensures that the object model can accurately reflect the actual functions and requirements of the device. The large language model is used to automatically generate plug-in code that meets the requirements of specific communication methods and device communication protocols, which reduces the coding workload of developers and improves development efficiency. The automatically generated code complies with the latest programming specifications and security standards, reducing the risk of manual coding errors. The object model is connected to the device of the IoT platform through the automatically generated device communication plug-in, making the device docking process more flexible and extensible. The plug-in docking method facilitates the update and replacement of plug-ins, which helps to quickly adapt to the iterative upgrades of devices and platforms. In the process of generating device communication plug-ins, the latest security protocols and encryption technologies can be integrated to ensure the security of data transmission between devices and platforms. At the same time, the sandbox execution environment provides a secure and isolated operating environment for plug-ins, further enhancing the security of the entire system. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0059] Figure 1 A schematic diagram of an embodiment of a method for connecting a device with an Internet of Things platform using a large language model in an embodiment of the present application;

[0060] Figure 2 This is a schematic diagram of an embodiment of a device for connecting a device using a large language model with an Internet of Things platform in an embodiment of the present application. DETAILED DESCRIPTION

[0061] The embodiment of the present application provides a method for docking a device using a large language model with an Internet of Things platform. The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0062] For ease of understanding, the specific process of the embodiment of the present application is described below. Figure 1 In the embodiment of the present application, an embodiment of the method for connecting a device using a large language model with an Internet of Things platform includes:

[0063] Step S101: Collect network traffic data of IoT devices, extract traffic fingerprints from the network traffic data using a deep packet inspection algorithm to obtain traffic fingerprint data, and construct device description information based on the traffic fingerprint data;

[0064] Specifically, network traffic data of IoT devices is collected. These data usually include multiple data packets, each of which contains key transmission information. The collected data packets involve recording the details of each data transmission, such as the amount of data, the transmission interval, and the data transmission protocol used. The deep packet inspection algorithm is used to extract data packet parameters for each data packet. Data packet parameters are extracted from each data packet, including the amount of data, the transmission interval, and the data transmission protocol. These parameters can reflect the basic characteristics and transmission behavior of the data packet. The port number is identified for each data packet respectively, and the source port number and the destination port number of each data packet are obtained. The port number is a digital label used to identify the sender and the receiver in network communication, and is important information in network data flow analysis. The data packet parameters of each data packet are extracted separately to obtain the data feature set of each data packet. The data feature set usually includes a data identifier and a control code, which describe the specific content and control information of the data packet. The data identifier is used to identify the type or source of the data, while the control code indicates the processing method or status of the data packet. In order to more accurately characterize the uniqueness of each data packet, the algorithm performs feature fusion on the data identifier and control code of each data packet to generate a fused feature vector for each data packet. The fused feature vector is a high-level summary of the characteristics of the data packet, which can effectively represent the key information of the data packet. The fused feature vector of each data packet is converted into a hash value. Hash value conversion is a common technology that converts data into a fixed-length output through a hash function to obtain the hash value of each data packet. By calculating the hash value of each data packet and taking a weighted average of all hash values, a target hash value representing the overall network traffic characteristics is obtained. This target hash value is used as traffic fingerprint data for subsequent device description information construction.

[0065] It is understandable that the execution subject of the present application can be a device for connecting a device using a large language model with an IoT platform, or a terminal or a server, which is not specifically limited here. The present application embodiment is described by taking a server as the execution subject as an example.

[0066] Step S102: Based on the preset large language model, the traffic fingerprint data and device description information are matched with the preset IoT knowledge base through the graph query algorithm and the generative algorithm to obtain the target device parameters;

[0067] Specifically, the device description information, including the type, model, and communication protocol of the device, is first deeply analyzed through the large language model. The role of the large language model here is not only to parse the text, but more importantly, to understand and predict the characteristics and functions of the device, which can help define the device parameter nodes more accurately. Then, these model-processed device types, models, and communication protocols will be used to construct the first device parameter node. For example, if the device description is a smart temperature sensor, model T-100, using the MQTT protocol, then this information will be used to create a node containing these detailed specifications. This node will be connected to other nodes as an element in the graph to form a complex network for subsequent matching processes.

[0068] At the same time, traffic fingerprint data needs to be matched with behavioral patterns. Traffic fingerprint refers to the characteristics of the data flow from the device to the network. By analyzing this data, the behavioral pattern of the device, such as data transmission frequency, packet size, etc., can be obtained. At this time, the large language model can apply its natural language processing capabilities to convert unstructured traffic data into structured behavioral pattern descriptions, and further extract the behavioral characteristics of the device. For example, if a device frequently sends data at night, this may suggest that the device has a night monitoring function. After obtaining the device behavior characteristics, these characteristics are used to construct the second device parameter node. The device behavior feature node will form a complete target graph structure together with the first device parameter node. This graph structure is an information-rich network that contains the device's hardware specifications, software behaviors, and the relationships between them.

[0069] This target graph structure is input into the large language model, and the model will perform content matching based on the preset IoT knowledge base. The IoT knowledge base contains parameter information, historical data, and behavioral logic of various devices. The model uses this information to find and match the closest device parameters. Finally, the graph query algorithm is applied to conduct in-depth analysis of this graph structure to obtain the target device parameters. The graph query algorithm can efficiently process a large number of node and edge relationships to ensure that the most relevant information is extracted from a complex network. For example, consider a smart home control system in an IoT environment. A new device in the system shows high-frequency data transmission through its traffic fingerprint, indicating that it may be a security-related device. The device description information shows that it is a video surveillance device that uses Wi-Fi communication. Through the above process, this information can be accurately matched with similar devices in the knowledge base, and it is finally confirmed that this is a security monitoring device that requires high bandwidth and low latency, and appropriate network resources and security protocols are configured for it.

[0070] Step S103: Match the traffic fingerprint data and device description information with the preset IoT knowledge base through a large language model to obtain target device parameters;

[0071] Specifically, first clearly define the input data format. For example, traffic fingerprint data may contain features such as device type and traffic pattern, while device description information may contain details such as manufacturer, model, and version. Next, build a knowledge base containing various IoT device features and parameters. This knowledge base should record the characteristics of each device in detail, such as manufacturer, device type, supported technical specifications, typical usage scenarios, etc., so as to match with the input data. Use a large language model to analyze the input traffic fingerprint data and device description information. The model will identify and confirm the device parameters corresponding to the input data based on the information in the knowledge base by comparing the device type, manufacturer, and other relevant features. Once a match is successful, the model will extract specific parameters related to the identified device from the knowledge base and output these parameters. This may include functional specifications, operating requirements, compatibility information, etc. of the device. As time goes by and technology develops, the knowledge base is regularly updated to add new device information and parameters and delete outdated content. At the same time, based on the problems and feedback encountered in actual applications, the matching algorithm is continuously optimized to improve matching accuracy and efficiency.

[0072] Step S104: Match the communication mode and the preset device communication protocol to the object model, and input the communication mode and the device communication protocol into the preset large language model to generate the device communication plug-in code to obtain the communication plug-in code;

[0073] Specifically, the physical model is simulated and run to help understand the actual communication behavior of the device. During the simulation, the simulated communication behavior data is monitored in real time. These data capture the communication mode and behavior of the device in the assumed operating environment. By analyzing the simulated communication behavior data, the communication mode is matched to determine the communication mode of the device. The communication mode usually involves the content and purpose of the device data exchange, such as sensor data upload, status update notification, etc. It should be noted that in the embodiment of the present invention, the communication mode includes but is not limited to data reporting: the device periodically sends its status data to the server, such as the temperature sensor regularly uploads the temperature reading; remote control: the server sends control commands to the device, such as remotely turning the device on and off or adjusting the device settings; event notification: when the device detects a specific event (such as a motion sensor detects movement), the event is immediately reported to the server; state synchronization: after the device state changes, the latest state is automatically updated to the server to ensure that the server and the device state are consistent; configuration delivery: the server sends configuration updates to the device, such as changing the sampling frequency of the sensor; firmware upgrade: the device receives the incoming firmware update. Firmware update instructions and data from the server are used to fix known problems or improve performance; Subscription and publishing: The device subscribes to specific topics to receive related messages, and can also publish messages to these topics, which is suitable for interaction and data sharing between multiple devices; Heartbeat detection: Heartbeat packets are sent regularly to confirm the online status of the device and the stability of the network connection; Authorization and authentication: Before communication between the device and the server, security authentication is performed through means such as keys or certificates; Historical data access: Historical data stored in the device or server can be queried for analysis or backtracking; Fault diagnosis: When the device finds internal errors or problems, it automatically sends fault codes or logs to the server for remote diagnosis and maintenance; Multicast and broadcast: Send the same message to a group of devices for group control or status updates. Then, the simulated communication behavior is matched with communication nodes to identify the specific node sets involved in the communication, which represent components or modules related to the communication process inside or outside the device. According to the matched communication node set, the communication protocol is matched to determine the specific communication protocol used by the device, such as MQTT, CoAP, etc. These protocols define the format and specifications of device communication and are the key to ensuring the correct transmission of data. The communication mode and device communication protocol are input into the large language model for context information extraction and semantic enhancement processing to understand the intention and needs of device communication and obtain context information and enhanced semantic information. Based on the context information and semantic enhancement information obtained from the large language model, the communication plug-in type is matched to determine the plug-in type suitable for implementing the device communication needs, such as data synchronization plug-in, status monitoring plug-in, etc. After determining the communication plug-in type, the plug-in parameters are matched to obtain a plug-in parameter set including functional domain parameters, plug-in status parameters and plug-in operation parameters. These parameters collectively define the functional scope, operating status and operation mode of the plug-in.The communication plug-in code is generated based on the functional domain parameters, plug-in state parameters, and plug-in operation parameters. These codes implement functions customized according to the communication requirements of the device, ensuring that the device can interact with the IoT platform efficiently and securely through the newly generated communication plug-in.

[0074] Step S105: The communication plug-in code is transmitted to the plug-in management unit of the Internet of Things platform to generate a device communication plug-in, and a thing model is established through the device communication plug-in to connect with the device of the Internet of Things platform.

[0075] Specifically, the communication plug-in code is transmitted to the plug-in management unit of the Internet of Things platform for code integrity verification to ensure that the code is not damaged and remains intact during the transmission process. When the verification passes, the communication plug-in code is packaged to obtain a plug-in container. The plug-in container is a packaged execution environment that contains the communication plug-in code and various resources and settings required for its operation, so that the plug-in can run independently on the Internet of Things platform without affecting other system functions. Dynamic dependency analysis is performed on the plug-in container, and the code dependency in the plug-in container is analyzed to obtain the code runtime library and code dependency data corresponding to the plug-in container. The runtime library and data are the basis for the normal operation of the plug-in, including database access library, network communication library, etc. A sandbox execution environment is generated based on the code runtime library and code dependency data. The sandbox execution environment is a safe operating environment that can isolate the operation of the plug-in and prevent the plug-in behavior from causing unpredictable effects on other parts of the Internet of Things platform. In this environment, the plug-in can be safely loaded and run without affecting or being affected by other applications on the platform. Based on the sandbox execution environment and the plug-in container, a device communication plug-in is generated by using the code runtime library and code dependency data obtained in advance. And the device communication plug-in is used to establish a physical model and connect with the device of the Internet of Things platform. The device communication plug-in acts as an intermediary to ensure that the device data and control information can be safely and accurately transmitted to the IoT platform, realize the automation of device control and monitoring, and improve the efficiency and intelligence level of IoT device management.

[0076] Based on the sandbox execution environment and plug-in container, the plug-in adaptive configuration algorithm is used to analyze the code runtime library and code dependency data plug-in configuration information to obtain the target configuration information. The plug-in adaptive configuration algorithm can dynamically adjust the configuration parameters, such as the message queue length and retry strategy, according to the device communication requirements and the specific conditions of the network environment to ensure that the communication plug-in can perform optimally under different conditions. The message queue length refers to the limit on the number of data packets that can be temporarily stored before being sent during the communication process, which affects the efficiency and response speed of data processing; while the retry strategy defines the strategy of the retransmission mechanism after communication failure, how to balance the use of network resources and the reliability of data transmission. By setting these parameters, the plug-in can handle network fluctuations and device response uncertainty more flexibly. Based on the message queue length and retry strategy, the device communication plug-in is activated and registered with the IoT platform. In this process, the plug-in will run according to the parameters set by the adaptive configuration algorithm. The registration process involves recording the plug-in's identification and function information in the management system of the IoT platform, so that the platform can identify and manage the plug-in, and communicate with the IoT device through the plug-in. After the plug-in is successfully registered, the communication link of the device communication plug-in is verified to ensure that the device communication plug-in can exchange data with the IoT platform stably and securely. Communication link verification usually includes checking the integrity, continuity and security of data to ensure that all information transmitted through the communication plug-in is reliable and has not been tampered with. When the communication link is successfully verified, the object model establishes a stable device connection with the IoT platform through the device communication plug-in.

[0077] In the embodiment of the present application, the network traffic data of the IoT device is automatically extracted by a deep packet inspection algorithm, and the device description information is generated by a large language model. This method reduces the need for manual participation and improves the efficiency and accuracy of device identification. The automated process ensures the comprehensive capture of device features, including details that may be overlooked by manual operation. The extracted traffic fingerprint data and device description information are matched with the IoT knowledge base using a graph query algorithm and a generative algorithm, and the target device parameters can be efficiently and accurately identified. This process greatly enhances the accuracy of device identification and ensures the pertinence and effectiveness of the docking process. The process of automatically defining device service attributes and creating a physical model based on the target device parameters provides a flexible and efficient method for building a physical model. This not only speeds up the development cycle of the physical model, but also ensures that the physical model can accurately reflect the actual functions and requirements of the device. The plug-in code that meets the requirements of specific communication methods and device communication protocols is automatically generated by a large language model, which reduces the coding workload of developers and improves development efficiency. The automatically generated code complies with the latest programming specifications and safety standards, reducing the risk of manual coding errors. The physical model is connected to the device of the IoT platform through the automatically generated device communication plug-in, making the device docking process more flexible and extensible. The plug-in docking method facilitates the update and replacement of plug-ins, which helps to quickly adapt to the iterative upgrades of devices and platforms. In the process of generating device communication plug-ins, the latest security protocols and encryption technologies can be integrated to ensure the security of data transmission between devices and platforms. At the same time, the sandbox execution environment provides a secure and isolated operating environment for plug-ins, further enhancing the security of the entire system.

[0078] In a specific embodiment, the process of executing step S101 may specifically include the following steps:

[0079] (1) collecting network traffic data of IoT devices, wherein the network traffic data includes multiple data packets;

[0080] (2) extracting data packet parameters from each data packet through a deep packet inspection algorithm to obtain data packet parameters of each data packet, wherein the data packet parameters include: data volume, transmission interval, and data transmission protocol;

[0081] (3) Identify the port number of each data packet to obtain the source port number and destination port number of each data packet;

[0082] (4) extracting features from data packet parameters of each data packet respectively to obtain a data feature set of each data packet, wherein the data feature set includes: a data identifier and a control code;

[0083] (5) performing feature fusion on the data identifier and control code of each data packet respectively to obtain a fused feature vector of each data packet;

[0084] (6) Perform hash value conversion on the fusion feature vector of each data packet to obtain the hash value of each data packet, perform weighted average on the hash value of each data packet to obtain the target hash value, and use the target hash value as the traffic fingerprint data;

[0085] (7) Build device description information based on traffic fingerprint data.

[0086] Specifically, network traffic data is collected from IoT devices to obtain multiple data packets, each of which carries important information about device communication. For example, when a smart thermostat communicates with a cloud server, each data packet may contain information such as temperature settings, current readings, and device status. The data packets are analyzed using a deep packet inspection algorithm. A deep packet inspection algorithm is a data analysis technique that can penetrate into each level of a data packet and extract the core parameters of the data packet, including data volume, transmission interval, and the data transmission protocol used. For example, the data volume of a data packet can show the size of the data contained in each transmission, the transmission interval reflects the frequency of data transmission, and the data transmission protocol defines how the data is transmitted securely and efficiently. The port number of each data packet is identified to determine the source port number and destination port number of the data packet. The port number information can help the system monitor and control network communications to prevent unauthorized access. The data packet parameters of each data packet are feature extracted. Key features such as data identifiers and control codes are extracted from each data packet. The data identifier may contain information about the type of data, such as temperature data or device status report; the control code may indicate how the data is processed, such as updating device settings or performing specific operations. Perform feature fusion to integrate the data identifier and control code of each data packet into a fused feature vector. Perform hash value conversion on the fused feature vector of each data packet to convert complex and diverse data information into a simple numerical representation to obtain a hash value. By calculating the hash value of each data packet and taking a weighted average of these hash values, a target hash value representing the overall network traffic characteristics is obtained. Construct device description information based on the obtained traffic fingerprint data. Device description information is based on the static characteristics of the traffic, such as the number and type of data packets, and also includes dynamic characteristics, such as the pattern and frequency of communication behavior. For example, consider a smart security camera connected to an enterprise network. By analyzing the hash value and feature vector of its data packet, the frequency and size of data sent by the camera within a specific time can be understood, and possible abnormal behavior can be identified, such as high-frequency data transmission during non-working hours, which may be a warning sign of network security issues.

[0087] In a specific embodiment, the process of executing step S102 may specifically include the following steps:

[0088] (1) Perform parameter traversal on the device description information to obtain a traversal parameter set, where the traversal parameter set includes: device type, device model, and device communication protocol;

[0089] (2) Match the data protocol format of the traversal parameter set to obtain the target data protocol format;

[0090] (3) Based on the target data protocol format, the traversal parameter set is analyzed for prompt words to obtain a first prompt word set;

[0091] (4) Based on the target data protocol format, the traffic fingerprint data is analyzed for prompt words to obtain a second prompt word set;

[0092] (5) The first prompt word set and the second prompt word set are respectively input into the large language model and the Internet of Things knowledge base for data matching to obtain the target device parameters.

[0093] Specifically, first, the device description information is usually provided by the manufacturer, which contains the basic information and technical specifications of the device. For example, a smart thermostat may have a description that indicates that it is a temperature sensor based on the ZigBee protocol, model TZ-300, and supports remote control and data transmission functions. In this process, the key parameters need to be extracted from these descriptive texts, which is called parameter traversal. During the traversal process, we extract the device type as "temperature sensor", the device model as "TZ-300", and the communication protocol as "ZigBee". Next, based on these traversed parameter sets, data protocol format matching is required. The matching work here is to confirm the specific data format and technical requirements of device communication, such as the specific version of the ZigBee protocol and the security standard for data transmission. By comparing the known protocol standards and device descriptions, we can determine the detailed specifications of the device's data exchange format and communication protocol. After determining the data protocol format, the next step is to perform prompt word analysis. This analysis is divided into two parts: first, the traversal parameter set is analyzed based on the target data protocol format to obtain the first prompt word set. In our thermostat example, this may include words such as "temperature adjustment", "automatic control", "energy efficiency level", etc. that are directly related to the device's functions and protocols. These prompt words are helpful for subsequent search and data processing tasks because they provide clues about how to program and configure the device. Secondly, the traffic fingerprint data needs to be analyzed for prompt words to obtain the second set of prompt words. Traffic fingerprint data usually refers to the data characteristics generated by the device in actual operation, such as data transmission frequency, common data packet size, and communication error rate. For our thermostat, possible traffic fingerprint prompt words include "periodic data transmission", "data packet verification", and "error recovery", which are key indicators for evaluating the communication efficiency and stability of the device. After completing the analysis of these two parts of prompt words, we input these prompt words into a large language model that has been pre-trained or configured to handle IoT-related query and data matching tasks. At the same time, combined with a comprehensive IoT knowledge base, the knowledge base contains a lot of detailed information about different devices and protocols, including performance standards, compatibility issues, and configuration guidelines. Through the processing of the model and the data support of the knowledge base, we can accurately match and confirm the specific parameters of the device, such as the optimal operating temperature range, energy consumption, and expected service life of the thermostat. Ultimately, this approach combining a large language model and an IoT knowledge base not only improves the accuracy of data processing, but also greatly speeds up device parameter matching.

[0094] In a specific embodiment, the process of executing step S103 may specifically include the following steps:

[0095] (1) Analyze the target device parameters through the natural semantic analysis algorithm to obtain the device support protocol and device control protocol;

[0096] (2) Match the service type based on the device support protocol and the device control protocol to obtain the target service type;

[0097] (3) constructing service parameters for the target service type to obtain a service parameter set, wherein the service parameter set includes: device operation time, device control mode, and device control index;

[0098] (4) Defining device service attributes based on the service parameter set, and extracting data from the device service attributes to obtain execution events, execution instructions, and instruction element information;

[0099] (5) Construct an object model through execution events, execution instructions, and instruction element information.

[0100] Specifically, the target device parameters are parsed by the natural semantic analysis algorithm to obtain the device support protocol and device control protocol. Communication protocols such as Wi-Fi, Bluetooth or Zigbee define how the device communicates with other devices or networks; control protocols such as MQTT or HTTP specify how the device receives and executes control commands. The natural semantic analysis algorithm can understand the complex technical terms and structures in device documents or configuration files, so as to accurately identify these protocols. Service type matching is performed based on the device support protocol and device control protocol to obtain the target service type. The technical capabilities of the device are matched with its functional role in the system. For example, if a device supports high-speed Wi-Fi communication and uses the MQTT protocol, it may be matched as a service type that requires frequent and real-time data exchange, such as security monitoring or real-time environmental monitoring. Service parameters are constructed for the target service type to obtain a service parameter set. Specific service operation parameters are defined, such as device operating time, control mode, and control indicators. For example, device operating time may be defined as uninterrupted operation, the control mode may be automatic or manual, and the control indicators may include response time, energy efficiency level or other performance indicators. Device service attributes are defined based on the service parameter set. The service parameters are converted into the device's operating logic and interfaces, which define how the device interacts with the IoT platform. Data extraction is performed on the device service attributes, and information such as execution events, execution instructions, and instruction elements are extracted from the service parameters. This information is the basis for the device to perform specific tasks. For example, an execution event may be the detection of a specific environmental change, an execution instruction may be to adjust the temperature or activate an alarm, and the instruction element provides the necessary parameter values ​​such as the temperature set point or alarm level. The object model is constructed through the execution event, execution instruction, and instruction element information. The object model describes the function and behavior of the device, and also includes the interaction between the device and the platform.

[0101] In a specific embodiment, the process of executing step S104 may specifically include the following steps:

[0102] (1) Perform device simulation on the physical model and monitor the simulated communication behavior data in real time;

[0103] (2) matching the simulated communication behavior data with the communication mode to obtain the communication mode;

[0104] (3) Match the communication nodes of the simulated communication behavior to obtain the corresponding communication node set;

[0105] (4) Match the communication protocol of the communication node set to obtain the device communication protocol;

[0106] (5) inputting the communication mode and the device communication protocol into the large language model to extract context information and perform semantic enhancement processing to obtain context information and semantic enhancement information;

[0107] (6) matching the communication plug-in type based on the context information and the semantic enhancement information to obtain the target communication plug-in type;

[0108] (7) matching the plug-in parameters according to the target communication plug-in type to obtain a plug-in parameter set, wherein the plug-in parameter set includes: functional domain parameters, plug-in state parameters, and plug-in operation parameters;

[0109] (8) Generate communication plug-in code based on functional domain parameters, plug-in status parameters, and plug-in operation parameters.

[0110] Specifically, for example, if we consider a temperature sensor in a smart home system, the simulation run will include its behavior pattern of periodically sending temperature readings to the server. In this process, real-time monitoring of the simulated communication behavior data is crucial because it provides the necessary data to support subsequent analysis and matching work. Next, these simulated communication behavior data are analyzed to match communication methods such as data reporting, remote control, or event notification. This step is accomplished by analyzing the content, frequency, and trigger conditions of data transmission. For example, in the simulated data, if it is detected that the sensor uploads data immediately when it detects that the temperature exceeds a predetermined threshold, this can be identified as an "event notification" communication method.

[0111] Subsequently, through further analysis of these communication methods, the communication nodes involved can be identified, which represent specific devices or services in the IoT architecture, such as servers, gateways or other sensors. The identification of these nodes is based on their roles and functions in the communication process. For example, in the remote control communication method, the sender and receiver of the control command are both key communication nodes. After that, the communication protocols are matched for these communication nodes. In the IoT environment, different devices and services may use different communication protocols such as MQTT, HTTP or CoAP. Identifying these communication protocols involves analyzing the structure and format of the communication data, and which specific specifications of known protocols they conform to. For example, if the data is transmitted through port 1883 (the standard port of the MQTT protocol) and follows a specific publish / subscribe pattern, it can be determined that the device uses the MQTT protocol.

[0112] By inputting the identified communication methods and protocols into the large language model, deeper context information extraction and semantic enhancement processing can be performed. This step uses the powerful semantic processing capabilities of the large language model to not only understand the text description of the communication data, but also capture the implicit meaning and contextual relationship of the communication behavior, thereby providing richer and more accurate information. Based on the obtained context information and semantic enhancement information, the communication plug-in type is matched next. This step aims to determine the plug-in type that is suitable for the current device and communication method. For example, if the device mainly performs data reporting and event notification, a plug-in type that can efficiently handle these two communication methods may be required.

[0113] After the communication plug-in type is determined, the matching plug-in type will be used to guide the selection of plug-in parameters. The plug-in parameter set includes functional domain parameters, plug-in state parameters, and plug-in operation parameters, which together define the plug-in's functions, state management, and operation logic. For example, for a communication plug-in for firmware upgrade, its functional domain parameters will include firmware version control, plug-in state parameters may include the current upgrade progress, and operation parameters define various operation instructions during the upgrade process. Finally, based on these parameters, the system generates communication plug-in code, which specifically implements all the design details of the plug-in to ensure that it can correctly perform the predetermined communication tasks in the IoT environment. In this way, not only the development efficiency is improved, but also the functionality and reliability of the communication plug-in are ensured, so that it can play the maximum performance in practical applications.

[0114] In a specific embodiment, the process of executing step S105 may specifically include the following steps:

[0115] (1) Transmit the communication plug-in code to the plug-in management unit of the IoT platform for code integrity verification;

[0116] (2) When the verification passes, the communication plug-in code is encapsulated to obtain a plug-in container;

[0117] (3) Perform dynamic dependency analysis on the plug-in container to obtain the code runtime library and code dependency data corresponding to the plug-in container;

[0118] (4) Generate a sandbox execution environment based on the code runtime library and code dependency data;

[0119] (5) Based on the sandbox execution environment and the plug-in container, a device communication plug-in is generated through the code runtime library and the code dependency data, and the object model is established through the device communication plug-in to connect with the device of the Internet of Things platform.

[0120] Specifically, the communication plug-in code is transmitted to the plug-in management unit of the IoT platform for code integrity verification. The integrity verification ensures that the code has not been tampered with or damaged during transmission through various verification algorithms (such as SHA-256 hash verification). When the verification passes, the communication plug-in code is encapsulated and the original code is encapsulated into a standardized plug-in container, which includes all necessary execution files and configuration information, so that the plug-in can run independently on the IoT platform. The plug-in container simplifies the deployment and management process and provides an isolated operating environment, which helps prevent conflicts and dependency issues between plug-ins. Dynamic dependency analysis is performed on the plug-in container. All external libraries and dependent data are identified by analyzing the code inside the container, including third-party libraries, operating system-specific calls, etc. Dynamic dependency analysis helps determine all necessary runtime components to ensure that the plug-in can find and correctly use these dependencies at runtime. A sandbox execution environment is generated based on the analyzed code runtime library and code dependency data. The sandbox execution environment is a special virtual operating environment that provides all the resources required to execute the plug-in, while protecting the main system from potential malicious code or plug-in errors through an isolation mechanism. In the sandbox, plug-ins can be executed in a controlled and secure environment, and all access to external resources is controlled by strict security policies. Based on the sandbox execution environment and plug-in container, device communication plug-ins are generated through code runtime libraries and code dependency data. The generated communication plug-in will be deployed on the Internet of Things platform and will be responsible for handling all communication tasks with the object model. For example, assuming that in a smart home system, various smart devices such as light controllers and temperature regulators need to exchange data with the central system. In this embodiment, it can be ensured that the communication plug-ins of these devices are correctly generated, deployed and executed, achieving efficient and secure device management and control.

[0121] In a specific embodiment, the process of executing the step of generating a device communication plug-in through a code runtime library and code-dependent data may specifically include the following steps:

[0122] (1) Based on the sandbox execution environment and the plug-in container, the code runtime library and the code dependency data plug-in configuration information are analyzed by the plug-in adaptive configuration algorithm to obtain the target configuration information, wherein the target configuration information includes: message queue length and retry strategy;

[0123] (2) Activate the device communication plug-in based on the message queue length and retry strategy, and register the device communication plug-in to the IoT platform;

[0124] (3) The communication link of the device communication plug-in is verified. When the verification passes, the device communication plug-in is used to establish the device model and connect it to the device of the Internet of Things platform.

[0125] Specifically, based on the sandbox execution environment and plug-in container, the plug-in adaptive configuration algorithm is used to analyze the configuration information of the code runtime library and the code dependent data plug-in. The performance and stability of the plug-in are optimized through adaptive configuration to ensure that the plug-in can perform optimally under different network environments and hardware configurations. For example, the algorithm analyzes the resource usage, response time, and error rate during the operation of the plug-in, and dynamically adjusts the configuration based on the data, such as adjusting the length of the message queue and setting an appropriate retry strategy. Among them, the message queue length determines the number of pending messages that can be temporarily stored at any given time. The appropriate queue length can balance the efficiency of message processing and the use of system resources, avoiding memory overflow or processing delays due to message backlogs. The retry strategy defines the number of retries and retry intervals when message transmission fails, which directly affects the reliability of data transmission. A reasonable retry strategy can reduce network congestion and resource waste caused by frequent retries while ensuring that the data is eventually reachable. The device communication plug-in is activated based on the message queue length and retry strategy. Activating a plug-in means loading the plug-in into the operating environment and starting to execute its functions, such as data transmission and reception, device monitoring, etc. At the same time, the activated plug-in is registered to the Internet of Things platform. The registration process includes submitting the plug-in's identification information, function description, and configuration parameters to the management system of the Internet of Things platform to ensure that the Internet of Things platform can accurately identify each plug-in and its function, which is convenient for subsequent operation and maintenance. After registering the plug-in, the communication link verification is performed to ensure that the device communication plug-in can run stably and reliably. Communication link verification usually includes testing the integrity, security, and real-time performance of data transmission, such as verifying whether the data can be transmitted completely and accurately between the device and the platform by sending a test data packet. When the communication link verification is passed, the device communication plug-in establishes the device docking of the object model with the Internet of Things platform to achieve effective docking of the device with the Internet of Things platform. In this process, the device communication plug-in processes data requests and instructions from the object model, and transmits the device status and feedback back to the Internet of Things platform in real time to ensure smooth two-way communication and real-time data updates. For example, in a smart home system, a communication plug-in of a smart air conditioner may need to process temperature adjustment instructions from the central control system, and automatically adjust the operating status according to the occupant's settings and the indoor and outdoor temperature difference. In this embodiment, the communication plug-in of the smart air conditioner can promptly feedback the execution results and current status to the Internet of Things platform after receiving the control instruction, so as to achieve efficient and intelligent temperature management.

[0126] The above describes the method for connecting a device using a large language model with an Internet of Things platform in the embodiment of the present application. The following describes the device for connecting a device using a large language model with an Internet of Things platform in the embodiment of the present application. Figure 2 In the embodiment of the present application, an embodiment of the device for connecting a device with an Internet of Things platform using a large language model includes:

[0127] The collection module 201 is used to collect network traffic data of IoT devices, extract traffic fingerprints from the network traffic data through a deep packet inspection algorithm to obtain traffic fingerprint data, and construct device description information based on the traffic fingerprint data;

[0128] A matching module 202 is used to match the traffic fingerprint data and the device description information with a preset IoT knowledge base through a graph query algorithm and a generative algorithm based on a preset large language model to obtain target device parameters;

[0129] A creation module 203, used to define device service attributes on the Internet of Things platform based on the target device parameters, and create a thing model according to the device service attributes;

[0130] A generation module 204 is used to match the communication mode and the preset device communication protocol to the object model, and input the communication mode and the device communication protocol into a preset large language model to generate a device communication plug-in code to obtain a communication plug-in code;

[0131] The docking module 205 is used to transmit the communication plug-in code to the plug-in management unit of the Internet of Things platform to generate a device communication plug-in, and establish the device docking between the object model and the device of the Internet of Things platform through the device communication plug-in.

[0132] Through the collaboration of the above components, the network traffic data of IoT devices is automatically extracted through deep packet inspection algorithms, and device description information is generated using large language models. This method reduces the need for manual participation and improves the efficiency and accuracy of device identification. The automated process ensures the comprehensive capture of device features, including details that may be overlooked by manual operations. The extracted traffic fingerprint data and device description information are matched with the IoT knowledge base using graph query algorithms and generative algorithms, which can efficiently and accurately identify the target device parameters. This process greatly enhances the accuracy of device identification and ensures the pertinence and effectiveness of the docking process. The process of automatically defining device service attributes and creating object models based on target device parameters provides a flexible and efficient method for building object models. This not only speeds up the development cycle of object models, but also ensures that object models can accurately reflect the actual functions and requirements of devices. The large language model is used to automatically generate plug-in code that meets the requirements of specific communication methods and device communication protocols, which reduces the coding workload of developers and improves development efficiency. The automatically generated code complies with the latest programming specifications and security standards, reducing the risk of manual coding errors. The object model is connected to the device of the IoT platform through the automatically generated device communication plug-in, making the device docking process more flexible and scalable. The plug-in docking method facilitates the update and replacement of plug-ins, which helps to quickly adapt to the iterative upgrades of devices and platforms. In the process of generating device communication plug-ins, the latest security protocols and encryption technologies can be integrated to ensure the security of data transmission between devices and platforms. At the same time, the sandbox execution environment provides a secure and isolated operating environment for plug-ins, further enhancing the security of the entire system.

[0133] The present application also provides a device for docking a device using a large language model with an Internet of Things platform. The device for docking a device using a large language model with an Internet of Things platform includes a memory and a processor. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor executes the steps of the method for docking a device using a large language model with an Internet of Things platform in the above-mentioned embodiments.

[0134] The present application also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the computer executes the steps of the method for docking a device using a large language model with an Internet of Things platform.

[0135] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0136] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.

[0137] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for connecting a device using a large language model to an Internet of Things platform, characterized in that: The method for connecting a device using a large language model to an Internet of Things platform includes: Collect network traffic data of IoT devices, extract traffic fingerprints from the network traffic data using a deep packet inspection algorithm to obtain traffic fingerprint data, and construct device description information based on the traffic fingerprint data; Matching the traffic fingerprint data and the device description information with a preset IoT knowledge base through a large language model to obtain target device parameters; Defining device service attributes on the IoT platform based on the target device parameters, and creating a thing model according to the device service attributes; Matching the object model with a communication mode and a preset device communication protocol, and inputting the communication mode and the device communication protocol into the large language model to generate a device communication plug-in code, thereby obtaining a communication plug-in code; The communication plug-in code is transmitted to the plug-in management unit of the Internet of Things platform to generate a device communication plug-in, and the device communication plug-in is used to establish the object model and the device connection with the Internet of Things platform; specifically including: transmitting the communication plug-in code to the plug-in management unit of the Internet of Things platform for code integrity verification; when the verification passes, the communication plug-in code is packaged to obtain a plug-in container; dynamic dependency analysis is performed on the plug-in container to obtain the code runtime library and code dependency data corresponding to the plug-in container; a sandbox execution environment is generated based on the code runtime library and the code dependency data; based on the sandbox execution environment and the plug-in container, the code runtime library and the code dependency data plug-in configuration information are analyzed by a plug-in adaptive configuration algorithm to obtain target configuration information, wherein the target configuration information includes: message queue length and retry strategy; based on the message queue length and the retry strategy, the device communication plug-in is activated, and the device communication plug-in is registered to the Internet of Things platform; communication link verification is performed on the device communication plug-in, and when the verification passes, the object model is established through the device communication plug-in. Device connection with the Internet of Things platform.

2. The method for connecting a device using a large language model to an Internet of Things platform according to claim 1, characterized in that: The collecting of network traffic data of the IoT device, extracting traffic fingerprints from the network traffic data using a deep packet inspection algorithm to obtain traffic fingerprint data, and constructing device description information according to the traffic fingerprint data, includes: Collecting network traffic data of the IoT device, wherein the network traffic data includes a plurality of data packets; Extracting data packet parameters from each data packet through the deep packet inspection algorithm to obtain data packet parameters of each data packet, wherein the data packet parameters include: data volume, transmission interval, and data transmission protocol; Identify the port number of each data packet respectively to obtain the source port number and destination port number of each data packet; Extracting features from the data packet parameters of each data packet respectively to obtain a data feature set of each data packet, wherein the data feature set includes: a data identifier and a control code; Perform feature fusion on the data identifier and control code of each data packet respectively to obtain a fused feature vector of each data packet; Performing hash value conversion on the fused feature vector of each data packet respectively to obtain the hash value of each data packet, performing weighted average on the hash value of each data packet to obtain a target hash value, and using the target hash value as the traffic fingerprint data; The device description information is constructed according to the traffic fingerprint data.

3. The method for connecting a device using a large language model to an Internet of Things platform according to claim 2, characterized in that: The traffic fingerprint data and the device description information are matched with a preset IoT knowledge base through a large language model to obtain target device parameters, including: Perform parameter traversal on the device description information to obtain a traversal parameter set, wherein the traversal parameter set includes: device type, device model, and device communication protocol; Performing data protocol format matching on the traversal parameter set to obtain a target data protocol format; Based on the target data protocol format, performing prompt word analysis on the traversal parameter set to obtain a first prompt word set; Based on the target data protocol format, performing prompt word analysis on the traffic fingerprint data to obtain a second prompt word set; The first prompt word set and the second prompt word set are respectively input into the large language model and the Internet of Things knowledge base for data matching to obtain the target device parameters.

4. The method for connecting a device using a large language model to an Internet of Things platform according to claim 1, characterized in that: Defining device service attributes on the Internet of Things platform based on the target device parameters, and creating a thing model according to the device service attributes, includes: Parsing the target device parameters by using a natural semantic analysis algorithm to obtain a device support protocol and a device control protocol; Perform service type matching based on the device support protocol and the device control protocol to obtain a target service type; Constructing service parameters for the target service type to obtain a service parameter set, wherein the service parameter set includes: device operation time, device control mode, and device control index; Defining the device service attribute based on the service parameter set, and extracting data from the device service attribute to obtain execution events, execution instructions, and instruction element information; The object model is constructed through the execution event, the execution instruction and the instruction element information.

5. The method for connecting a device using a large language model to an Internet of Things platform according to claim 1, characterized in that: The matching of the communication mode and the device communication protocol to the object model, and inputting the communication mode and the device communication protocol into a preset large language model to generate a device communication plug-in code to obtain a communication plug-in code, includes: Performing device simulation operation on the physical model and monitoring simulated communication behavior data in real time; Matching the simulated communication behavior data with a communication mode to obtain the communication mode; Performing communication node matching on the simulated communication behavior to obtain a corresponding communication node set; Performing communication protocol matching on the communication node set to obtain the device communication protocol; Inputting the communication mode and the device communication protocol into the large language model to perform context information extraction and semantic enhancement processing to obtain context information and semantic enhancement information; Perform communication plug-in type matching based on the context information and the semantic enhancement information to obtain a target communication plug-in type; Matching plug-in parameters according to the target communication plug-in type to obtain a plug-in parameter set, wherein the plug-in parameter set includes: functional domain parameters, plug-in state parameters, and plug-in operation parameters; The communication plug-in code is generated based on the functional domain parameters, the plug-in state parameters, and the plug-in operation parameters.

6. A device for connecting a device using a large language model to an Internet of Things platform, characterized in that: The device for connecting the device using the large language model with the Internet of Things platform includes: A collection module is used to collect network traffic data of IoT devices, extract traffic fingerprints from the network traffic data through a deep packet inspection algorithm to obtain traffic fingerprint data, and construct device description information based on the traffic fingerprint data; A matching module, for matching the traffic fingerprint data and the device description information with a preset IoT knowledge base through a graph query algorithm and a generative algorithm based on a preset large language model to obtain target device parameters; A creation module, used to define device service attributes on the Internet of Things platform based on the target device parameters, and create a thing model according to the device service attributes; A generation module, used for matching the communication mode and the preset device communication protocol to the object model, and inputting the communication mode and the device communication protocol into a preset large language model to generate a device communication plug-in code, thereby obtaining a communication plug-in code; A docking module is used to transfer the communication plug-in code to the plug-in management unit of the Internet of Things platform to generate a device communication plug-in, and establish the device model and the device docking of the Internet of Things platform through the device communication plug-in; specifically including: transmitting the communication plug-in code to the plug-in management unit of the Internet of Things platform for code integrity verification; when the verification passes, the communication plug-in code is packaged to obtain a plug-in container; dynamic dependency analysis is performed on the plug-in container to obtain a code runtime library and code dependency data corresponding to the plug-in container; a sandbox execution environment is generated based on the code runtime library and the code dependency data; based on the sandbox execution environment and the plug-in container, the code runtime library and the code dependency data plug-in configuration information are analyzed through a plug-in adaptive configuration algorithm to obtain target configuration information, wherein the target configuration information includes: message queue length and retry strategy; based on the message queue length and the retry strategy, the device communication plug-in is activated, and the device communication plug-in is registered to the Internet of Things platform; communication link verification is performed on the device communication plug-in, and when the verification passes, the device model is established through the device communication plug-in. Device docking with the Internet of Things platform.

7. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the method for connecting a device using a large language model with an Internet of Things platform as described in any one of claims 1-5 is implemented.

Citation Information

Patent Citations

  • Intelligent gateway adaptation system based on object model and operation method thereof

    CN115150226A

  • Internet of Things intelligent application method and device based on large language model

    CN117055845A