Multi-factor fusion Internet of Things outlier data identification method

Through a multi-factor fusion of IoT outlier data recognition method, combined with the prediction model of LSTM and feature attention mechanism, and dynamically set thresholds using the isolated forest algorithm, the problem of insufficient real-time and accuracy of outlier data recognition in the prior art is solved, and more efficient and reliable outlier data recognition is achieved.

CN119577648APending Publication Date: 2025-03-07CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202411644141.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

The existing IoT outgroup data identification methods are insufficient in real-time and accuracy. They usually rely on historical data of a single factor for processing and analysis, lack comprehensive consideration of multiple influencing factors, and there are limitations in the setting of fixed thresholds, which affects detection sensitivity and alarm frequency.

Method used

The IoT outcross data recognition method is adopted with a multi-factor fusion method. Through data fusion and preprocessing, data correlation analysis, construction of a prediction model combining LSTM with characteristic attention mechanism, and the use of isolated forest algorithm for outcross data recognition, the threshold is dynamically set to improve the accuracy and real-timeness of the recognition.

Benefits of technology

It significantly improves the rationality, accuracy and real-time nature of outlier data identification, reduces false alarms and missed reports caused by improper threshold setting, and enhances the ability to respond to sudden environmental changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119577648A_ABST
    Figure CN119577648A_ABST
Patent Text Reader

Abstract

The invention relates to a multi-factor fusion Internet of Things outlier data identification method, and belongs to the technical field of Internet of Things, and the method comprises the steps: determining an identified target factor, fusing a plurality of influence factors associated with the target factor, obtaining corresponding historical data, and carrying out the preprocessing; performing correlation analysis on the specific indexes, and selecting index data having significant influence on target factors to form a final effective index combination; constructing a prediction model combining the LSTM with a feature attention mechanism, performing prediction by using the data after correlation analysis screening, outputting a prediction value in a future period of time, and obtaining an actual prediction value through reverse normalization; a prediction model is adopted, an outlier data identification method fused with multi-factor comprehensive analysis is adopted, an isolated forest algorithm is used for modeling, prediction residual errors and influence factors serve as input features, and the abnormal score of each data point is calculated; and based on the distribution of the abnormal scores, dynamically setting a threshold value by adopting a sliding window technology, and judging the data points exceeding the threshold value as outlier data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of Internet of Things, and relates to a multi-factor fusion Internet of Things outlier data identification method. Background Art

[0002] With the rapid development of the Internet of Things (IoT), a large number of sensors and smart devices have been widely used in various fields and industries. These devices usually collect data through IoT technology and generate a large amount of monitoring data, which includes normal data and outlier data. Outlier data communication indicates equipment failure or environmental pollution. If not discovered and handled in time, it may cause equipment damage or environmental safety hazards. Therefore, the identification of outlier data has become an extremely important task in the IoT platform.

[0003] Existing IoT outlier data identification methods are still insufficient in terms of real-time and accuracy. They usually rely on historical data of a single factor for processing and analysis, and lack comprehensive consideration of multiple influencing factors. Generally, only a fixed threshold is used to judge outlier data. This single threshold setting has limitations: if it is set too high, it will reduce the detection sensitivity and affect the timely response to sudden environmental changes; if it is set too low, it will lead to frequent abnormal alarms, increase unnecessary operational burdens, and be detrimental to the effective monitoring of environmental changes. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a multi-factor fusion outlier data identification method for the Internet of Things, which integrates the influencing factors associated with the main factors for comprehensive analysis, and uses sliding window technology to dynamically set the threshold based on the distribution of abnormal scores. This method significantly improves the rationality, accuracy and real-time performance of outlier data identification, and provides a more solid technical support for outlier data identification in the Internet of Things.

[0005] In order to achieve the above object, the present invention provides the following technical solutions:

[0006] A multi-factor fusion outlier data identification method for the Internet of Things includes the following steps:

[0007] S1: Data fusion and preprocessing: determine the target factor to be identified, fuse the various influencing factors associated with it, obtain the corresponding historical data and perform preprocessing;

