Internet of Things gateway data processing method based on edge computing

By deploying intelligent sensing nodes and distributed computing frameworks in edge computing, calculating risk scores and encrypting data, and adopting adaptive compression perception technology and distributed AI training framework, the problems of data security and resource allocation efficiency in edge computing are solved, and efficient and secure data processing and transmission are achieved.

CN119892528AActive Publication Date: 2025-04-25SINRIDIGITALCITYTECCO LTD

Patent Information

Application Number
CN202510388844.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-04-25
Estimated Expiration
2045-03-31

AI Technical Summary

Technical Problem

The existing edge computing solutions have shortcomings in data security, computing resource allocation and data compression, and are difficult to meet the requirements of real-time and low latency.

Method used

By deploying sensors of smart sensing nodes, the edge gateway is connected to the sensor, and the IoT gateway data is collected in real time using the MQTT protocol and perform preliminary processing. Calculate the risk score, select the distributed computing framework to allocate computing tasks between multiple edge gateways based on the evaluation results, and encrypt the allocated gateway data. Adaptive compression perception technology is used to compress the encrypted data, and the data changes of the edge gateway are monitored through the HTTPS protocol, and the global view is updated in combination with the distributed AI training framework.

Benefits of technology

It significantly improves data security, optimizes the allocation of computing resources, reduces data transmission volume and storage costs, improves response speed and service quality, and provides a solid foundation and efficient solution for edge computing applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892528A_ABST
    Figure CN119892528A_ABST
Patent Text Reader

Abstract

The invention discloses an Internet of Things gateway data processing method based on edge computing, and relates to the technical field of Internet of Things gateways, and the method comprises the steps: deploying a sensor, collecting Internet of Things gateway data in real time through an MQTT protocol, and carrying out the primary processing, and obtaining gateway data; evaluating a risk level based on the gateway data, selecting to use a distributed computing framework to distribute computing tasks among the plurality of edge gateways according to an evaluation result, and performing encryption processing on the distributed gateway data to obtain encrypted data; compressing the encrypted data to form a compressed package, and aggregating the compressed package to form a global view; the data change of the edge gateway is monitored through an HTTPS protocol, a global view is updated in combination with a distributed AI training framework, and optimization measures are generated and executed according to a monitoring result. Through a series of innovative technical means, the data security, the resource utilization rate, the response speed and the service quality are remarkably improved, and a solid foundation and an efficient solution are provided for edge computing application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Internet of Things gateways, and in particular to an Internet of Things gateway data processing method based on edge computing. Background Art

[0002] With the rapid development of Internet of Things (IoT) technology, more and more devices and sensors are being deployed in various fields, such as smart homes, industrial automation, and smart cities. The large amount of data generated by these devices needs to be collected, processed, and transmitted through gateways. The traditional centralized cloud computing model is difficult to meet the requirements of real-time and low latency due to network latency and bandwidth limitations. Edge computing, as an emerging computing paradigm, can distribute computing resources and storage capabilities to locations close to data sources, significantly reducing the latency of data transmission and improving response speed. However, existing edge computing solutions still have shortcomings in data security, computing resource allocation, and data compression. For example, existing methods usually rely on simple encryption algorithms and cannot provide high-intensity data security; in addition, the task allocation strategy between multiple edge gateways is not flexible enough, resulting in inefficient resource utilization. Summary of the invention

[0003] In view of the above existing problems, the present invention is proposed.

[0004] Therefore, the present invention provides an Internet of Things gateway data processing method based on edge computing to solve the problem of improving data security and resource allocation efficiency in edge computing.

[0005] In order to solve the above technical problems, the present invention provides the following technical solutions: In a first aspect, the present invention provides an Internet of Things gateway data processing method based on edge computing, which comprises: Deploy sensors of smart sensing nodes, connect edge gateways to sensors, collect IoT gateway data in real time through MQTT protocol, and perform preliminary processing to obtain gateway data; Based on the gateway data, the risk score is calculated and the risk level is evaluated. According to the evaluation results, the distributed computing framework is selected to distribute the computing tasks among multiple edge gateways, and the distributed gateway data is encrypted to obtain encrypted data. Compress the encrypted data to form a compressed package and upload it to the cloud server. The cloud server aggregates the compressed packages received from multiple edge gateways to form a global view. The data changes of the edge gateway are monitored through the HTTPS protocol, the global view is updated in combination with the distributed AI training framework, and optimization measures are generated and executed based on the monitoring results.

