A detection method and system for abnormal nodes of industrial Internet based on weak information

Through detection methods based on weak information, statistics and machine learning algorithms are used to clean and feature extraction of industrial Internet data, and an abnormal node detection model is constructed, which solves the problem of traditional methods being unable to cope with data sparseness and dynamic changes, and improves the accuracy of detection. and model robustness.

CN118432948BActive Publication Date: 2024-09-27YANTAI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410888223.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2024-09-27
Estimated Expiration
2044-07-04

AI Technical Summary

Technical Problem

Traditional anomaly detection methods cannot effectively cope with the characteristics of data sparseness, dynamic changes, and diversity in the industrial Internet environment, and cannot efficiently and accurately detect and handle abnormal nodes, resulting in possible data leaks, equipment damage, and even production accidents during the production process.

Method used

We adopt a detection method based on weak information, clean the data and extract features through statistical methods and machine learning algorithms, and build an abnormal node detection model including linear layer, MLP encoder, Bayesian linear layer and residual link layer, using frequency Domain features and K nearest neighbor algorithm perform feature propagation and graph structure enhancement, and an early stopping strategy is introduced to improve the robustness and generalization ability of the model.

Benefits of technology

In the case of missing data information and structure, the accuracy of abnormal node detection is improved, the cost and time of labeling are reduced, the overall efficiency and robustness of the model are enhanced, and the model can be better used when the training data is insufficient or the distribution changes. Make predictions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118432948B
    Figure CN118432948B
Patent Text Reader

Abstract

The present invention relates to the field of industrial Internet data security technology, and in particular to a detection method and system for abnormal nodes of the industrial Internet based on weak information, including S1. using sensors and equipment in the industrial Internet to obtain data on the operation of related nodes; S2. using statistical methods and machine learning algorithms to clean the data, eliminate noise and outliers, and normalize the data; S3. preliminarily classify the data according to the source, type and application scenario of the data; S4. using frequency domain feature extraction methods to perform Fourier transform on the data; S5. constructing an abnormal node detection model based on weak information; S6. using a test set to test the model. It is achieved that the accuracy of detecting abnormal nodes can be improved in the case of missing data information, missing data structure and incomplete data categories, the cost and time of labeling are reduced, and the overall efficiency of the model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of industrial Internet data security technology, and in particular to a method and system for detecting abnormal nodes in the industrial Internet based on weak information. Background Art

[0002] The development of the industrial Internet is becoming increasingly prominent. A large number of industrial equipment and systems are linked through the network to form a complex industrial Internet architecture. The industrial Internet has played an important role in production efficiency, cost reduction, and intelligent management. Then, with the maturity and development of industrial Internet technology and the increase in system complexity, data security issues have become increasingly prominent.

[0003] Various nodes in the Industrial Internet (such as sensors, controllers, and actuators) may become abnormal during operation due to hardware failure, network attacks, software vulnerabilities, or operational errors. These abnormal nodes will not only affect the normal operation of the production process, but may also cause data leakage, equipment damage, and even production accidents. Therefore, how to efficiently and accurately detect and handle abnormal nodes in the Industrial Internet has become a key technical issue to ensure the safe and stable operation of industrial systems.

[0004] Weak information refers to information that is not obvious or prominent in the Industrial Internet, such as the connection relationship of nodes, communication frequency, data flow, etc. This information does not directly reflect the status of nodes like traditional monitoring indicators, but it can provide clues about node behavior and communication patterns. By analyzing this weak information, abnormal behaviors that are different from normal patterns can be discovered, thereby identifying nodes that may have problems.

[0005] Traditional anomaly detection methods usually rely on complete data information and fixed detection models, which cannot cope with the characteristics of data sparseness, dynamic changes and diversity in the industrial Internet environment. In order to solve this problem, the present invention proposes an industrial Internet abnormal node detection method based on weak information. This method can use advanced feature extraction and model training technology to realize rapid identification and processing of abnormal nodes in the case of incomplete data or limited information, significantly improving the security and reliability of the industrial Internet system. Summary of the invention

[0006] In order to solve the above-mentioned problems, the present invention provides a method and system for detecting abnormal nodes in the industrial Internet based on weak information.

[0007] In the first aspect, the present invention provides a method for detecting abnormal nodes in the industrial Internet based on weak information, which adopts the following technical solution:

[0008] A method for detecting abnormal nodes of an industrial Internet based on weak information comprises the following steps:

[0009] S1. Use sensors and devices in the Industrial Internet to obtain data on the operation of related nodes;

[0010] S2. Use statistical methods and machine learning algorithms to clean the data, eliminate noise and outliers, and normalize the data;

