A method and device for distinguishing abnormal data based on time series data analysis

By calculating neighborhood difference factor and adaptive smoothing parameters, combined with the mutual influence of phosphate concentration and temperature, the problem of low discrimination accuracy of abnormal data in traditional time series data analysis is solved, and higher discrimination accuracy is achieved.

CN120337103BActive Publication Date: 2025-08-12NANJING UNIV OF INFORMATION SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510812695.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2025-08-12
Estimated Expiration
2045-06-18

AI Technical Summary

Technical Problem

Traditional timing data analysis methods are susceptible to environmental noise in discrimination of abnormal data, resulting in reduced accuracy.

Method used

By calculating the degree of differential fluctuation, smoothing parameters and weights of neighborhood difference factors, initial segmentation points, and reference factor segments, we obtain adaptive smoothing parameters, and combine the mutual influence relationship between phosphate concentration and temperature to improve the accuracy of abnormal data judgment.

Benefits of technology

The accuracy of abnormal data judgment is improved, and it can better reflect the impact of multiple dimensions on the data and the importance of the reference factor segment, reducing errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120337103B_ABST
    Figure CN120337103B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for distinguishing abnormal data based on time series data analysis, which belongs to the field of time series data analysis. The method includes obtaining a phosphate concentration time series and a temperature time series, and then calculating a neighborhood difference factor, a neighborhood difference factor time series, an initial segmentation point, a reference factor segment, a degree of difference fluctuation, an initial smoothing parameter, a smoothing contribution degree, a smoothing weight, and an adaptive smoothing parameter; then distinguishing abnormal data based on the adaptive smoothing parameter. The present invention better reflects the influence of multiple dimensions on the data by calculating the initial segmentation point, and better reflects the importance of the temperature and phosphate concentration within the reference factor segment to the subsequent abnormal data distinction results by calculating the initial smoothing parameter; the adaptive smoothing parameter is calculated based on the extreme differences, continuous trend differences, and the degree of influence of local data on the overall data segment within different reference factor segments, thereby improving the accuracy of abnormal data distinction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method and device for distinguishing abnormal data based on time series data analysis, and belongs to the field of time series data analysis. Background Art

[0002] Time series data refers to a series of data points arranged in chronological order, typically collected at equal intervals. Time series data analysis and prediction methods and systems are widely used in many fields, such as economic forecasting, weather forecasting, stock market analysis, and energy demand prediction. With the rapid development of computer technology, time series data analysis and prediction has become a research hotspot.

[0003] Traditional methods usually use EWMA (Exponentially Weighted Moving-Average) to determine the smoothing coefficient of the mean of operating data in different time periods, and then perform real-time monitoring based on the smoothing coefficient. This method is easily affected by environmental noise, resulting in the smoothing coefficient determined by the traditional method not being able to well combine the changes in operating data, resulting in its reduced accuracy and large errors in the final abnormal data identification results. Summary of the Invention

[0004] The purpose of the present invention is to provide a method and device for identifying abnormal data based on time series data analysis, so as to solve the problem of low accuracy in identifying abnormal data in the prior art.

[0005] To achieve the above objectives, the present invention is implemented by adopting the following technical solutions:

[0006] In a first aspect, the present invention provides a method for identifying abnormal data based on time series data analysis, comprising:

[0007] The acquisition time of the last data is the phosphate concentration time series and temperature time series at the current moment. The acquisition time of the phosphate concentration in the phosphate concentration time series corresponds to the acquisition time of the temperature in the temperature time series.

[0008] Calculate a number of neighborhood difference factors based on the differences between adjacent phosphate concentrations in the phosphate concentration time series and adjacent temperatures in the temperature time series, arrange all neighborhood difference factors into a neighborhood difference factor time series, calculate a number of initial segmentation points based on the change trend of the neighborhood difference factors before and after the neighborhood difference factors in the neighborhood difference factor time series, and divide the neighborhood difference factor time series into a number of reference factor segments based on the initial segmentation points;

[0009] The degree of difference fluctuation of each reference factor segment is calculated based on the difference in changes between different neighborhood difference factors in the reference factor segment. The initial smoothing parameter of each reference factor segment is calculated based on the proportion of the degree of difference fluctuation between the reference factor segment and the overall reference factor segment. The degree of smoothing contribution of each reference factor segment is calculated based on the difference in the degree of difference fluctuation between the reference factor segment and the overall reference factor segment and the length of the reference factor segment. The smoothing weight of each reference factor segment is calculated based on the proportion of the degree of smoothing contribution between the reference factor segment and the overall reference factor segment. The adaptive smoothing parameter of the neighborhood difference factor time series is calculated based on the initial smoothing parameter and the smoothing weight.

[0010] The predicted value of the neighborhood difference factor is calculated according to the adaptive smoothing parameter, and the abnormal difference value is calculated based on the predicted value. If the abnormal difference value is greater than a preset fourth threshold, the phosphate concentration and temperature at the current moment are abnormal data.

[0011] Furthermore, the calculation of several neighborhood difference factors based on the differences between adjacent phosphate concentrations in the phosphate concentration time series and adjacent temperatures in the temperature time series is performed using the following formula:

[0012] ;

[0013] in, Indicates the The phosphate concentration and The neighborhood difference factor of phosphate concentration, Indicates the The phosphate concentration, Indicates the Phosphate concentration, Indicates the Temperature, Indicates the Temperature, represents the preset hyperparameters, Indicates taking the absolute value.

[0014] Furthermore, the calculation of several initial segmentation points based on the changing trend of the neighborhood difference factors before and after the neighborhood difference factors in the neighborhood difference factor time series is performed by the following method:

[0015] The data segment composed of all neighborhood difference factors between the neighborhood difference factor and the first neighborhood difference factor is recorded as the preceding neighborhood factor segment of the neighborhood difference factor, and the data segment composed of T1 neighborhood difference factors after the neighborhood difference factor is recorded as the post-neighborhood factor segment of the neighborhood difference factor. If the number of neighborhood difference factors remaining after the neighborhood difference factor is less than T1, the data segment composed of the remaining neighborhood difference factors after the neighborhood difference factor is recorded as the post-neighborhood factor segment of the neighborhood difference factor, where T1 is a preset first threshold;

[0016] The initial segmentation factor of the neighborhood difference factor is calculated by the following formula:

[0017] ;

[0018] in, represents the initial split factor of the neighborhood difference factor, represents the mean of all neighborhood difference factors in the preceding neighborhood factor segment of the neighborhood difference factor, represents the mean of all neighborhood difference factors in the post-neighborhood factor segment of the neighborhood difference factor, The absolute value of the difference between the maximum neighborhood difference factor and the minimum neighborhood difference factor in the preceding neighborhood factor segment representing the neighborhood difference factor, The absolute value of the difference between the maximum neighborhood difference factor and the minimum neighborhood difference factor in the post-neighborhood factor segment representing the neighborhood difference factor, The DTW distance between the preceding and following neighborhood factor segments of the neighborhood difference factor, Indicates taking the absolute value;

[0019] Obtain the initial segmentation factors of all neighborhood difference factors and perform linear normalization, and record each initial segmentation factor after linear normalization as the initial segmentation degree;

[0020] Traverse all neighborhood difference factors until the first neighborhood difference factor with an initial segmentation degree greater than T2 appears, stop traversal, and record this neighborhood difference factor as an initial segmentation point. The time series composed of all neighborhood difference factors after the initial segmentation point is recorded as the time series of segmentation factors to be processed, where T2 is the preset second threshold;

[0021] In the time series of segmentation factors to be processed, the initial segmentation point that is before the neighborhood difference factor and closest to the neighborhood difference factor is used as the reference factor. The data segment composed of all neighborhood difference factors between the reference factor and the neighborhood difference factor is recorded as the preceding segmentation neighborhood segment of the neighborhood difference factor. Then, the segmentation degree of the neighborhood difference factor is calculated by the following formula:

[0022] ;

[0023] in, represents the degree of segmentation of the neighborhood difference factor, represents the mean of all neighborhood difference factors in the preceding segmentation neighborhood segment of the neighborhood difference factor, The absolute value of the difference between the maximum neighborhood difference factor and the minimum neighborhood difference factor in the preceding segmentation neighborhood segment of the neighborhood difference factor, The DTW distance between the preceding segmented neighborhood segment and the following neighborhood factor segment representing the neighborhood difference factor;

[0024] The neighborhood difference factor with a segmentation degree greater than T3 is recorded as an initial segmentation point, and a number of initial segmentation points are obtained, where T3 is a preset third threshold;

[0025] The method of dividing the neighborhood difference factor time series into a plurality of reference factor segments according to the initial segmentation points includes recording a data segment composed of all neighborhood difference factors between any two adjacent initial segmentation points as a reference factor segment.

[0026] Furthermore, the difference fluctuation degree of each reference factor segment is calculated based on the change difference between different neighborhood difference factors in the reference factor segment, using the following formula:

[0027] ;

[0028] in, Indicates the degree of difference fluctuation of the reference factor segment, represents the maximum value of all neighborhood difference factors in the reference factor segment, represents the minimum value of all neighborhood difference factors in the reference factor segment, represents the number of neighborhood difference factors in the reference factor segment, Indicates the first Neighborhood difference factors, represents the mean of all neighborhood difference factors in the reference factor segment, Indicates the first Neighborhood difference factors, Indicates the first Neighborhood difference factors, Indicates taking the absolute value.

[0029] Furthermore, the initial smoothing parameter of each reference factor segment is calculated based on the proportion of the difference fluctuation between the reference factor segment and the overall reference factor segment, using the following formula:

[0030] ;

[0031] in, represents the initial smoothing parameter of the reference factor segment, Indicates the degree of difference fluctuation of the reference factor segment, represents the number of reference factor segments, Indicates the The degree of difference in fluctuation among the reference factor segments.

[0032] Furthermore, the smoothing contribution of each reference factor segment is calculated based on the difference in the degree of fluctuation between the reference factor segment and the overall reference factor segment and the length of the reference factor segment, using the following formula:

[0033] ;

[0034] in, Indicates the smoothing contribution of the reference factor segment, represents the initial smoothing parameter of the reference factor segment, represents the mean of the initial smoothing parameters of all reference factor segments, represents the number of neighborhood difference factors in the reference factor segment, Represents an exponential function with a natural constant as its base.

[0035] Furthermore, the smoothing weight of each reference factor segment is calculated according to the ratio of the smoothing contribution between the reference factor segment and the overall reference factor segment, using the following formula:

[0036] ;

[0037] in, represents the smoothed weight of the reference factor segment, Indicates the smoothing contribution of the reference factor segment, represents the number of reference factor segments, Indicates the The smoothing contribution of each reference factor segment.

[0038] Furthermore, the adaptive smoothing parameter of the neighborhood difference factor time series is calculated based on the initial smoothing parameter and the smoothing weight, and is performed by the following formula:

[0039] ;

[0040] Where, represents the adaptive smoothing parameter of the neighborhood difference factor time series, represents the number of reference factor segments, Indicates the The initial smoothing parameter for the reference factor segment, Indicates the Smoothed weights for each reference factor segment.

[0041] Furthermore, the calculating of the abnormal difference value based on the predicted value includes: taking the absolute value of the difference between the predicted value of the neighborhood difference factor and the neighborhood difference factor as the abnormal difference value.