[0006] As a preferred solution of the IoT gateway data processing method based on edge computing described in the present invention, wherein: the sensor includes a temperature sensor, a humidity sensor and a GPS positioning device; The IoT gateway data includes sensor readings, sensor quantity, sensor power consumption, sensor operating time, timestamp, and the amount of lost sensor data.

[0007] As a preferred solution of the IoT gateway data processing method based on edge computing described in the present invention, wherein: The preliminary processing includes the following steps: Use the cyclic redundancy check algorithm to calculate the checksum of the IoT gateway data read, and send the MQTT message with the checksum to the edge gateway; When the edge gateway receives the MQTT message, it extracts the IoT gateway data and checksum in the MQTT message to verify whether the IoT gateway data is lost; The sliding window algorithm is used to detect and delete duplicate data, the Z-score method is used to detect abnormal data, and the interpolation method is used to fill in the abnormal data to obtain the gateway data.

[0008] As a preferred solution of the IoT gateway data processing method based on edge computing described in the present invention, wherein: The risk score is calculated by the following formula: ; in, represents the risk score, Indicates the amount of lost sensor data, Indicates the total number of all sensor data sent, Indicates The timestamp of the sensor data arriving at the edge gateway, Indicates The timestamp of the sensor data when it is sent from the sensor, Indicates the amount of sensor data, represents the index of sensor data, Indicates The power consumption of each sensor, Indicates The working time of each sensor, represents the number of sensors, Indicates the index of the sensor, Indicates the maximum delay allowed by the edge gateway. Indicates the maximum energy consumption allowed by the edge gateway; Set risk thresholds based on historical risk scores; When the risk score is less than or equal to the risk threshold, the gateway data is judged to be of low risk; When the risk score is greater than the risk threshold, the gateway data is judged to be high risk.

[0009] As a preferred solution of the IoT gateway data processing method based on edge computing described in the present invention, wherein: According to the evaluation results, we choose to use a distributed computing framework to distribute computing tasks among multiple edge gateways, and encrypt the distributed gateway data to obtain encrypted data, including the following steps: When the gateway data is low risk, the current resource usage of each edge gateway is collected, and the resource load index of each edge gateway is calculated using the weighted average method. The gateway data is assigned to the edge gateway with the lowest resource load index for processing; When the gateway data is high risk, the distributed computing framework is used to dynamically assign tasks to different edge gateways based on the risk score, giving priority to computing tasks with high risk scores. The QRNG library in Python is used to generate a random key, and the generated random key is used to encrypt the high-risk gateway data to obtain the encrypted data.

[0010] As a preferred solution of the IoT gateway data processing method based on edge computing described in the present invention, wherein: When forming a compressed packet, a sampling matrix is ​​generated based on adaptive perception, the sampling matrix is ​​dynamically adjusted according to the sparsity of the compressed packet, and the compressed packet is compressed using the adjusted sampling matrix; The aggregation refers to merging compressed packages from different edge gateways into a data set on the basis of maintaining consistency in time.

[0011] As a preferred solution of the IoT gateway data processing method based on edge computing described in the present invention, wherein: Monitor the data changes of the edge gateway through the HTTPS protocol, update the global view in combination with the distributed AI training framework, and generate and execute optimization measures based on the monitoring results, including the following steps: Horovod is selected as the distributed AI training framework. The Horovod process is started on multiple edge gateways and the corresponding environment variables are configured. Each edge gateway calculates the gradient locally and synchronizes the gradient through MPI to update the global view. Based on the monitoring results and the updated global view, define trigger conditions and execution actions, and use execution actions to perform optimization measures.

[0012] In a second aspect, the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, any step of the edge computing-based Internet of Things gateway data processing method as described in the first aspect of the present invention is implemented.

[0013] In a third aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the edge computing-based Internet of Things gateway data processing method as described in the first aspect of the present invention.

[0014] The beneficial effects of the present invention are as follows: through the quantum random number generator technology, a high-strength random key is generated for data encryption, which greatly improves the security of the data and effectively prevents the data from being leaked or tampered with in a complex network environment. Secondly, by using a distributed computing framework (such as Apache Spark, Apache Flink and Kubernetes), tasks are dynamically assigned to the corresponding edge gateway according to the risk score, which optimizes the allocation of computing resources, not only improves resource utilization, but also better copes with sudden high load situations. In addition, the encrypted data is compressed by using adaptive compressed sensing technology, which significantly reduces the amount of data transmission and storage costs, saves network bandwidth and reduces the storage pressure of cloud servers. Finally, due to the use of edge computing architecture, the data processing process is closer to the data source, reduces data transmission delay, and combines the HTTPS protocol to monitor the data changes of the edge gateway, uses distributed AI model collaborative training, automatically generates and executes optimization measures, and provides a personalized service experience. In summary, the present invention significantly improves data security, resource utilization, response speed and service quality through a series of innovative technical means, and provides a solid foundation and efficient solution for edge computing applications. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0016] Figure 1 This is a flow chart of the Internet of Things gateway data processing method based on edge computing in Example 1. DETAILED DESCRIPTION

