Gateway-based multi-protocol environmental data fusion acquisition method

By adopting a gateway-based multi-protocol environmental data fusion acquisition method in the Internet of Things system, the problem of data pollution in multi-protocol data fusion is solved, and data quality is improved and the reliability of environmental monitoring data is achieved.

CN120050346AActive Publication Date: 2025-05-27ZHUOZHEN SIZHONG (GUANGZHOU) TECH CO LTD

Patent Information

Application Number
CN202510146422.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-10
Publication Date
2025-05-27
Estimated Expiration
2045-02-10

AI Technical Summary

Technical Problem

In IoT systems, data pollution problems may be caused during the multi-protocol data fusion process, such as format errors and information loss caused by data type incompatibility, which will affect subsequent data processing and analysis.

Method used

A gateway-based multi-protocol environmental data fusion acquisition method is adopted. By building a field mapping relationship library between the source protocol and the target protocol, data checks and compliance judgment are carried out, polluted data are identified and isolated, protocol conversion logs are analyzed to locate pollution sources, and protocol conversion rules are optimized to improve data quality.

Benefits of technology

Effectively identify and deal with data pollution problems in multi-protocol environments, improve data quality, and ensure data reliability and accuracy in environmental monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120050346A_ABST
    Figure CN120050346A_ABST
Patent Text Reader

Abstract

The invention relates to a gateway-based multi-protocol environmental data fusion acquisition method, which comprises the following steps of: acquiring a source protocol and a target protocol of an environmental sensor gateway, and constructing a field mapping relation library between the source protocol and the target protocol; according to the target protocol, identifying pollution data which does not meet the data quality requirement of the target protocol; obtaining a source protocol type identifier and a protocol version number of the polluted data; determining key nodes of the pollution data in the protocol conversion process by analyzing a protocol conversion log of each piece of pollution data in the pollution data isolation area; optimizing a numerical length limiting condition and a data format conversion logic in the protocol conversion function; extracting features of the pollution data according to a protocol exception processing mode; and redeploying the optimized protocol into the environment sensor gateway. According to the method, the data pollution problem in the multi-protocol environment can be effectively identified and processed, the data quality is improved, and reliable data support is provided for environment monitoring.
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 environmental data acquisition, and particularly relates to a multi-protocol environmental data fusion acquisition method based on a gateway. Background Art

[0002] In an Internet of Things system, as a bridge connecting devices with different protocols, the gateway undertakes important tasks of protocol conversion and data fusion. However, during the multi-protocol data fusion process, differences between different protocols may lead to data pollution problems. For example, data type incompatibility may cause format errors, information loss, etc. in the converted data. If the data pollution problem is not handled in a timely manner, it may continue to spread in subsequent data processing links, affecting aggregation results, model training, and report generation, etc.

[0003] Therefore, there is an urgent need for a fine-grained data pollution identification and isolation method that can penetrate to the single-record level, use the verification rules of the source protocol and the target protocol to discover illegal data in real time and prevent it from spreading downstream; at the same time, in order to trace the root cause and find out the fundamental reason for data pollution, it is also necessary to establish a data lineage mechanism to track the steps that each piece of data goes through during the conversion process, so as to locate the problematic conversion nodes and perform debugging and optimization. Summary of the Invention

[0004] In order to solve the problems existing in the above-mentioned prior art, the purpose of the present invention is to provide a multi-protocol environmental data fusion acquisition method based on a gateway. The multi-protocol environmental data fusion acquisition method based on a gateway can effectively identify and handle data pollution problems in a multi-protocol environment, improve data quality, and provide reliable data support for environmental monitoring.

[0005] The multi-protocol environmental data fusion acquisition method based on a gateway described in the present invention includes the following steps: S1. Obtain the source protocol and the target protocol of the environmental sensor gateway, construct a field mapping relationship library between the source protocol and the target protocol, and verify the data of the environmental sensor; S2. According to the target protocol, perform compliance judgment on the environmental sensor data processed by the protocol adaptation plugin, and identify the polluted data that does not meet the data quality requirements of the target protocol; S3. Obtain the source protocol type identifier and protocol version number of the polluted data, and store the polluted data whose affiliated protocol is incompatible with the target protocol in the polluted data isolation area; S4. By analyzing the protocol conversion logs of each piece of polluted data in the polluted data isolation area, determine the key nodes in the protocol conversion process of the polluted data, and locate the specific protocol fields that introduce pollution; S5. Optimize the numerical length limit conditions and data format conversion logic in the protocol conversion function according to the specific protocol fields, and update the conversion rules in the protocol adaptation plugin; S6. Extract the characteristics of the contaminated data according to the protocol exception handling method, and add the extracted characteristics to the field mapping relationship library and the source protocol data verification rule library; S7. Redeploy the optimized protocol to the environmental sensor gateway, and improve the field mapping relationship library, the source protocol data verification rules, and the protocol adaptation plugin.

[0006] Preferably, the step S1 specifically includes: Obtain the source protocol and the target protocol of the environmental sensor gateway from the gateway database, and construct a field mapping relationship library between the source protocol and the target protocol; According to the field mapping relationship library, use a mapping table to record the corresponding relationship between the source field and the target field and the parameter conversion ratio, and obtain a conversion rule library for the source and target protocol fields; According to the numerical range threshold, change amount threshold, and significant digit threshold set for the numerical fields in the conversion rule library, use the random forest algorithm to construct a source protocol data verification rule library; Read the original data of the environmental sensor from the source protocol data buffer, and verify the original data according to the verification criteria in the source protocol data verification rule library, and obtain the verified source protocol data by using the threshold replacement method.

[0007] Preferably, the step S2 specifically includes: Obtain the processed temperature, humidity, air pressure, wind speed, and radiation field data of the environmental sensor from the source protocol data buffer, and use the Naive Bayes discriminator to obtain an abnormal data set according to the determination criteria for the field numerical value range in the target protocol; According to the field sampling time interval in the abnormal data set, use the linear interpolation function to supplement the data points beyond the sampling period, and obtain the data set to be verified by calculating the change trend between the supplemented data and the surrounding data through the sliding variance; According to the data set to be verified, use the convolutional neural network to learn the change law of the numerical field sequence, judge the data abnormality level by comparing the deviation between the sequence prediction value and the actual value, and generate a data abnormality level table according to the abnormality level threshold; Obtain the resolution requirements for the numerical fields in the target protocol, and judge the significant digits of the data at different levels in the data abnormality level table; If the significant digits exceed the precision requirement threshold, generate a contaminated data record table for the abnormally marked data in the continuous sampling period, and obtain the contaminated data that does not meet the data quality requirements of the target protocol.

[0008] Preferably, step S3 specifically includes: Read the header identification segment of the contaminated data from the source protocol data buffer, obtain the source protocol identifier through a feature matcher, and use a Naive Bayes classifier to compare the source protocol identifier with the standard features in the protocol feature library to obtain the source protocol identification result; According to the source protocol identification result, in the pre-established protocol compatibility matrix, find the corresponding relationship of the target protocol, calculate the feature similarity between the source protocol identifier and the target protocol using a feature vector, and perform a weighted calculation on the feature similarity and the conversion success rate to obtain the source-target protocol compatibility level; According to the source-target protocol compatibility level, for the contaminated data below the compatibility level threshold, add an isolation identification bit to the contaminated data header identification segment, and extract protocol information from the contaminated data according to the isolation identification bit to establish a contaminated data isolation area; According to the contaminated data isolation area, write the read contaminated data timestamp, geographical location mark, and sensor identifier into the alarm record.

