A control method for an IoT gateway integrating local communication and AI computing power

By integrating local communication and AI computing power in the Internet of Things gateway to perform data processing and analysis, the problems of high latency and unreliability caused by relying on cloud computing in the existing technology are solved, and efficient, real-time and reliable IoT data processing and analysis are achieved.

CN119324848BActive Publication Date: 2025-05-06HANGZHOU MIAOLIAN INTERNET OF THINGS TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411844382.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-05-06
Estimated Expiration
2044-12-16

AI Technical Summary

Technical Problem

Existing IoT gateways rely on cloud computing, resulting in unreliable systems when there are high latency and unstable networks. They are prone to performance bottlenecks when there are too many devices, which cannot meet the needs of real-time analysis.

Method used

The Internet of Things gateway control method that integrates local communication and AI computing power is adopted to receive original data packets for protocol analysis and standardization processing, load the matching AI computing power model for local calculation, generate analysis results, and send them to the target terminal device through the local communication module. At the same time, the results are synchronized regularly to the cloud server to optimize network synchronization and data exception handling.

Benefits of technology

It significantly reduces data transmission delay, improves the real-time and reliability of the system, can operate normally when the network is unstable, reduces the burden of cloud computing, and improves the utilization rate of local computing results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119324848B_ABST
    Figure CN119324848B_ABST
Patent Text Reader

Abstract

The present invention provides a control method for an Internet of Things gateway integrating local communication and AI computing power, and relates to the field of data processing technology. The method comprises: receiving an original data packet sent by at least one terminal device; performing protocol analysis on the received data, performing noise filtering and format conversion, loading an AI analysis model corresponding to the device type, inputting standardized data into the AI ​​analysis model, sending the analysis result to the target terminal device, and storing the analysis result and the communication result in a gateway cache module; transmitting the analysis result to a remote cloud server according to a preset time interval, generating synchronization status information and synchronization error log information; generating synchronization error analysis data according to the synchronization error log information, performing network synchronization optimization and data anomaly positioning, and generating synchronization optimization results; processing abnormal data according to the data type and the error type, and performing synchronization update; the present invention improves data processing efficiency and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a control method for an Internet of Things gateway that integrates local communication and AI computing power. Background Art

[0002] At present, IoT gateways are widely used to connect different sensor devices with cloud systems, and realize remote management and control of devices through data transmission and computing. Existing IoT gateways usually adopt a centralized computing model to transmit sensor data to the cloud through the network for processing and analysis. Under this architecture, the gateway mainly plays the role of data transmission, while most of the data processing and intelligent decision-making rely on cloud computing.

[0003] However, this traditional approach has significant technical flaws. First, due to the huge amount of data from IoT devices, the data needs to be processed and analyzed after being transmitted to the cloud, resulting in a long delay time. This is not applicable to application scenarios with high real-time requirements, such as equipment status monitoring and fault prediction. Secondly, relying on cloud computing requires a stable network connection, and when the network is unstable or the bandwidth is limited, it is impossible to ensure timely data transmission and processing, which in turn affects the reliability of the system. In addition, cloud computing also faces bandwidth bottlenecks and computing resource limitations. Especially when the number of connected devices is large, cloud computing may have performance bottlenecks and cannot meet the real-time analysis needs of all devices. Summary of the invention

[0004] The purpose of the present invention is to provide a control method for an Internet of Things gateway that integrates local communication and AI computing power, aiming to solve the problems mentioned in the background technology.

[0005] In order to solve the above technical problems, the technical solution of the present invention is as follows:

[0006] A control method for an Internet of Things gateway integrating local communication and AI computing power, the method comprising:

[0007] receiving an original data packet sent by at least one terminal device, wherein the original data packet includes device identification information and original sensing data, and generating receiving data;

[0008] Perform protocol analysis on the received data, extract device identification information and original sensor data, and generate device mapping relationship data based on the device identification information to generate analysis data;

[0009] Perform noise filtering and format conversion on the raw sensor data in the parsed data to generate standardized data;

[0010] According to the device type in the device mapping relationship data, the AI ​​computing model corresponding to the device type is loaded from the preset model library to generate an AI analysis model;

[0011] Input standardized data into the AI ​​analysis model, perform local calculations, and generate analysis results;

[0012] Determine the target terminal device according to the device mapping relationship data, send the analysis result to the target terminal device through the local communication module, receive the response information of the target terminal device, and generate the communication result;

[0013] The analysis results and communication results are stored in the gateway cache module, and the data processing timestamp is recorded to generate storage data;

[0014] Extract analysis results from stored data and generate synchronized data sets according to preset time intervals, upload synchronized data sets to remote cloud servers, and generate synchronized status information and synchronized error log information;

[0015] Extract network delay records, packet loss information, and verification failure records based on synchronization error log information, generate synchronization error analysis data, perform network synchronization optimization and data anomaly location, and generate synchronization optimization results;

[0016] According to the data type and error type, perform field repair, format repair and content repair on the abnormal data in the synchronization optimization results to generate a repair data set;

[0017] Perform synchronization update on the repair data set and generate a synchronization update result.

[0018] Preferably, protocol parsing is performed on the received data to extract device identification information and original sensor data, and device mapping relationship data is generated according to the device identification information to generate parsed data, including:

[0019] By parsing the IoT protocol, the original data packet is formatted and the device identification information and original sensor data are extracted;

[0020] According to the device identification information, searching and generating device mapping relationship data from a preset device information library, the device mapping relationship data including device type, device configuration and device operation status;

[0021] Associate the raw sensor data with the device type and device configuration to generate parsed data.

[0022] Preferably, the original sensor data in the analyzed data is subjected to noise filtering and format conversion to generate standardized data, including:

[0023] Use an adaptive filtering algorithm to remove noise from the original sensor data in the analytical data to obtain denoised data;

[0024] The denoised data is formatted and converted into a unified standardized data format, including unifying the data units, aligning the timestamps, and adjusting the data precision to obtain standardized data.

[0025] Preferably, according to the device type in the device mapping relationship data, an AI computing model corresponding to the device type is loaded from a preset model library to generate an AI analysis model, including:

[0026] According to the device type in the device mapping relationship data, query the AI ​​computing model with the highest matching degree between the device type and the sensor data type; the AI ​​computing model is a pre-trained model that supports specific reasoning tasks; the matching degree is calculated as follows:

[0027] ;

[0028] in, The matching degree between the current device type and the AI ​​computing model. is the number of sensor data types, For the The weight of each sensor data type, For the The sensor data type and The matching function of the device type represents the cosine value of the angle between the two in the feature space. ,in, Respectively Sensor data types and Device Type The angle in the eigenvector space, is the adjustment coefficient, is the computational complexity of the current AI computing model, is the reference computing capability of the device, For the The number of conflicting features between the AI ​​computing model and the current device type indicates the number of features not supported in the device mapping data. is the total number of AI computing models;

[0029] Load the AI ​​computing model and initialize it to enable it to perform reasoning and generate an AI analysis model.

