Gamma spectrum analysis method and system based on deep learning physical information network

By using a multi-module collaborative energy spectrum analysis model of deep learning physical information networks, the problems of difficult separation of overlapping peaks and difficulty in identifying weak peaks in gamma energy spectrum analysis are solved, achieving high-precision and efficient energy spectrum analysis and enhancing anti-interference capabilities.

CN121679665BActive Publication Date: 2026-05-08HEFEI INSTITUTE OF PHYSICAL SCIENCE CHINESE ACADEMY OF SCIENCES
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HEFEI INSTITUTE OF PHYSICAL SCIENCE CHINESE ACADEMY OF SCIENCES
Filing Date
2026-02-12
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing gamma-ray spectroscopy analysis methods suffer from high computational complexity, poor adaptability, and complex feature engineering, resulting in difficulties in separating overlapping spectral peaks, identifying weak peaks, weak anti-interference ability, and low analysis accuracy and efficiency.

Method used

A multi-module collaborative energy spectrum analysis model based on deep learning physical information network is adopted, which combines multi-scale convolutional neural network, attention mechanism and physical information neural model. Through data-driven and physically constrained loss function training, energy spectrum multi-scale feature decomposition and cross-feature information interaction are realized.

Benefits of technology

It improves the accuracy and efficiency of gamma spectrum analysis, enhances the degree of automation, solves the problems of difficult separation of overlapping spectral peaks and difficulty in identifying weak peaks, and strengthens the anti-interference ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121679665B_ABST
    Figure CN121679665B_ABST
Patent Text Reader

Abstract

The application provides a gamma spectrum analysis method and system based on a deep learning physical information network, and relates to the technical field of gamma spectrum analysis. The method comprises: obtaining sample data containing energy spectrum and corresponding analysis data, and preprocessing the sample data; constructing an energy spectrum analysis model based on a multi-scale convolutional neural network, an attention mechanism module and a physical information neural model; training the energy spectrum analysis model using the preprocessed sample data to generate a target energy spectrum analysis model; inputting the energy spectrum to be analyzed into the target energy spectrum analysis model to output an analysis result. By constructing a multi-module collaborative energy spectrum analysis model, accurate decomposition of energy spectrum multi-scale features, efficient interaction of cross-feature information and collaborative prediction of multiple parameters are realized, problems such as difficulty in separating overlapping spectrum peaks, difficulty in identifying weak peaks and weak anti-interference ability of traditional methods are solved, and the accuracy, efficiency and automation degree of energy spectrum analysis are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of gamma spectrum analysis, and in particular to a gamma spectrum analysis method and system based on deep learning physical information networks. Background Technology

[0002] Traditional gamma spectral analysis mainly relies on human experience for peak identification and nuclide determination, which has problems such as low efficiency and strong subjectivity.

[0003] In existing analytical methods for neutron-activated gamma spectroscopy (NUS), peak-fitting methods require pre-defined mathematical functions to describe the shape of the full-energy peaks and iteratively solve for peak area and position using nonlinear least squares. This method is highly dependent on accurate estimation of initial parameters, resulting in high computational complexity. Furthermore, in the context of stratigraphic element detection, the analytical accuracy is significantly reduced due to complex spectra with overlapping peaks and high Compton background interference. Template-matching methods primarily include the Monte Carlo Library Least Squares (MCLLS) method. This method first uses Monte Carlo simulations to generate a standard response spectral library for each element. This library is iteratively defined, iterating until the library best suited to the studied sample is found. Assuming the measured spectrum is a linear superposition of these standard spectra, the elemental content can be solved by inverse least squares. The main difficulties of this method are: numerical instability in the least squares stage (when the matrix is ​​invertible, matrix inversion may introduce numerical instability), overdeterminacy of the equation system, linear dependence in the library, and gamma radiation scattering. For example, in the least squares method, when the system of equations is overdetermined, even small data perturbations can lead to huge oscillations in the solution, which is numerical instability. In the gamma-ray scattering problem, Compton scattering causes a continuous background and broadened peaks in the energy spectrum, resulting in complex nonlinear differences between the standard spectral library and the actual measured spectrum. Traditional machine learning methods, such as support vector machines and artificial neural networks, require manual feature extraction as input, which is not only complex in feature engineering but also relies on expert experience and struggles to capture global contextual information in the energy spectrum.