[0009] Preferably, step S4 specifically includes: Obtain the protocol conversion log record from the contaminated data isolation area, and extract the conversion function identifier, execution timestamp, field identifier, field value, and conversion rule according to the protocol conversion log record to obtain the conversion function execution record; According to the conversion function execution record, use a string matcher to extract the input field and output field, and establish a conversion function linked list through the conversion function execution order. The conversion function linked list records the field value range, field precision, and conversion rule; According to the conversion function linked list, use a directed graph builder to generate a field blood relationship dependency graph. The nodes in the field blood relationship dependency graph record the function identifier and timestamp, and the connections between the nodes record the field identifier and the conversion rule; For the field blood relationship dependency graph, obtain the numerical value of the source protocol field before conversion and the numerical value of the target protocol field after conversion; If the deviation of the numerical value after field conversion exceeds the deviation threshold, extract the forward input field and backward output field of the node from the field blood relationship dependency graph, and establish a field conversion path record.

[0010] Preferably, step S5 specifically includes: Obtain the field value length limit, numerical range constraint, and numerical precision requirement from the source protocol field table and the target protocol field table, and use a string matcher to compare the field attributes to obtain a field attribute difference table; Extract the numerical conversion rules of the source-target protocol according to the field attribute difference table, and classify the numerical conversion rules using a Naive Bayes classifier to obtain a numerical rule optimization table; According to the numerical rule optimization table, use a frequency histogram to count the distribution of converted data in the data isolation area, and mark the data points exceeding the numerical limit range to obtain an abnormal conversion mapping table; Modify the numerical length limit parameter, numerical range constraint parameter, and numerical precision requirement parameter in the numerical conversion rules according to the abnormal conversion mapping table, and update the conversion rules in the protocol adaptation plugin.

[0011] Preferably, the step S6 specifically includes: Obtain the contaminated data in the contaminated data isolation area, use a sliding window to calculate three types of characteristic parameters for the contaminated data, namely, the numerical over-limit amplitude, numerical precision deviation, and sampling period offset, and generate a contaminated data characteristic record according to the preset characteristic classification rules; According to the contaminated data characteristic record, obtain the rules corresponding to the source-target protocol fields from the field mapping relationship library, extract the field value range and significant digits according to the rules corresponding to the source-target protocol fields, and generate field limit rules; According to the field limit rules, obtain the field check conditions from the source protocol data verification rules, supplement the value range constraint and significant digit constraint to the field check conditions, and generate field check rules; Extract the check conditions and threshold parameters from the field check rules, expand the field attributes in the field mapping relationship library, add value range parameters, significant digit parameters, and sampling interval parameters to the numerical field attributes, supplement constraint parameters to the check conditions in the source protocol data verification rule library, and record the update result of the source protocol data verification rule library.

[0012] Preferably, the step S7 specifically includes: Obtain the data collected by the environmental sensor from the environmental sensor gateway, and use a Naive Bayes classifier to identify abnormal data in numerical range, abnormal data in numerical precision, and abnormal data in sampling period to obtain a pollution rate curve; Obtain the pollution rate record before protocol optimization according to the pollution rate curve, and perform smoothing processing on the pollution rate record using exponential weighted average to obtain a pollution rate reduction ratio; According to the pollution rate reduction ratio, obtain the field names in the protocols with unqualified pollution rates, and obtain the field mapping rules, check parameters, and conversion parameters from the field mapping relationship library, source protocol data verification rules, and the protocol adaptation plugin according to the field names to obtain a rule optimization table; Optimize the limit parameters in the table according to the rules, update the corresponding field rules in the field mapping relationship library, the corresponding field parameters in the source protocol data verification rules, and the corresponding field conversion parameters in the protocol adaptation plug-in, and record the update timestamp of the source protocol data verification rule library.

[0013] An environment data fusion acquisition method based on a gateway according to the present invention has the following advantages: The environment data fusion acquisition method based on a gateway according to the present invention constructs a field mapping relationship library between the source protocol and the target protocol, which helps to efficiently fuse data under different protocols at the gateway level and improves data compatibility; through the protocol adaptation plug-in, it is possible to process sensor data in multiple protocol environments, thereby enhancing the flexibility and scalability of the system; through compliance judgment, it is possible to identify contaminated data that does not meet the data quality requirements of the target protocol, thereby avoiding the impact of low-quality data on subsequent analysis and decision-making; by analyzing the protocol conversion logs in the contaminated data isolation area, it is possible to accurately determine the key nodes in the protocol conversion process of the contaminated data and locate the specific protocol fields that introduce contamination, thereby improving the efficiency of problem repair; by adding the extracted contaminated data features to the field mapping relationship library and the source protocol data verification rule library, it helps to better process and verify similar data in the future; the perfect field mapping relationship library, source protocol data verification rules, and protocol adaptation plug-in help to reduce the complexity of system maintenance and improve the stability and reliability of the system. The environment data fusion acquisition method based on a gateway can effectively identify and process data contamination problems in a multi-protocol environment, improve data quality, and provide reliable data support for environmental monitoring. Description of the Drawings

[0014] Figure 1 is a flowchart of an environment data fusion acquisition method based on a gateway according to the present invention. Detailed Embodiments

[0015] As Figure 1 shown, an environment data fusion acquisition method based on a gateway according to the present invention includes the following steps: S1. Obtain the source protocol and the target protocol of the environmental sensor gateway, construct a field mapping relationship library between the source protocol and the target protocol, and verify the data of the environmental sensor; S2. According to the target protocol, perform compliance judgment on the environmental sensor data processed by the protocol adaptation plug-in, and identify contaminated data that does not meet the data quality requirements of the target protocol; S3. Obtain the source protocol type identifier and protocol version number of the contaminated data, and store the contaminated data whose affiliated protocol is incompatible with the target protocol in the contaminated data isolation area; S4. By analyzing the protocol conversion logs of each piece of contaminated data in the contaminated data isolation area, determine the key nodes in the protocol conversion process of the contaminated data, and locate the specific protocol fields that introduce contamination; S5. According to the specific protocol fields, optimize the numerical length limit conditions and data format conversion logic in the protocol conversion function, and update the conversion rules in the protocol adaptation plug-in; S6. Extract the characteristics of the contaminated data according to the protocol exception handling method, and add the extracted characteristics to the field mapping relationship library and the source protocol data verification rule library; S7. Redeploy the optimized protocol to the environmental sensor gateway, and improve the field mapping relationship library, the source protocol data verification rules, and the protocol adaptation plug-in.