[0011] S3. Preliminarily classify the data according to its source, type and application scenario, refine the data classification according to specific detection requirements, label the refined classified data, obtain data samples, and use the data samples to construct training data sets, verification data sets and test data sets;

[0012] S4. Perform Fourier transform on the data using a frequency domain feature extraction method to extract frequency domain features to obtain weak information image data;

[0013] S5. construct an abnormal node detection model based on weak information, wherein the abnormal node detection model based on weak information includes a linear layer, an MLP encoder, a Bayesian linear layer, and a residual link layer, and the model includes training of the first channel and training of the second channel, and calculates the final training loss of the model and introduces an early stopping strategy to the model;

[0014] S6. Use the test set to test the model, judge the model training results based on the accuracy of the model testing abnormal nodes, and use the trained model to detect abnormal nodes in the Industrial Internet.

[0015] Furthermore, the industrial communication protocols include Modbus and OPC UA.

[0016] Furthermore, the data includes temperature, pressure, current, voltage and operation status data.

[0017] Furthermore, the frequency domain features include spectrum energy, main frequency and harmonic components, and the frequency domain features are used to reveal the periodicity and frequency components of the data.

[0018] Furthermore, the training data set is set to 40% of the data samples, the validation data set samples are set to 30% of the data samples, and the test data set samples are set to 30% of the data samples.

[0019] Furthermore, the training of the first channel comprises the following steps:

[0020] A1. In the first channel, the weak information graph data is transmitted over a long distance, and the original data is enhanced to obtain the final feature matrix;

[0021] A2. The final feature matrix after message propagation is passed to the MLP encoder, and the MLP encoder extracts high-dimensional features from the input features;

[0022] A3. The high-dimensional features enter the first Bayesian linear layer to generate a perturbation tensor with the same shape as the weights and biases. The perturbation tensor is sampled from the standard normal distribution, the standard deviation and the weights and biases actually used are calculated, and the input features are linearly transformed to obtain the output feature Y. The logarithmic prior probability density and logarithmic variational posterior probability density of the current weights and biases are calculated.

[0023] A4. The output feature Y enters the Softmax function to obtain the logarithmic probability. The category with the highest probability is selected as the predicted category of the node.

[0024] Furthermore, in the first channel, the weak information graph data is propagated over long distances, and the original data is enhanced to obtain the final feature matrix. The specific formula is:

[0025] ,

[0026] Among them, X ( k ) represents the feature matrix after the kth iteration, X is the original feature, α is the residual fusion coefficient, and the range is between [0, 1];

[0027] The propagation process starts from k = 1, and after K steps of iteration, the final feature matrix X is obtained. ( k ) , the whole process is expressed as: , update the feature matrix in iteration, propagate features through the adjacency matrix A, and fuse the original feature X through the residual fusion coefficient α.

[0028] Furthermore, the final feature matrix after message propagation is passed to the MLP encoder, and the MLP encoder extracts high-dimensional features from the input features by performing linear transformation and ReLU nonlinear activation on the input features X, and outputting new hidden layer features H, as follows: ,

[0029] in, is the input feature matrix, n is the number of samples, din is the input feature dimension, is the weight matrix of the linear layer, d hid is the hidden layer dimension, is the bias vector of the linear layer, is the output hidden layer feature matrix.

[0030] Furthermore, the calculation of the standard deviation and the actually used weights and biases, and the linear transformation of the input features to obtain the output features Y, and the calculation of the logarithmic prior probability density and the logarithmic variational posterior probability density of the current weights and biases include the following steps:

[0031] A31. Utilization parameters and The standard deviation is calculated by the softplus function, the formula is:

[0032] ,

[0033] ;

[0034] A32. Using the mean parameter of the Bayesian linear layer, combined with the generated perturbation and the calculated standard deviation, the actual weights and biases are calculated as follows:

[0035] ,

[0036] ,

[0037] in, and is the perturbation tensor;

[0038] A33. Using the weights and biases actually used in the calculation, the input features are linearly transformed, and the formula is:

[0039] ,

[0040] Among them, X is the input feature, W and b are the calculated weights and biases, and Y is the output feature;

[0041] A34. Calculate the logarithmic prior probability density and logarithmic variational posterior probability density of the current weight and bias. The logarithmic prior probability density formula is:

[0042] ,

[0043] ,

[0044] The logarithmic variational posterior probability density formula is:

[0045] ,

[0046] .

[0047] Further, the training of the second channel comprises the following steps:

[0048] B1. Compare the original feature X with the propagated feature X propPerform residual connection to obtain fusion features; the formula is: ,

[0049] in, It is the weight factor of the original feature in the residual link;

[0050] B2. Use K nearest neighbor algorithm to enhance the original image structure of fusion features;