[0008] S2: Data correlation analysis: perform correlation analysis on specific indicators in the multi-factor data preprocessed in step S1 to select indicator data that have a significant impact on the target factor and form a final effective indicator combination;

[0009] S3: Data prediction: Build a prediction model combining LSTM with feature attention mechanism, use the data filtered by correlation analysis to make predictions, output the predicted value for a period of time in the future, and obtain the actual predicted value through denormalization.

[0010] S4: Outlier data identification: The prediction model is adopted, and the outlier data identification method of multi-factor comprehensive analysis is integrated. The isolation forest algorithm is used for modeling. The prediction residual and influencing factors are used as input features to calculate the anomaly score of each data point. Based on the distribution of anomaly scores, the sliding window technology is used to dynamically set the threshold, and the data points exceeding the threshold are determined as outliers.

[0011] Further, step S1 specifically includes the following steps:

[0012] S11: Data fusion: In the identification of outlier data in IoT, first determine the target factor to be identified and integrate the various influencing factors associated with it; then obtain the historical data of each factor to form a comprehensive data foundation;

[0013] S12: Processing of missing values ​​and outliers: The linear interpolation method is used to process the data. When a peak outlier or missing value appears at a certain moment, the linear interpolation function is used to estimate the value at that moment;

[0014] S13: Standardization: The data is normalized using the extreme value normalization method to eliminate the impact of the dimension; the results output by the prediction model are denormalized to obtain the actual predicted value.

[0015] Furthermore, in step S2, the Spearman rank correlation coefficient is used to analyze the correlation between each pair of indicators in view of the nonlinear relationship between different indicators, specifically including: performing rank transformation on each pair of indicator data to be analyzed, calculating their Spearman rank correlation coefficients, and reflecting the strength of the monotonic relationship between the indicators; according to the results of the correlation analysis, selecting the influencing factor indicators that are highly correlated with the main factor indicators, and eliminating the indicators that are weakly correlated with the main factors, so as to optimize the selection of subsequent model input features.

[0016] Further, step S3 specifically includes the following steps:

[0017] S31: Divide the preprocessed data into a training set, a test set and a validation set;

[0018] S32: Construct a prediction model combining LSTM with feature attention mechanism, define the input layer, hidden layer and output layer, construct the data set into a window and use it as the input data of the prediction model for multivariate time series prediction. Suppose the time series of any indicator Y = (y1,…,y T-1 ,y T )∈R TFor the prediction target, the index data of each factor at T historical moments are the time series matrix X=(x 1 ,x 2 ,…,x N ) T ∈R T×N , where N represents the dimension of the parameter, including the parameters of each indicator in each factor, Represents the value of the Nth variable at time t;

[0019] By combining the feature attention mechanism, important variables are weighted in the encoding stage to obtain the importance weight c of each implicit state to the predicted output N , represents the important features of the current input features to the output. In the encoding stage, as shown in the following formula, the context vector updated by the feature attention mechanism Combined with previous historical information to output Using these weight coefficients, the updated input variables at each moment are obtained as matrix X = (c1x 1 ,c2x 2 ,…,c N x N ) T ∈R T ×N ;

[0020] c N =f attention (x)

[0021]

[0022] The feature attention mechanism is used to update the weights of the input vector and each hidden layer state, so that the temporal coding hidden layer state at each moment contains the corresponding relationship between the predicted target parameter and other feature parameters, thereby obtaining the predicted value of the historical data at the next moment.

[0023] S33: Configure network parameters and train the prediction model. The training ends when the L(θ) loss function converges. The formula is as follows:

[0024]

[0025] Where θ represents the network parameter set, and Represent the actual value and predicted value of the target parameter i at time t respectively;

[0026] The root mean square error between the predicted value and the actual value of each target parameter is summed and averaged to measure the overall prediction accuracy of the model;

[0027] S34: Use the trained prediction model to predict the real-time data, take the data of the n moments before the predicted moment t+1 as the input sequence, and use the prediction model to predict the indicator parameters at the moment t+1. The formula is as follows:

[0028]