[0017] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.

[0018] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0019] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0020] Example 1, reference Figure 1 , which is the first embodiment of the present invention, and provides an Internet of Things gateway data processing method based on edge computing, comprising the following steps: S1. Deploy the sensors of the intelligent sensing nodes, connect the edge gateway to the sensors, collect IoT gateway data in real time through the MQTT protocol, and perform preliminary processing to obtain gateway data, including the following steps: S1.1. Sensors include temperature sensors, humidity sensors, and GPS positioning devices; IoT gateway data include sensor readings, sensor quantity, sensor power consumption, sensor operating time, timestamp, and the number of lost sensor data.

[0021] S1.2, the intelligent sensing node reads the IoT gateway data at a set time interval (for example, once every 5 minutes) and encapsulates it into the MQTT (Message Queuing Telemetry Transport) message format; It should be noted that the number and type of smart sensing nodes should be determined, the MQTT client library should be installed and configured on each smart sensing node to ensure that it can communicate with the edge gateway through the MQTT protocol, the MQTT proxy server should be configured (such as Mosquitto, an open source message broker), and the connection parameters (such as port number, user name, password, etc.) should be set to ensure security and stability; Use the cyclic redundancy check algorithm to calculate the checksum of the IoT gateway data read, and send the MQTT message with the checksum to the edge gateway; It should be noted that after reading data from the sensor, a check value is generated using the CRC (Cyclic Redundancy Check) algorithm, and then the original data and the check value are packaged into the MQTT message format and sent to the edge gateway via the MQTT protocol. In this way, the receiving end can recalculate the CRC and compare it with the received check value to verify whether the data is lost or damaged during the transmission process; When the edge gateway receives the MQTT message, it extracts the IoT gateway data and checksum in the MQTT message to verify whether the IoT gateway data is lost; Specifically, extract the IoT gateway data and check value in the MQTT message, use the cyclic redundancy check algorithm to recalculate the check value of the received IoT gateway data, compare the calculated check value with the check value carried in the MQTT message, if the check values ​​are consistent, the IoT gateway data is not lost, if the check values ​​are inconsistent, discard the IoT gateway data and record an error log, requiring the sensor to read again; The sliding window algorithm is used to detect and delete duplicate data, the Z-score method is used to detect abnormal data, and the interpolation method is used to fill in the abnormal data to obtain the gateway data.

[0022] It should be noted that by deploying sensors of smart sensing nodes, the edge gateway is connected to the sensors, and the IoT gateway data is collected in real time through the MQTT protocol, achieving efficient data collection and preliminary processing. This step ensures that sensor data (such as temperature, humidity, and GPS positioning) can be transmitted and verified in real time in a standardized manner, improving data integrity and accuracy. Using the CRC algorithm for data verification can effectively detect and correct errors in transmission and prevent data loss or damage. Ultimately, this step ensures that subsequent steps can be processed based on accurate and complete data.

[0023] S2. Based on the gateway data, the risk score is calculated and the risk level is evaluated. According to the evaluation results, the distributed computing framework is selected to distribute the computing tasks among multiple edge gateways, and the distributed gateway data is encrypted to obtain encrypted data, including the following steps: S2.1. Based on the gateway data, the risk score is calculated and expressed as: ; in, represents the risk score, Indicates the amount of lost sensor data, Indicates the total number of all sensor data sent, Indicates The timestamp of the sensor data arriving at the edge gateway, Indicates The timestamp of the sensor data when it is sent from the sensor, Indicates the number of sensor data, represents the index of sensor data, Indicates The power consumption of each sensor, Indicates The working time of each sensor, represents the number of sensors, Indicates the index of the sensor, Indicates the maximum delay allowed by the edge gateway. Indicates the maximum energy consumption allowed by the edge gateway; It should be noted that Indicates the proportion of data loss. When all data is lost, the value is 1; when no data is lost, the value is 0. Represents the delay of each sensor data and normalizes the delay to between 0 and 1. Represents the energy consumption of each sensor and normalizes the energy consumption to between 0 and 1; Set risk thresholds based on historical risk scores; Specifically, extract gateway data for a period of time (e.g., the past 6 months), calculate the risk score for each time period, draw a frequency distribution graph or cumulative distribution function of the risk score, observe the distribution of the data, set the risk threshold, and set it in combination with expert advice; When the risk score is less than or equal to the risk threshold, the gateway data is judged to be of low risk; When the risk score is greater than the risk threshold, the gateway data is judged to be high risk.

