Real-time neutron tube target membrane defect detection method based on machine vision

By constructing a baseline feature library of neutron tube target films and using a dual-space conjugate autoencoder combined with a long short-term memory network, the problem of high false positive rate in traditional detection methods was solved, and accurate identification and stable detection of defects in neutron tube target films were achieved.

CN122023402APending Publication Date: 2026-05-12XIAN GUANNENG NEUTRON DETECTION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIAN GUANNENG NEUTRON DETECTION TECH CO LTD
Filing Date
2026-04-10
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Traditional methods for detecting defects in neutron tube target films rely on general reference libraries, which cannot be adapted to the individual characteristics of a single neutron tube, resulting in a high false positive rate and making it difficult to meet the requirements for real-time monitoring accuracy.

Method used

A machine vision-based detection method is adopted, which constructs a baseline feature library of neutron tube target films through an autoencoder model. Combined with a dual-space conjugate autoencoder and a long short-term memory network optimized by the black hole particle swarm algorithm, the method can accurately locate abnormal regions and determine the type of defects.

Benefits of technology

It enables accurate identification of target film defects in neutron tubes, reduces the false positive rate, improves the stability and reliability of detection, and adapts to individual differences in neutron tubes and complex operating environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122023402A_ABST
    Figure CN122023402A_ABST
Patent Text Reader

Abstract

The invention provides a neutron tube target membrane defect real-time detection method based on machine vision, which comprises the following steps: constructing a reference feature library based on an auto-encoder model, adapting to neutron tube target membrane individual difference and complex operation environment, and forming an exclusive dynamic reference through deep visual features in a self-learning healthy state, so as to realize real-time detection of neutron tube target membrane defects. Misjudgment caused by equipment difference and operation stage drift of a general reference is avoided, a stable reference basis fitting the characteristics of a single tube is provided for subsequent detection, and the consistency and reliability of detection are guaranteed; and based on abnormal region positioning of a double-space conjugate auto-encoder, on the basis of a reference feature library, capturing and verification of reference feature deviation are enhanced through double-space constraint, a conjugate structure further improves the sensitivity of anomaly recognition, the algorithm inherits exclusive feature distribution of the reference library, the problem of poor general detection adaptability is solved, and the detection accuracy is improved. Normal fluctuation and real abnormity can be accurately distinguished, accurate positioning of an abnormal area is achieved, and reliable front support is provided for defect type judgment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of neutron tube technology, and more specifically, to a machine vision-based method for real-time detection of defects in the target film of a neutron tube. Background Technology

[0002] Neutron tubes are core equipment in fields such as nuclear physics experiments and industrial non-destructive testing. The target film, as a key component, is subjected to long-term ion bombardment and thermal loading, which can easily lead to defects such as sputtering erosion and microcracks. These defects directly affect the stability of neutron yield and the safety of equipment operation. Machine vision has become the preferred technology for target film defect detection due to its advantages of non-contact, non-destructive, and real-time monitoring. Its core requirement is to establish a judgment benchmark that fits the individual characteristics of the equipment and accurately identify abnormal evolutions in the operating state.

[0003] Traditional neutron tube target film defect detection often employs anomaly detection methods based on single-spatial autoencoders. This method first acquires healthy target film images of the neutron tube to construct a benchmark library, then extracts shallow features such as brightness and texture from the benchmark library as health features. Subsequently, the single-spatial autoencoder is used to learn the health features and establish a feature model of the health state. During detection, real-time images of the neutron tube target film are acquired, and corresponding real-time features are extracted. The reconstruction deviation between the real-time features and the health features is calculated using the feature model to determine whether there are any anomalies in the neutron tube target film.

[0004] However, the general benchmark library relied upon by traditional methods is constructed based on the average health status of multiple neutron tube target films. This library cannot adapt to the individual characteristics of a single neutron tube target film caused by differences in manufacturing processes and deposition quality. As a result, there is an inherent deviation between the judgment benchmark and the actual health status of a single device. It is impossible to accurately distinguish between "normal fluctuations of individual devices" and "real defects of the target film". Ultimately, this leads to a high misjudgment rate of anomaly detection, which makes it difficult to meet the engineering accuracy requirements for real-time monitoring of neutron tube target film defects. Summary of the Invention

[0005] This invention addresses the technical problems existing in the prior art by providing a real-time detection method for neutron tube target film defects based on machine vision, which can overcome the deficiencies in the background technology.

[0006] This invention provides a machine vision-based real-time detection method for defects in the target film of a neutron tube, comprising: Step S1: Establish an observation channel for the neutron tube target membrane and acquire stable operating images of the neutron tube target membrane under healthy conditions through the observation channel; Step S2: Extract the baseline features of each of the stable operating state images based on the autoencoder model to construct a baseline feature library for the neutron tube target membrane; Step S3: Acquire real-time operational images of the neutron tube target membrane through the observation channel; based on the reference feature library, locate abnormal regions in the real-time operational images using a dual spatial conjugate autoencoder to obtain the abnormal regions and confidence levels. Step S4: Extract the temporal evolution feature vector of the abnormal region, input the temporal evolution feature vector into the long short-term memory network model optimized based on the black hole particle swarm algorithm, output the defect type, and classify the risk level of the neutron tube target membrane based on the confidence level and the defect type.

[0007] Based on the above technical solution, the present invention can also be improved as follows.

[0008] Optionally, step S1, establishing an observation channel for the neutron tube target membrane, and acquiring stable operating images of the neutron tube target membrane under healthy conditions through the observation channel, includes: An observation channel is constructed on the outside of the bulk structure of the neutron tube target membrane; A time-synchronized imaging triggering mechanism is established. During the initial health phase of the neutron tube, stable operating state images of the neutron tube target film at different operating stages are acquired using a neutron tube operating status sensor. The acquisition time is T2. The operating stages include a discharge stabilization stage and an ion beam stabilization stage. The triggering time of the sensor signal is... The image acquisition time of the imaging device is The time synchronization error Δt = | - |≤ ,in The maximum allowable synchronization error threshold is determined based on the minimum duration of each operating phase of the neutron tube.

[0009] Optionally, step S2, based on an autoencoder model, extracts the baseline features of each steady-state operating image to construct a baseline feature library for the neutron tube target membrane, including: Each of the acquired stable operating state images is preprocessed to obtain a preprocessed stable operating state image; Each of the preprocessed stable operating images is input into the autoencoder model to obtain the output reconstructed image vector, i.e. the baseline features, which constitute the baseline feature library B. The baseline features include four types of core feature indicators, namely the overall brightness distribution features of the reaction area, the texture continuity features of the reaction area, the reflective highlight position features of the reaction area, and the contour boundary features of the reaction area. Based on the operational stages of the neutron tube target film, the reference feature library B is divided into a subset of reference features for the stable discharge stage. and the reference feature subset of the ion beam stabilization phase ; The baseline feature library B is updated based on a set update cycle; The autoencoder model includes an encoder and a decoder. The input of the autoencoder model is a preprocessed stable running image, and the output is a reconstructed image vector. The encoder employs a 3-layer fully connected network structure to map high-dimensional image vectors into low-dimensional latent feature vectors; the mathematical expression of the encoder is: ; in, For the first A one-dimensional vector flattened from a stable running state image at any given time. , and These are the weight matrices for layers 1-3 of the encoder. , These are the bias vectors for layers 1-3 of the encoder, respectively. For the first The latent feature vector at time t, ( ) is the ReLU activation function; The decoder employs a 3-layer fully connected network structure symmetrical to the encoder, used to reconstruct the latent feature vectors to obtain the reconstructed image vectors. The mathematical expression for the decoder is: ; in, , and These are the weight matrices for layers 1-3 of the decoder. , and These are the bias vectors for layers 1-3 of the decoder, respectively. For the first Reconstructed image vector at time step For the Sigmoid function; The autoencoder model is trained to obtain the trained autoencoder model. During training, the loss function of the autoencoder model is set. The calculation formula is: ; in, The number of training samples. Let t be the timestamp of the t-th training sample. It is the L2 norm. This is the loss function for the autoencoder model.

