An AI-based router, gateway and camera protocol conversion method and system
By deploying AI models in routers or gateways to automatically identify and convert the protocols of IoT devices, the problem of adapting heterogeneous protocols is solved, enabling seamless communication and efficient collaboration between devices, which is suitable for smart homes and industrial IoT.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FUJIAN NEWLAND COMM SCI TECH
- Filing Date
- 2026-01-12
- Publication Date
- 2026-06-02
AI Technical Summary
Existing technologies suffer from poor adaptability, complex configuration and maintenance, insufficient real-time performance, and limited compatibility when dealing with IoT devices using heterogeneous protocols, making it difficult to achieve seamless communication between devices.
By deploying a fusion model based on convolutional neural networks and bidirectional long short-term memory networks in routers or gateways, the protocol types of IoT devices can be automatically identified and parsed, protocol conversion rules can be dynamically learned, and data can be converted in real time, supporting seamless communication between multiple protocols.
It achieves adaptive, real-time, and accurate identification and conversion of heterogeneous protocols, reduces configuration and maintenance complexity, and improves the overall system compatibility, collaborative efficiency, and real-time interaction capabilities, making it suitable for smart home and industrial IoT scenarios.
Smart Images

Figure CN122137894A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things communication, and particularly to a protocol conversion method and system for routers, gateways, and cameras based on AI. Background Art
[0002] With the rapid development and popularization of Internet of Things technology, a large number of heterogeneous devices have been connected in scenarios such as smart homes, industrial monitoring, and security systems. Among them, routers and gateways, as the core hubs of network communication, play a key role in data forwarding and device management; while cameras, as important sensing terminals, are responsible for collecting core data such as videos and images. In practical applications, these devices often come from different manufacturers, and the communication protocols they adopt have significant heterogeneity. Currently, the mainstream Internet of Things communication protocols include MQTT, HTTP, CoAP, etc. In addition, there are also a large number of privately defined protocols by manufacturers. This protocol difference leads to the formation of "information islands" between devices. For example, a camera using the MQTT protocol cannot directly send video stream data to a cloud platform or gateway that only supports the HTTP protocol, severely restricting the interoperability and collaborative working ability of the Internet of Things system.
[0003] In order to overcome the challenges brought by protocol heterogeneity, various solutions have been proposed in the prior art, but they all have obvious defects: 1. Customized protocol gateway: Developing a dedicated hardware gateway for a specific device combination. This solution has extremely poor scalability, cannot meet the needs of device updates or adding different protocol devices, and has high deployment and maintenance costs.
[0004] 2. Manually configuring protocol conversion rules: Relying on professional technicians to manually analyze protocol specifications and write mapping rules. This method has a complex configuration process, low efficiency, is error-prone, and ordinary users cannot complete it independently. After the protocol version is updated, it needs to be reconfigured, resulting in a heavy maintenance burden.
[0005] 3. Cloud protocol conversion platform: First, uniformly uploading data of different protocols to a cloud server, and then distributing it after protocol conversion in the cloud. Although this solution has a certain degree of flexibility, it introduces a high network transmission delay, consumes a large amount of bandwidth, and is highly dependent on the network stability, making it difficult to meet application scenarios with strict low-latency requirements such as camera video monitoring and device real-time linkage.
[0006] 4. General protocol conversion module: Some solutions attempt to provide conversion modules that support a limited number of standard protocols. However, such modules have insufficient adaptability to non-standard private protocols and new protocols, lack a dynamic learning mechanism, and are prone to parsing errors when facing protocol variants or updates, with limited adaptability.
[0007] In summary, existing technologies generally suffer from problems such as poor adaptability, complex configuration and maintenance, insufficient real-time performance, limited compatibility, and a lack of effective collaborative adaptation mechanisms.
[0008] Therefore, how to provide an AI-based method and system for protocol conversion of routers, gateways and cameras to achieve adaptive, real-time and accurate identification and conversion of heterogeneous protocols, reduce configuration and maintenance complexity, and improve the overall system compatibility, collaborative efficiency and real-time interaction capabilities has become an urgent technical problem to be solved. Summary of the Invention
[0009] The technical problem to be solved by the present invention is to provide an AI-based method and system for converting protocols of routers, gateways and cameras, so as to achieve adaptive, real-time and accurate identification and conversion of heterogeneous protocols, reduce configuration and maintenance complexity, and improve the overall system compatibility, collaborative efficiency and real-time interaction capabilities.
[0010] In a first aspect, the present invention provides an AI-based method for protocol conversion between routers, gateways, and cameras, comprising the following steps: Step S1: The router or gateway monitors the local area network in real time and automatically discovers newly connected IoT devices; the device types of the IoT devices include at least cameras; Step S2: Real-time acquisition of communication data frames sent by newly connected IoT devices, and input of the communication data frames into a preset protocol awareness model; the protocol awareness model is constructed based on a fusion model of convolutional neural network and bidirectional long short-term memory network, and automatically identifies the protocol type and parses out the core business data by analyzing the characteristics of the communication data frames; the protocol type includes at least MQTT protocol, HTTP protocol, CoAP protocol and private protocol; Step S3: Based on the protocol type and core business data, dynamically learn the feature mapping relationship between the source protocol and the target protocol, and automatically generate the corresponding protocol conversion rules; Step S4: Using the protocol conversion rules, the original protocol data from the newly connected IoT device is converted in real time, and the converted data is sent to the target device to achieve seamless communication between devices using different protocols.
[0011] Furthermore, in step S2, the protocol awareness model supports the identification of different versions of the same protocol; when a protocol version update is detected, the protocol conversion rules are automatically adjusted.
[0012] Furthermore, in step S3, the feature mapping relationship is generated based on an adaptive data format conversion algorithm. The adaptive data format conversion algorithm automatically matches the data field mapping relationship of different protocols and has a built-in data verification mechanism to ensure the integrity and accuracy of the converted data. The protocol conversion rules support bidirectional protocol conversion, enabling arbitrary conversion between MQTT, HTTP, and CoAP protocols, as well as adaptation between the proprietary protocol and standard protocols.
[0013] Furthermore, in step S4, the original protocol data transmitted by the IoT device is encrypted and compressed using TLS.
[0014] Furthermore, it also includes step S5: When multiple IoT devices connect simultaneously, protocol conflict detection is performed and communication resources are dynamically allocated. It provides a visual interface to display device status, protocol type, and protocol conversion rules, and supports users to configure, save, and batch distribute the protocol conversion rules.
[0015] Secondly, the present invention provides an AI-based router, gateway, and camera protocol conversion system, comprising the following modules: The device access discovery module is used by routers or gateways to monitor the local area network in real time and automatically discover newly connected IoT devices; the device types of the IoT devices include at least cameras; The protocol awareness module is used to collect communication data frames sent by newly connected IoT devices in real time and input the communication data frames into a preset protocol awareness model. The protocol awareness model is constructed based on a fusion model of convolutional neural network and bidirectional long short-term memory network. By analyzing the characteristics of the communication data frames, it automatically identifies the protocol type and parses out the core business data. The protocol types include at least MQTT protocol, HTTP protocol, CoAP protocol and private protocol. The protocol conversion rule generation module is used to dynamically learn the feature mapping relationship between the source protocol and the target protocol based on the protocol type and core business data, and automatically generate the corresponding protocol conversion rules. An adaptive communication module is used to perform real-time conversion of the original protocol data from newly connected IoT devices using the protocol conversion rules, and send the converted data to the target device to achieve seamless communication between devices using different protocols.
[0016] Furthermore, in the protocol awareness module, the protocol awareness model supports the identification of different versions of the same protocol; when a protocol version update is detected, the protocol conversion rules are automatically adjusted.
[0017] Furthermore, in the protocol conversion rule generation module, the feature mapping relationship is generated based on an adaptive data format conversion algorithm. The adaptive data format conversion algorithm automatically matches the data field mapping relationship of different protocols and has a built-in data verification mechanism to ensure the integrity and accuracy of the converted data. The protocol conversion rules support bidirectional protocol conversion, enabling arbitrary conversion between MQTT, HTTP, and CoAP protocols, as well as adaptation between the proprietary protocol and standard protocols.
[0018] Furthermore, in the adaptive communication module, the original protocol data transmitted by the IoT device is encrypted and compressed using TLS.
[0019] Furthermore, it also includes a protocol coordination and resource scheduling module: When multiple IoT devices connect simultaneously, protocol conflict detection is performed and communication resources are dynamically allocated. It provides a visual interface to display device status, protocol type, and protocol conversion rules, and supports users to configure, save, and batch distribute the protocol conversion rules.
[0020] The advantages of this invention are: 1. Real-time monitoring of the local area network via routers or gateways automatically discovers newly connected IoT devices, including at least cameras. Then, the communication data frames emitted by these newly connected IoT devices are collected in real-time and input into a protocol awareness model. This model is built upon a fusion of convolutional neural networks and bidirectional long short-term memory networks. By analyzing the characteristics of the communication data frames, it automatically identifies the protocol type and parses out core business data. Based on the protocol type and core business data, it dynamically learns the feature mapping relationship between the source and target protocols, automatically generating corresponding protocol conversion rules. Finally, using these rules, the original protocol data from the newly connected IoT devices is converted in real-time, and the converted data is sent to the target device to achieve seamless communication between devices using different protocols. In other words, this involves deploying a fusion AI model based on convolutional neural networks and bidirectional long short-term memory networks locally at the network hub (router / gateway). The protocol-aware model enables adaptive, real-time, and accurate identification and conversion of heterogeneous protocols. Its core functionality lies in its ability to automatically capture communication data frames when a new IoT device connects. An AI model intelligently parses the protocol type (including different versions and proprietary protocols) and core business data, then dynamically learns and generates precise bidirectional protocol conversion rules. This process requires no manual intervention, fundamentally reducing configuration and maintenance complexity. This built-in intelligent learning mechanism allows for flexible adaptation to various standard and proprietary protocols, significantly improving system compatibility. The local real-time conversion mechanism avoids network latency issues associated with cloud-based solutions, ensuring efficient inter-device collaboration and real-time interaction capabilities. This breaks down "information silos," achieving seamless communication and ultimately enabling adaptive, real-time, and accurate identification and conversion of heterogeneous protocols. This greatly reduces configuration and maintenance complexity and significantly improves overall system compatibility, collaborative efficiency, and real-time interaction capabilities.
[0021] 2. Real-time monitoring of the local area network via routers or gateways automatically discovers newly connected IoT devices (such as cameras) and utilizes a protocol awareness model based on convolutional neural networks and bidirectional long short-term memory networks to automatically identify various protocol types (such as MQTT, HTTP, CoAP, and proprietary protocols). This significantly reduces the need for manual configuration, improves the efficiency and accuracy of device access, and is especially suitable for large-scale IoT environments. It can quickly adapt to device diversity and reduce deployment costs.
[0022] 3. Based on protocol type and core business data, the system dynamically learns the feature mapping relationship between the source protocol and the target protocol and automatically generates protocol conversion rules. This is thanks to the adaptive data format conversion algorithm and the built-in data verification mechanism, which ensures the integrity and accuracy of the converted data. This enables the system to intelligently adapt to protocol changes (such as version updates), realize bidirectional protocol conversion, enhance the system's flexibility and robustness, and solve the pain point that traditional static rules are difficult to cope with protocol evolution.
[0023] 4. By converting the original protocol data in real time and sending it to the target device, seamless communication between devices using different protocols is achieved. At the same time, TLS encryption and compression processing are supported, ensuring the security and efficiency of data transmission. This advantage improves the overall performance of the IoT system, reduces communication latency, and is suitable for scenarios with high real-time requirements (such as smart security), enhancing user experience and system reliability.
[0024] 5. When multiple IoT devices connect simultaneously, protocol conflict detection is performed and communication resources are dynamically allocated to avoid resource contention and performance bottlenecks. Combined with a visual interface to display device status, protocol type, and conversion rules, it supports user configuration, saving, and batch distribution of rules. This advantage improves the manageability and scalability of the system, simplifies operation and maintenance, and is especially suitable for enterprise-level applications, reducing maintenance complexity.
[0025] 6. Supports arbitrary conversion between multiple standard protocols (such as MQTT, HTTP, CoAP) and private protocols, including bidirectional conversion and version adaptation, which enhances interoperability between devices, breaks down protocol barriers, and promotes the integration of heterogeneous IoT devices.
[0026] 7. By providing a visual interface, users can intuitively view device status and protocol conversion rules, and perform custom configurations, save and batch operations, which lowers the technical threshold and makes it easy for non-professional users to manage protocol conversion.
[0027] 8. Through an AI-based protocol awareness model, the system achieves automatic discovery of IoT devices, protocol identification, and dynamic conversion rule generation, significantly improving the efficiency and accuracy of device access. Its adaptive learning capability can intelligently respond to protocol version updates and diversity, ensuring the integrity of data conversion and real-time seamless communication. At the same time, it supports multi-device resource optimization, TLS encryption security processing, and a visual user interface, enhancing the system's manageability, security, and ease of use, thus demonstrating strong compatibility and scalability in smart home, industrial IoT, and other scenarios. Attached Figure Description
[0028] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0029] Figure 1 This is a flowchart of an AI-based protocol conversion method for routers, gateways, and cameras according to the present invention.
[0030] Figure 2 This is a schematic diagram of the structure of an AI-based router, gateway, and camera protocol conversion system according to the present invention. Detailed Implementation
[0031] The overall concept of the technical solution in this application is as follows: By deploying a protocol awareness model locally in the network hub (router / gateway), adaptive, real-time, and accurate identification and conversion of heterogeneous protocols are achieved. When a new IoT device is connected, its communication data frames can be automatically captured. The protocol awareness model intelligently parses out the protocol type and core business data, and then dynamically learns and generates accurate bidirectional protocol conversion rules. This process does not require manual intervention, fundamentally reducing the complexity of configuration and maintenance. This built-in intelligent learning mechanism enables it to flexibly adapt to various standard protocols and private protocols, significantly improving system compatibility. The local real-time conversion mechanism avoids the network latency of cloud solutions, ensuring the efficiency of device collaboration and real-time interaction capabilities, thereby breaking down "information silos".
[0032] Please refer to Figures 1 to 2 As shown, a preferred embodiment of the AI-based router, gateway, and camera protocol conversion method of the present invention includes the following steps: Step S1: The router or gateway monitors the local area network in real time and automatically discovers newly connected IoT devices; the device type of the IoT device includes at least a camera; the gateway or router acts as a core node and establishes a communication connection with the IoT device through the local area network (Wi-Fi / Ethernet / Zigbee); Step S2: Real-time acquisition of communication data frames sent by newly connected IoT devices, and input of the communication data frames into a preset protocol awareness model; the protocol awareness model is constructed based on a fusion model of convolutional neural network and bidirectional long short-term memory network, and automatically identifies the protocol type and parses out core business data (such as camera video stream parameters, device control commands) by analyzing the characteristics of the communication data frames; the protocol types include at least MQTT protocol, HTTP protocol, CoAP protocol and private protocol; the protocol awareness model constructs a protocol feature library by analyzing the format, field structure, transmission frequency and other characteristics of the communication data frames; The protocol-aware model employs a hybrid architecture combining convolutional neural networks (CNNs) and bidirectional long short-term memory networks (Bi-LSTMs). During model training, a large number of communication data frames of known protocol types (including MQTT, HTTP, CoAP, and typical proprietary protocol samples) are pre-collected, and features such as their header structure, payload format, and transmission timing are extracted as training data. After training, the model is deployed in embedded hardware on routers or gateways, enabling low-power real-time inference through a lightweight inference engine (such as TensorFlow Lite or ONNX Runtime).
[0033] The protocol-aware model extracts local structural features of data frames (such as fixed field positions and delimiter patterns) through CNN layers, and then captures the temporal dependencies of protocol interactions (such as request-response patterns) through Bi-LSTM layers. For proprietary protocols, the model clusters similar communication patterns through unsupervised learning to generate temporary protocol labels, and allows users to correct the labels through a visual interface to optimize recognition accuracy. When a protocol version update is detected, the model fine-tunes the weights through an online learning mechanism and updates the mapping logic in conjunction with the protocol conversion rule generation module.
[0034] Step S3: Based on the protocol type and core business data, dynamically learn the feature mapping relationship between the source protocol and the target protocol, and automatically generate the corresponding protocol conversion rules; Step S4: Using the aforementioned protocol conversion rules, the original protocol data from the newly connected IoT device is converted in real time, and the converted data is sent to the target device to achieve seamless communication between devices using different protocols. In practice, the system has self-diagnostic capabilities; when protocol conversion fails, it automatically investigates the cause (such as protocol incompatibility or incorrect data format) and provides feedback to the user.
[0035] In step S2, the protocol awareness model supports the identification of different versions of the same protocol; when a protocol version update is detected, the protocol conversion rules are automatically adjusted.
[0036] The protocol-aware model is the core component for achieving intelligent protocol recognition. It is built based on a fusion model of convolutional neural networks (CNN) and bidirectional long short-term memory networks (Bi-LSTM). Specifically: Model Input and Preprocessing: The communication data frames input to the model are first preprocessed, including data cleaning (such as removing invalid padding bytes), standardization (such as unifying byte order), and serialization. For variable-length data frames, a sliding window technique is used to divide them into fixed-length sequence segments to ensure the consistency of the model input.
[0037] CNN Feature Extraction Layer: The preprocessed data sequence is fed into the CNN layer. The CNN effectively extracts local spatial features and structural patterns by sliding its convolutional kernels across the data frame. These features include, but are not limited to: fixed message header identifiers (such as the message type flag in the fixed header of MQTT), protocol-specific delimiters (such as newline characters in HTTP), the distribution pattern of the length field, and the starting features of the payload data. The multi-layer convolution and pooling operations of the CNN can progressively abstract key protocol-related local features in the data frame and have a certain degree of robustness to minor format differences or noise.
[0038] Bi-LSTM Temporal Modeling Layer: Local high-level features extracted by the CNN layer are then fed into the Bi-LSTM layer. Bi-LSTM can capture temporal dependencies and contextual information within data frames and between multiple consecutive data frames in both forward and backward directions. This is crucial for identifying protocols based on session or request-response patterns (such as HTTP request and response sequences, and CoAP's Confirmable / Non-Confirmable message interactions). By analyzing the evolution of feature sequences over time, Bi-LSTM can understand the protocol's interaction logic and state changes, thus more accurately distinguishing protocol types and effectively identifying subtle behavioral differences between different versions of the same protocol.
[0039] Feature fusion and classification output: Spatial features extracted by CNN and temporal features captured by Bi-LSTM are fused in the backend of the model (e.g., through concatenation and weighting via fully connected layers). Finally, the model's output layer (typically using the Softmax function) generates a probability distribution for protocol types (including MQTT, HTTP, CoAP, proprietary protocols and their sub-versions) based on the fused feature vectors. The model identifies the type with the highest probability as the recognition result. Simultaneously, specific regression or sequence labeling branches within the model are responsible for locating and parsing core business data (such as encoding parameters and resolution information of camera video streams, or sensor readings) from the data frames.
[0040] Training and Optimization: Before deployment, the model requires supervised training using a massive amount of IoT communication data frames labeled with protocol types. The training data should cover different versions of various standard protocols, proprietary protocols from multiple vendors, and data samples under various network conditions to ensure the model's generalization ability and recognition accuracy. During training, gradient descent algorithms (such as the Adam optimizer) are used to minimize classification error, and regularization techniques such as Dropout are used to prevent overfitting.
[0041] Dynamic Learning and Version Adaptation: The model supports identifying protocol version updates. When the model detects a persistent deviation in the features of a data frame of an already identified protocol that exceeds a threshold, it can be identified as a potential version update. At this point, the model can trigger an online learning mechanism to fine-tune using newly collected samples, or generate an alarm and prompt the user for confirmation, thereby linking the protocol conversion rule generation module for adaptive adjustments. For proprietary protocols, the model uses unsupervised learning (such as clustering algorithms) to group unknown communication patterns and allows users to use a visual interface to assist in annotation, gradually improving the protocol library.
[0042] In step S3, the feature mapping relationship is generated based on an adaptive data format conversion algorithm. The adaptive data format conversion algorithm automatically matches the data field mapping relationship of different protocols (such as converting HTTP JSON format data to MQTT binary format), and has a built-in data verification mechanism to ensure the integrity and accuracy of the converted data. The adaptive data format conversion algorithm achieves cross-protocol field matching based on semantic mapping rules. For example, it maps the JSON-formatted field {"temperature": 25.5} from the HTTP protocol to the binary-formatted field 0x01 0x410xCC 0x00 (the hexadecimal representation of the floating-point number 25.5) from the MQTT protocol. The algorithm has a built-in verification mechanism that verifies the integrity of the converted data by calculating a hash value (such as CRC32). If the verification fails, it triggers a retransmission or an alarm.
[0043] The protocol conversion rules support bidirectional protocol conversion, enabling arbitrary conversion between MQTT, HTTP, and CoAP protocols, as well as adaptation between the proprietary protocol and standard protocols.
[0044] In step S4, the original protocol data transmitted by the IoT device is encrypted and compressed using TLS.
[0045] The raw data is encrypted using TLS 1.3 and compressed using the LZ77 algorithm before transmission to ensure security and bandwidth utilization. The system supports hardware acceleration (such as ARM TrustZone) to improve encryption and decryption efficiency, meeting the low latency requirements of high-definition video streams from cameras.
[0046] It also includes step S5: When multiple IoT devices connect simultaneously, protocol conflict detection is performed and communication resources are dynamically allocated. When multiple devices connect simultaneously, the system dynamically allocates communication resources through a priority queue. For example, camera video streams are marked as high priority and allocated more bandwidth; sensor data is transmitted in batches to reduce load. The protocol conflict detection module monitors port occupancy in real time to prevent packet collisions.
[0047] It provides a visual interface to display device status, protocol type, and protocol conversion rules, and supports users to configure, save, and batch distribute the protocol conversion rules.
[0048] Users can view device lists (such as device ID, IP address, and protocol type), real-time data stream statistics (such as throughput and bit error rate), and protocol conversion rules (such as source protocol → target protocol mapping table) through the web interface. The interface provides a "rule template" function, which allows users to quickly configure and batch distribute rules to multiple gateways based on preset templates (such as MQTT → HTTP conversion template). A preferred embodiment of the AI-based router, gateway, and camera protocol conversion system of the present invention includes the following modules: The device access discovery module is used by the router or gateway to monitor the local area network in real time and automatically discover newly connected IoT devices; the device types of the IoT devices include at least cameras; the gateway or router acts as a core node and establishes a communication connection with the IoT devices through the local area network (Wi-Fi / Ethernet / Zigbee); The protocol awareness module is used to collect communication data frames sent by newly connected IoT devices in real time and input the communication data frames into a preset protocol awareness model. The protocol awareness model is built based on a fusion model of convolutional neural network and bidirectional long short-term memory network. By analyzing the characteristics of the communication data frames, it automatically identifies the protocol type and parses out core business data (such as camera video stream parameters and device control commands). The protocol types include at least MQTT, HTTP, CoAP and proprietary protocols. The protocol awareness model constructs a protocol feature library by analyzing the format, field structure and transmission frequency of the communication data frames. The protocol-aware model employs a hybrid architecture combining convolutional neural networks (CNNs) and bidirectional long short-term memory networks (Bi-LSTMs). During model training, a large number of communication data frames of known protocol types (including MQTT, HTTP, CoAP, and typical proprietary protocol samples) are pre-collected, and features such as their header structure, payload format, and transmission timing are extracted as training data. After training, the model is deployed in embedded hardware on routers or gateways, enabling low-power real-time inference through a lightweight inference engine (such as TensorFlow Lite or ONNX Runtime).
[0049] The protocol-aware model extracts local structural features of data frames (such as fixed field positions and delimiter patterns) through CNN layers, and then captures the temporal dependencies of protocol interactions (such as request-response patterns) through Bi-LSTM layers. For proprietary protocols, the model clusters similar communication patterns through unsupervised learning to generate temporary protocol labels, and allows users to correct the labels through a visual interface to optimize recognition accuracy. When a protocol version update is detected, the model fine-tunes the weights through an online learning mechanism and updates the mapping logic in conjunction with the protocol conversion rule generation module.
[0050] The protocol conversion rule generation module is used to dynamically learn the feature mapping relationship between the source protocol and the target protocol based on the protocol type and core business data, and automatically generate the corresponding protocol conversion rules. The adaptive communication module utilizes the aforementioned protocol conversion rules to perform real-time conversion of raw protocol data from newly connected IoT devices and sends the converted data to the target device, thereby achieving seamless communication between devices using different protocols. In practice, it possesses self-diagnostic capabilities; when protocol conversion fails, it automatically investigates the cause (such as protocol incompatibility or incorrect data format) and provides feedback to the user.
[0051] In the protocol awareness module, the protocol awareness model supports the identification of different versions of the same protocol; when a protocol version update is detected, the protocol conversion rules are automatically adjusted.
[0052] The protocol-aware model is the core component for achieving intelligent protocol recognition. It is built based on a fusion model of convolutional neural networks (CNN) and bidirectional long short-term memory networks (Bi-LSTM). Specifically: Model Input and Preprocessing: The communication data frames input to the model are first preprocessed, including data cleaning (such as removing invalid padding bytes), standardization (such as unifying byte order), and serialization. For variable-length data frames, a sliding window technique is used to divide them into fixed-length sequence segments to ensure the consistency of the model input.
[0053] CNN Feature Extraction Layer: The preprocessed data sequence is fed into the CNN layer. The CNN effectively extracts local spatial features and structural patterns by sliding its convolutional kernels across the data frame. These features include, but are not limited to: fixed message header identifiers (such as the message type flag in the fixed header of MQTT), protocol-specific delimiters (such as newline characters in HTTP), the distribution pattern of the length field, and the starting features of the payload data. The multi-layer convolution and pooling operations of the CNN can progressively abstract key protocol-related local features in the data frame and have a certain degree of robustness to minor format differences or noise.
[0054] Bi-LSTM Temporal Modeling Layer: Local high-level features extracted by the CNN layer are then fed into the Bi-LSTM layer. Bi-LSTM can capture temporal dependencies and contextual information within data frames and between multiple consecutive data frames in both forward and backward directions. This is crucial for identifying protocols based on session or request-response patterns (such as HTTP request and response sequences, and CoAP's Confirmable / Non-Confirmable message interactions). By analyzing the evolution of feature sequences over time, Bi-LSTM can understand the protocol's interaction logic and state changes, thus more accurately distinguishing protocol types and effectively identifying subtle behavioral differences between different versions of the same protocol.
[0055] Feature fusion and classification output: Spatial features extracted by CNN and temporal features captured by Bi-LSTM are fused in the backend of the model (e.g., through concatenation and weighting via fully connected layers). Finally, the model's output layer (typically using the Softmax function) generates a probability distribution for protocol types (including MQTT, HTTP, CoAP, proprietary protocols and their sub-versions) based on the fused feature vectors. The model identifies the type with the highest probability as the recognition result. Simultaneously, specific regression or sequence labeling branches within the model are responsible for locating and parsing core business data (such as encoding parameters and resolution information of camera video streams, or sensor readings) from the data frames.
[0056] Training and Optimization: Before deployment, the model requires supervised training using a massive amount of IoT communication data frames labeled with protocol types. The training data should cover different versions of various standard protocols, proprietary protocols from multiple vendors, and data samples under various network conditions to ensure the model's generalization ability and recognition accuracy. During training, gradient descent algorithms (such as the Adam optimizer) are used to minimize classification error, and regularization techniques such as Dropout are used to prevent overfitting.
[0057] Dynamic Learning and Version Adaptation: The model supports identifying protocol version updates. When the model detects a persistent deviation in the features of a data frame of an already identified protocol that exceeds a threshold, it can be identified as a potential version update. At this point, the model can trigger an online learning mechanism to fine-tune using newly collected samples, or generate an alarm and prompt the user for confirmation, thereby linking the protocol conversion rule generation module for adaptive adjustments. For proprietary protocols, the model uses unsupervised learning (such as clustering algorithms) to group unknown communication patterns and allows users to use a visual interface to assist in annotation, gradually improving the protocol library.
[0058] In the protocol conversion rule generation module, the feature mapping relationship is generated based on an adaptive data format conversion algorithm. The adaptive data format conversion algorithm automatically matches the data field mapping relationship of different protocols (such as converting HTTP JSON format data to MQTT binary format), and has a built-in data verification mechanism to ensure the integrity and accuracy of the converted data. The adaptive data format conversion algorithm achieves cross-protocol field matching based on semantic mapping rules. For example, it maps the JSON-formatted field {"temperature": 25.5} from the HTTP protocol to the binary-formatted field 0x01 0x410xCC 0x00 (the hexadecimal representation of the floating-point number 25.5) from the MQTT protocol. The algorithm has a built-in verification mechanism that verifies the integrity of the converted data by calculating a hash value (such as CRC32). If the verification fails, it triggers a retransmission or an alarm.
[0059] The protocol conversion rules support bidirectional protocol conversion, enabling arbitrary conversion between MQTT, HTTP, and CoAP protocols, as well as adaptation between the proprietary protocol and standard protocols.
[0060] In the adaptive communication module, the original protocol data transmitted by the IoT device is encrypted and compressed using TLS.
[0061] The raw data is encrypted using TLS 1.3 and compressed using the LZ77 algorithm before transmission to ensure security and bandwidth utilization. The system supports hardware acceleration (such as ARM TrustZone) to improve encryption and decryption efficiency, meeting the low latency requirements of high-definition video streams from cameras.
[0062] It also includes a protocol coordination and resource scheduling module: When multiple IoT devices connect simultaneously, protocol conflict detection is performed and communication resources are dynamically allocated. When multiple devices connect simultaneously, the system dynamically allocates communication resources through a priority queue. For example, camera video streams are marked as high priority and allocated more bandwidth; sensor data is transmitted in batches to reduce load. The protocol conflict detection module monitors port occupancy in real time to prevent packet collisions.
[0063] It provides a visual interface to display device status, protocol type, and protocol conversion rules, and supports users to configure, save, and batch distribute the protocol conversion rules.
[0064] Users can view device lists (such as device ID, IP address, and protocol type), real-time data stream statistics (such as throughput and bit error rate), and protocol conversion rules (such as source protocol → target protocol mapping table) through the web interface. The interface provides a "rule template" function, which allows users to quickly configure and batch distribute rules to multiple gateways based on preset templates (such as MQTT → HTTP conversion template).
[0065] In summary, the advantages of this invention are as follows: 1. Real-time monitoring of the local area network via routers or gateways automatically discovers newly connected IoT devices, including at least cameras. Then, the communication data frames emitted by these newly connected IoT devices are collected in real-time and input into a protocol awareness model. This model is built upon a fusion of convolutional neural networks and bidirectional long short-term memory networks. By analyzing the characteristics of the communication data frames, it automatically identifies the protocol type and parses out core business data. Based on the protocol type and core business data, it dynamically learns the feature mapping relationship between the source and target protocols, automatically generating corresponding protocol conversion rules. Finally, using these rules, the original protocol data from the newly connected IoT devices is converted in real-time, and the converted data is sent to the target device to achieve seamless communication between devices using different protocols. In other words, this involves deploying a fusion AI model based on convolutional neural networks and bidirectional long short-term memory networks locally at the network hub (router / gateway). The protocol-aware model enables adaptive, real-time, and accurate identification and conversion of heterogeneous protocols. Its core functionality lies in its ability to automatically capture communication data frames when a new IoT device connects. An AI model intelligently parses the protocol type (including different versions and proprietary protocols) and core business data, then dynamically learns and generates precise bidirectional protocol conversion rules. This process requires no manual intervention, fundamentally reducing configuration and maintenance complexity. This built-in intelligent learning mechanism allows for flexible adaptation to various standard and proprietary protocols, significantly improving system compatibility. The local real-time conversion mechanism avoids network latency issues associated with cloud-based solutions, ensuring efficient inter-device collaboration and real-time interaction capabilities. This breaks down "information silos," achieving seamless communication and ultimately enabling adaptive, real-time, and accurate identification and conversion of heterogeneous protocols. This greatly reduces configuration and maintenance complexity and significantly improves overall system compatibility, collaborative efficiency, and real-time interaction capabilities.
[0066] 2. Real-time monitoring of the local area network via routers or gateways automatically discovers newly connected IoT devices (such as cameras) and utilizes a protocol awareness model based on convolutional neural networks and bidirectional long short-term memory networks to automatically identify various protocol types (such as MQTT, HTTP, CoAP, and proprietary protocols). This significantly reduces the need for manual configuration, improves the efficiency and accuracy of device access, and is especially suitable for large-scale IoT environments. It can quickly adapt to device diversity and reduce deployment costs.
[0067] 3. Based on protocol type and core business data, the system dynamically learns the feature mapping relationship between the source protocol and the target protocol and automatically generates protocol conversion rules. This is thanks to the adaptive data format conversion algorithm and the built-in data verification mechanism, which ensures the integrity and accuracy of the converted data. This enables the system to intelligently adapt to protocol changes (such as version updates), realize bidirectional protocol conversion, enhance the system's flexibility and robustness, and solve the pain point that traditional static rules are difficult to cope with protocol evolution.
[0068] 4. By converting the original protocol data in real time and sending it to the target device, seamless communication between devices using different protocols is achieved. At the same time, TLS encryption and compression processing are supported, ensuring the security and efficiency of data transmission. This advantage improves the overall performance of the IoT system, reduces communication latency, and is suitable for scenarios with high real-time requirements (such as smart security), enhancing user experience and system reliability.
[0069] 5. When multiple IoT devices connect simultaneously, protocol conflict detection is performed and communication resources are dynamically allocated to avoid resource contention and performance bottlenecks. Combined with a visual interface to display device status, protocol type, and conversion rules, it supports user configuration, saving, and batch distribution of rules. This advantage improves the manageability and scalability of the system, simplifies operation and maintenance, and is especially suitable for enterprise-level applications, reducing maintenance complexity.
[0070] 6. Supports arbitrary conversion between multiple standard protocols (such as MQTT, HTTP, CoAP) and private protocols, including bidirectional conversion and version adaptation, which enhances interoperability between devices, breaks down protocol barriers, and promotes the integration of heterogeneous IoT devices.
[0071] 7. By providing a visual interface, users can intuitively view device status and protocol conversion rules, and perform custom configurations, save and batch operations, which lowers the technical threshold and makes it easy for non-professional users to manage protocol conversion.
[0072] 8. Through an AI-based protocol awareness model, the system achieves automatic discovery of IoT devices, protocol identification, and dynamic conversion rule generation, significantly improving the efficiency and accuracy of device access. Its adaptive learning capability can intelligently respond to protocol version updates and diversity, ensuring the integrity of data conversion and real-time seamless communication. At the same time, it supports multi-device resource optimization, TLS encryption security processing, and a visual user interface, enhancing the system's manageability, security, and ease of use, thus demonstrating strong compatibility and scalability in smart home, industrial IoT, and other scenarios.
[0073] While specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and not intended to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. An AI-based method for protocol conversion between routers, gateways, and cameras, characterized in that: Includes the following steps: Step S1: The router or gateway monitors the local area network in real time and automatically discovers newly connected IoT devices; the device types of the IoT devices include at least cameras; Step S2: Real-time acquisition of communication data frames sent by newly connected IoT devices, and input of the communication data frames into a preset protocol awareness model; the protocol awareness model is constructed based on a fusion model of convolutional neural network and bidirectional long short-term memory network, and automatically identifies the protocol type and parses out the core business data by analyzing the characteristics of the communication data frames; the protocol type includes at least MQTT protocol, HTTP protocol, CoAP protocol and private protocol; Step S3: Based on the protocol type and core business data, dynamically learn the feature mapping relationship between the source protocol and the target protocol, and automatically generate the corresponding protocol conversion rules; Step S4: Using the protocol conversion rules, the original protocol data from the newly connected IoT device is converted in real time, and the converted data is sent to the target device to achieve seamless communication between devices using different protocols.
2. The AI-based router, gateway, and camera protocol conversion method as described in claim 1, characterized in that: In step S2, the protocol awareness model supports the identification of different versions of the same protocol; when a protocol version update is detected, the protocol conversion rules are automatically adjusted.
3. The AI-based router, gateway, and camera protocol conversion method as described in claim 1, characterized in that: In step S3, the feature mapping relationship is generated based on an adaptive data format conversion algorithm. The adaptive data format conversion algorithm automatically matches the data field mapping relationship of different protocols and has a built-in data verification mechanism to ensure the integrity and accuracy of the converted data. The protocol conversion rules support bidirectional protocol conversion, enabling arbitrary conversion between MQTT, HTTP, and CoAP protocols, as well as adaptation between the proprietary protocol and standard protocols.
4. The AI-based router, gateway, and camera protocol conversion method as described in claim 1, characterized in that: In step S4, the original protocol data transmitted by the IoT device is encrypted and compressed using TLS.
5. The AI-based router, gateway, and camera protocol conversion method as described in claim 1, characterized in that: It also includes step S5: When multiple IoT devices connect simultaneously, protocol conflict detection is performed and communication resources are dynamically allocated. It provides a visual interface to display device status, protocol type, and protocol conversion rules, and supports users to configure, save, and batch distribute the protocol conversion rules.
6. An AI-based router, gateway, and camera protocol conversion system, characterized in that: Includes the following modules: The device access discovery module is used by routers or gateways to monitor the local area network in real time and automatically discover newly connected IoT devices; the device types of the IoT devices include at least cameras; The protocol awareness module is used to collect communication data frames sent by newly connected IoT devices in real time and input the communication data frames into a preset protocol awareness model. The protocol awareness model is constructed based on a fusion model of convolutional neural network and bidirectional long short-term memory network. By analyzing the characteristics of the communication data frames, it automatically identifies the protocol type and parses out the core business data. The protocol types include at least MQTT protocol, HTTP protocol, CoAP protocol and private protocol. The protocol conversion rule generation module is used to dynamically learn the feature mapping relationship between the source protocol and the target protocol based on the protocol type and core business data, and automatically generate the corresponding protocol conversion rules. An adaptive communication module is used to perform real-time conversion of the original protocol data from newly connected IoT devices using the protocol conversion rules, and send the converted data to the target device to achieve seamless communication between devices using different protocols.
7. The AI-based router, gateway, and camera protocol conversion system as described in claim 6, characterized in that: In the protocol awareness module, the protocol awareness model supports the identification of different versions of the same protocol; when a protocol version update is detected, the protocol conversion rules are automatically adjusted.
8. The AI-based router, gateway, and camera protocol conversion system as described in claim 6, characterized in that: In the protocol conversion rule generation module, the feature mapping relationship is generated based on an adaptive data format conversion algorithm. The adaptive data format conversion algorithm automatically matches the data field mapping relationship of different protocols and has a built-in data verification mechanism to ensure the integrity and accuracy of the converted data. The protocol conversion rules support bidirectional protocol conversion, enabling arbitrary conversion between MQTT, HTTP, and CoAP protocols, as well as adaptation between the proprietary protocol and standard protocols.
9. The AI-based router, gateway, and camera protocol conversion system as described in claim 6, characterized in that: In the adaptive communication module, the original protocol data transmitted by the IoT device is encrypted and compressed using TLS.
10. The AI-based router, gateway, and camera protocol conversion system as described in claim 6, characterized in that: It also includes a protocol coordination and resource scheduling module: When multiple IoT devices connect simultaneously, protocol conflict detection is performed and communication resources are dynamically allocated. It provides a visual interface to display device status, protocol type, and protocol conversion rules, and supports users to configure, save, and batch distribute the protocol conversion rules.