Method for judging opening and closing states of hydrogen gate valve
By combining multi-physics-constrained generative adversarial networks, attention-based convolutional neural networks, and dynamic Bayesian networks with online incremental learning, the problem of automatic identification of the opening and closing state of hydrogen gate valves under high-pressure hydrogen environments was solved, achieving high-precision and robust state judgment and ensuring the safety and reliability of the hydrogen system.
Patent Information
- Application Number
- CN202511595513.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-03
- Publication Date
- 2026-02-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies for automatic identification of the opening and closing status of hydrogen gate valves in high-pressure hydrogen environments are ineffective against noise pollution, motion blur, and environmental interference, leading to image quality degradation and affecting recognition accuracy and robustness.
Image denoising is performed using a generative adversarial network with multiphysics constraints, feature extraction is performed using a convolutional neural network with an attention mechanism, state reasoning is performed using a dynamic Bayesian network, state probability calculation is optimized using an ultra-relaxed iterative algorithm, and finally adaptive optimization is achieved by adjusting network parameters through online incremental learning.
It achieves highly accurate and reliable automatic judgment of the opening and closing status of hydrogen gate valves in high-pressure hydrogen environments, improves anti-interference ability, avoids misjudgment, and has the characteristics of continuous self-optimization and adaptation to dynamic environmental changes, ensuring the safety and reliability of hydrogen systems.
Smart Images