[0030] Preferably, determining the target terminal device according to the device mapping relationship data, sending the analysis result to the target terminal device through the local communication module, and receiving the response information of the target terminal device to generate the communication result includes:

[0031] According to the device mapping relationship data, identify the target terminal device that needs to receive the analysis result;

[0032] According to the communication protocol and data format requirements of the target terminal device, the analysis results are packaged and encoded through the local communication module and sent to the target terminal device;

[0033] Receive feedback information from the target terminal device, generate communication results, and record data sending status.

[0034] Preferably, the analysis results and communication results are stored in the gateway cache module, and the data processing timestamp is recorded to generate storage data, including:

[0035] The generated analysis results and communication results are stored in the form of data records in the gateway cache module;

[0036] During the storage process, a timestamp is marked for each storage record and the records are sorted according to the timestamp sequence to form storage data;

[0037] Dynamically monitor the available storage space and data processing load in the cache module, calculate the current storage pressure based on the real-time data volume, and generate a storage pressure factor; the calculation formula for the storage pressure factor is:

[0038] ;

[0039] in, is the storage pressure factor, is the currently used cache capacity, is the total cache capacity, is the number of currently active data records, is the maximum number of active data records allowed, To cache the real-time fluctuation range of the load between the current moment and the previous moment, The maximum load fluctuation allowed for the cache load. The interval between the current time of the cache module and the last cache cleanup time. The reference cleanup interval for the cache module. , , , and is the weight coefficient;

[0040] When the storage pressure factor exceeds the preset storage threshold, the importance score of the data is calculated, and cache replacement is performed based on the data importance score. The calculation formula for the importance score is:

[0041] ;

[0042] in, For the The importance score of the data. For the The access frequency of the data, For the The most recent time the data was used. For the The importance of the content of the data, , For the The type criticality of the data item, the value is 1 for status data and 0.5 for other data. For the The correlation between the data item and the device mapping relationship data is 1 for direct correlation and 0.5 for indirect correlation. For the The number of times the data is used. , and is the weight coefficient, For the The current time of the data The interval between the last use of the data. For the The reference time interval value of the data. , , , , ,and is the weight coefficient;

[0043] Regularly clean up redundant data in the cache whose importance score is lower than the preset importance threshold, and release storage space through timestamp records.

[0044] Preferably, according to a preset time interval, the analysis results are extracted from the stored data and a synchronization data set is generated, the synchronization data set is uploaded to a remote cloud server, and synchronization status information and synchronization error log information are generated, including:

[0045] Extract analysis results from stored data at preset time intervals to generate synchronized data sets;

[0046] Upload the synchronized data set to the remote cloud server and record the upload timestamp of each data;

[0047] The cloud server generates synchronization status information based on the received data, including the amount of successfully synchronized data, the identification of unsynchronized data, and the failure reason of the unsynchronized data;

[0048] If data is missing, format abnormal, or transmission fails during synchronization, the cloud server generates error log information, which includes error type, error data identifier, and data location;

[0049] The synchronization status information and error log information are stored in the gateway cache module.

[0050] Preferably, according to the synchronization error log information returned by the cloud, network synchronization optimization and data anomaly location are performed to generate synchronization optimization results, including:

[0051] Extract network delay records, packet loss information and verification failure records from error log information to generate synchronization error analysis data;

[0052] According to the network delay records and packet loss information, the average network delay time and data packet loss rate are calculated to generate network evaluation data;

[0053] Dynamically adjust the data synchronization frequency of the gateway according to the network evaluation data to generate an optimized synchronization frequency value; the calculation formula for the optimized synchronization frequency value is:

[0054] ;

[0055] in, To optimize the synchronization frequency value, is the initial synchronization frequency, is the current value of network delay, is the permissible threshold of network delay, is the current value of the data packet loss rate, is the maximum allowed packet loss rate, is the difference between the largest data packet and the smallest data packet, is the size of the reference packet, , and is the weight coefficient;

[0056] According to the verification failure records, the abnormal data packets are extracted and repackaged to generate supplementary synchronization data;

[0057] The optimized synchronization frequency value and the supplementary synchronization data are recorded as synchronization optimization results and stored in the gateway cache module.

[0058] Preferably, according to the data type and the error type, field repair, format repair and content repair are performed on the abnormal data in the synchronization optimization result to generate a repair data set, including:

[0059] Extract abnormal data packets from the supplementary synchronization data in the synchronization optimization result to generate an abnormal data set;

[0060] According to the data type and error type in the abnormal data set, the abnormal data is divided into field missing data, format error data and content abnormal data to generate a classified abnormal data set;

[0061] For missing field data in the classified abnormal data set, generate repair field data based on the preset field template;

[0062] For the format error data in the classified abnormal data set, the data format is reorganized according to the target data structure to generate repaired format data;

[0063] For the content anomaly data in the classified anomaly data set, the data value is recalculated in combination with the equipment operation status and historical data to generate repair content data;

[0064] The repair field data, repair format data and repair content data are merged into a repair data set and stored in the gateway cache module.

[0065] Preferably, performing synchronous update on the repair data set and generating a synchronous update result comprises:

[0066] Extracting repair field data, repair format data and repair content data from the repair data set to generate an update synchronization data set;

[0067] According to the cloud synchronization requirements, the updated synchronization data set is repackaged and uploaded to the cloud server, and the upload timestamp of each data is recorded to generate a synchronization status record;

[0068] The synchronization status record and the processing process of the repair data are integrated into the synchronization update result and stored in the gateway cache module.

[0069] The above solution of the present invention includes at least the following beneficial effects:

[0070] By integrating the local computing method of AI computing power, the present invention effectively reduces the delay problem caused by the traditional IoT gateway's reliance on cloud computing. After the original data packet is directly received by the gateway and undergoes protocol parsing and standardization processing, it can be input into the locally loaded AI analysis model for calculation and analysis, thereby generating analysis results directly in the gateway. There is no need to upload large-scale sensor data to the cloud for processing, which significantly reduces the network delay of data transmission. This local computing method is particularly suitable for scenarios with high real-time requirements, such as equipment status monitoring and real-time fault prediction. It can provide timely feedback on analysis results and provide reliable real-time support for terminal devices.

[0071] The present invention enhances the local data management capability of the gateway by storing analysis results and communication results in the gateway and recording data processing timestamps. When the network connection is limited or completely interrupted, the gateway can still complete data reception, processing and analysis normally to ensure that the basic functions of the system are maintained. Through the cache mechanism and timestamp recording, the system can efficiently supplement data synchronization after the network is restored, thereby ensuring the consistency and integrity of the data and improving the stability and reliability of the system.

[0072] The present invention generates standardized data directly in the gateway by receiving raw data packets, protocol parsing, noise filtering and format conversion, providing high-quality input for the AI ​​computing model. Standardization eliminates the problem of inconsistent data formats from different terminal devices and reduces additional preprocessing time. Standardized data is directly input into the AI ​​computing model for local calculation, further improving the speed and accuracy of data analysis. Compared with the traditional method that requires transmission to the cloud for processing, the present invention can complete data analysis in a shorter time, thereby quickly generating analysis results.

