Intelligent gateway data checking method and device, terminal and storage medium

By calculating data time deviation and correcting sensor timestamps, a dynamic synchronization and attenuation coefficient is constructed. Combined with time series characteristics, the accuracy problem of multi-source data time series matching and anomaly detection in industrial scenarios of smart gateways is solved, and high-precision data verification effect is achieved.

CN121508722APending Publication Date: 2026-02-10SUQIAN POWER SUPPLY COMPANY OF JIANGSU PROVINCE POWER +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511655739.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-12
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing smart gateways in industrial scenarios suffer from problems such as imperfect time dimension calibration mechanisms, rigid methods of utilizing historical data, and simplistic anomaly detection logic. This results in low accuracy of multi-source data time-series matching and low accuracy of anomaly detection, making it difficult to meet the stringent data quality requirements of industrial scenarios.

Method used

By calculating the data time deviation and the cumulative deviation, the local timestamp of the sensor is corrected, a dynamic synchronization coefficient and a time decay coefficient are constructed, and a multi-factor anomaly detection index is constructed by combining the sensor time series data weights to repair the detected abnormal data.

Benefits of technology

It achieves improved time accuracy to within ±5ms, historical weight adaptation, reduced anomaly detection rate to below 0.8%, and repair error ≤1%, balancing the real-time requirements of gateways with the high-precision requirements of industrial applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121508722A_ABST
    Figure CN121508722A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent gateway data checking method and device, a terminal and a medium, and the method comprises the steps: collecting sensor data, data transmission time delay, a gateway timestamp and nominal sampling frequency through an interface group; extracting a local timestamp of the sensor from the sensor data, and calculating a time deviation and a deviation cumulant of single data according to the data transmission time delay, the gateway timestamp and the local timestamp of the sensor; correcting a local timestamp of the sensor to obtain a standard timestamp synchronous with a gateway clock; calculating a time attenuation coefficient and a sensor time sequence data weight according to the standard timestamp; combining the time attenuation coefficient, the sensor time sequence data weight and the time sequence characteristics of the sensor data to construct an anomaly detection index, repairing the abnormal data, and outputting an effective check result; according to the method, the time precision is greatly improved, and the real-time performance and industrial high-precision requirements of the gateway are considered by fusing three-dimensional index detection and combining physical characteristic repair.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of smart gateways, and in particular to a smart gateway data verification method, apparatus, terminal, and storage medium. Background Technology

[0002] Driven by the development of the Industrial Internet of Things (IIoT) and smart cities, smart gateways, as key nodes connecting sensing layer devices and cloud platforms, have expanded their functions from traditional protocol conversion and data forwarding to edge-side data preprocessing and quality verification, becoming a core component in ensuring the reliability of IoT system data. Currently, sensor deployment density in industrial scenarios has significantly increased, with a single gateway needing to connect 10-50 different types of sensors, such as temperature, humidity, pressure, and vibration sensors, with data acquisition frequencies covering 1Hz-1kHz, and stringent requirements for calibration real-time performance and accuracy. To address this challenge, some technologies have attempted to introduce basic machine learning models; however, limited by the computing power of gateway hardware and the complexity of sensor data timing characteristics, existing technologies still struggle to balance calibration accuracy, real-time performance, and scenario adaptability.

[0003] Existing smart gateway sensor data verification technologies suffer from three core technical bottlenecks that hinder their large-scale application: First, the time-dimensional calibration mechanism is imperfect, failing to effectively integrate hardware characteristics and data transmission patterns. Most solutions rely solely on periodic time synchronization at the software level or directly use local sensor clock data, without systematically addressing hardware transmission delays and sensor clock drift issues. This results in low time-series matching accuracy for multi-source data, failing to provide a reliable time-series benchmark for subsequent verification. Second, the utilization of historical data is rigid, lacking dynamic adaptability. Existing technologies often use fixed-weight models or single attenuation coefficients to process historical data, failing to consider dynamic operating conditions such as gateway computing power fluctuations and sensor sampling frequency changes. This makes it impossible to adjust the weight allocation of historical data according to real-time operating conditions, affecting the accuracy of anomaly detection. Third, the anomaly detection and repair logic is too simplistic, failing to deeply integrate time-series characteristics and data physical attributes. This leads to a high anomaly false negative rate and low repair accuracy, making it difficult to meet the stringent data quality requirements of industrial scenarios. Summary of the Invention

