Power grid equipment texture analysis and generation method based on bidirectional interaction and physical constraint
By constructing a multimodal analysis system and a physical constraint model, high-precision analysis and generation of textures for power grid equipment were achieved, solving the problems of inaccurate material identification and non-compliant generation, improving identification accuracy, reducing errors, and increasing generation efficiency.
Patent Information
- Application Number
- CN202511443571.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-10
- Publication Date
- 2025-11-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies for managing surface textures of power grid equipment suffer from problems such as inaccurate material identification, insufficient quantification accuracy of sub-millimeter-level micro-features, and lack of physical parameter constraints in the generated textures, leading to large detection errors and unsafe generated results.
A texture parsing and generation method for power grid equipment based on bidirectional interaction and physical constraints is adopted to construct a multimodal parsing system with three levels of linkage: equipment level, part level, and material level. Combined with a physical parameter-driven generation constraint model and AI-generated dual-channel output, a closed-loop self-optimizing dynamic management system is designed.
It significantly improves the accuracy of material recognition, reduces roughness measurement error, and enhances the compliance rate and iteration efficiency of generated textures.
Smart Images

Figure CN120912913A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of digital management and intelligent manufacturing of power equipment, and particularly relates to a power grid equipment texture analysis and generation method based on bidirectional interaction and physical constraints. BACKGROUND
[0002] There are significant technical bottlenecks in the current field of power grid equipment surface texture management. Traditional detection methods rely on manual visual inspection and simple image processing algorithms, such as using HSV color space segmentation technology or SIFT feature matching method, which can only achieve rough analysis of the overall appearance of the equipment, cannot distinguish surface textures with similar materials but different physical characteristics (such as the difference between aluminum alloy and galvanized steel oxide layer), and the quantitative precision of sub-millimeter micro features (such as crack propagation direction and surface roughness distribution) is insufficient. Experimental data shows that the measurement error fluctuation range can reach ±32%. In terms of texture generation, existing technologies are mostly based on general generative adversarial networks, which can generate visually realistic texture patterns, but lack constraints on key physical parameters such as material conductivity and thermal expansion coefficient, resulting in safety hazards in the generated results (tests show that 12% of the generated samples have a breakdown voltage lower than the IEC 62271 standard requirement).
[0003] In addition, existing data management systems mostly use isolated relational database architecture, and texture features are not effectively associated with device 3D models, operation and maintenance history records, and other data, making it difficult to support predictive maintenance decisions based on aging trends. SUMMARY
[0004] In view of the deficiencies of the prior art, the purpose of the present application is to provide a power grid equipment texture analysis and generation method based on bidirectional interaction and physical constraints, which analyzes multi-modal feature data by constructing a three-level linkage multi-modal analysis system of device level, part level and material level, develops a physical parameter driven generation constraint model and an AI generation double-channel output to ensure that the generated texture meets industry standards, and designs a closed-loop self-optimizing dynamic management system to realize continuous mining of data value and autonomous evolution of model performance.
[0005] The present application provides a power grid equipment texture analysis and generation method based on bidirectional interaction and physical constraints, comprising the following steps:
[0006] S1. Obtain device image data;
[0007] S2. Construct an initial power grid equipment texture intelligent analysis and generation model; the initial power grid equipment texture intelligent analysis and generation model comprises a feature extraction module, a segmentation and positioning module, a feature quantization module and a texture generation module;
[0008] S3. Training the initial power grid equipment texture intelligent parsing generation model based on dynamic loss and negative sample suppression of user feedback to obtain a power grid equipment texture intelligent parsing generation model;
[0009] S4. Based on the power grid equipment texture intelligent parsing generation model, actual power grid equipment texture parsing generation is performed.
[0010] The feature extraction module is based on EfficientNetV2-M, which first pre-processes the input device image data, then improves the network structure, and finally optimizes the output to obtain device image feature data;
[0011] The feature extraction module specifically comprises the following steps:
[0012] The input device image data is subjected to adaptive histogram equalization enhancement to enhance contrast and is scaled to a preset resolution; a bicubic interpolation algorithm is used to maintain the geometric characteristics unchanged during the process;
[0013] Noise is suppressed by Gaussian low-pass filtering;
[0014] A channel attention mechanism is introduced in the MBConv module in EfficientNetV2-M to dynamically adjust the feature channel weight, which is represented by the following formula: , wherein F is the input feature map; is the first layer full connection weight matrix; is the second layer full connection weight matrix; is a Sigmoid function;
[0015] In the feature fusion stage of EfficientNetV2-M, the feature maps of the shallow, middle and deep layers of the network are respectively upsampled to the same size and then concatenated in the channel;
[0016] The cross-entropy loss is calculated using a label smoothing strategy The output of the feature extraction module is optimized, and the following formula is used for calculation:
[0017] , wherein, is a smoothing coefficient; K is the total number of device model categories; y is the real category label; is the probability value corresponding to the real category in the predicted probability distribution; is the probability value corresponding to the non-real category in the predicted probability distribution.
[0018] The segmentation and positioning module is based on HRNet-W48 and introduces an OCR architecture, which first performs pixel-level segmentation and then realizes spatial positioning based on the segmentation mask, specifically:
[0019] Four groups of preset resolution branches are maintained in parallel, and details are reserved by repeating multi-scale fusion;
[0020] An OCR module is introduced to calculate a region feature similarity matrix The segmentation boundary is optimized, and the region feature similarity matrix is expressed using the following formula: ; wherein N is the total number of pixels to be segmented in the image; k is the index of the class or region; is the feature representation vector of the i-th pixel; is the context feature vector of the class or region k;
[0021] For the pixel-level segmentation, a boundary-sensitive loss function is designed based on cross-entropy loss , which is expressed using the following formula: ; wherein is the set of part boundary pixels; is the predicted probability of the pixel point; is the true class label of the pixel point; is a weight decay function that decays with the distance of the pixel to the boundary, which is calculated using the following formula: ; wherein is the Euclidean distance of the pixel to the boundary; is the decay coefficient;
[0022] By performing connected component analysis and minimum bounding rectangle extraction on each segmented region, the coordinate boundary information of each part in the image is obtained.
[0023] The feature quantization module models and quantizes the material texture from three aspects of spatial domain, frequency domain and physical properties;
[0024] The feature quantization module first improves the LBP-TOP operator to extract three-dimensional texture features, then uses continuous wavelet transform to extract texture time-frequency features, and finally introduces the proxy feature of electrical conductivity to enhance the physical consistency and distinguishability of the material generation result in the aspect of physical properties.
[0025] The extraction of the three-dimensional texture feature is specifically:
[0026] LBP features are calculated on the X-Y, X-T and Y-T orthogonal screens, respectively, wherein the time axis T is constructed by a plurality of image sequences;
[0027] For each plane, the rotation-invariant uniform pattern is calculated using the following formula:
[0028] wherein, P is the number of neighborhood points; R is the neighborhood radius; riu2 is a rotation invariant uniform pattern operator; is the neighborhood pixel gray difference function value; is the binary coding result of the difference mode; is the field pixel gray value; is the center pixel gray value;
[0029] The texture time-frequency feature is extracted by using the continuous wavelet transform, and specifically, the texture time-frequency feature is extracted by using the continuous wavelet transform.
[0030] The Mrolet wavelet is used as the mother wavelet, and the frequency domain is represented by the following formula: ; wherein, is the center frequency;
[0031] The wavelet coefficient energy in the scale a and the translation b is calculated , and the following formula is used for calculation: ; wherein, N is the number of signal sampling points; is the continuous wavelet coefficient in the scale a and the translation b;
[0032] The mapping relationship between the energy spectrum and the surface roughness is established by using the multiple linear regression, and the following formula is used for representation: ; wherein, is the wavelet coefficient energy value corresponding to the scale .
[0033] The proxy feature of the electrical conductivity is introduced, and specifically, the proxy feature of the electrical conductivity is introduced , and the following formula is used for calculation: ; wherein, is the gray mean value; is the local variance of the LBP feature; is the wavelet energy spectrum; is the first fitting coefficient; is the second fitting coefficient; is the third fitting coefficient.
[0034] The texture generation module generates the texture through a double channel, including: constructing a parameterized template library; multi-scale noise superposition, driving the texture generation through the template;
[0035] Constructing a physical constraint diffusion model; generating the texture based on the model.
[0036] The construction of the parameterized template library includes:
[0037] An acquisition standard template is obtained, and a unified parameterized description is performed; the parameters include geometric parameters, physical parameters, and texture parameters; the geometric parameters include a curvature radius and an inclination angle; the physical parameters include electrical conductivity and thermal conductivity; and the texture parameters include Perlin noise intensity and frequency;
[0038] The B-spline surface interpolation is used to control the template topography, specifically as follows:
[0039] For a given control point network , a to-be-adjusted surface is generated, and the following formula is used to represent the to-be-adjusted surface: ; wherein, is a p-th B-spline base function; i is an index in the lateral direction of the control point grid; is a q-th B-spline base function; j is an index in the longitudinal direction of the control point grid; is a control point coordinate; is a parameter domain coordinate; n is the lateral length of the control point grid; and m is the longitudinal length of the control point grid;
[0040] The multi-scale noise superposition is specifically as follows:
[0041] The Perlin noise of a preset number of layers is used to simulate the micro topography of the surface, and the following formula is used to represent the Perlin noise: ; wherein, K is the preset number of Perlin noise layers; is the frequency of the k-th layer of noise; is the weight of the k-th layer of noise; is the two-dimensional coordinate of the current pixel in the template grid; each layer of Perlin noise disturbs the template texture at different frequencies, and the superposition simulates the rough surface structure and details of the complex material;
[0042] The construction of the physical constraint diffusion model includes:
[0043] The pre-trained ResNet-18 regression network is used to calculate the electrical conductivity prediction value and the thermal conductivity prediction value of the generated texture;
[0044] Based on the obtained electrical conductivity prediction value and the thermal conductivity prediction value, a physical property constraint is introduced to obtain a physical constraint loss function, and the following formula is used to calculate the physical constraint loss function: ; wherein, is the electrical conductivity prediction value; is the thermal conductivity prediction value; is a target value of the electrical conductivity of the texture; is a target value of the thermal conductivity of the texture; is a first constraint weight; is a second constraint weight;
[0045] The latent diffusion optimization is performed based on the loss function; in the diffusion process in the latent space, the electrical conductivity and the thermal conductivity are projected into a physical constraint vector through linear mapping, and the following formula is used to represent: ; wherein, is the first to-be-trained parameter; is the second to-be-trained parameter; Q is a physical condition projection matrix, which is injected into the diffusion network;
[0046] The physical condition projection matrix Q participates in feature regulation through a cross-attention mechanism, and the following formula is used to represent: ; wherein, K is a key matrix in the attention mechanism; V is a value matrix in the attention mechanism; and d is a dimension scaling factor of the feature vector.
[0047] The initial power grid equipment texture intelligent analysis generation model further includes a dynamic verification module; the dynamic verification module performs the following steps:
[0048] The LBP histogram of the generated texture and the LBP histogram of the standard template are calculated;
[0049] The Bhattacharyya coefficient is used to quantify the distribution difference, and when the distribution difference exceeds a preset threshold, parameter optimization based on gradient descent is started.
[0050] The Bhattacharyya coefficient is used to quantify the distribution difference, and the following formula is used to calculate: ; wherein, is the distribution difference quantified by the Bhattacharyya coefficient; is the i-th bin of the LBP histogram of the generated texture; is the i-th bin of the LBP histogram of the standard template;
[0051] The parameter optimization based on gradient descent is represented by the following formula: ; wherein, is the model parameter vector of the current iteration; is the updated model parameter vector; is the learning rate; is the gradient of the loss function with respect to the parameter; is a regularization term introduced in the optimization process; the distribution difference is recalculated after each update of the parameter , until the distribution difference is less than or equal to a preset threshold.
[0052] Step S3 specifically includes:
[0053] fusing a basic loss with user feedback to define a composite loss , which is represented by the following formula: ; wherein, is a user feedback sample; is a user expected output; is a model actual output after inputting the user feedback sample; M is a total number of feedback samples; is a feedback weight, which is expressed by using the following formula: ;
[0054] The basic loss includes a perceptual loss , a loss and a weighted combination of an SSIM loss , which is expressed by using the following formula: ; wherein, is a first experience weight; is a second experience weight; is a third experience weight;
[0055] By extracting a Fourier descriptor of a defect texture sample, a negative discriminant space is constructed; in each sampling of the model for texture generation, a rejection condition is added, which is expressed by using the following formula: ; wherein, is a Fourier frequency domain descriptor of a current generated texture sample; is a mean value of Fourier descriptors of defect texture samples in the negative discriminant space; is a similarity measure function; is a rejection threshold; when the rejection condition is met, it is judged that the current generated texture is similar to the defect sample in the frequency domain, the generated texture sample this time is regarded as a potential defect map, the current sampling is rejected and the worker is informed to check the situation.
[0056] The power grid equipment texture analysis and generation method based on bidirectional interaction and physical constraints further includes, when migrating across device knowledge, adopting domain adversarial training to reduce the training data requirement of a new device model;
[0057] The domain adversarial training is specifically: a generator G and a discriminator D are constructed, and the following formula is used to express an optimization target: ; wherein, is a feature distribution of a source domain sample; is a feature distribution of a target domain sample; is an output distribution of the generator G; is a classification result of the discriminator D; is an adversarial loss function; is a regularization constraint term.
[0058] The application discloses a power grid equipment texture analysis and generation method based on bidirectional interaction and physical constraints.
[0059] Compared with the prior art, the method has the following beneficial effects:
[0060] (1) The material identification accuracy is significantly improved: the traditional method has an accuracy of 76.2%, and the application improves to 98.1%, with an improvement of 21.9%;
[0061] (2) The roughness measurement error is greatly reduced: the traditional method has an error of ±0.12 microns, and the application is optimized to ±0.03 microns, with an error reduction of 75%;
[0062] (3) The generation texture compliance rate is significantly improved: the traditional method has a compliance rate of 68.7%, and the application improves to 99.3%, with an improvement of 30.6%;
[0063] (4) The scheme iteration efficiency is significantly enhanced: the traditional method needs 3.2 hours / time, and the application is shortened to 0.4 hours / time, with an efficiency improvement of 87.5%. BRIEF DESCRIPTION OF DRAWINGS
[0064] Figure 1 is a flowchart of the method of the application;
[0065] Figure 2 is a before-and-after diagram of texture analysis and generation of a silicon steel sheet image in an embodiment of the application by the method of the application; wherein, Figure 2 A is an input image of a silicon steel sheet, Figure 2 B is a texture image of a silicon steel sheet generated by the method of the application;
[0066] Figure 3 is a before-and-after diagram of texture analysis and generation of a power capacitor shell image in an embodiment of the application by the method of the application; Figure 3 A is an input image of a power capacitor shell, Figure 3 B is a texture image of a power capacitor shell generated by the method of the application. DETAILED DESCRIPTION
[0067] The application provides a power grid equipment texture analysis and generation method based on bidirectional interaction and physical constraints, and a flowchart thereof is shown in Figure 1 The method comprises the following steps:
[0068] S1. Obtain device image data;
[0069] S2. Construct an initial power grid device texture intelligent analysis generation model; the initial power grid device texture intelligent analysis generation model comprises a feature extraction module, a segmentation positioning module, a feature quantization module and a texture generation module;
[0070] The feature extraction module is based on EfficientNetV2-M, and first performs preprocessing on the input device image data, then improves the network structure, and finally optimizes the output to obtain device image feature data;
[0071] The feature extraction module specifically comprises the following steps:
[0072] The input device image data is subjected to adaptive histogram equalization enhancement to enhance contrast and is scaled to a preset resolution; a bicubic interpolation algorithm is used to keep the geometric characteristics unchanged during the process;
[0073] Noise is suppressed by Gaussian low-pass filtering;
[0074] The channel attention mechanism is introduced in the MBConv module in EfficientNetV2-M, and the feature channel weight is dynamically adjusted, which is expressed by the following formula: , wherein F is the input feature map; is the first layer full connection weight matrix; is the second layer full connection weight matrix; is the Sigmoid function;
[0075] In the feature fusion stage of EfficientNetV2-M, the feature maps of the shallow, middle and deep layers of the network are respectively upsampled to the same size and then concatenated in the channel;
[0076] The label smoothing strategy is used to calculate the cross-entropy loss , the output of the feature extraction module is optimized, and the following formula is used to calculate:
[0077] , wherein, is the smoothing coefficient; K is the total number of device model categories; y is the real category label; is the probability value corresponding to the real category in the predicted probability distribution; is the probability value corresponding to the non-real category in the predicted probability distribution.
[0078] The segmentation positioning module is based on HRNet-W48, and the OCR architecture is introduced, which first performs pixel-level segmentation, and then realizes spatial positioning based on the segmentation mask, specifically:
[0079] Four preset resolution branches are maintained in parallel, and details are reserved by repeated multi-scale fusion;
[0080] An OCR module is introduced to calculate a region feature similarity matrix The segmentation boundary is optimized, and the region feature similarity matrix is represented by the following formula: ; wherein N is the total number of pixels to be segmented in the image; k is the index of the category or region; is the feature representation vector of the i-th pixel; is the context feature vector of the category or region k;
[0081] For the pixel-level segmentation, a boundary-sensitive loss function is designed based on the cross-entropy loss , which is represented by the following formula: ; wherein is the set of part boundary pixels; is the predicted probability of the pixel point; is the true category label of the pixel point; is a weight decay function that decays with the distance of the pixel to the boundary, calculated by the following formula: ; wherein is the Euclidean distance of the pixel to the boundary; is the decay coefficient;
[0082] By performing connected component analysis and minimum bounding rectangle extraction on each segmented region, the coordinate boundary information of each part in the image is obtained.
[0083] The feature quantization module models and quantizes the material texture from three aspects of spatial domain, frequency domain and physical properties;
[0084] The feature quantization module first improves the LBP-TOP operator to extract three-dimensional texture features, then uses continuous wavelet transform to extract texture time-frequency features, and finally introduces the proxy feature of electrical conductivity to enhance the physical consistency and distinguishability of the material generation result in the aspect of physical properties.
[0085] The extraction of the three-dimensional texture feature is specifically:
[0086] LBP features are calculated on the X-Y, X-T and Y-T orthogonal screens, respectively, wherein the time axis T is constructed by a plurality of image sequences;
[0087] For each plane, the rotation-invariant uniform pattern is calculated by the following formula:
[0088] wherein P is the number of neighborhood points; R is the neighborhood radius; riu2 is the rotation invariant uniform pattern operator; is the neighborhood pixel gray difference function value; is the binary coding result of the difference mode; is the field pixel gray value; is the center pixel gray value;
[0089] The texture time-frequency feature is extracted by using the continuous wavelet transform, and specifically, the texture time-frequency feature is extracted by using the continuous wavelet transform.
[0090] The Mrolet wavelet is used as the mother wavelet, and the frequency domain is expressed by using the following formula: wherein, is the center frequency;
[0091] The wavelet coefficient energy in the scale a and the translation b is calculated , and the following formula is used for calculation: wherein N is the number of signal sampling points; is the continuous wavelet coefficient in the scale a and the translation b;
[0092] The mapping relationship between the energy spectrum and the surface roughness is established by using the multiple linear regression, and the following formula is used for expression: wherein, is the wavelet coefficient energy value corresponding to the scale .
[0093] The proxy feature of the electrical conductivity is introduced, and specifically, the proxy feature of the electrical conductivity is introduced , and the following formula is used for calculation: wherein, is the gray mean value; is the local variance of the LBP feature; is the wavelet energy spectrum; is the first fitting coefficient; is the second fitting coefficient; is the third fitting coefficient.
[0094] The texture generation module generates the texture through the double channel, and specifically, the texture generation module generates the texture through the double channel by including the following steps: constructing a parameterized template library; superimposing multi-scale noise to generate the texture through the template driving;
[0095] constructing a physical constraint diffusion model; and generating the texture based on the model.
[0096] The construction of the parameterized template library includes:
[0097] An acquisition standard template is obtained, and a unified parameterized description is performed; the parameters include geometric parameters, physical parameters, and texture parameters; the geometric parameters include a curvature radius and an inclination angle; the physical parameters include electrical conductivity and thermal conductivity; and the texture parameters include Perlin noise intensity and frequency;
[0098] The B-spline surface interpolation is used to control the template topography, specifically as follows:
[0099] For a given control point network , a to-be-adjusted surface is generated, and the following formula is used to represent the to-be-adjusted surface: ; wherein, is a p-th B-spline base function; i is an index in the horizontal direction of the control point grid; is a q-th B-spline base function; j is an index in the vertical direction of the control point grid; is a control point coordinate; is a parameter domain coordinate; n is the horizontal length of the control point grid; and m is the vertical length of the control point grid;
[0100] The multi-scale noise superposition is specifically as follows:
[0101] The preset number of layers of Perlin noise is used to superimpose the surface micro topography, and the following formula is used to represent the superposition: ; wherein, K is the preset number of layers of Perlin noise; is the frequency of the k-th layer of noise; is the weight of the k-th layer of noise; is the two-dimensional coordinate of the current pixel in the template grid; each layer of Perlin noise is used to disturb the template texture at different frequencies, and the superposition simulates the rough surface structure and details of the complex material;
[0102] The construction of the physical constraint diffusion model includes:
[0103] The pre-trained ResNet-18 regression network is used to calculate the electrical conductivity prediction value and the thermal conductivity prediction value of the generated texture;
[0104] Based on the obtained electrical conductivity prediction value and the thermal conductivity prediction value, a physical property constraint is introduced to obtain a physical constraint loss function, and the following formula is used to calculate the physical constraint loss function: ; wherein, is the electrical conductivity prediction value; is the thermal conductivity prediction value; is a target value of the electrical conductivity of the texture; is a target value of the thermal conductivity of the texture; is a first constraint weight; is a second constraint weight;
[0105] The latent diffusion optimization is performed based on the loss function; in the diffusion process in the latent space, the electrical conductivity and the thermal conductivity are projected into a physical constraint vector through linear mapping, and the following formula is used to represent: ; wherein, is the first to-be-trained parameter; is the second to-be-trained parameter; Q is a physical condition projection matrix, which is injected into the diffusion network;
[0106] The physical condition projection matrix Q participates in feature regulation through a cross-attention mechanism, and the following formula is used to represent: ; wherein, K is a key matrix in the attention mechanism; V is a value matrix in the attention mechanism; and d is a dimension scaling factor of the feature vector.
[0107] The initial power grid equipment texture intelligent analysis generation model further comprises a dynamic verification module; the dynamic verification module comprises the following steps:
[0108] The LBP histogram of the generated texture and the LBP histogram of the standard template are calculated;
[0109] The Bhattacharyya coefficient is used to quantify the distribution difference, and when the distribution difference exceeds a preset threshold, parameter optimization based on gradient descent is started.
[0110] The Bhattacharyya coefficient is used to quantify the distribution difference, and the following formula is used to calculate: ; wherein, is the distribution difference quantified by the Bhattacharyya coefficient; is the i-th bin of the LBP histogram of the generated texture; is the i-th bin of the LBP histogram of the standard template;
[0111] The parameter optimization based on gradient descent is represented by the following formula: ; wherein, is the model parameter vector of the current iteration; is the updated model parameter vector; is the learning rate; is the gradient of the loss function with respect to the parameter; is a regularization term introduced in the optimization process; the distribution difference is recalculated after each update of the parameter , until the distribution difference is less than or equal to a preset threshold.
[0112] S3. Based on user feedback, dynamic loss and negative sample suppression, the initial power grid equipment texture intelligent analysis generation model is trained to obtain a power grid equipment texture intelligent analysis generation model;
[0113] Step S3 is specifically:
[0114] Fusion base loss With user feedback, define composite loss , expressed as follows: ; wherein, User feedback samples; User expected output; Actual output of the model after inputting the user feedback sample; M is the total number of feedback samples; Feedback weight, expressed as follows: ;
[0115] The base loss includes a perceptual loss , Loss and a weighted combination of SSIM loss , expressed as follows: ; wherein, The first empirical weight; The second empirical weight; The third empirical weight;
[0116] By extracting the Fourier descriptor of the defect texture sample, a negative discriminant space is constructed; in each sampling of the model, a rejection condition is added, expressed as follows: ; wherein, The Fourier frequency domain descriptor of the current generated texture sample; The mean of the Fourier descriptor of the defect texture sample in the negative discriminant space; Similarity measure function; Rejection threshold; when the rejection condition is met, it is judged that the current generated texture is similar to the defect sample in the frequency domain, and the generated texture sample is regarded as a potential defect map, the current sampling is rejected and the worker is notified to check the situation.
[0117] S4. Based on the power grid equipment texture intelligent analysis generation model, the actual power grid equipment texture analysis generation is carried out.
[0118] The power grid equipment texture analysis and generation method based on bidirectional interaction and physical constraint further comprises adopting domain adversarial training when migrating across device knowledge, reducing the demand for new device model training data;
[0119] The domain adversarial training is specifically: a generator G and a discriminator D are constructed, and the following formula is used to express the optimization target: ; wherein, Feature distribution of source domain sample; Feature distribution of target domain sample; for the output distribution of the generator G; for the classification result of the discriminator D; for the adversarial loss function; for the regularization constraint term.
[0120] The method of the present application is further described below in combination with an embodiment:
[0121] The images of the commonly used material silicon steel sheet in power transformers and the pictures of the outer shell of power capacitors are respectively used as the input device pictures, and the texture analysis and generation are performed using the method of the present application, and the results obtained are as shown in Figure 2 , Figure 3 , Figure 2 A is the input image of the silicon steel sheet, Figure 2 B is the texture image of the silicon steel sheet generated by the method of the present application; Figure 3 A is the input image of the outer shell of the power capacitor, Figure 3 B is the texture image of the outer shell of the power capacitor generated by the method of the present application.
Claims
1. A method for power grid device fingerprinting and generation based on bidirectional interaction and physical constraints, characterized in that, The method comprises the following steps: S1. Obtain device image data; S2. Construct an initial power grid device texture intelligent analysis generation model; the initial power grid device texture intelligent analysis generation model comprises a feature extraction module, a segmentation and positioning module, a feature quantization module, and a texture generation module; S3. Train the initial power grid device texture intelligent analysis generation model based on dynamic loss and negative sample suppression of user feedback to obtain a power grid device texture intelligent analysis generation model; S4. Perform actual power grid device texture analysis and generation based on the power grid device texture intelligent analysis generation model.
2. The method of claim 1, wherein, The feature extraction module is based on EfficientNetV2-M, and the input device image data is preprocessed, the network structure is improved, and finally the output is optimized to obtain device image feature data; The feature extraction module specifically comprises the following steps: The input device image data is subjected to adaptive histogram equalization enhancement to enhance contrast and is scaled to a preset resolution; a bicubic interpolation algorithm is used to keep the geometric characteristics unchanged during the process; Gaussian low-pass filtering is used to suppress noise; The channel attention mechanism is introduced in the MBConv module in the EfficientNetV2-M, and the feature channel weight is dynamically adjusted, and the following formula is used to represent: ; wherein F is an input feature map; is a first layer full connection weight matrix; is a second layer full connection weight matrix; is a Sigmoid function; In the feature fusion stage of EfficientNetV2-M, the feature maps of the shallow, middle and deep layers are respectively upsampled to the same size and then concatenated in the channel; Calculating cross-entropy loss using label smoothing strategy The output of the feature extraction module is optimized using the following equation: wherein, is the smoothing coefficient; K is the total number of device model categories; y is the true class label; is the probability value corresponding to the true class in the predicted probability distribution; is the probability value corresponding to the non-true class in the predicted probability distribution.
3. The method of claim 1, wherein, The segmentation and positioning module is based on HRNet-W48 and introduces an OCR architecture, which first performs pixel-level segmentation and then realizes spatial positioning based on the segmentation mask, specifically: Four groups of preset resolution branches are maintained in parallel, and details are preserved through repeated multi-scale fusion; Introducing an OCR module, by computing a region feature similarity matrix Optimizing the segmentation boundary, the region feature similarity matrix is represented using the following equation: ; wherein N is the total number of pixels to be segmented in the image; k is the index of the class or region; is the feature representation vector of the i-th pixel; is the context feature vector of the class or region k; For the pixel-level segmentation, a boundary-sensitive loss function is designed based on cross-entropy loss , which is expressed using the following formula: ; wherein, is a set of part boundary pixels; is a predicted probability of a pixel point; is a true class label of a pixel point; is a weight decay function that decays with the distance of a pixel to the boundary, which is calculated using the following formula: ; wherein, is the Euclidean distance of a pixel to the boundary; is a decay coefficient; The coordinates and boundary information of each part in the image are obtained by performing connected component analysis and minimum bounding rectangle extraction on each segmented region.
4. The method of claim 1, wherein, The feature quantization module models and quantizes the material texture from three aspects of spatial domain, frequency domain and physical characteristics; The feature quantization module first improves the LBP-TOP operator to extract three-dimensional texture features; Then, continuous wavelet transform is used to extract texture time-frequency features; Finally, the proxy feature of electrical conductivity is introduced to enhance the physical consistency and distinguishability of the material generation result in terms of physical characteristics.
5. The method of claim 4, wherein, The extraction of three-dimensional texture features specifically comprises: LBP features are calculated on the X-Y, X-T and Y-T orthogonal screens, wherein the time axis T is constructed by a plurality of image sequences; For each plane, the rotationally invariant uniform pattern is calculated using the following formula: wherein P is a number of neighborhood points; R is a neighborhood radius; riu2 is a rotation invariant uniform pattern operator; is a neighborhood pixel gray scale difference function value; is a binary coding result of the difference pattern; is a field pixel gray scale value; is a center pixel gray scale value; The extraction of texture time-frequency features using continuous wavelet transform specifically comprises: Using Mrolet wavelet as the mother wavelet, the frequency domain is expressed by the following formula: ; wherein, is the center frequency; Wavelet coefficient energy is calculated in scale a, translation b range , using the following formula: ; wherein N is the number of signal sampling points; is the continuous wavelet coefficient in scale a, translation b. A mapping relationship between the energy spectrum and the surface roughness is established by multiple linear regression , which is expressed by the following equation: ; wherein, is the wavelet coefficient energy value corresponding to the scale . The proxy feature of the introduction of the electrical conductivity, specifically the introduction of the electrical conductivity trend estimation value , is calculated using the following formula: ; wherein, is the mean of the gray scale; is the local variance of the LBP feature; is the wavelet energy spectrum; is the first fitting coefficient; is the second fitting coefficient; is the third fitting coefficient.
6. The method of claim 1, wherein, The texture generation module generates texture through a double-channel, including: constructing a parameterized template library; multi-scale noise superposition to generate texture through template driving; Constructing a physically constrained diffusion model to generate texture based on the model.
7. The method of claim 6, wherein, The construction of the parameterized template library comprises: Standard templates are obtained and uniformly parameterized; the parameters include geometric parameters, physical parameters, and texture parameters; the geometric parameters include curvature radius and inclination; the physical parameters include electrical conductivity and thermal conductivity; the texture parameters include Perlin noise intensity and frequency; B-spline surface interpolation is used to control the template topography, specifically: For a given control point network , the surface to be adjusted is generated using the following equation: ; where is a pth order B-spline basis function; i is an index in the lateral direction of the control point grid; is a qth order B-spline basis function; j is an index in the longitudinal direction of the control point grid; is a control point coordinate; is a parametric domain coordinate; n is the length of the control point grid in the lateral direction; m is the length of the control point grid in the longitudinal direction; The multi-scale noise superposition specifically comprises: The preset number of layers of Perlin noise is used to simulate the surface micro topography, and the following formula is used to represent: ; wherein K is the preset number of layers of Perlin noise; is the frequency of the kth layer of noise; is the weight of the kth layer of noise; is the two-dimensional coordinate of the current pixel in the template grid; each layer of Perlin noise disturbs the template texture at different frequencies, and after superposition, the rough surface structure and details of the complex material are simulated. The construction physical constraint diffusion model comprises: The conductivity prediction value and the thermal conductivity prediction value of the generated texture are calculated based on a pre-trained ResNet-18 regression network; Based on the obtained conductivity prediction value and the thermal conductivity prediction value, a physical property constraint is introduced to obtain a physical constraint loss function, and the following formula is used to calculate: ; wherein, is the conductivity prediction value; is the thermal conductivity prediction value; is the texture conductivity target value; is the texture thermal conductivity target value; is the first constraint weight; is the second constraint weight; The latent diffusion optimization is performed based on the loss function; in the diffusion process in the latent space, the electrical conductivity and the thermal conductivity are projected into a physical constraint vector through linear mapping, and the following formula is used to represent: ; wherein, is the first to be trained parameter; is the second to be trained parameter; Q is a physical condition projection matrix, which is injected into the diffusion network; The physical condition projection matrix Q participates in feature regulation through cross attention mechanism, and is expressed by using the following formula: ; wherein, K is a key matrix in the attention mechanism; V is a value matrix in the attention mechanism; and d is a dimension scaling factor of the feature vector.
8. The method of claim 1, wherein, The initial power grid equipment texture intelligent analysis generation model further comprises a dynamic verification module; the dynamic verification module comprises the following steps: An LBP histogram of the generated texture and an LBP histogram of a standard template are calculated; The distribution difference is quantified by using a Bhattacharyya coefficient, and when the distribution difference exceeds a preset threshold, parameter optimization based on gradient descent is started; The Bhattacharyya quantification of distribution difference is used, and the following formula is used to calculate: ; wherein, is the Bhattacharyya quantification of distribution difference; is the i-th bin of the LBP histogram of the generated texture; is the i-th bin of the LBP histogram of the standard template. The gradient descent based parameter optimization is expressed using the following equation: ; wherein, is the model parameter vector of the current iteration; is the updated model parameter vector; is the learning rate; is the gradient of the loss function with respect to the parameters; is a regularization term introduced in the optimization process; the distribution difference is recalculated after each update of the parameters until the distribution difference is less than or equal to a pre-set threshold.
9. The method of claim 1, wherein, Step S3 is specifically: Fusing base loss With user feedback, define compound loss , which is expressed using the following equation: ; wherein, is a user feedback sample; is a user expected output; is an actual output of the model after inputting the user feedback sample; and M is the total number of feedback samples; is a feedback weight, which is expressed using the following equation: ; the base loss a weighted combination of the perception loss , the loss, and the SSIM loss is expressed using the following equation: ; wherein, is a first empirical weight; is a second empirical weight; is a third empirical weight; A negative discriminant space is constructed by extracting Fourier descriptors of the defective texture samples; a rejection condition is added in the texture generation at each sampling of the model, which is expressed by the following formula: ; wherein, is the Fourier descriptor of the current generated texture sample; is the mean of the Fourier descriptors of the defective texture samples in the negative discriminant space; is a similarity measure function; is a rejection threshold; when the rejection condition is met, it is judged that the current generated texture is similar to the defective sample in the frequency domain, the generated texture sample is regarded as a potential defect map, the current sampling is rejected and the staff is notified to check the situation.
10. The method of claim 1, wherein, The power grid equipment texture analysis and generation method based on bidirectional interaction and physical constraint further comprises that when cross-device knowledge migration is performed, domain adversarial training is adopted to reduce the training data requirement of a new device model. The domain adversarial training is specifically: constructing a generator G and a discriminator D, and the following formula is used to represent an optimization target: ; wherein, is a feature distribution of the source domain sample; is a feature distribution of the target domain sample; is an output distribution of the generator G; is a classification result of the discriminator D; is an adversarial loss function; is a regularization constraint term.