[0051] B3. The original matrix X performs long-distance message propagation on the enhanced graph structure to obtain the propagated feature matrix X prop_aug ;

[0052] B4. Feature matrix X after propagation prop_aug Enter the first Bayesian linear layer, generate a perturbation tensor with the same shape as the weights and biases, sample the perturbation tensor from the standard normal distribution, calculate the standard deviation and the weights and biases actually used, perform a linear transformation on the input features to obtain the output feature Y, and calculate the logarithmic prior probability density and logarithmic variational posterior probability density of the current weights and biases;

[0053] B5. The output feature Y enters the Softmax function to obtain the logarithmic probability, and the category with the highest probability is selected as the predicted category of the node.

[0054] Furthermore, the original image structure enhancement using the K nearest neighbor algorithm for the fusion features includes the following steps:

[0055] B21. Construct new edges by calculating the similarity between fused features;

[0056] B22. Input feature X, use K nearest neighbor algorithm to calculate the Euclidean distance between two vectors xi and xj, the formula is: ;

[0057] B23. Calculate the cosine similarity of two vectors x i and x j The cosine value of the angle between is:

[0058] ;

[0059] B24. For each pair of samples (xi, xj), calculate the cosine similarity to obtain an n×n similarity matrix, where n is the number of samples;

[0060] B25. Select the k samples with the highest similarity to each sample in the similarity matrix as neighbors, and construct the adjacency matrix A based on the selected neighbors, where A ij =1 means sample x i With sample x j There is a connection relationship between A ij=0 means sample x i With sample x j There is no connection between them;

[0061] B26. Normalize the adjacency matrix. The formula is: .

[0062] Furthermore, the calculation of the final training loss includes the following steps:

[0063] C1. After the features of the two channels after propagation are passed into the MLP encoder to extract the high-dimensional features, the high-dimensional features of the two channels are compared to generate the prototype alignment loss;

[0064] C2. Construct positive sample logits and negative sample logits, where the logits are the original probability values ​​output by the model, and the positive samples are the original features and enhanced features The similarity between the negative samples is the similarity between the original features and between the original features and the enhanced features, and the positive sample logits is:

[0065] ,

[0066] The negative sample logits are:

[0067] ,

[0068] Among them, sim_clean and sim_aug represent the similarity matrix between the original features and the similarity matrix between the original features and the enhanced features respectively;

[0069] C3. Use the cross entropy loss function to calculate the final loss, the formula is:

[0070] , where T is the temperature parameter, logits divided by the temperature parameter temperature is used to smooth the probability distribution;

[0071] C4. Calculate the final training loss, the formula is: , where L CE represents the cross entropy loss in the first channel, L CEaug represents the cross entropy loss of the second channel, L PA is the prototype alignment loss, where λ CEaug and λ PA is the weight hyperparameter corresponding to the loss.

[0072] Furthermore, the introduction of an early stopping strategy into the model includes the following steps:

[0073] D1. At the beginning of each epoch, the model is trained according to the set training mode, which includes full batch training or small batch training;

[0074] D2. After training is completed, the performance of the model is evaluated on the validation set, the validation loss and accuracy are calculated, and it is checked whether the current validation performance is better than the previous best performance. If the current performance is better than the best performance, the best performance and model status are updated, and the counter is reset. If the current performance is not better than the best performance, the counter is increased by 1. If the counter reaches the threshold, the model training is terminated early.

[0075] Furthermore, if the accuracy is greater than 85%, the model training is completed; if the accuracy is less than 85%, the model training continues until the model training is completed.

[0076] In the second aspect, a detection system for abnormal nodes of the industrial Internet based on weak information includes:

[0077] A data acquisition module is configured to acquire data on the operation of related nodes using sensors and devices in the industrial Internet;

[0078] A data processing module is configured to use statistical methods and machine learning algorithms to clean the data, eliminate noise and outliers, and normalize the data;

[0079] A data set construction module is configured to preliminarily classify the data according to the source, type and application scenario of the data, refine the classification of the data according to specific detection requirements, label the refined classified data, obtain data samples, and use the data samples to construct a training data set, a verification data set and a test data set;

[0080] The feature extraction module is configured to perform Fourier transform on the data using a frequency domain feature extraction method, extract frequency domain features to obtain weak information image data;

[0081] A model training module is configured to build an abnormal node detection model based on weak information, wherein the abnormal node detection model based on weak information includes a linear layer, an MLP encoder, a Bayesian linear layer, and a residual link layer, wherein the model includes training of the first channel and training of the second channel, and calculates a final training loss for the model and introduces an early stopping strategy to the model;

[0082] The model detection module is configured to test the model using a test set, determine the model training results based on the accuracy of the abnormal nodes in the model test, and use the trained model to detect abnormal nodes in the industrial Internet.