[0004] To overcome the shortcomings of the prior art, the present invention provides a smart gateway data verification method to solve the above problems.

[0005] This invention is implemented using the following technical means: a smart gateway data verification method, comprising the following steps: the gateway collects sensor data, data transmission delay, gateway timestamp, and nominal sampling frequency through an interface group; extracts the local timestamp of the sensor from the sensor data, and calculates the time deviation and cumulative deviation of a single data point based on the data transmission delay, gateway timestamp, and local timestamp of the sensor; corrects the local timestamp of the sensor to obtain a standard timestamp synchronized with the gateway clock; calculates the time decay coefficient and sensor time-series data weight based on the standard timestamp; combines the time decay coefficient, sensor time-series data weight, and time-series characteristics of the sensor data to construct an anomaly detection index, repairs the detected abnormal data, and outputs a valid verification result.

[0006] As a preferred embodiment of the intelligent gateway data verification method of the present invention, the calculation of data time deviation and cumulative deviation includes:

[0007] Based on data transmission delay Gateway timestamp and sensor local timestamps Calculate the time deviation of a single data point :

[0008]

[0009] Based on data time deviation Calculate the cumulative deviation :

[0010]

[0011] In the formula, Let k be the time deviation of the i-th data point, and k be the number of times the sensor data is sampled. This represents the average time skewness of the first 100 data points.

[0012] As a preferred embodiment of the smart gateway data verification method of the present invention, the standard timestamp includes:

[0013] Based on gateway timestamp and nominal sampling frequency Calculate the dynamic synchronization coefficient ;

[0014]

[0015] Combined with dynamic synchronization coefficient Correct sensor local timestamp Obtain a standard timestamp synchronized with the gateway clock. :

[0016]

[0017] In the formula, This is the dynamic sensitivity coefficient. This represents the actual sampling interval between the current and previous data.

[0018] As a preferred embodiment of the intelligent gateway data verification method of the present invention, the calculation of the time decay coefficient and the sensor time-series data weight includes:

[0019] Based on standard timestamps Calculate the variance of the time intervals separately and actual sampling frequency :

[0020]

[0021]

[0022] In the formula, the variance of the time interval Used to reflect the sampling stability of the last 5 data points. The actual time interval between the i-th and (i-1)-th data entries. The average time interval of the last 5 data points;

[0023] Calculating the time decay coefficient by coupling multiple dynamic factors :

[0024]

[0025] In the formula, The base attenuation coefficient is set according to the data type. As the time interval stability weight, As the sampling frequency deviation weight, C represents the gateway's computing power weight, and C represents the percentage of computing power utilization.

[0026] Based on the time decay coefficient Calculate sensor time series data weights :

[0027]

[0028] In the formula, The sum of the decay exponents of all sensor time-series data, This is the consistency coefficient for sensor time series data, used to filter out abnormal sensor time series data.

[0029] As a preferred embodiment of the intelligent gateway data verification method of the present invention, the construction of anomaly detection indicators includes:

[0030] Constructing an anomaly detection index that integrates multiple factors across the time dimension by combining the features of sensor time-series data :

[0031]

[0032] In the formula, This represents the actual physical quantity value of the k-th sensor time series data. Let be the predicted physical quantity value of the k-th sensor time series data; The standard deviation of the last 10 historical data points; This is the time interval amplification factor.

[0033] As a preferred embodiment of the intelligent gateway data verification method of the present invention, it further includes:

[0034] To adapt to different data types and dynamic scenarios, based on historical metrics and time decay coefficients Set dynamic threshold :

[0035]

[0036] In the formula, This represents the average of the anomaly detection indicators for nearly 100 data points.

[0037] like Then determine The data is abnormal, and repair is performed.

[0038] like Then determine This is normal data.

[0039] As a preferred embodiment of the intelligent gateway data verification method of the present invention, the step of repairing abnormal data includes:

[0040] Based on sensor time-series data weights and prediction bias Repair:

[0041]

[0042] In the formula, The prediction deviation of the j-th historical data reflects the correction experience of historical data; Correction coefficients for sensor data types;

[0043] The normal data and the repaired data are integrated to form the final verification result.