[0004] In summary, among the existing solutions, peak-fitting methods have high computational complexity, template matching methods have poor adaptability, and traditional machine learning methods have complex feature engineering. These results in problems such as difficulty in separating overlapping spectral peaks, difficulty in identifying weak peaks, and weak anti-interference ability, leading to low accuracy and efficiency in energy spectrum analysis. Summary of the Invention

[0005] Therefore, it is necessary to provide a gamma spectrum analysis method and system based on deep learning physical information networks to address the above-mentioned technical problems. By constructing a multi-module collaborative spectrum analysis model, it can achieve accurate decomposition of multi-scale features of the spectrum, efficient interaction across feature information, and collaborative prediction of multiple parameters. This solves the problems of difficult peak separation, weak peak identification, and weak anti-interference ability of traditional methods, thereby improving the accuracy, efficiency, and automation of spectrum analysis.

[0006] Firstly, this application provides a gamma-ray spectrum analysis method based on deep learning physical information networks, including:

[0007] Obtain sample data containing energy spectra and corresponding analytical data, and preprocess the sample data;

[0008] A spectrum analysis model is constructed based on a multi-scale convolutional neural network, an attention mechanism module, and a physical information neural model; the attention mechanism module performs spatial dimension weighting on the feature maps extracted by the multi-scale convolutional neural network.

[0009] The energy spectrum analysis model is trained using the preprocessed sample data to generate the target energy spectrum analysis model;

[0010] Input the energy spectrum to be analyzed into the target energy spectrum analysis model and output the analysis results.

[0011] In one embodiment, obtaining sample data including energy spectrum and corresponding analytical data includes:

[0012] Acquire real sample data and perform multi-dimensional data augmentation on the real sample data, including: adjusting the content of target elements in the real sample data to generate simulation data containing element content and corresponding energy spectra, adaptively shifting the energy spectrum with micro-energy channels according to temperature changes, and generating gamma energy spectra corresponding to different detection environments for different types of detectors based on their response functions.

[0013] In one embodiment, preprocessing the sample data includes:

[0014] The energy spectrum is standardized using the following formula:

[0015]

[0016] Where x is the input energy spectrum; and These are the mean and standard deviation of the global training set, respectively.

[0017] In one embodiment, training the energy spectrum analysis model using preprocessed sample data includes:

[0018] The preprocessed sample data is input into the energy spectrum analysis model to generate the model's predicted values ​​for element mass fractions;

[0019] The MAE loss function, MES loss function, and SmoothL1 Loss function are constructed based on the true element quality scores and the model's predicted values ​​of element quality scores, as shown in the following formulas:

[0020]

[0021]

[0022]

[0023] in, This is the model's predicted value for the element's mass fraction; L represents the actual element mass fraction; L represents the energy spectrum length; K represents the number of element species.

[0024] Weighted summation of MAE, MES, and SmoothL1Loss loss functions generates a data-driven training loss function L. data The formula is as follows:

[0025]

[0026] in, , , These are hyperparameters used to balance the weights of various losses;

[0027] The energy spectrum analysis model is trained using a loss function driven by data, and the number of iterations is set.

[0028] In one embodiment, a semi-supervised learning strategy is adopted, which first uses the simulation data in the sample data to train the backbone network of the model, and then uses the real data in the sample data to fine-tune the top-level parameters.

[0029] In one embodiment, during training, a physical information constraint loss term is added to the physical information neural model to generate the total loss function, as shown in the following formula:

[0030]

[0031] in, L data The loss function for data-driven training is the data error. L physics This is the physical information loss function, i.e., the penalty term for violating physical laws; and These are the weighting coefficients for data errors and penalties for violating physical laws, respectively.

