A Multi-Source Sensor Anomaly Detection Method Based on CNN and Attention Mechanism Fusion

By employing a multi-source sensor anomaly detection method that integrates CNN and attention mechanisms, the problems of network attacks and data tampering in unmanned inspection terminals are solved, achieving high-precision anomaly detection and proactive defense, and ensuring data security.

CN123116100APending Publication Date: 2026-11-17STATE GRID ZHEJIANG ELECTRIC POWER CO LTD JIASHAN COUNTY POWER SUPPLY CO
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611530417.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-30
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing technologies have failed to effectively address security threats such as cyberattacks and data tampering of unmanned inspection terminals, and it is difficult to achieve the linkage between anomaly detection from multiple sources of sensors and data security protection.

Method used

A multi-source sensor anomaly detection method based on the fusion of CNN and attention mechanism is adopted. By acquiring multi-source data, normalizing and aligning the timestamps, extracting deep features using CNN and combining the attention mechanism to evaluate the anomaly probability, the anomaly data is encrypted with high strength.

Benefits of technology

It significantly improves the accuracy and real-time performance of anomaly attack detection, reduces the risk of false positives and false negatives, and safeguards the security and privacy of sensitive data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123116100A_ABST
    Figure CN123116100A_ABST
Patent Text Reader

Abstract

This invention patent provides a multi-source sensor anomaly detection method based on the fusion of CNN and attention mechanism, belonging to the field of data processing technology, and applied to power inspection terminals. The method includes: acquiring multi-source data of the power inspection terminal with time series, the multi-source data including attitude data, acceleration data, GPS data, and image data; normalizing the multi-source data and aligning the timestamps; and performing deep joint analysis on the multi-source time series data of the power inspection terminal, such as attitude, acceleration, GPS, and image data, by integrating the local feature extraction capability of CNN with the global dependency modeling capability of attention mechanism. This effectively addresses security threats such as false data injection, sensor spoofing, state tampering, and denial-of-service attacks, significantly improving the detection accuracy and real-time performance of anomaly attacks in complex environments. Furthermore, the method utilizes the attention mechanism to dynamically evaluate the anomaly probability, effectively reducing the risk of false alarms and false negatives.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and specifically to a multi-source sensor anomaly detection method based on the fusion of CNN and attention mechanism. Background Technology

[0002] Real-time data collected by unmanned inspection terminals such as drones and mobile inspection robots during unmanned inspections of power systems will be transmitted back to the system terminal and automatically transmitted status data such as inspection mileage, duration, and geographical location to the external information network. This process carries the risk of leakage of sensitive power data and the occurrence of DOS attacks during data collection. If the data collection stage is subjected to false data injection, sensor deception, status tampering, malicious interference, or denial-of-service attacks, it may lead to distorted inspection status judgment, abnormal flight control, defect identification deviation, and even affect the safety of power equipment and on-site personnel.

[0003] Chinese Patent Publication No. CN119322941B discloses a method for managing inspection data of small unmanned aerial vehicles (UAVs), relating to the field of UAV inspection technology, and used to solve the problem of unclear UAV inspection data management. This invention uses high-precision positioning technology and timestamp synchronization to associate multimodal data collected by the UAV with the equipment location, achieving spatiotemporal consistency of inspection data. It also performs multimodal feature fusion and dimensionality reduction processing to generate a unified feature representation, improving the accuracy and efficiency of data analysis. Combining historical data with real-time collected data, it monitors equipment status in real time, identifies and classifies fault modes and assesses risks, predicts fault development trends through a time series prediction model, generates maintenance suggestions, and improves the timeliness of fault diagnosis. Based on fault detection results, it dynamically optimizes inspection task priority and path planning, generates the optimal inspection route, and corrects the flight path, improving the intelligence and accuracy of inspection tasks and significantly enhancing the efficiency and safety of the UAV inspection system.