Figure CN121544932A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of image recognition, and more particularly, to a hydrogen gate valve opening and closing state judgment method. BACKGROUND
[0002] With the rapid development of clean energy technology, hydrogen as a kind of efficient energy carrier, in chemical synthesis, petroleum refining, aerospace and emerging fuel cell vehicles and other fields have been widely used, in the whole industry chain of hydrogen production, storage, transportation and use, high pressure environment is a common existence of working conditions, for example, in the hydrogen filling station high pressure hydrogen cylinder group, long pipe trailer conveying pipeline and chemical plant reaction device, the working pressure usually reaches dozens or even hundreds of megapascal, the core control components in these systems-hydrogen gate valve, the accuracy and reliability of its opening and closing state is directly related to the safe operation of the whole system, high pressure hydrogen has the characteristics of small molecular weight, permeability, wide explosion limit, etc., so that the operating environment is full of challenges, there are often local gas disturbance caused by trace leakage, mirror fogging caused by environmental humidity changes, microscopic cracks or corrosion products attached to the surface of the metal valve body due to hydrogen embrittlement phenomenon, and mirror reflection or shadow interference caused by complex lighting conditions, these internal and external factors together constitute a harsh and dynamic visual detection environment, which puts forward very high requirements for the automatic monitoring technology of gate valve state based on image.
[0003] At present, for automatic identification of the opening and closing state of the valve, the mainstream technical solution depends on machine vision and pattern recognition algorithm. The early method usually adopts traditional image processing technology, such as edge detection by Canny operator or Sobel operator, combined with Hough transformation to locate the position of the valve rod or hand wheel, and then judge whether the valve is in the open or closed state according to the preset geometric feature threshold. With the popularity of deep learning technology, the classification model based on convolutional neural network gradually becomes the mainstream. This kind of method first needs to collect a large number of labeled valve images as a training set, and then trains a deep neural network model such as ResNet or VGGNet to directly classify the input image end to end. However, whether it is a traditional method or a deep learning method, its development and verification are mostly based on laboratory or relatively clean and stable industrial environment. When directly applied to the above high-pressure hydrogen gas actual scene, the image acquisition system is easily affected by the environment, resulting in serious noise pollution, motion blur, detail loss and contrast reduction in the captured image. The training data set of the existing algorithm often lacks the noise mode and morphological change specific to the high-pressure hydrogen gas environment, resulting in a significant lack of generalization ability of the trained model, making it difficult to stably and accurately extract key features for state judgment from low-quality degraded images. Therefore, developing an intelligent identification method for the opening and closing state of the gate valve that can effectively resist the interference of the high-pressure hydrogen gas environment and realize high-precision and high-robustness has become a key technical problem that needs to be solved to ensure the intrinsic safety of the hydrogen system. SUMMARY
[0004] The present application provides a hydrogen gate valve opening and closing state judgment method to solve the problems raised in the background art.
[0005] The technical solution of the present application to solve the above technical problems is as follows: specifically including the following steps: Step S1, obtaining noise images in a high-pressure hydrogen gas environment and environmental parameter data collected by a sensor, the environmental parameter data including pressure, temperature, flow and hydrogen concentration; a multi-physical field constrained generative adversarial network is used for denoising preprocessing of the noise images, wherein the environmental parameter data is input as a physical constraint condition into the generative adversarial network, so that the generative adversarial network outputs a clear valve image; Step S2, inputting the clear valve image obtained in step S1 into a convolutional neural network embedded with an attention mechanism for feature extraction, wherein the attention mechanism is used to guide the network to focus on the key area related to the opening and closing state of the gate valve in the image, and generate an image feature vector describing the opening and closing state through multi-scale feature fusion technology; Step S3, the image feature vector obtained in step S2 is fused with the pressure and flow data in the environment parameter data obtained in step S1, and is input into a dynamic Bayesian network for state inference; the dynamic Bayesian network applies a hyper-relaxation iteration algorithm to optimize the calculation process of the internal state probability, and finally outputs the opening and closing state probability of the hydrogen gate valve; Step S4, receiving an external check signal for verifying the actual state of the valve, comparing the opening and closing state probability output in step S3 with the external check signal to generate a decision error, based on the decision error, using an online incremental learning algorithm to synchronously optimize and adjust the parameters of the generative adversarial network in step S1, the convolutional neural network in step S2 and the dynamic Bayesian network in step S3, to realize the dynamic adaptation of the above network; In a preferred embodiment, in step S1, the specific process of obtaining noise images in a high-pressure hydrogen environment and environment parameter data collected by sensors is as follows: The original noise image is captured by a flameproof industrial camera deployed in a high-pressure hydrogen environment, and at the same time, environment parameter data including four physical quantities of pressure, temperature, flow and hydrogen concentration are synchronously collected by a sensor group composed of a pressure sensor, a temperature sensor, a flow sensor and a hydrogen concentration sensor; the environment parameter data is organized in the form of a vector to form an environment parameter vector, which is input into the generative adversarial network as a physical constraint condition together with the noise image; the acquisition of the noise image and the collection of the environment parameter data are synchronized by time stamp; before inputting the original noise image and the environment parameter vector into the generative adversarial network, the original noise image is preprocessed by size normalization, and the environment parameter vector is preprocessed by numerical standardization.
[0006] In a preferred embodiment, the specific operation of denoising the noise image by the generative adversarial network with multi-physical field constraint is as follows: The generative adversarial network consists of a generator and a discriminator, the generator adopts an encoder-decoder structure, wherein the encoder is responsible for feature extraction and down-sampling of the input noise image, and generates multi-scale intermediate output data during processing, and the decoder is responsible for reconstructing a clear image based on the multi-scale intermediate output data, the input of the generator is the splicing result of the noise image and the environment parameter vector, the environment parameter vector is expanded into mapping data of the same size as the multi-scale intermediate output data generated by the encoder through a fully connected layer, and the mapping data is injected as conditional information through channel splicing at each down-sampling layer of the encoder; The discriminator adopts a structure based on local receptive field, and simultaneously receives images and environment parameter vectors, wherein the images include generated images output by the generator, image features are extracted through a convolution layer, and the environment parameter vectors are mapped through a fully connected layer and fused with the image features at multiple scales. A physical consistency constraint mechanism is introduced in the training process of the generative adversarial network, which is realized by a multi-physical field gradient consistency loss function. The loss function is calculated based on the mathematical correlation between the image gradient field and the environmental physical parameters, wherein the image gradient field is the spatial gradient vector of the generated image at the pixel position, and the environmental physical parameters include pressure, temperature, flow rate and hydrogen concentration. The physical Jacobian matrix is coupled through the pressure coupling coefficient, the temperature coupling coefficient, the flow coupling coefficient, the concentration coupling coefficient, the pressure attenuation coefficient, the temperature attenuation coefficient, the flow attenuation coefficient, the concentration attenuation coefficient and the Euclidean distance from the pixel point to the valve key area. The reference physical field vector is obtained based on the prior physical model by the stress distribution function and the flow field influence function; The total loss function of the generative adversarial network is composed of three parts: the adversarial loss, the reconstruction loss and the multi-physical field gradient consistency loss. During training, the network parameters are updated by minimizing the total loss function, and finally the clear valve image is output.
[0007] In a preferred embodiment, in step S2, the clear valve image obtained in step S1 is input into a convolutional neural network embedded with an attention mechanism for feature extraction. The specific process is as follows: First, the input clear valve image is multi-scale feature encoded. A feature encoder based on a deep residual network variant is used to extract a set of original feature maps of multiple scales, which includes multiple original feature maps arranged from high resolution to low resolution. The high resolution original feature map captures the local texture details of the valve, and the low resolution original feature map captures the global structural information of the valve. The feature encoder realizes the extraction and down-sampling of the original feature map through convolutional layers and pooling layers. After the extraction of the original feature maps of multiple scales is completed, for each scale of the original feature map, a spatial-channel dual attention unit is applied for processing. The calculation process of the spatial attention weight is as follows: first, perform a global average pooling operation on the original feature map to compress the spatial dimension of the original feature map into a single value to obtain a pooled feature vector. Then, a convolution operation is applied to the pooled feature vector, and the convolution kernel size is adapted to the size of the original feature map to output a convolution result. Then, a Sigmoid activation function is applied to the convolution result to map the output value to between zero and one to generate a spatial attention weight map. The calculation process of the channel attention weight includes: first, perform a global average pooling operation on the original feature map to compress the spatial dimension to obtain a pooled feature vector. Then, a fully connected layer operation is applied to the pooled feature vector. The number of neurons in the fully connected layer is consistent with the number of channels of the original feature map, and a fully connected result is output. Then, the Sigmoid activation function is applied to the full connection result to map the output value to between zero and one, generating a channel attention weight vector; Finally, the spatial attention weight map, the channel attention weight vector and the original feature map are subjected to element-wise multiplication operation to obtain a weighted feature map. The weighting process enables the convolutional neural network to adaptively focus on the key regions related to the gate valve opening and closing state, including the valve rod position and the sealing surface region.
[0008] In a preferred embodiment, the specific process of generating the image feature vector describing the opening and closing state by the multi-scale feature fusion technology is as follows: The weighted feature maps of multiple scales are input into a feature pyramid fusion unit, which adopts a feature pyramid network structure including a top-down path and a lateral connection; The top-down path up-samples the low-resolution high-level semantic feature map to a high resolution and fuses it with the high-resolution bottom-level detailed feature map through addition operation; The lateral connection uses a one-by-one convolution layer to adjust the channel number of the feature map. In the fusion process, for the feature map of each scale, up-sampling operation is first performed to the maximum resolution, and then multiplied by a learnable fusion weight, which is part of the network parameters and is optimized through gradient descent algorithm in the training process to adaptively weight the features of different scales; All the weighted feature maps of different scales are summed to obtain the final fused feature map; Finally, global average pooling operation is applied to the fused feature map to compress it into a one-dimensional image feature vector.
[0009] In a preferred embodiment, the specific process of fusing the image feature vector obtained in step S2 with the pressure and flow data in the environmental parameter data obtained in step S1 in step S3 includes: First, the image feature vector is subjected to standardization processing, and the Z-score standardization method based on the historical data mean and standard deviation is adopted, wherein the historical mean vector is the average of the historical image feature vectors, and the historical standard deviation vector is the standard deviation of the historical image feature vectors. The standardization is realized by subtracting the historical mean vector from the image feature vector and dividing by the historical standard deviation vector; Meanwhile, the pressure parameter and the flow parameter are subjected to minimum-maximum standardization processing; then the standardized image feature vector and the standardized pressure parameter and flow parameter vector are subjected to splicing operation to combine into a joint feature vector.
[0010] In a preferred embodiment, the specific process of inputting into the dynamic Bayesian network for state inference includes: A dynamic Bayesian network model is constructed, which includes state variables and observation variables. The state variables represent the open and close states of the hydrogen gate valve, and the state variables take the value of zero when the state is closed and take the value of one when the state is open. The observation variables correspond to the joint feature vectors obtained after fusion. The dynamic Bayesian network model includes two core components, state transition probability and observation emission probability. The state transition probability describes the conditional probability relationship between adjacent time steps, which is represented in the form of a probability matrix. The rows of the matrix correspond to the state at the previous time step, and the columns correspond to the state at the current time step. The observation emission probability describes the conditional probability distribution of the observation vector given the state. A multivariate Gaussian distribution is used for modeling. Each state corresponds to a mean vector and a covariance matrix of a Gaussian distribution. Network inference uses the forward-backward algorithm to calculate the posterior probability distribution. The forward algorithm recursively calculates the forward probability from the initial time step, and the backward algorithm recursively calculates the backward probability from the final time step. The forward and backward results are combined to obtain the posterior probability of each time step.
[0011] In a preferred embodiment, the dynamic Bayesian network applies an overrelaxation iterative algorithm to optimize the calculation process of its internal state probability, which includes the following specific operations: An overrelaxation factor is introduced based on the standard forward-backward algorithm. The overrelaxation factor is a real number parameter with a value range greater than one and less than two, which is used to control the iteration step size and accelerate the convergence. When updating the state probability iteratively, each iteration includes two sub-steps. First, calculate the standard Bayesian posterior probability update value. The update value is obtained by dividing the weighted sum of the current observation emission probability and the transition probability of the previous time step state probability by the normalization constant. Then set the new state probability estimate value as the weighted average of the current iteration probability estimate value and the standard update value, and the weight is controlled by the overrelaxation factor. The weighted average is calculated by multiplying the current estimate value by one minus the overrelaxation factor, and adding the standard update value multiplied by the overrelaxation factor. The iteration termination condition is based on the state probability change quantity of the last two iterations, which is calculated by the Euclidean norm. When the change quantity is less than the preset tolerance threshold, the iteration is stopped. The tolerance threshold is set to ten to the power of negative five. Finally, the open and close state probability of the hydrogen gate valve is output.
[0012] In a preferred embodiment, in step S4, the specific process of receiving an external check signal for verifying the actual state of the valve and comparing the open and close state probability output in step S3 with the external check signal to generate a decision error includes: The external check signal is derived from the actual valve state input by human, which is a binary signal. Zero represents that the valve is actually in the closed state, and one represents that the valve is actually in the open state. The decision error is calculated using a weighted cross-entropy loss function, which is composed of two parts, the first part is the log probability error based on the true state, and the second part is the entropy value of the state probability distribution multiplied by an entropy weight coefficient; The specific calculation of the first part is that when the external check signal is one, the negative value of the natural logarithm of the opening probability is calculated, and when the external check signal is zero, the negative value of the natural logarithm of the closing probability is calculated. The calculation of the second part entropy value is obtained by multiplying each state probability in the state probability distribution by the natural logarithm of the state probability and then taking the negative sum, that is, first calculate the sum of the closing probability multiplied by the natural logarithm of the closing probability and the opening probability multiplied by the natural logarithm of the opening probability, and then take the negative value of the sum as the entropy value. The entropy weight coefficient is a preset real number parameter, the value range is greater than or equal to zero and less than or equal to zero point one, which is used to adjust the contribution degree of the entropy term in the decision error. The final decision error is the weighted sum of the first part calculation result and the second part calculation result, wherein the second part calculation result is multiplied by the entropy weight coefficient.
[0013] In a preferred embodiment, the specific process of synchronously optimizing and adjusting the parameters of the generative adversarial network in step S1, the convolutional neural network in step S2 and the dynamic Bayesian network in step S3 using an online incremental learning algorithm includes: The online incremental learning algorithm is based on an adaptive regularization online gradient descent method, which includes six consecutive calculation steps, and the gradient back propagation is along a specific path, starting from the dynamic Bayesian network in step S3, propagating to the convolutional neural network in step S2, and then to the generative adversarial network in step S1; Specifically, for the dynamic Bayesian network in step S3, the gradient is calculated based on the decision error; for the convolutional neural network in step S2, the gradient is propagated through the input of step S3 network, that is, the image feature vector output by step S2; for the generative adversarial network in step S1, the gradient is propagated through the input of step S2 network, that is, the clear valve image output by step S1; The six consecutive calculation steps are as follows: The first step is to calculate the gradient of the decision error with respect to the joint parameters, which include the generative adversarial network parameters, the convolutional neural network parameters and the dynamic Bayesian network parameters; The second step is to calculate the first moment estimate, which is obtained by weighted averaging the current gradient and the historical first moment estimate, and the weighted weight is controlled by the first decay rate parameter, which has a value range of 0.9 to 0.9999. The third step is to calculate the second moment estimate, which is obtained by weighted averaging the square of the current gradient and the historical second moment estimate, and the weighted weight is controlled by the second decay rate parameter, which has a value range of 0.9 to 0.9999. The fourth step is to correct the bias of the first moment estimation, and the correction value is the first moment estimation divided by one minus the t power of the first decay rate parameter, where t is the current iteration number; The fifth step is to correct the bias of the second moment estimation, and the correction value is the second moment estimation divided by one minus the t power of the second decay rate parameter; The sixth step is to update the parameters, and the new parameter value is equal to the original parameter value minus the learning rate multiplied by the corrected first moment estimation divided by the square root of the corrected second moment estimation plus the result after the numerical stability constant, and then minus the regularization coefficient multiplied by the element-wise product of the parameter importance vector and the difference between the current parameter and the reference parameter; The learning rate is in the range of ten to the power of negative five to ten to the power of negative two, the numerical stability constant is ten to the power of negative eight, and the regularization coefficient is in the range of zero point zero one to zero point one; The parameter importance vector is estimated by the exponential moving average of the gradient square, and the reference parameter is a snapshot of the historical parameter; the parameter update trigger condition is that the decision error is greater than the preset threshold or reaches the periodic update interval, the preset threshold is set to zero point five, and the periodic update interval is set to every ten time steps; after the parameter update, the new parameter is immediately applied to the network processing in the subsequent steps to form a closed loop optimization; at the same time, the reference parameter and the parameter importance vector are updated periodically, and the update interval is every one hundred iterations.
[0014] The beneficial effects of the present application are: through the image denoising constrained by multiple physical fields, the attention guided feature extraction, the state reasoning of multi-source information fusion and the error driven online learning, the highly precise and stable and reliable automatic judgment of the gate valve opening and closing state in the high pressure hydrogen gas environment is realized, which significantly improves the anti-interference ability in harsh working conditions, effectively avoids the misjudgment caused by image quality degradation or environmental mutation, and has the characteristics of continuous self-optimization and adaptation to environmental dynamic changes, thereby ensuring the safety and reliability of the long-term operation of the hydrogen system. BRIEF DESCRIPTION OF DRAWINGS
[0015] Figure 1 The method flowchart of the present application. DETAILED DESCRIPTION
[0016] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0017] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0018] In the description of this application, the term "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application. Example 1
[0019] This embodiment provides, for example Figure 1 The method for determining the open / closed state of a hydrogen gate valve, as shown, specifically includes the following steps: Step S1: Acquire a noisy image under high-pressure hydrogen conditions and environmental parameter data collected by sensors, including pressure, temperature, flow rate, and hydrogen concentration. A multi-physics-constrained generative adversarial network (GAN) is used to preprocess the noisy image for denoising. The environmental parameter data serves as the physical constraint input to the GAN, enabling it to output a clear valve image. Step S1, by introducing a GAN based on multi-physics gradient consistency loss, deeply integrates environmental physical parameters into the image reconstruction process, achieving high-quality image generation guided by physical laws, moving from degraded observations. This step not only significantly improves the visual quality of the image but, more importantly, ensures the physical rationality of the reconstruction results, establishing a reliable visual foundation for subsequent accurate state judgment. Furthermore, the design of the physical Jacobian matrix allows for the quantification and modeling of the influence of environmental parameters on image features, overcoming the performance limitations of traditional denoising methods in complex physical environments. Step S2: Input the clear valve image obtained in Step S1 into a convolutional neural network embedded with an attention mechanism for feature extraction. The attention mechanism guides the network to focus on key regions in the image related to the opening and closing state of the gate valve, and generates image feature vectors describing the opening and closing state through multi-scale feature fusion technology. Step S2 highlights key regions through a spatial-channel dual attention mechanism and integrates contextual information by combining multi-scale feature fusion to generate highly discriminative state feature vectors. This method overcomes the limitation of traditional convolutional networks in feature extraction under complex backgrounds and provides a reliable feature basis for gate valve state judgment under high-pressure hydrogen environment. Its effect is reflected in the adaptive calculation of attention weights and the optimized design of multi-scale fusion, which improves the feature's ability to capture subtle state changes. Step S3: The image feature vector obtained in step S2 is fused with the pressure and flow data in the environmental parameter data obtained in step S1, and then input into the dynamic Bayesian network for state inference. The dynamic Bayesian network uses an over-relaxation iterative algorithm to optimize the calculation process of its internal state probability, and finally outputs the opening and closing state probability of the hydrogen gate valve. Step S3 achieves efficient inference of the gate valve state under high pressure hydrogen environment through multi-source data fusion and over-relaxation optimization. This method balances speed and accuracy by embedding over-relaxation iteration into probability calculation, overcomes the limitation of slow convergence of traditional DBN in dynamic environment, and provides a reliable decision basis for safety monitoring. Step S4: Receive an external verification signal to verify the actual state of the valve. Compare the open / closed state probability output in step S3 with the external verification signal to generate a decision error. Based on this decision error, use an online incremental learning algorithm to synchronously optimize and adjust the parameters of the generative adversarial network in step S1, the convolutional neural network in step S2, and the dynamic Bayesian network in step S3 to achieve dynamic adaptation of the above networks. After the parameters are updated, they directly affect the network behavior when S1 is executed next, forming an iterative optimization loop. For example, after the parameters of the generative adversarial network in S1 are adjusted, the subsequent denoising processing is more adaptable to environmental changes; the network optimization in S2 and S3 improves the accuracy of feature extraction and state inference. This connection ensures the continuous improvement of the overall performance of this application. Step S4 achieves synchronous optimization of multiple network parameters through an online incremental learning algorithm. The formula design integrates adaptive learning rate and parameter importance regularization to balance learning efficiency and stability. This method breaks through the limitations of traditional fixed parameter models, enabling this application to maintain high accuracy in a high-pressure hydrogen dynamic environment for a long time, providing key technical support for core safety monitoring.
[0020] In this embodiment, the specific process of acquiring the noise image under high-pressure hydrogen environment and the environmental parameter data collected by the sensor in step S1 is as follows: Raw noise images were captured using an explosion-proof industrial camera deployed in a high-pressure hydrogen environment. These raw noise images were three-channel RGB format image data, with the image size defined by both height and width pixel values. Simultaneously, environmental parameter data was collected via a sensor array consisting of pressure, temperature, flow rate, and hydrogen concentration. The collected environmental parameter data included ambient pressure measured by the pressure sensor (in megapascals, ranging from 0.1 MPa to 100 MPa), ambient temperature measured by the temperature sensor (in Kelvin, ranging from 233 Kelvin to 473 Kelvin), and the flow rate measured by the flow sensor. The hydrogen volumetric flow rate, measured in cubic meters per second, ranges from 0 to 10 cubic meters per second. The ambient hydrogen concentration, measured by a hydrogen concentration sensor, is measured in parts per million (ppm), ranging from 0 to 10,000 ppm. Environmental parameter data are organized as vectors to form an environmental parameter vector, which serves as a physical constraint and is input into the generative adversarial network (GAN) along with the noise image in subsequent processing. The acquisition of the noise image and the collection of the environmental parameter data are synchronized via timestamps to ensure data consistency. Before inputting the original noise image and environmental parameter vector into the GAN, the original noise image undergoes size normalization preprocessing, and the environmental parameter vector undergoes numerical standardization preprocessing to eliminate dimensional differences and improve network training stability. The specific steps for preprocessing noisy images using a multi-physics-constrained generative adversarial network are as follows: Generative Adversarial Networks (GANs) consist of a generator and a discriminator. The generator adopts an encoder-decoder structure, where the encoder is responsible for feature extraction and downsampling of the input noisy image and generating multi-scale intermediate output data during the processing. The decoder is responsible for reconstructing a clear image based on the multi-scale intermediate output data. The input of the generator is the concatenation result of the noisy image and the environment parameter vector. The environment parameter vector is expanded into mapping data of the same size as the multi-scale intermediate output data generated by the encoder through a fully connected layer. This mapping data is injected as conditional information in each downsampling layer of the encoder through channel concatenation. The discriminator employs a local receptive field-based architecture, simultaneously receiving image and environment parameter vectors, where the image includes real, sharp images used during training. Alternatively, the generated image output by the generator can have its features extracted through a convolutional layer, and the environment parameter vector can be mapped through a fully connected layer and fused with the image features at multiple scales. A physical consistency constraint mechanism is introduced during the training of generative adversarial networks (GANs). This mechanism is implemented through a multi-physics gradient consistency loss function, which is calculated based on the mathematical correlation between the image gradient field and environmental physical parameters. The image gradient field is the spatial gradient vector of the generated image at each pixel location. The environmental physical parameters include pressure, temperature, flow rate, and hydrogen concentration, coupled through a physical Jacobian matrix. The elements of the physical Jacobian matrix are calculated from the pressure coupling coefficient, temperature coupling coefficient, flow rate coupling coefficient, concentration coupling coefficient, pressure decay coefficient, temperature decay coefficient, flow rate decay coefficient, concentration decay coefficient, and the Euclidean distance from the pixel to the critical valve region. The reference physical field vector is derived from the stress distribution function and flow field influence function based on a prior physical model. The formula for the multi-physics gradient consistency loss function is as follows: ; in, This represents the multiphysics gradient consistency loss function, a scalar value used to measure the degree of consistency between the generated image and physical laws. The smaller the value, the more the generated image conforms to the physical constraints of the environment. The image spatial domain represents the entire set of pixels in the image, i.e., the coordinates of all pixels. The overall area, Represents pixel coordinates, that is, the position coordinates of a pixel in the image, where The coordinates are in the horizontal direction. The coordinates are in the vertical direction. Indicates the generated image at the location The spatial gradient vector at a given location is a two-dimensional vector, defined as follows: ,in These represent the partial derivatives (i.e., gradients) of the image in the x and y directions, respectively, used to describe the rate of change of local texture or edges in the image. The superscript " " represents the transpose operator. The physical Jacobian matrix is a 2×2 matrix used to couple the relationship between environmental physical parameters and image gradients. The specific definition of the matrix is as follows: ; in, This indicates the coupling effect of pressure P on the horizontal gradient of the image. Indicates temperature change The coupling effect of the difference between the current temperature and the reference temperature on the horizontal gradient of the image. This represents the coupling effect of flow rate Q on the vertical gradient of the image. This indicates the coupling effect of concentration C on the vertical gradient of the image; These represent the pressure coupling coefficient, temperature coupling coefficient, flow rate coupling coefficient, and concentration coupling coefficient, respectively. These are scalar parameters that represent the intensity of the influence of pressure, temperature, flow rate, and concentration on the image gradient, with the dimension "1 / unit". They are calibrated using material mechanics and fluid mechanics models (i.e., their values are determined through experiments or theoretical models). These represent the pressure decay coefficient, temperature decay coefficient, flow rate decay coefficient, and concentration decay coefficient, respectively. These are scalar parameters that reflect the decay characteristics of the influence of physical quantities (such as pressure, temperature, flow rate, and concentration) with spatial distance. The larger the value, the faster the influence of the physical quantity decays with distance. Represents Euclidean distance, i.e., pixel. The straight-line distance to the critical area of the valve (such as the sealing surface) is used to quantify the attenuation effect of the physical field in space; This represents the reference physics field vector, a two-dimensional vector calculated from the prior physics model, defined as: , representing the theoretical physical field value based on environmental parameters, used for comparison with the gradient field of the generated image. This represents the stress distribution function, which calculates the stress field distribution on the valve body surface based on pressure P and temperature T, and outputs a scalar value representing the theoretical stress at location (x, y). This represents the flow field influence function, which is a function that calculates the effect of gas flow on visual features based on flow rate Q and concentration C, and outputs a scalar value representing the flow field effect at location (x,y). The total loss function of a generative adversarial network (GAN) is a weighted sum of three parts: adversarial loss, reconstruction loss, and multiphysics gradient consistency loss. The formula for the total loss function is as follows: ; in, Let represent the total loss function, a scalar value that is the overall optimization objective for training the generative adversarial network. It consists of a weighted sum of three parts. This represents the adversarial loss, ensuring that the generated images are visually realistic. Similar to the adversarial loss in standard GANs, it is used to deceive the discriminator. The reconstruction loss represents the fidelity between the generated image and the original sharp image, and is defined as follows: This refers to the L1 norm difference between the generated image and the real, clear image. Multiphysics gradient consistency loss forces the image to conform to the physical laws of the environment. These represent hyperparameters, which are positive real numbers used to weight and balance the importance of each loss term in the total loss function (e.g., Control the weight of reconstruction loss. The weights controlling the physical consistency loss are determined using a grid search optimization method; during training, the network parameters are updated by minimizing the total loss function, ultimately outputting a clear valve image.
[0021] In this embodiment, it is specifically necessary to explain the process in step S2, where the clear valve image obtained in step S1 is input into a convolutional neural network with an attention mechanism for feature extraction: First, multi-scale feature encoding is performed on the input clear valve image. A feature encoder based on a deep residual network variant extracts a set of original feature maps at multiple scales. This set of original feature maps contains multiple original feature maps arranged from high resolution to low resolution. The high-resolution original feature map captures the local texture details of the valve (such as corrosion marks), while the low-resolution original feature map captures the global structural information of the valve (such as the valve outline). The original feature map at each scale has a specific height, width, and number of channels. The scale range varies from high resolution (rich in detail) to low resolution (semantic abstraction). The height and width decrease as the resolution decreases, while the number of channels increases as the resolution decreases. The feature encoder extracts and downsamples the original feature map through convolutional layers and pooling layers. After the original feature map at multiple scales is extracted, spatial-channel dual attention units are applied to process the original feature map at each scale. The calculation process of spatial attention weight is as follows: first, a global average pooling operation is performed on the original feature map to compress the spatial dimension of the original feature map into a single value, and the pooled feature vector is obtained. Then, a convolution operation is applied to the pooled feature vectors, with the kernel size adapted to the size of the original feature map, and the convolution result is output. The Sigmoid activation function is then applied to the convolution result to map the output value to the range of zero to one, generating a spatial attention weight map. The size of this weight map is the same as the spatial dimension of the original feature map, but the number of channels is one, which is used to identify the importance of each pixel position. The calculation process of channel attention weights includes: first, performing a global average pooling operation on the original feature map to compress the spatial dimension and obtain the pooled feature vector; Then, a fully connected layer operation is applied to the pooled feature vector. The number of neurons in the fully connected layer is the same as the number of channels in the original feature map, and the fully connected result is output. Then, the Sigmoid activation function is applied to the fully connected result to map the output value to the range of zero to one, generating a channel attention weight vector. The size of this weight vector is one times one times the number of channels, which is used to measure the importance of each channel. Finally, the spatial attention weight map, the channel attention weight vector, and the original feature map are multiplied element-wise. That is, each value in the spatial attention weight map is multiplied by all channel values of the original feature map at the same spatial position (i.e., the same height and width coordinates), and each value in the channel attention weight vector is multiplied by all spatial position values of the original feature map at the corresponding channel. This results in a weighted feature map. This weighting process enables the convolutional neural network to adaptively focus on key regions related to the opening and closing state of the gate valve, including the valve stem position and the sealing surface region. The specific process of generating image feature vectors describing the opening and closing states using multi-scale feature fusion technology is as follows: The weighted feature maps at multiple scales are input into the feature pyramid fusion unit, which adopts a feature pyramid network structure to integrate multi-scale information. This structure includes top-down paths and lateral connections. The top-down path upsamples the low-resolution high-level semantic feature map to a high resolution, and then fuses it with the high-resolution low-level detail feature map through an addition operation. Lateral connections use 1x1 convolutional layers to adjust the number of channels in the feature maps, ensuring that the number of channels in feature maps of different scales is consistent and reducing computational complexity. During the fusion process, for each scale of feature map, an upsampling operation is first performed to the maximum resolution, and then multiplied by a learnable fusion weight. This fusion weight is part of the network parameters and is optimized by the gradient descent algorithm during training to adaptively weight features of different scales. The weighted feature maps of all scales are summed to obtain the final fused feature map, which integrates multi-scale information and balances semantic and detailed information. Finally, a global average pooling operation is applied to the fused feature map to compress it into a one-dimensional image feature vector. This image feature vector serves as a compact representation of the gate's open and closed state for subsequent state classification tasks.
[0022] In this embodiment, the specific process of fusing the image feature vector obtained in step S2 with the pressure and flow data in the environmental parameter data obtained in step S1 in step S3 includes: First, the image feature vector is standardized using the Z-score standardization method based on the historical data mean and standard deviation. The historical mean vector is the average value of the historical image feature vectors, and the historical standard deviation vector is the standard deviation of the historical image feature vectors. Standardization is achieved by subtracting the historical mean vector from the image feature vector and dividing by the historical standard deviation vector, so that the standardized image feature vector follows a zero-mean and unit-variance distribution. Simultaneously, pressure and flow parameters are subjected to min-max standardization, linearly mapping them to a closed interval between zero and one. The theoretical range for pressure parameters is 0.1 MPa to 100 MPa, and the theoretical range for flow parameters is 0 cubic meters per second to 10 cubic meters per second. Standardization is achieved by subtracting the theoretical minimum value from the parameter value and dividing by the theoretical range. Then, the standardized image feature vector is concatenated with the standardized pressure and flow parameter vectors to form a joint feature vector. The dimension of this joint feature vector is the image feature dimension plus two, with the pressure and flow parameters serving as the last two dimensions. During the fusion process, the temporal synchronization of the data is ensured, meaning that the image feature vector and the pressure and flow parameters must be data collected at the same timestamp to avoid errors introduced by time sequence misalignment. The specific process of inputting data into a dynamic Bayesian network for state reasoning includes: A dynamic Bayesian network model is constructed, which includes state variables and observation variables. The state variables represent the opening and closing states of the hydrogen gate valve. A state variable value of zero indicates the closed state, and a value of one indicates the open state. The observation variables correspond to the joint feature vector obtained after fusion in step S3. The dynamic Bayesian network model includes two core components: state transition probability and observation emission probability. The state transition probability describes the conditional probability relationship between states at adjacent time steps and is represented in the form of a probability matrix. The rows of the matrix correspond to the state at the previous time step, and the columns correspond to the state at the current time step. The observation emission probability describes the conditional probability distribution of the observation vector under a given state, and is modeled using a multivariate Gaussian distribution, with each state corresponding to a Gaussian distribution mean vector and covariance matrix. The network inference uses a forward-backward algorithm to calculate the posterior probability distribution. The forward algorithm recursively calculates the forward probability starting from the initial time step, and the backward algorithm recursively calculates the backward probability starting from the final time step. The posterior probability of the state at each time step is obtained by combining the forward and backward results. The inference process considers the temporal dependency of the state, that is, the current state depends on the state at the previous time step and the current observation. The specific operations of using the super-relaxation iterative algorithm to optimize the calculation of the internal state probabilities of dynamic Bayesian networks include: An over-relaxation factor is introduced on the basis of the standard forward-backward algorithm. The over-relaxation factor is a real number parameter with a value greater than one and less than two. It is used to control the iteration step size and accelerate convergence. When iterating and updating the state probability, each iteration contains two sub-steps. First, the standard Bayesian posterior probability update value is calculated. This update value is obtained by dividing the weighted sum of the current observed emission probability and the transition probability of the state probability at the previous moment by the normalization constant. The normalization constant ensures that the probability sum is one. Then, the new state probability estimate is set as a weighted average of the probability estimate of the current iteration and the standard update value. The weight is controlled by the over-relaxation factor. The weighted average is calculated by multiplying the current estimate by one minus the over-relaxation factor and adding the standard update value multiplied by the over-relaxation factor. The iteration termination condition is based on the change in state probability between two consecutive iterations. The change in state probability is calculated using the Euclidean norm. The iteration stops when the change is less than a preset tolerance threshold, which is set to 10 to the power of negative 5. Through this iterative mechanism, the convergence speed is improved while maintaining numerical stability, and the final output of the open and closed state probability of the hydrogen gate valve is obtained. The open and closed state probability includes two values: the open state probability and the closed state probability, and the sum of the two values is strictly one. In addition, the open and closed state probability output in step S3 will be used as the input of step S4 for online learning to update model parameters (such as transition probability and emission probability).
[0023] In this embodiment, it is specifically necessary to explain the following process in step S4: receiving the external verification signal used to verify the actual state of the valve and comparing the open / closed state probability output in step S3 with the external verification signal to generate a decision error. The external verification signal comes from the actual valve status detected by manual input or high-precision sensors. This signal is a binary signal, where zero indicates that the valve is actually in the closed state and one indicates that the valve is actually in the open state. The decision error is calculated using the weighted cross-entropy loss function, which consists of two parts: the first part is the log probability error based on the true state, and the second part is the entropy value of the state probability distribution multiplied by the entropy weight coefficient. The specific calculations in the first part are as follows: when the external verification signal is one, calculate the negative value of the natural logarithm of the probability of opening; when the external verification signal is zero, calculate the negative value of the natural logarithm of the probability of closing. The second part calculates the entropy value by multiplying each state probability in the state probability distribution by the natural logarithm of that state probability, summing the results, and taking the negative value. That is, first calculate the natural logarithm of the closed probability multiplied by the closed probability, add the natural logarithm of the open probability multiplied by the open probability, and then take the negative value of the sum as the entropy value. The entropy weight coefficient is a preset real number parameter with a value range greater than or equal to zero and less than or equal to 0.1. It is used to adjust the contribution of the entropy term to the decision error. The final decision error is the weighted sum of the results from the first part and the second part, where the second part is multiplied by the entropy weight coefficient. The decision error is a non-negative real number; the larger the value, the greater the difference between the model output and the true state, and the higher the uncertainty of the model prediction. This calculation process overcomes the problem of gradient vanishing when the probability confidence of traditional loss functions is high. The specific process of simultaneously optimizing and adjusting the parameters of the generative adversarial network in step S1, the convolutional neural network in step S2, and the dynamic Bayesian network in step S3 using an online incremental learning algorithm includes: The online incremental learning algorithm is based on an adaptively regularized online gradient descent method (this formula adjusts the step size through an adaptive learning rate and combines parameter importance regularization to ensure that key parameters are not over-updated). This method consists of six consecutive computational steps, and the gradient backpropagation proceeds along a specific path, starting from the dynamic Bayesian network in step S3, propagating to the convolutional neural network in step S2, and then to the generative adversarial network in step S1; specifically: for the dynamic Bayesian network in step S3, the gradient is calculated based on the decision error; for the convolutional neural network in step S2, the gradient propagates in a chain through the image feature vectors output by step S2, which are the inputs of the network in step S3; for the generative adversarial network in step S1, the gradient propagates in a chain through the clear valve images output by step S1, which are the inputs of the network in step S2. The six consecutive calculation steps are as follows: The first step is to calculate the gradient of the decision error with respect to the joint parameters, which include the parameters of the generative adversarial network, the convolutional neural network, and the dynamic Bayesian network. The second step is to calculate the first moment estimate, which is obtained by weighted averaging of the current gradient and the historical first moment estimates. The weighting is controlled by the first decay rate parameter, which ranges from 0.9 to 0.999. The third step is to calculate the second moment estimate, which is obtained by weighted average of the current gradient square and the historical second moment estimates. The weighting is controlled by the second decay rate parameter, which ranges from 0.9 to 0.999. The fourth step is to perform bias correction on the first moment estimate. The correction value is the first moment estimate divided by the power of t minus the first decay rate parameter, where t is the current iteration number. The fifth step is to perform bias correction on the second moment estimate. The correction value is the second moment estimate divided by one minus the power of t of the second decay rate parameter. The sixth step is to update the parameters. The new parameter value is equal to the original parameter value minus the learning rate multiplied by the corrected first moment estimate divided by the square root of the corrected second moment estimate plus the numerical stability constant, and then minus the regularization coefficient multiplied by the element-wise product of the parameter importance vector and the difference between the current parameter and the reference parameter. The learning rate ranges from 10 to ... The parameter importance vector is estimated using an exponential moving average of the squared gradient to protect important parameters from over-updating. The reference parameter is a snapshot of historical parameters to prevent catastrophic forgetting. The parameter update is triggered when the decision error exceeds a preset threshold or reaches the periodic update interval. The preset threshold is set to 0.5, and the periodic update interval is set to every ten time steps. After the parameter is updated, the new parameters are immediately applied to the network processing in subsequent steps to form a closed-loop optimization. At the same time, the reference parameter and the parameter importance vector are updated periodically at an interval of every 100 iterations to capture long-term parameter evolution.
[0024] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0025] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied 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.
[0026] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0027] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0028] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0029] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0030] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method of determining the open / close state of a hydrogen gate valve, characterized by, Specifically comprising the following steps: Step S1, obtaining a noise image in a high-pressure hydrogen environment and environment parameter data collected by a sensor, the environment parameter data including pressure, temperature, flow rate and hydrogen concentration; a generative adversarial network with multi-physical field constraints is used to denoise and preprocess the noise image, wherein the environment parameter data is input as a physical constraint condition into the generative adversarial network, so that the generative adversarial network outputs a clear valve image; Step S2, inputting the clear valve image obtained in step S1 into a convolutional neural network embedded with an attention mechanism for feature extraction, wherein the attention mechanism is used to guide the network to focus on key areas related to the opening and closing state of the gate valve in the image, and generate an image feature vector describing the opening and closing state through a multi-scale feature fusion technology; Step S3, fusing the image feature vector obtained in step S2 with the pressure and flow rate data in the environment parameter data obtained in step S1, and inputting into a dynamic Bayesian network for state inference; the dynamic Bayesian network applies a hyper-relaxation iteration algorithm to optimize the calculation process of its internal state probability, and finally outputs the opening and closing state probability of the hydrogen gate valve; Step S4, receiving an external check signal for verifying the actual state of the valve, comparing the opening and closing state probability output in step S3 with the external check signal to generate a decision error, based on which an online incremental learning algorithm is used to synchronously optimize and adjust the parameters of the generative adversarial network in step S1, the convolutional neural network in step S2 and the dynamic Bayesian network in step S3, so as to realize dynamic adaptation of the above networks.
2. The method of claim 1, wherein: In step S1, the specific process of obtaining a noise image in a high-pressure hydrogen environment and environment parameter data collected by a sensor is as follows: An original noise image is captured by a flameproof industrial camera deployed in a high-pressure hydrogen environment, and at the same time, environment parameter data is synchronously collected by a sensor group, the environment parameter data including four physical quantities of pressure, temperature, flow rate and hydrogen concentration, the sensor group being composed of a pressure sensor, a temperature sensor, a flow sensor and a hydrogen concentration sensor; the environment parameter data is organized in the form of a vector to form an environment parameter vector, which is input into the generative adversarial network as a physical constraint condition together with the noise image; the acquisition of the noise image and the collection of the environment parameter data are synchronized by time stamp; before the original noise image and the environment parameter vector are input into the generative adversarial network, the original noise image is preprocessed by size normalization, and the environment parameter vector is preprocessed by numerical standardization.
3. The method of claim 1, wherein: The specific operation of the generative adversarial network with multi-physical field constraints for denoising and preprocessing the noise image is as follows: The generative adversarial network is composed of a generator and a discriminator, the generator adopts an encoder-decoder structure, the encoder is responsible for feature extraction and down-sampling of the input noise image, and generates multi-scale intermediate output data during processing, and the decoder is responsible for reconstructing a clear image based on the multi-scale intermediate output data, the input of the generator is the splicing result of the noise image and the environmental parameter vector, the environmental parameter vector is expanded into mapping data with the same size as the multi-scale intermediate output data generated by the encoder through a fully connected layer, and the mapping data is injected as conditional information through channel splicing at each down-sampling layer of the encoder; The discriminator adopts a structure based on a local receptive field, and simultaneously receives an image and an environmental parameter vector, wherein the image includes a generated image output by the generator, image features are extracted through a convolutional layer, and the environmental parameter vector is mapped through a fully connected layer and fused with the image features at multiple scales; A physical consistency constraint mechanism is introduced in the training process of the generative adversarial network, which is realized through a multi-physical field gradient consistency loss function, the loss function is calculated based on the mathematical correlation between the image gradient field and the environmental physical parameters, wherein the image gradient field is the spatial gradient vector of the generated image at the pixel position, and the environmental physical parameters include pressure, temperature, flow and hydrogen concentration, which are coupled through a physical Jacobian matrix, the elements of the physical Jacobian matrix are calculated by a pressure coupling coefficient, a temperature coupling coefficient, a flow coupling coefficient, a concentration coupling coefficient, a pressure attenuation coefficient, a temperature attenuation coefficient, a flow attenuation coefficient, a concentration attenuation coefficient and a Euclidean distance from a pixel point to a valve key area, and a reference physical field vector is obtained based on a priori physical model by a stress distribution function and a flow field influence function; The total loss function of the generative adversarial network is composed of three parts: an adversarial loss, a reconstruction loss and a multi-physical field gradient consistency loss, which are weighted and summed; during training, the network parameters are updated by minimizing the total loss function, and finally a clear valve image is output.
4. The method of claim 1, wherein: In the step S2, the clear valve image obtained in the step S1 is input into a convolutional neural network embedded with an attention mechanism for feature extraction. The specific process is as follows: First, the input clear valve image is multi-scale feature encoded, and a set of original feature maps of multiple scales is extracted by a feature encoder based on a deep residual network variant, which includes multiple original feature maps arranged from high resolution to low resolution, wherein the high resolution original feature map captures the local texture details of the valve, and the low resolution original feature map captures the global structural information of the valve; The feature encoder realizes the extraction and down-sampling of the original feature map through convolutional layers and pooling layers, after the extraction of the original feature map of multiple scales is completed, for each scale of the original feature map, a spatial-channel dual attention unit is applied for processing, wherein the calculation process of the spatial attention weight is as follows: first, a global average pooling operation is performed on the original feature map to compress the spatial dimension of the original feature map into a single value to obtain a pooled feature vector; Then, a convolution operation is applied to the pooled feature vector, and the convolution kernel size is adapted to the size of the original feature map, and a convolution result is output. Then, the Sigmoid activation function is applied to the convolution result to map the output value to between zero and one, generating a spatial attention weight map; The calculation process of the channel attention weight includes: first, performing a global average pooling operation on the original feature map to compress the spatial dimension and obtain a pooled feature vector; Then, a fully connected layer operation is applied to the pooled feature vector, and the number of neurons of the fully connected layer is consistent with the number of channels of the original feature map, and a fully connected result is outputted; Then, the Sigmoid activation function is applied to the fully connected result to map the output value to between zero and one, generating a channel attention weight vector; Finally, the spatial attention weight map, the channel attention weight vector, and the original feature map are subjected to an element-by-element multiplication operation to obtain a weighted feature map, and the weighting process enables the convolutional neural network to adaptively focus on the key regions related to the gate valve opening and closing state, including the valve rod position and the sealing surface region.
5. The method of claim 1, wherein: The specific process of generating the image feature vector describing the opening and closing state through the multi-scale feature fusion technology is as follows: The weighted feature maps of multiple scales are input into a feature pyramid fusion unit, which adopts a feature pyramid network structure including a top-down path and a lateral connection; The top-down path up-samples the high-level semantic feature map with low resolution to a high resolution, and is fused with the high-resolution bottom-level detail feature map through an addition operation; The lateral connection uses a one-by-one convolution layer to adjust the channel number of the feature map, and in the fusion process, for the feature map of each scale, the up-sampling operation is first performed to the maximum resolution, and then multiplied by a learnable fusion weight, which is part of the network parameters and is optimized through the gradient descent algorithm in the training process to adaptively weight the features of different scales; All the weighted feature maps of different scales are summed to obtain the final fused feature map; Finally, a global average pooling operation is applied to the fused feature map to compress it into a one-dimensional image feature vector.
6. The method of claim 1, wherein: In step S3, the specific process of fusing the image feature vector obtained in step S2 with the pressure and flow data in the environmental parameter data obtained in step S1 includes: First, the image feature vector is standardized by using the Z-score standardization method based on the historical data mean and standard deviation, wherein the historical mean vector is the average of the historical image feature vectors, and the historical standard deviation vector is the standard deviation of the historical image feature vectors, and the standardization is realized by subtracting the historical mean vector from the image feature vector and dividing by the historical standard deviation vector; At the same time, the pressure parameter and the flow parameter are subjected to minimum maximum standardization processing; then, the standardized image feature vector and the standardized pressure parameter and flow parameter vector are spliced to form a joint feature vector.
7. The method of claim 1, wherein: The specific process of inputting into the dynamic Bayesian network for state inference includes: A dynamic Bayesian network model is constructed, which includes state variables and observation variables. The state variables represent the open and close states of the hydrogen gate valve, and the state variables take the value of zero when the state is closed and take the value of one when the state is open. The observation variables correspond to the joint feature vectors obtained after fusion. The dynamic Bayesian network model includes two core components, state transition probability and observation emission probability. The state transition probability describes the conditional probability relationship between adjacent time steps, which is represented in the form of a probability matrix. The rows of the matrix correspond to the state at the previous time step, and the columns correspond to the state at the current time step. The observation emission probability describes the conditional probability distribution of the observation vector given the state. A multivariate Gaussian distribution is used to model the observation emission probability. Each state corresponds to a mean vector and a covariance matrix of a Gaussian distribution. Network inference uses the forward-backward algorithm to calculate the posterior probability distribution. The forward algorithm recursively calculates the forward probability from the initial time step, and the backward algorithm recursively calculates the backward probability from the final time step. The posterior probability of each time step is obtained by combining the forward and backward results.
8. The method of claim 1, wherein: The dynamic Bayesian network applies an over-relaxation iterative algorithm to optimize the calculation process of its internal state probability. The specific operations include: An over-relaxation factor is introduced based on the standard forward-backward algorithm. The over-relaxation factor is a real number parameter with a value range greater than one and less than two, which is used to control the iteration step size and accelerate the convergence. When updating the state probability iteratively, each iteration includes two sub-steps. First, calculate the standard Bayesian posterior probability update value. The update value is obtained by dividing the weighted sum of the current observation emission probability and the transition probability of the previous time step state probability by the normalization constant. Then set the new state probability estimate value as the weighted average of the current iteration probability estimate value and the standard update value. The weight is controlled by the over-relaxation factor. The weighted average is calculated by multiplying the current estimate value by one minus the over-relaxation factor, and adding the standard update value multiplied by the over-relaxation factor. The iteration termination condition is based on the state probability change quantity of the last two iterations. The state probability change quantity is calculated by the Euclidean norm. When the change quantity is less than the preset tolerance threshold, the iteration is stopped. The tolerance threshold is set to ten to the negative fifth power. Finally, the open and close state probability of the hydrogen gate valve is output.
9. The method of claim 1, wherein: In step S4, the specific process of receiving an external check signal for verifying the actual state of the valve and comparing the open and close state probability output in step S3 with the external check signal to generate a decision error includes: The external check signal is derived from the actual valve state input by human. The signal is a binary signal, where zero represents that the valve is actually in the closed state, and one represents that the valve is actually in the open state. The decision error is calculated using a weighted cross-entropy loss function. The function consists of two parts. The first part is the log probability error based on the true state, and the second part is the entropy value of the state probability distribution multiplied by the entropy weight coefficient. The specific calculation of the first part is as follows. When the external check signal is one, calculate the negative value of the natural logarithm of the open probability. When the external check signal is zero, calculate the negative value of the natural logarithm of the closed probability. The second part of the entropy value is calculated by multiplying each state probability in the state probability distribution by the natural logarithm of the state probability and then taking the negative sum, that is, the closing probability is multiplied by the natural logarithm of the closing probability, and the opening probability is multiplied by the natural logarithm of the opening probability, and then the negative value of the sum is taken as the entropy value; The entropy weight coefficient is a preset real number parameter, the value range of which is greater than or equal to zero and less than or equal to zero point one, and is used to adjust the contribution degree of the entropy term in the decision error; The final decision error is a weighted sum of the first part of the calculation result and the second part of the calculation result, wherein the second part of the calculation result is multiplied by the entropy weight coefficient.
10. The method of claim 1, wherein: The specific process of synchronously optimizing and adjusting the parameters of the generative adversarial network in step S1, the convolutional neural network in step S2, and the dynamic Bayesian network in step S3 by using the online incremental learning algorithm includes: The online incremental learning algorithm is based on an online gradient descent method with adaptive regularization, which includes six consecutive calculation steps, and the gradient back propagation is performed along a specific path, starting from the dynamic Bayesian network in step S3, propagating to the convolutional neural network in step S2, and then to the generative adversarial network in step S1; Specifically, for the dynamic Bayesian network in step S3, the gradient is calculated based on the decision error; for the convolutional neural network in step S2, the gradient is propagated through the input of the step S3 network, that is, the image feature vector output by step S2; for the generative adversarial network in step S1, the gradient is propagated through the input of the step S2 network, that is, the clear valve image output by step S1; The six consecutive calculation steps are specifically: The first step is to calculate the gradient of the decision error with respect to the joint parameters, which include the generative adversarial network parameters, the convolutional neural network parameters, and the dynamic Bayesian network parameters; The second step is to calculate the first moment estimate, which is obtained by weighted averaging of the current gradient and the historical first moment estimate, and the weighting weight is controlled by the first decay rate parameter, and the value range of the first decay rate parameter is from 0.9 to 0.9999; The third step is to calculate the second moment estimate, which is obtained by weighted averaging of the square of the current gradient and the historical second moment estimate, and the weighting weight is controlled by the second decay rate parameter, and the value range of the second decay rate parameter is from 0.9 to 0.9999; The fourth step is to correct the bias of the first moment estimate, and the correction value is the first moment estimate divided by (1-t), where t is the current iteration number; The fifth step is to correct the bias of the second moment estimate, and the correction value is the second moment estimate divided by (1-t); The sixth step is to update the parameters, and the new parameter value is equal to the original parameter value minus the learning rate multiplied by the corrected first moment estimate divided by the square root of the corrected second moment estimate plus the result after the numerical stability constant, and then minus the regularization coefficient multiplied by the element-wise product of the parameter importance vector and the difference between the current parameter and the reference parameter; The value range of the learning rate is from ten to the power of -5 to ten to the power of -2, the numerical stability constant is ten to the power of -8, and the value range of the regularization coefficient is from 0.01 to 0.
1. The parameter importance vector is estimated by an exponentially moving average of the gradient squares, and the reference parameters are snapshots of the history parameters; the parameter update trigger condition is that the decision error is greater than a preset threshold or a periodic update interval is reached, the preset threshold is set to 0.5, and the periodic update interval is set to every ten time steps; after the parameter is updated, the new parameter is immediately applied to the network processing in the subsequent steps, forming a closed-loop optimization; at the same time, the reference parameters and the parameter importance vector are periodically updated, and the update interval is every one hundred iterations.