[0042] In a second aspect, the present invention provides an abnormal data identification device based on time series data analysis, comprising:

[0043] The time series data acquisition module is configured to: acquire the last data collection time of the phosphate concentration time series and the temperature time series at the current moment, and the collection time of the phosphate concentration in the phosphate concentration time series corresponds to the collection time of the temperature in the temperature time series;

[0044] The reference factor segmentation module is configured to: calculate a number of neighborhood difference factors based on differences between adjacent phosphate concentrations in the phosphate concentration time series and between adjacent temperatures in the temperature time series, arrange all neighborhood difference factors into a neighborhood difference factor time series, calculate a number of initial segmentation points based on a change trend of the neighborhood difference factors before and after the neighborhood difference factors in the neighborhood difference factor time series, and divide the neighborhood difference factor time series into a number of reference factor segments based on the initial segmentation points;

[0045] An adaptive smoothing parameter calculation module is configured to: calculate the difference fluctuation degree of each reference factor segment based on the difference in changes between different neighborhood difference factors in the reference factor segment; calculate the initial smoothing parameter of each reference factor segment based on the ratio of the difference fluctuation degree between the reference factor segment and the overall reference factor segment; calculate the smoothing contribution degree of each reference factor segment based on the difference in the difference fluctuation degree between the reference factor segment and the overall reference factor segment and the length of the reference factor segment; calculate the smoothing weight of each reference factor segment based on the ratio of the smoothing contribution degree between the reference factor segment and the overall reference factor segment; and calculate the adaptive smoothing parameter of the neighborhood difference factor time series based on the initial smoothing parameter and the smoothing weight;

[0046] The abnormal data discrimination module is configured to: calculate a predicted value of the neighborhood difference factor according to the adaptive smoothing parameter, calculate an abnormal difference value based on the predicted value, and if the abnormal difference value is greater than a preset fourth threshold, the phosphate concentration and temperature at the current moment are abnormal data.

[0047] Compared with the prior art, the present invention has the following beneficial effects:

[0048] The present invention provides a method and device for distinguishing abnormal data based on time series data analysis. The method and device calculate the initial segmentation points and combine the mutual influence relationship between phosphate concentration and temperature to better reflect the influence of multiple dimensions on the data. The method calculates the initial smoothing parameters to better reflect the importance of temperature and phosphate concentration in the reference factor segment to the subsequent abnormal data distinction results. The method obtains the initial smoothing parameters and smoothing weights by combining the extreme differences, continuous trend differences and the influence of local data on the overall data segment in different reference factor segments. The adaptive smoothing parameters are obtained based on the comprehensive analysis of the initial smoothing parameters and smoothing weights to improve the accuracy of abnormal data distinction. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 This is a flowchart of an abnormal data identification method based on time series data analysis corresponding to Example 1. DETAILED DESCRIPTION

[0050] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and are not intended to limit the scope of protection of the present invention.

[0051] Example 1

[0052] like Figure 1 As shown, this embodiment provides a method for identifying abnormal data based on time series data analysis, including:

[0053] The acquisition time of the last data is the phosphate concentration time series and temperature time series at the current moment. The acquisition time of the phosphate concentration in the phosphate concentration time series corresponds to the acquisition time of the temperature in the temperature time series.

[0054] Calculate a number of neighborhood difference factors based on the differences between adjacent phosphate concentrations in the phosphate concentration time series and adjacent temperatures in the temperature time series, arrange all neighborhood difference factors into a neighborhood difference factor time series, calculate a number of initial segmentation points based on the change trend of the neighborhood difference factors before and after the neighborhood difference factors in the neighborhood difference factor time series, and divide the neighborhood difference factor time series into a number of reference factor segments based on the initial segmentation points;

[0055] The degree of difference fluctuation of each reference factor segment is calculated based on the difference in changes between different neighborhood difference factors in the reference factor segment. The initial smoothing parameter of each reference factor segment is calculated based on the proportion of the degree of difference fluctuation between the reference factor segment and the overall reference factor segment. The degree of smoothing contribution of each reference factor segment is calculated based on the difference in the degree of difference fluctuation between the reference factor segment and the overall reference factor segment and the length of the reference factor segment. The smoothing weight of each reference factor segment is calculated based on the proportion of the degree of smoothing contribution between the reference factor segment and the overall reference factor segment. The adaptive smoothing parameter of the neighborhood difference factor time series is calculated based on the initial smoothing parameter and the smoothing weight.

[0056] The predicted value of the neighborhood difference factor is calculated according to the adaptive smoothing parameter, and the abnormal difference value is calculated based on the predicted value. If the abnormal difference value is greater than a preset fourth threshold, the phosphate concentration and temperature at the current moment are abnormal data.

[0057] The present invention calculates the initial segmentation points and combines the mutual influence relationship between phosphate concentration and temperature to better reflect the influence of multiple dimensions on data; calculates the initial smoothing parameters to better reflect the importance of temperature and phosphate concentration in the reference factor segment to the subsequent abnormal data discrimination results; obtains the initial smoothing parameters and smoothing weights by combining the extreme differences, continuous trend differences and the influence of local data on the overall data segment in different reference factor segments; and obtains the adaptive smoothing parameters based on the comprehensive analysis of the initial smoothing parameters and the smoothing weights to improve the accuracy of abnormal data discrimination.

[0058] Example 2

