Insulator contamination degree detection method, device, equipment, storage medium and program product
By using a pollution degree identification model based on a self-attention mechanism to process the full-band spectral data of insulators, the problem of low efficiency in traditional detection methods is solved, and efficient and accurate detection of insulator pollution degree is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD
- Filing Date
- 2026-03-27
- Publication Date
- 2026-06-23
AI Technical Summary
Traditional methods for detecting insulator pollution are inefficient, complex, and costly. Traditional convolutional neural networks are limited in their ability to extract information over long distances, resulting in low accuracy in pollution prediction.
A pollution level identification model employing a self-attention mechanism acquires full-band spectral data of insulators, performs linear projection and segmentation processing using a pre-trained pollution level identification model, and combines multi-level coding layers and self-attention operations to determine the degree of influence between multiple sets of spectral features, thereby achieving the detection of salt content and ash content.
It improves the accuracy of insulator pollution prediction results, enhances the model's ability to extract spectral data, and improves detection efficiency and accuracy.
Smart Images

Figure CN122260055A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electrical equipment technology, and in particular to a method, apparatus, equipment, storage medium, and program product for detecting the pollution level of insulators. Background Technology
[0002] Insulators are widely used in electrical equipment systems, playing a vital role in insulation and support. Since insulators typically operate outdoors, over time, a layer of contaminants gradually accumulates on their surfaces. This contaminant layer, especially during rainy weather, can become conductive, leading to insulation breakdown and causing significant damage and economic losses to the entire power grid. To reduce the occurrence of such situations, the power grid needs to regularly assess the contamination status of these insulators and develop appropriate cleaning plans to reduce the frequency of insulator breakdown.
[0003] Traditional insulator pollution detection technologies mainly include five methods: equivalent salt density method, pollution layer conductivity method, pollution flashover voltage gradient method, pulse counting method, and leakage current method. However, traditional detection methods that use electrical parameters such as conductivity, voltage gradient, and leakage current as characteristic quantities generally suffer from low efficiency, complex processes, and high costs, making it impossible to achieve accurate and efficient live-line detection of pollution levels in large-scale line insulators. In recent years, non-contact detection methods combining optical detection technology with deep learning have received widespread attention. Among them, hyperspectral technology can simultaneously extract reflectance information of materials across multiple wavelengths. Combined with convolutional neural network models with powerful feature extraction capabilities, quantitative detection of insulator pollution levels has been achieved.
[0004] However, traditional convolutional neural networks are limited by their receptive field in their ability to extract long-range information and have a poor ability to extract overall trend information of curves, resulting in low accuracy in predicting the pollution level of insulators. Summary of the Invention
[0005] Therefore, it is necessary to provide a method, apparatus, equipment, storage medium, and program product for detecting insulator pollution degree that can improve the prediction accuracy of insulator pollution degree in response to the above-mentioned technical problems.
[0006] In a first aspect, this application provides a method for detecting the pollution level of an insulator, comprising:
[0007] Acquire full-band spectral data of insulators;
[0008] A pre-trained pollution degree recognition model is used to perform linear projection and segmentation processing on full-band spectral data to obtain multiple sets of spectral features. Self-attention operation is then performed to determine the degree of influence between the multiple sets of spectral features. Based on the multiple sets of spectral features and the degree of influence, detection is performed to obtain pollution degree detection results. The pollution degree detection results include at least one of the salt content and ash content of the insulator.
[0009] In one embodiment, the soiliness identification model includes a mapping module and a multi-level coding layer. The pre-trained soiliness identification model performs self-attention operations on full-band spectral data to obtain the degree of influence between multiple sets of spectral features, including:
[0010] The full-band spectral data is mapped using a mapping module to obtain a spectral feature sequence; the spectral feature sequence contains multiple sets of spectral features.
[0011] A multi-level coding layer is used to perform linear projection and segmentation processing on the spectral feature sequence to obtain multiple sets of spectral features, and self-attention operation is performed to determine the degree of influence between the multiple sets of spectral features.
[0012] In one embodiment, the multi-level coding layer includes N coding layers. The multi-level coding layer is used to perform linear projection and segmentation processing on the spectral feature sequence to obtain multiple sets of spectral features. Self-attention operations are then performed to determine the degree of influence between the multiple sets of spectral features, including:
[0013] The spectral feature sequence is input into the first coding layer for linear projection and segmentation to obtain the first set of multiple spectral features. Self-attention operation is then performed to determine the degree of influence between the first set of multiple spectral features, resulting in the first spectral feature extraction sequence.
[0014] The i-th spectral feature extraction sequence is input into the (i+1)-th coding layer for linear projection and segmentation to obtain the i-th set of multiple spectral features. Self-attention operation is then performed to determine the degree of influence between the i-th set of multiple spectral features, thus obtaining the i-th spectral feature extraction sequence. This process continues until the N-th coding layer outputs the N-th spectral feature extraction sequence, where i is a positive integer greater than 1.
[0015] In one embodiment, the coding layer includes a multi-head attention unit and a feedforward neural network unit. The i-th spectral feature extraction sequence is input into the (i+1)-th coding layer for linear projection and segmentation processing to obtain the i-th set of multiple spectral features. Self-attention operations are then performed to determine the degree of influence between the i-th set of multiple spectral features, resulting in the i-th spectral feature extraction sequence, including:
[0016] The i-th spectral feature sequence is input into a multi-head attention unit for linear projection and segmentation to obtain the i-th set of multiple spectral features, and self-attention operation is performed to determine the degree of influence between the i-th set of multiple spectral features.
[0017] The i-th set of spectral features and their influence levels are input into the feedforward neural network unit for nonlinear transformation to obtain the i-th spectral feature extraction sequence.
[0018] In one embodiment, the mapping module includes a linear projection unit and a position encoding unit. The mapping module is used to map the full-band spectral data to obtain a spectral feature sequence, including:
[0019] Full-band spectral data is input into a linear projection unit for mapping processing to obtain a spectral data sequence.
[0020] The spectral data sequence is input into the position coding unit for labeling processing to obtain the spectral feature sequence.
[0021] In one embodiment, acquiring full-band spectral data of the insulator includes:
[0022] Acquire hyperspectral images of insulators;
[0023] Region screening is performed on the hyperspectral images of insulators to obtain the effective regions in the hyperspectral images;
[0024] Reflectance correction is performed on the effective region in the hyperspectral image, and data is extracted from the corrected spectral image to obtain the full-band spectral data of the insulator.
[0025] Secondly, this application also provides an insulator pollution detection device, comprising:
[0026] The acquisition module is used to acquire full-band spectral data of insulators;
[0027] The detection module is used to perform linear projection processing and segmentation processing on the full-band spectral data using a pre-trained pollution degree recognition model to obtain multiple sets of spectral features, perform self-attention operation to determine the degree of influence between the multiple sets of spectral features, and perform detection based on the multiple sets of spectral features and the degree of influence to obtain pollution degree detection results; wherein, the pollution degree detection results include at least one of the salt content and ash content of the insulator.
[0028] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0029] Acquire full-band spectral data of insulators;
[0030] A pre-trained pollution degree recognition model is used to perform linear projection and segmentation processing on full-band spectral data to obtain multiple sets of spectral features. Self-attention operation is then performed to determine the degree of influence between the multiple sets of spectral features. Based on the multiple sets of spectral features and the degree of influence, detection is performed to obtain pollution degree detection results. The pollution degree detection results include at least one of the salt content and ash content of the insulator.
[0031] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0032] Acquire full-band spectral data of insulators;
[0033] A pre-trained pollution degree recognition model is used to perform linear projection and segmentation processing on full-band spectral data to obtain multiple sets of spectral features. Self-attention operation is then performed to determine the degree of influence between the multiple sets of spectral features. Based on the multiple sets of spectral features and the degree of influence, detection is performed to obtain pollution degree detection results. The pollution degree detection results include at least one of the salt content and ash content of the insulator.
[0034] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0035] Acquire full-band spectral data of insulators;
[0036] A pre-trained pollution degree recognition model is used to perform linear projection and segmentation processing on full-band spectral data to obtain multiple sets of spectral features. Self-attention operation is then performed to determine the degree of influence between the multiple sets of spectral features. Based on the multiple sets of spectral features and the degree of influence, detection is performed to obtain pollution degree detection results. The pollution degree detection results include at least one of the salt content and ash content of the insulator.
[0037] The aforementioned method, apparatus, equipment, storage medium, and program products for detecting insulator pollution acquire full-band spectral data of the insulator; utilize a pre-trained pollution identification model to perform linear projection and segmentation processing on the full-band spectral data to obtain multiple sets of spectral features; perform self-attention operations to determine the degree of influence between the multiple sets of spectral features; and perform detection based on the multiple sets of spectral features and the degree of influence to obtain the pollution detection result; wherein, the pollution detection result includes at least one of the salt content and ash content of the insulator. By employing self-attention operations to determine the degree of influence between spectral features, multi-dimensional representation of a single feature in the spectral data is achieved, and prediction is performed by combining multiple sets of spectral features, enhancing the model's ability to extract spectral line data and improving the accuracy of pollution prediction results. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 This is an internal structural diagram of a computer device in one embodiment;
[0040] Figure 2 This is a flowchart illustrating a method for detecting the contamination level of an insulator in one embodiment;
[0041] Figure 3 This is a schematic diagram illustrating the process of processing spectral data using a dirtiness identification model in one embodiment.
[0042] Figure 4 This is a schematic diagram illustrating the process of processing spectral data using a dirtiness identification model in another embodiment;
[0043] Figure 5 This is a schematic diagram illustrating the process of processing spectral data using the coding layer of a dirtiness identification model in one embodiment;
[0044] Figure 6 This is a schematic diagram illustrating the process of processing spectral data using the mapping module of a dirtiness identification model in one embodiment;
[0045] Figure 7 This is a schematic diagram of the process for obtaining full-band spectral data of an insulator in one embodiment;
[0046] Figure 8 This is a flowchart illustrating a method for detecting insulator contamination in another embodiment;
[0047] Figure 9 This is a schematic diagram of the structure of a soiliness identification model in one embodiment;
[0048] Figure 10 This is a structural block diagram of an insulator pollution detection device in one embodiment. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0050] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0051] Insulators are widely used in electrical equipment systems, playing a vital role in insulation and support. Since insulators typically operate outdoors, over time, a layer of contaminants gradually accumulates on their surfaces. This contaminant layer, especially during rainy weather, can become conductive, leading to breakdown of the insulation and causing significant damage and economic losses to the entire power grid. To reduce the occurrence of such situations, the power grid needs to regularly assess the contamination status of these insulators and develop reasonable cleaning plans to reduce the frequency of insulator breakdown. Traditional insulator contamination detection techniques mainly include five methods: equivalent salt density method, contaminant conductivity method, contaminant flashover voltage gradient method, pulse counting method, and leakage current method. However, traditional detection methods that use electrical parameters such as conductivity, voltage gradient, and leakage current as characteristic quantities generally suffer from low efficiency, complex processes, and high costs, making it impossible to achieve accurate and efficient live-line detection of the contamination level of insulators on a large scale. In recent years, non-contact detection methods combining optical detection technology with deep learning have received widespread attention. Among them, hyperspectral technology can simultaneously extract reflectance information of materials across multiple wavelengths. Combined with convolutional neural network models, which have powerful feature extraction capabilities, quantitative detection of insulator pollution levels has been achieved. However, traditional convolutional neural networks are limited by their receptive field in extracting long-range information and have poor ability to extract overall trend information of curves, resulting in low accuracy in predicting insulator pollution levels.
[0052] In view of the above-mentioned technical problems, this application provides a method for detecting insulator pollution degree that can improve the accuracy of insulator pollution degree prediction results. The following embodiments will specifically illustrate the method for detecting insulator pollution degree.
[0053] The insulator pollution detection method provided in this application embodiment can be applied to, for example... Figure 1 The computer device shown can be a server, and its internal structure diagram can be as follows: Figure 1As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores full-band spectral images of insulators. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a method for detecting the pollution level of insulators.
[0054] Those skilled in the art will understand that Figure 1 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0055] In one exemplary embodiment, such as Figure 2 As shown, a method for detecting the pollution level of insulators is provided. This embodiment illustrates the application of this method to computer equipment. In this embodiment, the method includes:
[0056] S201, acquire full-band spectral data of the insulator.
[0057] In the embodiments of this application, when detecting the pollution level of an insulator, pre-stored hyperspectral images can be obtained from a database, and a series of preprocessing steps can be performed on the hyperspectral images to obtain full-band spectral data. Preprocessing includes, but is not limited to, smoothing / derivative transformation, standard normal variable transformation, multiplicative scattering correction, Fourier transform, wavelet transform, orthogonal signal correction, and background subtraction.
[0058] Alternatively, hyperspectral imagery can be acquired from a drone wirelessly connected to a computer device. The drone takes real-time images of the insulator surface of the transmission line and saves the captured hyperspectral images. The computer device then acquires the corresponding hyperspectral images from the drone according to the scene requirements and performs a series of preprocessing steps to obtain full-band spectral data.
[0059] S202 uses a pre-trained dirtiness recognition model to perform linear projection and segmentation processing on the full-band spectral data to obtain multiple sets of spectral features, performs self-attention operation to determine the degree of influence between the multiple sets of spectral features, and performs detection based on the multiple sets of spectral features and the degree of influence to obtain dirtiness detection results.
[0060] The pollution level detection results include at least one of the salt content and ash content of the insulator. The pollution level identification model can be an improved transformer model.
[0061] In the embodiments of this application, the computer device can acquire a large amount of sample data containing full-band spectral data, and train an initial pollution level identification model based on the sample data to obtain a trained pollution level identification model. The trained pollution level identification model is then stored in the computer device's database. When the computer device acquires full-band spectral data based on the aforementioned step S201, it can directly retrieve the pollution level identification model from the database and input the full-band spectral data into the pollution level identification model for identification, thereby obtaining at least one of the salt content and ash content of the insulator.
[0062] Optionally, two pollution level identification models can be set independently: a first pollution level identification model and a second pollution level identification model. When identifying full-band spectral data, the first pollution level identification model can be used to perform linear projection processing and segmentation processing on the full-band spectral data to obtain multiple sets of spectral features. Self-attention operations are then performed to determine the degree of influence between these multiple sets of spectral features. Based on the multiple sets of spectral features and their degree of influence, detection is performed to obtain the salt content of the insulator. Similarly, the second pollution level identification model is used to perform linear projection processing and segmentation processing on the full-band spectral data to obtain multiple sets of spectral features. Self-attention operations are then performed to determine the degree of influence between these multiple sets of spectral features. Based on the multiple sets of spectral features and their degree of influence, detection is performed to obtain the ash content of the insulator. The identification order of the first and second pollution level identification models is not restricted; they can be executed simultaneously or sequentially, depending on the actual scenario requirements.
[0063] Optionally, a pollution level identification model can be integrated, comprising two sub-models: a first pollution level identification sub-model and a second pollution level identification sub-model. Full-band spectral data is used as input data, partially or entirely input into the first pollution level identification sub-model for linear projection and segmentation processing to obtain multiple sets of spectral features. Self-attention operations are then performed to determine the degree of influence between these multiple sets of spectral features. Based on the multiple sets of spectral features and their influence, detection is performed to obtain the salt content of the insulator. Similarly, partially or entirely input into the second pollution level identification sub-model for linear projection and segmentation processing to obtain multiple sets of spectral features. Self-attention operations are then performed to determine the degree of influence between these multiple sets of spectral features. Based on the multiple sets of spectral features and their influence, detection is performed to obtain the ash content of the insulator.
[0064] The aforementioned method for detecting insulator pollution involves acquiring full-band spectral data of the insulator; using a pre-trained pollution identification model, linear projection and segmentation are applied to the full-band spectral data to obtain multiple sets of spectral features; self-attention computation is performed to determine the degree of influence between these multiple sets of spectral features; and detection is then performed based on these multiple sets of spectral features and their degree of influence to obtain the pollution detection result. The pollution detection result includes at least one of the insulator's salt content and ash content. By employing self-attention computation to determine the degree of influence between spectral features, a multi-dimensional representation of a single feature in the spectral data is achieved. Combining multiple sets of spectral features for prediction enhances the model's ability to extract spectral line data and improves the accuracy of pollution prediction results.
[0065] In one exemplary embodiment, such as Figure 3 As shown, the soiliness identification model includes a mapping module and a multi-level coding layer. It utilizes a pre-trained soiliness identification model to perform self-attention operations on full-band spectral data to obtain the degree of influence between multiple sets of spectral features, including:
[0066] S301 uses the mapping module to map the full-band spectral data to obtain the spectral feature sequence.
[0067] The spectral feature sequence contains multiple sets of spectral features. The mapping module maps full-band spectral data from a low-dimensional space to a high-dimensional space through linear transformation. For example, it maps from 256 dimensions to 512 dimensions.
[0068] In the embodiments of this application, the mapping module includes a linear projection layer. The computer device can input full-band spectral data into the linear projection layer for linear transformation to obtain a spectral feature sequence.
[0069] Optionally, the mapping module includes a linear projection layer and a position encoding layer. The computer device can first input the full-band spectral data into the linear projection layer for linear transformation to obtain an initial spectral feature sequence. The initial spectral feature sequence includes multiple spectral features. Then, the initial spectral feature sequence is position encoded by the position encoding layer to obtain the spectral feature sequence.
[0070] S302 uses a multi-level coding layer to perform linear projection and segmentation processing on the spectral feature sequence to obtain multiple sets of spectral features, and performs self-attention operation to determine the degree of influence between the multiple sets of spectral features.
[0071] The multi-level coding layer can be up to four levels. The coding layers are connected sequentially, with the output data of one layer serving as the input data for the next. Each coding layer extracts features from the spectral feature sequence, with the number of extracted features gradually increasing with each extraction operation, meaning the last coding layer outputs the most spectral features.
[0072] In the embodiments of this application, the multi-level coding layer can be configured with segmentation processing operations and self-attention operation operations. The computer device can input the spectral feature sequence into the multi-level coding layer. The multi-level coding layer first segments the spectral feature sequence into multiple groups of spectral features, and then performs self-attention operation on the multiple groups of spectral features to obtain the degree of influence between the multiple groups of spectral features.
[0073] Optionally, the multi-level coding layer can also be configured with linear projection processing operations, segmentation processing operations, and self-attention operations. The computer device can input the spectral feature sequence into the multi-level coding layer. The multi-level coding layer first performs a linear projection operation on the spectral feature sequence, i.e., a linear transformation, to obtain the transformed spectral feature sequence; then it performs a segmentation processing operation on the transformed spectral feature sequence to obtain multiple sets of spectral features; finally, it performs self-attention operations on the multiple sets of spectral features to obtain the degree of influence between the multiple sets of spectral features.
[0074] By setting up multiple coding layers, the feature extraction capability of the model is enhanced, and the prediction of insulator pollution degree is improved by combining the internal self-attention operation mechanism.
[0075] In one exemplary embodiment, such as Figure 4 As shown, the multi-level coding layer includes N coding layers. The multi-level coding layer is used to perform linear projection and segmentation processing on the spectral feature sequence to obtain multiple sets of spectral features. Self-attention operations are then performed to determine the degree of influence between these multiple sets of spectral features, including:
[0076] S401, the spectral feature sequence is input into the first coding layer for linear projection processing and segmentation processing to obtain the first set of multiple spectral features, and self-attention operation is performed to determine the degree of influence between the first set of multiple spectral features to obtain the first spectral extraction feature sequence.
[0077] In the embodiments of this application, the computer device can input the spectral feature sequence into the first coding layer. The first coding layer first divides the spectral feature sequence into the first set of multiple spectral features, and then performs self-attention operation on the first set of multiple spectral features to obtain the degree of influence between the first set of multiple spectral features. The spectral features of the associated group are weighted according to the degree of influence to obtain the first spectral extraction feature sequence.
[0078] Optionally, the computer device can also input the spectral feature sequence into the first coding layer. The first coding layer first performs a linear transformation on the spectral feature sequence to obtain the first transformed spectral feature sequence. Then, the first transformed spectral feature sequence is divided into the first set of multiple spectral features. Then, self-attention operation is performed on the first set of multiple spectral features to obtain the degree of influence between the first set of multiple spectral features. The spectral features of the associated group are weighted according to the degree of influence to obtain the first spectral extraction feature sequence.
[0079] S402, the i-th spectral feature extraction sequence is input into the (i+1)-th coding layer for linear projection and segmentation processing to obtain the i-th multiple spectral features, and self-attention operation is performed to determine the degree of influence between the i-th multiple spectral features to obtain the i-th spectral feature extraction sequence, until the N-th coding layer outputs the N-th spectral feature extraction sequence.
[0080] Where i is a positive integer greater than 1, and N can be 4.
[0081] In the embodiments of this application, after obtaining the first spectral feature extraction sequence, the computer device inputs the first spectral feature extraction sequence into the second coding layer. The second coding layer first divides the spectral feature sequence into a second set of multiple spectral features, and then performs self-attention operation on the second set of multiple spectral features to obtain the degree of influence between the second set of multiple spectral features. The spectral features of the associated group are then weighted based on this degree of influence to obtain the second spectral feature extraction sequence. The computer device inputs the second spectral feature extraction sequence into the third coding layer. The third coding layer first divides the spectral feature sequence into a third set of multiple spectral features, and then performs self-attention operation on the third set of multiple spectral features to obtain the degree of influence between the third set of multiple spectral features. The spectral features of the associated group are then weighted based on this degree of influence to obtain the third spectral feature extraction sequence. The computer device inputs the third spectral feature extraction sequence into the fourth coding layer. The fourth coding layer first divides the spectral feature sequence into the fourth set of multiple spectral features, and then performs self-attention operation on the fourth set of multiple spectral features to obtain the degree of influence between the fourth set of multiple spectral features. The spectral features of the associated group are weighted according to the degree of influence to obtain the fourth spectral feature extraction sequence.
[0082] Optionally, after obtaining the first spectral feature extraction sequence, the computer device inputs the first spectral feature extraction sequence into the second coding layer. The second coding layer first performs a linear transformation on the spectral feature sequence to obtain a second transformed spectral feature sequence. Then, the second transformed spectral feature sequence is divided into a second set of spectral features. A self-attention operation is then performed on the second set of spectral features to obtain the degree of influence between the second set of spectral features. This degree of influence is used to weight the spectral features of the associated groups to obtain the second spectral feature extraction sequence. The computer device then inputs the second spectral feature extraction sequence into the third coding layer. The third coding layer first performs a linear transformation on the spectral feature sequence to obtain a third transformed spectral feature sequence. Then, the third transformed spectral feature sequence is divided into a third set of spectral features. A self-attention operation is then performed on the third set of spectral features to obtain the degree of influence between the third set of spectral features. This degree of influence is used to weight the spectral features of the associated groups to obtain the third spectral feature extraction sequence. The computer device inputs the third spectral feature extraction sequence into the fourth coding layer. The fourth coding layer first performs a linear transformation on the spectral feature sequence to obtain the fourth transformed spectral feature sequence. Then, the fourth transformed spectral feature sequence is divided into a fourth set of multiple spectral features. Self-attention operation is then performed on the fourth set of multiple spectral features to obtain the degree of influence between the fourth set of multiple spectral features. The spectral features of the associated groups are weighted according to this degree of influence to obtain the fourth spectral feature extraction sequence.
[0083] By setting up multiple coding layers, the feature extraction capability of the model is enhanced, and the prediction of insulator pollution degree is improved by combining the internal self-attention operation mechanism.
[0084] In one exemplary embodiment, such as Figure 5 As shown, the encoding layer includes a multi-head attention unit and a feedforward neural network unit. The i-th spectral feature extraction sequence is input into the (i+1)-th encoding layer for linear projection and segmentation processing to obtain the i-th set of multiple spectral features. Self-attention operations are then performed to determine the degree of influence between the i-th set of multiple spectral features, resulting in the i-th spectral feature extraction sequence, including:
[0085] S501, the i-th spectral feature extraction sequence is input into the multi-head attention unit for linear projection processing and segmentation processing to obtain the i-th multi-group spectral features, and self-attention operation is performed to determine the degree of influence between the i-th multi-group spectral features.
[0086] Among them, the multi-head attention unit can be a network structure that integrates multiple parallel linear projection layers with multiple attention heads that operate according to the multi-head attention mechanism.
[0087] In the embodiments of this application, for each coding layer, after the i-th spectral feature extraction sequence is input to the (i+1)-th coding layer, the multi-head attention unit of the (i+1)-th coding layer divides the i-th spectral feature extraction sequence into the i-th multiple sets of spectral features through multiple parallel linear projection layers. Each attention head corresponds to a set of spectral features. Each attention head independently calculates the scaled dot product attention of the corresponding set of spectral features with other sets of spectral features, that is, calculates the similarity score between the query vector of the corresponding set of spectral features and the key vector of other sets of spectral features, and performs weighted aggregation on the calculated similarity to obtain the value vector of the corresponding set. This value vector represents the degree of influence between the spectral features of the corresponding set and other sets of spectral features.
[0088] Optionally, a first normalization layer can be set after the multi-head attention unit. The computer device inputs the i-th set of spectral features and the degree of influence between the i-th set of spectral features into the first normalization layer for normalization, that is, subtracting the mean from the input data and dividing the result by the standard deviation. It should be noted that during the initial training of the dirtiness recognition model, the normalized spectral feature sequence can also be scaled and translated, which achieves stable training, accelerates convergence, alleviates the internal covariate shift problem, makes the activation value distribution more stable, allows the use of a larger learning rate, and improves the robustness of the model to changes in the input amplitude.
[0089] S502, the i-th set of spectral features and influence degree are input into the feedforward neural network unit for nonlinear transformation to obtain the i-th spectral feature extraction sequence.
[0090] The feedforward neural network unit can consist of two fully connected layers and a non-linear activation function.
[0091] In the embodiments of this application, after the computer device inputs the i-th set of spectral features and the degree of influence into the feedforward neural network unit, since the degree of influence appears as a weight of the spectral features, the processing object is only focused on the set of spectral features. The two fully connected layers of the feedforward neural network unit perform a linear transformation on the i-th set of spectral features to obtain the transformed set of spectral features; then, a nonlinear activation function is used to perform a nonlinear transformation on the transformed set of spectral features to obtain the i-th spectral feature extraction sequence.
[0092] Optionally, a second normalization layer can be added after the feedforward neural network unit. The computer device inputs the i-th spectral feature sequence into the second normalization layer for normalization, that is, subtracting the mean from the input data and dividing the result by the standard deviation. It should be noted that during the initial training of the dirtiness recognition model, the normalized spectral feature sequence can also be scaled and translated, which achieves stable training, accelerates convergence, alleviates the internal covariate shift problem, makes the activation value distribution more stable, allows the use of a larger learning rate, and improves the robustness of the model to changes in the input amplitude.
[0093] Optionally, the dirtiness identification model also includes a linear layer. The computer device can input the feature sequence extracted from the i-th spectrum into the linear layer for prediction, that is, weight the feature sequence extracted from the i-th spectrum and perform a sum operation with a preset bias factor to obtain the dirtiness detection result.
[0094] By implementing a multi-head attention unit, the model can focus on information from different positions within the input sequence. This multi-head design allows the model to simultaneously focus on information from different subspaces of the input sequence, significantly enhancing its feature extraction and expressive capabilities. Furthermore, by incorporating a feedforward neural network unit to perform more complex spatial transformations, feature extraction, and dimensionality adjustments on the combined features at each position, the model gains stronger representational power and the ability to fit complex functions, thereby improving the accuracy of insulator pollution prediction results.
[0095] In one exemplary embodiment, such as Figure 6 As shown, the mapping module includes a linear projection unit and a position encoding unit. The mapping module is used to map the full-band spectral data to obtain a spectral feature sequence, including:
[0096] S601 inputs full-band spectral data into a linear projection unit for mapping processing to obtain a spectral data sequence.
[0097] Among them, the linear projection unit can be a linear projection layer.
[0098] In the embodiments of this application, the computer device inputs full-band spectral data into the linear projection unit, and the linear projection unit performs multiplication processing on the full-band spectral data based on a preset projection matrix to obtain a spectral data sequence.
[0099] S602, the spectral data sequence is input into the position encoding unit for marking processing to obtain the spectral feature sequence.
[0100] In the embodiments of this application, after the computer device inputs the spectral data sequence into the position encoding unit, the position encoding unit marks the spectral features by position or order based on the layout of each spectral feature in the sequence. For example, the position identifier of the first spectral feature is set to "1", and the position identifier of the i-th spectral feature is set to "i".
[0101] By setting a linear projection layer, spectral data is projected onto the high-dimensional space required for subsequent feature extraction operations, thereby enhancing the richness of spectral features. Furthermore, by setting a position encoding unit to calibrate the position of each spectral feature, accurate positioning of each spectral feature can be achieved in subsequent feature extraction operations. The combination of these two approaches improves the accuracy of insulator pollution prediction results.
[0102] In one exemplary embodiment, such as Figure 7 As shown, the full-band spectral data of the insulator is obtained, including:
[0103] S701, acquire hyperspectral images of insulators.
[0104] In the embodiments of this application, when detecting the pollution level of insulators, pre-stored hyperspectral images can be obtained from a database, or hyperspectral images can be obtained from a drone wirelessly connected to a computer device. The drone takes real-time pictures of the insulator surface of the transmission line and saves the captured hyperspectral images. The computer device then retrieves the corresponding hyperspectral images from the drone according to the scenario requirements.
[0105] Optionally, a sample cloth containing dirt accumulated on the insulator can be obtained, and then a darkroom environment can be constructed to capture a hyperspectral image of the sample cloth containing dirt accumulated on the insulator, thereby obtaining a hyperspectral image of the insulator.
[0106] S702, perform region screening on the hyperspectral image of the insulator to obtain the effective region in the hyperspectral image.
[0107] In the embodiments of this application, for the acquired hyperspectral image of the insulator, the computer device can determine the background region from the hyperspectral image, exclude the data of the background region, and take the remaining data of the hyperspectral image as the valid region.
[0108] S703 performs reflectance correction on the effective area in the hyperspectral image and extracts data from the corrected spectral image to obtain the full-band spectral data of the insulator.
[0109] In the embodiments of this application, when the computer device performs reflectance correction on the effective area in the hyperspectral image, it can perform radiometric correction, radiometric calibration, atmospheric correction, topographic correction and reflectance calculation on the effective area to obtain the corrected spectral image, and extract spectral data of different bands from the corrected spectral image to obtain the full-band spectral data of the insulator.
[0110] Optionally, in the early stages of training the soiliness identification model, the pre-processed full-band spectral reflectance data can be divided into training and testing sets according to the spectral partitioning ratio. Then, the network parameters, i.e., the weights and biases of the feature extraction network and regression layer, are randomly initialized. The initial soiliness identification model is then trained based on the training set, using mean squared error as the loss function to calculate the error between the predicted value and the true label. Simultaneously, an optimizer is used to update the network parameters, accelerating the training process through adaptive learning rate adjustment, so that the regression model exhibits better predictive performance on the data.
[0111] By performing preprocessing operations such as region screening and reflectivity correction on hyperspectral images, the effective spectral information is highlighted, which is beneficial to improving the accuracy of subsequent insulator pollution degree prediction results.
[0112] In addition to the methods described in all the above embodiments, a method for detecting the pollution level of insulators is also provided, such as... Figure 8 As shown, the method includes:
[0113] S801, acquire hyperspectral images of insulators;
[0114] S802, perform region filtering on the hyperspectral image of the insulator to obtain the effective region in the hyperspectral image;
[0115] S803 performs reflectance correction on the effective area in the hyperspectral image and extracts data from the corrected spectral image to obtain the full-band spectral data of the insulator.
[0116] S804 inputs the full-band spectral data into the linear projection unit of the contamination level identification model for mapping processing to obtain the spectral data sequence; the structure of the contamination level identification model is as follows: Figure 9 As shown;
[0117] S805, the spectral data sequence is input into the location encoding unit of the dirtiness identification model for labeling processing to obtain the spectral feature sequence; wherein, the spectral feature sequence contains multiple sets of spectral features;
[0118] S806, the spectral feature sequence is input into the first coding layer for linear projection processing and segmentation processing to obtain the first set of multiple spectral features, and self-attention operation is performed to determine the degree of influence between the first set of multiple spectral features to obtain the first spectral feature extraction sequence;
[0119] S807, the i-th spectral feature extraction sequence is input into the multi-head attention unit of the (i+1)-th coding layer of the dirtiness identification model for linear projection and segmentation processing to obtain the i-th multiple spectral features, and self-attention operation is performed to determine the degree of influence between the i-th multiple spectral features;
[0120] S808 inputs the i-th set of spectral features and influence levels into the feedforward neural network unit for nonlinear transformation to obtain the i-th spectral feature extraction sequence, until the N-th coding layer outputs the N-th spectral feature extraction sequence; where i is a positive integer greater than 1, and N can be 4;
[0121] S809, based on the linear projection layer of the pollution degree identification model, multiple sets of spectral features and influence levels are detected to obtain pollution degree detection results; wherein, the pollution degree detection results include at least one of the salt content and ash content of the insulator.
[0122] Each of the above steps has been described in the foregoing embodiments. For details, please refer to the foregoing content. They will not be repeated here.
[0123] To evaluate the effectiveness of the pollution degree identification model constructed in this application, a certain number of insulator sampling cloth hyperspectral data were collected. After preprocessing and labeling, a quantitative monitoring dataset of insulator pollution degree was formed. This dataset was then input into the insulator pollution degree detection model (RES) based on residual convolution structure and the insulator pollution degree detection model (TF) based on multi-head attention mechanism, respectively. The root mean square error, mean absolute error, coefficient of determination, and minimum deviation in both positive and negative directions on the validation set samples were used as evaluation indicators.
[0124] During the experiment, the datasets were divided into training and validation sets in a 7:3 ratio. The model training epochs were set to 200, and the Adam optimizer was used. The stepLR scheduler was used, with the initial learning rate set to 0.001 and decaying to 0.8 every fifty training epochs. The MSE loss function was used.
[0125] The pollution detection model proposed in this application shows better detection performance on the insulator pollution dataset. The specific relevant parameters are shown in Table 1.
[0126] Table 1. Detection performance parameters of different contamination detection models
[0127]
[0128] As shown in Table 1 above, the pollution detection model based on the multi-head attention mechanism constructed in this invention outperforms the insulator pollution detection model based on the residual convolution structure in all three regression model evaluation metrics: MSE, MAE, and R2. This application also uses maximum bias to evaluate the model's performance. Table 1 shows that the pollution detection model based on the multi-head attention mechanism has smaller bias on both the training and validation sets, especially on the validation set where the bias in both positive and negative directions is smaller than that of the insulator pollution detection model based on the residual convolution structure.
[0129] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0130] Based on the same inventive concept, this application also provides an insulator pollution degree detection device for implementing the insulator pollution degree detection method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations of one or more insulator pollution degree detection device embodiments provided below can be found in the limitations of the insulator pollution degree detection method described above, and will not be repeated here.
[0131] In one exemplary embodiment, such as Figure 10 As shown, an insulator pollution detection device is provided, comprising: an acquisition module 1001 and a detection module 1002, wherein:
[0132] The acquisition module 1001 is used to acquire the full-band spectral data of the insulator;
[0133] The detection module 1002 is used to perform linear projection processing and segmentation processing on the full-band spectral data using a pre-trained pollution degree recognition model to obtain multiple sets of spectral features, perform self-attention operation to determine the degree of influence between the multiple sets of spectral features, and perform detection based on the multiple sets of spectral features and the degree of influence to obtain pollution degree detection results; wherein, the pollution degree detection results include at least one of the salt content and ash content of the insulator.
[0134] In an exemplary embodiment, the detection module 1002 described above is specifically used for:
[0135] The full-band spectral data is mapped using a mapping module to obtain a spectral feature sequence; the spectral feature sequence contains multiple sets of spectral features.
[0136] A multi-level coding layer is used to perform linear projection and segmentation processing on the spectral feature sequence to obtain multiple sets of spectral features, and self-attention operation is performed to determine the degree of influence between the multiple sets of spectral features.
[0137] In an exemplary embodiment, the detection module 1002 described above is specifically used for:
[0138] The spectral feature sequence is input into the first coding layer for linear projection and segmentation to obtain the first set of multiple spectral features. Self-attention operation is then performed to determine the degree of influence between the first set of multiple spectral features, resulting in the first spectral feature extraction sequence.
[0139] The i-th spectral feature extraction sequence is input into the (i+1)-th coding layer for linear projection and segmentation to obtain the i-th set of multiple spectral features. Self-attention operation is then performed to determine the degree of influence between the i-th set of multiple spectral features, thus obtaining the i-th spectral feature extraction sequence. This process continues until the N-th coding layer outputs the N-th spectral feature extraction sequence, where i is a positive integer greater than 1.
[0140] In an exemplary embodiment, the detection module 1002 described above is specifically used for:
[0141] The i-th spectral feature sequence is input into a multi-head attention unit for linear projection and segmentation to obtain the i-th set of multiple spectral features, and self-attention operation is performed to determine the degree of influence between the i-th set of multiple spectral features.
[0142] The i-th set of spectral features and their influence levels are input into the feedforward neural network unit for nonlinear transformation to obtain the i-th spectral feature extraction sequence.
[0143] In an exemplary embodiment, the detection module 1002 described above is specifically used for:
[0144] Full-band spectral data is input into a linear projection unit for mapping processing to obtain a spectral data sequence.
[0145] The spectral data sequence is input into the position coding unit for labeling processing to obtain the spectral feature sequence.
[0146] In an exemplary embodiment, the acquisition module 1001 described above is specifically used for:
[0147] Acquire hyperspectral images of insulators;
[0148] Region screening is performed on the hyperspectral images of insulators to obtain the effective regions in the hyperspectral images;
[0149] Reflectance correction is performed on the effective region in the hyperspectral image, and data is extracted from the corrected spectral image to obtain the full-band spectral data of the insulator.
[0150] Each module in the aforementioned insulator pollution detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0151] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, performs the following steps:
[0152] Acquire full-band spectral data of insulators;
[0153] A pre-trained pollution degree recognition model is used to perform linear projection and segmentation processing on full-band spectral data to obtain multiple sets of spectral features. Self-attention operation is then performed to determine the degree of influence between the multiple sets of spectral features. Based on the multiple sets of spectral features and the degree of influence, detection is performed to obtain pollution degree detection results. The pollution degree detection results include at least one of the salt content and ash content of the insulator.
[0154] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0155] The full-band spectral data is mapped using a mapping module to obtain a spectral feature sequence; the spectral feature sequence contains multiple sets of spectral features.
[0156] A multi-level coding layer is used to perform linear projection and segmentation processing on the spectral feature sequence to obtain multiple sets of spectral features, and self-attention operation is performed to determine the degree of influence between the multiple sets of spectral features.
[0157] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0158] The spectral feature sequence is input into the first coding layer for linear projection and segmentation to obtain the first set of multiple spectral features. Self-attention operation is then performed to determine the degree of influence between the first set of multiple spectral features, resulting in the first spectral feature extraction sequence.
[0159] The i-th spectral feature extraction sequence is input into the (i+1)-th coding layer for linear projection and segmentation to obtain the i-th set of multiple spectral features. Self-attention operation is then performed to determine the degree of influence between the i-th set of multiple spectral features, thus obtaining the i-th spectral feature extraction sequence. This process continues until the N-th coding layer outputs the N-th spectral feature extraction sequence, where i is a positive integer greater than 1.
[0160] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0161] The i-th spectral feature sequence is input into a multi-head attention unit for linear projection and segmentation to obtain the i-th set of multiple spectral features, and self-attention operation is performed to determine the degree of influence between the i-th set of multiple spectral features.
[0162] The i-th set of spectral features and their influence levels are input into the feedforward neural network unit for nonlinear transformation to obtain the i-th spectral feature extraction sequence.
[0163] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0164] Full-band spectral data is input into a linear projection unit for mapping processing to obtain a spectral data sequence.
[0165] The spectral data sequence is input into the position coding unit for labeling processing to obtain the spectral feature sequence.
[0166] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0167] Acquire hyperspectral images of insulators;
[0168] Region screening is performed on the hyperspectral images of insulators to obtain the effective regions in the hyperspectral images;
[0169] Reflectance correction is performed on the effective region in the hyperspectral image, and data is extracted from the corrected spectral image to obtain the full-band spectral data of the insulator.
[0170] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0171] Acquire full-band spectral data of insulators;
[0172] A pre-trained pollution degree recognition model is used to perform linear projection and segmentation processing on full-band spectral data to obtain multiple sets of spectral features. Self-attention operation is then performed to determine the degree of influence between the multiple sets of spectral features. Based on the multiple sets of spectral features and the degree of influence, detection is performed to obtain pollution degree detection results. The pollution degree detection results include at least one of the salt content and ash content of the insulator.
[0173] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0174] The full-band spectral data is mapped using a mapping module to obtain a spectral feature sequence; the spectral feature sequence contains multiple sets of spectral features.
[0175] A multi-level coding layer is used to perform linear projection and segmentation processing on the spectral feature sequence to obtain multiple sets of spectral features, and self-attention operation is performed to determine the degree of influence between the multiple sets of spectral features.
[0176] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0177] The spectral feature sequence is input into the first coding layer for linear projection and segmentation to obtain the first set of multiple spectral features. Self-attention operation is then performed to determine the degree of influence between the first set of multiple spectral features, resulting in the first spectral feature extraction sequence.
[0178] The i-th spectral feature extraction sequence is input into the (i+1)-th coding layer for linear projection and segmentation to obtain the i-th set of multiple spectral features. Self-attention operation is then performed to determine the degree of influence between the i-th set of multiple spectral features, thus obtaining the i-th spectral feature extraction sequence. This process continues until the N-th coding layer outputs the N-th spectral feature extraction sequence, where i is a positive integer greater than 1.
[0179] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0180] The i-th spectral feature sequence is input into a multi-head attention unit for linear projection and segmentation to obtain the i-th set of multiple spectral features, and self-attention operation is performed to determine the degree of influence between the i-th set of multiple spectral features.
[0181] The i-th set of spectral features and their influence levels are input into the feedforward neural network unit for nonlinear transformation to obtain the i-th spectral feature extraction sequence.
[0182] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0183] Full-band spectral data is input into a linear projection unit for mapping processing to obtain a spectral data sequence.
[0184] The spectral data sequence is input into the position coding unit for labeling processing to obtain the spectral feature sequence.
[0185] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0186] Acquire hyperspectral images of insulators;
[0187] Region screening is performed on the hyperspectral images of insulators to obtain the effective regions in the hyperspectral images;
[0188] Reflectance correction is performed on the effective region in the hyperspectral image, and data is extracted from the corrected spectral image to obtain the full-band spectral data of the insulator.
[0189] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0190] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0191] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0192] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for detecting the pollution level of an insulator, characterized in that, The method includes: Acquire full-band spectral data of insulators; A pre-trained pollution level identification model is used to perform linear projection and segmentation processing on the full-band spectral data to obtain multiple sets of spectral features. Self-attention operation is then performed to determine the degree of influence between the multiple sets of spectral features. Based on the multiple sets of spectral features and the degree of influence, a pollution level detection result is obtained. The pollution level detection result includes at least one of the salt content and ash content of the insulator.
2. The method according to claim 1, characterized in that, The soiliness identification model includes a mapping module and a multi-level coding layer. The pre-trained soiliness identification model performs self-attention operations on the full-band spectral data to obtain the degree of influence between multiple sets of spectral features, including: The full-band spectral data is mapped using the mapping module to obtain a spectral feature sequence; wherein the spectral feature sequence contains multiple sets of spectral features; The multi-level coding layer is used to perform linear projection and segmentation processing on the spectral feature sequence to obtain multiple sets of spectral features, and self-attention operation is performed to determine the degree of influence between the multiple sets of spectral features.
3. The method according to claim 2, characterized in that, The multi-level coding layer includes N coding layers. The step of using the multi-level coding layer to perform linear projection processing and segmentation processing on the spectral feature sequence to obtain multiple sets of spectral features, and performing self-attention operations to determine the degree of influence between the multiple sets of spectral features, includes: The spectral feature sequence is input into the first coding layer for linear projection and segmentation to obtain the first set of multiple spectral features. Self-attention operation is then performed to determine the degree of influence between the first set of multiple spectral features, resulting in the first spectral feature extraction sequence. The i-th spectral feature extraction sequence is input into the (i+1)-th coding layer for linear projection and segmentation to obtain the i-th set of multiple spectral features. Self-attention operation is then performed to determine the degree of influence between the i-th set of multiple spectral features, thus obtaining the i-th spectral feature extraction sequence. This process continues until the N-th coding layer outputs the N-th spectral feature extraction sequence, where i is a positive integer greater than 1.
4. The method according to claim 3, characterized in that, The encoding layer includes a multi-head attention unit and a feedforward neural network unit. The step of inputting the i-th spectral feature extraction sequence into the (i+1)-th encoding layer for linear projection and segmentation processing to obtain the i-th set of multiple spectral features, and performing self-attention operations to determine the degree of influence between the i-th set of multiple spectral features, to obtain the i-th spectral feature extraction sequence, includes: The i-th spectral feature extraction sequence is input into the multi-head attention unit for linear projection and segmentation processing to obtain the i-th set of multiple spectral features, and self-attention operation is performed to determine the degree of influence between the i-th set of multiple spectral features; The i-th set of spectral features and the degree of influence are input into the feedforward neural network unit for nonlinear transformation to obtain the i-th spectral feature extraction sequence.
5. The method according to claim 2, characterized in that, The mapping module includes a linear projection unit and a position encoding unit. The mapping process, which uses the mapping module to map the full-band spectral data to obtain a spectral feature sequence, includes: The full-band spectral data is input into the linear projection unit for mapping processing to obtain a spectral data sequence. The spectral data sequence is input into the position encoding unit for marking processing to obtain the spectral feature sequence.
6. The method according to any one of claims 1-5, characterized in that, The acquisition of full-band spectral data of the insulator includes: Acquire hyperspectral images of the insulator; The hyperspectral image of the insulator is filtered to obtain the effective region in the hyperspectral image; The reflectance of the effective region in the hyperspectral image is corrected, and data is extracted from the corrected spectral image to obtain the full-band spectral data of the insulator.
7. A device for detecting the pollution level of an insulator, characterized in that, The device includes: The acquisition module is used to acquire full-band spectral data of insulators; The detection module is used to perform linear projection processing and segmentation processing on the full-band spectral data using a pre-trained pollution degree recognition model to obtain multiple sets of spectral features, perform self-attention operation to determine the degree of influence between the multiple sets of spectral features, and perform detection based on the multiple sets of spectral features and the degree of influence to obtain pollution degree detection results; wherein, the pollution degree detection results include at least one of the salt content and ash content of the insulator.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.