[0029] Further, the step S4 comprises the following steps:

[0030] S41: Compare the predicted value output by the prediction model with the actual value to calculate the prediction residual; use the Z-score standardization method to standardize the multidimensional prediction residual and influencing factors to ensure the consistency of scales between different features;

[0031] S42: Build an outlier data recognition model of isolation forest, take multidimensional prediction residuals and influencing factors as input features, consider the change of influencing factors in calculating the anomaly score of sample points, and the calculation formula of the updated anomaly score is as follows:

[0032]

[0033] Where s(x) represents the anomaly score of data point x, h t (x) represents the path length of the tth tree, c(n) is a constant for normalizing the path length, which is used to adjust the differences between input features;

[0034] Using sliding window technology, the anomaly scores within a period of time are counted, the mean and standard deviation within the window are calculated, and the threshold is adjusted dynamically;

[0035] Assume that at time t, the length of the sliding window is W, and the anomaly score in the window is {s t-W+1 ,s t-W+2 ,...,s t}, after calculating the mean μ in the sliding window t and standard deviation σ t After that, the dynamic threshold formula is as follows:

[0036] U t =μ t +k·σ t

[0037] Among them U t is the threshold set within the current window, and k is a constant used to control the sensitivity of outlier data;

[0038] In the case of real-time data update, the mean and standard deviation of the rolling update window are used, and the anomaly score s is introduced at time t+1. t+1 , and remove the earliest data s in the window t-W+1 , calculated as follows:

[0039]

[0040]

[0041] Through this recursive method, the mean and standard deviation are dynamically adjusted each time the window is updated;

[0042] S43: Set the hyperparameters of the isolation forest model, including the number of isolated trees, the sampling amount of each tree, and the length of the sliding window; train the model by gradually adjusting these hyperparameters and compare the performance differences under different settings; when evaluating the model performance, use the ROC curve and AUC value indicators to analyze the accuracy and stability of the model, so as to select the model parameter combination with the best performance;

[0043] S44: Use the trained isolation forest model to identify outlier data on the prediction residuals; compare the calculated anomaly score with the threshold, and if the anomaly score is greater than the threshold, determine that the data point is an outlier.

[0044] The beneficial effects of the present invention are:

[0045] 1. Through linear interpolation and extreme value normalization technology, missing values ​​and outliers can be effectively processed, inconsistencies and dimensional differences in the data can be eliminated, and the scale consistency between different indicators can be ensured. This processing step significantly improves the quality and reliability of the data, providing a more accurate basis for subsequent analysis and modeling.

[0046] 2. By analyzing the correlation between the various indicators in the influencing factors through the Spearman rank correlation coefficient, we can effectively identify the indicators with strong correlation with the main factor indicators and eliminate the indicators that are irrelevant or weakly correlated with the target factors. This process helps to reduce the interference of irrelevant features, optimize the selection of input features, and improve the performance and efficiency of subsequent models.

[0047] 3. By combining the feature attention mechanism, the LSTM model can adaptively adjust the weights according to the changes in each influencing factor, so that the model can dynamically focus on the key features in the input sequence at every moment, improving the accuracy and reliability of the prediction. By optimizing the feature selection and dynamic adjustment of the model, the accuracy of the prediction results is effectively improved.

[0048] 4. Based on the prediction model, a method integrating multi-factor comprehensive analysis is adopted to construct an outlier data identification model using the isolation forest algorithm. By taking the multi-dimensional prediction residuals and influencing factors as input features, the scales of different features are standardized to ensure consistency, and then the relationship between the input features is implicitly considered. This relationship will be reflected in the construction process of the decision tree and affect the final anomaly score calculation. Finally, based on the anomaly score distribution, the sliding window technology is used to dynamically set the threshold, and the data points exceeding the threshold are determined as outlier data. The accuracy, effectiveness and reliability of outlier data identification are effectively improved.

[0049] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:

[0051] Figure 1 It is a schematic diagram of the composition of the multi-factor fusion outlier data identification method of the Internet of Things according to the present invention;