[0016] Further, in this embodiment, step S1 specifically includes: Obtain the source protocol and the target protocol of the environmental sensor gateway from the gateway database, and construct a field mapping relationship library between the source protocol and the target protocol; According to the field mapping relationship library, use a mapping table to record the corresponding relationship between the source field and the target field and the parameter conversion ratio, and obtain a conversion rule library for the source and target protocol fields; According to the numerical range threshold, change amount threshold, and significant digit threshold set for the numerical type field parameters in the conversion rule library, use the random forest algorithm to construct a source protocol data verification rule library; Read the original data of the environmental sensor from the source protocol data buffer, and verify the original data according to the verification criteria in the source protocol data verification rule library, and obtain the verified source protocol data by using the threshold replacement method; Specifically, obtain the source protocol field name, data type, numerical range, resolution, and precision parameters from the gateway database, obtain the target protocol field name, data type, numerical range, resolution, and precision parameters, construct a source and target protocol field mapping table, and for the numerical type fields of temperature, humidity, and air pressure, use the mapping table to record the corresponding relationship between the source field and the target field and the parameter conversion ratio, and obtain a conversion rule library for the source and target protocol fields; According to the numerical type field parameters in the source and target protocol field conversion rule library, set the upper and lower limit verification thresholds for the numerical range of the source protocol field, set the minimum change amount verification threshold for the resolution of the source protocol field, set the significant digit verification threshold for the precision of the source protocol field, and use the random forest algorithm to construct a source protocol data verification rule library, and generate three data verification criteria for the field numerical range, change amount, and significant digits; Read the original data of the environmental sensor from the source protocol data buffer, and sequentially execute the verification criteria in the source protocol data verification rule library for the numerical type fields; If the field value exceeds the range threshold, the limit value is used for replacement. If the change amount exceeds the resolution threshold, the average value is used for replacement. If the significant digits exceed the precision threshold, truncation processing is performed, and the verified source protocol data is generated; According to the conversion rule library of the source target protocol fields, parameter conversion is performed on the numerical fields in the verified source protocol data. A convolutional neural network is used to detect anomalies in the converted numerical fields, and the detected abnormal data is marked and recorded. The source protocol data verification rule library is used for secondary verification, and the data passing the verification is encapsulated according to the target protocol format; The environmental sensor gateway receives various sensor protocol data. The source protocol uses a frequently changing protocol format, and the target protocol uses a periodic reporting protocol format. There are differences in the data structure and parameter settings between the source and target protocols; The example is as follows: Taking temperature data as an example, the source protocol temperature value range is from -40 to 80 degrees Celsius, the resolution is 0.1 degrees Celsius, and the precision is 0.5 degrees Celsius. The target protocol temperature value range is from -50 to 100 degrees Celsius, the resolution is 0.01 degrees Celsius, and the precision is 0.1 degrees Celsius; The humidity data source protocol value range is from 0 to 100%, the resolution is 1%, and the precision is 2%. The target protocol value range is from 0 to 100%, the resolution is 0.1%, and the precision is 1%. The air pressure data source protocol value range is from 800 to 1100 hPa, the resolution is 1 hPa, and the precision is 2 hPa. The target protocol value range is from 700 to 1300 hPa, the resolution is 0.1 hPa, and the precision is 1 hPa; The source target protocol field mapping table records the mapping relationships of three numerical fields: temperature, humidity, and air pressure. In the conversion rule library, the conversion ratio of the temperature field is 10:1, the conversion ratio of the humidity field is 10:1, and the conversion ratio of the air pressure field is 10:1, realizing the conversion of the source protocol data to the target protocol data format; When the source protocol temperature value of 81 degrees Celsius exceeds the upper limit of the numerical range of 80 degrees Celsius, 80 degrees Celsius is used for replacement; When the change amount of the source protocol humidity value of 2% exceeds the resolution threshold of 1%, the average value of the source data and the change data is used for replacement; When the source protocol air pressure value of 1056.789 hPa exceeds the precision threshold of 2 hPa, 1057 hPa is used for replacement; The source protocol data verification rule library includes three standards: numerical field range check, change amount check, and precision check; Taking temperature data as an example, the numerical range check determines whether the temperature is within the range of -40 to 80 degrees Celsius, the change amount check determines whether the temperature change is less than 0.1 degrees Celsius, and the precision check determines whether the number of digits after the decimal point of the temperature value exceeds 1 digit; The humidity data range check determines whether the humidity is within the range of 0 to 100%, the change amount check determines whether the humidity change is less than 1%, and the precision check determines whether the number of digits after the decimal point of the humidity value exceeds 0 digits; The air pressure data range check determines whether the air pressure is within the range of 800 to 1100 hPa, the change amount check determines whether the air pressure change is less than 1 hPa, and the precision check determines whether the number of digits after the decimal point of the air pressure value exceeds 0 digits; After verification, the source protocol data is converted according to the source-to-target protocol field conversion rules. After conversion, the numerical field data of temperature, humidity, and air pressure is subjected to anomaly detection, and the detected abnormal data is marked and recorded; Taking the temperature data as an example, according to the target protocol field order, the temperature field value 800 corresponding to 80.0 degrees Celsius is encapsulated in the 3rd to 6th bytes of the target protocol; The humidity field value 678 corresponding to 67.8% is encapsulated in the 7th to 10th bytes of the target protocol, and the air pressure field value 10203 corresponding to 1020.3 hPa is encapsulated in the 11th to 14th bytes of the target protocol; The target protocol data includes four parts: protocol header, data length, field data, and check code, and assembles the data packet according to the target protocol format requirements.

[0017] Further, in this embodiment, step S2 specifically includes: Obtain the temperature, humidity, air pressure, wind speed, and radiation field data processed by the environmental sensor from the source protocol data buffer, and use the Naive Bayes discriminator to obtain the abnormal data set according to the field value range determination standard in the target protocol; According to the field sampling time interval in the abnormal data set, use the linear interpolation function to supplement the data points beyond the sampling period, and obtain the data set to be verified by calculating the change trend between the supplemented data and the surrounding data through the sliding variance; According to the data set to be verified, use the convolutional neural network to learn the change law of the numerical field sequence, judge the data anomaly level by comparing the deviation between the sequence prediction value and the actual value, and generate the data anomaly level table according to the anomaly level threshold; Obtain the resolution requirements of the numerical fields in the target protocol, and judge the number of significant digits of the data at different levels in the data anomaly level table; If the number of significant digits exceeds the precision requirement threshold, generate a pollution data record table for the abnormal marked data in the continuous sampling period, and obtain the pollution data that does not meet the data quality requirements of the target protocol; Specifically, obtain the processed temperature, humidity, air pressure, wind speed, and radiation field data of the environmental sensor protocol adaptation plugin from the source data buffer, obtain the field data quality determination criteria in the target protocol, and use a Naive Bayes discriminator to identify anomalies in a single numeric field according to the three indicators of the value range, value change interval, and value occurrence frequency of the target protocol fields. Mark and store the data with values outside the value range, abnormal change intervals, and abnormal occurrence frequencies, and obtain the abnormal data set according to the marked position index; According to the sampling period requirements of the numeric fields in the target protocol, count the sampling time intervals of the fields in the abnormal data set. If the time interval exceeds the sampling period, use a linear interpolation function to supplement the missing data points, perform a numerical compliance check on the supplemented data, calculate the change trend of the supplemented data and the surrounding data using sliding variance, and mark the position of the data with a change amplitude exceeding the threshold specified in the target protocol to obtain the data set to be verified; For the data set to be verified, obtain the value range limits of the temperature, humidity, air pressure, wind speed, and radiation fields from the target protocol quality determination criteria, use a convolutional neural network to learn the change rules of the numeric field sequence, judge the data anomaly level by comparing the deviation between the sequence prediction value and the actual value, and mark and classify the data according to the anomaly level threshold to generate a data anomaly level table; Obtain the resolution and accuracy requirements of the numeric fields in the target protocol, judge the number of significant digits of the data at different levels in the data anomaly level table. If the number of significant digits exceeds the limit of the accuracy requirement, mark the data, mark the position association relationship of the data records with multiple fields marked simultaneously, and generate a contaminated data record table for the data with abnormal marks in consecutive sampling periods, recording the abnormal field name, abnormal value, abnormal level, and associated fields; The quality determination of environmental sensor data involves multiple dimensions such as value range, sampling period, and data accuracy; The example is as follows: The value range of the temperature field is limited between -40 and 80 degrees Celsius. Values outside this range are determined to be abnormal. The temperature change within every 5 seconds does not exceed 2 degrees Celsius in the value change interval, and the number of times the same temperature value repeats within 24 hours does not exceed 10% of the total number of samples; The value range of the humidity field is limited between 0 and 100%. The humidity change within 5 seconds does not exceed 5%, and the number of times the same humidity value repeats does not exceed 15% of the total number of samples; The value range of the air pressure field is restricted between 800 and 1100 hPa. The change in air pressure within 5 seconds does not exceed 10 hPa, and the number of repetitions of the same air pressure value does not exceed 20% of the total number of sampling times. The sampling period of the numerical field is set to 5 seconds. The temperature data shows 25.6 degrees Celsius at 15:00:05 and 26.1 degrees Celsius at 15:00:15. The sampling point at 15:00:10 in the middle is missing, and the temperature value at 15:00:10 is calculated to be 25.85 degrees Celsius through linear interpolation; The humidity data shows 67.8% at 15:00:05 and 68.9% at 15:00:15. The humidity value at 15:00:10 is calculated by interpolation to be 68.35%; The air pressure data shows 1013.2 hPa at 15:00:05 and 1013.8 hPa at 15:00:15. The air pressure value at 15:00:10 is calculated by interpolation to be 1013.5 hPa; The abnormal level of the field value is divided into 4 levels. When the temperature data exceeds -40 to 80 degrees Celsius, it is determined as a level 4 abnormality. When the temperature changes by more than 2 degrees Celsius within 5 seconds, it is determined as a level 3 abnormality. When the number of repetitions of the temperature value exceeds the standard, it is determined as a level 2 abnormality. When the temperature accuracy exceeds 0.1 degrees Celsius, it is determined as a level 1 abnormality; When the humidity data exceeds 0 to 100%, it is determined as a level 4 abnormality. When the humidity changes by more than 5% within 5 seconds, it is determined as a level 3 abnormality. When the number of repetitions of the humidity value exceeds the standard, it is determined as a level 2 abnormality. When the humidity accuracy exceeds 0.1%, it is determined as a level 1 abnormality; When the air pressure data exceeds 800 to 1100 hPa, it is determined as a level 4 abnormality. When the air pressure changes by more than 10 hPa within 5 seconds, it is determined as a level 3 abnormality. When the number of repetitions of the air pressure value exceeds the standard, it is determined as a level 2 abnormality. When the air pressure accuracy exceeds 0.1 hPa, it is determined as a level 1 abnormality; The specific information of the abnormal data is recorded in the pollution data record form. The temperature data of 85.6, 86.1, and 86.3 degrees Celsius at three consecutive sampling points from 15:00:05 to 15:00:15 exceeds the upper limit, and it is determined as a level 4 abnormality; The humidity data shows 65.5%, 72.8%, and 79.2% at three consecutive sampling points from 15:00:05 to 15:00:15, and the change within 5 seconds exceeds 5%, so it is determined as a level 3 abnormality; The air pressure data shows 1013.256, 1013.852, and 1013.534 hPa at three consecutive sampling points from 15:00:05 to 15:00:15, and the accuracy exceeds 0.1 hPa, so it is determined as a level 1 abnormality; The level 4 abnormality of the temperature and the level 3 abnormality of the humidity overlap on the time axis, and the abnormality correlation is recorded.