[0032] In one embodiment, the physical information constraint loss term includes nuclide characteristic peak energy constraints and element content sum normalization constraints; wherein, nuclide characteristic peak energy constraints include the peak region response of the corresponding energy channel and a specific element, and the characteristic peak information of the corresponding element is obtained according to the response matrix; the element content sum normalization constraints include that the content of each element is non-negative and the sum should be close to 1.

[0033] In one embodiment, the physical information constraint loss term is expressed as:

[0034]

[0035]

[0036]

[0037]

[0038] in, To constrain the sum of element content to a normalization level, nonnegativity is achieved by adding a ReLU activation function to the output layer; Energy constraint for characteristic peaks of nuclides; The content of the i-th element predicted by the model; Let be the unit mass fraction response spectrum of the i-th element; The mass fraction of the element; This is the sum of statistical error and background spectrum. S pred For predicting the energy spectrum; S true This represents the true energy spectrum.

[0039] In one embodiment, the physical information constraint loss term includes nuclide characteristic peak energy constraint, nuclide characteristic peak intensity ratio conservation constraint, and element content summation normalization constraint.

[0040] Secondly, this application also provides a gamma spectrum analysis system based on a deep learning physical information network, comprising:

[0041] The data generation module is used to acquire sample data containing energy spectra and corresponding analytical data, and to preprocess the sample data.

[0042] The model construction model is used to construct an energy spectrum analysis model based on a multi-scale convolutional neural network, an attention mechanism module, and a physical information neural model; the attention mechanism module performs spatial dimension weight allocation on the feature maps extracted by the multi-scale convolutional neural network.

[0043] The model training module is used to train the energy spectrum analysis model using preprocessed sample data to generate the target energy spectrum analysis model.

[0044] The energy spectrum analysis module is used to input the energy spectrum to be analyzed into the target energy spectrum analysis model and output the analysis results.

[0045] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0046] Obtain sample data containing energy spectra and corresponding analytical data, and preprocess the sample data;

[0047] A spectrum analysis model is constructed based on a multi-scale convolutional neural network, an attention mechanism module, and a physical information neural model.

[0048] The energy spectrum analysis model is trained using the preprocessed sample data to generate the target energy spectrum analysis model;

[0049] Input the energy spectrum to be analyzed into the target energy spectrum analysis model and output the analysis results.

[0050] This application employs the aforementioned gamma-ray spectrum analysis method and system based on deep learning physical information networks, which has the following beneficial effects:

[0051] 1. By constructing a multi-module collaborative energy spectrum analysis model, we can achieve accurate decomposition of multi-scale energy spectrum features, efficient interaction of cross-feature information, and collaborative prediction of multiple parameters. This solves the problems of difficult peak separation, weak peak identification, and weak anti-interference ability in traditional methods, thereby improving the accuracy, efficiency, and automation of energy spectrum analysis.

[0052] 2. As a feature extractor, CNN can extract robust, hierarchical features (such as edges, peaks, and background shape) from the input detector response data through local connectivity and weight sharing. This process can also filter out high-frequency noise and statistical fluctuations in the data, which is equivalent to smoothing and reducing the dimensionality of the original data, resulting in a lower-dimensional feature representation. By directly embedding physical laws as soft constraints into the loss function, the position of feature peaks and Compton edge information can be determined in advance through physical laws, which helps to solve the problem of instability of least squares method.

[0053] 3. The feature representations learned by CNN based on data-driven learning are linearly independent. Moreover, the self-attention mechanism's ability to capture long-range dependencies and contextual information can distinguish energy spectra that are similar in shape but have subtle differences. The global correlation characteristics of the self-attention mechanism can discover the correspondence between double escape peaks and full absorption peaks, which helps to solve the linear dependency problem.

[0054] 4. The Physical Information Network (PIN) implements dual constraints of data-driven approaches and physical laws, improving the physical consistency and reliability of analytical results. Traditional deep learning models are prone to outputting results that violate physical common sense, such as predicting negative element content or outputting element content sums that are not equal to 1. This severely impacts prediction accuracy in data-driven methods. This application introduces a physical information constraint term (non-negative element content and a sum of 1) into the loss function, forcing the model to search within the physically permissible solution space, ensuring that the analytical results conform to physical laws, and simultaneously improving prediction accuracy. Beyond these fundamental physical constraints, the model learning is guided by nuclide characteristic peaks retrieved from the standard library using Monte Carlo simulations, making the model more robust to real-world data. Attached Figure Description

