Internet of Things data optimization processing method and system

Through dynamic intermittent sampling and data cleaning technology, the problem of large data volume and redundancy of IoT devices is solved, efficient data processing and storage is achieved, and analysis efficiency and storage utilization are improved.

CN118733338AInactive Publication Date: 2024-10-01CHONGQING PINGKEJIE INFORMATION TECH CO LTD

Patent Information

Application Number
CN202410702726.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-03
Publication Date
2024-10-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The amount of data generated by IoT devices is large and messy, resulting in low data analysis efficiency, reduced accuracy, and the problem of redundant data wasting storage resources.

Method used

Dynamic intermittent sampling and data cleaning technology are used to collect and filter data from IoT devices through preset sampling strategies, remove redundant data, and process and compress storage in real time during data flow analysis to reduce computing pressure and storage space usage.

Benefits of technology

Effectively reduce the amount of data, retain important information, improve data processing efficiency and real-time performance, reduce dependence on storage resources, and ensure data quality and integrity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733338A_ABST
    Figure CN118733338A_ABST
Patent Text Reader

Abstract

The invention provides an Internet of Things data optimization processing method and system, and the method comprises the steps: carrying out the dynamic intermittent sampling of Internet of Things equipment according to a preset sampling strategy, and collecting the Internet of Things data transmitted by the Internet of Things equipment; performing data cleaning on the Internet of Things data to obtain clean Internet of Things data; transmitting the clean Internet of Things data to a data processing engine, controlling the data processing engine to carry out data flow analysis on the received clean Internet of Things data, and feeding back an obtained data flow analysis result to a user side; and transmitting the clean Internet of Things data to a database, performing incremental backup on the clean Internet of Things data stored in the database every preset period to obtain incremental backup Internet of Things data, performing compression processing on the incremental backup Internet of Things data, and storing the incremental backup data obtained by compression processing to a target position. According to the invention, the performance and efficiency of Internet of Things data analysis can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a method and system for optimizing and processing Internet of Things data. Background Art

[0002] IoT devices generally refer to various physical devices that can be connected to the Internet and can realize data collection, communication and control. These devices can interact with the environment through components such as sensors and actuators, and communicate and exchange data with other devices or systems through the network. IoT data refers to various data generated by these IoT devices, including sensor data, device status data, user behavior data, etc. With the popularity of IoT devices and the increase in the number of connections, the amount of data generated has also increased. The data types generated by IoT devices are diverse, covering various sensor data, image data, video data, etc. Many IoT devices generate data at a high frequency. For example, an environmental monitoring sensor may record multiple parameters such as temperature, humidity, and air pressure every second, while some industrial sensors may even record hundreds or thousands of data points per second. Such high-frequency data generation will lead to a rapid increase in the amount of data, which poses challenges to the processing and storage of IoT data.

[0003] Most existing technologies directly record the collected IoT data, but directly recording all data will result in the data being too large and messy, making subsequent data analysis and mining difficult and inefficient. It takes a lot of time and resources to process and analyze the data, which reduces the efficiency and accuracy of data analysis. In addition, much of the collected data may be redundant or unnecessary, and directly recording all data will waste storage resources and processing power. Summary of the invention

[0004] The present invention aims to provide a method and system for optimizing and processing IoT data to solve the above-mentioned technical problems and to improve the performance and efficiency of IoT data analysis.

[0005] In order to solve the above technical problems, the present invention provides an Internet of Things data optimization processing method, comprising: Perform dynamic intermittent sampling on IoT devices according to a preset sampling strategy to collect IoT data sent by the IoT devices; Cleaning the IoT data to obtain clean IoT data; Transmitting the clean Internet of Things data to a data processing engine, controlling the data processing engine to perform data stream analysis on the received clean Internet of Things data, and feeding back the obtained data stream analysis results to a user end; The clean Internet of Things data is transmitted to a database, and the clean Internet of Things data stored in the database is incrementally backed up at preset intervals to obtain incremental backup Internet of Things data, compress the incremental backup Internet of Things data, and store the compressed incremental backup data in a target location.

[0006] In the above scheme, dynamic intermittent sampling of IoT devices can effectively reduce the amount of data while retaining important information and avoiding unnecessary data redundancy. Data cleaning of the collected IoT data can further eliminate redundant data and ensure the quality and accuracy of the data. Data stream analysis is performed on the cleaned data to reduce the computing pressure and data processing volume of the data processing engine, and improve the efficiency and real-time performance of data processing. Furthermore, the introduction of data stream analysis and processing technology to process and analyze the collected data in real time can timely detect abnormal situations, extract valuable information, and respond to the user end in real time when necessary, reducing dependence on storage resources and delays in data analysis. Incremental storage and compression of the processed clean IoT data can effectively reduce the storage space occupied and maintain the integrity and availability of the data.

[0007] In one implementation, the dynamic intermittent sampling of the IoT device according to the preset sampling strategy specifically includes: Obtaining the device type of the IoT device, and determining an associated dynamic sampling factor according to the device type; wherein the associated dynamic sampling factor includes: application scenario, data processing capability, data demand, and network bandwidth; A sampling strategy for the IoT device is set according to the associated dynamic sampling factor; wherein an initial sampling frequency is established according to the application scenario, and data is sampled from the IoT device according to the initial sampling frequency to obtain the IoT data; When the data transmitted by the IoT device triggers the data demand, data sampling is performed on the IoT device; The data processing capability and network bandwidth of the IoT device are detected in real time, and when the data processing capability or the network bandwidth is lower than a preset standard threshold, the initial sampling frequency is reduced.