[0044] This invention also provides a smart gateway data verification device for implementing the smart gateway data verification method as described in any of the preceding claims. The smart gateway data verification device includes: a data acquisition module configured to execute the acquisition of sensor data, data transmission delay, gateway timestamp, and nominal sampling frequency by the gateway through an interface group; a deviation calculation module configured to extract the local timestamp of the sensor from the sensor data and calculate the time deviation of a single data item and the cumulative deviation based on the data transmission delay, the gateway timestamp, and the local timestamp of the sensor; a timestamp correction module configured to correct the local timestamp of the sensor to obtain a standard timestamp synchronized with the gateway clock; a coefficient weight calculation module configured to calculate a time decay coefficient and a sensor time-series data weight based on the standard timestamp; and a verification and repair module configured to combine the time decay coefficient, the sensor time-series data weight, and the time-series characteristics of the sensor data to construct an anomaly detection index, repair the detected abnormal data, and output a valid verification result.

[0045] The present invention also provides a terminal device, comprising:

[0046] One or more processors;

[0047] A memory, coupled to the processor, for storing one or more programs;

[0048] When the one or more programs are executed by the one or more processors, the one or more processors implement the smart gateway data verification method as described in any of the preceding claims.

[0049] The present invention also provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the smart gateway data verification method as described in any of the preceding claims.

[0050] The beneficial effects of this invention are as follows: This invention improves the time accuracy to within ±5ms through dynamic synchronization correction, constructs a multi-factor time decay coefficient to achieve historical weight adaptation, integrates three-dimensional index detection and combines physical characteristic repair, so that the abnormal missed detection rate is reduced to below 0.8% and the repair error is ≤1%, which takes into account both the real-time performance of the gateway and the high precision requirements of industry. Attached Figure Description

[0051] Figure 1 This is a flowchart illustrating the smart gateway data verification method of the present invention. Detailed Implementation

[0052] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.

[0053] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

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

[0055] This invention is described in detail with reference to the schematic diagrams. When detailing the embodiments of this invention, for ease of explanation, the cross-sectional views illustrating the device structure may be partially enlarged, not adhering to the usual scale. Furthermore, the schematic diagrams are merely examples and should not be construed as limiting the scope of protection of this invention. In actual fabrication, the three-dimensional spatial dimensions of length, width, and depth should be included.

[0056] Furthermore, in the description of this invention, it should be noted that the terms "upper," "lower," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. These terms are used solely for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. In addition, the terms "first," "second," or "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0057] Unless otherwise explicitly specified and limited, the terms "installation," "connection," and "joining" in this invention should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; similarly, they can refer to mechanical connections, electrical connections, or direct connections, or indirect connections through an intermediate medium, or internal connections between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0058] Example 1

[0059] Figure 1This is the first embodiment of the present invention, which provides a smart gateway data verification method, including:

[0060] S1: The gateway collects sensor data, data transmission latency, gateway timestamp, and nominal sampling frequency through the interface group.

[0061] Sensor data includes the actual physical quantity value (such as temperature, pressure, etc.) of the k-th sensor time series data and the sensor's local timestamp. The gateway timestamp is generated by the TCXO (temperature-controlled crystal oscillator) when receiving the k-th sensor timing data, with an accuracy of ±0.1ppm. The data transmission delay is the time difference between the sensor's transmission and the gateway's reception; different interfaces have different values, for example, the RS485 interface has a different value. LoRa interface value The nominal sampling frequency is the sampling frequency set by the sensor at the factory.

[0062] S2: Extract the local timestamp of the sensor from the sensor data, and calculate the time deviation and cumulative deviation of a single data point based on the data transmission delay, the gateway timestamp, and the local timestamp of the sensor.

[0063] To eliminate the interference of data transmission delay on time deviation, based on data transmission delay Gateway timestamp and sensor local timestamps Calculate the time deviation of a single data point :

[0064]

[0065] Better yet, the traditional solution directly uses The calculation of the deviation mistakenly treats transmission delay as clock drift, leading to synchronization errors (e.g., a 20ms transmission delay in LoRa will cause the calculated deviation value to be overestimated by 20ms). This formula corrects this by subtracting... (Second-level conversion) accurately separates transmission delay and clock drift, ensuring the accuracy of deviation calculation.