[0055] Figure 1 This is a flowchart of a neutron activation gamma spectrum analysis method based on a deep learning physical information network, as an example.

[0056] Figure 2 This is a schematic diagram of the energy spectrum analysis model in one embodiment;

[0057] Figure 3 This is a schematic diagram of the structure of a multi-scale convolutional neural network in one embodiment;

[0058] Figure 4 This is a schematic diagram of the attention mechanism module in one embodiment;

[0059] Figure 5 This is a schematic diagram illustrating the generation of QKV from the self-attention weight matrix in one embodiment;

[0060] Figure 6 This is a schematic diagram of a multi-scale convolutional feature extraction module with self-attention mechanism in one embodiment;

[0061] Figure 7 This is a schematic diagram showing the comparison between the actual and predicted values ​​of element content during verification in one embodiment. Detailed Implementation

[0062] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0063] Firstly, referring to Figures 1 to 6 This application provides a gamma-ray spectrum analysis method based on deep learning physical information networks, including:

[0064] S100: Obtain sample data containing energy spectrum and corresponding analytical data, and preprocess the sample data.

[0065] In one embodiment, obtaining sample data including energy spectrum and corresponding analytical data includes:

[0066] Acquire real sample data and perform multi-dimensional data augmentation on the real sample data, including: adjusting the content of target elements in the real sample data to generate simulation data containing element content and corresponding energy spectra, adaptively shifting the energy spectrum with micro-energy channels according to temperature changes, and generating gamma energy spectra corresponding to different detection environments for different types of detectors based on their response functions.

[0067] Training data primarily comes from a data-augmented simulation energy spectrum generation system, while validation data originates from experimental measurements of physical standard samples. All data undergoes preprocessing. The energy spectra generated by the gamma-ray energy spectrum simulation system, along with corresponding elemental categories and content parameters, are systematically formatted into a standard format suitable for deep learning model training. The signal values ​​detected by the detector are extracted from the output file and saved as an array corresponding to the energy spectrum and count rate, serving as model input. Formation parameters, such as formation density and the corresponding content of elemental types, are used as model output.

[0068] In gamma spectroscopy, the count ranges of different energy channels often vary greatly, and the total counts may also vary between different samples (due to instrument efficiency, statistical fluctuations, sample density, irradiation time variations, etc.). To ensure data consistency during model training, it is necessary to standardize the overall spectrum (global mean / std standardization) to normalize the total counts of each energy spectrum to the same scale, thus eliminating count rate differences caused by different experimental conditions.

[0069] In one embodiment, the energy spectrum is standardized using the following formula:

[0070]

[0071] Where x is the input energy spectrum; and These are the mean and standard deviation of the global training set, respectively.

[0072] Standardizing this input distribution scaling helps stabilize the gradient scale, preventing the model from learning irrelevant scale information and allowing it to focus more on the shape of the spectrum. After standardization, the model focuses more on the shape of the spectrum (peak distribution, relative features) rather than absolute count values. Therefore, it has stronger robustness and generalization ability to changes in instrumentation, noise levels, and technical statistics. Since periodic continuity is not required, linear encoding is directly used for the energy stamps, and scale alignment is performed to ensure that the channel address and energy correspondence of all energy spectra are consistent. Interpolation is performed when necessary to ensure that all input vectors have the same length.

[0073] In actual processing, the model input (X) is integrated into an energy spectrum vector. Assuming the data is an energy spectrum with 256 channels, the input dimension is (2, 256), where the first column stores the energy channel address and the second column stores the count. During training, matrix permutation represents one-dimensional convolution in the direction of energy change. Adding `batch_size` yields the model input vector (batch_size, 2, channel). The model label (Y) integrates a content label Y_q, which is a regression vector. Assuming there are 15 elements, its length is also 15, and its value represents the content of each element.