[0083] In a third aspect, the present invention provides a computer-readable storage medium storing a plurality of instructions, wherein the instructions are suitable for being loaded and executed by a processor of a terminal device, a method for detecting abnormal nodes in an industrial Internet based on weak information.

[0084] In a fourth aspect, the present invention provides a terminal device comprising a processor and a computer-readable storage medium, the processor being used to implement various instructions; the computer-readable storage medium being used to store multiple instructions, the instructions being suitable for being loaded by the processor and executing the method for detecting abnormal nodes in the industrial Internet based on weak information.

[0085] In summary, the present invention has the following beneficial technical effects:

[0086] 1. The present invention proposes a detection method for abnormal nodes in the industrial Internet based on weak information, which can improve the accuracy of detecting abnormal nodes in the case of missing data information, missing data structure and incomplete data categories, reduce the cost and time of label annotation, and improve the overall efficiency of the model.

[0087] 2. The present invention can utilize the connection relationship between nodes to propagate features and capture global and local information in the graph structure. Through residual links, the model not only retains the original feature information, but also fuses it with the propagated features to enhance feature representation. The uncertainty of parameters is introduced through the Bayesian linear layer to improve the robustness and generalization ability of the model. The Bayesian method can better predict when the training data is insufficient or the distribution changes by probabilistically modeling the parameters. BRIEF DESCRIPTION OF THE DRAWINGS

[0088] Figure 1 It is a flow chart of a method for detecting abnormal nodes in the industrial Internet based on weak information according to Embodiment 1 of the present invention;

[0089] Figure 2 is a single channel model flow chart of Example 1 of the present invention;

[0090] Figure 3 This is a dual-channel model flow chart of Example 1 of the present invention. DETAILED DESCRIPTION

[0091] The present invention is further described in detail below in conjunction with the accompanying drawings.

[0092] Example 1

[0093] Reference Figure 1 , a method for detecting abnormal nodes of the industrial Internet based on weak information in this embodiment includes the following steps:

[0094] S1. Use sensors and devices in the Industrial Internet to obtain data on the operation of related nodes. The industrial communication protocols include Modbus and OPC UA. The data include temperature, pressure, current, voltage and operating status data. The collected data is transmitted to the data processing center in real time through industrial communication protocols (such as Modbus, OPC UA, etc.) to ensure the timeliness and integrity of the data.

[0095] S2. Use statistical methods and machine learning algorithms to clean the data, eliminate noise and outliers, and normalize the data to normalize the data from different sensors to the same scale to facilitate subsequent feature extraction and model training.

[0096] S3. Preliminarily classify the data according to its source, type and application scenario, and refine the data classification according to specific detection requirements. For example, classify temperature data, pressure data, current data, etc. separately to facilitate feature extraction and model training. Label the refined classified data and obtain data samples. Use the data samples to construct training data sets, validation data sets and test data sets. The training data set is set to 40% of the data samples, the validation data set samples are set to 30% of the data samples, and the test data set samples are set to 30% of the data samples.

[0097] S4. Perform Fourier transform on the data using a frequency domain feature extraction method to extract frequency domain features to obtain weak information image data. The frequency domain features include spectrum energy, main frequency, and harmonic components. The frequency domain features are used to reveal the periodicity and frequency components of the data.

[0098] S5. Construct an abnormal node detection model based on weak information, wherein the abnormal node detection model based on weak information includes a linear layer, an MLP encoder, a Bayesian linear layer and a residual link layer, and the model includes training of the first channel and training of the second channel, and calculates the final training loss of the model and introduces an early stopping strategy to the model.

[0099] The training of the first channel comprises the following steps:

[0100] A1. In the first channel, the weak information graph data is transmitted over a long distance, and the original data is enhanced to obtain the final feature matrix;

[0101] In the first channel, the weak information graph data is transmitted over a long distance, and the original data is enhanced to obtain the final feature matrix. The specific formula is:

[0102] ,

[0103] Among them, X ( k )represents the feature matrix after the kth iteration, X is the original feature, α is the residual fusion coefficient, ranging from [0, 1]. The propagation process starts from k = 1, and the final feature matrix X is obtained after k iterations. ( k ) , the whole process is expressed as: , update the feature matrix in iteration, propagate features through the adjacency matrix A, and fuse the original feature X through the residual fusion coefficient α.