[0008] In one implementation, the cleaning of the IoT data to obtain clean IoT data specifically includes: Grouping the IoT data according to the device ID to obtain a number of grouped IoT data; Defining a sliding window for each of the grouped IoT data respectively, and sliding the sliding window at a preset interval; Calculate the standard deviation of each grouped IoT data in the current window according to a preset window function, filter the grouped IoT data whose standard deviation exceeds a first preset threshold, and obtain first filtered IoT data; Performing format verification on the first filtered IoT data according to a predefined regular expression, filtering the first filtered IoT data that does not conform to the regular expression, and obtaining second filtered IoT data; The second filtered Internet data is subjected to data deduplication and noise filtering to obtain the clean Internet of Things data.

[0009] In one implementation, performing data deduplication and noise filtering on the second filtered Internet data to obtain the clean Internet of Things data specifically includes: Calculating the hash values ​​of the second filtered Internet data one by one, and storing the obtained hash values ​​in a preset database; Filter the second filtered Internet data whose hash value is consistent with the hash value stored in the preset database to obtain third filtered Internet data; The signal-to-noise ratio of each of the third filtered Internet data is calculated, and the third filtered Internet of Things data whose signal-to-noise ratio is lower than the second preset threshold is filtered to obtain the clean Internet of Things data.

[0010] In one implementation, transmitting the clean Internet of Things data to a data processing engine, controlling the data processing engine to perform data stream analysis on the received clean Internet of Things data, and feeding back the obtained data stream analysis results to the user end specifically includes: Transmitting the clean Internet of Things data to the data processing engine based on a preset message queue; Establish a real-time data warehouse on the data processing engine in advance, and store the received clean Internet of Things data in the real-time data warehouse; Comparing the clean Internet of Things data stored in the real-time data warehouse with the historical clean Internet of Things data within a preset time period to generate a first data flow analysis result; Predefine a complex event pattern on the data processing engine, perform complex event pattern matching on the clean IoT data, and when there is clean IoT data that conforms to the complex event pattern, generate a second data stream analysis result and feed back an abnormal alarm result to the user end; The first data flow analysis result and the second data flow analysis result are used to generate a visualization report through a data visualization tool, and the visualization report is fed back to the user end.

[0011] In one implementation, performing incremental backup of the clean IoT data stored in the database at every preset period to obtain incremental backup IoT data and compressing the incremental backup IoT data specifically includes: Backing up the initial clean IoT data stored in the database to obtain benchmark backup IoT data; Back up clean IoT data that has changed compared to the last backup of IoT data, and perform incremental backup of IoT data appropriately; The baseline backup IoT data and the obtained incremental backup IoT data are stored in a target location based on a compression algorithm.

[0012] In one implementation, storing the baseline backup IoT data and the obtained incremental backup IoT data to a target location based on a compression algorithm further includes: The baseline backup IoT data and the incremental backup IoT data are partitioned and stored according to data attributes; wherein the data attributes include timestamp, geographic location and device ownership; Acquire the data access search record in the target location, and create an index according to the first data access search record whose data access search record reaches a preset frequency threshold; The Internet of Things data corresponding to the first data access search record is cached in the memory.

[0013] In a second aspect, the present application also provides an IoT data optimization processing system, including: a sampling module, a cleaning module, an analysis module and a storage module; The sampling module is used to perform dynamic intermittent sampling on the IoT device according to a preset sampling strategy, and collect IoT data sent by the IoT device; The cleaning module is used to clean the IoT data to obtain clean IoT data; The analysis module is used to transmit the clean Internet of Things data to the data processing engine, control the data processing engine to perform data flow analysis on the received clean Internet of Things data, and feed back the obtained data flow analysis results to the user end; The storage module is used to transmit the clean Internet of Things data to a database, perform incremental backup of the clean Internet of Things data stored in the database at preset intervals, obtain incremental backup Internet of Things data, compress the incremental backup Internet of Things data, and store the compressed incremental backup data in a target location.

[0014] In the above scheme, dynamic intermittent sampling of IoT devices can effectively reduce the amount of data while retaining important information and avoiding unnecessary data redundancy. Data cleaning of the collected IoT data can further eliminate redundant data and ensure the quality and accuracy of the data. Data stream analysis is performed on the cleaned data to reduce the computing pressure and data processing volume of the data processing engine, and improve the efficiency and real-time performance of data processing. Furthermore, the introduction of data stream analysis and processing technology to process and analyze the collected data in real time can timely detect abnormal situations, extract valuable information, and respond to the user end in real time when necessary, reducing dependence on storage resources and delays in data analysis. Incremental storage and compression of the processed clean IoT data can effectively reduce the storage space occupied and maintain the integrity and availability of the data.

[0015] In one implementation, the sampling module is used to perform dynamic intermittent sampling on the IoT device according to a preset sampling strategy, specifically including: Obtaining the device type of the IoT device, and determining an associated dynamic sampling factor according to the device type; wherein the associated dynamic sampling factor includes: application scenario, data processing capability, data demand, and network bandwidth; A sampling strategy for the IoT device is set according to the associated dynamic sampling factor; wherein an initial sampling frequency is established according to the application scenario, and data is sampled from the IoT device according to the initial sampling frequency to obtain the IoT data; When the data transmitted by the IoT device triggers the data demand, data sampling is performed on the IoT device; The data processing capability and network bandwidth of the IoT device are detected in real time, and when the data processing capability or the network bandwidth is lower than a preset standard threshold, the initial sampling frequency is reduced.

[0016] In one implementation, the cleaning module is used to clean the IoT data to obtain clean IoT data, specifically including: Grouping the IoT data according to the device ID to obtain a number of grouped IoT data; Defining a sliding window for each of the grouped IoT data respectively, and sliding the sliding window at a preset interval; Calculate the standard deviation of each grouped IoT data in the current window according to a preset window function, filter the grouped IoT data whose standard deviation exceeds a first preset threshold, and obtain first filtered IoT data; Performing format verification on the first filtered IoT data according to a predefined regular expression, filtering the first filtered IoT data that does not conform to the regular expression, and obtaining second filtered IoT data; The second filtered Internet data is subjected to data deduplication and noise filtering to obtain the clean Internet of Things data.