[0066] Because sensors may exhibit long-term fixed drift (such as all sensors...). The average deviation is 0.1s too high (due to a hardware clock precision defect). This can be corrected by subtracting the average deviation of the first 100 data points. This can eliminate such systematic errors, retaining only the cumulative amount of random drift, thus based on the data time deviation. Calculate the cumulative deviation :

[0067]

[0068] In the formula, Let k be the time deviation of the i-th data point, and k be the number of times the sensor data is sampled. This represents the average time skewness of the first 100 data points.

[0069] It can be seen that if A certain data =0.15s, the actual random drift is 0.05s, which avoids the serious inaccuracy of timestamps caused by the long-term accumulation of systematic bias.

[0070] S3: Correct the sensor's local timestamp to obtain a standard timestamp synchronized with the gateway clock.

[0071] A sigmoid function (logistic regression function) is used to smoothly adjust the compensation amplitude, avoiding over- or under-compensation during abnormal sampling intervals (such as when a sensor disconnects and then recovers, causing the interval to jump from 0.1s to 1s). This is based on the gateway timestamp. and nominal sampling frequency Calculate the dynamic synchronization coefficient ;

[0072]

[0073] Combined with dynamic synchronization coefficient Correct sensor local timestamp Obtain a standard timestamp synchronized with the gateway clock. :

[0074]

[0075] In the formula, This represents the actual sampling interval between the current and previous data. This is the dynamic sensitivity coefficient, used to control the steepness of the sigmoid function, ensuring that when the actual sampling interval is close to the nominal interval... When the deviation is ±50%, Falling within the 0.8-1.2 range avoids timing discrepancies caused by insufficient compensation while preventing overcompensation from introducing new errors. The following formula is used to calculate:

[0076]

[0077] In the formula, The base sensitivity coefficient is a constant preset based on system characteristics and experience. It represents the maximum sensitivity value expected to be achieved under ideal conditions where the system is completely stable (without jitter). The baseline variance represents the system's jitter level within a normal and acceptable range. This represents the variance of the real-time sampling interval.

[0078] Preferably, this embodiment uses a high-precision clock module of the gateway to design a dynamic synchronization coefficient to correct the sensor timestamp deviation, and the synchronization accuracy is controlled within ±5ms, which is an order of magnitude higher than the traditional NTP synchronization (accuracy ±50ms). The corrected timestamp provides a standard timing reference for subsequent weight calculation.

[0079] S4: Calculate the time decay coefficient and sensor timing data weight based on the standard timestamp.

[0080] By analyzing the time interval fluctuations of the last 5 data points, we determine whether the sampling is stable. When the sampling is stable, the historical data and the current data have a strong temporal correlation, and the weight decay needs to be slowed down. When the sampling is unstable, the historical data has a weak correlation, and the decay needs to be accelerated to avoid unstable historical data interfering with the current verification (e.g., pressure sensor sampling interval fluctuations caused by pipeline vibration mean that historical data cannot reflect the true changes in current pressure). Specifically, this is based on standard timestamps. Calculate the variance of the time intervals separately :

[0081]

[0082]

[0083] In the formula, the variance of the time interval Used to reflect the sampling stability of the last 5 data points. The actual time interval between the i-th and (i-1)-th data entries. The average time interval of the last 5 data points;

[0084] Calculate the time decay coefficient by coupling multiple dynamic factors (time interval stability, sampling frequency deviation, gateway computing power). :

[0085]

[0086] In the formula, The base attenuation coefficient is set according to the data type. This is a time interval stability weight used to control sampling stability and avoid interference from unstable data; This is the sampling frequency deviation weight, used to control the real-time performance of the sampled data; C represents the gateway's computing power weight, used to ensure the gateway's real-time performance; C represents the percentage of computing power utilization.

[0087] in, The basic attenuation coefficient is set as follows:

[0088] Type = T (temperature). (Temperature data has strong temporal continuity and slow decay);

[0089] Type = P (Pressure). (Pressure data is prone to sudden changes and decays rapidly);

[0090] Type=F (traffic) (Traffic data falls between the two).

[0091] Combining time decay logic and credibility filtering logic, based on the time decay coefficient Calculate sensor time series data weights :

[0092]

