Disclosure of Invention
The embodiment of the application provides a method, a device and a computer program product for determining corrosion rate, which are used for at least solving the problem of how to improve the accuracy of predicting the corrosion rate of an offshore metal structure in the related art.
According to one aspect of the embodiment of the application, a method for determining the corrosion rate is applied to a metal structure on the sea, and comprises the steps of obtaining a first corrosion rate and a second corrosion rate, wherein the first corrosion rate is calculated according to an electrochemical corrosion formula, the second corrosion rate is obtained by a machine learning model, the electrochemical corrosion formula comprises corrosion parameters of the metal structure, the machine learning model is used for receiving the input corrosion parameters and outputting the corrosion rate of the metal structure, and determining a target corrosion rate according to the first corrosion rate and the second corrosion rate, and the target corrosion rate represents the predicted corrosion rate of the metal structure.
In one exemplary embodiment, prior to acquiring the first and second corrosion rates, the method includes acquiring the corrosion parameter by a sensor disposed on the metallic structure, wherein the corrosion parameter includes a corrosion current of the offshore metallic structure, a gas concentration of a plurality of gases.
In one exemplary embodiment, obtaining the first corrosion rate and the second corrosion rate includes calculating the first corrosion rate by the following electrochemical corrosion equation:
Wherein CRphys represents a first corrosion rate, Icorr represents a corrosion current, K represents a unit conversion constant, n represents an electron transfer number in the corrosion reaction, F represents a faraday constant, and ρ represents a density of the offshore metal structure.
In one exemplary embodiment, the corrosion current is determined by the following equation:
Wherein Icorr represents the corrosion current, I0 represents the reference current when no gas is affected, m represents the number of gas species, Ci represents the concentration of the I-th gas, αi represents the linear influence factor of the gas concentration on the corrosion rate, and βij represents the influence factor of the coupling effect between the I-th gas and the j-th gas on the corrosion rate.
In an exemplary embodiment, the first corrosion rate and the second corrosion rate are obtained by simulating the corrosion process through computational fluid dynamics and a finite element method to obtain a target gas concentration, inputting the target gas concentration and a preset corrosion parameter into the machine learning model to obtain a second corrosion rate output by the machine learning model, wherein the preset corrosion parameter does not comprise the gas concentration, and the machine learning model is obtained by training the machine learning model by taking the historical corrosion parameter of the offshore metal structure as a training data set and the historical corrosion rate of the offshore metal structure as a verification data set.
In one exemplary embodiment, determining a target corrosion rate from the first corrosion rate and the second corrosion rate includes calculating a first accuracy of the first corrosion rate and a second accuracy of the second corrosion rate from historical corrosion data of the offshore metal structure, determining a first weight factor of the first corrosion rate and a second weight factor of the second corrosion rate from the first accuracy and the second accuracy, determining the target corrosion rate from the following equation:
CRfinal=ω1·CRphys+ω2·CRpred;
Where CRfinal represents the target corrosion rate, CRphys represents the first corrosion rate, CRpred represents the second corrosion rate, ω1 represents the first weight factor, ω2 represents the second weight factor.
According to another aspect of the embodiment of the application, a determining device of a corrosion rate is provided, which comprises an acquisition module, a determining module and a determining module, wherein the acquisition module is used for acquiring a first corrosion rate and a second corrosion rate, the first corrosion rate is calculated according to an electrochemical corrosion formula, the second corrosion rate is obtained by a machine learning model, the electrochemical corrosion formula comprises corrosion parameters of the metal structure, the machine learning model is used for receiving the input corrosion parameters and outputting the corrosion rate of the metal structure, and the determining module is used for determining a target corrosion rate according to the first corrosion rate and the second corrosion rate, and the target corrosion rate represents a predicted corrosion rate of the metal structure.
According to a further aspect of embodiments of the present application, there is also provided a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the above-described method of determining a corrosion rate when run.
According to still another aspect of the embodiments of the present application, there is also provided an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the method for determining the corrosion rate by the computer program.
According to a further aspect of embodiments of the present application, there is also provided a computer program product comprising a computer program which, when executed by a processor, implements the steps of the method described in the various embodiments of the application.
According to the method, the first corrosion rate of the offshore metal structure can be calculated through an electrochemical corrosion formula, the second corrosion rate of the offshore metal structure is calculated based on a machine learning algorithm, and the target corrosion rate of the final predicted offshore metal structure is determined by combining the first corrosion rate and the second corrosion rate. Therefore, the problem of how to improve the accuracy of predicting the corrosion rate of the offshore metal structure in the related technology is solved, and the effect of improving the accuracy of predicting the corrosion rate of the offshore metal structure is realized.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The method embodiments provided in the embodiments of the present application may be executed in a computer terminal or similar computing device. Taking a computer terminal as an example, fig. 1 is a block diagram of a hardware structure of a computer terminal according to a method for determining a corrosion rate according to an embodiment of the present application. As shown in fig. 1, a computer terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor (Central Processing Unit, MCU), a programmable logic device (Field Programmable GATE ARRAY, FPGA), etc.) and a memory 104 for storing data, where the computer terminal may also include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the configuration shown in fig. 1 is merely illustrative and is not intended to limit the configuration of the computer terminal described above. For example, the computer terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a method for determining a corrosion rate in an embodiment of the present application, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, to implement the above-described method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the computer terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
A wireless network provided by a communication provider of the computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as a NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is configured to communicate with the internet wirelessly.
In this embodiment, a method for determining a corrosion rate is provided, and fig. 2 is a flowchart of a method for determining a corrosion rate according to an embodiment of the present application, as shown in fig. 2, where the flowchart includes the following steps:
Step S202, a first corrosion rate and a second corrosion rate are obtained, wherein the first corrosion rate is calculated according to an electrochemical corrosion formula, the second corrosion rate is obtained by a machine learning model, the electrochemical corrosion formula comprises corrosion parameters of the metal structure, and the machine learning model is used for receiving the input corrosion parameters and outputting the corrosion rate of the metal structure;
Optionally, in the step S202, the corrosion parameters include gas concentration, temperature, humidity, pH, corrosion current, open circuit potential, and the like.
And step S204, determining a target corrosion rate according to the first corrosion rate and the second corrosion rate, wherein the target corrosion rate represents the predicted corrosion rate of the metal structure.
Through the steps, the first corrosion rate of the offshore metal structure can be calculated through an electrochemical corrosion formula, the second corrosion rate of the offshore metal structure is calculated based on a machine learning algorithm, and the target corrosion rate of the final predicted offshore metal structure is determined by combining the first corrosion rate and the second corrosion rate. Therefore, the problem of how to improve the accuracy of predicting the corrosion rate of the offshore metal structure in the related technology is solved, and the effect of improving the accuracy of predicting the corrosion rate of the offshore metal structure is realized.
In one exemplary embodiment, prior to acquiring the first and second corrosion rates, the method includes acquiring the corrosion parameter by a sensor disposed on the metallic structure, wherein the corrosion parameter includes a corrosion current of the offshore metallic structure, a gas concentration of a plurality of gases.
Optionally, in the foregoing embodiment, the sensor on the metal structure includes an electrochemical sensor, a gas sensor, an optical sensor, an ultrasonic sensor, and the like, and by constructing a multi-type sensor network, real-time monitoring of the corrosion parameter may be achieved.
Alternatively, in the above-described embodiment, the gas concentration of the plurality of gases includes the gas concentration of a corrosive gas such as hydrogen, hydrogen sulfide, carbon monoxide, or the like.
In one exemplary embodiment, obtaining the first corrosion rate and the second corrosion rate includes calculating the first corrosion rate by the following electrochemical corrosion equation:
Wherein CRphys represents a first corrosion rate, Icorr represents a corrosion current, K represents a unit conversion constant, n represents an electron transfer number in the corrosion reaction, F represents a faraday constant, and ρ represents a density of the offshore metal structure.
Alternatively, in the above embodiment, the unit conversion constant is used to convert electrochemical parameters in the etching process, such as etching current, into a physical measure of material etching (such as thickness loss of metal material) so as to more intuitively quantify the effect of etching on the material, specifically, K may be 0.129, and f is faraday constant 96485C/mol.
In one exemplary embodiment, the corrosion current is determined by the following equation:
Wherein Icorr represents the corrosion current, I0 represents the reference current when no gas is affected, m represents the number of gas species, Ci represents the concentration of the I-th gas, αi represents the linear influence factor of the gas concentration on the corrosion rate, and βij represents the influence factor of the coupling effect between the I-th gas and the j-th gas on the corrosion rate.
Optionally, in the above embodiment, the influence of factors such as temperature, pH and the like on the corrosion current may be further considered.
By the embodiment, the cooperative influence of various gases on the corrosion rate of the marine metal is considered in calculating the corrosion current, so that the prediction accuracy of the corrosion rate is improved.
In an exemplary embodiment, the first corrosion rate and the second corrosion rate are obtained by simulating the corrosion process through computational fluid dynamics and a finite element method to obtain a target gas concentration, inputting the target gas concentration and a preset corrosion parameter into the machine learning model to obtain a second corrosion rate output by the machine learning model, wherein the preset corrosion parameter does not comprise the gas concentration, and the machine learning model is obtained by training the machine learning model by taking the historical corrosion parameter of the offshore metal structure as a training data set and the historical corrosion rate of the offshore metal structure as a verification data set.
Alternatively, in the above embodiments, CFD (Computational Fluid Dynamics ) may be used to simulate the diffusion and flow characteristics of the corrosive gas around the metal structure, resulting in a gas concentration profile. The etching process of the metal structure is simulated by using FEM (FINITE ELEMENT Method), and the gas concentration can be calculated by the following formula in consideration of the influence of factors such as gas concentration, flow rate, pressure and the like on the etching rate:
wherein C is the concentration of the corrosive gas, D is the diffusion coefficient, and v is the flow rate.
Alternatively, in the above-described embodiments, the data collected by the sensors may be modeled using a machine learning algorithm (e.g., a random forest algorithm, etc.), predicting the corrosion rate under certain conditions:
CRpred=ML(X1,X2,...,Xn)
Wherein, Xi is different input variables, such as gas concentration, temperature, humidity, etc., the gas concentration is obtained by simulating the corrosion process by the computational fluid dynamics and finite element method, the parameters of temperature, humidity, etc. can be preset parameters, the preset parameters can be set into a plurality of groups to improve the comprehensiveness and accuracy of corrosion rate prediction, and ML represents a machine learning model.
In one exemplary embodiment, determining a target corrosion rate from the first corrosion rate and the second corrosion rate includes calculating a first accuracy of the first corrosion rate and a second accuracy of the second corrosion rate from historical corrosion data of the offshore metal structure, determining a first weight factor of the first corrosion rate and a second weight factor of the second corrosion rate from the first accuracy and the second accuracy, determining the target corrosion rate from the following equation:
CRfinal=ω1·CRphys+ω2·CRpred;
Where CRfinal represents the target corrosion rate, CRphys represents the first corrosion rate, CRpred represents the second corrosion rate, ω1 represents the first weight factor, ω2 represents the second weight factor.
Alternatively, in the above embodiment, ω1、ω2 is a weight factor, reflecting the credibility of the two data, and the correction may be performed by a bayesian update method.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of the various embodiments of the present application.
In this embodiment, a device for determining a corrosion rate is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, which are not described herein. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the devices described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware, are also possible and contemplated.
FIG. 3 is a block diagram of an apparatus for determining a corrosion rate according to an embodiment of the present application, the apparatus comprising:
An obtaining module 32, configured to obtain a first corrosion rate and a second corrosion rate, where the first corrosion rate is calculated according to an electrochemical corrosion formula, the second corrosion rate is obtained by a machine learning model, the electrochemical corrosion formula includes a corrosion parameter of the metal structure, and the machine learning model is configured to receive the input corrosion parameter and output the corrosion rate of the metal structure;
a determination module 34 is configured to determine a target corrosion rate from the first corrosion rate and the second corrosion rate, the target corrosion rate being indicative of a predicted corrosion rate of the metal structure.
By the device, the first corrosion rate of the offshore metal structure can be calculated through an electrochemical corrosion formula, the second corrosion rate of the offshore metal structure is calculated based on a machine learning algorithm, and the target corrosion rate of the offshore metal structure is finally predicted by combining the first corrosion rate and the second corrosion rate. Therefore, the problem of how to improve the accuracy of predicting the corrosion rate of the offshore metal structure in the related technology is solved, and the effect of improving the accuracy of predicting the corrosion rate of the offshore metal structure is realized.
In an exemplary embodiment, the acquisition module 32 is further configured to acquire the corrosion parameter via a sensor disposed on the metallic structure, wherein the corrosion parameter includes a corrosion current of the offshore metallic structure, and a gas concentration of a plurality of gases.
In an exemplary embodiment, the obtaining module 32 is further configured to calculate the first corrosion rate by an electrochemical corrosion formula:
Wherein CRphys represents a first corrosion rate, Icorr represents a corrosion current, K represents a unit conversion constant, n represents an electron transfer number in the corrosion reaction, F represents a faraday constant, and ρ represents a density of the offshore metal structure.
In one exemplary embodiment, the acquisition module 32 is further configured to determine the corrosion current by:
Wherein Icorr represents the corrosion current, I0 represents the reference current when no gas is affected, m represents the number of gas species, Ci represents the concentration of the I-th gas, αi represents the linear influence factor of the gas concentration on the corrosion rate, and βij represents the influence factor of the coupling effect between the I-th gas and the j-th gas on the corrosion rate.
In an exemplary embodiment, the obtaining module 32 is further configured to simulate the corrosion process by using a computational fluid dynamics and a finite element method to obtain a target gas concentration, input the target gas concentration and a preset corrosion parameter into the machine learning model to obtain a second corrosion rate output by the machine learning model, where the preset corrosion parameter does not include the gas concentration, and the machine learning model uses the historical corrosion parameter of the offshore metal structure as a training data set and uses the historical corrosion rate of the offshore metal structure as a verification data set to perform training.
In one exemplary embodiment, the determination module 34 is further configured to calculate a first accuracy of the first corrosion rate and a second accuracy of the second corrosion rate from historical corrosion data of the offshore metal structure, determine a first weight factor of the first corrosion rate and a second weight factor of the second corrosion rate from the first accuracy and the second accuracy, and determine the target corrosion rate by the following formula:
CRfinal=ω1·CRphys+ω2·CRpred;
Where CRfinal represents the target corrosion rate, CRphys represents the first corrosion rate, CRpred represents the second corrosion rate, ω1 represents the first weight factor, ω2 represents the second weight factor.
Embodiments of the present application also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store a computer program for performing the steps of:
S1, acquiring a first corrosion rate and a second corrosion rate, wherein the first corrosion rate is calculated according to an electrochemical corrosion formula, the second corrosion rate is obtained by a machine learning model, the electrochemical corrosion formula comprises corrosion parameters of the metal structure, and the machine learning model is used for receiving the input corrosion parameters and outputting the corrosion rate of the metal structure;
S2, determining a target corrosion rate according to the first corrosion rate and the second corrosion rate, wherein the target corrosion rate represents the predicted corrosion rate of the metal structure.
In an exemplary embodiment, the computer readable storage medium may include, but is not limited to, a U disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, etc. various media in which a computer program may be stored.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
An embodiment of the application also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
S1, acquiring a first corrosion rate and a second corrosion rate, wherein the first corrosion rate is calculated according to an electrochemical corrosion formula, the second corrosion rate is obtained by a machine learning model, the electrochemical corrosion formula comprises corrosion parameters of the metal structure, and the machine learning model is used for receiving the input corrosion parameters and outputting the corrosion rate of the metal structure;
S2, determining a target corrosion rate according to the first corrosion rate and the second corrosion rate, wherein the target corrosion rate represents the predicted corrosion rate of the metal structure.
In an exemplary embodiment, the electronic apparatus may further include a transmission device connected to the processor, and an input/output device connected to the processor.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program product which, when executed by a processor, implements the steps of the method described in the various embodiments of the application.
Alternatively, in this embodiment, the above computer program may be configured to, when executed by a processor, implement the steps of:
S1, acquiring a first corrosion rate and a second corrosion rate, wherein the first corrosion rate is calculated according to an electrochemical corrosion formula, the second corrosion rate is obtained by a machine learning model, the electrochemical corrosion formula comprises corrosion parameters of the metal structure, and the machine learning model is used for receiving the input corrosion parameters and outputting the corrosion rate of the metal structure;
S2, determining a target corrosion rate according to the first corrosion rate and the second corrosion rate, wherein the target corrosion rate represents the predicted corrosion rate of the metal structure.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the application described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.