[0018] Furthermore, in this embodiment, step S3 specifically includes: Read the header identification segment of the contaminated data from the source protocol data buffer, obtain the source protocol identifier through the feature matcher, and use the Naive Bayes classifier to compare the source protocol identifier with the standard features in the protocol feature library to obtain the source protocol identification result; According to the source protocol identification result, in the pre-established protocol compatibility matrix, find the corresponding relationship of the target protocol, calculate the feature similarity between the source protocol identifier and the target protocol using the feature vector, and perform weighted calculation on the feature similarity and the conversion success rate to obtain the source-target protocol compatibility level; According to the source-target protocol compatibility level, for the contaminated data below the compatibility level threshold, add an isolation identification bit to the contaminated data header identification segment, and extract protocol information from the contaminated data according to the isolation identification bit to establish a contaminated data isolation area; According to the contaminated data isolation area, write the read contaminated data timestamp, geographical location mark, and sensor identifier into the alarm record; Specifically, read the contaminated data header identification segment from the source protocol data buffer, extract the source protocol identifier, protocol version number, and sensor identifier number through the feature matcher, find the matching item in the protocol feature library according to the source protocol identifier, use the Naive Bayes classifier to compare the source protocol identifier with the standard features in the protocol feature library, and obtain the source protocol identification result according to the standard features compared with the source protocol feature sequence; For the source protocol identification result, find the corresponding relationship with the target protocol in the compatibility matrix, calculate the feature similarity between the source protocol identifier and the target protocol using the feature vector, obtain the source-target protocol data conversion success rate in the compatibility matrix, and perform weighted calculation on the source-target protocol feature similarity and the conversion success rate to generate the source-target protocol compatibility level; If the compatibility level is lower than the compatibility level threshold, add an isolation identification bit to the contaminated data header identification segment; According to the contaminated data header isolation identification bit, extract the protocol header identification, timestamp, location identification, and sensor identifier from the contaminated data, use the Kalman filter to correct the location identification data, generate the contaminated data geographical location mark, establish a contaminated data isolation area, divide the storage block according to the source protocol identification, and store the contaminated data in the corresponding storage block; For the contaminated data in the isolation area storage block, read the contaminated data timestamp, geographical location mark, and sensor identifier, establish an alarm record index table, generate a unique alarm record identification number, write the contaminated data timestamp, geographical location mark, sensor identifier, source protocol identification, and isolation block number into the alarm record, and establish a time dimension index and a space dimension index for the alarm record; The example is as follows: The adaptation of environmental sensor protocols involves multiple source protocol formats. The source protocol identifier uses a 16-bit binary encoding, where the high 8 bits represent the protocol type and the low 8 bits represent the version number. The sensor identifier uses a 32-bit encoding, with the high 16 bits representing the sensor type and the low 16 bits representing the device serial number; The source protocol standard feature sequence is recorded in the protocol feature library, including feature items such as the message header identifier, the position of the length field, the starting position of the data field, and the structure of the check field; The source protocol identifier 1010010100000011 represents the temperature sensor data acquisition protocol version 3.0, 1101001000000010 represents the humidity sensor data acquisition protocol version 2.0, and 1011001100000001 represents the air pressure sensor data acquisition protocol version 1.0; The protocol compatibility matrix uses a weighted directed graph structure to record the compatibility relationship between the source protocol and the target protocol. The rows of the protocol compatibility matrix represent the source protocol identifier, the columns represent the target protocol identifier, and the weight represents the protocol compatibility level; The compatibility level between the temperature sensor data acquisition protocol version 3.0 and the target protocol is 0.95, and the data conversion success rate is 0.98; The compatibility level between the humidity sensor data acquisition protocol version 2.0 and the target protocol is 0.85, and the data conversion success rate is 0.92; The compatibility level between the air pressure sensor data acquisition protocol version 1.0 and the target protocol is 0.75, and the data conversion success rate is 0.88; The preset compatibility level threshold is 0.8, and the data isolation mechanism is triggered when it is lower than the threshold; The contaminated data isolation area divides storage blocks according to the source protocol identifier. Each storage block contains a data buffer area and an index area; The contaminated data of the temperature sensor is stored in area number 001. The location identifier of the contaminated data is 40.5 degrees north latitude, 116.3 degrees east longitude, the timestamp is 2024011513254, and the sensor identifier number is TS00000123; The contaminated data of the humidity sensor is stored in area number 002. The location identifier of the contaminated data is 40.6 degrees north latitude, 116.4 degrees east longitude, the timestamp is 2024011513255, and the sensor identifier number is HS00000234; The contaminated data of the air pressure sensor is stored in area number 003. The location identifier of the contaminated data is 40.7 degrees north latitude, 116.5 degrees east longitude, the timestamp is 2024011513256, and the sensor identifier number is PS00000345; The alarm record index table uses a doubly linked list structure to establish an index according to the time dimension and the space dimension; Alarm record unique identifier AL202401151325001 records temperature sensor contamination data, including timestamp 2024011513254, location marker N40.5E116.3, sensor identifier TS00000123, source protocol identifier 0xA503, isolation block number 001; Alarm record AL202401151325002 records humidity sensor contamination data, including timestamp 2024011513255, location marker N40.6E116.4, sensor identifier HS00000234, source protocol identifier 0xD402, isolation block number 002; Alarm record AL202401151325003 records air pressure sensor contamination data, including timestamp 2024011513256, location marker N40.7E116.5, sensor identifier PS00000345, source protocol identifier 0xB301, isolation block number 003.