[0073] By generating device mapping relationship data, the gateway can quickly determine the target terminal device, send the analysis results to the target device through the local communication module, and receive the response information of the target device at the same time. This design makes the data interaction between the gateway and the device more efficient and reduces unnecessary transmission delays. Especially in scenarios where multiple devices are running at the same time, the gateway's fast mapping capability can ensure that each device receives targeted analysis results, optimizing the overall operating efficiency of the system.

[0074] The present invention uses a regular synchronization method to package the analysis results stored in the gateway into a synchronized data set and upload it to a remote cloud server. This method ensures that the cloud can continuously receive the analysis results generated by the gateway, providing global data support for the cloud. On this basis, the cloud can also further optimize the system operation strategy based on global information, while the gateway completes real-time calculations locally, and the two form an efficient and collaborative computing architecture. Compared with the traditional model that relies entirely on the cloud, the design of the present invention effectively reduces the cloud computing burden and improves the system's utilization of local calculation results.

[0075] Through various steps of data processing, including protocol parsing, standardization processing and timestamp recording, the present invention can comprehensively manage and optimize sensor data. The generation of standardized data ensures the consistency of data during the analysis process and avoids analysis deviations caused by inconsistent formats. In addition, by recording the timestamp of data processing, the gateway can accurately track the data processing process and provide a complete historical basis for subsequent data synchronization and analysis.

[0076] The present invention provides flexible support for different types of devices and data by generating device mapping relationship data and loading AI computing power models. The gateway can load the matching AI computing power model according to the device type, thereby meeting the computing needs of different devices. This design improves the applicability of the gateway, enabling it to be applied to a variety of IoT scenarios, such as smart homes, industrial monitoring, and environmental monitoring, fully meeting the diverse needs of different applications for data processing.

[0077] The present invention is not limited to the data transfer function of the traditional gateway, but also integrates data analysis and processing capabilities into the gateway, making it a core node with intelligent analysis capabilities. By generating analysis results through local calculations and interacting with terminal devices in real time, the present invention significantly improves the intelligence level of the gateway, reduces dependence on external computing resources, and provides new ideas for building a more efficient and intelligent Internet of Things system. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] Figure 1 It is a flowchart of a control method for an Internet of Things gateway integrating local communication and AI computing power provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0079] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0080] like Figure 1 As shown, an embodiment of the present invention proposes a control method for an Internet of Things gateway integrating local communication and AI computing power, a control method for an Internet of Things gateway integrating local communication and AI computing power, characterized in that the method includes:

[0081] S100, receiving an original data packet sent by at least one terminal device, wherein the original data packet includes device identification information and original sensor data, and generating received data;

[0082] S200, performing protocol parsing on the received data, extracting device identification information and original sensor data, and generating device mapping relationship data according to the device identification information, thereby generating parsed data;

[0083] S300, performing noise filtering and format conversion on the original sensor data in the analyzed data to generate standardized data;

[0084] S400, according to the device type in the device mapping relationship data, load the AI ​​computing model corresponding to the device type from the preset model library to generate an AI analysis model;

[0085] S500, input the standardized data into the AI ​​analysis model, perform local calculations, and generate analysis results;

[0086] S600, determining a target terminal device according to the device mapping relationship data, sending the analysis result to the target terminal device through the local communication module, receiving response information from the target terminal device, and generating a communication result;

[0087] S700, storing the analysis results and communication results in the gateway cache module, and recording the data processing timestamp to generate storage data;

[0088] S800, extracting analysis results from the stored data and generating a synchronization data set according to a preset time interval, uploading the synchronization data set to a remote cloud server, and generating synchronization status information and synchronization error log information;

[0089] S900, extract network delay records, packet loss information and verification failure records according to synchronization error log information, generate synchronization error analysis data, perform network synchronization optimization and data anomaly location, and generate synchronization optimization results;

[0090] S1000, performing field repair, format repair, and content repair on abnormal data in the synchronization optimization result according to the data type and error type, and generating a repair data set;

[0091] S1100: Perform synchronous update on the repair data set to generate a synchronous update result.

[0092] In an embodiment of the present invention, by receiving the original data packet sent by the terminal device and parsing it, the process of receiving original data from multiple terminal devices can be effectively implemented, and the device identification information and sensor data can be extracted. After the device identification information and sensor data in the original data packet are converted into device mapping relationship data and parsed data, the gateway can clearly identify the source of each data packet and its device type, thereby laying the foundation for subsequent AI computing model loading and local calculation. Noise filtering and format conversion are performed on the sensor data in the parsed data to further improve the quality and consistency of the data. By standardizing the data format, the compatibility issues of data transmission and processing can be significantly reduced, so that the data can be efficiently used in the analysis model. The generation of device mapping relationship data enables the gateway to quickly locate the target terminal device and provide an accurate basis for subsequent data transmission.

[0093] By loading the AI ​​computing model and performing local calculations, the analysis results can timely feedback the operating status and prediction information of the equipment, and improve the intelligent operation capability of the equipment. The analysis results are sent to the target terminal device through the local communication module and the response information is received, realizing a complete closed loop of two-way data flow, so that the gateway has real-time and reliability in local communication. At the same time, the analysis results and communication results are stored in the gateway cache module, and the data processing timestamp is recorded, which can provide a historical reference for the subsequent processing of the data. By regularly extracting the analysis results from the stored data to generate a synchronized data set and uploading it to the cloud server, not only can the cloud backup of the data be guaranteed, but also the centralized analysis and management of the data can be performed in the cloud. In addition, by analyzing the synchronization error log, the delay, packet loss and verification failure problems in the data synchronization process can be monitored in real time, and the abnormal data can be optimized and repaired. Finally, the data consistency and integrity between the gateway and the cloud are further guaranteed by updating and synchronously uploading the repaired data.

[0094] Through the optimization of this series of steps, the interaction between devices and gateways has become more efficient and intelligent, and the collaboration between the cloud and local has been further enhanced, providing IoT applications with reliable, real-time and efficient data control and analysis capabilities.

[0095] In a preferred embodiment of the present invention, protocol parsing is performed on received data to extract device identification information and original sensor data, and device mapping relationship data is generated according to the device identification information to generate parsed data, including:

[0096] By parsing the IoT protocol, the original data packet is formatted and the device identification information and original sensor data are extracted;

[0097] According to the device identification information, searching and generating device mapping relationship data from a preset device information library, the device mapping relationship data including device type, device configuration and device operation status;

[0098] Associate the raw sensor data with the device type and device configuration to generate parsed data.

[0099] In an embodiment of the present invention, the process of performing protocol parsing on received data realizes compatibility support for different IoT protocol data. In the process of parsing the original data packet into device identification information and original sensor data, the diversified protocol standards can be unified by formatting the protocol, which greatly improves the efficiency of data parsing. The extraction of device identification information and the generation of mapping relationship data enable the gateway to quickly locate the data source and device attributes, providing a clear logical basis for subsequent data processing. The association of original sensor data with device type and device configuration further enhances the traceability and logical integrity of device information. The generation of parsed data allows each data packet to be clearly identified and classified, providing high-quality input for subsequent data calculation and analysis.