[0004] As can be seen from the above, existing technologies focus on monitoring the terminal's own operating status and diagnosing faults. Their detection targets are limited to the terminal's abnormality or data abnormality itself. They do not link the abnormal detection results of multi-source sensors with data security protection measures, making it difficult to effectively deal with security threats such as network attacks and data tampering against power inspection terminals. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a multi-source sensor anomaly detection method based on the fusion of CNN and attention mechanisms, in order to reduce data security threats.

[0006] A preferred embodiment of the present invention provides a multi-source sensor anomaly detection method based on the fusion of CNN and attention mechanism, applied to a power inspection terminal. The method includes:

[0007] Acquire multi-source data from a power inspection terminal with time series data, including attitude data, acceleration data, GPS data, and image data;

[0008] After normalizing the multi-source data, timestamp alignment is performed to form spatiotemporal feature input data arranged along the time series;

[0009] Based on CNN, feature extraction is performed on the spatiotemporal feature input data to obtain deep features;

[0010] Anomaly probability assessment of the deep features is performed based on an attention mechanism;

[0011] If the value of the anomaly probability assessment exceeds the preset threshold range, the spatiotemporal feature input data corresponding to the extracted features will be encrypted with high strength.

[0012] In one embodiment, feature extraction is performed on the spatiotemporal feature input data based on a CNN to obtain deep features, including:

[0013] By sliding a one-dimensional convolutional layer along the time series, local spatiotemporal correlations and abrupt change features of each multi-source data within a certain time period are extracted to obtain deep features;

[0014] The depth features are used to generate a query matrix, a key matrix, and a value matrix through linear projection.

[0015] Calculate the attention weight coefficient matrix between the feature channels and time steps corresponding to the multi-source data, and generate a weighted global dynamic feature representation.

[0016] In one embodiment, anomaly probability assessment of the deep features based on an attention mechanism includes:

[0017] The global dynamic feature representation is input into a fully connected layer to construct a classifier, and the anomaly score of the data corresponding to the feature is calculated.

[0018] The abnormal scores are normalized by a binary or multi-class output layer to calculate the abnormal probability. When the abnormal probability is greater than the dynamic adaptive threshold, an abnormal attack is determined to have occurred.

[0019] In one embodiment, a one-dimensional convolutional layer is used to slide along the time series to extract the local spatiotemporal correlation and abrupt change features of each multi-source data within a certain time period, thereby obtaining deep features. The operation expression of the one-dimensional convolutional layer is as follows:

[0020]

[0021] in, The output depth features of the l-th convolutional layer, For convolution kernel weights, For bias terms, This represents a one-dimensional convolution operation. It is a non-linear activation function.

[0022] In one embodiment, the attention weight coefficient matrix between the corresponding feature channels and time steps of the multi-source data is calculated, and a weighted global dynamic feature representation is generated. The calculation formula is as follows:

[0023]

[0024] Where Z represents the global dynamic feature representation, Q is the query matrix, K is the key matrix, and V is the value matrix. is the dimension of the key vector.

[0025] In one embodiment, the anomaly probability is calculated by normalizing the anomaly score through a binary or multi-class classification output layer. When the anomaly probability is greater than a dynamically adaptive threshold, an anomaly attack is determined to have occurred. The formula for calculating the anomaly probability is as follows:

[0026]

[0027] Where P is the anomaly probability, Z is the global dynamic feature representation, and k is the total number of candidate categories. The result of the weight vector operation corresponding to anomaly category a. The result of the weight vector operation for the k-th class. It is the bias of category a. This is the bias term for the k-th class.

[0028] In one embodiment, the normalization process is calculated using the following formula:

[0029]

[0030] in, The data from the i-th sensor at time t is normalized. This represents the raw observation data of the i-th sensor at time t. and These are the empirical mean and standard deviation of the observations within a historical normal sliding window for the multi-source data, respectively.

