Corrosion detection method and device for non-corrosion sample training based on electrochemical noise signal
Through the self-supervised learning algorithm training without corrosion samples, normal-state samples are used for training, which solves the problem of dependence on labeled data and corrosion samples in the existing technology, and achieves rapid and accurate corrosion detection in chlor-alkali equipment.
Patent Information
- Application Number
- CN202510107652.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-05-23
AI Technical Summary
The existing corrosion detection methods based on electrochemical noise signals rely on a large number of labeled data and corrosion status data, and corrosion samples are scarce in the chlor-alkali production environment, making it difficult to quickly and accurately conduct corrosion detection.
The self-supervised learning algorithm trained without corrosion samples is adopted. By designing self-supervised comparison learning, deep support vector description and abnormal point exposure supervision, only normal-state samples are used for training, reducing dependence on labeled data and corrosion samples.
It realizes rapid, accurate and automated monitoring of corrosion damage in chlor-alkali equipment, reduces the cost and complexity of data acquisition, and improves corrosion detection accuracy and stability.
Smart Images

Figure CN120028233A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of material analysis, and in particular to a corrosion detection method and device based on non-corrosion sample training of electrochemical noise signals. Background Art
[0002] Chlor-alkali chemical industry is mainly based on the synthesis of electrolytic salt and vinyl chloride, which is a hazardous chemical process under national key supervision. Hydrogen, chlorine, vinyl chloride and other media are all hazardous chemicals under national key supervision. Chlor-alkali chemical production equipment has been in service for a long time in high chlorine (such as saturated brine, wet chlorine, hypochlorite) and strong acid and alkali (such as hydrochloric acid, sodium hydroxide) corrosive environments. It uses materials such as 304, 316L stainless steel, TA2 titanium and Ni6 nickel. Affected by factors such as the chloride ion environment and alkali environment in chlor-alkali production equipment, the equipment is prone to damage such as pitting. Corrosion problems not only lead to economic losses, but also may cause safety accidents, causing serious impacts on production and life. Therefore, the development of efficient and accurate corrosion detection technology is of great significance to extend the service life of chlor-alkali equipment and ensure safe production. Electrochemical noise technology is based on real-time measurement of potential and current fluctuations spontaneously generated during corrosion, thereby determining the corrosion rate and corresponding mechanism. Its data contains rich information. By analyzing the statistical characteristics of noise signals, rich corrosion information can be obtained. However, its signals are usually more complex, and its physical meaning is not easy to directly explain, requiring complex data processing and analysis methods. The analysis results largely rely on the analyst's expertise, and the analysis process is time-consuming, which increases the difficulty and personnel costs of online corrosion detection.
[0003] Traditional machine learning and deep learning corrosion detection methods based on electrochemical noise signals rely on supervised learning with a large amount of labeled data, which is not only time-consuming but also costly. The acquisition of labeled data is often limited to the experience and time of experts, which limits the ability to quickly and accurately perform corrosion detection. In addition, in the actual chlor-alkali production environment, due to the timely maintenance and updating of equipment, corrosion stage samples are scarce and corrosion samples are difficult to obtain. The only samples that can be obtained in large quantities are normal operating status samples without corrosion, making it very important to develop a type of detection method that does not require corrosion samples to participate in training. In addition, due to the differences in the type of metal material of the equipment, the solution environment, and the production temperature, there are different operating domains. It is necessary to further consider the stable performance of the corrosion detection model in multiple different domains to achieve multi-domain aligned corrosion detection. Summary of the invention
[0004] The purpose of the present invention is to overcome the deficiencies in the prior art and provide a corrosion detection method and device based on electrochemical noise signals and non-corrosion sample training. The method only requires normal state samples for training, reducing the reliance on a large amount of labeled data and corrosion state data. By designing self-supervised contrastive learning, deep support vector description and abnormal point exposure supervision to align the distribution of normal state samples across multiple domains, the compact mapping of normal state samples is promoted, and the normal state sample distribution boundary is obtained through the corrosion detection algorithm model, and the discrimination learning between normal state samples and corrosion state samples is realized, so as to achieve rapid, accurate and automatic monitoring of corrosion damage in chlor-alkali equipment.
[0005] The objective of the present invention is achieved through the following technical solutions:
[0006] A corrosion detection method based on electrochemical noise signal without corrosion sample training, comprising:
[0007] S1. Collect electrochemical noise signals;
[0008] S2. Construct a data set; use the normal state samples in the electrochemical noise signal to construct a training set; use other normal state samples and all corrosion state samples to construct a test set, and there are no overlapping samples in the training set and the test set;
[0009] S3. Construct and train a corrosion detection algorithm model; the corrosion detection algorithm model includes a feature extractor, a self-supervised contrastive learning module, a reconstruction loss module, a deep support data description module (Deep Support Vector Data Description, Deep SVDD), and an outlier exposure supervision module; a spatiotemporal attention dynamic learning network is set up in the feature extractor based on the Transformer architecture; the feature extractor is trained in the first stage through the self-supervised contrastive learning module and the reconstruction loss module, and the feature extractor is trained in the second stage through the deep support data description module and the outlier exposure supervision module; a matrix-form soft Brownian offset algorithm (SoftBrownian Offset) is set in the outlier exposure supervision module to generate outlier samples for the outlier exposure supervision module; the corrosion detection algorithm model is trained using the training set;
[0010] S4. Corrosion detection capability evaluation: input the test set into the trained corrosion detection algorithm model for corrosion detection to evaluate the corrosion detection algorithm model.
[0011] Furthermore, the electrochemical noise collection method in step S1 refers to ISO 17093-2015 Corrosion of metals and alloys-Guidelines for corrosion test by electrochemical noise measurements, the experimental equipment uses Gamry Reference 600; the experimental temperature is room temperature; the solution uses NaCl solution as the corrosion solution; the pitting sample material uses stainless steel and carbon steel.
[0012] Furthermore, in step S2, when screening the electrochemical noise data, normal state samples without early corrosion characteristics are selected and divided into training sets and test sets, and electrochemical noise signal samples with corrosion characteristics are selected and divided into test sets.
[0013] Furthermore, step S3 specifically includes the following steps:
[0014] S301. Constructing feature extractor: Based on the self-attention mechanism in the Transformer architecture, a spatiotemporal attention dynamic learning network is constructed to enable the corrosion detection algorithm model to integrate the spatiotemporal information in the electrochemical noise signal; the spatiotemporal attention dynamic learning network sets up a time calculation branch and a space calculation branch for parallel calculation, uses the time dimension and the space dimension to model, and introduces dynamic spatiotemporal learning weights to fuse the outputs of the time calculation branch and the space calculation branch to obtain the final feature representation;
[0015] S302. Perform the first stage training on the feature extractor: in the self-supervised contrastive learning module, the normal state sample pairs of multiple domains are randomly paired in the training set to form contrastive learning, so as to realize the alignment of normal state samples in multiple domains, and the alignment loss function is the cosine similarity loss; and in the reconstruction loss module, the feature representation output by the spatiotemporal attention dynamic learning network is further input into a decoder to fully learn the effective information of the electrochemical noise signal; wherein the samples in different domains are electrochemical noise signals from metals of different materials during the electrochemical noise signal acquisition process.
[0016] S303. Perform the second stage training on the feature extractor: first, based on the normal state samples, use the matrix form soft Brownian shift algorithm in the outlier exposure supervision module to generate outlier samples; use the feature extractor trained in the first stage to initialize parameters, then input the normal state samples and outlier samples in the training set into the feature extractor to obtain feature outputs, input the feature outputs obtained from the normal state samples into the deep support data description module for feature learning, and input the feature outputs obtained from the normal state samples and the feature outputs obtained from the outlier samples into the outlier exposure supervision module for feature learning.
[0017] The present invention also provides a corrosion detection device based on electrochemical noise signal non-corrosion sample training, comprising:
[0018] An acquisition module, used for acquiring electrochemical noise signals;
[0019] The data module is used to construct a data set, wherein the normal state samples in the electrochemical noise signal are used to construct a training set; other normal state samples and all corrosion state samples are used to construct a test set, and there are no overlapping samples in the training set and the test set;
[0020] A training module is used to construct and train a corrosion detection algorithm model; the corrosion detection algorithm model includes a feature extractor, a self-supervised contrastive learning module, a reconstruction loss module, a deep support data description module, and an outlier exposure supervision module; a spatiotemporal attention dynamic learning network is set in the feature extractor based on the Transformer architecture; the feature extractor is trained in the first stage through the self-supervised contrastive learning module and the reconstruction loss module, and the feature extractor is trained in the second stage through the deep support data description module and the outlier exposure supervision module; a matrix-form soft Brownian offset algorithm is set in the outlier exposure supervision module to generate outlier samples for the outlier exposure supervision module; the corrosion detection algorithm model is trained using a training set;
[0021] The evaluation module is used to input the test set into the corrosion detection algorithm model after training to perform corrosion detection and realize the evaluation of the corrosion detection algorithm model.
[0022] The present invention also provides an application of a corrosion detection method based on the electrochemical noise signal and non-corrosion sample training, which is used for corrosion state analysis of chlor-alkali production equipment.
[0023] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the corrosion detection method based on electrochemical noise signal-based corrosion-free sample training are implemented.
[0024] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the corrosion detection method based on the non-corrosion sample training of the electrochemical noise signal are implemented.
[0025] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:
[0026] 1. Reduce data dependence: The present invention adopts a self-supervised learning algorithm without the participation of corrosion samples. It only uses normal electrochemical noise signals to train the corrosion detection algorithm model, which greatly reduces the dependence on corrosion samples and a large amount of labeled data, thereby reducing the cost and complexity of data acquisition.
[0027] 2. Efficient extraction of multi-dimensional features: The present invention designs a spatiotemporal attention dynamic learning network based on the Transformer architecture, and designs a structure that combines the time calculation branch and the space calculation branch. It can integrate the time and space characteristics of the electrochemical noise signal and comprehensively capture the multi-dimensional feature information.
[0028] 3. Improve the accuracy and stability of corrosion detection: Combine the self-supervised contrastive learning module, reconstruction loss module, deep support vector data description module and outlier exposure supervision module to align multi-domain data and learn the normal sample distribution boundaries, so that the corrosion detection algorithm model can accurately capture the corrosion characteristics, thereby significantly improving the accuracy and stability of corrosion detection.
[0029] 4. Improve monitoring efficiency and automation level: The method and device provided by the present invention can quickly and accurately realize corrosion detection of chlor-alkali production equipment, reduce the complexity and time cost of the manual analysis process, effectively improve the automation level of equipment monitoring, and provide an efficient solution for the safe operation and maintenance of the equipment.
[0030] 5. Strong applicability: The method of the present invention is applicable to corrosion detection requirements under different materials, solution environments and operating conditions. It has good versatility and robustness and can be widely used in highly corrosive production environments such as chlor-alkali chemical industry.
[0031] 6. Ensure safe production: Through real-time monitoring and early warning of the corrosion status of equipment, the present invention helps to extend the service life of equipment, reduce economic losses and safety hazards caused by corrosion, and comprehensively ensure the safety and reliability of the chlor-alkali production process. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a schematic diagram of the process of the present invention.
[0033] Figure 2 It is a schematic diagram of the network structure of the corrosion detection algorithm model.
[0034] Figure 3 This is a comparison result diagram of the corrosion monitoring effect obtained by the method of the present invention and other models. DETAILED DESCRIPTION
[0035] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0036] like Figure 1 As shown, this embodiment provides a corrosion state monitoring method based on non-corrosion sample training of electrochemical noise signals, and the specific method is as follows:
[0037] S1. Collecting electrochemical noise signals: The electrochemical noise collection method refers to ISO 17093-2015Corrosion of metals and alloys-Guidelines for corrosion test by electrochemical noise measurements. The experimental equipment is Gamry Reference600. The experimental temperature is room temperature. The corrosion solution includes but is not limited to NaCl solution. The pitting specimen material is stainless steel and carbon steel of various materials. A large amount of rich data of various materials is used to complete the training, which helps the corrosion detection algorithm model have better generalization ability.
[0038] S2. Constructing data set: Use normal state samples from some collected electrochemical noise signals to construct training set; use other normal state samples and all corrosion state samples to construct test set for evaluating the monitoring effect of corrosion detection algorithm model, where corrosion state samples mainly include metastable pitting stage and stable pitting stage. To ensure the test effect, the training set and test set samples should not overlap.
[0039] S3. Construct and train the corrosion detection algorithm model; the corrosion detection algorithm model includes a feature extractor, a self-supervised contrastive learning module, a reconstruction loss module, a deep support data description module (Deep Support Vector Data Description, Deep SVDD), and an outlier exposure supervision module; a spatiotemporal attention dynamic learning network is set up in the feature extractor based on the Transformer architecture; the feature extractor is trained in the first stage through the self-supervised contrastive learning module and the reconstruction loss module, and the feature extractor is trained in the second stage through the deep support data description module and the outlier exposure supervision module; a matrix-form soft Brownian offset algorithm (Soft BrownianOffset) is set in the outlier exposure supervision module to generate outlier samples for the outlier exposure supervision module; the corrosion detection algorithm model is trained using the training set; specifically:
[0040] S301. Construct feature extractor: as shown in the attached Figure 2As shown in the figure, based on the self-attention mechanism in the Transformer architecture, a spatiotemporal attention dynamic learning network is constructed, so that the corrosion detection algorithm model can integrate the spatiotemporal information in the electrochemical noise signal; the feature extractor adopts a multi-layer structure design, and the spatiotemporal attention dynamic learning network sets up a time calculation branch and a space calculation branch for parallel calculation, uses the time dimension and space dimension to model and introduces dynamic spatiotemporal learning weights and The final feature representation is obtained by fusing the outputs of the time calculation branch and the space calculation branch, so that the feature extractor has the ability to extract the spatiotemporal features of time series data.
[0041] S302. Perform the first stage of training on the feature extractor: by randomly pairing samples from different domains in the training set to form normal sample pairs for contrast learning, achieve multi-domain normal state sample alignment, whose contrast loss is cosine similarity loss, and further input the feature representation output by the spatiotemporal attention dynamic learning network into a decoder to fully learn the effective information of the electrochemical noise signal; wherein the samples from different domains are electrochemical noise signals from metals of different materials during the electrochemical noise signal acquisition process.
[0042] As attached Figure 2 As shown in FIG. 1 , the self-supervised contrastive learning module has two parts: an online branch and a target branch. Each branch includes the feature extractor described in S301, and is subsequently connected to a multi-layer perceptron MLP structure. The feature representation vectors output by the two branches are subjected to a contrast loss calculation based on cosine similarity to optimize the corrosion detection algorithm model parameters and preliminarily align multi-domain samples. The formula is: where g θ ,q θ The table shows the two-term multilayer perceptron MLP in the online branch, g ξ represents a multi-layer perceptron MLP in the target branch, z θ represents the features output by the feature extractor in the online branch, z ξ represents the features output by the feature extractor in the target branch. At the same time, the output of the online branch is input to the decoder to reconstruct the initial normal state data input to the model. The formula for calculating the reconstruction loss is: Where Decoder represents the decoder, x represents the multi-domain normal state samples of the input model, represents the output of the decoder, f θ represents the feature extractor of the online branch, g θ represents the first multilayer perceptron MLP in the online branch, q θ Represents the second multi-layer perceptron MLP in the online branch.
[0043] S303. Perform the second stage training on the feature extractor: first, based on the normal state samples, use the matrix form soft Brownian shift algorithm in the outlier exposure supervision module to generate outlier samples; use the feature extractor trained in the first stage to initialize parameters, then input the normal state samples and outlier samples in the training set into the feature extractor to obtain feature outputs, input the feature outputs obtained from the normal state samples into the deep support data description module for feature learning, and input the feature outputs obtained from the normal state samples and the feature outputs obtained from the outlier samples into the outlier exposure supervision module for feature learning.
[0044] See Figure 2 , combined with the integrated matrix metric, the soft Brownian shift algorithm is applied to matrix data. The integrated matrix metric calculation formula is p>0. Among them, x and y are two different metrics sampled from the data set, x ij ,y ij Represent the elements of the i-th row and j-th column in x and y respectively, m and d represent the number of rows and columns of samples respectively, and p is an exponential hyperparameter. Use the feature extractor trained in the first stage to initialize the parameters, then input the normal state samples and outlier samples in the training set into the feature extractor to obtain the feature output, and input the feature output obtained from the normal state samples into the deep support data description module for compact feature learning. The formula is Where n is the number of samples in the data set, x i represents the i-th sample in the data set, f ξ represents the feature extractor, c is the distribution center of the dataset samples, λ is the hyperparameter controlling normalization, L represents the number of layers in the feature extractor, and W l Represents the parameters of the lth layer in the feature extractor. The feature output obtained from the normal state samples and the feature output obtained from the outlier samples are input into the outlier exposure supervision module together to perform discriminative feature learning, and its formula is Where n is the number of samples in the data set, y i is the true label corresponding to the i-th sample, that is, the label that identifies whether the sample is a normal state sample or an outlier sample. Represents the predicted label of the i-th sample predicted by the classifier in the outlier exposure supervision module.
[0045] S4. Evaluation of corrosion detection capability; simulate the detection state, input the test set into the trained corrosion detection algorithm model to obtain the output result, determine whether each sample in the test set is a corrosion state sample, and calculate the model detection accuracy to achieve the evaluation of the corrosion detection algorithm model.
[0046] See Figure 3, which is a comparison result diagram of the corrosion monitoring effect obtained by the method of the present invention and other models. Compared with the supervised deep learning method that relies on a large amount of labeled data, this embodiment adopts a self-supervised learning algorithm without corrosion samples participating in the training to perform model pre-training, which significantly reduces the model's demand for labeled data. The spatiotemporal attention mechanism based on Transformer effectively improves the modeling ability of the model. At the same time, when pre-training the corrosion detection algorithm model, a self-supervised contrastive learning framework is adopted. The framework explicitly utilizes the useful information in the data. First, normal samples from multiple fields are aligned and mapped into a shared stable and compact space, and the introduction of the decoder reconstruction loss enhances the effectiveness of the first stage training process. By combining normal sample cluster mapping with outlier exposure, the corrosion detection algorithm model is trained to learn features that are both compact and discriminative, thereby enhancing its ability to distinguish between normal samples and corrosion samples.
[0047] Preferably, an embodiment of the present application further provides a corrosion detection device based on non-corrosion sample training of electrochemical noise signals, comprising:
[0048] An acquisition module, used for acquiring electrochemical noise signals;
[0049] The data module is used to construct a data set, wherein the normal state samples in the electrochemical noise signal are used to construct a training set; other normal state samples and all corrosion state samples are used to construct a test set, and there are no overlapping samples in the training set and the test set;
[0050] A training module is used to construct and train a corrosion detection algorithm model; the corrosion detection algorithm model includes a feature extractor, a self-supervised contrastive learning module, a reconstruction loss module, a deep support data description module, and an outlier exposure supervision module; a spatiotemporal attention dynamic learning network is set in the feature extractor based on the Transformer architecture; the feature extractor is trained in the first stage through the self-supervised contrastive learning module and the reconstruction loss module, and the feature extractor is trained in the second stage through the deep support data description module and the outlier exposure supervision module; a matrix-form soft Brownian offset algorithm is set in the outlier exposure supervision module to generate outlier samples for the outlier exposure supervision module; the corrosion detection algorithm model is trained using a training set;
[0051] The evaluation module is used to input the test set into the corrosion detection algorithm model after training to perform corrosion detection and realize the evaluation of the corrosion detection algorithm model.
[0052] Preferably, an embodiment of the present application also provides an application of a corrosion detection method based on the electrochemical noise signal for training corrosion-free samples. This detection method can train the corrosion detection algorithm model using only normal state samples to obtain effective corrosion detection capabilities, and is particularly suitable for situations where corrosion samples of chlor-alkali equipment are difficult to obtain in actual production processes.
[0053] Preferably, the embodiments of the present application also provide a specific implementation of an electronic device capable of implementing all steps in the corrosion detection method based on electrochemical noise signal non-corrosion sample training in the above embodiment, and the electronic device specifically includes the following contents:
[0054] Processor, memory, communications interface and bus;
[0055] Among them, the processor, memory, and communication interface communicate with each other through the bus; the communication interface is used to realize information transmission between related devices such as server-side devices, metering devices, and user-side devices.
[0056] The processor is used to call the computer program in the memory, and when the processor executes the computer program, all the steps in the corrosion detection method based on non-corrosion sample training of electrochemical noise signals in the above embodiment are implemented.
[0057] An embodiment of the present application also provides a computer-readable storage medium capable of implementing all the steps of the corrosion detection method for corrosion-free sample training based on electrochemical noise signals in the above-mentioned embodiment. A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, all the steps of the corrosion detection method for corrosion-free sample training based on electrochemical noise signals in the above-mentioned embodiment are implemented.
[0058] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the hardware + program embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0059] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0060] Although the present application provides method operation steps such as embodiments or flow charts, more or fewer operation steps may be included based on conventional or non-creative labor. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the actual device or client product is executed, it can be executed in the order of the method shown in the embodiments or the drawings or in parallel (for example, in a parallel processor or multi-threaded processing environment).
[0061] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0062] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0063] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0064] The present invention is not limited to the embodiments described above. The above description of the specific embodiments is intended to describe and illustrate the technical solution of the present invention. The above specific embodiments are merely illustrative and not restrictive. Without departing from the scope of the present invention and the scope of protection of the claims, a person of ordinary skill in the art can also make many forms of specific changes under the guidance of the present invention, which all fall within the scope of protection of the present invention.
Claims
1. A corrosion detection method based on electrochemical noise signal non-corrosion sample training, characterized in that: include: S1. Collect electrochemical noise signals; S2. Construct a data set; construct a training set using normal state samples in the electrochemical noise signal; Use other normal state samples and all corrosion state samples to construct the test set, and there are no overlapping samples in the training set and the test set; S3. Construct and train a corrosion detection algorithm model; the corrosion detection algorithm model includes a feature extractor, a self-supervised contrastive learning module, a reconstruction loss module, a deep support data description module, and an outlier exposure supervision module; a spatiotemporal attention dynamic learning network is set up in the feature extractor based on the Transformer architecture; the feature extractor is trained in the first stage through the self-supervised contrastive learning module and the reconstruction loss module, and the feature extractor is trained in the second stage through the deep support data description module and the outlier exposure supervision module; a matrix-form soft Brownian offset algorithm is set up in the outlier exposure supervision module to generate outlier samples for the outlier exposure supervision module; the corrosion detection algorithm model is trained using the training set; S4. Corrosion detection capability evaluation: input the test set into the trained corrosion detection algorithm model for corrosion detection to evaluate the corrosion detection algorithm model.
2. The corrosion detection method based on electrochemical noise signal and non-corrosion sample training according to claim 1 is characterized in that: The electrochemical noise collection method in step S1 refers to ISO 17093-2015Corrosion of metals and alloys-Guidelines for corrosion test by electrochemical noise measurements, the experimental equipment is Gamry Reference600, the experimental temperature is room temperature, NaCl solution is used as the corrosion solution, and the pitting sample material is stainless steel and carbon steel.
3. The corrosion detection method based on electrochemical noise signal and non-corrosion sample training according to claim 1 is characterized in that: In step S2, when screening the electrochemical noise data, normal state samples without early corrosion characteristics are selected and divided into training sets and test sets, and electrochemical noise signal samples with corrosion characteristics are selected and divided into test sets.
4. The corrosion detection method based on electrochemical noise signal and non-corrosion sample training according to claim 1 is characterized in that: Step S3 specifically includes the following steps: S301. Constructing feature extractor: Based on the self-attention mechanism in the Transformer architecture, a spatiotemporal attention dynamic learning network is constructed to enable the corrosion detection algorithm model to integrate the spatiotemporal information in the electrochemical noise signal; the spatiotemporal attention dynamic learning network sets up a time calculation branch and a space calculation branch for parallel calculation, uses the time dimension and the space dimension to model, and introduces dynamic spatiotemporal learning weights to fuse the outputs of the time calculation branch and the space calculation branch to obtain the final feature representation; S302. Perform the first stage training on the feature extractor: in the self-supervised contrastive learning module, the normal state sample pairs of multiple domains are randomly paired in the training set to form contrastive learning, so as to realize the alignment of normal state samples in multiple domains, and the alignment loss function is the cosine similarity loss; and in the reconstruction loss module, the feature representation output by the spatiotemporal attention dynamic learning network is further input into a decoder to fully learn the effective information of the electrochemical noise signal; wherein the samples in different domains are electrochemical noise signals from metals of different materials during the electrochemical noise signal acquisition process. S303. Perform the second stage training on the feature extractor: first, based on the normal state samples, use the matrix form soft Brownian shift algorithm in the outlier exposure supervision module to generate outlier samples; use the feature extractor trained in the first stage to initialize parameters, then input the normal state samples and outlier samples in the training set into the feature extractor to obtain feature outputs, input the feature outputs obtained from the normal state samples into the deep support data description module for feature learning, and input the feature outputs obtained from the normal state samples and the feature outputs obtained from the outlier samples into the outlier exposure supervision module for feature learning.
5. A corrosion detection device based on electrochemical noise signal non-corrosion sample training, characterized in that: include: An acquisition module, used for acquiring electrochemical noise signals; A data module, used for constructing a data set, wherein a training set is constructed using normal state samples in an electrochemical noise signal; Use other normal state samples and all corrosion state samples to construct the test set, and there are no overlapping samples in the training set and the test set; A training module is used to construct and train a corrosion detection algorithm model; the corrosion detection algorithm model includes a feature extractor, a self-supervised contrastive learning module, a reconstruction loss module, a deep support data description module, and an outlier exposure supervision module; a spatiotemporal attention dynamic learning network is set in the feature extractor based on the Transformer architecture; the feature extractor is trained in the first stage through the self-supervised contrastive learning module and the reconstruction loss module, and the feature extractor is trained in the second stage through the deep support data description module and the outlier exposure supervision module; a matrix-form soft Brownian offset algorithm is set in the outlier exposure supervision module to generate outlier samples for the outlier exposure supervision module; the corrosion detection algorithm model is trained using a training set; The evaluation module is used to input the test set into the corrosion detection algorithm model after training to perform corrosion detection and realize the evaluation of the corrosion detection algorithm model.
6. An application of a corrosion detection method based on non-corrosion sample training of electrochemical noise signals according to any one of claims 1 to 4, characterized in that: Used for corrosion status analysis of chlor-alkali production equipment.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the corrosion detection method based on non-corrosion sample training based on electrochemical noise signals as described in any one of claims 1 to 4 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the corrosion detection method based on non-corrosion sample training of electrochemical noise signals as described in any one of claims 1 to 4 are implemented.