Anode electrolyte surface anomaly detection method and device, electronic equipment and storage medium

CN122510150APending Publication Date: 2026-08-04LUXCASE PRECISION TECH (YANCHENG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LUXCASE PRECISION TECH (YANCHENG) CO LTD
Filing Date
2026-03-27
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

[0003]本发明提供了一种阳极槽液的表面异常检测方法、装置、电子设备及存储介质,以解决对阳极槽液的表面进行异常检测存在检测效率较低、准确性较差且异常检测响应滞后的问题

Benefits of technology

[0008]The technical solution of this invention involves acquiring a first detection image, which is a surface image of the anolyte solution; determining multiple first feature information through a first encoder in a first detection network. The first encoder includes multiple feature extraction modules, each comprising a residual convolution and a hybrid convolutional attention module. These multiple feature extraction modules are connected in series, enabling feature extraction from the first detection image using the first encoder. The feature extraction results output by each module are used as multiple first feature information to comprehensively extract the complex features of the anolyte solution in the first detection image. A second feature information is obtained by feature fusion of the multiple first feature information through a first decoder in the first detection network. The first decoder is based on feature pyramid formation, which improves the accuracy of restoring the surface features of the anolyte solution. The third feature information, which is determined by the feature information, includes a fourth feature and/or a fifth feature. The fourth feature is a normal surface feature of the anolyte, and the fifth feature is an abnormal surface feature of the anolyte. The third feature information is masked to obtain a first mask image, and a first detection result is determined based on the first mask image. The first detection result is used to indicate whether there is a surface abnormality in the anolyte in the first detection image. The masking process sets different mask values ​​for the fourth and fifth features in the third feature information, thereby determining whether there is a surface abnormality in the anolyte in the first detection image by whether there is an area formed by the mask value corresponding to the fifth feature in the first mask image. This can effectively improve the efficiency and accuracy of anomaly detection on the surface of the anolyte, so as to respond promptly to surface abnormalities in the anolyte.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122510150A_ABST
    Figure CN122510150A_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, electronic device, and storage medium for detecting surface anomalies in anodizing bath solutions. The method includes: acquiring a first detection image, which is a surface image of the anodizing bath solution; determining multiple first feature information using a first encoder in a first detection network, the first encoder including multiple feature extraction modules; performing feature fusion on the multiple first feature information using a first decoder in the first detection network to obtain second feature information; determining third feature information based on the second feature information, the third feature information including a fourth feature and / or a fifth feature; performing masking processing on the third feature information to obtain a first mask image; and determining a first detection result based on the first mask image, the first detection result indicating whether surface anomalies exist in the anodizing bath solution in the first detection image. This solution can improve the efficiency and accuracy of anomaly detection on the surface of anodizing bath solutions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image detection technology, and in particular to a method, apparatus, electronic device, and storage medium for detecting surface anomalies in an anolyte. Background Technology

[0002] Anodic bath solutions are widely used in aluminum alloy anodizing production lines. However, during production, floating impurities or oil films may appear on the surface of the anodic bath solution, leading to problems such as uneven oxide film thickness, surface mottling, and inconsistent gloss. Therefore, anomaly detection of the anodic bath solution surface is a crucial step in ensuring process stability and product quality. Currently, anomaly detection of the anodic bath solution surface is usually performed periodically by manual inspection, which suffers from low detection efficiency, poor accuracy, and delayed response, making it difficult to effectively ensure process stability and product quality. Summary of the Invention

[0003] This invention provides a method, apparatus, electronic device, and storage medium for detecting surface anomalies in anolyte, in order to solve the problems of low detection efficiency, poor accuracy, and delayed response in anomaly detection of anolyte surface.

[0004] According to one aspect of the present invention, a method for detecting surface anomalies in an anolyte is provided, the method comprising: Acquire a first detection image, which is a surface image of the anolyte in the anolyte bath. Multiple first feature information is determined by the first encoder in the first detection network. The first encoder includes multiple feature extraction modules. Each feature extraction module includes a residual connection convolution and a hybrid convolution attention module. The multiple feature extraction modules are connected in series. The multiple feature extraction modules are used to extract features from the first detection image. The multiple first feature information includes the feature extraction results output by each feature extraction module. The first decoder in the first detection network performs feature fusion on multiple first feature information to obtain second feature information. The first decoder is formed based on the feature pyramid. The third feature information is determined based on the second feature information. The third feature information includes the fourth feature and / or the fifth feature. The fourth feature is the normal surface feature of the anolyte, and the fifth feature is the abnormal surface feature of the anolyte. The third feature information is masked to obtain a first mask image, and a first detection result is determined based on the first mask image. The first detection result is used to indicate whether there is a surface abnormality in the anolyte in the first detection image. The masking process sets different mask values ​​for the fourth and fifth features in the third feature information.

[0005] According to another aspect of the present invention, a surface anomaly detection device for anodizing bath is provided, the device comprising: The first acquisition module is used to acquire a first detection image, which is a surface image of the anolyte in the anolyte bath. The first determining module is used to determine multiple first feature information through the first encoder in the first detection network. The first encoder includes multiple feature extraction modules, each of which includes a residual connection convolution and a hybrid convolution attention module. The multiple feature extraction modules are connected in series and are used to extract features from the first detection image. The multiple first feature information includes the feature extraction results output by each feature extraction module. The second determining module is used to perform feature fusion on multiple first feature information through the first decoder in the first detection network to obtain second feature information. The first decoder is formed based on the feature pyramid. The third determining module is used to determine the third feature information based on the second feature information. The third feature information includes a fourth feature and / or a fifth feature. The fourth feature is the normal surface feature of the anolyte, and the fifth feature is the abnormal surface feature of the anolyte. The fourth determining module is used to perform masking processing on the third feature information to obtain a first mask image, and to determine a first detection result based on the first mask image. The first detection result is used to indicate whether there is a surface abnormality in the anolyte in the first detection image. The masking processing sets different mask values ​​for the fourth and fifth features in the third feature information.

[0006] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the surface anomaly detection method for anolyte solution according to any embodiment of the present invention.

[0007] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the surface anomaly detection method of anodizing bath liquid according to any embodiment of the present invention.

[0008] The technical solution of this invention involves acquiring a first detection image, which is a surface image of the anolyte solution; determining multiple first feature information through a first encoder in a first detection network. The first encoder includes multiple feature extraction modules, each comprising a residual convolution and a hybrid convolutional attention module. These multiple feature extraction modules are connected in series, enabling feature extraction from the first detection image using the first encoder. The feature extraction results output by each module are used as multiple first feature information to comprehensively extract the complex features of the anolyte solution in the first detection image. A second feature information is obtained by feature fusion of the multiple first feature information through a first decoder in the first detection network. The first decoder is based on feature pyramid formation, which improves the accuracy of restoring the surface features of the anolyte solution. The third feature information, which is determined by the feature information, includes a fourth feature and / or a fifth feature. The fourth feature is a normal surface feature of the anolyte, and the fifth feature is an abnormal surface feature of the anolyte. The third feature information is masked to obtain a first mask image, and a first detection result is determined based on the first mask image. The first detection result is used to indicate whether there is a surface abnormality in the anolyte in the first detection image. The masking process sets different mask values ​​for the fourth and fifth features in the third feature information, thereby determining whether there is a surface abnormality in the anolyte in the first detection image by whether there is an area formed by the mask value corresponding to the fifth feature in the first mask image. This can effectively improve the efficiency and accuracy of anomaly detection on the surface of the anolyte, so as to respond promptly to surface abnormalities in the anolyte.

[0009] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 A flowchart of a surface anomaly detection method for anodizing bath solution provided in an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating feature fusion via a first decoder in a first detection network, as provided in an embodiment of the present invention. Figure 3A flowchart of another surface anomaly detection method for anolyte provided in an embodiment of the present invention; Figure 4 A schematic diagram of a first encoder in a first detection network provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of residual convolution in a first encoder provided by an embodiment of the present invention; Figure 6 A schematic diagram of a hybrid convolutional attention module in a first encoder provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of a surface anomaly detection device for an anolyte solution provided in an embodiment of the present invention; Figure 8 This is a schematic diagram of an electronic device for implementing a surface anomaly detection method for anodizing bath solution, provided in an embodiment of the present invention. Detailed Implementation

[0012] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0013] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0014] Figure 1 This is a flowchart illustrating a method for detecting surface anomalies in an anolyte solution according to an embodiment of the present invention. This embodiment is applicable to situations requiring anomaly detection on the surface of an anolyte solution. The method can be executed by an anolyte solution surface anomaly detection device, which can be implemented in hardware and / or software and configured in an electronic device implementing the anolyte solution surface anomaly detection method. Figure 1As shown, the surface anomaly detection method for the anolyte includes: S101. Obtain the first detection image, which is a surface image of the anolyte in the anode bath.