[0017] In one implementation, performing data deduplication and noise filtering on the second filtered Internet data to obtain the clean Internet of Things data specifically includes: Calculating the hash values ​​of the second filtered Internet data one by one, and storing the obtained hash values ​​in a preset database; Filter the second filtered Internet data whose hash value is consistent with the hash value stored in the preset database to obtain third filtered Internet data; The signal-to-noise ratio of each of the third filtered Internet data is calculated, and the third filtered Internet of Things data whose signal-to-noise ratio is lower than the second preset threshold is filtered to obtain the clean Internet of Things data.

[0018] In one implementation, transmitting the clean Internet of Things data to a data processing engine, controlling the data processing engine to perform data stream analysis on the received clean Internet of Things data, and feeding back the obtained data stream analysis results to the user end specifically includes: Transmitting the clean Internet of Things data to the data processing engine based on a preset message queue; Establish a real-time data warehouse on the data processing engine in advance, and store the received clean Internet of Things data in the real-time data warehouse; Comparing the clean Internet of Things data stored in the real-time data warehouse with the historical clean Internet of Things data within a preset time period to generate a first data flow analysis result; Predefine a complex event pattern on the data processing engine, perform complex event pattern matching on the clean IoT data, and when there is clean IoT data that conforms to the complex event pattern, generate a second data stream analysis result and feed back an abnormal alarm result to the user end; The first data flow analysis result and the second data flow analysis result are used to generate a visualization report through a data visualization tool, and the visualization report is fed back to the user end.

[0019] In one implementation, performing incremental backup of the clean IoT data stored in the database at every preset period to obtain incremental backup IoT data and compressing the incremental backup IoT data specifically includes: Backing up the initial clean IoT data stored in the database to obtain benchmark backup IoT data; Back up clean IoT data that has changed compared to the last backup of IoT data, and perform incremental backup of IoT data appropriately; The baseline backup IoT data and the obtained incremental backup IoT data are stored in a target location based on a compression algorithm.

[0020] In one implementation, storing the baseline backup IoT data and the obtained incremental backup IoT data to a target location based on a compression algorithm further includes: The baseline backup IoT data and the incremental backup IoT data are partitioned and stored according to data attributes; wherein the data attributes include timestamp, geographic location and device ownership; Acquire the data access search record in the target location, and create an index according to the first data access search record whose data access search record reaches a preset frequency threshold; The Internet of Things data corresponding to the first data access search record is cached in the memory. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A schematic diagram of a flow chart of an Internet of Things data optimization processing method provided in one embodiment of the present invention; Figure 2 A module diagram of an Internet of Things data optimization processing system provided in one embodiment of the present invention. DETAILED DESCRIPTION

[0022] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0023] The terms "first" and "second" and the like in the specification, claims and drawings of this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.

[0024] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0025] First, some terms in this application are explained to facilitate understanding by those skilled in the art.

[0026] (1) Flink: is a streaming computing framework that provides high-performance, high-reliability stream processing and batch processing capabilities. Apache Flink is an open source stream processing engine that supports event-driven applications and can process unbounded and bounded data streams.

[0027] (2) Regular expression: A special text pattern used to match strings, often used to search, replace, and verify strings. It consists of common characters (such as letters and numbers) and special characters (called metacharacters), and complex matching rules can be constructed through the combination of these characters.

[0028] (3) Signal-to-Noise Ratio (SNR): It is used to measure the relative strength or clarity between the useful information contained in the signal and the noise (interference). In various fields, such as communications, electronic engineering, audio processing, image processing, etc., SNR is a key performance indicator.

[0029] (4) Complex event processing (CEP) is a technology used to match and analyze complex patterns in real-time data streams. It can identify specific event patterns in data streams and respond accordingly. A complex event pattern is composed of a series of simple events, and a complex event or situation is described by the combination of these simple events.

[0030] Example 1 See also Figure 1 , Figure 1 The flowchart of an IoT data optimization processing method provided in an embodiment of the present invention is as follows. The embodiment of the present invention provides an IoT data optimization processing method, including steps 101 to 104, and each step is specifically as follows: Step 101: Perform dynamic intermittent sampling on IoT devices according to a preset sampling strategy to collect IoT data sent by the IoT devices.

[0031] In one embodiment, the dynamic intermittent sampling of the IoT device according to a preset sampling strategy specifically includes: obtaining the device type of the IoT device, and determining an associated dynamic sampling factor according to the device type; wherein the associated dynamic sampling factor includes: application scenario, data processing capability, data demand and network bandwidth; setting the sampling strategy of the IoT device according to the associated dynamic sampling factor; wherein, establishing an initial sampling frequency according to the application scenario, sampling data of the IoT device according to the initial sampling frequency to obtain the IoT data; when the data transmitted by the IoT device triggers the data demand, sampling data of the IoT device; real-time detection of the data processing capability and network bandwidth of the IoT device, and when the data processing capability or the network bandwidth is lower than a preset standard threshold, reducing the initial sampling frequency.