[0024] S2.2, when the gateway data is low risk, collect the current resource usage of each edge gateway, use the weighted average method to calculate the resource load index of each edge gateway, and assign the gateway data to the edge gateway with the lowest resource load index for processing; When the gateway data is high risk, distributed computing frameworks (Apache Spark (Apache Spark (open source big data processing framework)), Apache Flink (Apache Flink (open source stream processing framework)) and Kubernetes (Kubernetes (container orchestration platform))) are used to dynamically assign tasks to different edge gateways according to the risk score, giving priority to computing tasks with high risk scores; It should be noted that Apache Spark supports large-scale data processing and has efficient memory computing capabilities. It is suitable for scenarios where large amounts of data need to be processed in batches or streams. Apache Flink focuses on stream processing and provides low-latency data processing capabilities. It is suitable for real-time data processing and event-driven applications. Kubernetes is used for automated deployment, expansion, and management of containerized applications. It is suitable for scenarios where flexible scheduling and management of computing resources are required. S2.3. Use the QRNG library (quantum random number generator) in Python to generate random keys for data encryption. Use the generated random keys to encrypt high-risk gateway data to ensure the security of data during transmission and storage, and obtain encrypted data.

[0025] It should be noted that by calculating risk scores, assessing risk levels, and using a distributed computing framework to allocate computing tasks, data security and resource utilization are optimized. This step calculates risk scores based on factors such as packet loss rate, latency, and energy consumption, and allocates tasks to appropriate edge gateways based on the scores. For high-risk data, quantum random number generator technology is used for encryption to further enhance data security. This dynamic task allocation mechanism not only improves the ability to cope with sudden high loads, but also protects sensitive data through efficient encryption methods.

[0026] S3, compress the encrypted data to form a compressed package, and upload it to the cloud server. The cloud server aggregates the compressed packages received from multiple edge gateways to form a global view, including the following steps: When forming a compressed packet, a sampling matrix is ​​generated based on adaptive perception, the sampling matrix is ​​dynamically adjusted according to the sparsity of the compressed packet, and the compressed packet is compressed using the adjusted sampling matrix; Specifically, the encrypted data dimension and the expected compression ratio are used to generate a sampling matrix, the encrypted data is preliminarily compressed using the sampling matrix, and the sparsity after the preliminarily compression is calculated by calculating the proportion of non-zero elements or using other sparsity measurement methods. The sampling matrix is ​​dynamically adjusted according to the calculated sparsity. If the data is very sparse, the density of the sampling matrix can be reduced; conversely, if the data is not so sparse, the density of the sampling matrix needs to be increased. Adjusting the sampling matrix is ​​achieved by changing the proportion of its non-zero elements. For example, the sparsity of the sampling matrix can be adjusted by increasing or decreasing the number of non-zero elements in the matrix, and the adjusted sampling matrix is ​​used for re-compression.

[0027] Save the compressed package in a file format and upload it to the cloud server using a secure transmission protocol (such as HTTPS, Hypertext Transfer Protocol Secure). Read the uploaded compressed package from the cloud storage, decompress the compressed package using the reconstruction algorithm, and decrypt the decompressed compressed package using the same key to obtain the decrypted data; Use sliding window algorithm to detect and delete duplicate data, use Z-score method to detect abnormal data, and use interpolation method to fill abnormal data; Merge the decrypted data from different edge gateways into a unified data set to ensure that the decrypted data of each edge gateway is consistent in time, avoid errors caused by time offset, and generate a global view based on the aggregated decrypted data.

[0028] It should be noted that the encrypted data is compressed by adaptive compressed sensing technology and uploaded to the cloud server, which reduces the amount of data transmission and storage costs. Adaptive compressed sensing technology can dynamically adjust the sampling matrix according to the sparsity of the data, thereby achieving efficient data compression. This not only reduces the bandwidth required for data transmission, but also reduces the storage pressure of the cloud server. In addition, the sliding window algorithm and Z-score method are used to detect and process duplicate and abnormal data, further improving the quality and consistency of the data.