[0019] Furthermore, in this embodiment, step S4 specifically includes: Obtain protocol conversion log records from the contamination data isolation area, extract the conversion function identifier, execution timestamp, field identifier, field value, and conversion rule according to the protocol conversion log records to obtain conversion function execution records; According to the conversion function execution records, use a string matcher to extract input fields and output fields, and establish a conversion function linked list through the conversion function execution order. The conversion function linked list records the field value range, field precision, and conversion rule; According to the conversion function linked list, use a directed graph builder to generate a field blood relationship dependency graph. The nodes in the field blood relationship dependency graph record the function identifier and timestamp, and the connections between nodes record the field identifier and conversion rule; For the field blood relationship dependency graph, obtain the numerical value of the source protocol field before conversion and the numerical value of the target protocol field after conversion; If the deviation of the numerical value after field conversion exceeds the deviation threshold, extract the forward input field and backward output field of the node from the field blood relationship dependency graph and establish a field conversion path record; Specifically, obtain the contamination data protocol conversion log from the contamination data isolation area, extract the conversion function identifier, execution timestamp, field identifier, field value, and conversion rule according to the protocol conversion log record format, and use a string matcher to obtain the function execution order and field mapping relationship during the protocol conversion from the log; Extract the input field and output field for each conversion function execution record, establish a conversion function linked list according to the function execution order, and record the field value range, field precision, and conversion rule during the function processing; According to the conversion function linked list, a directed graph builder is used to generate a field lineage dependency graph. The nodes in the graph record the function identifier and timestamp, and the connections between nodes record the field identifier and conversion rule. The nodes in the lineage dependency graph are numbered according to the data flow from the source protocol field to the target protocol field. A Naive Bayes classifier is used to classify the conversion function nodes, identify the correspondence between the input and output fields of the function, and generate a field lineage relationship table; According to the field lineage relationship table, obtain the numerical value of the source protocol field before conversion and the numerical value of the target protocol field after conversion. Calculate the standard transformation value according to the protocol conversion rule, compare the difference between the converted value and the standard transformation value, and use a Kalman filter to calculate the deviation degree of the converted value; If the deviation of the field value after conversion exceeds the deviation threshold, mark the corresponding conversion function node in the field lineage relationship table; According to the marked function nodes, extract the forward input fields and backward output fields of the nodes from the lineage dependency graph, construct the context association path of the function nodes, sort the conversion function identifiers, field identifiers, and numerical changes on the path according to the execution time sequence, and establish a field conversion path record; The conversion path record includes the function execution time, field identifier, field value, conversion rule, and function identifier; The protocol conversion log records the data change information during the processing of the conversion function. The log includes the conversion function identifier, execution time, field information, and numerical change; An example is as follows: Taking the conversion of the temperature field as an example, the conversion function identifier F001 is executed at the timestamp 20240115132501. The input field name is temp_raw, the input value is 256, the conversion rule is to convert at a rate of 0.1, the output field name is temperature, and the output value is 25.6; The conversion function identifier F002 is executed at the timestamp 20240115132502. The input field is temp_raw, the input value is 825, the conversion rule is 0.1, the output field is temperature, and the output value is 85.6; The field lineage dependency graph records the data flow during the field conversion process and uses a directed graph structure to represent the relationship between function nodes and fields; For example, node F001 records the conversion function identifier and the execution time 20240115132501. The input edge records the value 256 of the field temp_raw, the output edge records the value 25.6 of the field temperature, and the conversion rule records 0.1; Node F002 records the function identifier and the time 20240115132502. The input edge has a temp_raw value of 825, the output edge has a temperature value of 85.6, and the conversion rule is 0.1; The field blood relationship table records the corresponding relationships before and after field conversion, including the source field name, source field value, conversion function identifier, target field name, and target field value; In the temperature field record, the source field temp_raw value 256 is converted by function F001 to obtain the target field temperature value 25.6, and the source field temp_raw value 825 is converted by function F002 to obtain the target field temperature value 85.6; According to the temperature field value range of -40 to 80 degrees Celsius, the temperature value 85.6 exceeds the range, and the corresponding function node F002 is marked as abnormal; The conversion path record table stores the whole process of field format conversion, and the recorded content includes function execution time, field name, field value, conversion rule, and function identifier; The temperature data conversion path shows that at time 20240115132501, the input field temp_raw value is 256, and using the 0.1 magnification conversion rule, it is processed by function F001 to obtain the output field temperature value 25.6. At time 20240115132502, the input field temp_raw value is 825, and using the 0.1 magnification conversion rule, it is processed by function F002 to obtain the temperature value 85.6; Through the path record, it is determined that the abnormal function node F002 introduces temperature data pollution, and the value of the polluted field temperature exceeds the range limit.