[0031] In one embodiment, when calculating the attention weight coefficient matrix, the image feature channels are dynamically weighted according to the degree of blur of the image data; wherein the degree of image blur is positively correlated with the weight of its feature channels.

[0032] As can be seen from the above technical solution, the multi-source sensor anomaly detection method based on the fusion of CNN and attention mechanism provided by the present invention can include the following beneficial effects:

[0033] This application integrates the local feature extraction capability of CNNs with the global dependency modeling capability of attention mechanisms to perform deep joint analysis of multi-source time-series data such as attitude, acceleration, GPS, and images from power inspection terminals. This effectively addresses security threats such as false data injection, sensor spoofing, state tampering, and denial-of-service attacks, significantly improving the detection accuracy and real-time performance of anomaly attacks in complex environments. By dynamically assessing the anomaly probability using the attention mechanism, the risk of false positives and false negatives is effectively reduced. Furthermore, high-strength encryption is immediately implemented for data identified as anomaly, building an active defense barrier from the data source to ensure the security and privacy of sensitive data. This achieves efficient perception, accurate early warning, and proactive defense for data security.

[0034] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this application. Attached Figure Description

[0035] To more clearly illustrate the specific embodiments of the present invention, the accompanying drawings used in the description of the specific embodiments or prior art will be briefly introduced below. In all the drawings, the elements or parts are not necessarily drawn to scale.

[0036] Figure 1 A flowchart of a multi-source sensor anomaly detection method based on the fusion of CNN and attention mechanism provided by the present invention;

[0037] Figure 2 A flowchart of step S300 in a multi-source sensor anomaly detection method based on CNN and attention mechanism fusion provided by the present invention;

[0038] Figure 3 The flowchart of step S400 in the multi-source sensor anomaly detection method based on the fusion of CNN and attention mechanism provided by the present invention. Detailed Implementation

[0039] The embodiments of the technical solution of the present invention will now be described in detail with reference to the accompanying drawings. These embodiments are merely illustrative of the technical solution of the present invention and are therefore intended to limit the scope of protection of the present invention.

[0040] Examples, such as Figure 1-3 As shown, this invention provides a multi-source sensor anomaly detection method based on the fusion of CNN and attention mechanism, applied to a power line inspection terminal, preferably a power line inspection drone equipped with a gyroscope, accelerometer, GPS module, camera, signal transceiver, and processor. The method includes steps S100-S500:

[0041] In step S100, multi-source data with time series from the power inspection terminal is acquired, including attitude data, acceleration data, GPS data, and image data.

[0042] In this implementation, attitude data is collected by a gyroscope, acceleration data by an accelerometer, GPS data by a GPS module and speed data is calculated based on the GPS data, and image data is collected by a camera. It is worth noting that attitude data, acceleration data, and GPS data are all one-dimensional data, while image data itself is two-dimensional data. After processing the image data into one-dimensional data, it is used together with attitude data, acceleration data, and GPS data as multi-source data. Specifically, the Laplacian gradient variance method is used to calculate the high-frequency energy of the image. The lower the high-frequency energy, the higher the image blurriness, and the higher the high-frequency energy, the clearer the image. Thus, the image blurriness of each frame is obtained, and then the image blurriness is substituted into the formula "Image clarity = 1 - blurriness" to convert it into image sharpness.

[0043] In step S200, the multi-source data is normalized and then timestamp aligned to form spatiotemporal feature input data arranged along the time series.

[0044] In this implementation, the raw data collected by each sensor is first normalized to eliminate dimensional differences between different sensors and map each data point to a unified numerical distribution range, making them comparable in the same feature space. Then, using a unified time reference, timestamp alignment is performed on the normalized data. By interpolation or resampling, sensor data of different frequencies are mapped to the same time grid, so that each time step simultaneously includes synchronous observations from all sensors, including attitude, acceleration, GPS, and image. After normalization and timestamp alignment, the sensor data forms a regular arrangement structure in the time dimension. Each time step corresponds to a joint feature vector that integrates multi-source information, and the whole constitutes spatiotemporal feature input data arranged continuously along the time series.