[0010] Optionally, in step S3, real-time operational images of the neutron tube target membrane are acquired through the observation channel. Based on the benchmark feature library, anomaly regions are located in the real-time operational images using a dual spatial conjugate autoencoder to obtain the anomaly regions and their confidence levels, including: A dual-space conjugate autoencoder is constructed, comprising a master encoder E1, an auxiliary encoder E2, and a shared decoder D3. The master encoder E1 comprises a 3-layer fully connected network, and the auxiliary encoder E2 is conjugate and symmetric with the master encoder E1. The shared decoder D3 comprises a 3-layer fully connected network. The initial weight matrix of the master encoder E1 reuses the weight matrix of the encoder in the autoencoder model, and the initial bias vector reuses the bias vector of the encoder in the autoencoder model. The initial weight matrix of the auxiliary encoder E2 is the transpose of the weight matrix of the encoder in the autoencoder model, and the initial bias vector reuses the bias vector of the encoder in the autoencoder model. The initial weight matrix of the shared decoder D3 reuses the weight matrix of the decoder in the autoencoder model, and the initial bias vector reuses the bias vector of the decoder in the autoencoder model. The dual-space conjugate autoencoder is trained based on the training set to obtain the trained dual-space conjugate autoencoder. The training set includes healthy and stable operating images randomly extracted from the benchmark feature library B and manually annotated defect simulation images. Based on the reaction area contour template in the benchmark feature library B, the real-time reaction area in the real-time running image is located, and based on the real-time reaction area, the corresponding local image of the real-time reaction area is cropped from the preprocessed real-time running image. The local image of the real-time reaction area is input into the trained dual-space conjugate autoencoder, which outputs a fused latent feature and a reconstructed image vector, and calculates the dual-space bias value, which includes sample space loss and latent space loss. Based on the sample space loss and the potential space loss, preliminary abnormal regions in the local image of the real-time reaction area are determined; Calculate the confidence level of the preliminary anomaly region. Based on the confidence level, further determine whether the preliminary anomaly region is a true anomaly region. If so, output the coordinates of the anomaly region, the confidence level, and the dual spatial deviation value.

[0011] Optionally, the loss function of the dual spatial conjugate autoencoder Represented as: ; in, For the sample space loss weights, As the potential spatial loss weight, For sample space loss, For potential space loss, The loss function; The formula for sample space loss is: Where X3(t) is a one-dimensional vector of the real-time running image after flattening, and t3 is the real-time acquisition timestamp. To reconstruct the image vector; The formula for potential space loss is: ,in To integrate potential features, =( (t)+ (t)) / 2, (t) is the output of the main encoder. (t) represents the output of the auxiliary encoder. The mean value of the potential feature vectors corresponding to the running stage k output by the autoencoder model, where k=1 corresponds to the discharge stabilization stage and k=2 corresponds to the ion beam stabilization stage. Set sample space loss The decision threshold θ ,in, , Let L2 be the mean of the loss function L2 of the stable running-state image output by the autoencoder model. The standard deviation of the loss function L2 for the stable running image output by the autoencoder model; and the latent spatial loss are defined. The determination threshold, where, , The standard deviation of the latent feature vector Z(τ) of stage k output by the autoencoder model is given.

[0012] Optionally, the local image of the real-time reaction area is input into the trained dual-space conjugate autoencoder, which outputs a fused latent feature and a reconstructed image vector, and calculates the dual-space bias value, including: Flatten the local image of the real-time reaction area into a one-dimensional vector X3(t); Inputting a one-dimensional vector X3(t) into a trained dual-space conjugate autoencoder outputs a fused latent feature Z3(t) and a reconstructed image vector. 3(t), calculate the potential spatial loss of the local image of the real-time reaction zone. The sample space loss of each pixel in the local image of the real-time reaction area described in the figure. ; Identify the preliminary abnormal regions in the local image of the real-time reaction zone.

[0013] when >θ and > When this happens, the corresponding pixel is determined to be a candidate abnormal pixel; Connectivity analysis is performed on candidate anomalous pixels to form preliminary anomalous regions.