[0100] Through the implementation of this technical process, the gateway can be compatible with sensor data in multiple protocol formats without the need to develop a separate protocol parsing module, which significantly improves the scalability and versatility of the gateway. The generation process of parsed data can also help the gateway quickly locate and process data source devices, improving the accuracy and efficiency of data processing.

[0101] More specifically, by parsing the IoT protocol, the original data packet is formatted and processed to extract device identification information and original sensor data, including:

[0102] The gateway uses the built-in protocol parsing module to identify the protocol type based on the protocol header information of the original data packet and perform corresponding formatting processing for different protocols. For example:

[0103] For the MQTT protocol, parse the message subject and payload, extract the device identification information and data payload;

[0104] For HTTP protocol, parse the field data in the request body and extract the device identification and sensor data;

[0105] For custom protocols, parse fixed or dynamic length data segments to identify device identification and sensor information.

[0106] The result of the formatting process is to convert the original format of the protocol into a unified internal data structure, providing standardized data input for subsequent steps.

[0107] More specifically, according to the device identification information, the device mapping relationship data is searched and generated from the preset device information library, and the device mapping relationship data includes the device type, device configuration and device operation status, specifically including:

[0108] After receiving the device identification information, the gateway searches for the record corresponding to the device identification from a preset device information library, such as a local database or a cache module, and extracts the meta information of the device, such as:

[0109] Device type: such as temperature sensors, motion detectors, industrial controllers, etc.

[0110] Equipment configuration: such as sensor range, sampling frequency, data unit, etc.

[0111] Device operating status: such as device online status, such as "online" or "offline"; device failure status, such as hardware failure, sensor abnormality, etc.; operating parameters, such as temperature, pressure, humidity, battery power, etc.

[0112] The generated device mapping relationship data is stored in the form of key-value pairs, which associates the device identifier with the above information. This structure provides accurate device management support for subsequent steps, and supports dynamic updates and expansions.

[0113] The preset device information library is a database or data storage module in the gateway for storing basic information of IoT devices, mainly including static information of the devices and some dynamic operating parameters. The information library provides basic support for the gateway to manage devices and process data.

[0114] The data of the preset device information database is usually stored in a structured form, which can be implemented using a relational database such as MySQL, a non-relational database such as MongoDB, or an embedded storage such as SQLite. Its main contents include the following parts:

[0115] Device identification information: An ID that uniquely identifies each device, such as a device serial number or MAC address. The device identification is used to distinguish different devices and match received data.

[0116] Device type: refers to the specific category of the device, such as temperature sensor, humidity sensor, industrial controller, etc. The device type information provides a basis for the subsequent loading of the corresponding AI computing model.

[0117] Device configuration: Contains static configuration parameters of the device, such as: range, such as the range of a temperature sensor 0-100°C. Sampling frequency, such as collecting data once per second. Data format, such as JSON, binary. The device configuration provides the necessary information for parsing raw data and generating standardized data.

[0118] Device operating status: Contains the current dynamic status information of the device, such as online status, fault status, battery power, and current collected values, such as real-time measured temperature data.

[0119] Dynamic status information can be updated through data packets uploaded by the device, or dynamically maintained through a heartbeat mechanism.

[0120] When the gateway is started or a device is connected, the system will enter the basic information of the device, such as identification, type, and configuration, into the preset device information database.

[0121] When the gateway receives a data packet, it queries the information base according to the device identification to obtain the corresponding device type and configuration, which are used to parse the data packet and generate device mapping relationship data.

[0122] When the device operating status changes, such as status alarms and battery power, the dynamic fields in the information library will be updated.

[0123] The update operation may come from packet parsing or regular status scanning of the gateway.

[0124] More specifically, the raw sensor data is associated with the device type and device configuration to generate parsed data, including:

[0125] Parsing data is to further associate the raw sensor data with the specific characteristics of the device based on the device mapping relationship data. For example:

[0126] The data from the temperature sensor may be in degrees Celsius, and the gateway will mark it as temperature data based on the device configuration record;

[0127] The data from the motion detector may be a binary signal, 0 for stillness and 1 for motion, which the gateway will mark as status data.

[0128] The generation of parsed data enables the classification and labeling of sensor data, so that the data can be efficiently processed and analyzed in subsequent steps. Parsed data is stored in a structured form, and common formats include JSON or binary serialized data.

[0129] In a preferred embodiment of the present invention, noise filtering and format conversion are performed on the original sensor data in the analyzed data to generate standardized data, including:

[0130] Use an adaptive filtering algorithm to remove noise from the original sensor data in the analytical data to obtain denoised data;

[0131] The denoised data is formatted and converted into a unified standardized data format, including unifying the data units, aligning the timestamps, and adjusting the data precision to obtain standardized data.

[0132] In the embodiment of the present invention, in the process of noise filtering and format conversion of the parsed data, noise filtering is implemented through an adaptive filtering algorithm, which can effectively remove random noise and interference data in the sensor data, thereby ensuring the accuracy and reliability of the data. The problem of inconsistent data formats from different terminal devices is solved by unified processing of data formats. The unification of units, timestamp alignment, and data accuracy adjustment steps further improve the compatibility of data, so that the gateway does not need to incur additional burdens due to format issues when processing data.

[0133] The implementation of this data preprocessing step ensures consistency and high quality of sensor data in subsequent analysis, greatly improving the processing efficiency of the AI ​​computing model. By effectively removing noise, analysis errors caused by data noise can be avoided, ensuring the reliability of the analysis results.

[0134] More specifically, an adaptive filtering algorithm is used to remove noise from the original sensor data in the analytical data to obtain denoised data, which specifically includes:

[0135] Noise removal is to eliminate random errors and external interference in sensor data and improve data accuracy and availability. Adaptive filtering algorithms analyze the statistical characteristics of sensor data in real time, such as mean and variance, and dynamically adjust filtering parameters to adapt to the characteristics of different types of noise. For example:

[0136] For high-frequency random noise: use low-pass filtering to smooth the data curve;

[0137] For sudden outliers: use median filtering or Kalman filtering to remove abnormal points.

[0138] The filtered denoised data can significantly improve the credibility of the data and provide high-quality input for subsequent format conversion and analysis steps.

[0139] More specifically, the denoised data is converted into a unified standardized data format, including unifying the data units, aligning the timestamps, and adjusting the data precision to obtain standardized data, including:

[0140] Format conversion is to deal with the problem of inconsistent sensor data formats from different devices. The generation of standardized data formats includes the following sub-steps:

[0141] Standardize data units: for example, standardize temperature data to Celsius and pressure data to Pascal;

[0142] Timestamp alignment: Generate accurate timestamps for each data record based on the gateway’s local time or network time protocol;

[0143] Data precision adjustment: Adjust the data precision to a uniform number of decimal places to ensure the consistency of subsequent calculations.

[0144] The generation of standardized data eliminates differences between devices, making data easier to store, transmit, and analyze, and becoming a unified input format for subsequent steps.