[0045] In step S300, feature extraction is performed on the spatiotemporal feature input data based on CNN to obtain deep features;

[0046] In step S400, the anomaly probability of the deep features is evaluated based on an attention mechanism;

[0047] In this implementation, by leveraging the efficiency of CNN in local feature extraction and the flexibility of attention mechanism in global dependency modeling, it can not only keenly capture local abnormal mutations in multi-source data, but also fully perceive global correlation information across time steps, thereby achieving high-precision detection and low false negative rate of abnormal attacks in complex environments.

[0048] Specifically, the parameters of the CNN and attention mechanism fusion model need to be pre-trained. In one specific embodiment, the model training is carried out as follows: First, a training dataset is constructed, which includes multi-source time-series data collected by power inspection terminals under normal operating conditions and abnormal data under various attack scenarios. The attack types include fake data injection attacks, sensor spoofing attacks, state tampering attacks, and denial-of-service attacks. The training set contains 100,000 normal samples and 10,000 attack samples, with each type of attack sample distributed proportionally. All samples are normalized and timestamp aligned to form a unified spatiotemporal feature input format. During training, the cross-entropy loss function is used as the optimization objective, and the Adam optimizer is used for parameter updates. The initial learning rate is set to 1×10⁻³, the batch size is set to 64, and the training rounds are 100. After each round of training, the model performance is evaluated on the validation set, and the model parameters with the smallest loss value on the validation set are saved as the final training result. The validation set is independent and identically distributed with the training set, and its sample size is approximately 20% of the total number of samples in the training set. An early stopping strategy is also adopted during the training process. Training is terminated early when the loss value of the validation set does not decrease for 10 consecutive training rounds to prevent the model from overfitting. After the above training is completed, the model can be used to evaluate the anomaly probability of multi-source data collected in real time by the power inspection terminal.

[0049] In step S500, if the value of the anomaly probability assessment exceeds the preset threshold range, the spatiotemporal feature input data corresponding to the extracted features is subjected to high-intensity encryption.

[0050] In this implementation, high-strength encryption first uses the SM4 symmetric encryption algorithm to encrypt abnormal data, and then uses the SM4-GCM authentication encryption mode to synchronously generate an integrity verification tag to ensure both data confidentiality and integrity. The session key is transmitted using the SM2 asymmetric encryption algorithm to ensure the security of the key during transmission. After encryption, the encrypted abnormal data and its associated alarm information are published to the server via an MQTT broker. The server receives the ciphertext data by subscribing to the corresponding MQTT topic, first decrypts it using the SM2 private key to obtain the session key, and then uses the session key to decrypt the ciphertext using SM4-GCM. During the decryption process, the integrity verification tag is verified simultaneously. If the verification fails, it is determined that the data has been tampered with, and it is immediately discarded and an alarm is triggered. If the verification passes, the abnormal value is extracted, and finally, the persistent storage, visualization, and manual alarm intervention of the data are completed.

[0051] In one embodiment, such as Figure 2 As shown, in step S300, feature extraction is performed on the spatiotemporal feature input data based on CNN to obtain deep features, including steps S301-S303:

[0052] In step S301, a one-dimensional convolutional layer is used to slide along the time series to extract the local spatiotemporal correlation and abrupt change features of each multi-source data within a certain time period, thereby obtaining deep features;

[0053] In step S302, the depth features are used to generate a query matrix, a key matrix, and a value matrix through linear projection.

[0054] In step S303, the attention weight coefficient matrix between the feature channels and time steps corresponding to the multi-source data is calculated, and a weighted global dynamic feature representation is generated.