[0014] Optionally, the confidence level of the preliminary anomaly region is calculated. Based on the confidence level, it is further determined whether the preliminary anomaly region is a true anomaly region. If so, the coordinates of the anomaly region, the confidence level, and the bispatial deviation value are output, including: If the initial abnormal area area ratio <First preset area threshold> And max( / θ , / If the initial abnormal region is less than the preset first ratio threshold, it is considered a low-confidence area and determined to be a normal operation fluctuation; therefore, no abnormal coordinates are output. =Number of abnormal pixels / Total number of pixels in the reaction area; If the first preset area threshold ≤ Percentage of Preliminary Anomaly Area Second preset area threshold And the preset first ratio threshold ≤ max( / θ , / If the preset second ratio threshold is less than the threshold value, the preliminary abnormal area is of medium confidence level, marked as a candidate defect area, and the coordinates of the aligned abnormal area and the dual spatial deviation value are recorded. If the initial abnormal area area ratio ≥Second preset area threshold or max( / θ , / If the initial abnormal region is at a high confidence level and is determined to be a final abnormal region, then the initial abnormal region is at a high confidence level. For abnormal regions, the operating stage k corresponding to the real-time operating image is identified, where k=1 is the discharge stabilization stage and k=2 is the ion beam stabilization stage. A subset of the baseline feature library for the corresponding stage is then obtained. ; From the subset of the benchmark feature library Extracting the reaction zone anchor point information, the reaction zone anchor point information includes the center coordinates of the reaction zone and the set of boundary feature points; Based on the local image of the real-time reaction zone, the center coordinates of the real-time reaction zone are calculated, and the coordinates of the center of the real-time reaction zone are compared with a subset of the baseline feature library. The coordinate offset of the center coordinate of the reaction area is used to correct the pixel coordinates in the abnormal area to the aligned coordinates, thereby obtaining the coordinates of the abnormal area. Output the coordinates of the outlier region, the confidence level, and the sample space loss. and potential space loss .

[0015] Optionally, step S4 involves extracting the temporal evolution feature vector of the abnormal region, inputting the temporal evolution feature vector into a long short-term memory network model optimized based on the black hole particle swarm optimization algorithm, outputting the defect type, and classifying the risk level of the neutron tube target membrane based on the confidence level and the defect type, including: Set input window length ,correspond Extracting from consecutive sampling periods The temporal evolution feature vector of the abnormal region within a series of consecutive sampling periods is expressed as follows: ; in, For time-series evolution feature vectors, express The real-time running image at the sampling time undergoes sample space loss through the dual-space conjugate autoencoder. express The real-time running image at the sampling time undergoes the latent spatial loss of the dual-spatial conjugate autoencoder. Let be the pixel area of ​​the abnormal region at time t. and The coordinates of the center of the aligned anomaly region; Normalize each component of the temporal evolution feature vector to obtain the normalized temporal evolution feature vector. ; Normalized time-series evolution feature vectors Input the Long Short-Term Memory (LSTM) network model and output the probability of each type of defect; The defect type with the highest probability is taken as the defect type of the abnormal region; Based on the defect type, confidence level, and temporal evolution trend of the temporal evolution feature vector of the abnormal region, the risk level of the abnormal region is classified.

[0016] Optionally, the Long Short-Term Memory (LSTM) network model includes an input layer, a hidden layer, and an output layer. The input layer has 5 neurons and receives a normalized temporal evolution feature vector. The hidden layer consists of two layers, with a total number of neurons. , The optimization objective of the Black Hole Particle Swarm Optimization (BHPSO) algorithm is the ReLU function; the number of neurons in the output layer is 3, corresponding to 3 types of core defects: sputtering erosion (SE), isotope dissipation (TD), and thermal stress microcracks (TSC), with the softmax function as the activation function, and outputting the probabilities P(SE), P(TD), and P(TSC) of the 3 types of defects. Based on the Black Hole Particle Swarm Optimization (BHPSO) algorithm, this study optimizes four key hyperparameters of the Long Short-Term Memory (LSTM) network model by simulating the "particle swarm search + black hole attraction + particle regeneration" mechanism, obtaining the optimal hyperparameter combination. The four key hyperparameters include the number of neurons in the hidden layer. Learning rate Batch size and number of iterations ; The Long Short-Term Memory (LSTM) network model is trained using the optimal hyperparameter combination to obtain the trained LSTM network model. The normalized temporal evolution feature vector Input a trained Long Short-Term Memory (LSTM) network model and output probability values ​​for three types of defects. Determine the defect type based on the probability values.

[0017] Optionally, the Black Hole Particle Swarm Optimization (BHPSO) algorithm optimizes four key hyperparameters of the Long Short-Term Memory (LSTM) network model by simulating the "particle swarm search + black hole attraction + particle regeneration" mechanism, obtaining the optimal hyperparameter combination, including: Initialize the population of particles, with each particle corresponding to one set of hyperparameters. The particle position vector is: ; Each particle updates its velocity and position based on its individual optimal position and the global optimal position, calculated using the following formula: ; ; in, This represents the number of BHPSO iterations. The particle velocity vector For inertial weights, and As acceleration factors, they guide particles toward individual and global optima, respectively. and A random number in the interval [0,1]. This represents the historical best position for a single particle. This is the globally optimal position for the entire particle swarm; According to the black hole attraction mechanism, particles are randomly reborn in the search space, including: The global optimal position Represented as a black hole, the formula for calculating the gravitational radius of a black hole is: ; in, This is the absorption range control coefficient. For particle swarm scale, Let be the Euclidean distance between the i-th particle and the global optimal position. The radius of the black hole's attraction; The formula for calculating the Euclidean distance between each particle and the global optimal position is as follows: ; Where j is the hyperparameter dimension index, Let j be the hyperparameter of the position vector of the i-th particle. The Euclidean distance between each particle and the global optimal position; When the Euclidean distance between the i-th particle and the global optimal position Black hole attraction radius The particle is absorbed by the black hole and randomly regenerates into a new particle within the search space, according to the formula: ,in, and These are the lower bound and the upper bound of the search space, respectively. A random number in the range [0,1]. For reborn particles; Through iterative optimization, the optimal hyperparameter combination of the Long Short-Term Memory (LSTM) network model was obtained.

[0018] This invention provides a real-time defect detection method for neutron tube target films based on machine vision. It constructs a benchmark feature library based on an autoencoder model, adapting to individual differences in neutron tube target films and complex operating environments. By self-learning deep visual features under healthy conditions, it forms a unique dynamic benchmark, avoiding misjudgments caused by equipment differences and operational drift in general benchmarks. This provides a stable and consistent reference for subsequent detection, ensuring consistency and reliability. Furthermore, it utilizes a dual-spatial conjugate autoencoder for abnormal region localization. Based on the benchmark feature library, dual-spatial constraints enhance the capture and verification of benchmark feature deviations. The conjugate structure further improves the sensitivity of anomaly identification. This algorithm inherits the unique feature distribution of the benchmark library, solving the problem of poor adaptability in general detection. It can accurately distinguish between normal fluctuations and true anomalies, achieving precise localization of abnormal regions and providing reliable preliminary support for defect type determination. Attached Figure Description

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

[0020] Figure 1 This is a flowchart illustrating the steps of a machine vision-based real-time detection method for neutron tube target film defects, as proposed in one embodiment of the present invention. Figure 2 This is a flowchart illustrating the steps for obtaining abnormal regions in a machine vision-based real-time detection method for neutron tube target film defects, as proposed in one embodiment of the present invention. Figure 3 This is a flowchart illustrating the steps for obtaining the defect type in a real-time defect detection method for a neutron tube target film based on machine vision, as proposed in one embodiment of the present invention. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. In addition, the technical features of the various embodiments or individual embodiments provided by the present invention can be arbitrarily combined with each other to form feasible technical solutions. Such combinations are not constrained by the order of steps and / or structural composition patterns, but must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.

[0022] Figure 1 The following is a flowchart illustrating a real-time detection method for neutron tube target film defects based on machine vision, according to an embodiment of the present invention. Figure 1 As shown, the method includes the following steps: Step S1: Establish an observation channel for the neutron tube target membrane and acquire stable operating images of the neutron tube target membrane through the observation channel.

[0023] This step, as the starting point of the entire detection method, aims to establish a long-term stable observation channel for the neutron tube target membrane without affecting the normal operation of the neutron tube or introducing additional nuclear safety risks. This provides a reproducible and comparable target membrane operating state image input basis for subsequent steps such as S2 benchmark feature library construction, S3 anomaly region self-localization, and S4 defect type determination, ensuring the consistency and effectiveness of the judgment objects in subsequent steps.

[0024] First, the optical observation window is designed and installed. On the outer side of the main structure corresponding to the neutron tube target film, a mounting hole adapted to the target film reaction area is opened. The diameter D1 of the mounting hole is determined based on the maximum lateral dimension of the target film reaction area, and is set to 1.2-1.5 times the maximum diameter of the target film reaction area to ensure that the observation window can completely cover the effective reaction area of ​​the target film. In this embodiment, the maximum diameter of the target film reaction area is 20mm, so D1 is set to 25mm. The observation window is made of radiation-resistant and thermally shock-resistant sapphire material, with a radiation dose threshold Φ... ≥1×10 6 Gray, thermal shock temperature difference ΔT ≥800K, capable of withstanding the radiation environment and instantaneous temperature fluctuations during neutron tube operation; the thickness h1 of the window is determined based on the balance between mechanical strength and light transmittance, with a value range of 3-5mm. In this embodiment, h1=4mm, which ensures both the structural stability of the window under vacuum and pressure difference and the transmittance of visible and near-infrared light ≥95%.

[0025] Secondly, a low-emission, low-permeability sealing structure is used to achieve a sealed connection between the observation window and the neutron tube body. The sealing structure uses an O-ring made of fluororubber, with the inner diameter d1 of the O-ring matching the outer diameter of the observation window. The cross-sectional diameter d2 is determined based on the sealing pressure requirements, ranging from 2-3 mm; in this embodiment, d2 = 2.5 mm. To quantify the sealing performance, the gas permeability coefficient K of the sealing structure is... Its physical meaning is the volume of gas passing through a unit area of ​​sealed surface per unit time and unit pressure difference, which must satisfy K. ≤K 0, where K 0 represents the maximum permeability threshold allowed in the vacuum environment of the neutron tube, with a value of 1×10⁻⁶. -12 Pa・m 3 / s, this threshold is based on the vacuum requirement for neutron tube operation (≤1×10 -5 Pa) determined that this sealing structure can prevent material volatiles caused by operating temperature rise and radiation from entering the neutron tube, thus preventing the vacuum environment from being contaminated.

[0026] Subsequently, an anti-stray light optical path structure was constructed to suppress background noise interference. A light-shielding cavity was set on the outside of the observation window. The light-shielding cavity adopted a stepped structure, and its length L1 was determined according to the installation distance between the neutron tube body and the external imaging equipment, with a value ranging from 100-150mm. In this embodiment, L1=120mm. The inner wall of the light-shielding cavity was blackened, and the surface roughness Ra≤0.8μm was used to reduce the reflection intensity of stray light. A three-level light-limiting structure was set inside the light-shielding cavity, and the light-limiting plate of each level had a light-transmitting aperture d. 31 d 32 d 33 The aperture diameter decreases sequentially along the optical path, with values ​​of 15mm, 10mm, and 8mm respectively. This decreasing aperture design further filters out oblique stray light, ensuring that the main information source of the target film image is stably directed to the effective reaction area of ​​the target film, and avoiding interference from stray light inside the tube (such as instantaneous light emission during the discharge process) on the visual characteristics of the target film.

[0027] Finally, a time-synchronized imaging triggering mechanism was established to ensure accurate correspondence between the image and the neutron tube's operational phase. The neutron tube operational status sensor was installed near the connection point between the ion source power supply terminal and the accelerating electrode control circuit, located in the non-radiative core area outside the neutron tube body. This location allows for direct acquisition of key electrical signals reflecting operational phase transitions, such as the ion source discharge start-up signal and the accelerating voltage stabilization signal, while avoiding contact between the sensor and the neutron tube's internal vacuum environment or radiative core area, thus preserving the neutron tube's structural integrity and operational safety. Specifically, the sensor is snap-fitted to the outside of the insulating sheath of the power supply circuit, with the probe tightly fitted to the sheath (contact pressure ≤5N to avoid damaging the insulation layer). It acquires operational phase characteristic signals via electromagnetic induction, and the output signal includes characteristic indicators of the discharge stabilization phase and the ion beam stabilization phase. The sensor signal trigger time is t. The image acquisition time of the imaging device is To ensure that visual features can be compared within the same operational phase, the time synchronization error Δt must be satisfied. -t |≤ ,in The maximum allowable synchronization error threshold is set at 10ms. This threshold is determined based on the minimum duration (≥50ms) of each operating phase of the neutron tube, which can prevent normal optical fluctuations caused by the switching of operating phases from being misjudged as defect signs.

[0028] Through the synergy of the above structural design and triggering mechanism, the visible light or near-infrared visual characteristics of the target film under ion bombardment and thermal loading conditions are stably presented, providing reliable visual input data for subsequent steps.

[0029] Based on the observation channel, stable operating images of the neutron tube target film during the neutron tube's healthy phase are acquired. Specifically, baseline data is acquired during the initial healthy phase of the neutron tube (cumulative operating time ≤ 100h, this duration is determined based on engineering verification of the initial healthy state of the neutron tube target film; during this phase, there is no significant defect evolution in the target film). Stable operating images of the neutron tube target film in a healthy state are acquired through the observation channel. The acquisition frame rate is synchronized with the imaging trigger mechanism, set to 10fps (frames / second), and the acquisition duration is [not specified]. The time frame was determined based on the completeness of the target film's operational phases, and was set to 24 hours to ensure coverage of all typical operational phases (discharge stabilization phase, ion beam stabilization phase, etc.). Stable operational state images were acquired. ,in For collecting timestamps ( ∈[0, x and y are the image pixel coordinates (x∈[1, y]). ],y∈[1, ], , These are the image width and height, respectively, in this embodiment. =1280 pixels, =960 pixels).

[0030] Step S2: Extract the baseline features of each steady-state operating image based on the autoencoder model to construct a baseline feature library for the neutron tube target membrane.

[0031] In this step, each acquired stable operating image undergoes preprocessing: Gaussian filtering is used to remove random noise, with a filter kernel size of 3×3 and a standard deviation of 0.8 (determined based on target membrane image noise intensity testing); image registration is used to eliminate pixel shifts caused by minor vibrations, with a registration accuracy ≤0.5 pixels, ensuring the stability of the preprocessed operating image. It can accurately reflect the visual evolution characteristics of the target membrane reaction zone.

[0032] An autoencoder model was constructed and trained to achieve deep extraction of visual features from a healthy target membrane. The autoencoder model consists of an encoder and a decoder, and the input to the autoencoder model is a preprocessed, stable-state image. The input dimension is D= The encoder uses a 3-layer fully connected network structure, with the following number of neurons in each layer: ×H (flattening a 2D image into a 1D vector). =8192、 =4096、 =2048, the activation function is ReLU, used to map high-dimensional image vectors to low-dimensional latent feature vectors; the mathematical expression of the encoder is: ; in, For the first A one-dimensional vector flattened from a stable running state image at any given time. , and These are the weight matrices for layers 1-3 of the encoder. , These are the bias vectors for layers 1-3 of the encoder, respectively. For the first The latent feature vector at time t, ( ) is the ReLU activation function.

[0033] The decoder employs a 3-layer fully connected network structure symmetrical to the encoder, with the number of neurons in each layer being as follows: =4096、 =8192、 = The activation function also uses the ReLU function, and the output layer uses the Sigmoid function to map the output to the [0,1] interval, consistent with the input image pixel value range; the mathematical expression of the decoder is: ; in, , and These are the weight matrices for layers 1-3 of the decoder. , and These are the bias vectors for layers 1-3 of the decoder, respectively. For the first Reconstructed image vector at time step This is the Sigmoid function.

[0034] The autoencoder model aims to minimize the mean square error between the input image and the reconstructed image, and its loss function is... The calculation formula is: ; in, The number of training samples. Let t be the timestamp of the t-th training sample. It is the L2 norm. This is the loss function for the autoencoder model.

[0035] The autoencoder model was trained to obtain a trained autoencoder model: the Adam optimizer was used for training, the learning rate was 0.001 (determined based on the model convergence speed test), the batch size was 64, and the number of iterations was 100 (training was stopped when the validation set loss did not decrease for 5 consecutive iterations) to ensure that the autoencoder model could fully learn the visual evolution law of the healthy target membrane, and the trained autoencoder model could accurately reconstruct the running state image of the healthy target membrane.

[0036] Next, benchmark features are extracted and a dedicated benchmark feature library is constructed. The pre-processed stable-state image is used to extract features through a trained autoencoder model to obtain benchmark features, including four core metrics: Overall brightness distribution characteristics of the reaction area: Calculate the mean pixel brightness of the reaction area. and standard deviation The allowable fluctuation band of brightness distribution is ,in For all time The mean, For all time The mean, =2.5 (determined based on brightness fluctuation test of healthy target film, ensuring that more than 99% of the brightness values ​​of healthy state fall within the fluctuation band).

[0037] Texture continuity characteristics of the reaction zone: The correlation index C( ) of the texture of the reaction zone is calculated using the gray-level co-occurrence matrix. Specifically, the gray-level co-occurrence matrix of the reaction area image is calculated according to "0 degrees of orientation and 1 pixel of distance", and then normalized to obtain the normalized gray-level co-occurrence matrix. The formula for calculating the correlation index of the reaction area texture is as follows:

[0038] in, The gray levels of the target membrane reaction region are determined based on the dynamic range of the visual characteristics of the neutron tube target membrane. In this embodiment, the acquired target membrane image is quantized and L=256, where i and j are the row and column gray value indices of the gray-level co-occurrence matrix. These are the elements of the normalized gray-level co-occurrence matrix. and These are the mean values ​​in the row and column directions of the gray-level co-occurrence matrix. and represents the standard deviation of the gray-level co-occurrence matrix in the row direction and the standard deviation in the column direction.

[0039] Among them, the stable interval of texture continuity is [ , ],in For all Time C ( The minimum value of ) For all Time C ( The maximum value of ). Location characteristics of reflected specular highlights in the reaction zone: Extracting the center coordinates of reflected specular highlights in the reaction zone ( , The repeatability threshold d1 = 2 pixels, meaning that the distance between the highlight center coordinates at different times within the same running phase is ≤ d1. Local region boundary features: Canny edge detection is used to extract the local boundary of the reaction zone, and the coordinate sequence B of the boundary points is calculated. The long-term stability index is that the standard deviation of the boundary point coordinates is ≤1 pixel (determined based on the boundary stability test of the healthy target membrane).

[0040] Based on the benchmark features, a benchmark feature library is constructed using the same-tube self-calibration method, as detailed below: Using a self-calibration method within the same tube, reference features are categorized and archived according to operational phases, constructing a reference feature library B specific to this neutron tube. The division of operational phases is based on the imaging trigger signal in step S1, using preprocessed stable operational images. The system is divided into a discharge stabilization phase and an ion beam stabilization phase. Therefore, the corresponding benchmark feature library B can also be divided into a subset of benchmark features for the discharge stabilization phase. and the reference feature subset of the ion beam stabilization phase Each subset contains all the baseline features, latent feature distribution patterns (stage mean, stage standard deviation) and model weight parameters for the corresponding stage, providing "stage alignment constraints" and "initialization priors" for improving the dual-space training of the autoencoder in step S3.

[0041] Finally, the benchmark feature library is dynamically updated and verified. The update cycle of the benchmark feature library is set to 100 hours (determined based on the decay law of the neutron tube target membrane health status). Within each update cycle, if the neutron tube is operating normally (no fault alarms and stable neutron yield), new visual data of the health status is collected, and the above preprocessing and feature extraction process is repeated to fine-tune the feature indicators in the benchmark feature library to ensure that the benchmark feature library can adapt to the slight normal aging of the target membrane. If the operating status is abnormal, the update is paused and the current benchmark feature library is retained to avoid abnormal state data from contaminating the benchmark.

[0042] Through the above process, the constructed benchmark feature library B provides a judgmental, repeatable, and engineering-deployable comparison basis for subsequent self-localization of S3 anomaly areas.

[0043] Step S3: Acquire real-time operational images of the neutron tube target membrane through the observation channel. Based on the benchmark feature library, locate abnormal regions in the real-time operational images using a dual spatial conjugate autoencoder to obtain the abnormal regions and confidence levels.

[0044] This step uses the real-time operating image of the neutron tube target membrane acquired by the observation channel as the detection object, and the benchmark feature library constructed in step S2 as the core reference. Through the dual spatial conjugate autoencoder (DSCAE) initialized based on the basic autoencoder, the entire process of "stage alignment - dual spatial constraint comparison - self-alignment localization" is realized to identify abnormal regions. The abnormal location and confidence level are accurately output, providing clear and quantifiable input basis for the defect type determination in step S4. The whole process strictly relies on the benchmark feature library constraints in step 2 to avoid problems such as poor individual adaptability and high misjudgment rate caused by general detection.

[0045] The dual-spatial conjugate autoencoder (DSCAE) is an improved and upgraded model of the basic autoencoder model in step S2. Its core design goal is to improve the sensitivity of anomaly detection based on the unique feature distribution of the benchmark feature library. Its model structure and parameter initialization depend entirely on the benchmark feature library of step S2, rather than being designed independently. The dual-spatial conjugate autoencoder is constructed and trained as follows: The dual spatial conjugate autoencoder (DSCAE) consists of a master encoder E1, an auxiliary encoder E2, and a shared decoder D3. The number of layers and neurons is consistent with the basic autoencoder in step S2. The master encoder E1 is a 3-layer fully connected network with neurons N1=8192, N2=4096, and N3=2048, respectively, using the ReLU activation function. The auxiliary encoder E2 is conjugate and symmetrical with the master encoder, and has the same number of neurons as E1, also using the ReLU activation function. The shared decoder D3 is a 3-layer fully connected network with neurons of the following numbers: =4096、 =8192、 =D2 (D2 is the input dimension of the image in step S2), and the output layer uses the Sigmoid function to ensure that the output pixel value range is consistent with that of the input image.

[0046] The initial weight matrix of the main encoder E1 is directly reused from the weight matrix of the encoder in step S2; the initial bias vector is reused from the bias vector of the encoder in step S2, ensuring that the features extracted by the main encoder are consistent with the potential feature distribution of the benchmark feature library in step S2. The initial weight matrix of the co-encoder E2 is the transpose of the weight matrix of the basic autoencoder (the weight transpose realizes the conjugate constraint), and the initial bias vector reuses the bias vector of the encoder in step S2. The conjugate structure strengthens the bidirectional verification of the deviation from the benchmark feature. The initial weight matrix of the shared decoder D3 reuses the weight matrix of the decoder in step S2, and the initial bias vector reuses the bias vector of the decoder in step S2, ensuring that the reference standard of the reconstructed image is consistent with the reconstruction features of the healthy target membrane in step S2.

[0047] The core of fine-tuning training is to enable the dual-space conjugate autoencoder to learn the distinguishing boundary between "health features" and "abnormal features" while retaining the features specific to the baseline feature library in step S2. All training constraints are derived from the dynamic baseline feature library in step S2. Total training set sample size N3 = 5 × 10 5 Of these, 70% are healthy images from the baseline feature library in step S2 (from B). 21 B 22 (A subset is randomly selected), and 30% consists of manually annotated simulated images of minor defects (simulating the visual characteristics of common defects such as sputtering erosion and microcracks, generated by superimposing defect textures on healthy images in step S2), ensuring that the model clearly defines "the difference between the health baseline and abnormal deviation of the neutron tube".

[0048] Loss function of a dual-space conjugate autoencoder The deviation constraints between the fusion sample space and the latent space are used, and both losses are calculated based on the benchmark feature library in step S2, as shown in the following formulas: ; in, For the sample space loss weights, As the potential spatial loss weight, =0.6、 =0.4 (determined based on 10 sets of comparative experiments, prioritizing the reconstruction accuracy of the sample space while enhancing the sensitivity of feature deviation in the latent space). The sample space loss measures the pixel-level deviation between the real-time image and the reconstructed image. The latent space loss measures the deviation of the distribution of real-time latent features from the baseline latent features in step S2. This is the loss function.

[0049] It should be noted that the formula for sample space loss is: Where X3(t) is a one-dimensional vector of the real-time image, and t3 is the real-time acquisition timestamp. To reconstruct the image vector; its decision threshold θ The loss is determined based on the baseline feature library in step S2. , Let L2 be the mean of the health image loss function in step S2. The standard deviation of the health image loss function in step S2 is used to ensure that 99.7% of health status deviations will not trigger anomaly detection. The formula for potential spatial loss is: ,in To integrate potential features ( =( (t)+ (t)) / 2, (t) is the output of the main encoder. (t) is the output of the auxiliary encoder. The potential characteristic mean of step S2 corresponding to the operating stage k (k=1 corresponds to the discharge stabilization stage, k=2 corresponds to the ion beam stabilization stage); its judgment threshold , The standard deviation of the potential feature Z(τ) in step S2 (the baseline subset of the discharge stabilization stage) Reference subset for ion beam stabilization phase This loss directly quantifies the degree to which real-time features deviate from a specific benchmark.

[0050] The Adam optimizer was used with a learning rate of 5×10⁻⁶. -5 (Much lower than step S2, to avoid covering baseline features), batch size is 128, number of iterations is 50, and the validation set loss decreases by ≤1×10 for 3 consecutive iterations. -5 Training is stopped at this point, and the trained model parameters and θ are fixed. , Threshold, The final result is a well-trained dual-space conjugate autoencoder.

[0051] Based on the observation channel of the neutron tube target membrane, a real-time running image I3(t,x,y) is acquired. The real-time running image is then preprocessed in exactly the same way as in step S2 to obtain the preprocessed real-time running image I3'(t,x,y).

[0052] The reaction zone is located from the real-time operating image. Specifically, based on the imaging trigger signal in step S1, the operating stage k corresponding to the real-time operating image is identified (k=1 is the discharge stabilization stage, k=2 is the ion beam stabilization stage), and a subset of the benchmark feature library corresponding to the stage is retrieved from the benchmark feature library. This ensures that subsequent comparisons are always conducted under the "exclusive benchmark for the same working conditions," avoiding meaningless deviations and misjudgments caused by stage drift.

[0053] Based on a subset of the benchmark feature library Reaction zone contour template (size (obtained by the outline annotation of the healthy target membrane reaction zone), where the reaction zone outline template Based on a subset of the benchmark feature library The average of all reaction zone contours is used to determine the reaction zone. The reaction zone is typically a rectangular area, which includes the coordinates of its four corners. The average coordinates of the four corners of all reaction zone contours are then used to construct the reaction zone contour template. The Normalized Cross-Correlation (NCC) algorithm is used to analyze the preprocessed real-time running images. Centrally positioned reaction zone: For the reaction zone contour template Perform grayscale normalization and noise filtering to ensure consistency with the feature dimensions of the real-time image. On the real-time running image, slide the reaction area contour template (as a sliding window) and calculate the matching degree between each window region and the reaction area contour template. ,in, Use the coordinates of the top-left corner of the template sliding window to filter. A window region with a matching degree ≥0.95 (based on experimental determination, ensuring positioning error ≤1 pixel) is selected as the real-time reaction area of ​​the real-time running image, with its upper left corner coordinates as follows: From the preprocessed real-time running image Cropping out a local image of the real-time reaction area (size (It occupies only 15%-20% of the entire image) and is flattened into a one-dimensional vector. This cutting process is a fixed, pre-set procedure to ensure that the object being tested is focused on the reaction zone.

[0054] Inputting a one-dimensional vector X3(t) into a trained dual-space conjugate autoencoder outputs a fused latent feature Z3(t) and a reconstructed image vector. 3(t), perform double spatial bias calculation. The specific process for calculating double spatial bias is as follows: reconstruct the image vector. 3(t) is obtained after the reshape operation, which corresponds to the local image of the real-time reaction zone. Reconstructed local images of reaction zones with identical dimensions Calculate the potential space loss It is used to determine whether there is an overall characteristic deviation in the current reaction zone. > It was determined that there might be an anomaly in the current reaction zone. For each pixel (x, y) in the dataset, the squared error is calculated to obtain the sample space loss map. The formula is as follows: Pixel-level threshold Based on personalized statistics from the benchmark database, the formula is: ,in, and For the pixels corresponding to healthy images in the benchmark library The reconstruction error mean and standard deviation are adapted to the different fluctuation characteristics of the center / edge pixels of the reaction area. Under the premise of The pixels are marked as candidate abnormal pixels and enter the subsequent area positioning; when the single spatial deviation exceeds the threshold, it is judged as a transient disturbance (such as the instantaneous fluctuation during the operation phase switching), the alarm is suppressed, and the candidate abnormal pixels are analyzed by connected component analysis to form a preliminary abnormal region (the number of connected component pixels ≥ 5 is a valid abnormal region to avoid misjudgment of isolated noise pixels).

[0055] Based on a subset of the benchmark feature library Using the stored stable anchor point of the reaction zone as a reference, the positional offset of the real-time reaction zone is corrected, achieving coordinate calibration of abnormal areas and avoiding positioning deviations caused by slight displacement of the target membrane. From a subset of the benchmark feature library Extract the reaction zone anchor point information, which includes the center coordinates of the reaction zone. (The average value of the center of the health image reaction area in step S2) and the set of boundary feature points (containing the coordinates of 20 long-term stable boundary points); Real-time local image of the reaction zone based on box selection Calculate the center coordinates of the real-time reaction zone Calculate the coordinate offset Δx between the real-time reaction zone center coordinates and the reaction zone center coordinates in the baseline feature library. - Δy= - The coordinates (x, y) of the candidate abnormal pixels obtained from the coarse screening are corrected to the aligned coordinates (x'=x-Δx, y'=y-Δy) to ensure that the positioning results are anchored in the "reaction zone coordinate system of the baseline feature library".

[0056] The initial anomaly region is assigned a confidence level, and based on the confidence level, it is determined whether the initial anomaly region is indeed an anomaly region: Low confidence (transient disturbance): The area percentage of the initial abnormal region S3 is less than the first preset area threshold. (S3 = number of abnormal pixels / total number of pixels in the reaction area, in this embodiment) (1%), and max(L) (t) / θ ,L (t) / θ If the first ratio threshold is less than 1.5 (in this embodiment, the first ratio threshold is 1.5), it is determined to be a normal operating fluctuation, and no abnormal coordinates are output; Central confidence (candidate defect region): First preset area threshold ≤Preliminary abnormal area area ratio S3<Second preset area threshold (This embodiment) (5%), and the preset first ratio threshold ≤ max(L) (t) / θ ,L (t) / θ The second ratio threshold (2.5 in this embodiment) is preset and marked as a candidate defect area. The aligned coordinates (x', y') and deviation data are recorded. High confidence (identifying anomaly areas): The initial percentage of anomaly area S3 ≥ the second preset area threshold. or max(L) (t) / θ ,L (t) / θ If the value is greater than or equal to the preset second ratio threshold, it is determined to be an abnormal region. The stable coordinates (x', y'), confidence level, and dual spatial deviation value are output as the core input for the defect type determination in step S4.

[0057] Step S4: Extract the temporal evolution feature vector of the abnormal region, input the temporal evolution feature vector into the long short-term memory network model optimized based on the black hole particle swarm algorithm, and output the defect type of the abnormal region. Based on the confidence level and the defect type, classify the risk level of the neutron tube target membrane.

[0058] This step takes the coordinates of the abnormal region, confidence level, and dual spatial bias sequence within the continuous time window output in step S3 as the core input. It uses a Long Short-Term Memory (LSTM) network model optimized by the Black Hole Particle Swarm Optimization (BHPSO) algorithm to allow the model to autonomously capture the temporal evolution of defects, achieve accurate defect type determination, and then integrate the evolution trend of the abnormal region and the confidence level to output a risk classification conclusion that can be executed in the project, thus completing the closed loop from "abnormal location" to "mechanism explanation + handling guidance".

[0059] The steps for extracting temporal evolution feature vectors based on anomaly regions are as follows: To fully leverage the time-series learning capabilities of the Long Short-Term Memory (LSTM) network model, the input data employs a "double spatial bias sequence with continuous time windows": Sequence input window length =10 (corresponding to 10 consecutive sampling cycles), each sampling cycle is consistent with the imaging trigger cycle of step S3 (1 minute / time), that is, the window covers continuous data within 10 minutes, ensuring that LSTM can capture the short-term evolution trend of early defects and avoid missed detection due to excessively short window and excessive redundancy due to excessively long window.

[0060] The model's input vector is the temporal evolution feature vector. The five feature dimensions all originate from the quantization output of step S3, and the temporal evolution feature vector is as follows: ; in, For time-series evolution feature vectors, express The real-time running image at the sampling time undergoes sample space loss through the dual-space conjugate autoencoder. express The real-time running image at the sampling time undergoes the latent spatial loss of the dual-spatial conjugate autoencoder. Let be the pixel area of ​​the abnormal region at time t. and These are the coordinates of the center of the aligned abnormal region.

[0061] Each component in the temporal evolution feature vector is mapped to the [0,1] interval through Min-Max normalization to obtain the normalized temporal evolution feature vector. To avoid the impact of differences in units on model training.

[0062] The LSTM model consists of an input layer, hidden layers, and an output layer. The input layer has 5 neurons and receives... Hidden layers: 2 layers, number of neurons The BHPSO optimization objective is set with the ReLU function as the activation function; the output layer has 3 neurons (corresponding to 3 types of core defects: sputtering erosion SE, isotope dissipation TD, and thermal stress microcracks TSC), with the Softmax function as the activation function, and outputs defect probabilities P(SE), P(TD), and P(TSC).

[0063] The Black Hole Particle Swarm Optimization (BHPSO) algorithm optimizes four key hyperparameters of LSTM by simulating the "particle swarm search + black hole attraction + particle regeneration" mechanism: the number of neurons in the hidden layer. Learning rate Batch size Number of iterations The core formula and implementation process are as follows: Each particle corresponds to one set of hyperparameter combinations, and the particle position vector is: The hyperparameter search space is specifically as follows: ∈[128,512](step size 32), η4∈[1×10 -4 1×10 -3 (Step length 1×10) -4 B4∈[32,128](step size 16), E4∈[50,200](step size 10).

[0064] The particle updates its velocity and position based on its individual optimal position and global optimal position, calculated using the following formula: ; ; in, This represents the number of BHPSO iterations. The particle velocity vector is defined, with the velocity boundary set to ±20% of the search space to prevent particles from jumping out of the effective region. The inertial weights are initially set to 0.9, and decrease linearly to 0.4 with each iteration. and As acceleration factors, they guide particles toward individual and global optima, respectively. and To increase the randomness of the search, use random numbers in the interval [0,1]. This represents the historical best position for a single particle. This is the globally optimal position for the entire particle swarm.

[0065] According to the black hole attraction mechanism, particles are randomly reborn in the search space, as follows: The global optimal position Represented as a black hole, the formula for calculating the gravitational radius of a black hole is: ; in, The absorption range control coefficient ranges from 0.2 to 0.4 (determined based on 10 sets of comparative experiments, used to balance global search coverage and local convergence accuracy). In this embodiment... =0.3, The particle swarm size is set to 30, determined experimentally. Let be the Euclidean distance between the i-th particle and the global optimal position. The black hole's gravitational radius represents the range within which a black hole attracts particles; the larger the value, the stronger the attraction.

[0066] The formula for calculating the Euclidean distance between each particle and the global optimal position is: ; Where j is the hyperparameter dimension index, Let j be the hyperparameter of the position vector of the i-th particle. This represents the Euclidean distance between each particle and the global optimal position.

[0067] When the Euclidean distance between the i-th particle and the global optimal position Black hole attraction radius The particle is absorbed by the black hole and randomly regenerates into a new particle within the search space, according to the formula: ,in, and These are the lower bound and the upper bound of the search space, respectively. A random number in the range [0,1]. To regenerate particles and prevent the algorithm from getting trapped in local optima.

[0068] Training sample set: contains 1000 labeled samples. Each sample consists of "step 3 dual spatial deviation value + evolution feature + defect type label". The labels are generated through artificial simulation and actual failure case data, covering the entire evolution stage of 3 core defects.

[0069] The hyperparameters are optimized using the BHPSO algorithm to obtain the optimal combination of hyperparameters. The long short-term memory network model is then trained using the optimal combination of hyperparameters until the accuracy on the validation set is ≥98%, at which point the trained long short-term memory network model is obtained.

[0070] Temporal evolution feature vector Input a pre-trained Long Short-Term Memory (LSTM) network model. The model autonomously learns the temporal correlations between boundary expansion, brightness changes, and texture destruction, and outputs three types of defect probability values. The defect type is determined based on the defect probability values. If P(SE)≥0.7 (model confidence threshold, determined based on a false positive rate of ≤1% on the validation set), and the time-series features of the model output show "slow and uniform growth of the abnormal area and steady increase of the dual spatial deviation" (verified by visualization of the model's intermediate layer features), then it is determined to be a sputtering erosion-dominated defect. If P(TD)≥0.7 and the time series characteristics show "stable area of ​​abnormal region and periodic fluctuation of double spatial deviation", it is determined to be a defect related to isotope dissipation and thermally driven diffusion. If P(TSC)≥0.7, and the time series characteristics show "rapid expansion of abnormal area and sudden increase of double spatial deviation", then it is judged as a thermal stress-induced microcrack or local peeling risk defect. If a single-class probability is ≥0.7 but the temporal characteristics are atypical, it is marked as an "atypical evolutionary defect" and the window update cycle is shortened to 5 minutes for review; if the probabilities of all three classes are <0.7, it is judged as a "composite defect" and temporarily judged according to the upper limit of the risk level; if all probabilities are <0.1, manual review is triggered and the data is stored for incremental training of the model.

[0071] Based on "defect type + confidence level of step S3 + LSTM time series evolution trend", three risk levels are defined, and the project execution conclusion is output: Low risk (can continue operating): Medium / low confidence level, time series trend shows no defect expansion, max(L) (t) / θ ,L (t) / θ )∈[1.5,2.0], the conclusion is "It can continue to run, and the abnormal evolution should be continuously monitored"; Medium risk (requires load reduction or adjustment of work pace): High confidence level, time-series trend shows slow defect expansion, max(L) (t) / θ ,L (t) / θ If the value is in the range [2.0, 2.5], or it is determined to be an "atypical evolutionary defect", the conclusion is "reduce the neutron tube load by 30% or shorten the continuous running time, and review within 24 hours". High risk (recommendation to stop and review or replace): High confidence level, time-series trend shows rapid defect expansion, max(L) (t) / θ ,L (t) / θ If the value is ≥2.5, it is judged as "thermal stress induced microcracks / local peeling defects", and the conclusion is "stop the machine immediately for verification, and replace the target film after confirming the expansion of the defect".

[0072] This invention provides a real-time detection method for neutron tube target film defects based on machine vision, which involves machine learning and deep learning technologies, and has the following beneficial effects: (1) Based on the construction of a reference feature library, the system adapts to the individual differences of the neutron tube target membrane and the complex operating environment. By learning the deep visual features under the health state, a unique dynamic reference is formed, which avoids the misjudgment caused by the general reference due to equipment differences and drift during operation. It provides a stable reference that fits the characteristics of a single tube for subsequent detection, and ensures the consistency and reliability of the detection.

[0073] (2) Abnormal region localization based on dual spatial conjugate autoencoder: Based on the benchmark feature library, the algorithm strengthens the capture and verification of benchmark feature deviation through dual spatial constraints. The conjugate structure further improves the sensitivity of abnormal identification. The algorithm inherits the exclusive feature distribution of the benchmark library, solves the problem of poor adaptability of general detection, and can accurately distinguish between normal fluctuations and real abnormalities, realize the accurate localization of abnormal regions, and provide reliable pre-support for defect type determination.

[0074] (3) The LSTM model is optimized based on the black hole particle swarm optimization algorithm to adapt to the temporal evolution characteristics of target membrane defects. The black hole particle swarm optimization algorithm efficiently optimizes the hyperparameters of LSTM, avoiding the subjectivity and inefficiency of manual parameter tuning. LSTM can autonomously capture the evolution law of defects. This algorithm, combined with the preceding anomaly location data, accurately determines the defect type and classifies the risk level, providing engineering-executable handling guidance for neutron tube operation and maintenance, and effectively supporting the early warning and precise control of target membrane defects.

[0075] 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.

[0076] 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.

[0077] 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 real-time detection method for defects in a neutron tube target film based on machine vision, characterized in that, include: Step S1: Establish an observation channel for the neutron tube target membrane and acquire stable operating images of the neutron tube target membrane under healthy conditions through the observation channel; Step S2: Extract the baseline features of each of the stable operating state images based on the autoencoder model to construct a baseline feature library for the neutron tube target membrane; Step S3: Acquire real-time operational images of the neutron tube target membrane through the observation channel; based on the reference feature library, locate abnormal regions in the real-time operational images using a dual spatial conjugate autoencoder to obtain the abnormal regions and confidence levels. Step S4: Extract the temporal evolution feature vector of the abnormal region, input the temporal evolution feature vector into the long short-term memory network model optimized based on the black hole particle swarm algorithm, output the defect type, and classify the risk level of the neutron tube target membrane based on the confidence level and the defect type.

2. The method for real-time detection of defects in a neutron tube target film according to claim 1, characterized in that, Step S1 involves establishing an observation channel for the neutron tube target membrane and acquiring stable operating images of the neutron tube target membrane under healthy conditions through this observation channel, including: An observation channel is constructed on the outside of the bulk structure of the neutron tube target membrane; A time-synchronized imaging triggering mechanism is established. During the initial health phase of the neutron tube, stable operating state images of the neutron tube target film at different operating stages are acquired using a neutron tube operating status sensor. The acquisition time is T2. The operating stages include a discharge stabilization stage and an ion beam stabilization stage. The triggering time of the sensor signal is... The image acquisition time of the imaging device is The time synchronization error Δt = | - |≤ ,in The maximum allowable synchronization error threshold is determined based on the minimum duration of each operating phase of the neutron tube.

3. The real-time detection method for neutron tube target film defects according to claim 1, characterized in that, Step S2 involves extracting the baseline features of each steady-state operating image based on an autoencoder model to construct a baseline feature library for the neutron tube target membrane, including: Each of the acquired stable operating state images is preprocessed to obtain a preprocessed stable operating state image; Each of the preprocessed stable operating images is input into the autoencoder model to obtain the output reconstructed image vector, i.e. the baseline features, which constitute the baseline feature library B. The baseline features include four types of core feature indicators, namely the overall brightness distribution features of the reaction area, the texture continuity features of the reaction area, the reflective highlight position features of the reaction area, and the contour boundary features of the reaction area. Based on the operational stages of the neutron tube target film, the reference feature library B is divided into a subset of reference features for the stable discharge stage. and the reference feature subset of the ion beam stabilization phase ; The baseline feature library B is updated based on a set update cycle; The autoencoder model includes an encoder and a decoder. The input of the autoencoder model is a preprocessed stable running image, and the output is a reconstructed image vector. The encoder employs a 3-layer fully connected network structure to map high-dimensional image vectors into low-dimensional latent feature vectors; the mathematical expression of the encoder is: ; in, For the first A one-dimensional vector flattened from a stable running state image at any given time. , and These are the weight matrices for layers 1-3 of the encoder. , These are the bias vectors for layers 1-3 of the encoder, respectively. For the first The latent feature vector at time t, ( ) is the ReLU activation function; The decoder employs a 3-layer fully connected network structure symmetrical to the encoder, used to reconstruct the latent feature vectors to obtain the reconstructed image vectors. The mathematical expression for the decoder is: ; in, , and These are the weight matrices for layers 1-3 of the decoder. , and These are the bias vectors for layers 1-3 of the decoder, respectively. For the first Reconstructed image vector at time step For the Sigmoid function; The autoencoder model is trained to obtain the trained autoencoder model. During training, the loss function of the autoencoder model is set. The calculation formula is: ; in, The number of training samples. Let t be the timestamp of the t-th training sample. It is the L2 norm. This is the loss function for the autoencoder model.

4. The real-time detection method for neutron tube target film defects according to claim 3, characterized in that, Step S3 involves acquiring real-time operational images of the neutron tube target membrane through the observation channel. Based on the benchmark feature library, anomaly regions are located in the real-time operational images using a dual spatial conjugate autoencoder to obtain the anomaly regions and their confidence levels, including: A dual-space conjugate autoencoder is constructed, comprising a master encoder E1, an auxiliary encoder E2, and a shared decoder D3. The master encoder E1 comprises a 3-layer fully connected network, and the auxiliary encoder E2 is conjugate and symmetric with the master encoder E1. The shared decoder D3 comprises a 3-layer fully connected network. The initial weight matrix of the master encoder E1 reuses the weight matrix of the encoder in the autoencoder model, and the initial bias vector reuses the bias vector of the encoder in the autoencoder model. The initial weight matrix of the auxiliary encoder E2 is the transpose of the weight matrix of the encoder in the autoencoder model, and the initial bias vector reuses the bias vector of the encoder in the autoencoder model. The initial weight matrix of the shared decoder D3 reuses the weight matrix of the decoder in the autoencoder model, and the initial bias vector reuses the bias vector of the decoder in the autoencoder model. The dual-space conjugate autoencoder is trained based on the training set to obtain the trained dual-space conjugate autoencoder. The training set includes healthy and stable operating images randomly extracted from the benchmark feature library B and manually annotated defect simulation images. Based on the reaction area contour template in the benchmark feature library B, the real-time reaction area in the real-time running image is located, and based on the real-time reaction area, the corresponding local image of the real-time reaction area is cropped from the preprocessed real-time running image. The local image of the real-time reaction area is input into the trained dual-space conjugate autoencoder, which outputs a fused latent feature and a reconstructed image vector, and calculates the dual-space bias value, which includes sample space loss and latent space loss. Based on the sample space loss and the potential space loss, preliminary abnormal regions in the local image of the real-time reaction area are determined; Calculate the confidence level of the preliminary abnormal region. Based on the confidence level, further determine whether the preliminary abnormal region is a true abnormal region. If so, output the coordinates of the abnormal region, the confidence level, and the dual spatial deviation value. The coordinates of the abnormal region refer to the coordinates of each pixel in the abnormal region.

5. The real-time detection method for neutron tube target film defects according to claim 4, characterized in that, The loss function of the dual-space conjugate autoencoder Represented as: ; in, For the sample space loss weights, As the potential spatial loss weight, For sample space loss, For potential space loss, The loss function; The formula for sample space loss is: Where X3(t) is a one-dimensional vector of the real-time running image after flattening, and t3 is the real-time acquisition timestamp. To reconstruct the image vector; The formula for potential space loss is: ,in To integrate potential features, =( (t)+ (t)) / 2, (t) is the output of the main encoder. (t) represents the output of the auxiliary encoder. The mean value of the potential feature vectors corresponding to the running stage k output by the autoencoder model, where k=1 corresponds to the discharge stabilization stage and k=2 corresponds to the ion beam stabilization stage. Set sample space loss The decision threshold θ ,in, , Let L2 be the mean of the loss function L2 of the stable running-state image output by the autoencoder model. The standard deviation of the loss function L2 for the stable running image output by the autoencoder model; and the latent spatial loss are defined. The determination threshold, where, , The standard deviation of the latent feature vector Z(τ) of stage k output by the autoencoder model is given.

6. The real-time detection method for neutron tube target film defects according to claim 5, characterized in that, The local image of the real-time reaction area is input into the trained dual-space conjugate autoencoder, which outputs a fused latent feature and a reconstructed image vector, and calculates the dual-space bias value, including: Flatten the local image of the real-time reaction area into a one-dimensional vector X3(t); Inputting a one-dimensional vector X3(t) into a trained dual-space conjugate autoencoder outputs a fused latent feature Z3(t) and a reconstructed image vector. 3(t), calculate the potential spatial loss of the local image of the real-time reaction zone. The sample space loss of each pixel in the local image of the real-time reaction area described in the figure. ; Determining the preliminary abnormal regions in the local image of the real-time reaction zone includes: when >θ and > When this happens, the corresponding pixel is determined to be a candidate abnormal pixel; Connectivity analysis is performed on candidate anomalous pixels to form preliminary anomalous regions.

7. The real-time detection method for neutron tube target film defects according to claim 4, characterized in that, Calculate the confidence level of the preliminary anomaly region. Based on the confidence level, further determine whether the preliminary anomaly region is a true anomaly region. If so, output the anomaly region coordinates, confidence level, and bispatial deviation value, including: If the initial abnormal area area ratio <First preset area threshold> And max( / θ , / If the initial abnormal region is less than the preset first ratio threshold, it is considered a low-confidence area and determined to be a normal operation fluctuation; therefore, no abnormal coordinates are output. =Number of abnormal pixels / Total number of pixels in the reaction area; If the first preset area threshold ≤ Percentage of Preliminary Anomaly Area Second preset area threshold And the preset first ratio threshold ≤ max( / θ , / If the preset second ratio threshold is less than the threshold value, the preliminary abnormal area is of medium confidence level, marked as a candidate defect area, and the coordinates of the aligned abnormal area and the dual spatial deviation value are recorded. If the initial abnormal area area ratio ≥Second preset area threshold or max( / θ , / If the initial abnormal region is at a high confidence level and is determined to be a final abnormal region, then the initial abnormal region is at a high confidence level. For abnormal regions, the operating stage k corresponding to the real-time operating image is identified, where k=1 is the discharge stabilization stage and k=2 is the ion beam stabilization stage. The baseline feature subset of the corresponding stage is then obtained. ; From the subset of the benchmark feature library Extracting the reaction zone anchor point information, the reaction zone anchor point information includes the center coordinates of the reaction zone and the set of boundary feature points; Based on the local image of the real-time reaction zone, the center coordinates of the real-time reaction zone are calculated, and the coordinates of the center of the real-time reaction zone are compared with a subset of the baseline feature library. The coordinate offset of the center coordinate of the reaction area is used to correct the pixel coordinates in the abnormal area to the aligned coordinates, thereby obtaining the coordinates of the abnormal area. Output the coordinates of the outlier region, the confidence level, and the sample space loss. and potential space loss .

8. The method for real-time detection of defects in a neutron tube target film according to claim 7, characterized in that, Step S4 involves extracting the temporal evolution feature vector of the abnormal region, inputting the temporal evolution feature vector into a long short-term memory network model optimized based on the black hole particle swarm optimization algorithm, outputting the defect type, and classifying the risk level of the neutron tube target membrane based on the confidence level and the defect type, including: Set input window length ,correspond Extracting from consecutive sampling periods The temporal evolution feature vector of the abnormal region within a series of consecutive sampling periods is expressed as follows: ; in, For time-series evolution feature vectors, express The real-time running image at the sampling time undergoes sample space loss through the dual-space conjugate autoencoder. express The real-time running image at the sampling time undergoes the latent spatial loss of the dual-spatial conjugate autoencoder. Let be the pixel area of ​​the abnormal region at time t. and The coordinates of the center of the aligned anomaly region; Normalize each component of the temporal evolution feature vector to obtain the normalized temporal evolution feature vector. ; Normalized time-series evolution feature vectors Input the Long Short-Term Memory (LSTM) network model and output the probability of each type of defect; The defect type with the highest probability is taken as the defect type of the abnormal region; Based on the defect type, confidence level, and temporal evolution trend of the temporal evolution feature vector of the abnormal region, the risk level of the abnormal region is classified.

9. The method for real-time detection of defects in a neutron tube target film according to claim 8, characterized in that, The Long Short-Term Memory (LSTM) network model comprises an input layer, hidden layers, and an output layer. The input layer has 5 neurons and receives a normalized temporal evolution feature vector. The hidden layer consists of two layers, with a total number of neurons. , The optimization objective of the Black Hole Particle Swarm Optimization (BHPSO) algorithm is the ReLU function; the number of neurons in the output layer is 3, corresponding to 3 types of core defects: sputtering erosion (SE), isotope dissipation (TD), and thermal stress microcracks (TSC), with the softmax function as the activation function, and outputting the probabilities P(SE), P(TD), and P(TSC) of the 3 types of defects. Based on the Black Hole Particle Swarm Optimization (BHPSO) algorithm, this study optimizes four key hyperparameters of the Long Short-Term Memory (LSTM) network model by simulating the "particle swarm search + black hole attraction + particle regeneration" mechanism, obtaining the optimal hyperparameter combination. The four key hyperparameters include the number of neurons in the hidden layer. Learning rate Batch size and number of iterations ; The Long Short-Term Memory (LSTM) network model is trained using the optimal hyperparameter combination to obtain the trained LSTM network model. The normalized temporal evolution feature vector Input a trained Long Short-Term Memory (LSTM) network model and output probability values ​​for three types of defects. Determine the defect type based on the probability values.

10. The method for real-time detection of defects in a neutron tube target film according to claim 9, characterized in that, The Black Hole Particle Swarm Optimization (BHPSO) algorithm optimizes four key hyperparameters of the Long Short-Term Memory (LSTM) network model by simulating the "particle swarm search + black hole attraction + particle regeneration" mechanism, obtaining the optimal hyperparameter combination, including: Initialize the population of particles, with each particle corresponding to one set of hyperparameters. The particle position vector is: ; Each particle updates its velocity and position based on its individual optimal position and global optimal position, calculated using the following formula: ; ; in, This represents the number of BHPSO iterations. The particle velocity vector For inertial weights, and As acceleration factors, they guide particles toward individual and global optima, respectively. and A random number in the interval [0,1]. This represents the historical best position for a single particle. This is the globally optimal position for the entire particle swarm; According to the black hole attraction mechanism, particles are randomly reborn in the search space, including: The global optimal position Represented as a black hole, the formula for calculating the gravitational radius of a black hole is: ; in, This is the absorption range control coefficient. For particle swarm scale, Let be the Euclidean distance between the i-th particle and the global optimal position. The radius of the black hole's attraction; The formula for calculating the Euclidean distance between each particle and the global optimal position is as follows: ; Where j is the hyperparameter dimension index, Let j be the hyperparameter of the position vector of the i-th particle. The Euclidean distance between each particle and the global optimal position; When the Euclidean distance between the i-th particle and the global optimal position Black hole attraction radius Particles are absorbed by black holes and randomly regenerate into new particles within the search space, according to the following formula: ,in, and These are the lower bound and the upper bound of the search space, respectively. A random number in the range [0,1]. For reborn particles; Through iterative optimization, the optimal hyperparameter combination of the Long Short-Term Memory (LSTM) network model was obtained.