[0015] In this context, the anolyte solution refers to the electrolyte solution contained in the electrolytic cell during the anodic oxidation electrolysis process. The anolyte solution is used to oxidize the metal surface, forming an oxide film. Furthermore, a first detection image can be obtained by acquiring an image of the surface of the anolyte solution.

[0016] S102. Multiple first feature information is determined by the first encoder in the first detection network. The first encoder includes multiple feature extraction modules. Each feature extraction module includes a residual convolution and a hybrid convolution attention module. The multiple feature extraction modules are connected in series. The multiple feature extraction modules are used to extract features from the first detection image. The multiple first feature information includes the feature extraction results output by each feature extraction module.

[0017] Among them, residual connection convolution can refer to a convolutional structure that introduces skip connections. Residual connection convolution can element-wise add the input feature information to the convolutionally transformed feature information, so as to preserve the original information during feature propagation and reduce gradient vanishing, thereby improving the model training convergence speed. Hybrid Convolution Attention Module (HCAM) can refer to a feature extraction structure that combines local convolution operations with a global self-attention mechanism. The hybrid convolution attention module can be used to capture fine-grained texture information and learn global semantic relationships. The feature extraction result output by the feature extraction module can be a feature map. The first feature information can be used to reflect the surface features of the anolyte in the first detection image. The surface features of the anolyte can include at least: texture features, boundary features, and local detail features.

[0018] Specifically, the feature extraction module can be formed by cascading residual convolution and hybrid convolution attention modules, thereby forming the first encoder in the first detection network through the cascading of multiple feature extraction modules. Furthermore, by performing feature extraction on the first detection image through the first encoder in the first detection network, the feature extraction results output by each feature extraction module can be obtained and used as multiple first feature information to comprehensively extract the complex features of the anolyte in the first detection image.