[0032] There are many types of IoT devices, including devices used to monitor environmental parameters or the status of objects, such as temperature sensors, humidity sensors, photosensors, pressure sensors, etc.; actuator devices used to control the physical world, such as motors, valves, lamps, solenoid valves, etc., which can realize remote control or automated operation; wireless communication modules used to realize wireless communication between IoT devices and the Internet or other devices, including Wi-Fi modules, Bluetooth modules, Zigbee modules, LoRa modules, etc.; smart terminal devices used to enable users to interact and control IoT devices, such as smartphones, smart watches, etc.; industrial control equipment used to realize industrial automation and control, such as PLC (programmable logic controller), SCADA system (supervisory control and data acquisition system), DCS (distributed control system), etc.; smart home devices used to realize home automation and intelligence, such as smart door locks, smart light bulbs, smart cameras, smart speakers, etc.; and wearable devices used to monitor user health, exercise and other data, and interact and communicate data with other devices, such as smart bracelets and smart glasses.

[0033] In an embodiment of the present invention, an associated dynamic sampling factor related to the IoT device is determined according to the device type of the IoT device. Each IoT device has at least one associated dynamic sampling factor, and corresponding sampling rates are used according to different associated dynamic sampling factors. In the same application scenario, the sampling frequencies corresponding to different types of IoT devices are not the same. Take temperature sensors and intelligent temperature control devices as examples for illustration. Temperature sensors usually need to sample the ambient temperature at a higher frequency to ensure that they can accurately capture temperature changes, while intelligent temperature control devices are used to control the ambient temperature rather than monitor it. Generally, temperature data is collected at a time interval and then the ambient temperature is adjusted according to the control algorithm. Preferably, the embodiment of the present invention is illustrated by the dynamic intermittent sampling process of the temperature sensor. For scenarios with high frequency of temperature changes, such as industrial production lines or laboratory environments, a higher initial sampling frequency is established, such as sampling once per second, to ensure timely monitoring and response to temperature changes; for scenarios with low frequency of temperature changes, such as indoor office environments or commercial buildings, a lower sampling frequency is established, such as sampling once per minute, to save system resources and reduce data transmission pressure; when the temperature data displayed by the temperature sensor exceeds the set threshold or an abnormal situation occurs, it is determined that the data demand is triggered at this time, and the temperature sensor is sampled for data, that is, when the data transmitted by the IoT device triggers the preset requirements, the associated dynamic sampling factors that meet the data demand at this time are determined, and the IoT device is sampled for data to timely discover and handle abnormal situations. Since temperature sensors usually have low computing and storage resources, their data processing capabilities are also required to save resources when performing data sampling. At the same time, temperature sensors are usually deployed in a distributed manner and transmit data to data centers or cloud platforms through the network. When dynamically sampling, the limitation of network bandwidth must also be considered to avoid bottlenecks in the transmission process. Therefore, when the data processing capability and network bandwidth of the IoT device are lower than the standard working value of the IoT device, the initial sampling frequency should be reduced to ensure accurate and effective transmission of IoT device data.

[0034] Step 102: Clean the IoT data to obtain clean IoT data.

[0035] In one embodiment, the data cleaning of the IoT data to obtain clean IoT data specifically includes: grouping the IoT data according to device ID to obtain a plurality of grouped IoT data; defining a sliding window for each of the grouped IoT data, and sliding the sliding window at preset intervals; calculating the standard deviation of each grouped IoT data in the current window according to a preset window function, filtering the grouped IoT data whose standard deviation exceeds a first preset threshold, and obtaining first filtered IoT data; formatting the first filtered IoT data according to a predefined regular expression, filtering the first filtered IoT data that does not conform to the regular expression, and obtaining second filtered IoT data; and deduplicating and filtering the second filtered IoT data to obtain the clean IoT data.

[0036] In the embodiment of the present invention, the collected IoT data is grouped using Flink's KeyedStream based on the device ID, and a number of grouped IoT data are obtained. A sliding window is defined for each grouped IoT data, so that the collected IoT data can be cleaned up simultaneously through multiple sliding windows, and the data processing efficiency can be improved while sharing the data processing pressure. Flink's KeyedStream is a data stream abstraction used in Flink to perform key-based operations. In Flink, the data stream is partitioned according to the specified key, and then the data with the same key is sent to the same parallel task for processing. Then, the standard deviation of each grouped IoT data in the current window is calculated through the predefined window function, ReduceFunction or AggregateFunction provided by Flink, and the grouped Internet data that exceeds a certain standard deviation range of the mean, that is, the standard deviation exceeds the preset first preset threshold, is determined as an abnormal point and filtered. Then, a regular expression is predefined according to the format requirements of the IoT data; wherein the format requirements include data fields, data types and data lengths; the filtered IoT data is format-verified based on the regular expression, and the IoT data that does not conform to the format is filtered to obtain the second filtered IoT data. Furthermore, the filtered data is deduplicated and noise filtered to obtain the final clean IoT data.

[0037] In one embodiment, the deduplication and noise filtering of the second filtered Internet data to obtain the clean Internet of Things data specifically includes: calculating the hash value of the second filtered Internet data one by one, and storing the obtained hash value in a preset database; filtering the second filtered Internet data whose hash value is consistent with the hash value stored in the preset database to obtain third filtered Internet data; calculating the signal-to-noise ratio of each of the third filtered Internet data, and filtering the third filtered Internet of Things data whose signal-to-noise ratio is lower than a second preset threshold to obtain the clean Internet of Things data.