[0052] Figure 2 A schematic diagram of a prediction model flow chart of the multi-factor fusion outlier data identification method of the Internet of Things according to the present invention;

[0053] Figure 3 The figure is a flow chart of an anomaly detection model of the multi-factor fusion outlier data identification method of the Internet of Things described in the present invention. DETAILED DESCRIPTION

[0054] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.

[0055] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0056] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.

[0057] like Figure 1 As shown, the present invention provides a multi-factor fusion outlier data identification method for the Internet of Things, and the specific steps are as follows:

[0058] The first step, data fusion and preprocessing, includes the following steps:

[0059] Step 1: Data fusion: In the identification of outlier data in the Internet of Things, first determine the target factor to be identified and integrate the various influencing factors associated with it. Then, integrate the corresponding historical data to provide a comprehensive data basis for subsequent analysis. For example, in water environment testing, water quality factors can be determined as target factors to be identified, and influencing factors associated with the target factors, such as meteorological factors, can be selected. These factors can affect the water quality index data to a certain extent. Combining these factors can more comprehensively analyze the outliers of water quality index data.

[0060] Step 2: Processing of missing values ​​and outliers: Considering that in the process of IoT data collection, data breakpoints and noise often occur due to factors such as network, weather, and maintenance. Therefore, the linear interpolation method is used for processing as shown in the following formula, where t i , t j The data at the two moments are x i and x j , when there is a peak outlier or missing value at a certain moment, use this function to estimate the value at time t, that is, L(t).

[0061]

[0062] Step 3: Standardization: After the data is processed by linear interpolation, due to the dimensional differences of the indicator data of each factor, the extreme value normalization method is used to normalize the data to eliminate the influence of the dimension, as shown in the following formula, where x min and x maxis the minimum and maximum value in the data, and ε is a constant, which is based on the range and precision of the data to prevent the model from falling into infinity. The output of the prediction model is denormalized using the following formula to obtain the actual predicted value, where Represents the normalized predicted value of an indicator.

[0063]

[0064]

[0065] The second step is data correlation analysis: In order to explore the impact of different indicators in each influencing factor on the main factor indicator, the Spearman rank correlation coefficient is used to analyze the correlation between each pair of indicators according to the nonlinear relationship between different indicators.

[0066] Specifically, by performing a rank transformation on the data of each indicator to be analyzed, their Spearman rank correlation coefficient is calculated to reflect the strength of the monotonic relationship between the indicators. If the correlation coefficient is close to 1, it means that there is a strong positive correlation between the two indicators; if the correlation coefficient is close to -1, it means that there is a strong negative correlation between the two; if the correlation coefficient is close to 0, it means that there is no significant monotonic relationship between the two. According to the results of the correlation analysis, the influencing factor indicators that are highly correlated with the main factor indicators are selected, and the indicators with weak correlation with the main factors are eliminated, so as to optimize the selection of subsequent model input features. These highly correlated indicators will serve as key input features in the subsequent modeling process, providing a basis for updating the weights of input features in the prediction model through the feature attention mechanism, thereby improving the model's attention to key factors.

[0067] For the third step, please refer to Figure 2 , construct LSTM combined with attention mechanism for prediction, including the following steps:

[0068] Step 1: Divide the preprocessed data into training set, test set, and validation set in a ratio of 8:1:1.

[0069] Step 2: Construct a prediction model combining LSTM with feature attention mechanism, define the input layer, hidden layer and output layer, construct the data set into a window and use it as the input data of the prediction model for multivariate time series prediction. Suppose the time series of any indicator Y = (y1,…,y T-1 ,y T )∈R T For the prediction target, the index data of each factor at T historical moments are the time series matrix X=(x 1 ,x 2 ,…,x N ) T ∈R T×N, where N represents the dimension of the parameter, including the parameters of each indicator in each factor, Represents the value of the Nth variable at time t.