[0055] In this implementation, a one-dimensional convolutional layer first slides the convolution kernel along the time series direction to perform convolution operations on multi-source data within each local time window. Through the sliding aggregation of local receptive fields, the correlation and abrupt change features of each sensor data within the local time window are extracted to obtain deep features. Although these deep features encode local spatiotemporal patterns, the long-range dependencies between time steps and the global interactions across channels have not been fully modeled. To address this, the deep features are mapped to a query matrix, a key matrix, and a value matrix through linear projection. The query matrix expresses the information needs of the current time step, the key matrix expresses the information labels carried by each time step, and the value matrix expresses the actual feature content contained in each time step. Subsequently, the similarity between the query matrix and the key matrix is ​​calculated to obtain the attention weight coefficient matrix between time steps. This matrix quantifies the dependence strength of each time step on other time steps. Finally, the weight coefficient matrix and the value matrix are weighted and aggregated so that the output feature of each time step is a weighted sum of the features of all global time steps, thereby generating a global dynamic feature representation that integrates local correlation and global dependency.

[0056] In one embodiment, such as Figure 3 As shown, in step S400, anomaly probability assessment is performed on the deep features based on an attention mechanism, including steps S401-S402:

[0057] In step S401, the global dynamic feature representation is input into the fully connected layer to construct a classifier, and the anomaly score of the data corresponding to the feature is calculated as an attack.

[0058] In step S402, the abnormal score is normalized by a binary or multi-class output layer to solve for the abnormal probability. When the abnormal probability is greater than the dynamic adaptive threshold, it is determined that an abnormal attack has occurred.

[0059] In this implementation, the feature vector is first mapped to anomaly score through a linear transformation using a classifier. This score measures the confidence level that the current feature belongs to an anomaly category. Then, the anomaly score is normalized, compressing it from an unbounded value to a probability range of 0 to 1, resulting in an anomaly probability value with a clear probabilistic meaning. Finally, a dynamic adaptive threshold is used instead of a fixed threshold as a reference value. This threshold is dynamically adjusted in real time based on the anomaly probability distribution of historical normal operation data, current environmental conditions, and false alarm rate requirements. Specifically, it can be calculated using the moving percentile method, the mean plus dynamic offset method, or the exponentially weighted moving average method.

[0060] In one embodiment, in step S301, a one-dimensional convolutional layer is used to slide along the time series to extract the local spatiotemporal correlation and abrupt change features of each multi-source data within a certain time period, thereby obtaining deep features. The operation expression of the one-dimensional convolutional layer is as follows:

[0061]

[0062] in, The output depth features of the l-th convolutional layer, For convolution kernel weights, For bias terms, This represents a one-dimensional convolution operation. It is a non-linear activation function;

[0063] In this implementation, a one-dimensional convolutional layer slides the convolution kernel along the time series direction to perform convolution operations on multi-source data within each local time window: convolution kernel weights... Output from the previous layer The data in the corresponding local window is multiplied element by element and then summed, with the bias term added. This yields a scalar response value; this response value quantifies the degree to which the specific local pattern of interest to the current convolutional kernel matches within that window. The response value is then input into the ReLU nonlinear activation function, where negative values ​​are set to zero and positive values ​​remain unchanged, introducing nonlinear transformation capability into the network, enabling it to fit complex data distributions. The convolutional kernel slides along the time series, repeating the above operation to successively extract the feature responses within each local window, constituting the output depth features of that convolutional layer. Through this sliding mechanism, the feature value of each output position is jointly determined by multi-source data in a local neighborhood of the input sequence, thereby effectively capturing the spatiotemporal correlation and abrupt change patterns of each sensor data within a local time window.

[0064] Specifically, the one-dimensional convolutional layer can adopt a multi-layer structure, wherein the number of convolutional layers, the kernel size of each layer, and the number of channels are determined according to the sampling frequency of the input data and the sensor dimension. In a specific embodiment, three one-dimensional convolutional layers are set, with kernel sizes of 5, 3, and 3, and the number of channels of 64, 128, and 64, respectively, and a stride of 1 for each layer. Each convolutional layer is followed by a ReLU activation function and a batch normalization layer. The first and second convolutional layers are followed by a max pooling layer with a pooling window size of 2 and a stride of 2. The output of the third convolutional layer yields a 128-dimensional depth feature vector, which serves as the input feature for the subsequent attention mechanism. Those skilled in the art will understand that the above values ​​are merely illustrative and do not constitute a limitation on the scope of protection of this solution.