[0074] The aforementioned simulation energy spectrum generation system is used to generate training data, including automated simulation model expansion, input-level perturbation, and multi-detector environment simulation.

[0075] For automated simulation model expansion: The simulation energy spectrum generation system uses batch processing program scripts to parse, extract, and replace simulation input files, automatically generating a large number of simulation input files with different element contents, while running in parallel to quickly obtain scaled-up gamma energy spectra.

[0076] For example, for a standard sandstone sample with a Si content of 32%, a batch processing script can be used to set its content to a linear distribution of 0-50% for 5000 samples, with the contents of other elements varying proportionally. The density of the modified samples can then be calculated and a corresponding input card generated.

[0077] For input-level perturbations: as temperature increases, the signal detected by the detector will exhibit changes in channel address, shifting to varying degrees over time. Therefore, an adaptive micro-energy channel address shift is applied to the energy spectrum based on the detector's physical characteristics to simulate the detector's energy drift.

[0078] For multi-detection environment simulation: energy spectra are generated based on the response functions of different types of detectors (such as NaI, LaBr, CeBr3, etc.); input cards containing shielding materials of different materials and thicknesses are generated to enhance the model's adaptability to different detection environments.

[0079] S200, refer to Figures 2 to 6 A spectrum analysis model is constructed based on a multi-scale convolutional neural network, an attention mechanism module, and a physical information neural model. The attention mechanism module assigns spatial dimension weights to the feature maps extracted by the multi-scale convolutional neural network.

[0080] Reference Figure 2 and Figure 6To ensure lightweight design, a multi-scale neural network with local residual blocks (conv1d→BN→ReLU+skip) is used to construct the feature extraction module. Multiple CNN blocks with different convolutional kernels are employed, each containing a one-dimensional convolutional layer (for example, kernel sizes of 3, 5, and 9) and a shortcut connection to extract local features of the energy spectrum (such as peak position, peak shape, and peak spacing). The multi-scale convolutional kernels can simultaneously capture features of different shapes, such as sharp peaks and gentle Compton edges. Feature fusion is performed by concatenating the multi-scale convolutional feature maps to improve the ability to distinguish overlapping peaks.

[0081] For the input energy spectrum vector and multi-element output vector ;in, The length of the energy spectrum. This represents the number of element types. For the three convolution kernel scales in this embodiment... :

[0082]

[0083] in, F i The feature vector with convolution kernel size i; It is a convolution matrix.

[0084] Then the features extracted by the three convolutional kernels are concatenated:

[0085]

[0086] Where F is the concatenated feature vector.

[0087] Spatial weights are assigned to the feature maps extracted by the CNN. Since this is a one-dimensional convolution, it falls under spatial attention on the energy path, reinforcing the contribution of feature peak positions. For example... Figure 4 As shown, the input features are concatenated after max pooling and average pooling, and then subjected to one-dimensional convolution to maintain the number of feature channels consistent with the input features. Finally, the energy-channel attention matrix M is obtained after passing through the sigmoid activation function. E .

[0088] Reference Figure 4 and Figure 5 The self-attention mechanism is implemented as follows: the input features are first processed by three weight matrices to generate three vectors Q (query), K (key), and V (value), where... , , It is a learnable weight matrix. The dimensions of the input feature X are (B, L, C); where B is the batch size; L is the sequence length; and C is the feature dimension. Therefore, the dimensions of the weight matrix are (B, C, w), where w is the dimension of the weight matrix. Thus, the dimensions of QKV are (B, L, w).

[0089] In the self-attention mechanism, the dot product between the query vector Q and the key vector K is used to calculate the attention score. A scaling factor is introduced to avoid gradient problems caused by excessively large dot product results. . It is the dimension of the key vector. This indicates the level of attention each query pays to all keys.

[0090]

[0091] In order to score attention Converting the weights into weights and normalizing them using the Softmax function ensures that the sum of all output weights is 1, thus learning the importance of each element pair. The Softmax function is defined as follows:

[0092]

[0093] The final attention weight matrix This is the product of the attention score and the value vector V.

[0094]