[0020] Furthermore, in this embodiment, step S5 specifically includes: Obtain the field value length limit, value range constraint, and value precision requirement from the source protocol field table and the target protocol field table, and use a string matcher to compare the field attributes to obtain a field attribute difference table; Extract the numerical conversion rules of the source and target protocols according to the field attribute difference table, and use a naive Bayes classifier to classify the numerical conversion rules to obtain a numerical rule optimization table; According to the numerical rule optimization table, use a frequency histogram to statistically analyze the distribution of converted data in the data isolation area, and mark the data points that exceed the numerical limit range to obtain an abnormal conversion mapping table; Modify the numerical length limit parameter, numerical range constraint parameter, and value precision requirement parameter in the numerical conversion rule according to the abnormal conversion mapping table, and update the conversion rule in the protocol adaptation plug-in; Specifically, obtain the upper limit of the introduced pollution field value length, the upper and lower limits of the value range, and the number of digits of the numerical precision from the source protocol field table, and obtain the field value length limit, the value range constraint, and the numerical precision requirement from the target protocol field table. Use a string matcher to compare the source and target protocol field attributes item by item, record the differences in the three attributes of the source and target protocol fields, namely the value length, the value range, and the numerical precision, and generate a field attribute difference table; According to the records in the field attribute difference table, extract the source and target protocol numerical conversion rules, obtain the conversion ratio, the truncation number of digits, and the format standard for converting the source protocol numerical value to the target protocol numerical value. Use a Naive Bayes classifier to classify the numerical conversion rules, mark the places where the value length limit, the value range constraint, and the numerical precision requirement do not meet the conversion rules, and establish a numerical rule optimization table; According to the numerical rule optimization table, obtain the original numerical value and the converted numerical value of the polluted data from the data isolation area, use a frequency histogram to statistically analyze the distribution of the converted data, mark the positions of the data points that exceed the value length limit, the value range constraint, and the numerical precision requirement, and extract the corresponding relationship between the numerical value before conversion and the numerical value after conversion for the marked data points, and establish an abnormal conversion mapping table; Obtain the positions of the defects in the numerical conversion rules from the abnormal conversion mapping table, correct the conversion rules according to the source and target protocol field attribute difference table, modify the value length limit parameter, the value range constraint parameter, and the numerical precision requirement parameter, add a numerical limit judgment condition to the conversion rules, update the conversion rules in the protocol adaptation plug-in, record the rule modification results, and the source and target protocol field attributes include three indicators: value length, value range, and numerical precision; Examples are as follows: The value length of the source protocol temperature field temp_raw is 4 bytes, the value range is from -400 to 800, and the numerical precision is 1. It maps to the target protocol temperature field temperature with a value length of 2 bytes, a value range of from -40.0 to 80.0, and a numerical precision of 0.1; The value length of the source protocol humidity field hum_raw is 4 bytes, the value range is from 0 to 1000, and the numerical precision is 1. It maps to the target protocol humidity field humidity with a value length of 2 bytes, a value range of from 0 to 100.0, and a numerical precision of 0.1; The value length of the source protocol air pressure field pres_raw is 4 bytes, the value range is from 8000 to 11000, and the numerical precision is 1. It maps to the target protocol air pressure field pressure with a value length of 2 bytes, a value range of from 800.0 to 1100.0, and a numerical precision of 0.1; In the numerical conversion rules, the conversion ratio of the temperature field is 0.1, and the value 825 is converted to 82.5, which exceeds the upper limit of the target protocol range of 80.0. The conversion ratio of the air pressure field is 0.1, and the value 11256 is converted to 1125.6, which exceeds the upper limit of the target protocol range of 1100.0; The numerical rule optimization table records that the upper limit of the source value for the temp_raw to temperature conversion rule is 800, and the upper limit of the source value for the pres_raw to pressure conversion rule is 11000; The judgment condition for the temperature field conversion rule is that the source value does not exceed 800 and the converted value does not exceed 80.0. The judgment condition for the pressure field conversion rule is that the source value does not exceed 11000 and the converted value does not exceed 1100.0; The statistics of abnormal conversion data show that there are 20 abnormal data points in the temperature field conversion, the source value range is 825 to 856, and the converted value range is 82.5 to 85.6; There are 15 abnormal data points in the pressure field conversion, the source value range is 11256 to 11389, and the converted value range is 1125.6 to 1138.9; The abnormal conversion mapping table records that the source value 825 of the temperature field is mapped to the converted value 82.5, the source value 856 is mapped to the converted value 85.6, the source value 11256 of the pressure field is mapped to the converted value 1125.6, and the source value 11389 is mapped to the converted value 1138.9; The updated content of the protocol adaptation plugin conversion rule includes that the numerical length limit of the temperature field is 2 bytes, the source value range limit is -400 to 800, the conversion magnification is 0.1, and the converted value range limit is -40.0 to 80.0; The numerical length limit of the pressure field is 2 bytes, the source value range limit is 8000 to 11000, the conversion magnification is 0.1, and the converted value range limit is 800.0 to 1100.0; During the execution of the updated conversion rule, the judgment of the source value range and the converted value range is added, and the value exceeding the range is limited.

[0021] Furthermore, in this embodiment, step S6 specifically includes: Obtain the pollution data in the pollution data isolation area, calculate three types of characteristic parameters, namely, the value exceeding limit amplitude, the numerical precision deviation, and the sampling period offset, for the pollution data by using a sliding window, and generate a pollution data characteristic record according to the preset characteristic classification rule; According to the pollution data characteristic record, obtain the rules corresponding to the source-target protocol fields from the field mapping relationship library, extract the field value range and the number of significant digits according to the rules corresponding to the source-target protocol fields, and generate a field limit rule; According to the field limit rule, obtain the field check conditions from the source protocol data verification rules, supplement the value range constraint and the number of significant digits constraint to the field check conditions, and generate a field check rule; Extract the inspection conditions and threshold parameters from the field inspection rules, expand the field attributes in the field mapping relationship library, add value range parameters, significant digit parameters, and sampling interval parameters to the numerical field attributes, supplement constraint parameters to the inspection conditions in the source protocol data verification rule library, and record the update results of the source protocol data verification rule library; Specifically, read the contaminated data from the data isolation area, and extract the contaminated data characteristic parameters according to the protocol exception handling mechanism, including the amplitude of numerical out-of-limit, numerical precision deviation, and sampling period offset; Use a sliding window to calculate the statistical distribution of the contaminated data characteristic parameters, classify the three types of characteristics of numerical out-of-limit, precision deviation, and period offset according to the preset characteristic classification rules, record the characteristic type, characteristic value, occurrence time, and duration, and generate a contaminated data characteristic record; According to the contaminated data characteristic record, obtain the corresponding rules for the source and target protocol fields from the protocol mapping relationship library, extract the value range of the fields in the numerical out-of-limit characteristic according to the corresponding rules for the source and target protocol fields, extract the significant digits of the fields in the precision deviation characteristic, and extract the sampling interval of the fields in the period offset characteristic, write the characteristic parameters into the source and target protocol field mapping table, and generate a field limit rule; According to the field limit rule, obtain the field inspection conditions from the data legality inspection rules, divide the field inspection items according to the numerical type, supplement the value range constraint for the numerical out-of-limit characteristic, supplement the significant digit constraint for the precision deviation characteristic, and supplement the sampling interval constraint for the period offset characteristic, and generate a field inspection rule; Extract the inspection conditions and threshold parameters from the field inspection rules, expand the field attributes in the source and target protocol field mapping library according to the field type, add three parameters of value range, significant digits, and sampling interval to the numerical field attributes, supplement constraint parameters to the inspection conditions in the source protocol data verification rule library, and record the rule library update results; According to the increased source and target protocol field mapping library and the supplemented source protocol data verification rule library, perform source protocol data verification, and obtain an optimized protocol according to the verification results; The examples are as follows: The contaminated data characteristics of the environmental sensor include three categories: numerical out-of-limit, precision deviation, and period offset; The numerical out-of-limit characteristic of the temperature field shows that the value of 82.5 degrees Celsius exceeds the upper limit of 80.0 degrees Celsius, the occurrence time of the characteristic is 20240115132501, and the duration is 300 seconds; The precision deviation characteristic of the humidity field shows that the value of 67.856% exceeds the precision requirement of 0.1%, the occurrence time of the characteristic is 20240115132502, and the duration is 180 seconds; The air pressure field period offset feature shows that the sampling interval of 12 seconds exceeds the specified interval of 5 seconds. The feature occurrence time is 20240115132503, and the duration is 240 seconds; The source-target protocol field mapping rule records the field name correspondence and numerical conversion rules. The temperature field is mapped from temp_raw to temperature. The source value 825 is mapped to 82.5. The value range limit from -400 to 800 is mapped to -40.0 to 80.0, and the numerical multiplier is 0.1. The humidity field is mapped from hum_raw to humidity. The source value 67856 is mapped to 67.856. The value range limit from 0 to 1000 is mapped to 0 to 100.0, and the numerical multiplier is 0.1; The air pressure field is mapped from pres_raw to pressure, and the sampling interval is mapped from 12 seconds in the source protocol to 5 seconds in the target protocol; The data legality check rules set the check conditions according to the field type. The temperature field check rules include numerical range check from -40.0 to 80.0 degrees Celsius, numerical precision check of 0.1 degrees Celsius, and sampling period check of 5 seconds; The humidity field check rules include numerical range check from 0 to 100.0%, numerical precision check of 0.1%, and sampling period check of 5 seconds; The air pressure field check rules include numerical range check from 800.0 to 1100.0 hPa, numerical precision check of 0.1 hPa, and sampling period check of 5 seconds; The source-target protocol field mapping library extends the field attributes. The temperature field attributes are increased with a value range from -40.0 to 80.0 degrees Celsius, 1 decimal place for the significant digits, and a sampling interval of 5 seconds; The humidity field attributes are increased with a value range from 0 to 100.0%, 1 decimal place for the significant digits, and a sampling interval of 5 seconds; The air pressure field attributes are increased with a value range from 800.0 to 1100.0 hPa, 1 decimal place for the significant digits, and a sampling interval of 5 seconds; The data legality check rule library updates the check conditions and constraint parameters. The rule update record includes the field name, check type, constraint parameters, and update time.