[0019] S103. The first decoder in the first detection network performs feature fusion on multiple first feature information to obtain second feature information. The first decoder is formed based on the feature pyramid.

[0020] In this context, a feature pyramid (FP) refers to a multi-level feature fusion structure. Feature pyramids can be used to integrate feature information at different resolutions to facilitate the detection and segmentation of targets at different scales. Constructing a top-down and bottom-up feature fusion network (FFN) based on the feature pyramid can form the first decoder in the first detection network. Furthermore, by fusing multiple first feature information pieces through the first decoder in the first detection network, second feature information can be obtained, thereby improving the accuracy of restoring the surface features of the anolyte solution.

[0021] As an optional implementation of this invention, the second feature information is obtained by feature fusion of multiple first feature information through the first decoder in the first detection network, including the following steps A1-A4: Step A1: Use multiple first feature information as at least two eighth feature information.

[0022] Step A2: Determine at least one ninth feature based on at least two eighth feature informations using the first decoder; the ninth feature information is obtained by feature fusion of the eighth feature information with the highest resolution and the eighth feature information with the second highest resolution among the at least two eighth feature informations, or by feature fusion of three eighth feature informations with adjacent resolutions among the at least two eighth feature informations.

[0023] Step A3: If the number of ninth feature information is greater than the first preset value, then at least one ninth feature information is taken as at least two new eighth feature information, and the operation of determining at least one ninth feature information based on at least two eighth feature information through the first decoder is returned. The first preset value is 1.

[0024] Step A4: Determine the second feature information based on the ninth feature information.

[0025] Specifically, during feature extraction of the first detected image through the first encoder in the first detection network, the feature extraction results output by different feature extraction networks will increase with the number of layers, channels, and resolution, resulting in different resolutions for different first feature information. Furthermore, multiple first feature information are first treated as at least two eighth feature information, and the first decoder in the first detection network fuses these at least two eighth feature information to obtain at least one ninth feature information. If the ninth feature information is obtained by fusing the eighth feature information with the highest resolution and the second highest resolution, then the resolution of the ninth feature information is the same as that of the eighth feature information with the highest resolution. If the ninth feature information is obtained by fusing three eighth feature information with adjacent resolutions, then the resolution of the ninth feature information is the same as that of the eighth feature information with the middle resolution among the three adjacent eighth feature information. The number of ninth feature information is one less than the number of eighth feature information. Therefore, if the number of ninth feature information is greater than 1, at least one ninth feature information is treated as at least two new eighth feature information, and the first decoder in the first detection network repeatedly fuses these at least two eighth feature information to obtain at least one ninth feature information until the number of ninth feature information equals 1. Then, the ninth feature information can be used as the second feature information.

[0026] For example, refer to Figure 2 The number of eighth feature information is 4. The second feature information is obtained by repeatedly fusing at least two eighth feature information to obtain at least one ninth feature information three times. The determination of at least one ninth feature information based on at least two eighth feature information using the first decoder can be represented as follows: ; ; in, Indicates downsampling; Indicates upsampling; Indicates feature splicing; Feature fusion can be achieved through convolution, instance normalization, and linear units with leakage correction. , and This represents three eighth feature information points with adjacent resolutions among at least two eighth feature information points, and the resolutions decrease in that order; This represents the eighth feature with the highest resolution among at least two eighth feature information pieces; This represents the eighth feature information with the second highest resolution among at least two eighth feature information information; and This represents the ninth feature information.

[0027] S104. The third feature information determined based on the second feature information, the third feature information including the fourth feature and / or the fifth feature, the fourth feature being the normal surface feature of the anolyte, and the fifth feature being the abnormal surface feature of the anolyte.

[0028] The normal surface characteristics of the anolyte bath refer to the features corresponding to the normal state of the anolyte bath surface. A normal state can include at least a stable, uniform surface without abnormal interference. The abnormal surface characteristics of the anolyte bath refer to the features corresponding to an abnormal state of the anolyte bath surface. An abnormal state can include at least a state where impurities and / or oil films are present on the surface. Specifically, the third feature information can be obtained by linearly transforming the second feature information. The resolution of the third feature information is the same as that of the first detection image.

[0029] S105. The third feature information is masked to obtain a first mask image, and a first detection result is determined based on the first mask image. The first detection result is used to indicate whether there is a surface abnormality in the anolyte in the first detection image. The masking process sets different mask values ​​for the fourth and fifth features in the third feature information.

[0030] Specifically, when masking the third feature information, a first mask value can be set for the fourth feature in the third feature information, and a second mask value can be set for the fifth feature in the third feature information. Furthermore, the area formed by the first mask value in the first mask image can be used to indicate the area corresponding to the normal surface of the anolyte in the first detection image, and the area formed by the second mask value in the first mask image can be used to indicate the area corresponding to the abnormal surface of the anolyte in the first detection image. Finally, by determining whether there is an area formed by the second mask value in the first mask image, it can be determined whether there is a surface abnormality in the anolyte in the first detection image, thus obtaining the first detection result. For example, an activation function can be used to mask the third feature information to obtain the first mask image, where the first mask value can be 0 and the second mask value can be 255.