[0093] In the formula, The sum of the decay exponents of all sensor time-series data, This is the consistency coefficient for sensor time series data, used to filter out abnormal sensor time series data.

[0094] S5: Combine the time decay coefficient, sensor time-series data weight, and sensor data time-series characteristics to construct an anomaly detection index, repair the detected abnormal data, and output valid verification results.

[0095] An anomaly detection index is constructed by integrating three dimensions: prediction bias, historical fluctuation, and time interval anomalies, thus incorporating multiple factors across the time dimension. :

[0096]

[0097] In the formula, This represents the actual physical quantity value of the k-th sensor time series data. Let be the predicted physical quantity value of the k-th sensor time series data; The standard deviation of the last 10 historical data points; This is the time interval amplification factor.

[0098] Among them, the prediction bias dimension Predict the reasonable value that the current data should have based on historical weights. The larger the deviation, the more likely the data is to be abnormal; historical fluctuation dimension Used to normalize bias and avoid differences in the magnitude of bias due to different data types; time interval anomaly dimension (i.e., time interval anomaly amplification factor). For scenarios with abnormal sampling intervals (such as deviations of more than 50% from the nominal value), increase the detection sensitivity to avoid missing "time jump anomalies" (such as when the sensor is offline for 10 seconds and then recovers, the first data is prone to anomalies due to time sequence breaks, which traditional single-dimensional detection is prone to missing).

[0099] Standard deviation of the last 10 historical data points As shown in the following formula:

[0100]

[0101] In the formula, Let i be the actual physical quantity value of the i-th sensor time series data. The average of the last 10 sensor time-series data is used to eliminate the impact of differences in data magnitude on the indicators;

[0102] The calculation integrates three dimensions: prediction bias, historical fluctuations, and time interval anomalies, and is associated with the sensor configuration in Phase 1 to achieve multi-dimensional collaborative detection.

[0103] Furthermore, to adapt to different data types and dynamic scenarios, and to avoid misjudgments due to the low reference value of historical data, a system based on historical indicators and time decay coefficients is implemented. Set dynamic threshold :

[0104]

[0105] In the formula, This represents the average of the anomaly detection indicators for nearly 100 data points.

[0106] like Then determine This is normal data;

[0107] like Then determine The data is abnormal, and a repair is performed, with the repaired value... Assign to ;

[0108] Based on sensor time-series data weights and prediction bias Repair:

[0109]

[0110] In the formula, The physical quantity value of the k-th sensor time series data after repair. The prediction deviation of the j-th historical data reflects the correction experience of historical data; Correction coefficients for sensor data types;

[0111] Type = T (temperature). (Temperature data changes gradually, correction range reduced by 20%)

[0112] Type = P (Pressure). (Stress data is prone to sudden changes, so the correction range is increased by 10%)

[0113] Type=F (traffic) (Traffic data changes are moderate, no additional corrections required);

[0114] Furthermore, the normal data and the repaired data are integrated to form the final verification result.

[0115] This embodiment realizes the reuse of parameters throughout the entire process of time synchronization → weight calculation → deviation correction, reducing the missed detection rate of time jump anomalies to below 0.8%, ensuring repair accuracy and scenario adaptability.

[0116] Example 2

[0117] This invention provides a smart gateway data verification device for implementing the steps of the smart gateway data verification method as described in any of the above embodiments. The smart gateway data verification device includes:

[0118] The acquisition module is configured to enable the gateway to acquire sensor data, data transmission latency, gateway timestamp, and nominal sampling frequency through the interface group.

[0119] The deviation calculation module is configured to extract the local timestamp of the sensor from the sensor data, and calculate the time deviation of a single data entry and the cumulative deviation based on the data transmission delay, the gateway timestamp, and the local timestamp of the sensor.

[0120] The timestamp correction module is configured to correct the sensor's local timestamp to obtain a standard timestamp synchronized with the gateway clock;

[0121] The coefficient weight calculation module is configured to perform the calculation of time decay coefficient and sensor time series data weight based on standard timestamps;

[0122] The verification and repair module is configured to combine the time decay coefficient, the sensor time series data weight, and the time series characteristics of the sensor data to construct anomaly detection indicators, repair abnormal data, and output valid verification results.

[0123] Example 3

[0124] This embodiment provides a terminal device, including:

[0125] One or more processors;