[0022] Furthermore, in this embodiment, step S7 specifically includes: Obtain the data collected by the environmental sensor from the environmental sensor gateway, and use the Naive Bayes classifier to identify the data with abnormal numerical range, abnormal numerical precision, and abnormal sampling period, and obtain the pollution rate curve; Obtain the pollution rate record before protocol optimization according to the pollution rate curve, and perform smoothing processing on the pollution rate record using exponential weighted average to obtain the pollution rate reduction ratio; Obtain the field names in the pollution rate non-compliance agreement according to the reduced ratio of the pollution rate. According to the field names, obtain the field mapping rules, inspection parameters, and conversion parameters from the field mapping relationship library, source protocol data verification rules, and protocol adaptation plug-ins to obtain a rule optimization table; Update the corresponding field rules in the field mapping relationship library, the corresponding field parameters in the source protocol data verification rules, and the corresponding field conversion parameters in the protocol adaptation plug-ins according to the limit parameters in the rule optimization table, and record the update timestamp of the source protocol data verification rule library; Specifically, extract the data collected by the environmental sensor from the environmental sensor gateway according to the collection period. Check each piece of data according to the data legality check rules. Use the Naive Bayes classifier to identify three types of data: abnormal numerical range, abnormal numerical precision, and abnormal sampling period. Calculate the ratio of the number of abnormal data in a single protocol to the total number of data to obtain the pollution rate, and set a fixed time window to record the pollution rate change curve; Obtain the pollution rate record before protocol optimization from the historical database. Compare the pollution rate curves of the same protocol in the same time period before and after optimization. Smooth the pollution rate curve using exponential weighted average. Calculate the reduced ratio of the pollution rate after optimization. Generate a pollution rate comparison record according to the protocol type, field name, and time period. If the reduced ratio of the pollution rate does not reach the preset threshold, trigger rule optimization; According to the pollution rate comparison record, extract the field names in the pollution rate non-compliance agreement. Obtain the field mapping rules from the field mapping relationship library, the inspection parameters from the data legality check rules, and the conversion parameters from the protocol adaptation plug-ins. Supplement the three limit parameters of the field value range, numerical precision, and sampling period according to the characteristics of the optimized polluted data to generate a rule optimization table; Obtain the limit parameters from the rule optimization table. Update the corresponding field rules in the protocol mapping relationship library according to the field names, update the corresponding field parameters in the data legality check rules, update the corresponding field conversion parameters in the protocol adaptation plug-ins, record the rule library update timestamp, and repeat the data quality assessment according to a fixed evaluation period; The example is as follows: The data collection period of the environmental sensor is set to 5 seconds. In the time window from 20240115132500 to 20240115133000, 720 pieces of data are collected for the temperature protocol, 720 pieces of data are collected for the humidity protocol, and 720 pieces of data are collected for the pressure protocol; There are 36 abnormal numerical ranges in the temperature data, and the numerical values from 82.5 to 85.6 degrees Celsius exceed the upper limit of 80.0 degrees Celsius; There are 24 abnormal numerical precisions, with more than 1 digit after the decimal point; there are 12 abnormal sampling periods, and the sampling interval exceeds 5 seconds; There are 28 abnormal value ranges in the humidity data. The values from 102.5 to 105.8% exceed the upper limit of 100.0%. There are 32 abnormal value precisions, and the number of digits after the decimal point exceeds 1 digit. There are 16 abnormal sampling periods, and the sampling interval exceeds 5 seconds. There are 42 abnormal value ranges in the air pressure data. The values from 1125.6 to 1138.9 hPa exceed the upper limit of 1100.0 hPa. There are 38 abnormal value precisions, and the number of digits after the decimal point exceeds 1 digit. There are 18 abnormal sampling periods, and the sampling interval exceeds 5 seconds. Before optimization, the pollution rates of the temperature protocol, humidity protocol, and air pressure protocol in the same period were 15%, 12%, and 13% respectively. After optimization, the pollution rate of the temperature protocol was 10%, and the reduction ratio of the pollution rate was 33%. The pollution rate of the humidity protocol was 8%, and the reduction ratio of the pollution rate was 33%. The pollution rate of the air pressure protocol was 13%, and the reduction ratio of the pollution rate was 0%. The pollution rate reduction ratio of the air pressure protocol did not reach the preset threshold of 30%, triggering rule optimization. The original parameter settings of the field mapping rule of the air pressure protocol included: pres_raw mapped to pressure, the value range from 8000 to 11000 mapped to 800.0 to 1100.0, and the conversion multiple was 0.1. The original parameter settings of the data legality check rule included: the value range of the pressure field was 800.0 to 1100.0, the precision requirement was 0.1, and the sampling period was 5 seconds. Supplement limit parameters according to the characteristics of the polluted data: the source value range limit is from 8000 to 10000, the target value range limit is from 800.0 to 1000.0, the precision limit is 1 decimal place, and the sampling interval limit is 5 seconds. The update record of the rule library shows that the update time of the field mapping rule of the air pressure protocol was 20240115133000, and the updated content included the source value range reduced to 8000 to 10000, and the target value range reduced to 800.0 to 1000.0. The update time of the data legality check rule was 20240115133000, and the updated content included the value range of the pressure field reduced to 800.0 to 1000.0. The update time of the protocol adaptation plugin was 20240115133000, and the updated content included the air pressure value conversion limit parameters. The fixed evaluation period was set to 300 seconds, and the next round of data quality evaluation was triggered at 20240115133500.

[0023] In the description of the present invention, it should be understood that the orientation or positional relationship indicated by orientation words such as "front, rear, upper, lower, left, right", "lateral, vertical, horizontal" and "top, bottom", etc. is usually based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description. Without contrary explanation, these orientation words do not indicate and imply that the device or element referred to must have a specific orientation or be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation on the protection scope of the present invention.

[0024] For those skilled in the art, various corresponding changes and deformations can be made according to the technical solutions and concepts described above, and all these changes and deformations should fall within the protection scope of the claims of the present invention.

Claims

1. A gateway-based multi-protocol environment data fusion collection method, characterized in that: The following steps are involved: S1. Obtain the source protocol and target protocol of the environmental sensor gateway, build a field mapping relationship library between the source protocol and the target protocol, and verify the data of the environmental sensor; S2. According to the target protocol, the compliance of the environmental sensor data processed by the protocol adapter plug-in is judged, and the polluted data that does not meet the data quality requirements of the target protocol is identified; S3, obtaining the source protocol type identifier and protocol version number of the contaminated data, and storing the contaminated data whose protocol is incompatible with the target protocol in a contaminated data isolation area; S4. By analyzing the protocol conversion log of each piece of the contaminated data in the contaminated data isolation area, the key nodes in the protocol conversion process of the contaminated data are determined, and the specific protocol fields that introduce the contamination are located; S5. According to the specific protocol field, optimize the value length restriction condition and data format conversion logic in the protocol conversion function, and update the conversion rules in the protocol adapter plug-in; S6. Extracting features of the contaminated data according to the protocol exception handling method, and adding the extracted features to the field mapping relationship library and the source protocol data verification rule library; S7. Redeploy the optimized protocol to the environmental sensor gateway, and improve the field mapping relationship library, source protocol data verification rules and the protocol adapter plug-in.