[0038] In an embodiment of the present invention, the hash value of each second filtered Internet data is calculated one by one by a hash function such as MD5, SHA-1 or SHA-256, and the obtained hash value is stored in a key-value pair database, such as Redis, or a data structure in memory. Whenever new second filtered Internet data arrives, its hash function is calculated and compared with the previously stored hash value. If the new hash value already exists in the database, it can be determined that this is duplicate data; otherwise, it can be regarded as new data. The hash value of the new data is stored in the database, and the Internet data corresponding to the duplicate hash value is filtered to obtain the third filtered Internet data. Preferably, the embodiment of the present invention also cleans up the database every preset period and deletes unnecessary hash values ​​to prevent the storage of duplicate Internet of Things data and save storage space. Then, the average value of the third filtered Internet data is used as the size of the signal, and the power of the signal can be represented by the variance of the signal; the standard deviation is used as the noise power, and the power of the noise is represented by the variance of the noise (i.e., the square of the standard deviation); the ratio of the signal power to the noise power is the ratio of the noise power, and the signal-to-noise ratio of each third filtered Internet data is calculated by dividing the variance of the signal by the variance of the noise. When the signal-to-noise ratio is high, it means that the power of the signal relative to the noise is large and the data quality is good; when the signal-to-noise ratio is low, it means that the power of the signal relative to the noise is small and the data quality is poor. The third-filtered IoT data with a low signal-to-noise ratio is filtered, and the quality of the IoT device data is tested and evaluated to obtain clean IoT data.

[0039] Step 103: The clean Internet of Things data is transmitted to a data processing engine, the data processing engine is controlled to perform data stream analysis on the received clean Internet of Things data, and the obtained data stream analysis results are fed back to the user end.

[0040] In one embodiment, the clean Internet of Things data is transmitted to a data processing engine, the data processing engine is controlled to perform data flow analysis on the received clean Internet of Things data, and the obtained data flow analysis results are fed back to the user end, specifically including: transmitting the clean Internet of Things data to the data processing engine based on a preset message queue; pre-establishing a real-time data warehouse on the data processing engine, and storing the received clean Internet of Things data in the real-time data warehouse; comparing the clean Internet of Things data stored in the real-time data warehouse with the historical clean Internet of Things data within a preset time period to generate a first data flow analysis result; pre-defining a complex event pattern on the data processing engine, performing complex event pattern matching on the clean Internet of Things data, and when there is clean Internet of Things data that conforms to the complex event pattern, generating a second data flow analysis result and feeding back an abnormal alarm result to the user end; generating a visualization report from the first data flow analysis result and the second data flow analysis result through a data visualization tool, and feeding back the visualization report to the user end.

[0041] In an embodiment of the present invention, clean IoT data is received through a Kafka Topic message queue. Kafka Topic is a message queue in Kafka for storing published messages. Then the data processing engine is controlled to subscribe to the data stream in Kafka Topic, so that the clean IoT data in the message queue can be transmitted to the data processing engine. Preferably, a suitable stream processing engine is selected according to the needs and scenarios. For example, if low latency and high throughput are required, Apache Flink can be selected; if the latency requirement is not very high, but a large amount of data needs to be processed, Apache Kafka Streams can be selected. Cloud data warehouse technologies such as Amazon Redshift, Google BigQuery, etc. are used to establish a real-time data warehouse, and the real-time processed clean IoT data is persistently stored, and further, combined with historical data for analysis and comparison. Taking the IoT data of the temperature sensor as an example, the hourly temperature change data can be stored in the real-time data warehouse, and compared and analyzed with the temperature data of the past week to determine the data change frequency of the IoT device in the application scenario. Furthermore, a complex event pattern is defined in advance on the data processing engine. The complex event pattern is composed of a series of simple events, and a complex event or situation is described by the combination of these simple events. Commonly used pattern definition methods include: sequence pattern, which is used to define the order of occurrence of a series of events. For example, event A is followed by event B, and then event C; time window pattern, which is used to define the event occurrence pattern within a period of time. For example, event X has occurred three times in a row in the past 5 minutes; conditional pattern, which is used to define the conditional relationship between events. For example, if event A occurs, event B should occur at least once in the next 10 minutes; logical operator pattern: by using logical operators (such as AND, OR, NOT) to combine multiple simple events or patterns. For example, event A and event B occur at the same time. By defining complex event patterns, the data processing engine can monitor data streams in real time, identify event sequences that meet the pattern, and trigger corresponding actions or alarms. This method can help the system discover specific event patterns in real time, thereby realizing functions such as real-time monitoring, early warning, and intelligent decision-making. The generated first data stream analysis results and second data stream analysis results are displayed in the form of charts, maps, etc. through data visualization tools such as Tableau and Power BI. For example, the real-time monitored temperature data is displayed in the form of a line chart, allowing users to view the temperature change trend in real time.

[0042] Step 104: The clean IoT data is transmitted to a database, and incremental backup of the clean IoT data stored in the database is performed at preset intervals to obtain incremental backup IoT data, and the incremental backup IoT data is compressed, and the compressed incremental backup data is stored in a target location.

[0043] In one embodiment, the clean IoT data stored in the database is incrementally backed up at preset intervals to obtain incremental backup IoT data and compress the incremental backup IoT data, specifically including: backing up the initial clean IoT data stored in the database to obtain baseline backup IoT data; backing up the clean IoT data that has changed compared to the previous backup IoT data to obtain incremental backup IoT data; and storing the baseline backup IoT data and the obtained incremental backup IoT data to a target location based on a compression algorithm.

[0044] In an embodiment of the present invention, the incremental backup function of the database can be used to back up only the changed part of the data instead of backing up the entire database every time, thereby effectively reducing the storage space occupied. First, the initial clean IoT data in the database is fully backed up once to ensure that there is a baseline backup IoT data. Then the incremental backup function of the database is used to record the data changes that have occurred since the last backup. The new data is stored as incremental data in an appending manner instead of overwriting the original data. Then, a compression algorithm (such as gzip, Snappy, etc.) is used to compress and store the incremental backup IoT data and the baseline backup IoT data to reduce the storage space occupied. When restoring data, it is necessary to restore the baseline backup IoT data first, and then restore the incremental backup IoT data one by one, and gradually restore the backup IoT data of the changed part to the basis of the baseline backup IoT data, so as to achieve complete recovery of the clean IoT data. By adopting the incremental backup method, only the changed part of the data is backed up, which can effectively reduce the storage space and backup time required for backup. This method not only saves storage resources, but also improves the efficiency of backup and recovery.