[0095] like Figure 4 As shown, the output is projected back through a linear layer. The final energy address attention matrix M is obtained. E The feature extraction module is integrated by splicing.

[0096] In this application, the self-attention mechanism module allows relevant information between different energy channels to be extracted, such as the synergistic relationship between the main peak and the escape peak, and the energy correlation between the scattering peak and the bulk peak.

[0097] S300 uses preprocessed sample data to train the energy spectrum analysis model and generate the target energy spectrum analysis model.

[0098] S400 inputs the energy spectrum to be analyzed into the target energy spectrum analysis model and outputs the analysis results.

[0099] In one embodiment, training the energy spectrum analysis model using preprocessed sample data includes:

[0100] The preprocessed sample data is input into the energy spectrum analysis model to generate the model's predicted values ​​for element mass fractions;

[0101] The MAE loss function, MES loss function, and SmoothL1Loss loss function are constructed based on the true element quality scores and the model's predicted values ​​of element quality scores.

[0102] Weighted summation of MAE, MES, and SmoothL1Loss loss functions generates a data-driven training loss function L. data ;

[0103] The energy spectrum analysis model is trained using a loss function driven by data, and the number of iterations is set.

[0104] For the input spectrum The model output is a vector. The true element mass fraction is ;in, The length of the energy spectrum. The number of element types is represented by . Through experimental comparison, the combined loss method of MAE+MSE is more effective in predicting high-content elements, but it is not sensitive enough to changes in trace elements. Given the presence of trace elements in the standard samples, a more robust Huber Loss, namely SmoothL1Loss, is added.

[0105] The formulas for the MAE loss function, MES loss function, and SmoothL1 Loss function are as follows:

[0106]

[0107]

[0108]

[0109] in, This is the model's predicted value for the element's mass fraction; is the actual element mass fraction; L is the energy spectrum length; and K is the number of element types.

[0110] The loss function L for data-driven training data Defined as:

[0111]

[0112] in, , , These are hyperparameters used to balance the weights of various losses. Here, we take... , , .

[0113] Traditional neural networks rely solely on data-driven end-to-end learning, that is, minimizing the prediction result. Compared with the actual results Difference in losses between To achieve this.

[0114]

[0115] In this application, during the training process, a physical information constraint loss term is added to the physical information neural model to generate the total loss function, as shown in the following formula:

[0116]

[0117] in, L data The loss function for data-driven training is the data error. L physics This is the physical information loss function, i.e., the penalty term for violating physical laws; and These are the weighting coefficients for data errors and penalties for violating physical laws, respectively. These can be set during experimental training. , .

[0118] In one embodiment, the physical information constraint loss term includes nuclide characteristic peak energy constraints and element content sum normalization constraints; wherein, nuclide characteristic peak energy constraints include the peak region response of the corresponding energy channel and a specific element, and the characteristic peak information of the corresponding element is obtained according to the response matrix; the element content sum normalization constraints include that the content of each element is non-negative and the sum should be close to 1.

[0119] Specifically, the characteristic peak energy constraint of a nuclide is as follows: for a specific nuclide predicted by the model to exist, the position of its corresponding characteristic peak in the energy spectrum must match the known standard gamma-ray energy (from the standard energy spectrum library) of that nuclide.

[0120] For example, if the model predicts the presence of silicon (Si), the predicted peaks should be around 3.539 MeV and 4.934 MeV. The loss can be defined as the mean square error between the predicted peaks and the standard peaks.

[0121] Specifically, the element content sum normalization constraint is: the content of any element predicted by the model must be greater than or equal to zero and the sum should be close to 1. The requirement that the content of any element must be greater than or equal to zero can be achieved by adding a ReLU activation function to the output layer.

[0122] In one embodiment, two physical information constraints are proposed for gamma-ray spectral information inversion:

[0123] (a) Normalization constraint for total element content: The sum of the contents of all elements should be close to 1, and its loss constraint is expressed as follows: ;in, This represents the content of the i-th element predicted by the model.

[0124] (b) Energy constraint of nuclide characteristic peaks: corresponding energy channels and peak response of specific elements, and obtain characteristic peak information of corresponding elements based on response matrix.