[0070] By combining the feature attention mechanism, important variables are weighted in the encoding stage to obtain the importance weight c of each implicit state to the predicted output N , represents the important features of the current input features to the output. In the encoding stage, as shown in the following formula, the context vector updated by the feature attention mechanism Combined with previous historical information to output Using these weight coefficients, the updated input variables at each moment are obtained as matrix X = (c1x 1 ,c2x 2 ,…,c N x N ) T ∈R T ×N .

[0071] c N =f attention (x)

[0072]

[0073] The feature attention mechanism is used to update the weights of the input vector and each hidden layer state, so that the temporal coding hidden layer state at each moment contains the corresponding relationship between the predicted target parameter and other feature parameters, thereby obtaining the predicted value of the historical data at the next moment.

[0074] Step 3: Configure network parameters, such as learning rate, number of trainings, etc. Train the prediction model. The training ends when the L(θ) loss function converges. The formula is as follows, where θ represents the network parameter set. and Represent the actual value and predicted value of the target parameter i at time t respectively.

[0075]

[0076] By summing and averaging the root mean square error between the predicted value and the actual value of each target parameter, the overall prediction accuracy of the model can be effectively measured, and it can help optimize the model parameters and reduce overfitting during the training process.

[0077] Step 4: Use the trained prediction model to predict the real-time data. Take the data of the n moments before the predicted moment t+1 as the input sequence, and use the prediction model to predict the indicator parameters at the moment t+1. The formula is as follows:

[0078]

[0079] For the fourth step, please refer to Figure 3 , constructing an isolation forest for anomaly detection, including the following steps:

[0080] Step 1: First, compare the predicted value output by the prediction model with the actual value to calculate the prediction residual. Then, use the Z-score standardization method to standardize the multidimensional prediction residual and influencing factors to ensure that the scales between different features are consistent, which is convenient for subsequent model training.

[0081] Step 2: Build an outlier data recognition model of the isolation forest, and use the multidimensional prediction residual and the influencing factor as input features. The model will implicitly consider the relationship between the input features during training. This relationship will be reflected in the results of the decision tree and reflected in the calculation of the anomaly score. Specifically, the change of the influencing factor will be considered in the calculation of the anomaly score of the sample point. The calculation formula for the updated anomaly score is as follows, where s(x) represents the anomaly score of the data point x, and h t (x) represents the path length of the tth tree, and c(n) is a constant for normalizing the path length, which is used to adjust the differences between input features.

[0082]

[0083] The sliding window technology is used to count the anomaly scores within a period of time, calculate the mean and standard deviation within the window, and dynamically adjust the threshold. In this way, the threshold can be flexibly set as the anomaly distribution changes, improving the model's adaptability to data fluctuations. Assume that at time t, the length of the sliding window is W, and the anomaly score within the window is {s t-W+1 ,s t-W+2 ,…,s t}, after calculating the mean μ in the sliding window t and standard deviation σ t After that, the dynamic threshold formula is as follows, where U t is the threshold set in the current window, and k is a constant, usually 2 or 3, which is used to control the sensitivity of outlier data.

[0084] U t =μ t +k·σ t

[0085] In the case of real-time data update, the mean and standard deviation of the rolling update window can be used to reduce the amount of calculation. Suppose that the anomaly score s is introduced at time t+1 t+1 , and remove the earliest data s in the window t-W+1 , calculated as follows:

[0086]

[0087] Through this recursive approach, the mean and standard deviation can be dynamically adjusted each time the window is updated, reducing the overhead of recalculation while ensuring that the threshold is dynamically adjusted over time to adapt to changes in the distribution of anomaly scores.

[0088] Step 3: Set the hyperparameters of the isolation forest model, including the number of isolated trees, the sampling amount of each tree, the length of the sliding window, etc. The model is trained by gradually adjusting these hyperparameters, and the performance differences under different settings are compared. When evaluating the performance of the model, indicators such as ROC curve and AUC value are used to analyze the accuracy and stability of the model, so as to select the model parameter combination with the best performance.

[0089] Step 4: Use the trained isolation forest model to identify outliers on the prediction residuals. Compare the calculated anomaly score with the threshold. If the anomaly score is greater than the threshold, the data point is considered an outlier.