[0065] In one embodiment, in step S303, the attention weight coefficient matrix between the feature channels corresponding to the multi-source data and the time step is calculated, and a weighted global dynamic feature representation is generated. The calculation formula is as follows:

[0066]

[0067] Where Z represents the global dynamic feature representation, Q is the query matrix, K is the key matrix, and V is the value matrix. The dimension of the key vector;

[0068] In this implementation, the deep features are first mapped to a query matrix Q, a key matrix K, and a value matrix V using linear projection. The query matrix Q represents the information requirement at the current time step, the key matrix K represents the information labels carried by each time step, and the value matrix V represents the actual feature content contained in each time step. Then, the dot product between the transposes of the query matrix Q and the key matrix K is calculated to obtain the original attention score matrix between time steps. Each element in this matrix quantifies the dependence strength of one time step on another. To prevent the dot product value from becoming too large due to an increase in the number of feature channels and entering the gradient saturation region of the Softmax function, the dot product result is divided by a scaling factor. The matrix is ​​scaled, and then the scaled score matrix is ​​input into the Softmax function for row-by-row normalization to obtain the attention weight coefficient matrix. The weight values ​​of each row in this matrix are between 0 and 1 and the sum of the values ​​in the row is 1, so that the attention weights at each time step have a clear probabilistic interpretation. Finally, the normalized attention weight coefficient matrix is ​​multiplied by the value matrix V, and the feature information of each time step is aggregated by weighted summation to generate the global dynamic feature representation Z.

[0069] Specifically, the attention mechanism can adopt a multi-head self-attention structure, with 4 attention heads. The 128-dimensional input features are uniformly divided into 4 subspaces along the feature dimensions, each with 32 dimensions. Within each subspace, the original 128-dimensional features are projected into a query matrix Q, a key matrix K, and a value matrix V respectively through independent linear projection matrices (128×64 dimensions). Scaling dot product attention calculations are performed independently within each subspace. The above values ​​are for illustrative purposes only and do not constitute a limitation on the scope of protection of this scheme.

[0070] In one embodiment, in step S402, the anomaly score is normalized and the anomaly probability is calculated using a binary or multi-class classification output layer. When the anomaly probability is greater than a dynamic adaptive threshold, an anomaly attack is determined to have occurred. The formula for calculating the anomaly probability is as follows:

[0071]

[0072] Where P is the anomaly probability, Z is the global dynamic feature representation, and k is the total number of candidate categories. The result of the weight vector operation corresponding to anomaly category a. The result of the weight vector operation for the k-th class. It is the bias of category a. This is the bias term for the k-th class;

[0073] In this implementation, the global dynamic feature representation Z is input into a classifier constructed by a fully connected layer. The classifier calculates an unnormalized anomaly score for each candidate category through a linear transformation. This score measures the confidence level that the current feature belongs to that category. To obtain an interpretable output with probabilistic significance, the Softmax function is used to normalize the scores of all candidate categories: the exponential score of anomaly category a is calculated in the numerator, and the sum of the exponential scores of all k candidate categories is calculated in the denominator. The two are divided to obtain the probability P that the current data belongs to the anomaly category. After normalization, the sum of the probabilities of each candidate category is 1, and the output value is compressed to the range of 0 to 1, which is convenient for subsequent comparison with the preset judgment threshold.

[0074] In one embodiment, in step S200, the calculation formula for the normalization process is:

[0075]

[0076] in, The data from the i-th sensor at time t is normalized. This represents the raw observation data of the i-th sensor at time t. and These are the empirical mean and standard deviation of the observations of this multi-source data within a historical normal sliding window, respectively.