[0126] A memory, coupled to the processor, for storing one or more programs;

[0127] When the one or more programs are executed by the one or more processors, the one or more processors implement the smart gateway data verification method as described above.

[0128] The processor controls the overall operation of the terminal device to complete all or part of the steps of the aforementioned smart gateway data verification method. The memory stores various types of data to support the operation of the terminal device. This data may include, for example, instructions for any application or method operating on the terminal device, as well as application-related data. The memory can be implemented using any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0129] The terminal device can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to execute the smart gateway data verification method as described in any of the above embodiments and achieve the same technical effect as the above method.

[0130] Example 4

[0131] This embodiment provides a computer-readable storage medium, whose program instructions, when executed by a processor, implement the steps of the smart gateway data verification method as described in any of the above embodiments. For example, the computer-readable storage medium can be the memory including the program instructions, which can be executed by the processor of a terminal device to complete the smart gateway data verification method as described in any of the above embodiments and achieve the same technical effect as the above method.

[0132] It should be recognized that embodiments of the present invention can be implemented or carried out by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer-readable storage medium. The method can be implemented using standard programming techniques—including a non-transitory computer-readable storage medium configured with a computer program, wherein such a storage medium causes the computer to operate in a specific and predefined manner—according to the methods and drawings described in the specific embodiments. Each program can be implemented in a high-level procedural or object-oriented programming language to communicate with the computer system. However, if desired, the program can be implemented in assembly or machine language. In any case, the language can be a compiled or interpreted language. Furthermore, for this purpose, the program can run on a programmed application-specific integrated circuit (ASIC).

[0133] Furthermore, the procedures described herein may be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by the context. The procedures described herein (or variations and / or combinations thereof) may be executed under the control of one or more computer systems configured with executable instructions, and may be implemented by hardware or a combination thereof as code (e.g., executable instructions, one or more computer programs, or one or more applications) that commonly executes on one or more processors. The computer program comprises a plurality of instructions executable by one or more processors.

[0134] Furthermore, the method can be implemented in any suitable type of computing platform, including but not limited to personal computers, minicomputers, mainframes, workstations, networked or distributed computing environments, standalone or integrated computer platforms, or in communication with charged particle tools or other imaging devices, etc. Aspects of the invention can be implemented as machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, optical read and / or write storage medium, RAM, ROM, etc., such that it is readable by a programmable computer, and when the storage medium or device is read by the computer, it can be used to configure and operate the computer to perform the processes described herein. Furthermore, the machine-readable code, or portions thereof, can be transmitted via wired or wireless networks. The invention described herein includes these and other different types of non-transitory computer-readable storage media when such media comprises instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor. When programmed according to the methods and techniques described herein, the invention also includes the computer itself. A computer program can be applied to input data to perform the functions described herein, thereby transforming the input data to generate output data stored in non-volatile memory. The output information can also be applied to one or more output devices such as a display. In a preferred embodiment of the invention, the converted data represents physical and tangible objects, including specific visual depictions of physical and tangible objects generated on a display.

[0135] As used herein, the terms “component,” “module,” “system,” etc., are intended to refer to a computer-related entity, which may be hardware, firmware, a combination of hardware and software, software, or running software. For example, a component may be, but is not limited to, a process running on a processor, a processor, an object, an executable file, a running thread, a program, and / or a computer. As an example, an application running on a computing device and the computing device itself can both be components. One or more components may reside in a running process and / or thread, and components may be located in a single computer and / or distributed among two or more computers. Furthermore, these components are capable of execution from various computer-readable media having various data structures thereon. These components may communicate locally and / or remotely via signals, such as those containing one or more data packets (e.g., data from a component that interacts with a local system, another component in a distributed system, and / or signals that interact with other systems via a network such as the Internet).

[0136] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for verifying data in a smart gateway, characterized in that, Includes the following steps: The gateway collects sensor data, data transmission latency, gateway timestamp, and nominal sampling frequency through the interface group; Extract the local timestamp of the sensor from the sensor data, and calculate the time deviation of a single data entry and the cumulative deviation based on the data transmission delay, the gateway timestamp, and the local timestamp of the sensor. Correct the sensor's local timestamp to obtain a standard timestamp synchronized with the gateway clock; Calculate the time decay coefficient and sensor timing data weight based on the standard timestamp; An anomaly detection index is constructed by combining the time decay coefficient, the weight of sensor time-series data, and the time-series characteristics of sensor data. The detected abnormal data is repaired and a valid verification result is output.