[0104] A2. The final feature matrix after message propagation is passed to the MLP encoder, and the high-dimensional features are extracted from the input features by the MLP encoder. The final feature matrix after message propagation is passed to the MLP encoder, and the high-dimensional features are extracted from the input features by the MLP encoder. Specifically, the input feature X is subjected to linear transformation and ReLU nonlinear activation, and a new hidden layer feature H is output. The formula is: ,in, is the input feature matrix, n is the number of samples, din is the input feature dimension, is the weight matrix of the linear layer, d hid is the hidden layer dimension, is the bias vector of the linear layer, is the output hidden layer feature matrix.

[0105] A3. High-dimensional features enter the first Bayesian linear layer, which introduces uncertainty in parameter estimation, provides more robust parameter estimation and better generalization capabilities, and can quantify the uncertainty of predicted values, thereby improving the performance and confidence assessment of the model when processing new data. The model generates a perturbation tensor of the same shape as the weights and biases, which is sampled from a standard normal distribution, calculates the standard deviation and the weights and biases actually used, and linearly transforms the input features to obtain the output feature Y, calculates the logarithmic prior probability density and logarithmic variational posterior probability density of the current weights and biases, including the following steps:

[0106] A31. Utilization parameters and The standard deviation is calculated by the softplus function, the formula is:

[0107] ,

[0108] ;

[0109] A32. Using the mean parameter of the Bayesian linear layer, combined with the generated perturbation and the calculated standard deviation, the actual weights and biases are calculated as follows:

[0110] ,

[0111] ,

[0112] in, and is the perturbation tensor;

[0113] A33. Using the weights and biases actually used in the calculation, the input features are linearly transformed, and the formula is:

[0114] ,

[0115] Among them, X is the input feature, W and b are the calculated weights and biases, and Y is the output feature;

[0116] A34. Calculate the logarithmic prior probability density and logarithmic variational posterior probability density of the current weight and bias. The logarithmic prior probability density formula is:

[0117] ,

[0118] ,

[0119] The logarithmic variational posterior probability density formula is:

[0120] ,

[0121] .

[0122] A4. The output feature Y enters the Softmax function to obtain the logarithmic probability. The category with the highest probability is selected as the predicted category of the node.

[0123] Since long-distance propagation may cause individual independent nodes to be unable to participate in the propagation, resulting in poor model performance, we enhanced the graph structure in the second channel to make the connection between graph structures closer. The training of the second channel includes the following steps:

[0124] B1. Compare the original feature X with the propagated feature X prop Perform residual connection to obtain fusion features; the formula is: ,

[0125] in, It is the weight factor of the original feature in the residual link;

[0126] B2. Use the K nearest neighbor algorithm to enhance the original graph structure of the fused features, and construct new edges by calculating the similarity between the fused features to solve the problem that independent nodes cannot participate in the propagation process, including the following steps:

[0127] B21. Construct new edges by calculating the similarity between fused features;

[0128] B22. Input feature X, use K nearest neighbor algorithm to calculate the Euclidean distance between two vectors xi and xj, the formula is: ;

[0129] B23. Calculate the cosine similarity of two vectors x i and x j The cosine value of the angle between is:

[0130] ;

[0131] B24. For each pair of samples (xi, xj), calculate the cosine similarity to obtain an n×n similarity matrix, where n is the number of samples;

[0132] B25. Select the k samples with the highest similarity to each sample in the similarity matrix as neighbors, and construct the adjacency matrix A based on the selected neighbors, where A ij =1 means sample x i With sample x j There is a connection relationship between A ij =0 means sample x i With sample x j There is no connection between them;

[0133] B26. Normalize the adjacency matrix. The formula is: .

[0134] B3. The original matrix X performs long-distance message propagation on the enhanced graph structure to obtain the propagated feature matrix X prop_aug ;

[0135] B4. Feature matrix X after propagation prop_aug Enter the first Bayesian linear layer, generate a perturbation tensor with the same shape as the weights and biases, sample the perturbation tensor from the standard normal distribution, calculate the standard deviation and the actual weights and biases used, and perform a linear transformation on the input features to obtain the output feature Y, calculate the logarithmic prior probability density and logarithmic variational posterior probability density of the current weights and biases, the steps are as follows:

[0136] B41. Using parameters and The standard deviation is calculated by the softplus function, the formula is:

[0137] ,

[0138] ;

[0139] B42. Using the mean parameter of the Bayesian linear layer, combined with the generated disturbance and the calculated standard deviation, the actual weights and biases are calculated as follows:

[0140] ,

[0141] ,

[0142] in, and is the perturbation tensor;

[0143] B43. Use the weights and biases actually used in the calculation to perform a linear transformation on the input features. The formula is:

[0144] ,

[0145] Among them, X is the input feature, W and b are the calculated weights and biases, and Y is the output feature;

[0146] B44. Calculate the logarithmic prior probability density and logarithmic variational posterior probability density of the current weight and bias. The formula for the logarithmic prior probability density is:

[0147] ,

[0148] ,

[0149] The logarithmic variational posterior probability density formula is:

[0150] ,

[0151]

[0152] B5. The output feature Y enters the Softmax function to obtain the logarithmic probability, and the category with the highest probability is selected as the predicted category of the node.

[0153] The calculation of the final training loss includes the following steps:

[0154] C1. After the features of the two channels after propagation are passed into the MLP encoder to extract high-dimensional features, the high-dimensional features of the two channels are compared to generate prototype alignment loss. The main function of designing prototype alignment loss is to align the representations between propagation features without graph structure enhancement and propagation features with structure enhancement, thereby improving the model's invariance and robustness to data enhancement. The model first normalizes the features to eliminate the dimensional differences of the feature vectors, making it easier to compare using cosine similarity. Calculate the similarity matrix between the original features and the enhanced features. Use a mask to remove diagonal elements (i.e., the similarity between the sample and itself);

[0155] C2. Construct positive sample logits and negative sample logits, where the logits are the original probability values ​​output by the model, and the positive samples are the original features and enhanced features The negative samples are the similarities between the original features and between the original features and the enhanced features. This design is to ensure that the feature representations of the same data point in different enhanced situations are as close as possible, while the feature representations of different data points are as different as possible.

[0156] The positive sample logits are:

[0157] ,

[0158] The negative sample logits are:

[0159] ,

[0160] Among them, sim_clean and sim_aug represent the similarity matrix between the original features and the similarity matrix between the original features and the enhanced features respectively;

[0161] C3. Use the cross entropy loss function to calculate the final loss, the formula is:

[0162] , where T is the temperature parameter, logits divided by the temperature parameter temperature is used to smooth the probability distribution;

[0163] C4. Calculate the final training loss, the formula is: , where L CE represents the cross entropy loss in the first channel, L CEaug represents the cross entropy loss of the second channel, L PA is the prototype alignment loss, where λ CEaug and λ PA is the weight hyperparameter corresponding to the loss.

[0164] In order to avoid unnecessary waste of resources and prevent model overfitting, we apply an early stopping strategy in the model. When the performance on the validation set does not improve within several consecutive training cycles (epochs), the training process will be terminated early to select the model with the best performance. The introduction of the early stopping strategy to the model includes the following steps:

[0165] D1. At the beginning of each epoch, the model is trained according to the set training mode, which includes full batch training or small batch training;

[0166] D2. After training is completed, the performance of the model is evaluated on the validation set, the validation loss and accuracy are calculated, and it is checked whether the current validation performance is better than the previous best performance. If the current performance is better than the best performance, the best performance and model status are updated, and the counter is reset. If the current performance is not better than the best performance, the counter is increased by 1. If the counter reaches the threshold, the model training is terminated early.

[0167] S6. Use the test set to test the model, judge the model training result according to the accuracy of the model test abnormal nodes, and use the trained model to detect abnormal nodes of the Industrial Internet. If the accuracy is greater than 85%, the model training is completed. If the accuracy is less than 85%, continue the model training until the model training is completed.

[0168] Example 2

[0169] This embodiment provides a system, a detection system for abnormal nodes of the industrial Internet based on weak information, including:

[0170] A data acquisition module is configured to acquire data on the operation of related nodes using sensors and devices in the industrial Internet;

[0171] A data processing module is configured to use statistical methods and machine learning algorithms to clean the data, eliminate noise and outliers, and normalize the data;

[0172] A data set construction module is configured to preliminarily classify the data according to the source, type and application scenario of the data, refine the classification of the data according to specific detection requirements, label the refined classified data, obtain data samples, and use the data samples to construct a training data set, a verification data set and a test data set;

[0173] The feature extraction module is configured to perform Fourier transform on the data using a frequency domain feature extraction method, extract frequency domain features to obtain weak information image data;

[0174] A model training module is configured to build an abnormal node detection model based on weak information, wherein the abnormal node detection model based on weak information includes a linear layer, an MLP encoder, a Bayesian linear layer, and a residual link layer, wherein the model includes training of the first channel and training of the second channel, and calculates a final training loss for the model and introduces an early stopping strategy to the model;

[0175] The model detection module is configured to test the model using a test set, determine the model training results based on the accuracy of the abnormal nodes in the model test, and use the trained model to detect abnormal nodes in the industrial Internet.

[0176] A computer-readable storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded and executed by a processor of a terminal device, a method for detecting abnormal nodes in the industrial Internet based on weak information.

[0177] A terminal device includes a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; the computer-readable storage medium is used to store multiple instructions, and the instructions are suitable for being loaded and executed by the processor to implement a method for detecting abnormal nodes in the industrial Internet based on weak information.