2. According to the gateway-based multi-protocol environment data fusion collection method according to claim 1, it is characterized in that: The step S1 specifically includes: Acquire the source protocol and the target protocol of the environmental sensor gateway from the gateway database, and construct a field mapping relationship library between the source protocol and the target protocol; According to the field mapping relationship library, a mapping table is used to record the corresponding relationship between the source field and the target field and the parameter conversion ratio to obtain a conversion rule library of the source and target protocol fields; According to the numerical range threshold, change threshold and effective digit threshold set by the numerical field parameters in the conversion rule base, a source protocol data verification rule base is constructed using a random forest algorithm; The original data of the environmental sensor is read from the source protocol data buffer area, and the original data is verified according to the verification standard in the source protocol data verification rule base, and the verified source protocol data is obtained by using a threshold replacement method.

3. According to the gateway-based multi-protocol environment data fusion collection method according to claim 1, it is characterized in that: The step S2 specifically includes: Obtain the temperature, humidity, air pressure, wind speed, and radiation field data processed by the environmental sensor from the source protocol data buffer area, and use the naive Bayesian discriminator to obtain the abnormal data set according to the field value range judgment standard in the target protocol; According to the field sampling time interval in the abnormal data set, a linear interpolation function is used to supplement the data points that exceed the sampling period, and the data set to be verified is obtained by calculating the change trend of the supplemented data and the surrounding data through sliding variance; According to the data set to be verified, a convolutional neural network is used to learn the variation law of the numerical field sequence, the data anomaly level is judged by comparing the deviation between the sequence prediction value and the actual value, and a data anomaly level table is generated according to the anomaly level threshold; Obtain the resolution requirement of the numerical field in the target protocol, and determine the number of significant digits of the numerical values ​​for the data of different levels in the data anomaly level table; If the number of significant digits of the value exceeds the accuracy requirement threshold, a contaminated data record table is generated for the abnormally marked data that appears in the continuous sampling period, and contaminated data that does not meet the target protocol data quality requirements is obtained.

4. According to claim 1, the gateway-based multi-protocol environment data fusion collection method is characterized in that: The step S3 specifically includes: Read the header identification segment of the contaminated data from the source protocol data buffer, obtain the source protocol identifier through the feature matcher, and use the naive Bayes classifier to compare the source protocol identifier with the standard features in the protocol feature library to obtain the source protocol identification result; According to the source protocol identification result, the corresponding relationship of the target protocol is searched in the pre-established protocol compatibility matrix, the feature similarity between the source protocol identifier and the target protocol is calculated using a feature vector, and the feature similarity and the conversion success rate are weighted to obtain the source target protocol compatibility level; According to the source target protocol compatibility level, for the polluted data below the compatibility level threshold, an isolation flag is added to the polluted data header flag segment, and protocol information is extracted from the polluted data according to the isolation flag to establish a polluted data isolation zone; According to the pollution data isolation area, the timestamp, geographic location mark and sensor identification of the pollution data read are written into the alarm record.

5. According to the gateway-based multi-protocol environment data fusion collection method according to claim 1, it is characterized in that: The step S4 specifically includes: Acquire a protocol conversion log record from the contaminated data isolation area, extract a conversion function identifier, an execution timestamp, a field identifier, a field value, and a conversion rule according to the protocol conversion log record, and obtain a conversion function execution record; According to the conversion function execution record, a string matcher is used to extract input fields and output fields, and a conversion function linked list is established through the conversion function execution sequence, wherein the conversion function linked list records the field value range, field precision and conversion rules; According to the conversion function linked list, a directed graph builder is used to generate a field lineage dependency graph, in which nodes in the field lineage dependency graph record function identifiers and timestamps, and lines between nodes record field identifiers and conversion rules; For the field lineage dependency graph, obtaining a value of the source protocol field before conversion and a value of the target protocol field after conversion; If the value deviation after field conversion exceeds the deviation threshold, the forward input field and the backward output field of the node are extracted from the field lineage dependency graph, and a field conversion path record is established.

6. The gateway-based multi-protocol environment data fusion collection method according to claim 1 is characterized in that: The step S5 specifically includes: Obtain field value length restrictions, value range constraints, and value precision requirements from the source protocol field table and the target protocol field table, use a string matcher to compare field attributes, and obtain a field attribute difference table; Extracting the value conversion rules of the source and target protocols according to the field attribute difference table, and classifying the value conversion rules using a naive Bayes classifier to obtain a value rule optimization table; According to the numerical rule optimization table, the distribution of conversion data in the statistical isolation area is analyzed using the frequency histogram, and the data points that exceed the numerical limit range are marked to obtain an abnormal conversion mapping table; The numerical length restriction parameter, the numerical range constraint parameter and the numerical precision requirement parameter in the numerical conversion rule are modified according to the abnormal conversion mapping table, and the conversion rule in the protocol adapter plug-in is updated.

7. The gateway-based multi-protocol environment data fusion collection method according to claim 1 is characterized in that: The step S6 specifically includes: Acquire the contaminated data in the contaminated data isolation zone, use a sliding window to calculate three types of characteristic parameters of the contaminated data, namely, numerical value exceeding limit amplitude, numerical value precision deviation and sampling period offset, and generate contaminated data characteristic records according to preset characteristic classification rules; According to the contaminated data feature record, the rules corresponding to the source target protocol field are obtained from the field mapping relationship library, the field value range and the number of valid digits are extracted according to the rules corresponding to the source target protocol field, and the field restriction rules are generated; According to the field restriction rule, a field check condition is obtained from the source protocol data verification rule, and a value range constraint and a valid digit constraint are added to the field check condition to generate a field check rule; Extract inspection conditions and threshold parameters from the field inspection rules, expand the field attributes in the field mapping relationship library, add value range parameters, valid digit parameters and sampling interval parameters to the numerical field attributes, supplement constraint parameters to the inspection conditions in the source protocol data verification rule library, and record the update results of the source protocol data verification rule library.

8. The gateway-based multi-protocol environment data fusion collection method according to claim 1 is characterized in that: The step S7 specifically includes: The data collected by the environmental sensor is obtained from the environmental sensor gateway, and the naive Bayes classifier is used to identify the abnormal data of the numerical range, the abnormal data of the numerical precision and the abnormal data of the sampling period to obtain the pollution rate curve; According to the contamination rate curve, the contamination rate record before the protocol optimization is obtained, and the contamination rate record is smoothed by using exponential weighted average to obtain a contamination rate reduction ratio; According to the pollution rate reduction ratio, the field name in the pollution rate non-conformity protocol is obtained, and according to the field name, the field mapping rule, the check parameter and the conversion parameter are obtained from the field mapping relationship library, the source protocol data verification rule and the protocol adapter plug-in to obtain a rule optimization table; According to the restriction parameters in the rule optimization table, the corresponding field rules in the field mapping relationship library, the corresponding field parameters in the source protocol data verification rules and the corresponding field conversion parameters in the protocol adapter plug-in are updated, and the update timestamp of the source protocol data verification rule library is recorded.

Citation Information

Patent Citations

  • Protocol conversion algorithm of data acquisition system

    CN108833394A

  • IOT equipment management system for hospital diabetes management

    CN117041367A

  • Intelligent gateway method compatible with multiple protocols, server, medium and program product

    CN118869556A

  • Wireless sensor network protocol cord transformation system

    KR1020130134830A

  • Runtime Message Inference Apparatus and Method for Incompatible IoT Protocol Updates

    KR102185379B1

Cited By

  • Intelligent edge calculation method and system supporting multi-protocol perception and rule-driven processing

    CN120751036A

  • Method for generating standardized protocol data based on multi-protocol platform of data-in-data platform

    CN120785666A

  • Method for generating standardized protocol data based on a multi-protocol platform of a data middleware platform

    CN120785666B