[0059] This example uses the iron phosphate synthesis scenario as an example. Iron phosphate is an important chemical substance used in many fields. To ensure the quality of iron phosphate products, it is necessary to monitor and analyze the operational data generated during the synthesis process. Traditional methods typically use the Exponentially Weighted Moving-Average (EWMA) algorithm to determine a smoothing coefficient by averaging the operational data over different time periods. This smoothing coefficient is then used for real-time monitoring to identify abnormal data. However, during the iron phosphate synthesis process, the content of iron ions, phosphate ions, and iron phosphate, as well as the ambient temperature, significantly influence the operational data generated. The impact of changes in these concentrations and ambient temperature on operational data is complex, resulting in traditionally determined smoothing coefficients that cannot effectively incorporate operational data variations, reducing their accuracy and causing significant errors in the final monitoring and identification results. Therefore, this example provides an abnormal data identification method based on time series data analysis.

[0060] This embodiment provides a method for identifying abnormal data based on time series data analysis, which specifically includes the following steps:

[0061] Step S001: collecting phosphate concentration time series and temperature time series.

[0062] The temperature sensor and ion selective electrode were installed in the empty synthesis cell in advance, and the iron oxyhydroxide and phosphate ion concentrations were The solution is poured into the synthesis tank, and the temperature displayed on the temperature sensor is recorded every 1 second, and the phosphate concentration displayed on the measuring instrument of the ion selective electrode is recorded every 1 second, for a total of 10 minutes. Each recorded phosphate concentration corresponds to a temperature recorded at the same time; all recorded phosphate concentrations are arranged in order from small to large according to the recording time, and the arranged time series is recorded as the phosphate concentration time series; all recorded temperatures are arranged in order from small to large according to the recording time, and the arranged time series is recorded as the temperature time series. It should also be noted that this embodiment uses phosphate ion concentration as The example described above uses a recording interval of 1 second and a total recording time of 10 minutes. This embodiment does not specifically limit the concentration and volume of the solution containing only phosphate ions, the recording interval, and the total recording time. The recording interval and the total recording time can be determined according to the specific implementation. Thus, the phosphate concentration time series and the temperature time series are obtained by the above method.

[0063] Step S002: obtain a number of neighborhood difference factors based on the differences between adjacent phosphate concentrations in the phosphate concentration time series and adjacent temperatures in the temperature time series, arrange all neighborhood difference factors in ascending order of recording time, and record the arranged time series as the neighborhood difference factor time series; obtain a number of initial segmentation points based on the changing trend of the neighborhood difference factors within the range before and after the neighborhood difference factors; and divide the neighborhood difference factor time series into a number of reference factor segments based on the initial segmentation points.

[0064] Step S002 is specifically implemented by the following steps:

[0065] In the actual process of synthesizing iron phosphate, the purpose of controlling the synthesis rate of iron phosphate is usually achieved by controlling the temperature and the content of the raw materials for synthesizing iron phosphate. Since the molecular structure of iron phosphate itself is not completely stable, and the temperature will affect the activity of different molecules, a small part of the iron phosphate will decompose into synthetic raw materials during the synthesis of iron phosphate. Therefore, in fact, the synthesis process of iron phosphate has always been in a state of relative dynamic equilibrium, and the corresponding temperature and phosphate concentration will fluctuate up and down within a certain range; and since different temperatures, different concentrations of phosphate and iron phosphate will affect their synthesis rate, the corresponding temperature and phosphate concentration can generally maintain good regularity within a small range. In order to reduce the error of monitoring and discrimination results, this embodiment combines the changes in temperature and phosphate concentration in different ranges to obtain a neighborhood difference factor that can characterize the main influencing dimensional data, and segments it according to the change trend before and after the neighborhood difference factor for subsequent analysis and processing.

[0066] The neighborhood difference factor is calculated by the following method: The phosphate concentration and The difference in phosphate concentration, and The temperature and The temperature difference is calculated The phosphate concentration and The neighborhood difference factor of phosphate concentration. The phosphate concentration and The neighborhood difference factor of phosphate concentration is calculated by the following formula:

[0067] ;

[0068] in, Indicates the The phosphate concentration and The neighborhood difference factor of phosphate concentration, Indicates the The phosphate concentration, Indicates the Phosphate concentration, Indicates the Temperature, Indicates the Temperature, Indicates the preset hyperparameters. In this embodiment, , used to prevent the denominator from being 0, Indicates taking the absolute value. The phosphate concentration and Neighborhood Difference Factor of Phosphate Concentration The larger the The phosphate concentration and The more obvious the difference in the changing trend of phosphate concentration and temperature is between adjacent moments corresponding to the first phosphate concentration, the more obvious the difference is. The phosphate concentration and The more likely that the two phosphate concentrations are not in the same data segment, the greater the rate of iron phosphate formation. Calculate the neighborhood difference factor of any two phosphate concentrations, and poll the combination of any two phosphate concentrations until all neighborhood difference factors are calculated.

[0069] All neighborhood difference factors are arranged in ascending order according to the recording time, and the time series after arrangement is recorded as the neighborhood difference factor time series. A number of neighborhood difference factors T1 is preset, wherein this embodiment is described by taking T1=9 as an example, and this embodiment is not specifically limited, wherein T1 can be determined according to the specific implementation situation; taking any neighborhood difference factor in the neighborhood difference factor time series as an example, the data segment composed of all neighborhood difference factors between the neighborhood difference factor and the first neighborhood difference factor is recorded as the preceding neighborhood factor segment of the neighborhood difference factor, and the data segment composed of T1 neighborhood difference factors after the neighborhood difference factor is recorded as the following neighborhood factor segment of the neighborhood difference factor. Among them, if the number of neighborhood difference factors remaining after the neighborhood difference factor is less than the preset T1, then the data segment composed of the neighborhood difference factors remaining after the neighborhood difference factor is recorded as the following neighborhood factor segment of the neighborhood difference factor; by default, the preceding neighborhood factor segment of the first neighborhood difference factor contains only the first neighborhood difference factor.

[0070] The initial segmentation factor of the neighborhood difference factor is obtained based on the preceding neighborhood factor segment and the following neighborhood factor segment of the neighborhood difference factor. The initial segmentation factor of the neighborhood difference factor is calculated using the following formula:

[0071] ;

[0072] in, represents the initial split factor of the neighborhood difference factor, represents the mean of all neighborhood difference factors in the preceding neighborhood factor segment of the neighborhood difference factor, represents the mean of all neighborhood difference factors in the post-neighborhood factor segment of the neighborhood difference factor, The absolute value of the difference between the maximum neighborhood difference factor and the minimum neighborhood difference factor in the preceding neighborhood factor segment representing the neighborhood difference factor, The absolute value of the difference between the maximum neighborhood difference factor and the minimum neighborhood difference factor in the post-neighborhood factor segment representing the neighborhood difference factor, The DTW (Dynamic Time Warping) distance between the preceding and following neighborhood factor segments of the neighborhood difference factor, Indicates the absolute value. Among them, the larger the initial segmentation factor of the neighborhood difference factor, the more obvious the change of the neighborhood difference factor before and after the neighborhood difference factor, and the greater the possibility of the neighborhood difference factor as the first segmentation point. Obtain the initial segmentation factors of all neighborhood difference factors, perform linear normalization on all initial segmentation factors, and record each initial segmentation factor after linear normalization as the initial segmentation degree. It should be noted that the acquisition of DTW distance is a well-known content of the DTW dynamic time warping algorithm, and will not be repeated in this embodiment.

[0073] An initial segmentation degree threshold T2 is preset, wherein this embodiment is described using T2=0.7 as an example, and this embodiment does not make any specific limitation, wherein T2 may be determined according to the specific implementation situation; taking the first neighborhood difference factor in the neighborhood difference factor time series as the starting point, with a step size of 1, traversing all neighborhood difference factors begins, and stopping the traversal when a neighborhood difference factor with an initial segmentation degree greater than T2 appears for the first time, and recording this neighborhood difference factor as an initial segmentation point, and recording the time series composed of all neighborhood difference factors after the initial segmentation point as the segmentation factor time series to be processed.

[0074] In the time series of segmentation factors to be processed, each neighborhood difference factor is taken as an example, and the initial segmentation point that precedes the neighborhood difference factor and is closest to the neighborhood difference factor is used as the reference factor. The data segment composed of all neighborhood difference factors between the reference factor and the neighborhood difference factor is recorded as the preceding segmentation neighborhood segment of the neighborhood difference factor. The segmentation degree of the neighborhood difference factor is obtained based on the preceding segmentation neighborhood segment and the following neighborhood factor segment of the neighborhood difference factor. The segmentation degree of the neighborhood difference factor is calculated by the following formula:

[0075] ;

[0076] in, represents the degree of segmentation of the neighborhood difference factor, represents the mean of all neighborhood difference factors in the preceding segmentation neighborhood segment of the neighborhood difference factor, represents the mean of all neighborhood difference factors in the post-neighborhood factor segment of the neighborhood difference factor, The absolute value of the difference between the maximum neighborhood difference factor and the minimum neighborhood difference factor in the preceding segmentation neighborhood segment of the neighborhood difference factor, The absolute value of the difference between the maximum neighborhood difference factor and the minimum neighborhood difference factor in the post-neighborhood factor segment representing the neighborhood difference factor, The DTW distance between the front segmentation neighborhood segment and the back segmentation neighborhood factor of the neighborhood difference factor, The greater the segmentation degree of the neighborhood difference factor, the more obvious the change of the neighborhood difference factor before and after the neighborhood difference factor, and the greater the possibility that the neighborhood difference factor will be used as a subsequent segmentation point.

[0077] A segmentation degree threshold T3 is preset, wherein this embodiment is described using T3=20 as an example, and this embodiment does not make any specific limitation, wherein T3 can be determined according to the specific implementation situation; the neighborhood difference factor with a segmentation degree greater than T3 is recorded as the initial segmentation point, and so on, all initial segmentation points are obtained, and the data segment composed of all neighborhood difference factors between any two adjacent initial segmentation points is recorded as a reference factor segment.

[0078] So far, all reference factor segments have been obtained through the above method.

[0079] Step S003: obtain the difference fluctuation degree of each reference factor segment according to the difference in changes between different neighborhood difference factors in the reference factor segment; obtain the initial smoothing parameter of each reference factor segment according to the proportion of the difference fluctuation degree between the reference factor segment and the overall reference factor segment; obtain the smoothing contribution degree of each reference factor segment according to the difference in the difference fluctuation degree between the reference factor segment and the overall reference factor segment and the length of the reference factor segment; obtain the smoothing weight of each reference factor segment according to the proportion of the smoothing contribution degree between the reference factor segment and the overall reference factor segment; obtain the adaptive smoothing parameter of the neighborhood difference factor time series according to the initial smoothing parameter and the smoothing weight.

[0080] After segmenting the neighborhood difference factor time series to obtain different reference factor segments, the traditional EWMA exponentially weighted moving average algorithm usually directly uses the mean value in different data segments to determine the smoothing parameter; however, in the iron phosphate synthesis scenario of this embodiment, since the impact of changes in concentration and ambient temperature on subsequent data is relatively complex, the smoothing parameter determined solely by the mean value is obviously insufficient to cope with the complex influence relationship existing in the scenario; for this reason, this embodiment obtains the initial smoothing parameter and smoothing weight by combining the extreme differences in different reference factor segments, the continuous trend differences, and the degree of influence of local data on the overall data segment, and obtains the adaptive smoothing parameter based on a comprehensive analysis of the initial smoothing parameter and the smoothing weight for subsequent abnormal monitoring and analysis processing.

[0081] Taking any reference factor segment as an example, the difference fluctuation degree of the reference factor segment is obtained based on the change difference between the difference factors of different neighborhoods in the reference factor segment. The difference fluctuation degree of the reference factor segment is calculated using the following formula:

[0082] ;

[0083] in, Indicates the degree of difference fluctuation of the reference factor segment, represents the maximum value of all neighborhood difference factors in the reference factor segment, represents the minimum value of all neighborhood difference factors in the reference factor segment, represents the number of neighborhood difference factors in the reference factor segment, Indicates the first Neighborhood difference factors, represents the mean of all neighborhood difference factors in the reference factor segment, Indicates the first Neighborhood difference factors, Indicates the first Neighborhood difference factors, Indicates the absolute value. The greater the fluctuation of the reference factor segment, the more drastic the changes in temperature and phosphate concentration within the reference factor segment.

[0084] Obtain the differential fluctuation degree of all reference factor segments. Taking any reference factor segment as an example, the initial smoothing parameter of the reference factor segment is obtained based on the differential fluctuation degree of all reference factor segments. The initial smoothing parameter of the reference factor segment is calculated using the following formula:

[0085] ;

[0086] in, represents the initial smoothing parameter of the reference factor segment, Indicates the degree of difference fluctuation of the reference factor segment, represents the number of reference factor segments, Indicates the The larger the initial smoothing parameter of the reference factor segment, the greater the error caused by the temperature and phosphate concentration in the reference factor segment on the subsequent monitoring and abnormal data identification results.

[0087] Get the initial smoothing parameters of all reference factor segments. Take any reference factor segment as an example, and get the smoothing contribution of the reference factor segment based on the initial smoothing parameters of all reference factor segments. The smoothing contribution of the reference factor segment is calculated using the following formula:

[0088] ;

[0089] in, Indicates the smoothing contribution of the reference factor segment, represents the initial smoothing parameter of the reference factor segment, represents the mean of the initial smoothing parameters of all reference factor segments, represents the number of neighborhood difference factors in the reference factor segment, Represents an exponential function with a natural constant as the base; this embodiment uses Functions are used to present inverse proportional relationships and normalization processing. Implementers can choose inverse proportional functions and normalization functions according to actual conditions. Among them, the greater the smoothing contribution of the reference factor segment, the closer the change trend of the reference factor segment is to the change trend of the entire neighborhood difference factor sequence.

[0090] Obtain the smoothing contribution of all reference factor segments. Taking any reference factor segment as an example, obtain the smoothing weight of the reference factor segment based on the smoothing contribution of all reference factor segments. The smoothing weight of the reference factor segment is calculated using the following formula:

[0091] ;

[0092] in, represents the smoothed weight of the reference factor segment, Indicates the smoothing contribution of the reference factor segment, represents the number of reference factor segments, Indicates the The smoothing contribution of each reference factor segment. The larger the smoothing weight of the reference factor segment, the more important the temperature and phosphate concentration in the reference factor segment are to subsequent monitoring and abnormal data identification results.

[0093] Obtain the smoothing weights of all reference factor segments. Obtain the adaptive smoothing parameters of the neighborhood difference factor time series based on the initial smoothing parameters and smoothing weights of all reference factor segments. The adaptive smoothing parameters of the neighborhood difference factor time series are calculated using the following formula:

[0094] ;

[0095] in, represents the adaptive smoothing parameter of the neighborhood difference factor time series, represents the number of reference factor segments, Indicates the The initial smoothing parameter for the reference factor segment, Indicates the Smoothed weights for each reference factor segment.

[0096] At this point, the adaptive smoothing parameters of the neighborhood difference factor time series are obtained through the above method.

[0097] Step S004: performing abnormal data discrimination on the phosphate concentration and temperature according to the adaptive smoothing parameter.

[0098] The collected temperature and phosphate concentration are updated in real time, the latest neighborhood difference factor is obtained according to the latest temperature and phosphate concentration, the neighborhood difference factor time series is updated in real time according to the latest neighborhood difference factor, the adaptive smoothing parameter of the latest neighborhood difference factor time series is obtained, the latest adaptive smoothing parameter is used as the smoothing parameter, the predicted value of the latest neighborhood difference factor is obtained according to the smoothing parameter, and the absolute value of the difference between the predicted value of the latest neighborhood difference factor and the latest neighborhood difference factor is used as the abnormal difference value. An abnormal difference value threshold T4 is preset, wherein this embodiment is described with T4=0.3 as an example, and this embodiment is not specifically limited, wherein T4 can be determined according to the specific implementation situation; if the abnormal difference value is greater than T4, the latest temperature and phosphate concentration are recorded as abnormal data, and the monitoring equipment is warned. The process of obtaining the predicted value according to the smoothing parameter is a well-known content of the EWMA exponential weighted moving average algorithm, and this embodiment will not be repeated.

[0099] Through the above steps, the abnormal data identification method based on time series data analysis is completed.

[0100] Example 3

[0101] The present invention provides an abnormal data identification device based on time series data analysis, comprising:

[0102] The time series data acquisition module is configured to: acquire the last data collection time of the phosphate concentration time series and the temperature time series at the current moment, and the collection time of the phosphate concentration in the phosphate concentration time series corresponds to the collection time of the temperature in the temperature time series;

[0103] The reference factor segmentation module is configured to: calculate a number of neighborhood difference factors based on differences between adjacent phosphate concentrations in the phosphate concentration time series and between adjacent temperatures in the temperature time series, arrange all neighborhood difference factors into a neighborhood difference factor time series, calculate a number of initial segmentation points based on a change trend of the neighborhood difference factors before and after the neighborhood difference factors in the neighborhood difference factor time series, and divide the neighborhood difference factor time series into a number of reference factor segments based on the initial segmentation points;