[0031] As an optional implementation of this invention, the process of determining the first detection network includes: determining a training dataset and a second detection network. The training dataset includes multiple second images and mask images corresponding to each second image. The second images are surface images of the anolyte solution. The mask images corresponding to the second images are used to distinguish between a first region and a second region in the second images. The first region is the region corresponding to an abnormal surface of the anolyte solution, and the second region is the region corresponding to a normal surface of the anolyte solution. The structure of the second detection network is the same as that of the first detection network. Based on the training dataset, the second detection network is trained using a first loss function to obtain the first detection network. The first loss function is formed based on the binary cross-entropy loss function.

[0032] The binary cross-entropy loss function refers to the loss function used for binary classification tasks. It guides model training by comparing predicted values ​​with the true labels. The first loss function can be used to supervise the feature information of the model's final output and the feature information obtained during feature fusion.

[0033] Specifically, multiple second images can be obtained by acquiring multiple different surface images of the anolyte, or multiple surface images of different anolytes. Then, for each of the multiple second images, a mask image corresponding to the second image can be determined based on a first region and a second region within the second image. Based on the training dataset, a first detection network is obtained by training the second detection network using a first loss function, which can improve the stability of the training and the accuracy of the first detection network.

[0034] For example, the first loss function can be represented as follows: ; in, Represents the binary cross-entropy loss function; This represents the mask image corresponding to the second image. This represents the feature information output by the second detection network based on the second image; and This indicates the feature information obtained by the second decoder in the second detection network based on the second image during the feature fusion process. The structure of the second decoder is the same as that of the first decoder.

[0035] The technical solution of this invention involves acquiring a first detection image, which is a surface image of the anolyte solution; determining multiple first feature information through a first encoder in a first detection network. The first encoder includes multiple feature extraction modules, each comprising a residual convolution and a hybrid convolutional attention module. These multiple feature extraction modules are connected in series, enabling feature extraction from the first detection image using the first encoder. The feature extraction results output by each module are used as multiple first feature information to comprehensively extract the complex features of the anolyte solution in the first detection image. A second feature information is obtained by feature fusion of the multiple first feature information through a first decoder in the first detection network. The first decoder is based on feature pyramid formation, which improves the accuracy of restoring the surface features of the anolyte solution. The third feature information, which is determined by the feature information, includes a fourth feature and / or a fifth feature. The fourth feature is a normal surface feature of the anolyte, and the fifth feature is an abnormal surface feature of the anolyte. The third feature information is masked to obtain a first mask image, and a first detection result is determined based on the first mask image. The first detection result is used to indicate whether there is a surface abnormality in the anolyte in the first detection image. The masking process sets different mask values ​​for the fourth and fifth features in the third feature information, thereby determining whether there is a surface abnormality in the anolyte in the first detection image by whether there is an area formed by the mask value corresponding to the fifth feature in the first mask image. This can effectively improve the efficiency and accuracy of anomaly detection on the surface of the anolyte, so as to respond promptly to surface abnormalities in the anolyte.

[0036] Figure 3 This is a flowchart of another method for detecting surface anomalies in an anolyte solution provided by an embodiment of the present invention. The technical solution of this embodiment further optimizes the process of acquiring the first detection image in the aforementioned embodiments based on the technical solutions of the above embodiments. Solutions not described in detail in this embodiment can be found in the above embodiments. This embodiment can be combined with various optional solutions in one or more of the above embodiments. Figure 3 As shown, the surface anomaly detection method for the anolyte includes: S201. In response to the first detection request, the first detection image is obtained by acquiring an image of the surface of the anolyte through the first imaging system. The first detection request is a request to detect anomalies on the surface of the anolyte. The first imaging system consists of a polarization imaging device and a supplementary lighting device.

[0037] The polarization imaging device can be used to capture surface images of the anolyte. It can be equipped with a rotatable polarizer to adapt to the reflective properties of the anolyte. A supplementary lighting device can be used to generate incident light within the anolyte to enhance the clarity of the first detection image. Specifically, the first imaging system can be positioned above the anolyte, so that upon receiving a first detection request, it can acquire images of the anolyte surface in real-time or periodically to obtain the first detection image.

[0038] S202. Multiple first feature information is determined by the first encoder in the first detection network. The first encoder includes multiple feature extraction modules. Each feature extraction module includes a residual convolution and a hybrid convolution attention module. The multiple feature extraction modules are connected in series. The multiple feature extraction modules are used to extract features from the first detection image. The multiple first feature information includes the feature extraction results output by each feature extraction module.

[0039] As an optional embodiment of the present invention, the first encoder further includes a patch embedding layer. Determining multiple first feature information through the first encoder in the first detection network includes the following steps B1-B5: Step B1: Convert the first detection image into sixth feature information through the patch embedding layer.

[0040] Step B2: Determine a first feature extraction module and at least one second feature extraction module among multiple feature extraction modules. The input of the first feature extraction module is connected to the output of the patch embedding layer, and the input of the second feature extraction module is connected to the output of the feature extraction module.

[0041] Step B3: Extract the sixth feature information using the first feature extraction module to obtain the first extraction result.

[0042] Step B4: For each of the at least one second feature extraction modules, the seventh feature information is extracted by the second feature extraction module to obtain the second extraction result. The seventh feature information is the feature extraction result output by the feature extraction module connected to the input end of the second feature extraction module.