[0178] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A detection method for abnormal nodes in the industrial Internet based on weak information. It is characterized in that The following steps are involved: S1. Use sensors and devices in the Industrial Internet to obtain data on the operation of related nodes; S2. Use statistical methods and machine learning algorithms to clean the data, eliminate noise and outliers, and normalize the data; S3. Preliminarily classify the data according to its source, type and application scenario, refine the data classification according to specific detection requirements, label the refined classified data, obtain data samples, and use the data samples to construct training data sets, verification data sets and test data sets; S4. Perform Fourier transform on the data using a frequency domain feature extraction method to extract frequency domain features to obtain weak information image data; S5. construct an abnormal node detection model based on weak information, wherein the abnormal node detection model based on weak information includes a linear layer, an MLP encoder, a Bayesian linear layer, and a residual link layer, and the model includes training of the first channel and training of the second channel, and calculates the final training loss of the model and introduces an early stopping strategy to the model; The training of the first channel comprises the following steps: A1. In the first channel, the weak information graph data is transmitted over a long distance, and the original data is enhanced to obtain the final feature matrix. The specific formula is: , Among them, X ( k ) represents the feature matrix after the kth iteration, X is the original feature, α is the residual fusion coefficient, and the range is between [0, 1]; The propagation process starts from k = 1, and after k steps of iteration, the final feature matrix X is obtained. ( k ) , the whole process is expressed as: , update the feature matrix in iteration, propagate features through the adjacency matrix A, and fuse the original feature X through the residual fusion coefficient α; A2. The final feature matrix after message propagation is passed to the MLP encoder, and the MLP encoder extracts high-dimensional features from the input features; A3. The high-dimensional features enter the first Bayesian linear layer to generate a perturbation tensor with the same shape as the weights and biases. The perturbation tensor is sampled from the standard normal distribution, the standard deviation and the weights and biases actually used are calculated, and the input features are linearly transformed to obtain the output feature Y. The logarithmic prior probability density and logarithmic variational posterior probability density of the current weights and biases are calculated. A4. Output feature Y enters the Softmax function to obtain the logarithmic probability, and the category with the highest probability is selected as the predicted category of the node; S6. Use the test set to test the model, judge the model training results based on the accuracy of the model testing abnormal nodes, and use the trained model to detect abnormal nodes in the Industrial Internet.

2. According to the method for detecting abnormal nodes of the industrial Internet based on weak information according to claim 1, It is characterized in that The calculation of the standard deviation and the actually used weights and biases, and the linear transformation of the input features to obtain the output features Y, and the calculation of the logarithmic prior probability density and the logarithmic variational posterior probability density of the current weights and biases include the following steps: A31. Utilization parameters and The standard deviation is calculated by the softplus function, the formula is: , ; A32. Using the mean parameter of the Bayesian linear layer, combined with the generated perturbation and the calculated standard deviation, the actual weights and biases are calculated as follows: , , in, and is the perturbation tensor, represents the mean parameter; A33. Using the weights and biases actually used in the calculation, the input features are linearly transformed, and the formula is: , Among them, X is the input feature, W and b are the calculated weights and biases, and Y is the output feature; A34. Calculate the logarithmic prior probability density and logarithmic variational posterior probability density of the current weight and bias. The logarithmic prior probability density formula is: , , The logarithmic variational posterior probability density formula is: , 。 3. According to the method for detecting abnormal nodes of industrial Internet based on weak information according to claim 1, It is characterized in that The training of the second channel comprises the following steps: B1. Compare the original feature X with the propagated feature X prop Perform residual connection to obtain fusion features; the formula is: , in, It is the weight factor of the original feature in the residual link; B2. Use K nearest neighbor algorithm to enhance the original image structure of fusion features; B3. The original matrix X performs long-distance message propagation on the enhanced graph structure to obtain the propagated feature matrix X prop_aug ; B4. Feature matrix X after propagation prop_aug Enter the first Bayesian linear layer, generate a perturbation tensor with the same shape as the weights and biases, sample the perturbation tensor from the standard normal distribution, calculate the standard deviation and the weights and biases actually used, perform a linear transformation on the input features to obtain the output feature Y, and calculate the logarithmic prior probability density and logarithmic variational posterior probability density of the current weights and biases; B5. The output feature Y enters the Softmax function to obtain the logarithmic probability, and the category with the highest probability is selected as the predicted category of the node.