[0029] S4. Monitor the data changes of the edge gateway through the HTTPS protocol, update the global view in combination with the distributed AI training framework, and generate and execute optimization measures based on the monitoring results, including the following steps: S4.1. Select Horovod as the distributed AI training framework, start the Horovod process on multiple edge gateways, and configure the corresponding environment variables. Each edge gateway calculates the gradient locally and synchronizes the gradient through MPI (Message Passing Interface) to update the global view. It should be noted that the reason for choosing Horovod as the distributed AI training framework is that it can efficiently calculate gradients in parallel on multiple edge gateways and synchronize gradients through MPI, thereby achieving fast and consistent global model parameter updates. At the same time, its optimized communication mechanism reduces training time and resource consumption, and is particularly suitable for edge computing environments with limited resources and low latency. Specifically, Horovod can significantly reduce the time overhead of gradient synchronization when performing distributed training between multiple edge gateways through its efficient multi-node, multi-GPU support and optimized AllReduce algorithm. S4.3. Based on the monitoring results and the updated global view, define trigger conditions and execution actions, and use execution actions to perform optimization measures. The trigger condition is when a certain indicator exceeds the set threshold (such as CPU usage exceeds 80%), the corresponding rule is triggered, and the execution action is to take corresponding optimization measures according to the trigger condition (such as increasing computing resources, restarting services, etc.); Specifically, when the load of an edge gateway is too high, some tasks will be automatically assigned to other edge gateways with lower loads. According to the model prediction results, the resource allocation of the gateway will be dynamically adjusted (such as increasing memory or the number of CPU cores), and optimization commands (such as restarting services, adjusting resource configuration, etc.) will be sent to specific edge gateways through the central console. After the edge gateway executes the optimization command, it will feedback the execution result (success or failure) to the central monitoring platform and retry if necessary.

[0030] It should be noted that the data changes of the edge gateways are monitored through the HTTPS protocol, and the distributed AI model is used for collaborative training to achieve real-time monitoring and automatic optimization of the edge gateway status. This step centrally manages and displays data from all edge gateways through the central monitoring platform, regularly pulls decrypted data from each edge gateway, and uses the Horovod framework to calculate gradients in parallel on multiple edge gateways to quickly update global model parameters. Based on the monitoring results and model prediction results, trigger conditions and execution actions are defined to automatically adjust the resource allocation of the edge gateway.

[0031] This embodiment also provides a computer device, which is suitable for the case of an Internet of Things gateway data processing method based on edge computing, including: a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the Internet of Things gateway data processing method based on edge computing proposed in the above embodiment.

[0032] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.