[0043] Step B5: Use the first extraction result and at least one second extraction result as multiple first feature information.

[0044] For details, please refer to Figure 4In the first encoder, a patch embedding layer and multiple feature extraction modules are sequentially connected. The patch embedding layer can be used to map a 3-channel image to a 64-dimensional feature space. Among the multiple feature extraction modules, the feature extraction module connected to the patch embedding layer can serve as the first feature extraction module, and the feature extraction modules other than the first feature extraction module can serve as the second feature extraction module. Thus, the multiple feature extraction modules include one first feature extraction module and at least one second feature extraction module.

[0045] Furthermore, when determining multiple first feature information through the first encoder, the sixth feature information is obtained by first extracting features from the first detection image through the patch embedding layer, and the first extraction result is obtained by extracting features from the sixth feature information through the first feature extraction module. Secondly, for each of the at least one second feature extraction modules, the feature extraction result output by the feature extraction module connected to the input of the second feature extraction module is used as the seventh feature information, and the second extraction result is obtained by extracting features from the seventh feature information through the second feature extraction module. Finally, multiple first feature information can be obtained based on one first extraction result and at least one second extraction result.

[0046] As an optional implementation of this invention, the first extraction result is obtained by extracting features from the sixth feature information through the first feature extraction module, including the following steps C1-C4: Step C1: Extract the sixth feature information by performing residual connection convolution in the first feature extraction module to obtain the third extraction result.

[0047] Step C2: The fourth extraction result is obtained by performing feature extraction on the third extraction result through the first global branch. The first global branch is the global branch included in the hybrid convolutional attention module in the first feature extraction module. The global branch uses a self-attention mechanism to extract global features.

[0048] Step C3: The fifth extraction result is obtained by performing feature extraction on the third extraction result through the first local branch. The first local branch is the local branch included in the hybrid convolutional attention module in the first feature extraction module. The local branch uses multi-scale convolution to extract local features.

[0049] Step C4: Determine the first extraction result based on the fourth and fifth extraction results.

[0050] refer to Figure 5A residual convolution can include two 3×3 convolutions, two instance normalizations, and two linear units with leakage correction. The first 3×3 convolution, the first instance normalization, the first linear unit with leakage correction, the second 3×3 convolution, the second instance normalization, and the second linear unit with leakage correction are concatenated, and the input of the first 3×3 convolution is element-wise added to the output of the second linear unit with leakage correction. Furthermore, the residual convolution can be represented as follows: ; ; ; in, This represents a 3×3 convolution; Indicates instance normalization; Indicates a linear unit with leakage correction; This represents the feature information input to the residual connection convolution; This represents the feature extraction result output by the residual connection convolution.

[0051] refer to Figure 6 The hybrid convolutional attention module can include local branches and global branches. Local branches can be formed by concatenating 1×1 convolutions, channel shuffle (CS) convolutions, and 3×3 depthwise separable convolutions; global branches can include 1×1 convolutions, 3×3 depthwise separable convolutions, and self-attention computation. Furthermore, the hybrid convolutional attention module can be represented as follows: ; ; ; ; ; ; in, This represents a 3×3 depth-separable convolution; Indicates mixed washing of channels; Represents a 1×1 convolution; This indicates the addition of a dimension; Indicates compressed dimensions; Indicates along the channel dimension Divide into three equal parts; Indicates a query; Indicates key; Represents the value; express Transpose of; This represents the learnable temperature coefficient; This indicates self-attention computation; This represents the normalized exponential function; This represents the feature information input to the hybrid convolutional attention module; This represents the feature extraction result of the local branch output; This represents the feature extraction result output by the global branch; This represents the feature extraction result output by the hybrid convolutional attention module. Specifically, the first extraction result can be obtained by element-wise addition of the fourth and fifth extraction results to improve the accuracy of the first feature information.

[0052] S203. The first feature information is obtained by feature fusion of multiple first feature information through the first decoder in the first detection network. The first decoder is formed based on the feature pyramid.

[0053] S204. The third feature information determined based on the second feature information, the third feature information including the fourth feature and / or the fifth feature, the fourth feature being the normal surface feature of the anolyte, and the fifth feature being the abnormal surface feature of the anolyte.

[0054] S205. The third feature information is masked to obtain a first mask image, and a first detection result is determined based on the first mask image. The first detection result is used to indicate whether there is a surface abnormality in the anolyte in the first detection image. The masking process sets different mask values ​​for the fourth and fifth features in the third feature information.

[0055] As an optional embodiment of the present invention, after determining the first detection result based on the first mask image, the method further includes: generating and displaying first prompt information in response to a first prompt request; the first prompt request is a prompt request generated when the first detection result indicates that there is a surface abnormality in the anolyte in the first detection image, and the first prompt information is information that prompts the presence of a surface abnormality in the anolyte in the first detection image.

[0056] Specifically, when the first detection result indicates that there is a surface anomaly in the anolyte in the first detection image, a first prompt request is generated. Then, upon receiving the first prompt request, a first prompt message is generated and displayed to prompt the anolyte to be treated, removing the surface anomaly and reducing the response lag to anomaly detection.

[0057] For example, the anolyte can be treated based on the type of surface anomaly present in the anolyte. For instance, if the surface anomaly is an oil film, an oil skimmer is used to treat the anolyte; if the surface anomaly is impurities, a filter pump is used to treat the anolyte.