[0077] In this implementation, the raw data collected by each sensor is normalized to eliminate dimensional differences. Specifically, a historical normal sliding window is maintained for each sensor, which stores historical observations of the terminal in a recent normal state. An empirical mean is calculated based on the data within this window. and empirical standard deviation These characters respectively characterize the central tendency and fluctuation degree of the sensor under normal operating conditions; when the i-th sensor collects the raw observation value at time t... Then, subtract the empirical mean of that sensor from the observed value. Then divide by the empirical standard deviation To obtain normalized data After this transformation, all sensor data are mapped to a standard distribution with a mean of 0 and a standard deviation of 1, exhibiting dimensionless differences. This allows sensor data from different physical dimensions to participate in subsequent CNN feature extraction and attention mechanism calculations within the same feature space. Simultaneously, a sliding window approach is used for dynamic updating. and This allows the normalization parameters to adapt to the slow changes in terminal operating conditions or environmental conditions, avoiding normalization distortion caused by fixed parameters.

[0078] In one embodiment, in step S303, when calculating the attention weight coefficient matrix, the image feature channels are dynamically weighted according to the blur level of the image data; wherein, the image blur level is positively correlated with the weight of its feature channels;

[0079] In this implementation, when the power inspection terminal enters a strong interference area such as electromagnetic interference, one-dimensional sensors such as attitude, acceleration, and GPS are easily affected by interference, resulting in numerical drift or distortion. Furthermore, one-dimensional data itself cannot verify its authenticity or error level. If these distorted one-dimensional data are still relied upon with equal weight for anomaly assessment, misjudgment is highly likely. Conversely, image data becomes significantly blurred due to electromagnetic interference. Based on the principle that image blur is positively correlated with the weights of image data feature channels, the attention weights of image data feature channels are automatically increased, while the relative weights of other one-dimensional data feature channels are correspondingly decreased. This makes the anomaly probability more dependent on the image data representation and tends to decrease. Conversely, when the image blur is low, the attention weights of image data feature channels are automatically decreased, while the relative weights of other one-dimensional data feature channels are correspondingly increased. The anomaly probability then relies more on one-dimensional data such as attitude, acceleration, and GPS data. It is worth noting that the positive correlation between image blur and image data feature channel weights can be achieved using a monotonic function. By selecting monotonic functions with different slopes, the sensitivity to strong interference can be adjusted.

[0080] It should be noted that:

[0081] Traditional electromagnetic interference (EMI) detection relies heavily on the simultaneous failure of multiple sensors and abnormal data synchronization. However, this method has inherent flaws. Multi-sensor synchronization anomalies can be caused by both global data degradation due to electromagnetic interference in the field and the possibility of malicious attacks leading to mass data tampering and falsification. Environmental electromagnetic interference in typical areas such as substations and high-voltage transmission lines is a passive, global type of interference. Its inherent characteristic is the simultaneous drift and distortion of one-dimensional sensor data (attitude, acceleration, GPS, etc.) from the inspection terminal, along with a significant increase in the blurriness of the acquired images. This manifests as multi-source data inconsistency degradation and abnormal synchronization between images and sensor data. Such anomalies are acquisition deviations caused by environmental factors, not equipment failures or human intrusion attacks. In stark contrast, malicious data attacks are proactive and targeted tampering, often narrowband attacks, allowing attackers to conduct data manipulation at low cost. While it's possible to batch-forge and tamper with easily manipulated one-dimensional sensor data to quickly create the illusion of synchronized anomalies across multiple sensors, attackers struggle to simultaneously tamper with and forge on-site image imaging information due to the complexity and large amount of information in image imaging data. To simultaneously forge clear, distortion-free images to match the tampered one-dimensional data requires multi-device, multi-frequency band collaborative camouflage interference, making implementation extremely difficult. Therefore, relying on a dynamic matching mechanism of image blur and multi-source feature weights, a clear and reliable differential judgment standard for interference and attacks has been established. This breaks through the limitations of traditional solutions that rely solely on multi-sensor synchronized anomalies to determine interference, easily confusing interference with attacks. It can accurately distinguish between passive environmental interference and active malicious attacks, effectively avoiding false alarms caused by electromagnetic interference, while also accurately identifying hidden data attack behaviors, significantly improving the accuracy and security reliability of power inspection anomaly judgment.