[0125] In PGNAA, the gamma spectrum is generally considered to be... It is a linear superposition of the gamma responses of each element:

[0126]

[0127] in, Let be the unit mass fraction response spectrum of the i-th element; The mass fraction of the element; This is the sum of statistical error and background spectrum.

[0128] Since the simulation has yielded multiple sets of mixed energy spectra And its component C is known:

[0129]

[0130] Combining the least squares method, we can obtain:

[0131]

[0132] in, C is the response matrix arrangement of all elements, with dimensions (number of elements, number of channels); C is the known content matrix, with dimensions (number of samples, number of elements). Let be the energy spectrum matrix, with dimensions (number of samples, number of channels).

[0133] The physical constraint is then:

[0134]

[0135] in, Let be the unit mass fraction response spectrum of the i-th element; The mass fraction of the element; It is the sum of statistical error and background spectrum; S pred To predict the energy spectrum, S true This represents the true energy spectrum.

[0136] Combining the two physical information constraints mentioned above, the physical information loss is: .

[0137] Reference Figure 7 During training, the energy spectrum and corresponding element content extracted from the simulation model output are saved to CSV files. One file corresponds to the energy spectrum and element content of a single sample. The filename Al_100_RCC2_Al_046.0_element.csv represents a variant model with Al content. During training, the dataset preprocessing uniformly converts the energy spectrum to the energy range of 0MeV~11MeV, with a total of 256 channels. 32 samples are collected for each training iteration, so the dimension of the input vector is (32,2,256). The model output is a vector of (32,1,13), where 32 represents the number of samples, 13 represents the element type, and each value represents the mass fraction of the element.

[0138] In one embodiment, a semi-supervised learning strategy is adopted, which first uses the simulation data in the sample data to train the backbone network of the model, and then uses the real data in the sample data to fine-tune the top-level parameters.

[0139] Specifically, during pre-training, the backbone network of the model (feature extraction + attention + feature and physical information fusion) is trained using large-scale, labeled simulated energy spectrum data, giving it preliminary energy spectrum resolution capabilities. During fine-tuning, the effective features of the supplementary experimental data should be consistent with the simulated data; the only difference lies in interference and noise introduced by experimental limitations such as detector limitations. Therefore, all parameters in the self-attention mechanism are frozen, and only the network parameters during the feature extraction model's downsampling process are fine-tuned to adapt the model to the distribution of real data. Finally, the trained model is evaluated using an independent real experimental energy spectrum dataset, with key metrics including element classification accuracy and relative error in content prediction.

[0140] Through the above steps, the model is equipped with the ability to automatically and accurately analyze unknown gamma spectra under complex conditions such as peak overlap and high background, and simulation data can be used to supplement samples to improve the model's generalization ability.

[0141] Secondly, this application also provides a gamma spectrum analysis system based on a deep learning physical information network, comprising:

[0142] The data generation module is used to acquire sample data containing energy spectra and corresponding analytical data, and to preprocess the sample data.

[0143] The model construction model is used to construct an energy spectrum analysis model based on a multi-scale convolutional neural network, an attention mechanism module, and a physical information neural model; the attention mechanism module performs spatial dimension weight allocation on the feature maps extracted by the multi-scale convolutional neural network.

[0144] The model training module is used to train the energy spectrum analysis model using preprocessed sample data to generate the target energy spectrum analysis model.

[0145] The energy spectrum analysis module is used to input the energy spectrum to be analyzed into the target energy spectrum analysis model and output the analysis results.

[0146] In one embodiment, a computer device is provided, which may be a server. The computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores relevant data. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements a gamma-ray spectral analysis method based on a deep learning physical information network.

[0147] In one embodiment, a computer device is provided, which may be a terminal. The computer device includes a processor, memory, a communication interface, a display screen, and an input device connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a gamma-ray spectrum analysis method based on a deep learning physical information network.