[0058] For example, the first prompt message may be a prompt message in at least one form, such as text, graphics, or audio. Optionally, the first prompt message may be displayed by playing it through a prompt display device, and / or by sending the temperature warning information to a target prompt device, etc. The prompt display device or the target prompt device may be a digital computer or a mobile device, etc.

[0059] The technical solution of this invention, in response to a first detection request, acquires a first detection image by using a first imaging system to image the surface of the anolyte. The first detection request is a request to detect anomalies on the surface of the anolyte. The first imaging system consists of a polarization imaging device and a supplementary lighting device, enabling real-time or periodic image acquisition of the anolyte surface upon receiving the first detection request. Multiple first feature information is determined by a first encoder in a first detection network. The first encoder includes multiple feature extraction modules, each comprising a residual convolution and a hybrid convolution attention module. These multiple feature extraction modules are connected in series, enabling feature extraction from the first detection image using the first encoder. The feature extraction results output by each feature extraction module are used as multiple first feature information to facilitate comprehensive extraction of the first detection image. The complex characteristics of the anolyte in the detection network are analyzed. A first decoder in the first detection network fuses multiple first feature information to obtain second feature information, which is formed based on a feature pyramid. Third feature information is determined based on the second feature information, including a fourth feature and / or a fifth feature. The fourth feature represents normal surface features of the anolyte, and the fifth feature represents abnormal surface features. The third feature information is then masked to obtain a first mask image, and a first detection result is determined based on the first mask image. The first detection result indicates whether there are surface anomalies in the anolyte in the first detection image. The masking process sets different mask values ​​for the fourth and fifth features in the third feature information, effectively improving the efficiency and accuracy of anomaly detection on the surface of the anolyte, enabling timely response to surface anomalies in the anolyte.

[0060] Figure 7 This is a schematic diagram of a surface anomaly detection device for an anolyte solution provided in an embodiment of the present invention. This embodiment of the present invention is applicable to the detection of surface anomalies in an anolyte solution, and the device can be implemented in hardware and / or software. Figure 7 As shown, the surface anomaly detection device for the anolyte includes: The first acquisition module 301 is used to acquire a first detection image, which is a surface image of the anolyte in the anolyte bath. The first determining module 302 is used to determine multiple first feature information through the first encoder in the first detection network. The first encoder includes multiple feature extraction modules. The feature extraction modules include residual connection convolution and hybrid convolution attention modules. The multiple feature extraction modules are connected in series. The multiple feature extraction modules are used to extract features from the first detection image. The multiple first feature information includes the feature extraction results output by each feature extraction module. The second determining module 303 is used to perform feature fusion on multiple first feature information through the first decoder in the first detection network to obtain second feature information. The first decoder is formed based on the feature pyramid. The third determining module 304 is used to determine the third feature information based on the second feature information. The third feature information includes a fourth feature and / or a fifth feature. The fourth feature is the normal surface feature of the anolyte, and the fifth feature is the abnormal surface feature of the anolyte. The fourth determining module 305 is used to perform masking processing on the third feature information to obtain a first mask image, and to determine a first detection result based on the first mask image. The first detection result is used to indicate whether there is a surface abnormality in the anolyte in the first detection image. The masking processing sets different mask values ​​for the fourth and fifth features in the third feature information.

[0061] In addition to any of the above optional technical solutions, the first encoder may optionally include a patch embedding layer.

[0062] Based on any of the above optional technical solutions, optionally, the first determining module 302 includes: a first conversion unit, a fifth determining unit, a first extraction unit, a second extraction unit, and a sixth determining unit. The first conversion unit is used to convert the first detection image into sixth feature information through a patch embedding layer; the fifth determining unit is used to determine a first feature extraction module and at least one second feature extraction module among multiple feature extraction modules, wherein the input end of the first feature extraction module is connected to the output end of the patch embedding layer, and the input end of the second feature extraction module is connected to the output end of the feature extraction module; the first extraction unit is used to extract features from the sixth feature information through the first feature extraction module to obtain a first extraction result; the second extraction unit is used to extract features from seventh feature information through each of the at least one second feature extraction module to obtain a second extraction result, wherein the seventh feature information is the feature extraction result output by the feature extraction module connected to the input end of the second feature extraction module; the sixth determining unit is used to use the first extraction result and at least one second extraction result as multiple first feature information.

[0063] Based on any of the above optional technical solutions, optionally, the first extraction unit is specifically used to extract features from the sixth feature information through residual connection convolution in the first feature extraction module to obtain a third extraction result; to extract features from the third extraction result through a first global branch to obtain a fourth extraction result, wherein the first global branch is a global branch included in the hybrid convolutional attention module in the first feature extraction module, and the global branch uses a self-attention mechanism to extract global features; to extract features from the third extraction result through a first local branch to obtain a fifth extraction result, wherein the first local branch is a local branch included in the hybrid convolutional attention module in the first feature extraction module, and the local branch uses multi-scale convolution to extract local features; and to determine the first extraction result based on the fourth extraction result and the fifth extraction result.