[0145] In a preferred embodiment of the present invention, according to the device type in the device mapping relationship data, an AI computing model corresponding to the device type is loaded from a preset model library to generate an AI analysis model, including:

[0146] According to the device type in the device mapping relationship data, query the AI ​​computing model with the highest matching degree between the device type and the sensor data type; the AI ​​computing model is a pre-trained model that supports specific reasoning tasks; the matching degree is calculated as follows:

[0147] ;

[0148] in, The matching degree between the current device type and the AI ​​computing model. is the number of sensor data types, For the The weight of each sensor data type, For the The sensor data type and The matching function of the device type represents the cosine value of the angle between the two in the feature space. ,in, Respectively Sensor data types and Device Type The angle in the eigenvector space, is the adjustment coefficient, is the computational complexity of the current AI computing model, is the reference computing capability of the device, For the The number of conflicting features between the AI ​​computing model and the current device type indicates the number of features not supported in the device mapping data. is the total number of AI computing models;

[0149] Load the AI ​​computing model and initialize it to enable it to perform reasoning and generate an AI analysis model.

[0150] In an embodiment of the present invention, when loading an AI computing model, based on the device type in the device mapping relationship data, the AI ​​computing model with the highest matching degree is queried, so that the loaded model can accurately match the needs of the current device. The correlation between the device type and the AI ​​computing model is quantitatively analyzed through the matching degree calculation formula to ensure that the loaded model has the best adaptability. The loaded and initialized AI analysis model has the ability to perform efficient reasoning and analysis for specific sensor data types.

[0151] Through this process, the gateway can load the most suitable analysis model for different devices, achieving more targeted and efficient local computing. At the same time, this optimized design significantly reduces the problem of computing resource waste caused by incorrect model selection and enhances the synergy between devices and gateways.

[0152] More specifically, the preset model library is a module in the gateway used to store and manage AI computing models, which mainly contains pre-trained models corresponding to different types of devices. These models can be loaded and run in the gateway to complete local computing and data analysis tasks.

[0153] The model files of the preset model library are usually stored in binary format, using the serialization format supported by the model framework, such as TensorFlowLite and ONNX. The model library structure includes the following:

[0154] Basic information for each model, including:

[0155] Model ID, such as Model001.

[0156] The device type and data type that the model is adapted to, such as temperature sensor, pressure sensor, etc.

[0157] Model version number, used to distinguish different versions of models.

[0158] Meta information is usually stored in the form of structured data for fast query and matching.

[0159] Specific model files are usually stored in the following form:

[0160] Lightweight model files, such as tflite files in TensorFlowLite format.

[0161] Model configuration file, which defines model input and output, data preprocessing requirements, etc.

[0162] Model performance indicators:

[0163] Key performance parameters of the storage model, such as: Model size, i.e., number of bytes. Model computational complexity, such as number of parameters or floating point operations. Model inference latency.

[0164] When the gateway is started, the preset model library loads all stored model files and their meta information. Model files may be stored in the local storage of the gateway or on a remote server and downloaded dynamically when needed.

[0165] The query basis includes device type, such as the prediction model corresponding to the temperature sensor. Data type, such as the time series prediction model. The queried model file will be loaded into the gateway memory and initialized to the running state.

[0166] The model library supports dynamic updates of model files, for example: replacing old version models based on performance optimization; adding support for new device types. Model updates can be achieved by regularly synchronizing the latest model files in the remote server.

[0167] In a preferred embodiment of the present invention, the target terminal device is determined according to the device mapping relationship data, the analysis result is sent to the target terminal device through the local communication module, and the response information of the target terminal device is received to generate the communication result, including:

[0168] According to the device mapping relationship data, identify the target terminal device that needs to receive the analysis result;

[0169] According to the communication protocol and data format requirements of the target terminal device, the analysis results are packaged and encoded through the local communication module and sent to the target terminal device;

[0170] Receive feedback information from the target terminal device, generate communication results, and record data sending status.

[0171] In the embodiment of the present invention, the target terminal device is located through the device mapping relationship data, and the data is encapsulated and encoded based on the communication protocol and data format requirements of the target terminal device, which can ensure that the analysis results are correctly received and parsed by the target device during the transmission process. The response information of the target terminal device is received and the communication result is generated, so that the two-way communication between the gateway and the device is more real-time and stable.

[0172] The realization of this two-way communication process not only enhances the communication capability of the gateway, but also enables real-time feedback from the device, providing a basis for the gateway's subsequent decision-making. At the same time, the compatibility of the gateway is further enhanced by supporting data transmission protocols and formats.

[0173] In a preferred embodiment of the present invention, the analysis results and communication results are stored in the gateway cache module, and the data processing timestamp is recorded to generate storage data, including:

[0174] The generated analysis results and communication results are stored in the form of data records in the gateway cache module;

[0175] During the storage process, a timestamp is marked for each storage record and the records are sorted according to the timestamp sequence to form storage data;

[0176] Dynamically monitor the available storage space and data processing load in the cache module, calculate the current storage pressure based on the real-time data volume, and generate a storage pressure factor; the calculation formula for the storage pressure factor is:

[0177] ;

[0178] in, is the storage pressure factor, is the currently used cache capacity, is the total cache capacity, is the number of currently active data records, is the maximum number of active data records allowed, To cache the real-time fluctuation range of the load between the current moment and the previous moment, The maximum load fluctuation allowed for the cache load. The interval between the current time of the cache module and the last cache cleanup time. The reference cleanup interval for the cache module. , , , and is the weight coefficient;

[0179] When the storage pressure factor exceeds the preset storage threshold, the importance score of the data is calculated, and cache replacement is performed based on the data importance score. The calculation formula for the importance score is:

[0180] ;

[0181] in, For the The importance score of the data. For the The access frequency of the data, For the The most recent time the data was used. For the The importance of the content of the data, , For the The type criticality of the data item, the value is 1 for status data and 0.5 for other data. For the The correlation between the data item and the device mapping relationship data is 1 for direct correlation and 0.5 for indirect correlation. For the The number of times the data is used. , and is the weight coefficient, For the The current time of the data The interval between the last use of the data. For the The reference time interval value of the data. , , , , ,and is the weight coefficient;

[0182] Regularly clean up redundant data in the cache whose importance score is lower than the preset importance threshold, and release storage space through timestamp records.

[0183] In an embodiment of the present invention, when the analysis results and communication results are stored in the gateway cache module, the storage logic of the data can be effectively managed by marking the timestamp for each storage record and sorting according to the timestamp. Dynamic monitoring of the available storage space and data processing load of the cache module can reflect the cache pressure state in real time, and quantitatively analyze the pressure through the storage pressure factor formula. When the storage pressure exceeds the threshold, the system automatically calculates the importance score of the data, and replaces the data in the cache with priority according to the score, thereby freeing up more storage space.

[0184] This process of dynamic management and optimized storage can maximize the storage of important data within limited cache space, while providing data traceability through timestamp records, providing a more reliable foundation for subsequent data processing and analysis.

[0185] In a preferred embodiment of the present invention, according to a preset time interval, the analysis results are extracted from the stored data and a synchronization data set is generated, the synchronization data set is uploaded to a remote cloud server, and synchronization status information and synchronization error log information are generated, including:

[0186] Extract analysis results from stored data at preset time intervals to generate synchronized data sets;

[0187] Upload the synchronized data set to the remote cloud server and record the upload timestamp of each data;

[0188] The cloud server generates synchronization status information based on the received data, including the amount of successfully synchronized data, the identification of unsynchronized data, and the failure reason of the unsynchronized data;

[0189] If data is missing, format abnormal, or transmission fails during synchronization, the cloud server generates error log information, which includes error type, error data identifier, and data location;

[0190] The synchronization status information and error log information are stored in the gateway cache module.

[0191] In an embodiment of the present invention, when synchronizing the stored data to the cloud server, the analysis results are extracted from the stored data and a synchronized data set is generated at a preset time interval. The data packets in the synchronization process are all recorded with the upload timestamp to facilitate the subsequent monitoring of the data synchronization status. After receiving the data, the cloud server will generate synchronization status information, including the number of successfully synchronized data and the identification of unsynchronized data, and further record the failure reasons for the unsynchronized data. If data is missing, the format is abnormal, or the transmission fails during the synchronization process, the error log information generated by the cloud server will be detailed with the error type, data identification, and data location.

[0192] This process achieves efficient data synchronization and provides a clear basis for subsequent optimization through the generation of error logs, making data transmission more reliable and traceable.

[0193] More specifically, according to a preset time interval, the analysis results are extracted from the stored data to generate a synchronized data set, which specifically includes:

[0194] Setting of preset time interval: Depending on the specific target requirements, the preset time interval can be fixed, such as 10 seconds, 1 minute, or dynamically adjusted, and can also be adjusted in real time according to network bandwidth and data volume.

[0195] Extract analysis results from stored data: Stored data includes analysis results and communication results. The gateway filters out the data items that need to be uploaded according to the preset synchronization rules, such as time order or priority. These data items usually contain the following information: analysis results, data source device identification, generation timestamp, etc.

[0196] Generate a synchronized dataset: The extracted data is organized into a batch, the synchronized dataset. The synchronized dataset is usually in JSON, Protobuf or other lightweight formats, and contains the following fields:

[0197] Data identification: a unique identifier for each piece of data, used for cloud-based deduplication;

[0198] Analysis results: locally generated analysis data, which may include predicted values, anomaly markers, etc.

[0199] Timestamp: The time when data was generated, for easy recording and sorting in the cloud.

[0200] After the synchronization data set is generated, it is temporarily stored in the transmission queue and waits to be uploaded to the cloud. The advantage of this design is that batch data transmission can significantly reduce transmission overhead and ensure data integrity and orderliness.

[0201] In a preferred embodiment of the present invention, network synchronization optimization and data anomaly location are performed according to the synchronization error log information returned by the cloud, and synchronization optimization results are generated, including:

[0202] Extract network delay records, packet loss information and verification failure records from error log information to generate synchronization error analysis data;

[0203] According to the network delay records and packet loss information, the average network delay time and data packet loss rate are calculated to generate network evaluation data;

[0204] Dynamically adjust the data synchronization frequency of the gateway according to the network evaluation data to generate an optimized synchronization frequency value; the calculation formula for the optimized synchronization frequency value is:

[0205] ;

[0206] in, To optimize the synchronization frequency value, is the initial synchronization frequency, is the current value of network delay, is the permissible threshold of network delay, is the current value of the data packet loss rate, is the maximum allowed packet loss rate, is the difference between the largest data packet and the smallest data packet, is the size of the reference packet, , and is the weight coefficient;

[0207] According to the verification failure records, the abnormal data packets are extracted and repackaged to generate supplementary synchronization data;

[0208] The optimized synchronization frequency value and the supplementary synchronization data are recorded as synchronization optimization results and stored in the gateway cache module.

[0209] In an embodiment of the present invention, by analyzing the synchronization error log information returned by the cloud, extracting network delay records, packet loss information and verification failure records, generating synchronization error analysis data, and dynamically adjusting the network synchronization frequency. The calculation formula for optimizing the synchronization frequency value can effectively optimize the synchronization frequency dynamically in combination with the current network status, reducing data packet loss and delay problems. At the same time, the abnormal data packets are repackaged, and supplementary synchronization data is generated and stored in the gateway cache module.

[0210] This optimized design ensures the reliability of data synchronization and further improves the efficiency of data transmission through dynamic adjustment.

[0211] In a preferred embodiment of the present invention, field repair, format repair and content repair are performed on abnormal data in the synchronization optimization result according to the data type and error type to generate a repair data set, including:

[0212] Extract abnormal data packets from the supplementary synchronization data in the synchronization optimization result to generate an abnormal data set;

[0213] According to the data type and error type in the abnormal data set, the abnormal data is divided into field missing data, format error data and content abnormal data to generate a classified abnormal data set;

[0214] For missing field data in the classified abnormal data set, generate repair field data based on the preset field template;

[0215] For the format error data in the classified abnormal data set, the data format is reorganized according to the target data structure to generate repaired format data;

[0216] For the content anomaly data in the classified anomaly data set, the data value is recalculated in combination with the equipment operation status and historical data to generate repair content data;

[0217] The repair field data, repair format data and repair content data are merged into a repair data set and stored in the gateway cache module.

[0218] In an embodiment of the present invention, when performing repair processing on abnormal data in the synchronization optimization result, the field missing data, format error data and content abnormal data can be accurately located through the classification of abnormal data, and the repair field data, repair format data and repair content data are generated respectively. The repair field data is generated based on the preset field template, the format error data is reorganized in combination with the target data structure, the content abnormal data is recalculated using the equipment operation status and historical data, and finally a repair data set is generated.

[0219] This repair process improves the integrity and consistency of the data, providing a higher quality foundation for subsequent data synchronization and analysis.

[0220] More specifically, for the missing data of the fields in the classified abnormal data set, the repair field data is generated based on the preset field template, including:

[0221] Missing field data refers to the situation where some key fields in the data record are empty or missing. For example, the device identification field or timestamp field may be missing due to incomplete data packets or transmission errors. This missing field will affect the parsing and subsequent use of the data.

[0222] Implementation method: The gateway is pre-configured with field templates, which define the fields that each data type should have and their default values. These field templates are usually designed based on the device type and data type, and contain the following information: Define the required fields in the data record, such as device identification, timestamp, and data value. Supplementary strategies for missing fields, such as:

[0223] Device identification: supplemented from device mapping relationship data;

[0224] Timestamp: Use the current time as the default value;

[0225] Data Value: Use the historical mean or zero as the default value.

[0226] When missing data is detected in a field, the gateway will check the integrity of the fields in the record one by one according to the field template and perform the following repair steps: Compare the fields in the abnormal data record with the field template to identify the missing fields. Assign values ​​to the missing fields according to the template rules: For key fields, such as device identification, supplement from the mapping relationship data; for timestamp fields, use the current time to supplement; for data values, use the default value defined in the template to supplement. The complete record after supplementation is used as the repair field data and stored in the repair data collection.