2. The smart gateway data verification method as described in claim 1, characterized in that, The specific calculations for the data time deviation and cumulative deviation are as follows: Based on data transmission delay Gateway timestamp and sensor local timestamps Calculate the time deviation of a single data point : ; Based on data time deviation Calculate the cumulative deviation : ; In the formula, Let k be the time deviation of the i-th data point, and k be the number of times the sensor data is sampled. This represents the average time skewness of the first 100 data points.

3. The smart gateway data verification method as described in claim 2, characterized in that, The standard timestamp : Based on gateway timestamp and nominal sampling frequency Calculate the dynamic synchronization coefficient ; ; Combined with dynamic synchronization coefficient Correct sensor local timestamp Obtain a standard timestamp synchronized with the gateway clock. : ; In the formula, This is the dynamic sensitivity coefficient. This represents the actual sampling interval between the current and previous data.

4. The smart gateway data verification method as described in claim 3, characterized in that, The calculation methods for the time decay coefficient and the sensor time-series data weights are as follows: Based on standard timestamps Calculate the variance of the time intervals separately and actual sampling frequency : ; ; In the formula, the variance of the time interval Used to reflect the sampling stability of the last 5 data points. The actual time interval between the i-th and (i-1)-th data entries. The average time interval of the last 5 data points; Calculating the time decay coefficient by coupling multiple dynamic factors : ; In the formula, The base attenuation coefficient is set according to the data type. As the time interval stability weight, As the sampling frequency deviation weight, C represents the gateway's computing power weight, and C represents the percentage of computing power utilization. Based on the time decay coefficient Calculate sensor time series data weights : ; In the formula, The sum of the decay exponents of all sensor time-series data, This is the consistency coefficient for sensor time series data, used to filter out abnormal sensor time series data.

5. The smart gateway data verification method as described in claim 4, characterized in that, The calculation method for the constructed anomaly detection index is as follows: Constructing an anomaly detection index that integrates multiple factors across the time dimension by combining the features of sensor time-series data : ; In the formula, This represents the actual physical quantity value of the k-th sensor time series data. Let be the predicted physical quantity value of the k-th sensor time series data; The standard deviation of the last 10 historical data points; This is the time interval amplification factor.

6. The smart gateway data verification method as described in claim 5, characterized in that, Also includes: To adapt to different data types and dynamic scenarios, based on historical metrics and time decay coefficients Set dynamic threshold : ; In the formula, This represents the average of the anomaly detection indicators for nearly 100 data points. like Then determine The data is abnormal, and repair is performed. like Then determine This is normal data.

7. The smart gateway data verification method as described in claim 6, characterized in that, The repair of abnormal data includes: Based on sensor time-series data weights and prediction bias Repair: ; In the formula, The prediction deviation of the j-th historical data reflects the correction experience of historical data; Correction coefficients for sensor data types; The normal data and the repaired data are integrated to form the final verification result.

8. A smart gateway data verification device, used to implement the smart gateway data verification method as described in any one of claims 1 to 7, wherein the smart gateway data verification device comprises: The acquisition module is configured to enable the gateway to acquire sensor data, data transmission latency, gateway timestamp, and nominal sampling frequency through the interface group. The deviation calculation module is configured to extract the local timestamp of the sensor from the sensor data, and calculate the time deviation of a single data entry and the cumulative deviation based on the data transmission delay, the gateway timestamp, and the local timestamp of the sensor. The timestamp correction module is configured to correct the sensor's local timestamp to obtain a standard timestamp synchronized with the gateway clock; The coefficient weight calculation module is configured to perform the calculation of time decay coefficient and sensor time series data weight based on the standard timestamp. The verification and repair module is configured to combine the time decay coefficient, the sensor time series data weight, and the time series characteristics of the sensor data to construct anomaly detection indicators, repair the detected abnormal data, and output valid verification results.

9. A terminal device, characterized in that, include: One or more processors; A memory, coupled to the processor, for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the smart gateway data verification method as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program is executed by a processor to implement the smart gateway data verification method as described in any one of claims 1 to 7.