4. According to the method for detecting abnormal nodes of the industrial Internet based on weak information according to claim 1, It is characterized in that The method of enhancing the original image structure by using the K nearest neighbor algorithm to perform fusion features includes the following steps: B21. Construct new edges by calculating the similarity between fused features; B22. Input feature X, use K nearest neighbor algorithm to calculate the Euclidean distance between two vectors xi and xj, the formula is: ; B23. Calculate the cosine similarity of two vectors x i and x j The cosine value of the angle between is: ; B24. For each pair of samples (xi, xj), calculate the cosine similarity to obtain an n×n similarity matrix, where n is the number of samples; B25. Select the k samples with the highest similarity to each sample in the similarity matrix as neighbors, and construct the adjacency matrix A based on the selected neighbors, where A ij =1 means sample x i With sample x j There is a connection relationship between A ij =0 means sample x i With sample x j There is no connection between them; B26. Normalize the adjacency matrix. The formula is: , where D represents the degree matrix.

5. According to the method for detecting abnormal nodes of industrial Internet based on weak information according to claim 1, It is characterized in that The calculation of the final training loss includes the following steps: C1. After the features of the two channels after propagation are passed into the MLP encoder to extract the high-dimensional features, the high-dimensional features of the two channels are compared to generate the prototype alignment loss; C2. Construct positive sample logits and negative sample logits, where the logits represent the original probability value output by the model, and the positive sample is the original feature and the enhanced feature The similarity between the negative samples is the similarity between the original features and between the original features and the enhanced features, and the positive sample logits is: , The negative sample logits are: , Among them, sim_clean and sim_aug represent the similarity matrix between the original features and the similarity matrix between the original features and the enhanced features respectively, and dim represents the dimension; C3. Use the cross entropy loss function to calculate the final loss, the formula is: , where T is the temperature parameter, logits divided by the temperature parameter T is used to smooth the probability distribution, Represents the label of the data sample; C4. Calculate the final training loss, the formula is: , where L CE represents the cross entropy loss in the first channel, L CEaug represents the cross entropy loss of the second channel, L PA is the prototype alignment loss, where λ CEaug and λ PA is the weight hyperparameter corresponding to the loss.

6. A detection system for abnormal nodes in the industrial Internet based on weak information, include: A data acquisition module is configured to acquire data on the operation of related nodes using sensors and devices in the industrial Internet; A data processing module is configured to use statistical methods and machine learning algorithms to clean the data, eliminate noise and outliers, and normalize the data; A data set construction module is configured to preliminarily classify the data according to the source, type and application scenario of the data, refine the classification of the data according to specific detection requirements, label the refined classified data, obtain data samples, and use the data samples to construct a training data set, a verification data set and a test data set; The feature extraction module is configured to perform Fourier transform on the data using a frequency domain feature extraction method, extract frequency domain features to obtain weak information image data; A model training module is configured to build an abnormal node detection model based on weak information, wherein the abnormal node detection model based on weak information includes a linear layer, an MLP encoder, a Bayesian linear layer, and a residual link layer, wherein the model includes training of the first channel and training of the second channel, and calculates a final training loss for the model and introduces an early stopping strategy to the model; The training of the first channel comprises the following steps: A1. In the first channel, the weak information graph data is transmitted over a long distance, and the original data is enhanced to obtain the final feature matrix. The specific formula is: , Among them, X ( k ) represents the feature matrix after the kth iteration, X is the original feature, α is the residual fusion coefficient, and the range is between [0, 1]; The propagation process starts from k = 1, and after k steps of iteration, the final feature matrix X is obtained. ( k ) , the whole process is expressed as: , update the feature matrix in iteration, propagate features through the adjacency matrix A, and fuse the original feature X through the residual fusion coefficient α; A2. The final feature matrix after message propagation is passed to the MLP encoder, and the MLP encoder extracts high-dimensional features from the input features; A3. The high-dimensional features enter the first Bayesian linear layer to generate a perturbation tensor with the same shape as the weights and biases. The perturbation tensor is sampled from the standard normal distribution, the standard deviation and the weights and biases actually used are calculated, and the input features are linearly transformed to obtain the output feature Y. The logarithmic prior probability density and logarithmic variational posterior probability density of the current weights and biases are calculated. A4. Output feature Y enters the Softmax function to obtain the logarithmic probability, and the category with the highest probability is selected as the predicted category of the node; The model detection module is configured to test the model using a test set, determine the model training results based on the accuracy of the abnormal nodes in the model test, and use the trained model to detect abnormal nodes in the industrial Internet.

7. A computer-readable storage medium having a plurality of instructions stored therein, It is characterized in that The instructions are suitable for being loaded by a processor of a terminal device and executing the method according to claim 1 .

8. A terminal device, comprising a processor and a computer-readable storage medium, wherein the processor is used to implement each instruction; and the computer-readable storage medium is used to store multiple instructions. It is characterized in that The instructions are suitable for being loaded by a processor and executing the method as claimed in claim 1 .