[0227] Through the template-based field supplementation strategy, the problem of missing fields can be effectively repaired, the structural integrity of data records can be ensured, and high-quality input can be provided for subsequent processing.

[0228] More specifically, for the formatted erroneous data in the classified abnormal data set, the data format is reorganized according to the target data structure to generate repaired format data, including:

[0229] Malformed data usually refers to data that is not organized in the expected target data structure, such as wrong field order, mismatched data types, or wrong delimiters. This problem is often caused by inconsistent protocol formats or transmission errors.

[0230] Implementation method: The target data structure is a predefined standard format, usually designed based on data type or application scenario. For example:

[0231] JSON format: standardized key-value pair structure;

[0232] Protobuf format: an efficient binary data serialization structure.

[0233] The steps to repair malformed data are as follows:

[0234] Verify the format of abnormal data records, including whether the number of fields, field order, data type and separator meet the requirements of the target data structure.

[0235] Adjust the field order according to the target data structure, for example, move the "timestamp" field to the first position in the record.

[0236] Converting the wrong data type to the type required by the target data structure, such as converting a string to a floating point number.

[0237] Replace incorrect separators, such as commas, with semicolons to adjust to standard format.

[0238] The repaired data records are restored to the repair data set in the target data structure.

[0239] Format repair can significantly improve the compatibility of data parsing and analysis, and avoid data discard or analysis errors due to format errors.

[0240] More specifically, for the content anomaly data in the classified anomaly data set, the data value is recalculated in combination with the device operation status and historical data to generate repair content data, specifically including:

[0241] Abnormal data refers to data values ​​that deviate from the reasonable range or are inconsistent with the actual scenario. For example, the output value of a temperature sensor may be extremely high or negative, which is usually caused by hardware failure or transmission noise.

[0242] Implementation method: Combine the device operation status and historical data to repair abnormal content. The specific steps include:

[0243] Identify abnormal data based on the reasonable range of equipment operating status, such as the range of a temperature sensor is 0-100°C.

[0244] Extract the historical data records of the device from the cache module; calculate the mean, median and change trend of the historical data and use them as a reference value for repair.

[0245] For abnormal values ​​in time series, linear interpolation repair is performed using the adjacent data before and after; based on the changing trend of historical data, the normal value at the current moment is predicted as the repair value; for abnormal values ​​that cannot be repaired, the default value is used, such as the mid-range value of the equipment.

[0246] The repaired data value replaces the original abnormal data and is stored in the repaired data set.

[0247] Repairing data based on the device's operating status and historical data can effectively restore the rationality of abnormal content data and improve data accuracy and reliability.

[0248] In a preferred embodiment of the present invention, performing synchronous update on the repair data set and generating a synchronous update result includes:

[0249] Extracting repair field data, repair format data and repair content data from the repair data set to generate an update synchronization data set;

[0250] According to the cloud synchronization requirements, the updated synchronization data set is repackaged and uploaded to the cloud server, and the upload timestamp of each data is recorded to generate a synchronization status record;

[0251] The synchronization status record and the processing process of the repair data are integrated into the synchronization update result and stored in the gateway cache module.

[0252] In the embodiment of the present invention, the repaired data set is repackaged and uploaded to the cloud server to generate an updated synchronization data set. During the upload process, each piece of data is recorded with an upload timestamp to ensure the integrity and traceability of data transmission. The synchronization status record and the repair process are integrated into the synchronization update result and stored in the gateway cache module, providing a comprehensive reference for subsequent data management and fault tracking.

[0253] This update process ensures the final synchronization of repair data, keeps the gateway consistent with the cloud, and further improves the reliability and maintainability of the system.

[0254] More specifically, the synchronization status record and the repair data processing are integrated into the synchronization update result and stored in the gateway cache module, which specifically includes:

[0255] The synchronization status record contains the status information of data uploaded to the cloud, such as the number of successfully uploaded data and the identification of data that was not uploaded. The process of repairing data records the operation logs of field repair, format repair, and content repair. The integration of the two can provide a complete reference for system operation and maintenance and fault tracking.

[0256] Implementation method:

[0257] When uploading data, the upload timestamp and status identifier of each data is recorded; for data that is not successfully uploaded, the failure reason and data identifier are recorded.

[0258] During the data repair process, the type of repair operation, data values ​​before and after the repair, and the basis for the repair, such as historical data, are recorded as a log.

[0259] Match the unsuccessfully uploaded data in the synchronization status record with the data records in the repair data set; attach the processing log of the repair data to the corresponding data identifier to form a complete record of the repair and synchronization process.

[0260] The integrated data records are stored as synchronization update results; the synchronization update results contain status information of successfully uploaded data and detailed records of repair operations, which can be used for cloud and local operation and maintenance analysis.

[0261] The synchronization update results can fully reflect the entire process of data repair and synchronization, provide a detailed basis for system anomaly location and performance optimization, and further improve the transparency and reliability of data management.

[0262] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A control method for an Internet of Things gateway integrating local communication and AI computing power, characterized in that: The method comprises: receiving an original data packet sent by at least one terminal device, wherein the original data packet includes device identification information and original sensing data, and generating received data; Perform protocol analysis on the received data, extract device identification information and original sensor data, and generate device mapping relationship data based on the device identification information to generate analysis data; Perform noise filtering and format conversion on the raw sensor data in the parsed data to generate standardized data; According to the device type in the device mapping relationship data, the AI ​​computing model corresponding to the device type is loaded from the preset model library to generate an AI analysis model; Input standardized data into the AI ​​analysis model, perform local calculations, and generate analysis results; Determine the target terminal device according to the device mapping relationship data, send the analysis result to the target terminal device through the local communication module, receive the response information of the target terminal device, and generate the communication result; The analysis results and communication results are stored in the gateway cache module, and the data processing timestamp is recorded to generate storage data; Extract analysis results from stored data and generate synchronized data sets according to preset time intervals, upload synchronized data sets to remote cloud servers, and generate synchronized status information and synchronized error log information; Extract network delay records, packet loss information, and verification failure records based on synchronization error log information, generate synchronization error analysis data, perform network synchronization optimization and data anomaly location, and generate synchronization optimization results; According to the data type and error type, perform field repair, format repair and content repair on the abnormal data in the synchronization optimization results to generate a repair data set; Perform synchronous update on the repair data set to generate a synchronous update result; According to the device type in the device mapping relationship data, the AI ​​computing model corresponding to the device type is loaded from the preset model library to generate an AI analysis model, including: According to the device type in the device mapping relationship data, query the AI ​​computing model with the highest matching degree between the device type and the sensor data type; the AI ​​computing model is a pre-trained model that supports specific reasoning tasks; the matching degree is calculated as follows: ; in, The matching degree between the current device type and the AI ​​computing model. is the number of sensor data types, For the The weight of each sensor data type, For the The sensor data type and The matching function of the device type represents the cosine value of the angle between the two in the feature space. ,in, Respectively Sensor data types and Device Type The angle in the eigenvector space, is the adjustment coefficient, is the computational complexity of the current AI computing model, is the reference computing capability of the device, For the The number of conflicting features between the AI ​​computing model and the current device type indicates the number of features not supported in the device mapping data. is the total number of AI computing models; Load the AI ​​computing model and initialize it to enable it to perform reasoning and generate an AI analysis model.