[0045] In one embodiment, the compression algorithm is used to store the baseline backup IoT data and the obtained incremental backup IoT data to a target location, and also includes: partitioning and storing the baseline backup IoT data and the incremental backup IoT data according to data attributes; wherein the data attributes include timestamp, geographic location and device ownership; obtaining data access search records in the target location, and establishing an index based on the first data access search record whose data access search record reaches a preset frequency threshold; and caching the IoT data corresponding to the first data access search record into memory.

[0046] In an embodiment of the present invention, data is stored in time partitions based on event stamps generated by the data. Data can be partitioned by time periods such as hours, days, and weeks to facilitate management and query of historical data. If the data contains geographic location information, the data can be stored in geographic location partitions based on the device location to improve the efficiency of geographic location-related queries. Data can also be stored in partitions based on the IoT device ID to which the data belongs, which can improve the efficiency of queries for specific devices. Furthermore, data access search records at the target location are obtained, and indexes are created for frequently queried fields or attributes, such as device IDs, timestamps, etc. to speed up data retrieval. As incremental backup data is continuously updated, indexes need to be updated in a timely manner to reflect changes in the latest data. Frequently queried IoT data is cached in memory to increase data access speed.

[0047] In an embodiment of the present invention, an Internet of Things data optimization processing device is also provided, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the above-mentioned Internet of Things data optimization processing method is implemented.

[0048] In an embodiment of the present invention, a computer-readable storage medium is also provided, and the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned Internet of Things data optimization processing method.

[0049] Exemplarily, the computer program can be divided into one or more modules, one or more modules are stored in the memory and executed by the processor to complete the present invention. One or more modules can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the IoT data optimization processing device.

[0050] The IoT data optimization processing device may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The IoT data optimization processing device may include, but is not limited to, a processor, a memory, and a display. Those skilled in the art will appreciate that the above components are merely examples of IoT data optimization processing devices and do not constitute a limitation on IoT data optimization processing devices. The IoT data optimization processing device may include more or fewer components than the components, or a combination of certain components, or different components. For example, the IoT data optimization processing device may also include input and output devices, network access devices, buses, and the like.

[0051] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the IoT data optimization processing device, and uses various interfaces and lines to connect various parts of the entire IoT data optimization processing device.

[0052] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the IoT data optimization processing device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, a text conversion function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, text message data, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0053] Among them, if the module based on the optimization processing of the Internet of Things data is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0054] The embodiment of the present invention provides an IoT data optimization processing method, which performs dynamic intermittent sampling on IoT devices, can effectively reduce the amount of data while retaining important information and avoiding unnecessary data redundancy. Data cleaning of the collected IoT data can further eliminate redundant data and ensure the quality and accuracy of the data. Data stream analysis is performed on the cleaned data, which reduces the computing pressure and data processing volume of the data processing engine and improves the data processing efficiency and real-time performance. Furthermore, by introducing data stream analysis and processing technology, the collected data is processed and analyzed in real time, which can timely detect abnormal situations, extract valuable information, and respond to the user end in real time when necessary, reducing dependence on storage resources and delays in data analysis. Incremental storage and compression processing of the processed clean IoT data can effectively reduce the storage space occupied and maintain the integrity and availability of the data.

[0055] Example 2 See also Figure 2 , Figure 2 The module diagram of an Internet of Things data optimization processing system provided in an embodiment of the present invention is as follows. The embodiment of the present invention provides an Internet of Things data optimization processing system, including: a sampling module 201, a cleaning module 202, an analysis module 203 and a storage module 204; The sampling module 201 is used to perform dynamic intermittent sampling on the IoT device according to a preset sampling strategy, and collect IoT data sent by the IoT device; The cleaning module 202 is used to clean the IoT data to obtain clean IoT data; The analysis module 203 is used to transmit the clean Internet of Things data to the data processing engine, control the data processing engine to perform data flow analysis on the received clean Internet of Things data, and feed back the obtained data flow analysis results to the user end; The storage module 204 is used to transmit the clean Internet of Things data to a database, perform incremental backup of the clean Internet of Things data stored in the database at preset intervals, obtain incremental backup Internet of Things data, compress the incremental backup Internet of Things data, and store the compressed incremental backup data in a target location.

[0056] In one embodiment, the sampling module 201 is used to perform dynamic intermittent sampling on the Internet of Things device according to a preset sampling strategy, specifically including: obtaining the device type of the Internet of Things device, and determining the associated dynamic sampling factor according to the device type; wherein the associated dynamic sampling factor includes: application scenario, data processing capability, data demand and network bandwidth; setting the sampling strategy of the Internet of Things device according to the associated dynamic sampling factor; wherein, establishing an initial sampling frequency according to the application scenario, sampling the data of the Internet of Things device according to the initial sampling frequency to obtain the Internet of Things data; when the data transmitted by the Internet of Things device triggers the data demand, sampling the data of the Internet of Things device; real-time detection of the data processing capability and network bandwidth of the Internet of Things device, when the data processing capability or the network bandwidth is lower than the preset standard threshold, reducing the initial sampling frequency.

[0057] In one embodiment, the cleaning module 202 is used to clean the IoT data to obtain clean IoT data, specifically including: grouping the IoT data according to the device ID to obtain a plurality of grouped IoT data; defining a sliding window for each of the grouped IoT data, and sliding the sliding window at preset intervals; calculating the standard deviation of each grouped IoT data in the current window according to a preset window function, filtering the grouped IoT data whose standard deviation exceeds a first preset threshold, and obtaining first filtered IoT data; performing format verification on the first filtered IoT data according to a predefined regular expression, filtering the first filtered IoT data that does not conform to the regular expression, and obtaining second filtered IoT data; performing data deduplication and noise filtering on the second filtered IoT data to obtain the clean IoT data.