[0033] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the method for implementing data processing of an Internet of Things gateway based on edge computing proposed in the above embodiment is implemented; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read Only Memory, referred to as EPROM), programmable read-only memory (Programmable Red-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic storage, flash memory, disk or optical disk.

[0034] In summary, the present invention: through the quantum random number generator technology, a high-strength random key is generated for data encryption, which greatly improves the security of the data and effectively prevents the data from being leaked or tampered in a complex network environment. Secondly, by using a distributed computing framework (such as Apache Spark, Apache Flink and Kubernetes), tasks are dynamically assigned to the corresponding edge gateway according to the risk score, which optimizes the allocation of computing resources, not only improves resource utilization, but also better copes with sudden high load situations. In addition, the encrypted data is compressed by using adaptive compressed sensing technology, which significantly reduces the amount of data transmission and storage costs, saves network bandwidth and reduces the storage pressure of cloud servers. Finally, due to the use of edge computing architecture, the data processing process is closer to the data source, reduces data transmission delay, and combines the HTTPS protocol to monitor the data changes of the edge gateway, uses distributed AI model collaborative training, automatically generates and executes optimization measures, and provides a personalized service experience. In summary, the present invention significantly improves data security, resource utilization, response speed and service quality through a series of innovative technical means, and provides a solid foundation and efficient solution for edge computing applications.

[0035] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A data processing method for an Internet of Things gateway based on edge computing, characterized in that: include, Deploy sensors of smart sensing nodes, connect edge gateways to sensors, collect IoT gateway data in real time through MQTT protocol, and perform preliminary processing to obtain gateway data; Based on the gateway data, the risk score is calculated and the risk level is evaluated. According to the evaluation results, the distributed computing framework is selected to distribute the computing tasks among multiple edge gateways, and the distributed gateway data is encrypted to obtain encrypted data. Compress the encrypted data to form a compressed package and upload it to the cloud server. The cloud server aggregates the compressed packages received from multiple edge gateways to form a global view. The data changes of the edge gateway are monitored through the HTTPS protocol, the global view is updated in combination with the distributed AI training framework, and optimization measures are generated and executed based on the monitoring results.

2. The method for processing data of an Internet of Things gateway based on edge computing according to claim 1, characterized in that: The sensors include temperature sensors, humidity sensors and GPS positioning equipment; The IoT gateway data includes sensor readings, sensor quantity, sensor power consumption, sensor operating time, timestamp, and the amount of lost sensor data.

3. The method for processing data of an Internet of Things gateway based on edge computing according to claim 2, characterized in that: The preliminary processing includes the following steps: Use the cyclic redundancy check algorithm to calculate the checksum of the IoT gateway data read, and send the MQTT message with the checksum to the edge gateway; When the edge gateway receives the MQTT message, it extracts the IoT gateway data and checksum in the MQTT message to verify whether the IoT gateway data is lost; The sliding window algorithm is used to detect and delete duplicate data, the Z-score method is used to detect abnormal data, and the interpolation method is used to fill in the abnormal data to obtain the gateway data.

4. The method for processing data of an Internet of Things gateway based on edge computing according to claim 3, characterized in that: The risk score is calculated by the following formula: ; in, represents the risk score, Indicates the amount of lost sensor data, Indicates the total number of all sensor data sent, Indicates The timestamp of the sensor data arriving at the edge gateway, Indicates The timestamp of the sensor data when it is sent from the sensor, Indicates the number of sensor data, represents the index of sensor data, Indicates The power consumption of each sensor, Indicates The working time of each sensor, represents the number of sensors, Indicates the index of the sensor, Indicates the maximum delay allowed by the edge gateway. Indicates the maximum energy consumption allowed by the edge gateway; Set risk thresholds based on historical risk scores; When the risk score is less than or equal to the risk threshold, the gateway data is judged to be of low risk; When the risk score is greater than the risk threshold, the gateway data is judged to be high risk.

5. The method for processing data of an Internet of Things gateway based on edge computing according to claim 4, characterized in that: According to the evaluation results, we choose to use a distributed computing framework to distribute computing tasks among multiple edge gateways, and encrypt the distributed gateway data to obtain encrypted data, including the following steps: When the gateway data is low risk, the current resource usage of each edge gateway is collected, and the resource load index of each edge gateway is calculated using the weighted average method. The gateway data is assigned to the edge gateway with the lowest resource load index for processing; When the gateway data is high risk, the distributed computing framework is used to dynamically assign tasks to different edge gateways based on the risk score, giving priority to computing tasks with high risk scores. The QRNG library in Python is used to generate a random key, and the generated random key is used to encrypt the high-risk gateway data to obtain the encrypted data.

6. The method for processing data of an Internet of Things gateway based on edge computing according to claim 5, characterized in that: When forming a compressed packet, a sampling matrix is ​​generated based on adaptive perception, the sampling matrix is ​​dynamically adjusted according to the sparsity of the compressed packet, and the compressed packet is compressed using the adjusted sampling matrix; The aggregation refers to merging compressed packages from different edge gateways into a data set on the basis of maintaining consistency in time.

7. The method for processing data of an Internet of Things gateway based on edge computing according to claim 6, characterized in that: Monitor the data changes of the edge gateway through the HTTPS protocol, update the global view in combination with the distributed AI training framework, and generate and execute optimization measures based on the monitoring results, including the following steps: Horovod is selected as the distributed AI training framework. The Horovod process is started on multiple edge gateways and the corresponding environment variables are configured. Each edge gateway calculates the gradient locally and synchronizes the gradient through MPI to update the global view. Based on the monitoring results and the updated global view, define trigger conditions and execution actions, and use execution actions to perform optimization measures.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the edge computing-based Internet of Things gateway data processing method described in any one of claims 1 to 7 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the edge computing-based Internet of Things gateway data processing method described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Internet of Things data processing method and system based on intelligent edge gateway

    CN117336137A

  • Cloud-side collaborative multi-node management and control method and system for intelligent gateway of power distribution internet of things under weak network

    CN118631804A

  • Medical instrument inventory intelligent allocation supervision system based on Internet of Things

    CN118644182A

Cited By

  • Cloud internet-of-things security monitoring method and system with fault self-diagnosis function

    CN120498974A