[0064] Based on any of the above optional technical solutions, optionally, the third determining module 304 is specifically used to treat multiple first feature information as at least two eighth feature information; determine at least one ninth feature information based on the at least two eighth feature information through the first decoder; the ninth feature information is obtained by feature fusion of the eighth feature information with the highest resolution and the eighth feature information with the second highest resolution among the at least two eighth feature information, or by feature fusion of three eighth feature information with adjacent resolutions among the at least two eighth feature information; if the number of ninth feature information is greater than a first preset value, then at least one ninth feature information is treated as new at least two eighth feature information, and the operation of determining at least one ninth feature information based on the at least two eighth feature information through the first decoder is returned, the first preset value being 1; and determine second feature information based on the ninth feature information.

[0065] Based on any of the above optional technical solutions, optionally, the process of determining the first detection network includes: determining a training dataset and a second detection network, wherein the training dataset includes multiple second images and mask images corresponding to each second image, the second images are surface images of the anolyte, and the mask images corresponding to the second images are used to distinguish between a first region and a second region in the second images, the first region being the region corresponding to an abnormal surface of the anolyte, and the second region being the region corresponding to a normal surface of the anolyte, and the structure of the second detection network is the same as the structure of the first detection network; and the first detection network is obtained by training the second detection network based on the training dataset using a first loss function, wherein the first loss function is formed based on the binary cross-entropy loss function.

[0066] Based on any of the above-mentioned optional technical solutions, optionally, the first acquisition module 301 includes: a second acquisition unit. The second acquisition unit is used to, in response to a first detection request, acquire an image of the surface of the anolyte using a first imaging system to obtain a first detection image. The first detection request is a request to detect anomalies on the surface of the anolyte. The first imaging system consists of a polarization imaging device and a supplementary lighting device.

[0067] Based on any of the above-mentioned optional technical solutions, the surface anomaly detection device for the anolyte may optionally further include: a first prompting module. The first prompting module is used to generate and display first prompting information in response to a first prompting request after determining the first detection result based on the first mask image; the first prompting request is a prompting request generated when the first detection result indicates that there is a surface anomaly in the anolyte in the first detection image, and the first prompting information is information indicating the surface anomaly present in the anolyte in the first detection image.

[0068] The technical solution of this invention involves acquiring a first detection image, which is a surface image of the anolyte, through a first acquisition module 301; determining multiple first feature information through a first encoder in a first detection network using a first determination module 302; the first encoder includes multiple feature extraction modules, each including a residual convolution and a hybrid convolution attention module; these multiple feature extraction modules are connected in series, enabling feature extraction of the first detection image using the first encoder, and using the feature extraction results output by each feature extraction module as multiple first feature information to comprehensively extract the complex features of the anolyte in the first detection image; and then fusing the multiple first feature information through a first decoder in the first detection network using a second determination module 303 to obtain second feature information; the first decoder is based on feature pyramid formation, which can improve the accuracy of restoring the surface features of the anolyte. The third feature information is determined by the third determining module 304 based on the second feature information. The third feature information includes a fourth feature and / or a fifth feature. The fourth feature is a normal surface feature of the anolyte, and the fifth feature is an abnormal surface feature of the anolyte. The fourth determining module 305 performs masking processing on the third feature information to obtain a first mask image, and determines a first detection result based on the first mask image. The first detection result is used to indicate whether there is a surface abnormality in the anolyte in the first detection image. The masking processing sets different mask values ​​for the fourth and fifth features in the third feature information, which realizes the determination of whether there is a surface abnormality in the anolyte in the first detection image by whether there is an area formed by the mask value corresponding to the fifth feature in the first mask image. This can effectively improve the efficiency and accuracy of anomaly detection on the surface of the anolyte, so as to respond promptly to the surface abnormalities of the anolyte.

[0069] The surface anomaly detection device for anolyte provided in this embodiment of the invention can execute the surface anomaly detection method for anolyte provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.

[0070] Figure 8 This is a schematic diagram of an electronic device for implementing a surface anomaly detection method for anodizing bath solutions, provided as an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0071] like Figure 8 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded into the RAM 13 from storage unit 18. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0072] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0073] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, central processing unit (CPU), graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the surface anomaly detection method for anolyte bath liquid.

[0074] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of the embodiments of the present invention.

[0075] In some embodiments, the surface anomaly detection method for anodizing bath solution can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the surface anomaly detection method for anodizing bath solution described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the surface anomaly detection method for anodizing bath solution by any other suitable means (e.g., by means of firmware).

[0076] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transferring data and instructions to the storage system, the at least one input device, and the at least one output device.

[0077] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0078] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0079] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0080] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0081] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0082] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0083] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for detecting surface anomalies in an anolyte, characterized in that, The method includes: Acquire a first detection image, which is a surface image of the anolyte in the anolyte bath. Multiple first feature information is determined by a first encoder in a first detection network. The first encoder includes multiple feature extraction modules. Each feature extraction module includes a residual connection convolution and a hybrid convolutional attention module. The multiple feature extraction modules are connected in series. The multiple feature extraction modules are used to extract features from the first detection image. The multiple first feature information includes the feature extraction results output by each of the feature extraction modules. The first decoder in the first detection network performs feature fusion on the multiple first feature information to obtain second feature information, wherein the first decoder is formed based on feature pyramid. The third feature information is determined based on the second feature information. The third feature information includes a fourth feature and / or a fifth feature. The fourth feature is the normal surface feature of the anolyte, and the fifth feature is the abnormal surface feature of the anolyte. The third feature information is masked to obtain a first mask image, and a first detection result is determined based on the first mask image. The first detection result is used to indicate whether there is a surface abnormality in the anolyte in the first detection image. The masking process sets different mask values ​​for the fourth and fifth features in the third feature information.