[0058] In one embodiment, the deduplication and noise filtering of the second filtered Internet data to obtain the clean Internet of Things data specifically includes: calculating the hash value of the second filtered Internet data one by one, and storing the obtained hash value in a preset database; filtering the second filtered Internet data whose hash value is consistent with the hash value stored in the preset database to obtain third filtered Internet data; calculating the signal-to-noise ratio of each of the third filtered Internet data, and filtering the third filtered Internet of Things data whose signal-to-noise ratio is lower than a second preset threshold to obtain the clean Internet of Things data.

[0059] In one embodiment, the transmitting of the clean Internet of Things data to a data processing engine, controlling the data processing engine to perform data flow analysis on the received clean Internet of Things data, and feeding back the obtained data flow analysis results to the user end specifically includes: transmitting the clean Internet of Things data to the data processing engine based on a preset message queue; pre-establishing a real-time data warehouse on the data processing engine, and storing the received clean Internet of Things data in the real-time data warehouse; comparing the clean Internet of Things data stored in the real-time data warehouse with the historical clean Internet of Things data within a preset time period to generate a first data flow analysis result; pre-defining a complex event pattern on the data processing engine, performing complex event pattern matching on the clean Internet of Things data, and when there is clean Internet of Things data that conforms to the complex event pattern, generating a second data flow analysis result and feeding back an abnormal alarm result to the user end; The first data flow analysis result and the second data flow analysis result are used to generate a visualization report through a data visualization tool, and the visualization report is fed back to the user end.

[0060] In one embodiment, the clean IoT data stored in the database is incrementally backed up at preset intervals to obtain incremental backup IoT data and compress the incremental backup IoT data, specifically including: backing up the initial clean IoT data stored in the database to obtain baseline backup IoT data; backing up the clean IoT data that has changed compared to the previous backup IoT data to obtain incremental backup IoT data; and storing the baseline backup IoT data and the obtained incremental backup IoT data to a target location based on a compression algorithm.

[0061] In one embodiment, the compression algorithm is used to store the baseline backup IoT data and the obtained incremental backup IoT data to a target location, and also includes: partitioning and storing the baseline backup IoT data and the incremental backup IoT data according to data attributes; wherein the data attributes include timestamp, geographic location and device ownership; obtaining data access search records in the target location, and establishing an index based on the first data access search record whose data access search record reaches a preset frequency threshold; and caching the IoT data corresponding to the first data access search record into memory.

[0062] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0063] The embodiment of the present invention provides an Internet of Things data optimization processing system, which performs dynamic intermittent sampling on Internet of Things devices, can effectively reduce the amount of data while retaining important information and avoiding unnecessary data redundancy. Data cleaning of the collected Internet of Things data can further eliminate redundant data and ensure the quality and accuracy of the data. Data stream analysis is performed on the cleaned data to reduce the computing pressure and data processing volume of the data processing engine, and improve the data processing efficiency and real-time performance. Furthermore, by introducing data stream analysis and processing technology, the collected data is processed and analyzed in real time, which can timely detect abnormal situations, extract valuable information, and respond to the user end in real time when necessary, reducing dependence on storage resources and delays in data analysis. Incremental storage and compression processing of the processed clean Internet of Things data can effectively reduce the storage space occupied and maintain the integrity and availability of the data.

[0064] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and substitutions can be made without departing from the technical principles of the present invention. These improvements and substitutions should also be regarded as the scope of protection of the present invention.

Claims

1. A method for optimizing and processing Internet of Things data, It is characterized in that include: Perform dynamic intermittent sampling on IoT devices according to a preset sampling strategy to collect IoT data sent by the IoT devices; Cleaning the IoT data to obtain clean IoT data; Transmitting the clean Internet of Things data to a data processing engine, controlling the data processing engine to perform data stream analysis on the received clean Internet of Things data, and feeding back the obtained data stream analysis results to a user end; The clean Internet of Things data is transmitted to a database, and the clean Internet of Things data stored in the database is incrementally backed up at preset intervals to obtain incremental backup Internet of Things data, compress the incremental backup Internet of Things data, and store the compressed incremental backup data in a target location.

2. The method for optimizing and processing Internet of Things data according to claim 1, It is characterized in that The dynamic intermittent sampling of the IoT device according to the preset sampling strategy specifically includes: Acquire the device type of the IoT device, and determine the associated dynamic sampling factor according to the device type; wherein the associated dynamic sampling factor includes: application scenario, data processing capability, data demand and network bandwidth; A sampling strategy for the IoT device is set according to the associated dynamic sampling factor; wherein an initial sampling frequency is established according to the application scenario, and data is sampled from the IoT device according to the initial sampling frequency to obtain the IoT data; When the data transmitted by the IoT device triggers the data demand, data sampling is performed on the IoT device; The data processing capability and network bandwidth of the IoT device are detected in real time, and when the data processing capability or the network bandwidth is lower than a preset standard threshold, the initial sampling frequency is reduced.

3. The method for optimizing and processing Internet of Things data according to claim 1, It is characterized in that The data cleaning of the IoT data to obtain clean IoT data specifically includes: Grouping the IoT data according to the device ID to obtain a number of grouped IoT data; Defining a sliding window for each of the grouped IoT data respectively, and sliding the sliding window at a preset interval; Calculate the standard deviation of each grouped IoT data in the current window according to a preset window function, filter the grouped IoT data whose standard deviation exceeds a first preset threshold, and obtain first filtered IoT data; Performing format verification on the first filtered IoT data according to a predefined regular expression, filtering the first filtered IoT data that does not conform to the regular expression, and obtaining second filtered IoT data; The second filtered Internet data is subjected to data deduplication and noise filtering to obtain the clean Internet of Things data.

