Insulator pollution grade classification method and device
Through hyperspectral imaging technology and machine learning, automated detection of insulator filth levels is achieved, solving the problems of low efficiency and large errors of traditional methods, improving detection efficiency and accuracy, and enhancing grid safety.
Patent Information
- Application Number
- CN202411398079.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2024-12-27
AI Technical Summary
Traditional insulator aging detection methods require low manual operation efficiency and cumbersome operation problems, which fail to effectively solve the problem of fouling in power grid safety.
Using hyperspectral imaging technology and machine learning methods, we use the hyperspectral image of insulators to classify them using the training-derived filth level classification model to achieve automated and efficient filth level detection.
It improves the efficiency and accuracy of insulator filth level classification, reduces dependence on labor, makes detection more intelligent, reduces errors, and improves grid safety.
Smart Images

Figure CN119206356A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power grid safety technology, and in particular to a method and device for classifying insulator contamination levels. Background Art
[0002] Insulators play a vital role in the mechanical support and electrical isolation of high-voltage transmission and distribution lines. In the initial state, insulators have excellent pollution resistance, but due to long-term aging effects of the natural environment and mechanical stress, their pollution resistance will significantly decrease, causing pollution flashover, which seriously endangers the safety of the power grid. Studies have shown that the pollution flashover voltage is not only related to the degree of pollution, but also has a significant relationship with the pollution composition.
[0003] The problem of contamination accumulation is inevitable. The only way to reduce the occurrence of accidents is to develop a reasonable cleaning plan by testing the material properties of composite insulators and the degree of surface contamination. Traditional detection methods such as leakage current measurement and flashover voltage measurement need to be performed offline, which is not conducive to the normal operation of the equipment. When there are a large number of insulators to be tested, these are inefficient. In practical applications, they all have certain limitations. The equivalent salt density method and the surface contamination layer method require cumbersome operation processes during detection and are prone to human errors. Ultraviolet imaging and infrared imaging methods are widely used in the prevention of flashover due to their advantages of non-contact detection, but they have large errors in special circumstances and are easily affected by the environment.
[0004] With regard to the problem that the above-mentioned traditional insulator aging detection method requires manual operation and has low efficiency, no effective solution has been proposed so far. Summary of the invention
[0005] The embodiment of the present invention provides a method and device for classifying the pollution level of an insulator, so as to at least solve the technical problem that the traditional insulator aging detection method requires manual operation and has low efficiency.
[0006] According to one aspect of an embodiment of the present invention, a method for classifying insulator pollution levels is provided, comprising: obtaining a hyperspectral image of a target insulator, wherein the hyperspectral image is an image obtained by performing image acquisition on the target insulator by a hyperspectral imager; preprocessing the hyperspectral image to obtain a target hyperspectral image; inputting the target hyperspectral image into an insulator pollution level classification model, so as to process the target hyperspectral image using the insulator pollution level classification model to obtain the pollution level of the target insulator corresponding to the target hyperspectral image, wherein the insulator pollution level classification model is a model obtained by machine learning training using multiple sets of training data, each of the multiple sets of training data comprising: a sample hyperspectral image and a sample pollution level corresponding to the sample hyperspectral image; and classifying the target insulator according to the pollution level to obtain a classification result.
[0007] Optionally, before inputting the target hyperspectral image into an insulator contamination level classification model to process the target hyperspectral image using the insulator contamination level classification model to obtain the contamination level of the target insulator corresponding to the target hyperspectral image, the insulator contamination level classification method further includes: acquiring a plurality of the sample hyperspectral images and a plurality of sample contamination levels corresponding to the plurality of the hyperspectral images; and training a plurality of groups of training data including the plurality of the sample hyperspectral images and the plurality of the sample contamination levels to obtain the insulator contamination level classification model.
[0008] Optionally, obtaining a plurality of the sample hyperspectral images and a plurality of sample pollution levels corresponding to the plurality of the hyperspectral images includes: preparing a mixed artificial waste liquid including different solutes and kaolin to obtain a test sample; grouping the test samples according to the ratio of sodium chloride NaCl and calcium sulfate CaSO4 to obtain a plurality of groups of test samples, wherein the plurality of groups of test samples have different conductivities; adhering the plurality of groups of test samples to an insulating sheet to obtain a plurality of groups of insulating sheet samples with different degrees of pollution; collecting images of the insulating sheet samples using the hyperspectral imager to obtain a plurality of the sample hyperspectral images; forming a spectral curve based on the reflectivity of the plurality of sample hyperspectral images within a predetermined wavelength range; and obtaining a plurality of sample pollution levels corresponding to the plurality of the hyperspectral images based on the spectral curve.
[0009] Optionally, before training multiple groups of training data including multiple sample hyperspectral images and multiple sample pollution levels to obtain the insulator pollution level classification model, the insulator pollution level classification method further includes: preprocessing the multiple sample hyperspectral images, wherein the preprocessing of the multiple sample hyperspectral images includes: performing black-white correction on the sample hyperspectral images by a first formula to obtain the sample hyperspectral images after black-white correction, wherein the first formula is: R ci Indicates the reflectivity of the black and white correction, sample ci Represents the original spectral emissivity, dark ci Indicates the black calibration reflectance, white ci represents the white calibration reflectance; and the average sample spectral vector of the sample hyperspectral image after black and white correction is calculated by a second formula, wherein the second formula is: X represents an n*p spectral data matrix, n is the number of the sample hyperspectral images, p represents the number of wavelengths of the spectrum, i represents the i-th sample hyperspectral image, j represents the j-th band, and X represents the average sample spectrum vector obtained by averaging the original spectrum of each band of all the sample hyperspectral images; the sample hyperspectral images and the standard spectrum are subjected to univariate linear regression by the third formula to obtain the linear translation and gradient processing of the spectrum corresponding to each sample hyperspectral image relative to the standard spectrum, and obtain the processing result, wherein the third formula is: X i represents a 1*p matrix, m i and b i All represent relative migration coefficients; multivariate scattering correction is performed on the processing result by the fourth formula to obtain a multivariate scattering correction result, wherein the fourth formula is: X i and X i(MSC) The translation obtained by the univariate linear regression is the hyperspectral curve after MSC correction.
[0010] Optionally, after preprocessing the plurality of sample hyperspectral images, the insulator pollution level classification method further comprises: performing multi-layer grading on the preprocessed sample hyperspectral images using a wavelet basis to obtain wavelet decomposition coefficients corresponding to each layer, wherein the multi-layer grading is completed by the following formula: X(λ) is the spectral reflectance after the black-white correction and the multivariate scattering correction, λ represents the spectral band in the range of 400nm-1000nm, W f(a , b) represents the wavelet coefficient, φ a,b (λ) represents the wavelet basis function transformed by the scale factor a and the expansion factor b; the wavelet decomposition coefficients corresponding to each layer are denoised to obtain a denoising result; and the denoising result is reconstructed to obtain a denoised hyperspectral curve.
[0011] Optionally, before training multiple groups of training data including multiple sample hyperspectral images and multiple sample pollution levels to obtain the insulator pollution level classification model, the insulator pollution level classification method also includes: dividing the multiple groups of training data into training sets and test sets according to a predetermined ratio; establishing a partial least squares model PLS for the preprocessed test set and the training set to calculate the absolute value weight of the regression coefficient in each sampling process; using an attenuation exponential function to remove wavelengths with smaller absolute value weights of the regression coefficient in the partial least squares model PLS established each time to retain a predetermined number of wavelengths; repeating the above steps until the number of times the partial least squares model PLS is established reaches a preset sampling number, stopping the calculation, and selecting the wavelength in the subset that minimizes the root mean square error of the partial least squares model PLS as the characteristic wavelength.
[0012] Optionally, multiple groups of training data including multiple sample hyperspectral images and multiple sample pollution levels are trained to obtain the insulator pollution level classification model. The insulator pollution level classification method also includes: using henon mapping to initialize the population, and using the WOA optimization algorithm to find the optimal parameters of the XGBoost model, wherein the XGBoost model is the basic model of the insulator pollution level classification model; using the parameters of the XGBoost model as the vector content of the population individual, and using the loss function of the XGBoost model as the fitness function; setting the maximum number of iteration steps and the initial population size of whales; using Henon mapping to initialize the whale optimization algorithm WOA population; calculating the fitness function of each individual in the whale population, updating the individual position of the population, and recording the optimal fitness function value and the parameters of the XGBoost model; calculating the fitness function of each individual in the whale population, and updating the individual position of the population; iteratively finding the optimal fitness function, and using the optimal parameters corresponding to the optimal fitness function as the final training parameters of the XGBoost model, and inputting the training set data for training.
[0013] According to another aspect of an embodiment of the present invention, an insulator pollution level classification device is also provided, comprising: a first acquisition unit, used to acquire a hyperspectral image of a target insulator, wherein the hyperspectral image is an image obtained by performing image acquisition on the target insulator by a hyperspectral imager; a first preprocessing unit, used to preprocess the hyperspectral image to obtain a target hyperspectral image; a processing unit, used to input the target hyperspectral image into an insulator pollution level classification model, so as to process the target hyperspectral image using the insulator pollution level classification model to obtain the pollution level of the target insulator corresponding to the target hyperspectral image, wherein the insulator pollution level classification model is a model obtained by machine learning training using multiple sets of training data, each of the multiple sets of training data includes: a sample hyperspectral image and a sample pollution level corresponding to the sample hyperspectral image; a classification unit, used to classify the target insulator according to the pollution level to obtain a classification result.
[0014] Optionally, the insulator pollution level classification device also includes: a second acquisition unit, used to acquire a plurality of sample hyperspectral images and a plurality of sample pollution levels corresponding to the plurality of hyperspectral images before inputting the target hyperspectral image into the insulator pollution level classification model to process the target hyperspectral image using the insulator pollution level classification model to obtain the pollution level of the target insulator corresponding to the target hyperspectral image; a training unit, used to train a plurality of groups of training data including the plurality of sample hyperspectral images and the plurality of sample pollution levels to obtain the insulator pollution level classification model.
[0015] Optionally, the second acquisition unit includes: a preparation module, which is used to prepare a mixed artificial waste liquid including different solutes and kaolin to obtain a test sample; a grouping module, which is used to group the test sample according to the ratio of sodium chloride NaCl and calcium sulfate CaSO4 to obtain multiple groups of test samples, wherein the multiple groups of test samples have different conductivities; an adhesion module, which is used to adhere the multiple groups of test samples to an insulating sheet to obtain multiple groups of insulating sheet samples with different degrees of pollution; an acquisition module, which is used to use the hyperspectral imager to capture images of the insulating sheet samples to obtain multiple hyperspectral images of the samples; a construction module, which is used to form a spectral curve based on the reflectivity of the multiple hyperspectral images of the samples within a predetermined wavelength range; and an acquisition module, which is used to obtain multiple sample contamination levels corresponding to the multiple hyperspectral images based on the spectral curve.
[0016] Optionally, the insulator pollution level classification device further includes: a second preprocessing unit, which is used to preprocess the plurality of sample hyperspectral images before training the plurality of groups of training data including the plurality of sample hyperspectral images and the plurality of sample pollution levels to obtain the insulator pollution level classification model, wherein the second preprocessing unit includes: a black-and-white correction module, which is used to perform black-and-white correction on the sample hyperspectral images by a first formula to obtain the sample hyperspectral images after black-and-white correction, wherein the first formula is: R ci Indicates the reflectivity of the black and white correction, sample ci Represents the original spectral emissivity, dark ci Indicates the black calibration reflectance, white ci represents the white calibration reflectance; a calculation module, used to calculate the average sample spectral vector of the sample hyperspectral image after black and white correction by a second formula, wherein the second formula is: X represents an n*p spectral data matrix, n is the number of sample hyperspectral images, p represents the number of wavelengths of the spectrum, i represents the i-th sample hyperspectral image, j represents the j-th band, represents the average sample spectrum vector obtained by averaging the original spectrum of each band of all the sample hyperspectral images; a univariate linear regression module, used to perform univariate linear regression on the sample hyperspectral images and the standard spectrum through a third formula, obtain the linear translation and gradient processing of the spectrum corresponding to each sample hyperspectral image relative to the standard spectrum, and obtain the processing result, wherein the third formula is: X i represents a 1*p matrix, m i and b i All represent relative migration coefficients; a multivariate scatter correction module, used to perform multivariate scatter correction on the processing result through a fourth formula to obtain a multivariate scatter correction result, wherein the fourth formula is: X i and X i(MSC) The translation obtained by the univariate linear regression is the hyperspectral curve after MSC correction.
[0017] Optionally, the insulator pollution level classification device further includes: a multi-layer classification unit, which is used to perform multi-layer classification on the preprocessed sample hyperspectral images using a wavelet basis after preprocessing the plurality of sample hyperspectral images, so as to obtain the wavelet decomposition coefficients corresponding to each layer, wherein the multi-layer classification is completed by the following formula: X(λ) is the spectral reflectance after the black-white correction and the multivariate scattering correction, λ represents the spectral band in the range of 400nm-1000nm, Wf(a , b) represents the wavelet coefficient, φ a,b (λ) represents the wavelet basis function transformed by the scale factor a and the expansion factor b; the denoising unit is used to perform denoising on the wavelet decomposition coefficients corresponding to each layer to obtain a denoising result; the reconstruction unit is used to reconstruct the denoising result to obtain a denoised hyperspectral curve.
[0018] Optionally, the insulator pollution level classification device also includes: a division module, which is used to divide the multiple groups of training data including multiple sample hyperspectral images and multiple sample pollution levels into training sets and test sets according to a predetermined ratio before training the multiple groups of training data including multiple sample hyperspectral images and multiple sample pollution levels to obtain the insulator pollution level classification model; an establishment module, which is used to establish a partial least squares model PLS for the preprocessed test set and the training set to calculate the absolute value weight of the regression coefficient in each sampling process; a removal module, which is used to use an attenuation exponential function to remove wavelengths with smaller absolute value weights of the regression coefficient in each established partial least squares model PLS to retain a predetermined number of wavelengths; a selection module, which is used to repeat the above steps until the number of times the partial least squares model PLS is established reaches a preset sampling number, stops the calculation, and selects the wavelength in the subset that minimizes the root mean square error of the partial least squares model PLS as the characteristic wavelength.
[0019] Optionally, the training unit also includes: a search module, which is used to initialize the population using henon mapping, and use the WOA optimization algorithm to find the optimal parameters of the XGBoost model, wherein the XGBoost model is the basic model of the insulator pollution level classification model; a determination module, which is used to use the parameters of the XGBoost model as the vector content of the population individuals, and use the loss function of the XGBoost model as the fitness function; a setting module, which is used to set the maximum number of iteration steps and the initial population size of whales; an initialization module, which is used to initialize the whale optimization algorithm WOA population using Henon mapping; a first update module, which is used to calculate the fitness function of each individual in the whale population, update the individual position of the population, and record the optimal fitness function value and the parameters of the XGBoost model; a second update module, which is used to calculate the fitness function of each individual in the whale population and update the individual position of the population; a training module, which is used to iteratively find the optimal fitness function, and use the optimal parameters corresponding to the optimal fitness function as the final training parameters of the XGBoost model, and input the training set data for training.
[0020] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein the program executes any one of the above-mentioned methods for classifying insulator pollution levels.
[0021] According to another aspect of an embodiment of the present invention, a processor is provided, and the processor is used to run a program, wherein the program executes any one of the above-mentioned methods for classifying insulator pollution levels when running.
[0022] According to another aspect of an embodiment of the present invention, a computer program product is provided, comprising computer instructions, wherein when the computer instructions are executed by a processor, any one of the above-mentioned methods for classifying insulator pollution levels is executed.
[0023] In an embodiment of the present invention, a hyperspectral image of a target insulator is obtained, wherein the hyperspectral image is an image obtained by collecting images of the target insulator by a hyperspectral imager; the hyperspectral image is preprocessed to obtain a target hyperspectral image; the target hyperspectral image is input into an insulator pollution level classification model, so as to process the target hyperspectral image using the insulator pollution level classification model to obtain the pollution level of the target insulator corresponding to the target hyperspectral image, wherein the insulator pollution level classification model is a model obtained by machine learning training using multiple sets of training data, each of the multiple sets of training data includes: a sample hyperspectral image and a sample pollution level corresponding to the sample hyperspectral image; the target insulator is classified according to the pollution level to obtain a classification result. Through the technical solution provided by the present invention, it is achieved to use machine learning to determine the insulator contamination level according to different hyperspectral data, and then determine the contamination classification of the insulator according to the contamination level, thereby improving the efficiency of insulator contamination level classification. At the same time, by using machine learning to classify the contamination levels of insulators, the classification results are also made more accurate, reducing the dependence of insulator aging detection on manual labor, making insulator aging detection more intelligent, and thus solving the technical problem that traditional insulator aging detection methods require manual operation and have low efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0025] Figure 1 It is a hardware structure block diagram of a mobile terminal of an insulator pollution level classification method according to an embodiment of the present invention;
[0026] Figure 2 is a flow chart of a method for classifying insulator pollution levels according to an embodiment of the present invention;
[0027] Figure 3 is a schematic diagram of a hyperspectral testing platform according to an embodiment of the present invention;
[0028] Figure 4 is a flow chart of an optional insulator pollution level classification method according to an embodiment of the present invention;
[0029] Figure 5 Schematic diagram of an insulator pollution level classification device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] As introduced in the background technology, the traditional insulator aging detection method requires manual operation and has low efficiency. In view of the above defects, an insulator pollution level classification method and device are provided in an embodiment of the present invention.
[0033] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0034] The method embodiments provided in the embodiments of the present invention can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of an insulator pollution level classification method according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0035] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the insulator pollution level classification method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The specific example of the above-mentioned network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0036] According to an embodiment of the present invention, a method embodiment of a method for classifying the pollution level of an insulator is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0037] Figure 2 FIG. 4 is a flow chart of a method for classifying insulator pollution levels according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0038] Step S202 : acquiring a hyperspectral image of a target insulator, wherein the hyperspectral image is an image acquired by collecting images of the target insulator by a hyperspectral imager.
[0039] In this embodiment, a hyperspectral image of the target insulator may be acquired through a hyperspectral testing platform.
[0040] Figure 3 is a schematic diagram of a hyperspectral testing platform according to an embodiment of the present invention, such as Figure 3 As shown, the hyperspectral testing platform may include but is not limited to: a hyperspectral imaging system, a symmetrical dual light source, and a standard white board with a reflectivity close to 100% (such as Figure 2 In the experiment, Figure 3 As shown, the hyperspectral imager is mounted on a tripod, with a distance of 120 cm from the lens to the sample and a downward angle of 45°. The light sources are placed symmetrically on both sides of the sample. The sample is placed in the imaging area for hyperspectral acquisition, and the data is transferred to the computer via the USB cable of the hyperspectrometer. The hyperspectral image reflectance obtained by the hyperspectral instrument forms a continuous spectral curve in the wavelength range of 400–1000 nm, and samples with different degrees of pollution correspond to the spectral curves one by one.
[0041] Step S204: preprocess the hyperspectral image to obtain a target hyperspectral image.
[0042] In this embodiment, in order to make the pollution level classification result of the target insulator more accurate, the hyperspectral image of the target insulator may be preprocessed, for example, black and white correction processing, multivariate scattering correction and continuous wavelet transform.
[0043] Step S206, inputting the target hyperspectral image into the insulator contamination level classification model, so as to process the target hyperspectral image using the insulator contamination level classification model to obtain the contamination level of the target insulator corresponding to the target hyperspectral image, wherein the insulator contamination level classification model is a model obtained by machine learning training using multiple sets of training data, and each set of the multiple sets of training data includes: a sample hyperspectral image and a sample contamination level corresponding to the sample hyperspectral image.
[0044] In this embodiment, an insulator contamination level classification model can be pre-trained by machine learning, so that in subsequent applications, the insulator contamination level classification model can be used to process the preprocessed hyperspectral image to obtain the contamination level of the target insulator corresponding to the target hyperspectral image, thereby improving the efficiency of obtaining the insulator contamination level.
[0045] Step S208, classifying the target insulators according to the pollution levels to obtain classification results.
[0046] In this embodiment, the pollution level classification result of the target insulator can be obtained according to the preset pollution level and insulator pollution type.
[0047] As can be seen from the above, in an embodiment of the present invention, a hyperspectral image of a target insulator is obtained, wherein the hyperspectral image is an image obtained by performing image acquisition on the target insulator by a hyperspectral imager; the hyperspectral image is preprocessed to obtain a target hyperspectral image; the target hyperspectral image is input into an insulator pollution level classification model, so as to process the target hyperspectral image using the insulator pollution level classification model to obtain the pollution level of the target insulator corresponding to the target hyperspectral image, wherein the insulator pollution level classification model is a model obtained by machine learning training using multiple sets of training data, each of the multiple sets of training data includes: a sample hyperspectral image and a sample pollution level corresponding to the sample hyperspectral image; the target insulator is classified according to the pollution level to obtain a classification result, thereby achieving the purpose of determining the insulator pollution level by machine learning according to different hyperspectral data, and then determining the pollution classification of the insulator according to the pollution level, thereby achieving the purpose of improving the efficiency of the insulator pollution level classification, and at the same time, by using machine learning to classify the pollution level of the insulator, the classification result is also made more accurate, the dependence of the insulator aging detection on manual work is reduced, and the insulator aging detection is made more intelligent.
[0048] Therefore, the technical solution provided by the embodiment of the present invention solves the technical problem that the traditional insulator aging detection method requires manual operation and has low efficiency.
[0049] According to the above embodiment of the present invention, before the target hyperspectral image is input into the insulator contamination level classification model to process the target hyperspectral image using the insulator contamination level classification model to obtain the contamination level of the target insulator corresponding to the target hyperspectral image, the insulator contamination level classification method further includes: acquiring multiple sample hyperspectral images and multiple sample contamination levels corresponding to the multiple hyperspectral images; training multiple groups of training data including the multiple sample hyperspectral images and the multiple sample contamination levels to obtain the insulator contamination level classification model.
[0050] In this embodiment, a plurality of sample hyperspectral images and a plurality of sample pollution levels corresponding to the plurality of hyperspectral images can be obtained, and then the plurality of sample hyperspectral images and the plurality of sample pollution levels are used as training data for training to obtain an insulator pollution level classification model, and when it is necessary to obtain the insulator pollution level, the hyperspectral image corresponding to the insulator is directly preprocessed and input into the insulator pollution level classification model to obtain the pollution level corresponding to the insulator.
[0051] According to the above embodiment of the present invention, a plurality of sample hyperspectral images and a plurality of sample pollution levels corresponding to the plurality of hyperspectral images are obtained, including: preparing a mixed artificial waste liquid including different solutes and kaolin to obtain a test sample; grouping the test samples according to the ratio of sodium chloride NaCl and calcium sulfate CaSO4 to obtain a plurality of groups of test samples, wherein the plurality of groups of test samples have different conductivities; adhering the plurality of groups of test samples to an insulating sheet to obtain a plurality of groups of insulating sheet samples with different degrees of pollution; collecting images of the insulating sheet samples using a hyperspectral imager to obtain a plurality of sample hyperspectral images; obtaining a spectral curve based on the reflectivity of the plurality of sample hyperspectral images within a predetermined wavelength range; and obtaining a plurality of sample pollution levels corresponding to the plurality of hyperspectral images based on the spectral curve.
[0052] In this embodiment, mixed artificial waste liquids with different solutes and kaolin can be prepared, and the test samples are grouped according to the ratio of NaCl and CaSO4. According to the recommended solid layer method, the prepared solutions with different volume conductivities are evenly adhered to a silicone rubber insulating sheet (5cm*5cm), and four samples with different pollution levels are prepared in each group, and all samples are naturally dried for 24 hours. Then, according to the regulations, the real pollution levels of different samples are divided (Ⅰ, Ⅱ, Ⅲ, Ⅳ).
[0053] According to the above embodiment of the present invention, before training multiple groups of training data including multiple sample hyperspectral images and multiple sample pollution levels to obtain an insulator pollution level classification model, the insulator pollution level classification method further includes: preprocessing the multiple sample hyperspectral images, wherein the preprocessing of the multiple sample hyperspectral images includes: performing black and white correction on the sample hyperspectral images by a first formula to obtain the sample hyperspectral images after black and white correction, wherein the first formula is: R ci Indicates the reflectivity of black and white correction, sample ci Represents the original spectral emissivity, dark ci Indicates the black calibration reflectance, white ci represents the white calibration reflectance; the average sample spectral vector of the sample hyperspectral image after black and white correction is calculated by the second formula, wherein the second formula is: X represents the n*p spectral data matrix, n is the number of sample hyperspectral images, p is the number of wavelengths of the spectrum, i represents the i-th sample hyperspectral image, j represents the j-th band, represents the average sample spectrum vector obtained by averaging the original spectrum of each band of all sample hyperspectral images; the sample hyperspectral images and the standard spectrum are subjected to univariate linear regression through the third formula to obtain the linear translation and gradient processing of the spectrum corresponding to each sample hyperspectral image relative to the standard spectrum, and obtain the processing result, wherein the third formula is: X i represents a 1*p matrix, m i and b i All represent relative migration coefficients; the processing result is subjected to multivariate scattering correction by the fourth formula to obtain a multivariate scattering correction result, wherein the fourth formula is: X i and X i(MSC) The translation obtained by the univariate linear regression is the hyperspectral curve after MSC correction.
[0054] In this embodiment, before obtaining the insulator contamination level classification model through training of multiple sample hyperspectral images and multiple sample contamination levels, the multiple sample hyperspectral images can be subjected to black-and-white correction by the above-mentioned first formula, and the hyperspectral data can be corrected by the black-and-white correction operation.
[0055] In addition, in this embodiment, the average spectrum of the sample can be calculated as the annotated spectrum; then a univariate linear regression is performed on the hyperspectral image and the standard spectrum of each group of samples to obtain the linear shift (regression constant) and gradient (regression coefficient) of each spectrum relative to the standard spectrum. The linear shift is subtracted from the original spectral data of each sample, and then the data is divided by the regression coefficient to correct the relative slope of the baseline, thereby correcting the baseline shift and offset of each spectrum with the standard spectrum as a reference.
[0056] Where X is an n*p spectral data matrix, n is the number of selected samples, p is the number of wavelengths of the spectrum, i is the i-th sample, j is the j-th band, and X i Represents a 1*p matrix, representing a single spectral vector.
[0057] According to the above embodiment of the present invention, after preprocessing a plurality of sample hyperspectral images, the insulator pollution level classification method may further include: performing multi-layer classification on the preprocessed sample hyperspectral images using a wavelet basis to obtain wavelet decomposition coefficients corresponding to each layer, wherein the multi-layer classification is completed by the following formula: X(λ) is the spectral reflectance after black-white correction and multivariate scattering correction, λ represents the spectral band in the range of 400nm-1000nm, W f(a,b) represents the wavelet coefficient, φ a,b (λ) represents the wavelet basis function transformed by the scale factor a and the expansion factor b; the wavelet decomposition coefficients corresponding to each layer are denoised to obtain a denoised result; and the denoised result is reconstructed to obtain a denoised hyperspectral curve.
[0058] In this embodiment, a wavelet basis may be selected to perform hierarchical decomposition on the preprocessed hyperspectral data to obtain wavelet decomposition coefficients corresponding to each layer.
[0059] According to the above embodiment of the present invention, before training multiple groups of training data including multiple sample hyperspectral images and multiple sample pollution levels to obtain an insulator pollution level classification model, the insulator pollution level classification method also includes: dividing the multiple groups of training data into training sets and test sets according to a predetermined ratio; establishing a partial least squares model PLS for the preprocessed test set and training set to calculate the absolute value weight of the regression coefficient in each sampling process; using an attenuation exponential function to remove wavelengths with smaller absolute value weights of the regression coefficient in each established partial least squares model PLS to retain a predetermined number of wavelengths; repeating the above steps until the number of times the partial least squares model PLS is established reaches a preset sampling number, stopping the calculation, and selecting the wavelength in the subset that minimizes the root mean square error of the partial least squares model PLS as the characteristic wavelength.
[0060] In this embodiment, competitive adaptive weighted dimensionality reduction processing can be performed. Specifically, the sampling number N can be set, and a partial small two-wheeled sparse model PLS is established for the preprocessed test set and training set. The absolute value weight of the regression coefficient in each sampling process is calculated, and then the attenuation exponential function is used to remove the wavelengths with smaller absolute value weights of the regression coefficient in each established PLS model. The number of retained wavelengths is X. s =ae -Ki , where a and K are obtained from the number of wavelengths at the beginning and end of the iteration. Then repeat the previous step again with the wavelengths retained in the previous PLS model.
[0061] When the number of times the PLS model is established reaches the preset sampling number N, the calculation is stopped, and at this time, the wavelength in the subset that minimizes the root mean square error of the PLS is selected as the characteristic wavelength.
[0062] For example, in the embodiment of the present invention, the subsequent training data and test data can be divided by extracting 10 sets of data from each label sample of the three groups of samples as training data, and the process of extracting test data from the test sample is the same. Therefore, in the spectrum collection of NaCl or CaSO4, there are 40 sets of training data and 40 sets of test data, and in the spectrum collection of the mixed three different proportions of NaCl-CaSO4 samples, there are a total of 120 sets of training data and 120 sets of test data.
[0063] According to the above embodiment of the present invention, multiple groups of training data including multiple sample hyperspectral images and multiple sample pollution levels are trained to obtain an insulator pollution level classification model. The insulator pollution level classification method also includes: using henon mapping to initialize the population, and using the WOA optimization algorithm to find the optimal parameters of the XGBoost model, wherein the XGBoost model is the basic model of the insulator pollution level classification model; using the parameters of the XGBoost model as the vector content of the population individuals, and using the loss function of the XGBoost model as the fitness function; setting the maximum number of iteration steps and the initial population size of whales; using Henon mapping to initialize the whale optimization algorithm WOA population; calculating the fitness function of each individual in the whale population, updating the individual position of the population, and recording the optimal fitness function value and the parameters of the XGBoost model; calculating the fitness function of each individual in the whale population, and updating the individual position of the population; iteratively finding the optimal fitness function, and using the optimal parameters corresponding to the optimal fitness function as the final training parameters of the XGBoost model, and inputting the training set data for training.
[0064] In this embodiment, the population can be initialized using henon mapping, and the optimal parameters of the XGboost model can be found using the WOA optimization algorithm. Specifically, this can be achieved in the following ways: XGBoost is a typical algorithm in ensemble learning, and its model consists of multiple decision trees, which can be expressed as: W={f(x)=ω q(x)}, ω is the leaf node weight value, q(x) is the leaf node, the predicted value is a collection of m regression trees, x represents the input feature, y i Represents the corresponding level of filth; 2) The parameters of the XGBoost classification model are used as the vector content of the population individuals, and the loss function of the XGBoost classification model is used as the fitness function: Public, Ω(f m ) is a regular term that penalizes the complexity of the model, f m is the function of the mth tree, and I is the loss function used to measure the predicted pollution level. and the true level of filthiness i , λ is the parameter to measure the penalty; 3) set the maximum number of iterations and the number of initial whale populations; 4) initialize the whale optimization algorithm WOA population with Henon mapping; 5) calculate the fitness function of each individual in the whale population, update the individual position of the population, and record the optimal fitness function value and the parameters of the XGBoost classification model; 6) calculate the fitness function of each individual in the whale population, update the individual position of the population; 7) iterate to find the optimal fitness function, and use the optimal parameters corresponding to the best fitness function as the final training parameters of the XGBoost classification model, and input the training set data for training.
[0065] Figure 4 is a flow chart of an optional insulator pollution level classification method according to an embodiment of the present invention, such as Figure 4 As shown in the figure, after the artificial pollution simulation experiment of insulators, the hyperspectral images of the artificially polluted insulator samples are obtained, and then the spectral images are preprocessed and processed by competitive adaptive weighted dimensionality reduction. After the subsequent training set and test set are divided, the population is initialized with henon mapping, and the WOA optimization algorithm is used to find the optimal parameters of the XGboost model. The test set is input into the trained model, and the predicted aging level of the pixel is output.
[0066] Through the technical solution provided by the above-mentioned embodiment of the present invention, the insulator contamination level classification model has high flexibility and adjustability, and can be adjusted and optimized according to different hyperspectral data to obtain more accurate classification evaluation results, thereby improving detection efficiency while ensuring classification accuracy.
[0067] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0068] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0069] According to an embodiment of the present invention, there is also provided an insulator pollution level classification device for implementing the above-mentioned insulator pollution level classification method. Figure 5 Schematic diagram of an insulator pollution level classification device according to an embodiment of the present invention. Figure 5 As shown, the insulator pollution level classification device includes: a first acquisition unit 51, a first pre-processing unit 53, a processing unit 55 and a classification unit 57. The insulator pollution level classification device is described in detail below.
[0070] The first acquisition unit 51 is used to acquire a hyperspectral image of a target insulator, wherein the hyperspectral image is an image obtained by collecting images of the target insulator by a hyperspectral imager.
[0071] The first preprocessing unit 53 is used to preprocess the hyperspectral image to obtain a target hyperspectral image.
[0072] The processing unit 55 is used to input the target hyperspectral image into the insulator pollution level classification model, so as to process the target hyperspectral image using the insulator pollution level classification model to obtain the pollution level of the target insulator corresponding to the target hyperspectral image, wherein the insulator pollution level classification model is a model obtained by machine learning training using multiple sets of training data, and each set of the multiple sets of training data includes: a sample hyperspectral image and a sample pollution level corresponding to the sample hyperspectral image.
[0073] The classification unit 57 is used to classify the target insulators according to the pollution level to obtain a classification result.
[0074] It should be noted here that the schematic diagram of the above-mentioned insulator pollution level classification device is as follows: Figure 5 As shown, the insulator pollution level classification device includes: a first acquisition unit 51, a first preprocessing unit 53, a processing unit 55 and a classification unit 57 corresponding to steps S202 to S208 in the above embodiment, and the four units and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above embodiment.
[0075] As can be seen from the above, in the scheme recorded in the above embodiment of the present invention, a first acquisition unit can be used to acquire a hyperspectral image of a target insulator, wherein the hyperspectral image is an image obtained by performing image acquisition on the target insulator by a hyperspectral imager; a first preprocessing unit is used to preprocess the hyperspectral image to obtain a target hyperspectral image; a processing unit is used to input the target hyperspectral image into an insulator pollution level classification model, so as to process the target hyperspectral image using the insulator pollution level classification model to obtain the pollution level of the target insulator corresponding to the target hyperspectral image, wherein the insulator pollution level classification model is trained by machine learning using multiple sets of training data. The obtained model, each of the multiple groups of training data includes: a sample hyperspectral image and a sample pollution level corresponding to the sample hyperspectral image; and a classification unit is used to classify the target insulator according to the pollution level to obtain a classification result, which realizes the purpose of using machine learning to determine the insulator pollution level according to different hyperspectral data, and then determining the pollution classification of the insulator according to the pollution level, thereby improving the efficiency of insulator pollution level classification. At the same time, by using machine learning to classify the pollution level of insulators, the classification result is also made more accurate, reducing the dependence of insulator aging detection on manual work, and making insulator aging detection more intelligent.
[0076] Therefore, the technical solution provided by the embodiment of the present invention solves the technical problem that the traditional insulator aging detection method requires manual operation and has low efficiency.
[0077] Optionally, the insulator pollution level classification device also includes: a second acquisition unit, used to acquire multiple sample hyperspectral images and multiple sample pollution levels corresponding to the multiple hyperspectral images before inputting the target hyperspectral image into the insulator pollution level classification model to process the target hyperspectral image using the insulator pollution level classification model to obtain the pollution level of the target insulator corresponding to the target hyperspectral image; a training unit, used to train multiple groups of training data including multiple sample hyperspectral images and multiple sample pollution levels to obtain the insulator pollution level classification model.
[0078] Optionally, the second acquisition unit includes: a preparation module, which is used to prepare a mixed artificial waste liquid including different solutes and kaolin to obtain a test sample; a grouping module, which is used to group the test samples according to the ratio of sodium chloride NaCl and calcium sulfate CaSO4 to obtain multiple groups of test samples, wherein the multiple groups of test samples have different conductivities; an adhesion module, which is used to adhere the multiple groups of test samples to the insulating sheet to obtain multiple groups of insulating sheet samples with different degrees of pollution; an acquisition module, which is used to use a hyperspectral imager to collect images of the insulating sheet samples to obtain multiple sample hyperspectral images; a construction module, which is used to form a spectral curve based on the reflectivity of the multiple sample hyperspectral images within a predetermined wavelength range; an acquisition module, which is used to obtain multiple sample contamination levels corresponding to the multiple hyperspectral images based on the spectral curve.
[0079] Optionally, the insulator pollution level classification device further includes: a second preprocessing unit, which is used to preprocess the multiple sample hyperspectral images before training multiple groups of training data including multiple sample hyperspectral images and multiple sample pollution levels to obtain the insulator pollution level classification model, wherein the second preprocessing unit includes: a black and white correction module, which is used to perform black and white correction on the sample hyperspectral image by a first formula to obtain the sample hyperspectral image after black and white correction, wherein the first formula is: R ci Indicates the reflectivity of black and white correction, sample ci Represents the original spectral emissivity, dark ci Indicates the black calibration reflectance, white ci represents the white calibration reflectance; a calculation module, used to calculate the average sample spectral vector of the sample hyperspectral image after black and white correction by a second formula, wherein the second formula is: X represents the n*p spectral data matrix, n is the number of sample hyperspectral images, p is the number of wavelengths of the spectrum, i represents the i-th sample hyperspectral image, j represents the j-th band, represents the average sample spectrum vector obtained by averaging the original spectrum of each band of all sample hyperspectral images; a univariate linear regression module is used to perform univariate linear regression on the sample hyperspectral images and the standard spectrum through the third formula to obtain the linear translation and gradient processing of the spectrum corresponding to each sample hyperspectral image relative to the standard spectrum, and obtain the processing result, wherein the third formula is: X i represents a 1*p matrix, m i and b i All represent relative migration coefficients; a multivariate scatter correction module, used to perform multivariate scatter correction on the processing result through a fourth formula to obtain a multivariate scatter correction result, wherein the fourth formula is: X i and Xi(MSC) The translation obtained by the univariate linear regression is the hyperspectral curve after MSC correction.
[0080] Optionally, the insulator pollution level classification device further includes: a multi-layer classification unit, which is used to perform multi-layer classification on the preprocessed sample hyperspectral images using a wavelet basis after preprocessing the multiple sample hyperspectral images, so as to obtain the wavelet decomposition coefficients corresponding to each layer, wherein the multi-layer classification is completed by the following formula: X(λ) is the spectral reflectance after black-white correction and multivariate scattering correction, λ represents the spectral band in the range of 400nm-1000nm, W f(a,b) represents the wavelet coefficient, φ a,b (λ) represents the wavelet basis function transformed by the scale factor a and the expansion factor b; the denoising unit is used to denoise the wavelet decomposition coefficients corresponding to each layer to obtain the denoising result; the reconstruction unit is used to reconstruct the denoising result to obtain the denoised hyperspectral curve.
[0081] Optionally, the insulator pollution level classification device also includes: a division module, which is used to divide the multiple groups of training data including multiple sample hyperspectral images and multiple sample pollution levels into training sets and test sets according to a predetermined ratio before training the multiple groups of training data including multiple sample hyperspectral images and multiple sample pollution levels to obtain the insulator pollution level classification model; an establishment module, which is used to establish a partial least squares model PLS for the preprocessed test set and training set to calculate the absolute value weight of the regression coefficient in each sampling process; a removal module, which is used to use an attenuation exponential function to remove wavelengths with smaller absolute value weights of the regression coefficient in each established partial least squares model PLS to retain a predetermined number of wavelengths; a selection module, which is used to repeat the above steps until the number of times the partial least squares model PLS is established reaches a preset sampling number, stops the calculation, and selects the wavelength in the subset that minimizes the root mean square error of the partial least squares model PLS as the characteristic wavelength.
[0082] Optionally, the training unit also includes: a search module, which is used to initialize the population using henon mapping, and use the WOA optimization algorithm to find the optimal parameters of the XGBoost model, wherein the XGBoost model is the basic model of the insulator pollution level classification model; a determination module, which is used to use the parameters of the XGBoost model as the vector content of the population individuals, and use the loss function of the XGBoost model as the fitness function; a setting module, which is used to set the maximum number of iteration steps and the initial population size of whales; an initialization module, which is used to initialize the whale optimization algorithm WOA population using Henon mapping; a first update module, which is used to calculate the fitness function of each individual in the whale population, update the individual positions of the population, and record the optimal fitness function value and the parameters of the XGBoost model; a second update module, which is used to calculate the fitness function of each individual in the whale population, and update the individual positions of the population; a training module, which is used to iteratively find the optimal fitness function, and use the optimal parameters corresponding to the optimal fitness function as the final training parameters of the XGBoost model, and input the training set data for training.
[0083] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium comprising a stored program, wherein the program executes any one of the above-mentioned methods for classifying insulator pollution levels.
[0084] Optionally, in this embodiment, the computer-readable storage medium may be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the communication devices in a communication device group.
[0085] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: obtaining a hyperspectral image of a target insulator, wherein the hyperspectral image is an image obtained by acquiring an image of the target insulator by a hyperspectral imager; preprocessing the hyperspectral image to obtain a target hyperspectral image; inputting the target hyperspectral image into an insulator pollution level classification model to process the target hyperspectral image using the insulator pollution level classification model to obtain a pollution level of the target insulator corresponding to the target hyperspectral image, wherein the insulator pollution level classification model is a model obtained by machine learning training using multiple sets of training data, each of the multiple sets of training data including: a sample hyperspectral image and a sample pollution level corresponding to the sample hyperspectral image; classifying the target insulator according to the pollution level to obtain a classification result.
[0086] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: before inputting the target hyperspectral image into the insulator contamination level classification model to process the target hyperspectral image using the insulator contamination level classification model to obtain the contamination level of the target insulator corresponding to the target hyperspectral image, obtaining multiple sample hyperspectral images and multiple sample contamination levels corresponding to the multiple hyperspectral images; training multiple groups of training data including the multiple sample hyperspectral images and the multiple sample contamination levels to obtain the insulator contamination level classification model.
[0087] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: preparing a mixed artificial waste liquid including different solutes and kaolin to obtain a test sample; grouping the test samples according to the ratio of sodium chloride NaCl and calcium sulfate CaSO4 to obtain multiple groups of test samples, wherein the multiple groups of test samples have different conductivities; adhering the multiple groups of test samples to an insulating sheet to obtain multiple groups of insulating sheet samples with different degrees of pollution; using a hyperspectral imager to capture images of the insulating sheet samples to obtain multiple sample hyperspectral images; forming a spectral curve based on the reflectivity of the multiple sample hyperspectral images within a predetermined wavelength range; and obtaining multiple sample contamination levels corresponding to the multiple hyperspectral images based on the spectral curve.
[0088] Optionally, in this embodiment, the computer-readable storage medium is configured to store a program code for executing the following steps: before training multiple sets of training data including multiple sample hyperspectral images and multiple sample pollution levels to obtain an insulator pollution level classification model, preprocessing the multiple sample hyperspectral images, wherein the preprocessing of the multiple sample hyperspectral images includes: performing black-white correction on the sample hyperspectral images by a first formula to obtain the sample hyperspectral images after black-white correction, wherein the first formula is: R ci Indicates the reflectivity of black and white correction, sample ci Represents the original spectral emissivity, dark ci Indicates the black calibration reflectance, white ci represents the white calibration reflectance; the average sample spectral vector of the sample hyperspectral image after black and white correction is calculated by the second formula, wherein the second formula is: X represents the n*p spectral data matrix, n is the number of sample hyperspectral images, p is the number of wavelengths of the spectrum, i represents the i-th sample hyperspectral image, j represents the j-th band, represents the average sample spectrum vector obtained by averaging the original spectrum of each band of all sample hyperspectral images; the sample hyperspectral images and the standard spectrum are subjected to univariate linear regression through the third formula to obtain the linear translation and gradient processing of the spectrum corresponding to each sample hyperspectral image relative to the standard spectrum, and obtain the processing result, wherein the third formula is: X i represents a 1*p matrix, m i and b i All represent relative migration coefficients; the processing result is subjected to multivariate scattering correction by the fourth formula to obtain a multivariate scattering correction result, wherein the fourth formula is: X i and X i(MSC) The translation obtained by the univariate linear regression is the hyperspectral curve after MSC correction.
[0089] Optionally, in this embodiment, the computer-readable storage medium is configured to store a program code for executing the following steps: after preprocessing a plurality of sample hyperspectral images, performing multi-layer grading on the preprocessed sample hyperspectral images using a wavelet basis to obtain wavelet decomposition coefficients corresponding to each layer, wherein the multi-layer grading is completed by the following formula: X(λ) is the spectral reflectance after black-white correction and multivariate scattering correction, λ represents the spectral band in the range of 400nm-1000nm, W f(a,b) represents the wavelet coefficient, φ a,b (λ) represents the wavelet basis function transformed by the scale factor a and the expansion factor b; the wavelet decomposition coefficients corresponding to each layer are denoised to obtain a denoised result; and the denoised result is reconstructed to obtain a denoised hyperspectral curve.
[0090] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: before training multiple groups of training data including multiple sample hyperspectral images and multiple sample pollution levels to obtain an insulator pollution level classification model, the multiple groups of training data are divided into training sets and test sets according to a predetermined ratio; a partial least squares model PLS is established for the preprocessed test set and training set to calculate the absolute value weight of the regression coefficient in each sampling process; a decaying exponential function is used to remove wavelengths with smaller absolute value weights of the regression coefficient in each established partial least squares model PLS to retain a predetermined number of wavelengths; the above steps are repeated until the number of times the partial least squares model PLS is established reaches a preset number of sampling times, the calculation is stopped, and the wavelength in the subset that minimizes the root mean square error of the partial least squares model PLS is selected as the characteristic wavelength.
[0091] According to another aspect of an embodiment of the present invention, a processor is further provided, and the processor is used to run a program, wherein when the program is run, any one of the above-mentioned insulator pollution level classification methods is executed.
[0092] According to another aspect of an embodiment of the present invention, a computer program product is provided, comprising computer instructions, which, when executed by a processor, execute any one of the above-mentioned methods for classifying insulator pollution levels.
[0093] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0094] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0095] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0096] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0097] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0098] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0099] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for classifying insulator pollution levels, characterized in that: include: Acquire a hyperspectral image of a target insulator, wherein the hyperspectral image is an image acquired by collecting images of the target insulator by a hyperspectral imager; Preprocessing the hyperspectral image to obtain a target hyperspectral image; The target hyperspectral image is input into an insulator pollution level classification model, so as to process the target hyperspectral image using the insulator pollution level classification model to obtain the pollution level of the target insulator corresponding to the target hyperspectral image, wherein the insulator pollution level classification model is a model obtained by machine learning training using multiple sets of training data, each of the multiple sets of training data includes: a sample hyperspectral image and a sample pollution level corresponding to the sample hyperspectral image; The target insulators are classified according to the pollution levels to obtain classification results.
2. The method for classifying insulator pollution levels according to claim 1, characterized in that: Before inputting the target hyperspectral image into the insulator pollution level classification model to process the target hyperspectral image using the insulator pollution level classification model to obtain the pollution level of the target insulator corresponding to the target hyperspectral image, the method further includes: Acquire a plurality of said sample hyperspectral images and a plurality of sample contamination levels corresponding to said plurality of hyperspectral images; A plurality of groups of training data including a plurality of the sample hyperspectral images and a plurality of the sample pollution levels are trained to obtain the insulator pollution level classification model.
3. The method for classifying insulator contamination levels according to claim 2, characterized in that: Acquiring a plurality of the sample hyperspectral images and a plurality of sample contamination levels corresponding to the plurality of the hyperspectral images comprises: preparing a mixed artificial waste liquid including different solutes and kaolin to obtain a test sample; The test samples are grouped according to the ratio of sodium chloride NaCl and calcium sulfate CaSO4 to obtain multiple groups of test samples, wherein the multiple groups of test samples have different electrical conductivities; Adhere the plurality of test samples to an insulating sheet to obtain a plurality of insulating sheet samples with different pollution degrees; Using the hyperspectral imager to collect images of the insulating sheet sample to obtain a plurality of hyperspectral images of the sample; A spectral curve formed according to the reflectance of a plurality of said sample hyperspectral images within a predetermined wavelength range; A plurality of sample contamination levels corresponding to a plurality of the hyperspectral images are obtained according to the spectral curve.
4. The method for classifying insulator pollution levels according to claim 2, characterized in that: Before training a plurality of sets of training data including a plurality of sample hyperspectral images and a plurality of sample pollution levels to obtain the insulator pollution level classification model, the method further includes: preprocessing the plurality of sample hyperspectral images, The preprocessing of the plurality of sample hyperspectral images comprises: The sample hyperspectral image is subjected to black-and-white correction by a first formula to obtain the sample hyperspectral image after black-and-white correction, wherein the first formula is: R ci Indicates the reflectivity of the black and white correction, sample ci Represents the original spectral emissivity, dark ci Indicates the black calibration reflectance, white ci represents the white calibration reflectance; The average sample spectral vector of the sample hyperspectral image after black-and-white correction is calculated by a second formula, wherein the second formula is: X represents an n*p spectral data matrix, n is the number of sample hyperspectral images, p represents the number of wavelengths of the spectrum, i represents the i-th sample hyperspectral image, j represents the j-th band, represents the average sample spectrum vector obtained by averaging the original spectra of each band of all the sample hyperspectral images; The sample hyperspectral image and the standard spectrum are subjected to a univariate linear regression through the third formula to obtain a linear translation and gradient processing of the spectrum corresponding to each sample hyperspectral image relative to the standard spectrum, and obtain a processing result, wherein the third formula is: X i represents a 1*p matrix, m i and b i All represent relative migration coefficients; The processing result is subjected to multivariate scattering correction by using a fourth formula to obtain a multivariate scattering correction result, wherein the fourth formula is: X i and X i(MSC) The translation obtained by the univariate linear regression is the hyperspectral curve after MSC correction.
5. The method for classifying insulator pollution levels according to claim 4, characterized in that: After preprocessing the plurality of sample hyperspectral images, the method further includes: The preprocessed sample hyperspectral image is subjected to multi-layer classification using a wavelet basis to obtain the wavelet decomposition coefficients corresponding to each layer, wherein the multi-layer classification is completed by the following formula: X(λ) is the spectral reflectance after the black-white correction and the multivariate scattering correction, λ represents the spectral band in the range of 400nm-1000nm, W f(a,b) represents the wavelet coefficient, φ a,b (λ) represents the wavelet basis function transformed by the scale factor a and the scaling factor b; Performing denoising processing on the wavelet decomposition coefficients corresponding to each layer to obtain a denoising processing result; The denoising result is reconstructed to obtain a denoised hyperspectral curve.
6. The method for classifying insulator pollution levels according to claim 4, characterized in that: Before training a plurality of sets of training data including a plurality of sample hyperspectral images and a plurality of sample pollution levels to obtain the insulator pollution level classification model, the method further includes: Dividing the multiple sets of training data into training sets and test sets according to a predetermined ratio; A partial least squares model PLS is established for the preprocessed test set and the training set to calculate the absolute value weight of the regression coefficient in each sampling process; Using an attenuation exponential function to remove wavelengths with smaller absolute value weights of regression coefficients in the partial least squares model PLS established each time, so as to retain a predetermined number of wavelengths; Repeat the above steps until the number of times the partial least squares model PLS is established reaches a preset sampling number, stop the calculation, and select the wavelength in the subset that minimizes the root mean square error of the partial least squares model PLS as the characteristic wavelength.
7. The method for classifying insulator pollution levels according to claim 4, characterized in that: Training multiple groups of training data including multiple sample hyperspectral images and multiple sample pollution levels to obtain the insulator pollution level classification model also includes: The population is initialized using henon mapping, and the optimal parameters of the XGBoost model are found using the WOA optimization algorithm, wherein the XGBoost model is the basic model of the insulator pollution level classification model; Using the parameters of the XGBoost model as the vector content of the population individuals, and using the loss function of the XGBoost model as the fitness function; Set the maximum number of iterations and the initial population size of whales; Use Henon mapping to initialize the Whale Optimization Algorithm WOA population; Calculate the fitness function of each individual in the whale population, update the individual position of the population, and record the optimal fitness function value and the parameters of the XGBoost model; Calculate the fitness function of each individual in the whale population and update the individual positions of the population; The optimal fitness function is found iteratively, and the optimal parameters corresponding to the optimal fitness function are used as the final training parameters of the XGBoost model, and the training set data is input for training.
8. An insulator pollution level classification device, characterized in that: include: A first acquisition unit is used to acquire a hyperspectral image of a target insulator, wherein the hyperspectral image is an image obtained by acquiring an image of the target insulator by a hyperspectral imager; A first preprocessing unit, used for preprocessing the hyperspectral image to obtain a target hyperspectral image; A processing unit is used to input the target hyperspectral image into an insulator pollution level classification model, so as to process the target hyperspectral image using the insulator pollution level classification model to obtain the pollution level of the target insulator corresponding to the target hyperspectral image, wherein the insulator pollution level classification model is a model obtained by machine learning training using multiple sets of training data, each of the multiple sets of training data includes: a sample hyperspectral image and a sample pollution level corresponding to the sample hyperspectral image; The classification unit is used to classify the target insulator according to the pollution level to obtain a classification result.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the insulator pollution level classification method according to any one of claims 1 to 7.
10. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by the processor, the insulator pollution level classification method described in any one of claims 1 to 7 is performed.
Citation Information
Cited By
Insulator pollution degree classification method based on double-attention multi-scale enhancement network
CN121305231A