[0082] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0083] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A multi-source sensor anomaly detection method based on the fusion of CNN and attention mechanism, applied to a power line inspection terminal, characterized in that, The method includes: Acquire multi-source data from a power inspection terminal with time series data, including attitude data, acceleration data, GPS data, and image data; After normalizing the multi-source data, timestamp alignment is performed to form spatiotemporal feature input data arranged along the time series; Based on CNN, feature extraction is performed on the spatiotemporal feature input data to obtain deep features; Anomaly probability assessment of the deep features is performed based on an attention mechanism; If the value of the anomaly probability assessment exceeds the preset threshold range, the spatiotemporal feature input data corresponding to the extracted features will be encrypted with high strength. Specifically, deep features are obtained by extracting features from the spatiotemporal feature input data based on CNN, including: By sliding a one-dimensional convolutional layer along the time series, local spatiotemporal correlations and abrupt change features of each multi-source data within a certain time period are extracted to obtain deep features; The depth features are used to generate a query matrix, a key matrix, and a value matrix through linear projection. Calculate the attention weight coefficient matrix between the feature channels and time steps corresponding to the multi-source data, and generate a weighted global dynamic feature representation; when calculating the attention weight coefficient matrix, dynamically weight the image feature channels according to the blur degree of the image data; wherein, the image blur degree is positively correlated with the weight of its feature channels.

2. The method according to claim 1, characterized in that: Anomaly probability assessment of the deep features based on an attention mechanism includes: The global dynamic feature representation is input into a fully connected layer to construct a classifier, and the anomaly score of the data corresponding to the feature is calculated. The abnormal scores are normalized by a binary or multi-class output layer to calculate the abnormal probability. When the abnormal probability is greater than the dynamic adaptive threshold, an abnormal attack is determined to have occurred.

3. The method according to claim 1, characterized in that: By sliding a one-dimensional convolutional layer along the time series, local spatiotemporal correlations and abrupt change features of various multi-source data within a certain time period are extracted to obtain deep features. The operation expression of the one-dimensional convolutional layer is as follows: in, The output depth features of the l-th convolutional layer, For convolution kernel weights, For bias terms, This represents a one-dimensional convolution operation. It is a non-linear activation function.

4. The method according to claim 1, characterized in that: Calculate the attention weight coefficient matrix between the corresponding feature channels and time steps of the multi-source data, and generate a weighted global dynamic feature representation. The calculation formula is as follows: Where Z represents the global dynamic feature representation, Q is the query matrix, K is the key matrix, and V is the value matrix. is the dimension of the key vector.

5. The method according to claim 2, characterized in that: The anomaly probability is calculated by normalizing the anomaly scores using a binary or multi-class classification output layer. When the anomaly probability exceeds a dynamically adaptive threshold, an anomaly attack is determined to have occurred. The formula for calculating the anomaly probability is as follows: Where P is the anomaly probability, Z is the global dynamic feature representation, and k is the total number of candidate categories. The result of the weight vector operation corresponding to anomaly category a. The result of the weight vector operation for the k-th class. It is the bias of category a. This is the bias term for the k-th class.

6. The method according to claim 1, characterized in that: The calculation formula for the normalization process is as follows: in, The data from the i-th sensor at time t is normalized. This represents the raw observation data of the i-th sensor at time t. and These are the empirical mean and standard deviation of the observations within a historical normal sliding window for the multi-source data, respectively.

Citation Information

Patent Citations

  • A small UAV inspection data management method

    CN119322941B