4. The method for optimizing and processing Internet of Things data as claimed in claim 3, It is characterized in that The performing data deduplication and noise filtering on the second filtered Internet data to obtain the clean Internet of Things data specifically includes: Calculating the hash values ​​of the second filtered Internet data one by one, and storing the obtained hash values ​​in a preset database; Filter the second filtered Internet data whose hash value is consistent with the hash value stored in the preset database to obtain third filtered Internet data; The signal-to-noise ratio of each of the third filtered Internet data is calculated, and the third filtered Internet of Things data whose signal-to-noise ratio is lower than the second preset threshold is filtered to obtain the clean Internet of Things data.

5. The method for optimizing and processing Internet of Things data according to claim 1, It is characterized in that The transmitting the clean Internet of Things data to a data processing engine, controlling the data processing engine to perform data stream analysis on the received clean Internet of Things data, and feeding back the obtained data stream analysis results to the user end specifically includes: Transmitting the clean Internet of Things data to the data processing engine based on a preset message queue; Establish a real-time data warehouse on the data processing engine in advance, and store the received clean Internet of Things data in the real-time data warehouse; Comparing the clean Internet of Things data stored in the real-time data warehouse with the historical clean Internet of Things data within a preset time period to generate a first data flow analysis result; Predefine a complex event pattern on the data processing engine, perform complex event pattern matching on the clean IoT data, and when there is clean IoT data that conforms to the complex event pattern, generate a second data stream analysis result and feed back an abnormal alarm result to the user end; The first data flow analysis result and the second data flow analysis result are used to generate a visualization report through a data visualization tool, and the visualization report is fed back to the user end.

6. The method for optimizing and processing Internet of Things data according to claim 1, It is characterized in that The step of incrementally backing up the clean IoT data stored in the database at every preset period to obtain the incremental backup IoT data and compressing the incremental backup IoT data specifically includes: Backing up the initial clean IoT data stored in the database to obtain benchmark backup IoT data; Back up clean IoT data that has changed compared to the last backup of IoT data, and perform incremental backup of IoT data appropriately; The baseline backup IoT data and the obtained incremental backup IoT data are stored in a target location based on a compression algorithm.

7. The method for optimizing and processing Internet of Things data as claimed in claim 6, It is characterized in that The storing the baseline backup IoT data and the obtained incremental backup IoT data to a target location based on a compression algorithm also includes: The baseline backup IoT data and the incremental backup IoT data are partitioned and stored according to data attributes; wherein the data attributes include timestamp, geographic location and device ownership; Acquire the data access search record in the target location, and create an index according to the first data access search record whose data access search record reaches a preset frequency threshold; The Internet of Things data corresponding to the first data access search record is cached in the memory.

8. An IoT data optimization processing system, It is characterized in that include: Sampling module, cleaning module, analysis module and storage module; The sampling module is used to perform dynamic intermittent sampling on the IoT device according to a preset sampling strategy, and collect IoT data sent by the IoT device; The cleaning module is used to clean the IoT data to obtain clean IoT data; The analysis module is used to transmit the clean Internet of Things data to the data processing engine, control the data processing engine to perform data flow analysis on the received clean Internet of Things data, and feed back the obtained data flow analysis results to the user end; The storage module is used to transmit the clean Internet of Things data to a database, perform incremental backup of the clean Internet of Things data stored in the database at preset intervals, obtain incremental backup Internet of Things data, compress the incremental backup Internet of Things data, and store the compressed incremental backup data in a target location.

9. The Internet of Things data optimization processing system as claimed in claim 8, It is characterized in that The sampling module is used to perform dynamic intermittent sampling on IoT devices according to a preset sampling strategy, specifically including: Acquire the device type of the IoT device, and determine the associated dynamic sampling factor according to the device type; wherein the associated dynamic sampling factor includes: application scenario, data processing capability, data demand and network bandwidth; A sampling strategy for the IoT device is set according to the associated dynamic sampling factor; wherein an initial sampling frequency is established according to the application scenario, and data is sampled from the IoT device according to the initial sampling frequency to obtain the IoT data; When the data transmitted by the IoT device triggers the data demand, data sampling is performed on the IoT device; The data processing capability and network bandwidth of the IoT device are detected in real time, and when the data processing capability or the network bandwidth is lower than a preset standard threshold, the initial sampling frequency is reduced.

10. The Internet of Things data optimization processing system according to claim 8, It is characterized in that The cleaning module is used to clean the IoT data to obtain clean IoT data, specifically including: Grouping the IoT data according to the device ID to obtain a number of grouped IoT data; Defining a sliding window for each of the grouped IoT data respectively, and sliding the sliding window at a preset interval; Calculate the standard deviation of each grouped IoT data in the current window according to a preset window function, filter the grouped IoT data whose standard deviation exceeds a first preset threshold, and obtain first filtered IoT data; Performing format verification on the first filtered IoT data according to a predefined regular expression, filtering the first filtered IoT data that does not conform to the regular expression, and obtaining second filtered IoT data; The second filtered Internet data is subjected to data deduplication and noise filtering to obtain the clean Internet of Things data.

Citation Information

Patent Citations

  • Data processing method and device based on Internet of Things equipment

    CN116614554A

  • Power grid data acquisition system based on Internet big data

    CN117271642A

  • Industrial internet security log processing system and method based on Flink

    CN117539730A

  • Account book database management method based on electronic invoice voucher

    CN117788190A

  • Internet-of-things acquisition method and acquisition device suitable for complex environment

    CN117909667A

Cited By

  • Optimization processing system based on big data

    CN120200910A

  • An optimization processing system based on big data

    CN120200910B