[0104] An adaptive smoothing parameter calculation module is configured to: calculate the difference fluctuation degree of each reference factor segment based on the difference in changes between different neighborhood difference factors in the reference factor segment; calculate the initial smoothing parameter of each reference factor segment based on the ratio of the difference fluctuation degree between the reference factor segment and the overall reference factor segment; calculate the smoothing contribution degree of each reference factor segment based on the difference in the difference fluctuation degree between the reference factor segment and the overall reference factor segment and the length of the reference factor segment; calculate the smoothing weight of each reference factor segment based on the ratio of the smoothing contribution degree between the reference factor segment and the overall reference factor segment; and calculate the adaptive smoothing parameter of the neighborhood difference factor time series based on the initial smoothing parameter and the smoothing weight;

[0105] The abnormal data discrimination module is configured to: calculate a predicted value of the neighborhood difference factor according to the adaptive smoothing parameter, calculate an abnormal difference value based on the predicted value, and if the abnormal difference value is greater than a preset fourth threshold, the phosphate concentration and temperature at the current moment are abnormal data.

[0106] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0107] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0108] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0109] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

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

Claims

1. A method for identifying abnormal data based on time series data analysis, characterized in that: include: The acquisition time of the last data is the phosphate concentration time series and temperature time series at the current moment. The acquisition time of the phosphate concentration in the phosphate concentration time series corresponds to the acquisition time of the temperature in the temperature time series. Calculate a number of neighborhood difference factors based on the differences between adjacent phosphate concentrations in the phosphate concentration time series and adjacent temperatures in the temperature time series, arrange all neighborhood difference factors into a neighborhood difference factor time series, calculate a number of initial segmentation points based on the change trend of the neighborhood difference factors before and after the neighborhood difference factors in the neighborhood difference factor time series, and divide the neighborhood difference factor time series into a number of reference factor segments based on the initial segmentation points; The degree of difference fluctuation of each reference factor segment is calculated based on the difference in changes between different neighborhood difference factors in the reference factor segment. The initial smoothing parameter of each reference factor segment is calculated based on the proportion of the degree of difference fluctuation between the reference factor segment and the overall reference factor segment. The degree of smoothing contribution of each reference factor segment is calculated based on the difference in the degree of difference fluctuation between the reference factor segment and the overall reference factor segment and the length of the reference factor segment. The smoothing weight of each reference factor segment is calculated based on the proportion of the degree of smoothing contribution between the reference factor segment and the overall reference factor segment. The adaptive smoothing parameter of the neighborhood difference factor time series is calculated based on the initial smoothing parameter and the smoothing weight. The predicted value of the neighborhood difference factor is calculated according to the adaptive smoothing parameter, and the abnormal difference value is calculated based on the predicted value. If the abnormal difference value is greater than a preset fourth threshold, the phosphate concentration and temperature at the current moment are abnormal data.

2. The abnormal data identification method based on time series data analysis according to claim 1 is characterized in that: The calculation of several neighborhood difference factors based on the differences between adjacent phosphate concentrations in the phosphate concentration time series and adjacent temperatures in the temperature time series is performed using the following formula: ; in, Indicates the The phosphate concentration and The neighborhood difference factor of phosphate concentration, Indicates the The phosphate concentration, Indicates the Phosphate concentration, Indicates the Temperature, Indicates the Temperature, represents the preset hyperparameters, Indicates taking the absolute value.

3. The abnormal data identification method based on time series data analysis according to claim 1 is characterized in that: The calculation of several initial segmentation points based on the changing trend of the neighborhood difference factors before and after the neighborhood difference factors in the neighborhood difference factor time series is performed by the following method: The data segment composed of all neighborhood difference factors between the neighborhood difference factor and the first neighborhood difference factor is recorded as the preceding neighborhood factor segment of the neighborhood difference factor, and the data segment composed of T1 neighborhood difference factors after the neighborhood difference factor is recorded as the post-neighborhood factor segment of the neighborhood difference factor. If the number of neighborhood difference factors remaining after the neighborhood difference factor is less than T1, the data segment composed of the remaining neighborhood difference factors after the neighborhood difference factor is recorded as the post-neighborhood factor segment of the neighborhood difference factor, where T1 is a preset first threshold; The initial segmentation factor of the neighborhood difference factor is calculated by the following formula: ; in, represents the initial split factor of the neighborhood difference factor, represents the mean of all neighborhood difference factors in the preceding neighborhood factor segment of the neighborhood difference factor, represents the mean of all neighborhood difference factors in the post-neighborhood factor segment of the neighborhood difference factor, The absolute value of the difference between the maximum neighborhood difference factor and the minimum neighborhood difference factor in the preceding neighborhood factor segment representing the neighborhood difference factor, The absolute value of the difference between the maximum neighborhood difference factor and the minimum neighborhood difference factor in the post-neighborhood factor segment representing the neighborhood difference factor, The DTW distance between the preceding and following neighborhood factor segments of the neighborhood difference factor, Indicates taking the absolute value; Obtain the initial segmentation factors of all neighborhood difference factors and perform linear normalization, and record each initial segmentation factor after linear normalization as the initial segmentation degree; Traverse all neighborhood difference factors until the first neighborhood difference factor with an initial segmentation degree greater than T2 appears, stop traversal, and record this neighborhood difference factor as an initial segmentation point. The time series composed of all neighborhood difference factors after the initial segmentation point is recorded as the time series of segmentation factors to be processed, where T2 is the preset second threshold; In the time series of segmentation factors to be processed, the initial segmentation point that is before the neighborhood difference factor and closest to the neighborhood difference factor is used as the reference factor. The data segment composed of all neighborhood difference factors between the reference factor and the neighborhood difference factor is recorded as the preceding segmentation neighborhood segment of the neighborhood difference factor. Then, the segmentation degree of the neighborhood difference factor is calculated by the following formula: ; in, represents the degree of segmentation of the neighborhood difference factor, represents the mean of all neighborhood difference factors in the preceding segmentation neighborhood segment of the neighborhood difference factor, The absolute value of the difference between the maximum neighborhood difference factor and the minimum neighborhood difference factor in the preceding segmentation neighborhood segment of the neighborhood difference factor, The DTW distance between the preceding segmented neighborhood segment and the following neighborhood factor segment representing the neighborhood difference factor; The neighborhood difference factor with a segmentation degree greater than T3 is recorded as an initial segmentation point, and a number of initial segmentation points are obtained, where T3 is a preset third threshold; The method of dividing the neighborhood difference factor time series into a plurality of reference factor segments according to the initial segmentation points includes recording a data segment composed of all neighborhood difference factors between any two adjacent initial segmentation points as a reference factor segment.