[0148] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0149] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0150] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0151] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0152] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0153] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0154] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A gamma-ray spectrum analysis method based on deep learning physical information networks, characterized in that, include: Obtain sample data containing energy spectra and corresponding analytical data, and preprocess the sample data; A spectrum analysis model is constructed based on a multi-scale convolutional neural network, an attention mechanism module, and a physical information neural model; the attention mechanism module performs spatial dimension weighting on the feature maps extracted by the multi-scale convolutional neural network. The energy spectrum analysis model is trained using the preprocessed sample data to generate the target energy spectrum analysis model; Input the energy spectrum to be analyzed into the target energy spectrum analysis model and output the analysis results.

2. The method according to claim 1, characterized in that, Obtain sample data containing energy spectra and corresponding analytical data, including: Acquire real sample data and perform multi-dimensional data augmentation on the real sample data, including: adjusting the content of target elements in the real sample data to generate simulation data containing element content and corresponding energy spectra, adaptively shifting the energy spectrum with micro-energy channels according to temperature changes, and generating gamma energy spectra corresponding to different detection environments for different types of detectors based on their response functions.

3. The method according to claim 1, characterized in that, Preprocessing of sample data includes: The energy spectrum is standardized using the following formula: Where x is the input energy spectrum; and These are the mean and standard deviation of the global training set, respectively.

4. The method according to any one of claims 1 to 3, characterized in that, The energy spectrum analysis model is trained using preprocessed sample data, including: The preprocessed sample data is input into the energy spectrum analysis model to generate the model's predicted values ​​for element mass fractions; The MAE loss function, MES loss function, and SmoothL1 Loss function are constructed based on the true element quality scores and the model's predicted values ​​of element quality scores, as shown in the following formulas: in, This is the model's predicted value for the element's mass fraction; L represents the actual element mass fraction; L represents the energy spectrum length; K represents the number of element types. Weighted summation of MAE, MES, and SmoothL1Loss loss functions generates a data-driven training loss function L. data The formula is as follows: in, , , These are hyperparameters used to balance the weights of various losses; The energy spectrum analysis model is trained using a loss function driven by data, and the number of iterations is set.

5. The method according to claim 4, characterized in that, A semi-supervised learning strategy is adopted, which first uses the simulation data in the sample data to train the backbone network of the model, and then uses the real data in the sample data to fine-tune the top-level parameters.

6. The method according to claim 4, characterized in that, During training, a physical information constraint loss term is added to the physical information neural model to generate the total loss function, as shown in the following formula: in, L data The loss function for data-driven training is the data error. L physics This is the physical information loss function, i.e., the penalty term for violating physical laws; and These are the weighting coefficients for data errors and penalties for violating physical laws, respectively.

7. The method according to claim 6, characterized in that, The physical information constraint loss term includes nuclide characteristic peak energy constraints and element content sum normalization constraints; among them, nuclide characteristic peak energy constraints include the peak region response of the corresponding energy channel and a specific element, and the characteristic peak information of the corresponding element is obtained according to the response matrix; element content sum normalization constraints include that the content of each element is non-negative and the sum should be close to 1.

8. The method according to claim 6, characterized in that, The physical information constraint loss term is expressed as: in, To constrain the sum of element content to a normalization level, nonnegativity is achieved by adding a ReLU activation function to the output layer; Energy constraint for characteristic peaks of nuclides; The content of the i-th element predicted by the model; Let be the unit mass fraction response spectrum of the i-th element; The mass fraction of the element; This is the sum of statistical error and background spectrum; S pred For predicting the energy spectrum; S true This represents the true energy spectrum.

9. A gamma-ray spectrum analysis system based on deep learning physical information networks, characterized in that, include: The data generation module is used to acquire sample data containing energy spectra and corresponding analytical data, and to preprocess the sample data. The model construction model is used to construct an energy spectrum analysis model based on a multi-scale convolutional neural network, an attention mechanism module, and a physical information neural model; the attention mechanism module performs spatial dimension weight allocation on the feature maps extracted by the multi-scale convolutional neural network. The model training module is used to train the energy spectrum analysis model using preprocessed sample data to generate the target energy spectrum analysis model. The energy spectrum analysis module is used to input the energy spectrum to be analyzed into the target energy spectrum analysis model and output the analysis results.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.