2. The method according to claim 1, characterized in that, The first encoder also includes a patch embedding layer; Multiple first feature information is determined by the first encoder in the first detection network, including: The first detected image is converted into sixth feature information through the patch embedding layer; A first feature extraction module and at least one second feature extraction module are determined among the plurality of feature extraction modules, wherein the input end of the first feature extraction module is connected to the output end of the patch embedding layer, and the input end of the second feature extraction module is connected to the output end of the feature extraction module; The first extraction result is obtained by performing feature extraction on the sixth feature information through the first feature extraction module. For each of the at least one second feature extraction modules, a second extraction result is obtained by extracting features from the seventh feature information through the second feature extraction module. The seventh feature information is the feature extraction result output by the feature extraction module connected to the input end of the second feature extraction module. The first extraction result and at least one of the second extraction results are used as the plurality of first feature information.

3. The method according to claim 2, characterized in that, The first extraction result is obtained by performing feature extraction on the sixth feature information through the first feature extraction module, including: The third extraction result is obtained by performing feature extraction on the sixth feature information through residual connection convolution in the first feature extraction module; The fourth extraction result is obtained by performing feature extraction on the third extraction result through the first global branch. The first global branch is the global branch included in the hybrid convolutional attention module in the first feature extraction module. The global branch uses a self-attention mechanism to extract global features. The fifth extraction result is obtained by performing feature extraction on the third extraction result through the first local branch. The first local branch is a local branch included in the hybrid convolutional attention module in the first feature extraction module. The local branch uses multi-scale convolution to extract local features. The first extraction result is determined based on the fourth extraction result and the fifth extraction result.

4. The method according to claim 1, characterized in that, The second feature information is obtained by fusing the multiple first feature information through the first decoder in the first detection network, including: The plurality of first feature information are used as at least two eighth feature information; At least one ninth feature is determined by the first decoder based on at least two eighth feature information; the ninth feature information is obtained by feature fusion of the eighth feature information with the highest resolution and the eighth feature information with the second highest resolution among the at least two eighth feature information, or by feature fusion of three eighth feature information with adjacent resolutions among the at least two eighth feature information. If the number of ninth feature information is greater than the first preset value, then the at least one ninth feature information is regarded as at least two new eighth feature information, and the operation of determining at least one ninth feature information based on at least two eighth feature information through the first decoder is returned, where the first preset value is 1; The second feature information is determined based on the ninth feature information.

5. The method according to claim 1, characterized in that, The process of determining the first detection network includes: A training dataset and a second detection network are determined. The training dataset includes multiple second images and mask images corresponding to each second image. The second image is a surface image of the anolyte. The mask image corresponding to the second image is used to distinguish between a first region and a second region in the second image. The first region is the region corresponding to the abnormal surface of the anolyte, and the second region is the region corresponding to the normal surface of the anolyte. The structure of the second detection network is the same as the structure of the first detection network. Based on the training dataset, the second detection network is trained using a first loss function to obtain the first detection network, wherein the first loss function is formed based on the binary cross-entropy loss function.

6. The method according to claim 1, characterized in that, Acquire the first detection image, including: In response to a first detection request, the first detection image is obtained by acquiring an image of the surface of the anolyte using a first imaging system. The first detection request is a request to detect anomalies on the surface of the anolyte. The first imaging system consists of a polarization imaging device and a supplementary lighting device.

7. The method according to claim 1, characterized in that, After determining the first detection result based on the first mask image, the method further includes: In response to a first prompt request, a first prompt message is generated and displayed; the first prompt request is a prompt request generated when the first detection result indicates that there is a surface abnormality in the anolyte in the first detection image, and the first prompt message is a message that prompts the presence of a surface abnormality in the anolyte in the first detection image.

8. A surface anomaly detection device for anodizing bath liquid, characterized in that, The device includes: The first acquisition module is used to acquire a first detection image, wherein the first detection image is a surface image of the anolyte in the anolyte bath. The first determining module is used to determine multiple first feature information through the first encoder in the first detection network. The first encoder includes multiple feature extraction modules. The feature extraction modules include residual connection convolution and hybrid convolution attention modules. The multiple feature extraction modules are connected in series. The multiple feature extraction modules are used to extract features from the first detection image. The multiple first feature information includes the feature extraction results output by each of the feature extraction modules. The second determining module is used to perform feature fusion on the plurality of first feature information through the first decoder in the first detection network to obtain second feature information, wherein the first decoder is formed based on feature pyramid. The third determining module is used to determine the third feature information based on the second feature information. The third feature information includes a fourth feature and / or a fifth feature. The fourth feature is the normal surface feature of the anolyte, and the fifth feature is the abnormal surface feature of the anolyte. The fourth determining module is used to perform masking processing on the third feature information to obtain a first mask image, and to determine a first detection result based on the first mask image. The first detection result is used to indicate whether there is a surface abnormality in the anolyte in the first detection image. The masking processing sets different mask values ​​for the fourth and fifth features in the third feature information, respectively.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the surface anomaly detection method for the anolyte solution according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the surface anomaly detection method for the anolyte solution according to any one of claims 1-7.