2. According to claim 1, a control method for an Internet of Things gateway integrating local communication and AI computing power is characterized in that: Perform protocol analysis on the received data, extract device identification information and original sensor data, and generate device mapping relationship data based on the device identification information to generate analysis data, including: By parsing the IoT protocol, the original data packet is formatted and the device identification information and original sensor data are extracted; According to the device identification information, searching and generating device mapping relationship data from a preset device information library, the device mapping relationship data includes device type, device configuration and device operation status; Associate the raw sensor data with the device type and device configuration to generate parsed data.

3. The control method of the Internet of Things gateway integrating local communication and AI computing power according to claim 2 is characterized in that: Perform noise filtering and format conversion on the raw sensor data in the analysis data to generate standardized data, including: Use an adaptive filtering algorithm to remove noise from the original sensor data in the analytical data to obtain denoised data; The denoised data is formatted and converted into a unified standardized data format, including unifying the data units, aligning the timestamps, and adjusting the data precision to obtain standardized data.

4. The control method of the Internet of Things gateway integrating local communication and AI computing power according to claim 3 is characterized in that: Determine the target terminal device according to the device mapping relationship data, send the analysis result to the target terminal device through the local communication module, receive the response information of the target terminal device, and generate the communication result, including: According to the device mapping relationship data, identify the target terminal device that needs to receive the analysis result; According to the communication protocol and data format requirements of the target terminal device, the analysis results are packaged and encoded through the local communication module and sent to the target terminal device; Receive feedback information from the target terminal device, generate communication results, and record data sending status.

5. The control method of the Internet of Things gateway integrating local communication and AI computing power according to claim 4 is characterized in that: The analysis results and communication results are stored in the gateway cache module, and the data processing timestamp is recorded to generate storage data, including: The generated analysis results and communication results are stored in the form of data records in the gateway cache module; During the storage process, a timestamp is marked for each storage record and the records are sorted according to the timestamp sequence to form storage data; Dynamically monitor the available storage space and data processing load in the cache module, calculate the current storage pressure based on the real-time data volume, and generate a storage pressure factor; the calculation formula for the storage pressure factor is: ; in, is the storage pressure factor, is the currently used cache capacity, is the total cache capacity, is the number of currently active data records, is the maximum number of active data records allowed, To cache the real-time fluctuation range of the load between the current moment and the previous moment, The maximum load fluctuation allowed for the cache load. The interval between the current time of the cache module and the last cache cleanup time. The reference cleanup interval for the cache module. , , , and is the weight coefficient; When the storage pressure factor exceeds the preset storage threshold, the importance score of the data is calculated, and cache replacement is performed based on the data importance score. The calculation formula for the importance score is: ; in, For the The importance score of the data. For the The access frequency of the data, For the The most recent time the data was used. For the The importance of the content of the data, , For the The type criticality of the data item, the value is 1 for status data and 0.5 for other data. For the The correlation between the data item and the device mapping relationship data is 1 for direct correlation and 0.5 for indirect correlation. For the The number of times the data is used. , and is the weight coefficient, For the The current time of the data The interval between the last use of the data. For the The reference time interval value of the data. , , , , ,and is the weight coefficient; Regularly clean up redundant data in the cache whose importance score is lower than the preset importance threshold, and release storage space through timestamp records.

6. The control method of the Internet of Things gateway integrating local communication and AI computing power according to claim 5 is characterized in that: According to the preset time interval, the analysis results are extracted from the stored data and a synchronized data set is generated. The synchronized data set is uploaded to the remote cloud server, and synchronization status information and synchronization error log information are generated, including: Extract analysis results from stored data at preset time intervals to generate synchronized data sets; Upload the synchronized data set to the remote cloud server and record the upload timestamp of each data; The cloud server generates synchronization status information based on the received data, including the amount of successfully synchronized data, the identification of unsynchronized data, and the failure reason of the unsynchronized data; If data is missing, format abnormal, or transmission fails during synchronization, the cloud server generates error log information, which includes error type, error data identifier, and data location; The synchronization status information and error log information are stored in the gateway cache module.

7. The control method of the Internet of Things gateway integrating local communication and AI computing power according to claim 6 is characterized in that: Based on the synchronization error log information returned by the cloud, perform network synchronization optimization and data anomaly location, and generate synchronization optimization results, including: Extract network delay records, packet loss information and verification failure records from error log information to generate synchronization error analysis data; According to the network delay records and packet loss information, the average network delay time and data packet loss rate are calculated to generate network evaluation data; Dynamically adjust the data synchronization frequency of the gateway according to the network evaluation data to generate an optimized synchronization frequency value; the calculation formula for the optimized synchronization frequency value is: ; in, To optimize the synchronization frequency value, is the initial synchronization frequency, is the current value of network delay, is the permissible threshold of network delay, is the current value of the data packet loss rate, is the maximum allowed packet loss rate, is the difference between the largest data packet and the smallest data packet, is the size of the reference packet, , and is the weight coefficient; According to the verification failure records, the abnormal data packets are extracted and repackaged to generate supplementary synchronization data; The optimized synchronization frequency value and the supplementary synchronization data are recorded as synchronization optimization results and stored in the gateway cache module.

8. The control method of the Internet of Things gateway integrating local communication and AI computing power according to claim 7 is characterized in that: According to the data type and error type, perform field repair, format repair, and content repair on the abnormal data in the synchronization optimization results to generate a repair data set, including: Extract abnormal data packets from the supplementary synchronization data in the synchronization optimization result to generate an abnormal data set; According to the data type and error type in the abnormal data set, the abnormal data is divided into field missing data, format error data and content abnormal data to generate a classified abnormal data set; For missing field data in the classified abnormal data set, generate repair field data based on the preset field template; For the format-error data in the classified abnormal data set, the data format is reorganized according to the target data structure to generate repaired format data; For the content anomaly data in the classified anomaly data set, the data value is recalculated in combination with the equipment operation status and historical data to generate repair content data; The repair field data, repair format data and repair content data are merged into a repair data set and stored in the gateway cache module.

9. The control method of the Internet of Things gateway integrating local communication and AI computing power according to claim 8 is characterized in that: Perform a synchronous update on the repair data set, and generate the synchronous update results including: Extracting repair field data, repair format data and repair content data from the repair data set to generate an update synchronization data set; According to the cloud synchronization requirements, the updated synchronization data set is repackaged and uploaded to the cloud server, and the upload timestamp of each data is recorded to generate a synchronization status record; The synchronization status record and the processing process of the repair data are integrated into the synchronization update result and stored in the gateway cache module.

Citation Information

Patent Citations

  • Intelligent production system based on edge calculation and identification analysis

    CN113112086A

  • Information management method and system for edge nodes based on cloud

    CN117793130A

  • Intelligent gateway conversion method and device, equipment and storage medium

    CN118612309A