[0090] In the above embodiments, the description's reference to "this embodiment" indicates that a particular feature, structure, or characteristic described in conjunction with the embodiment is included in at least some embodiments, but not necessarily all embodiments. Multiple occurrences of "this embodiment" do not necessarily all refer to the same embodiment.

[0091] In the above-described embodiments, although the invention has been described in conjunction with specific embodiments of the invention, many substitutions, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art based on the foregoing description. For example, other storage structures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed. Embodiments of the invention are intended to encompass all such substitutions, modifications, and variations that fall within the broad scope of the appended claims.

[0092] This embodiment further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, any one of the methods in this embodiment is implemented.

[0093] This embodiment also provides an electronic terminal, including: a processor and a memory;

[0094] The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the terminal executes any one of the methods in this embodiment.

[0095] The computer-readable storage medium in this embodiment can be understood by ordinary technicians in this field: all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.

[0096] The electronic terminal provided in this embodiment includes a processor, a memory, a transceiver and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication with each other. The memory is used to store computer programs, the communication interface is used to communicate, and the processor and the transceiver are used to run computer programs so that the electronic terminal executes each step of the above method.

[0097] In this embodiment, the memory may include a random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0098] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0099] The present invention can be used in many general or special computing system environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like.

[0100] The present invention may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

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

Claims

1. A multi-factor fusion method for identifying outlier data in the Internet of Things, characterized by: The following steps are involved: S1: Data fusion and preprocessing: determine the target factor to be identified, fuse the various influencing factors associated with it, obtain the corresponding historical data and perform preprocessing; S2: Data correlation analysis: perform correlation analysis on specific indicators in the multi-factor data preprocessed in step S1 to select indicator data that have a significant impact on the target factor and form a final effective indicator combination; S3: Data prediction: Build a prediction model combining LSTM with feature attention mechanism, use the data filtered by correlation analysis to make predictions, output the predicted value for a period of time in the future, and obtain the actual predicted value through denormalization. S4: Outlier data identification: The prediction model is adopted, and the outlier data identification method of multi-factor comprehensive analysis is integrated. The isolation forest algorithm is used for modeling. The prediction residual and influencing factors are used as input features to calculate the anomaly score of each data point. Based on the distribution of anomaly scores, the sliding window technology is used to dynamically set the threshold, and the data points exceeding the threshold are determined as outliers.

2. The multi-factor fusion outlier data identification method of the Internet of Things according to claim 1 is characterized by: Step S1 specifically includes the following steps: S11: Data fusion: In the identification of outlier data in IoT, first determine the target factor to be identified and integrate the various influencing factors associated with it; then obtain the historical data of each factor to form a comprehensive data foundation; S12: Processing of missing values ​​and outliers: The linear interpolation method is used to process the data. When a peak outlier or missing value appears at a certain moment, the linear interpolation function is used to estimate the value at that moment; S13: Standardization: The data is normalized using the extreme value normalization method to eliminate the impact of the dimension; the results output by the prediction model are denormalized to obtain the actual predicted value.

3. The multi-factor fusion outlier data identification method of the Internet of Things according to claim 1 is characterized by: In step S2, the Spearman rank correlation coefficient is used to analyze the correlation between each pair of indicators in view of the nonlinear relationship between different indicators, specifically including: by rank transforming each pair of indicator data to be analyzed, their Spearman rank correlation coefficients are calculated to reflect the strength of the monotonic relationship between the indicators; according to the results of the correlation analysis, the influencing factor indicators that are highly correlated with the main factor indicators are selected, and the indicators that are weakly correlated with the main factors are eliminated, so as to optimize the selection of subsequent model input features.