4. The abnormal data identification method based on time series data analysis according to claim 1 is characterized in that: The difference fluctuation degree of each reference factor segment is calculated based on the change difference between different neighborhood difference factors in the reference factor segment, using the following formula: ; in, Indicates the degree of difference fluctuation of the reference factor segment, represents the maximum value of all neighborhood difference factors in the reference factor segment, represents the minimum value of all neighborhood difference factors in the reference factor segment, represents the number of neighborhood difference factors in the reference factor segment, Indicates the first Neighborhood difference factors, represents the mean of all neighborhood difference factors in the reference factor segment, Indicates the first Neighborhood difference factors, Indicates the first Neighborhood difference factors, Indicates taking the absolute value.

5. The abnormal data identification method based on time series data analysis according to claim 1 is characterized in that: The initial smoothing parameter of each reference factor segment is calculated based on the proportion of the difference fluctuation between the reference factor segment and the overall reference factor segment, using the following formula: ; in, represents the initial smoothing parameter of the reference factor segment, Indicates the degree of difference fluctuation of the reference factor segment, represents the number of reference factor segments, Indicates the The degree of difference in fluctuation among the reference factor segments.

6. The abnormal data identification method based on time series data analysis according to claim 1 is characterized in that: The smoothing contribution of each reference factor segment is calculated based on the difference in the degree of fluctuation between the reference factor segment and the overall reference factor segment and the length of the reference factor segment, using the following formula: ; in, Indicates the smoothing contribution of the reference factor segment, represents the initial smoothing parameter of the reference factor segment, represents the mean of the initial smoothing parameters of all reference factor segments, represents the number of neighborhood difference factors in the reference factor segment, Represents an exponential function with a natural constant as its base.

7. The abnormal data identification method based on time series data analysis according to claim 1 is characterized in that: The smoothing weight of each reference factor segment is calculated based on the proportion of the smoothing contribution between the reference factor segment and the overall reference factor segment, using the following formula: ; in, represents the smoothed weight of the reference factor segment, Indicates the smoothing contribution of the reference factor segment, represents the number of reference factor segments, Indicates the The smoothing contribution of each reference factor segment.

8. The abnormal data identification method based on time series data analysis according to claim 1 is characterized in that: The adaptive smoothing parameter of the neighborhood difference factor time series is calculated based on the initial smoothing parameter and the smoothing weight, and is performed by the following formula: ; Where, represents the adaptive smoothing parameter of the neighborhood difference factor time series, represents the number of reference factor segments, Indicates the The initial smoothing parameter for the reference factor segment, Indicates the Smoothed weights for each reference factor segment.

9. The abnormal data identification method based on time series data analysis according to claim 1 is characterized in that: The calculating of the abnormal difference value based on the predicted value includes: taking the absolute value of the difference between the predicted value of the neighborhood difference factor and the neighborhood difference factor as the abnormal difference value.

10. An abnormal data identification device based on time series data analysis, characterized in that: include: The time series data acquisition module is configured to: acquire the last data collection time of the phosphate concentration time series and the temperature time series at the current moment, and the collection time of the phosphate concentration in the phosphate concentration time series corresponds to the collection time of the temperature in the temperature time series; The reference factor segmentation module is configured to: calculate a number of neighborhood difference factors based on differences between adjacent phosphate concentrations in the phosphate concentration time series and between adjacent temperatures in the temperature time series, arrange all neighborhood difference factors into a neighborhood difference factor time series, calculate a number of initial segmentation points based on a change trend of the neighborhood difference factors before and after the neighborhood difference factors in the neighborhood difference factor time series, and divide the neighborhood difference factor time series into a number of reference factor segments based on the initial segmentation points; An adaptive smoothing parameter calculation module is configured to: calculate the difference fluctuation degree of each reference factor segment based on the difference in changes between different neighborhood difference factors in the reference factor segment; calculate the initial smoothing parameter of each reference factor segment based on the ratio of the difference fluctuation degree between the reference factor segment and the overall reference factor segment; calculate the smoothing contribution degree of each reference factor segment based on the difference in the difference fluctuation degree between the reference factor segment and the overall reference factor segment and the length of the reference factor segment; calculate the smoothing weight of each reference factor segment based on the ratio of the smoothing contribution degree between the reference factor segment and the overall reference factor segment; and calculate the adaptive smoothing parameter of the neighborhood difference factor time series based on the initial smoothing parameter and the smoothing weight; The abnormal data discrimination module is configured to: calculate a predicted value of the neighborhood difference factor according to the adaptive smoothing parameter, calculate an abnormal difference value based on the predicted value, and if the abnormal difference value is greater than a preset fourth threshold, the phosphate concentration and temperature at the current moment are abnormal data.

Citation Information

Patent Citations

  • Temperature sensor data abnormity processing method for moxibustion therapeutic instrument

    CN118121487A

  • Lithium battery data acquisition anomaly identification method and system, storage medium and device

    WO2024212403A1