4. The multi-factor fusion outlier data identification method of the Internet of Things according to claim 1 is characterized by: Step S3 specifically includes the following steps: S31: Divide the preprocessed data into a training set, a test set and a validation set; S32: Construct a prediction model combining LSTM with feature attention mechanism, define the input layer, hidden layer and output layer, construct the data set into a window and use it as the input data of the prediction model for multivariate time series prediction. Suppose the time series of any indicator Y = (y1,…,y T-1 ,y T )∈R T For the prediction target, the index data of each factor at T historical moments are the time series matrix X=(x 1 ,x 2 ,…,x N ) T ∈R T×N , where N represents the dimension of the parameter, including the parameters of each indicator in each factor, Represents the value of the Nth variable at time t; By combining the feature attention mechanism, important variables are weighted in the encoding stage to obtain the importance weight c of each implicit state to the predicted output N , represents the important features of the current input features to the output. In the encoding stage, as shown in the following formula, the context vector updated by the feature attention mechanism Combined with previous historical information to output Using these weight coefficients, the updated input variables at each moment are obtained as matrix X = (c1x 1 ,c2x 2 ,…,c N x N ) T ∈R T×N ; c N =f attention (x) The feature attention mechanism is used to update the weights of the input vector and each hidden layer state, so that the temporal coding hidden layer state at each moment contains the corresponding relationship between the predicted target parameter and other feature parameters, thereby obtaining the predicted value of the historical data at the next moment. S33: Configure network parameters and train the prediction model. The training ends when the L(θ) loss function converges. The formula is as follows: Where θ represents the network parameter set, and Represent the actual value and predicted value of the target parameter i at time t respectively; The root mean square error between the predicted value and the actual value of each target parameter is summed and averaged to measure the overall prediction accuracy of the model; S34: Use the trained prediction model to predict the real-time data, take the data of the n moments before the predicted moment t+1 as the input sequence, and use the prediction model to predict the indicator parameters at the moment t+1. The formula is as follows:

5. The multi-factor fusion outlier data identification method of the Internet of Things according to claim 1 is characterized by: The step S4 comprises the following steps: S41: Compare the predicted value output by the prediction model with the actual value to calculate the prediction residual; use the Z-score standardization method to standardize the multidimensional prediction residual and influencing factors to ensure the consistency of scales between different features; S42: Build an outlier data recognition model of isolation forest, take multidimensional prediction residuals and influencing factors as input features, consider the change of influencing factors in calculating the anomaly score of sample points, and the calculation formula of the updated anomaly score is as follows: Where s(x) represents the anomaly score of data point x, h t (x) represents the path length of the t-th tree, c(n) is a constant for normalizing the path length, which is used to adjust the differences between input features; Using sliding window technology, the anomaly scores within a period of time are counted, the mean and standard deviation within the window are calculated, and the threshold is adjusted dynamically; Assume that at time t, the length of the sliding window is W, and the anomaly score in the window is {s t-W+1 ,s t-W+2 ,...,s t }, after calculating the mean μ in the sliding window t and standard deviation σ t After that, the dynamic threshold formula is as follows: U t =μ t +k·s t Among them U t is the threshold set within the current window, and k is a constant used to control the sensitivity of outlier data; In the case of real-time data update, the mean and standard deviation of the rolling update window are used, and the anomaly score s is introduced at time t+1. t+1 , and remove the earliest data s in the window t-W+1 , calculated as follows: Through this recursive method, the mean and standard deviation are dynamically adjusted each time the window is updated; S43: Set the hyperparameters of the isolation forest model, including the number of isolated trees, the sampling amount of each tree, and the length of the sliding window; train the model by gradually adjusting these hyperparameters and compare the performance differences under different settings; when evaluating the model performance, use the ROC curve and AUC value indicators to analyze the accuracy and stability of the model, so as to select the model parameter combination with the best performance; S44: Use the trained isolation forest model to identify outlier data on the prediction residuals; compare the calculated anomaly score with the threshold, and if the anomaly score is greater than the threshold, determine that the data point is an outlier.

Citation Information

Cited By

  • Road slope stability prediction method and device, storage medium and electronic equipment

    CN120296571A

  • Roadside slope stability prediction method and device, storage medium and electronic equipment

    CN120296571B

  • Centrifugal machine control method and system for soybean protein production

    CN120550951A

  • Lubricating oil aging prediction method based on environmental difference

    CN120671554A

  • Carbon emission trend prediction method and device and nonvolatile storage medium

    CN121072848A