A gamma spectrum feature extraction method and system based on energy spectrum two-dimensional coding

By converting gamma-ray spectral data into a two-dimensional structured form, the shortcomings of traditional one-dimensional spectral data in high-precision analysis are addressed, enabling multi-scale feature extraction and stability improvement, making it suitable for various spectral analysis tasks.

CN122631683APending Publication Date: 2026-08-25HEBEI XIONGAN BAIZE INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610543171.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-23
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

Traditional gamma spectrometers' one-dimensional energy spectrum data suffer from low signal-to-noise ratio and unstable peak shape in field applications, making it difficult to meet the requirements of high-precision analysis. Existing technologies lack effective two-dimensional encoding methods, resulting in low feature extraction efficiency and unstable training of deep learning models.

Method used

A two-dimensional energy spectrum matrix is ​​generated by preprocessing, rearranging, slicing, splicing, and convolutional unrolling the energy spectrum data. Combined with local structure enhancement, scale transformation, and statistical feature embedding, a two-dimensional feature map suitable for deep learning models is formed. Multi-scale feature extraction is then performed using convolutional neural networks and attention mechanisms.

Benefits of technology

It achieves high-precision analysis of gamma-ray spectral information, improves the completeness and robustness of feature representation, and is applicable to various application scenarios such as nuclide identification, element content inversion, soil nutrient estimation, and geological structure analysis, thereby improving the training efficiency and prediction accuracy of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122631683A_ABST
    Figure CN122631683A_ABST
Patent Text Reader

Abstract

The application discloses a kind of gamma energy spectrum feature extraction method and system based on energy spectrum two-dimensional coding, belong to nuclear detection and energy spectrum signal processing technical field, this method includes: obtaining and pre-processing gamma energy spectrum data;One-dimensional energy spectrum sequence is mapped into two-dimensional energy spectrum matrix by two-dimensional coding;Local structure enhancement is carried out to two-dimensional energy spectrum matrix, multi-scale transformation, space feature compression and statistical feature embedding, and two-dimensional energy spectrum feature map is constructed;High-dimensional spectral feature expression is obtained by using feature extraction model to carry out multilevel processing to two-dimensional energy spectrum feature map;The high-dimensional spectral feature output is used for nuclide identification, element content inversion and other gamma energy spectrum analysis application.The application enhances the energy spectrum structure feature expression ability by two-dimensional coding mode, realizes the efficient, stable and fine use of energy spectrum information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of nuclear radiation detection and spectral data processing technology, specifically to a method and system for extracting gamma spectral features based on two-dimensional energy spectrum encoding. Background Technology

[0002] Gamma spectroscopy is a fundamental technique for environmental radiometric measurement, geological exploration, and agricultural soil element inversion. Traditional gamma spectrometers typically acquire radiation energy distribution through scintillator or semiconductor detectors, presenting the characteristic peak structure of nuclides in the form of a one-dimensional energy spectrum. However, in field applications, one-dimensional energy spectra often suffer from problems such as low signal-to-noise ratio, unstable peak shape, and insufficient feature representation due to limitations such as short measurement time, high statistical noise, energy drift, and complex background radiation. This makes it difficult for traditional feature extraction methods based on peak counting to meet the requirements of high-precision analysis.

[0003] In recent years, with the development of machine learning and deep learning, researchers have begun to try to use full-spectrum information for nuclide identification and element quantification. However, one-dimensional energy spectrum data has a relatively simple structural representation, and its linear arrangement cannot fully present the multi-scale variation characteristics of the spectrum. This is not conducive to the capture of local structure and spatial correlation features by models such as convolutional neural networks and graph neural networks. In addition, the statistical fluctuations between different energy channels do not have spatial adjacency relationships, which makes it easy to cause problems such as low feature extraction efficiency and unstable training by directly inputting one-dimensional energy spectrum into deep models.

[0004] To enhance the expressive power of energy spectrum structure, some studies have attempted to use methods such as smoothing, filtering, wavelet transform, principal component analysis, and nonlinear dimensionality reduction for preprocessing. However, these methods often focus on noise reduction and dimensionality compression, and cannot fundamentally change the representation of energy spectrum data structure. They also cannot simultaneously preserve full-spectrum information and local details. In addition, there is a lack of a unified and scalable encoding method in the current technology to convert the original one-dimensional energy spectrum data into a two-dimensional structured form that is more suitable for deep model processing, thereby achieving high-quality, multi-scale gamma spectrum feature extraction.

[0005] Therefore, there is an urgent need for a two-dimensional encoding method that can effectively enhance the expressive power of gamma spectrum information, transforming the spectrum from a traditional one-dimensional sequence into a two-dimensional representation with spatial structure. This would provide richer, more stable, and physically consistent feature inputs for subsequent deep learning and machine learning models, thereby improving the accuracy and robustness of gamma spectrum analysis. Summary of the Invention

[0006] To achieve the above objectives, on the one hand, the present invention provides a method for extracting gamma-ray spectral features based on two-dimensional energy spectrum encoding, comprising the following steps:

[0007] S1, Energy Spectrum Data Acquisition and Preprocessing: Acquire the raw one-dimensional energy spectrum data collected by the gamma spectrometer and perform preprocessing operations on it. The preprocessing operations include channel calibration, smoothing and noise reduction, background processing, and normalization to ensure that the input data has consistency and comparability.

[0008] S2, Construction of two-dimensional encoding of one-dimensional energy spectrum: According to the preset energy spectrum mapping rules, the one-dimensional energy spectrum sequence is rearranged, sliced, spliced ​​and convolutionally expanded according to the energy dimension and the structural dimension to generate a two-dimensional energy spectrum matrix with spatial structure, thereby realizing the two-dimensional representation of energy spectrum data.

[0009] S3, Two-dimensional energy spectrum feature map generation: The two-dimensional energy spectrum matrix is ​​enhanced and encoded, including local structure enhancement, scale transformation, spatial feature compression, and statistical feature embedding, to form a two-dimensional feature map that can be used by deep learning models and machine learning algorithms.

[0010] S4, Two-dimensional feature extraction and high-dimensional feature representation: The two-dimensional feature map is processed in multiple layers using an adapted feature extraction model to extract multi-scale, deep semantic and local structural features, and to construct a high-dimensional spectral feature representation. The feature extraction model includes a convolutional neural network, an attention network, and an image feature extraction operator.

[0011] S5, Feature Output and Application: The extracted high-dimensional features are used in different application scenarios to achieve high-precision analysis of energy spectrum information. The application scenarios include nuclide identification, element content inversion, soil nutrient estimation, and geological structure analysis.

[0012] Furthermore, the specific preprocessing steps in S1 involve processing the original one-dimensional energy spectrum data sequence. Perform energy calibration, among which For the first The count value of each channel, The purpose of the energy calibration is to number the energy channels, which is the total number of energy channels. Convert to energy value The energy calibration methods include linear and quadratic polynomial calibration:

[0013] Linear energy calibration: ;

[0014] Secondary energy calibration: ;

[0015] in These are the calibration coefficients obtained by fitting the characteristic peaks of known nuclides;

[0016] The calibrated energy spectrum is expressed as follows:

[0017] ;

[0018] To mitigate the impact of statistical fluctuations on subsequent two-dimensional coding, Savitzky-Golay filtering is used to smooth the original counting sequence.

[0019] ;

[0020] in The coefficients are polynomial fitting coefficients, which preserve the peak shape characteristics. After processing, a denoised sequence is obtained: ;

[0021] Background radiation effects are subtracted using a polynomial fitting background algorithm:

[0022] ;

[0023] After background subtraction: ;

[0024] The total count of the energy spectrum after background subtraction is normalized:

[0025] ;

[0026] After normalization, the final sequence used for two-dimensional encoding is obtained:

[0027] ;

[0028] Finally, the energy spectrum is subjected to integrity and outlier detection, including channel missing detection and abnormal peak detection.

[0029] ;

[0030] like If the result is not found, it is considered abnormal and interpolation is performed to repair it.

[0031] Furthermore, the two-dimensional coding construction methods described in S2 include two-dimensional coding based on fixed shape rearrangement, two-dimensional coding based on energy segmentation, two-dimensional coding based on convolution unrolling, two-dimensional coding based on multi-scale mapping, and two-dimensional coding based on statistical structure embedding.

[0032] The two-dimensional encoding based on fixed shape rearrangement will have a length of The energy spectrum sequence is arranged according to a preset number of rows and columns. Perform filling and trimming to meet the following requirements:

[0033] ;

[0034] A two-dimensional matrix is ​​represented as:

[0035] ;

[0036] This method can maintain the local continuity of the counting sequence and construct two-dimensional spatial adjacency relationships;

[0037] The energy-segmented two-dimensional coding divides the energy spectrum according to its energy distribution. Each energy segment has a length of [number] segments. Construct a two-dimensional array:

[0038] ;

[0039] Among them, the first Behavior:

[0040] ;

[0041] Two-dimensional coding based on energy segmentation can reflect the structural differences between different energy regions, which is beneficial for capturing the characteristics of nuclide peak regions;

[0042] The convolution-based two-dimensional encoding expands a one-dimensional sequence into a two-dimensional matrix using a sliding window method, where the window size is . Step size is Then the two-dimensional matrix is ​​generated by the following formula:

[0043] ;

[0044] The number of rows is:

[0045] ;

[0046] This method can enhance the ability to capture local peak features and is suitable for use in convolutional networks;

[0047] The two-dimensional encoding based on multi-scale mapping can simultaneously preserve details and overall trends, constructing a multi-scale two-dimensional representation of the energy spectrum: Original scale: Downsampling scale: Smoothing scale: Concatenate multi-scale sequences into a matrix:

[0048] ;

[0049] This method can significantly enhance the robustness and multi-scale representation of features;

[0050] The statistical structure embedding-based two-dimensional encoding, in order to enhance the structural integrity of the two-dimensional representation, embeds the local statistical features of each channel into a two-dimensional matrix. These local statistical features include the local mean and local variance. Local variance Construct a two-dimensional matrix:

[0051] ;

[0052] Finally, one Two-dimensional feature matrix:

[0053] .

[0054] Furthermore, the purpose of the enhancement coding in S3 is to strengthen the structural features of local peak regions in the energy spectrum. This enhancement coding includes local structural enhancement, scale transformation, spatial feature compression, and statistical feature embedding.

[0055] Local structure enhancement involves applying gradient and edge enhancement to local regions of the two-dimensional matrix to highlight local features of the energy spectrum peaks; the horizontal gradient is calculated. and vertical gradient :

[0056] ;

[0057] in For a simple convolution operator, * denotes the convolution operation; the local enhancement matrix is ​​represented as:

[0058] ;

[0059] in These are weighting coefficients used to control the reinforcement intensity;

[0060] Scale transformation involves multi-scale processing of the matrix to preserve full-spectrum trends and local peak features. This multi-scale processing includes downsampling, upsampling, and multi-scale stitching.

[0061] Downsampling: ;

[0062] Upsampling: ;

[0063] Multi-scale splicing: ;

[0064] By combining multiple scales, the feature map simultaneously contains detailed information and global trends;

[0065] Spatial feature compression involves pooling the two-dimensional matrix to reduce the computational complexity of subsequent models.

[0066] ;

[0067] in To achieve the pooling kernel size, the compressed matrix still retains key structural information, but reduces redundant channels and spatial resolution;

[0068] Statistical feature embedding involves embedding local means and variances at each spatial location to enhance the statistical information of the feature map.

[0069] ;

[0070] in For The final feature map is formed by concatenating the statistical features and spatial feature matrix within the local neighborhood centered on the feature map.

[0071] ;

[0072] ;

[0073] in For the number of channels, Given the spatially compressed matrix size, this feature map can be directly used as input to convolutional neural networks and other machine learning models, enabling efficient feature learning and analysis.

[0074] Furthermore, S4 involves further extracting multi-scale, deep semantic, and local structural features to construct a high-dimensional spectral feature representation. The feature extraction model includes:

[0075] Convolutional neural network feature extraction utilizes convolutional neural networks to perform multi-layer convolution operations on two-dimensional feature maps to capture local spatial features and multi-scale texture structures. Perform convolution calculations:

[0076] ;

[0077] in:

[0078] For the first Layer input feature map, ;

[0079] The first Layer convolution kernel and bias;

[0080] Indicates the convolution operation;

[0081] For activation functions;

[0082] For the first Layer output feature map;

[0083] To reduce feature dimensionality and enhance local translation invariance, average pooling is employed:

[0084] ;

[0085] in The pooling kernel size;

[0086] Attention mechanism enhancement: To highlight key spectral regions and important channel features, an attention mechanism is introduced to weight the feature map. First, the channel weights are calculated:

[0087] ;

[0088] Then the feature maps are weighted:

[0089] ;

[0090] Next, calculate the spatial location weights:

[0091] ;

[0092] The final weighted enhanced feature map is generated as follows:

[0093] ;

[0094] Image feature extraction operators can further extract texture and structural features from two-dimensional feature maps using image processing operators, wherein the image processing operators include:

[0095] Edge operators: ;

[0096] Local Binary Pattern (LBP): ;

[0097] in when ,otherwise ;

[0098] Multi-level feature fusion integrates features extracted from CNNs, attention mechanisms, and image operators to form a high-dimensional spectral feature representation.

[0099] ;

[0100] in For fusion weights;

[0101] The final high-dimensional spectral features obtained:

[0102] ;

[0103] in, Represents the number of high-dimensional channels. This represents the spatial dimensions after convolution, pooling, and attention processing.

[0104] Furthermore, in step S5, the high-dimensional spectral features obtained in step S4 are used for various gamma-ray spectroscopy-based applications to achieve high-precision analysis of spectral information. These gamma-ray spectroscopy applications include:

[0105] Nuclide identification, utilizing high-dimensional features To determine the nuclide category, a classifier is used. :

[0106] ;

[0107] in: To identify the nuclide category, For a predefined number of nuclides, the classifier is one of a convolutional neural network, a support vector machine, or a random forest;

[0108] Element content inversion: Utilizing high-dimensional features to establish an element content prediction model. :

[0109] ;

[0110] in: For elements The predicted content value, The prediction model used can simultaneously construct multi-output regressions for multiple elements:

[0111] Soil nutrient estimation maps high-dimensional features to soil nutrient indices, which include organic matter, available nitrogen, phosphorus, and potassium.

[0112] ;

[0113] in It is a type of machine learning or deep learning model that obtains the correspondence between energy spectrum features and soil nutrients through training;

[0114] Geological structure analysis, utilizing high-dimensional features Classification and anomaly detection of geological regions:

[0115] ;

[0116] in: For geological structure prediction and identification of anomalous areas.

[0117] On the other hand, the technical solution of the present invention also provides a gamma energy spectrum feature extraction system based on two-dimensional energy spectrum encoding, comprising:

[0118] The energy spectrum data acquisition and preprocessing module is configured to acquire energy spectrum and related metadata, perform channel calibration, standardization, background subtraction, abnormal channel removal, and energy axis unification.

[0119] The two-dimensional encoding module is configured to rearrange the one-dimensional energy spectrum into a two-dimensional matrix, embed local statistical features, perform peak region parameterization encoding, and perform multi-scale mapping.

[0120] The 2D feature map generation module is configured for local structure enhancement, multi-scale feature construction, spatial feature compression, and statistical feature embedding.

[0121] The 2D feature extraction and high-dimensional representation module is configured for convolutional feature extraction, attention feature enhancement, image operator feature extraction, and multi-layer feature fusion.

[0122] Feature output and application module: configured for nuclide identification, element content inversion, soil nutrient estimation, geological structure analysis, and high-precision feature output.

[0123] Compared with the prior art, the present invention has the following advantages:

[0124] 1. Achieving a one-dimensional to two-dimensional structured representation of the energy spectrum with higher information retention: This invention encodes the traditional one-dimensional energy spectrum into two dimensions, enabling the energy spectrum to exhibit local continuity, regional characteristics, and peak aggregation in its spatial structure. This significantly improves the integrity and distinguishability of feature expression. Compared with methods that extract features only from one-dimensional channel sequences, it has a higher utilization rate of structural information.

[0125] 2. By fully integrating local statistical features, peak shape features and regional structural features, the feature dimensions are more comprehensive. In the two-dimensional encoding process, the present invention simultaneously embeds peak position, peak shape, energy segment statistical features and local change trends to form multi-scale and multi-type composite feature expressions, avoiding the information loss problem caused by the excessive reliance on a certain type of feature in the existing technology.

[0126] 3. Significantly enhanced feature extraction capability of two-dimensional feature maps: This invention converts the energy spectrum into a two-dimensional feature map, enabling it to utilize mature image feature extraction techniques such as convolution operators and attention mechanisms to achieve automatic learning of local textures, peak morphology, and energy segment structure of the energy spectrum, thus possessing stronger feature expression capabilities than traditional handmade features.

[0127] 4. It has stronger robustness to noise and measurement instability; the two-dimensional energy spectrum structure can be smoothed, locally enhanced and noise suppressed in the spatial plane, so that high-frequency noise no longer acts completely on a single channel, which significantly improves the stability and robustness of peak identification and feature extraction under low count conditions.

[0128] 5. Applicable to multi-task scenarios, with stronger versatility and scalability; The high-dimensional two-dimensional features extracted by this invention can be widely used for various gamma-ray spectroscopy analysis tasks such as nuclide identification, element content inversion, soil nutrient estimation, and geological structure analysis, realizing the output of a unified feature vector to multiple downstream models, and has good versatility and scalability.

[0129] 6. High feature quality and uniform feature dimensions are conducive to building high-precision models. Thanks to the two-dimensional structure expression and feature fusion mechanism, the features obtained by this invention are significantly better than traditional methods in terms of dimensional consistency, information density and discriminative power, which can directly improve the training efficiency and prediction accuracy of downstream models. Attached Figure Description

[0130] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0131] Figure 1 This is a schematic diagram of a gamma-ray spectrum feature extraction method and system based on two-dimensional energy spectrum encoding according to the present invention. Detailed Implementation

[0132] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.

[0133]

Example 1

[0134] like Figure 1 This invention provides a method for extracting gamma-ray spectral features based on two-dimensional energy spectrum encoding, comprising the following steps:

[0135] S1. Energy spectral data acquisition and preprocessing: In this embodiment, a portable gamma spectrometer was used to perform in-situ measurements on a soil test area. The measurement energy range was 0–3 MeV, with 1024 channels. The acquisition time for each measurement point was 60 seconds. Metadata such as probe height, GPS information, instrument temperature, and integration time were recorded simultaneously.

[0136] The raw energy spectrum obtained can be expressed as:

[0137] ;

[0138] in, For the first Each channel number This is the count value for the corresponding channel.

[0139] The raw energy spectrum collected is first preprocessed using the following steps:

[0140] The energy scale is standardized, and the channel number is mapped to the actual energy value according to the instrument calibration parameters:

[0141] ;

[0142] in, and This is the energy scale factor.

[0143] Background subtraction using the background spectrum obtained from open-field measurements. Channel-level background subtraction is performed on the original energy spectrum:

[0144] ;

[0145] Abnormal channels are removed by statistically detecting the difference in counts between adjacent channels. The condition is met when:

[0146] ;

[0147] When this happens, the corresponding channel is identified as an abnormal channel and removed. and These are the mean and standard deviation of the channel counts, respectively.

[0148] Standardization is achieved by combining total count normalization with Z-score:

[0149] ;

[0150] After preprocessing, the energy spectrum signal exhibits higher stability and comparability across different measurement points.

[0151] S2, Two-dimensional encoding of the energy spectrum: In this embodiment, the 1024-channel energy spectrum is encoded using a two-dimensional method of "channel sequence rearrangement + segment structure encoding," mapping it into a 32×32 two-dimensional matrix. The specific steps are as follows:

[0152] Channel segmentation: Dividing the energy spectrum according to energy ranges. 40 K area, ²³ 8 U-series intervals, ²³²Th-series intervals, and continuous scattering regions.

[0153] Local window encoding: The energy spectrum is encoded into a fixed window length. Divide into, the first Each window is represented as:

[0154] ;

[0155] Structural Feature Attachment: For each window, structural features are calculated and attached, including local mean, local gradient, and two-dimensional mapping.

[0156] Local mean:

[0157] ;

[0158] Local gradient:

[0159] ;

[0160] Peak width and peak position indication parameters.

[0161] Two-dimensional mapping: Constructing a two-dimensional matrix:

[0162] ;

[0163] in As a mapping function that includes the original count and structural features, after two-dimensionalization, the peak regions, flat regions and abrupt change regions of the energy spectrum form a spatially continuous structural distribution in the two-dimensional matrix.

[0164] S3, Two-dimensional feature map enhancement and construction: In order to further amplify the local structural features of the energy spectrum, this embodiment performs the following enhancement operations on the two-dimensional matrix:

[0165] Local structural enhancement: In Calculate local statistics within the neighborhood:

[0166] ;

[0167] ;

[0168] Scale transformation: Constructing a multi-scale matrix using downsampling operators:

[0169] ;

[0170] Spatial compression: Principal component analysis (PCA) of the matrix:

[0171] ;

[0172] Where the projection matrix The cumulative variance contribution rate should be no less than 95%.

[0173] Statistical embedding: Statistical features such as total energy band count and peak area ratio are embedded as additional channels to finally construct a 32×32×4 two-dimensional energy spectrum feature map.

[0174] S4, Two-dimensional feature extraction and high-dimensional representation: This embodiment uses the lightweight convolutional network MobileNet-V3 as the feature extraction model, combined with an attention module to process the two-dimensional feature map. The two-dimensional feature map is mapped into a high-dimensional feature vector through the network:

[0175] ;

[0176] in The feature mapping function consists of convolutional layers, a multi-scale fusion module, an attention module, and global average pooling. The extraction process is as follows: the convolutional layer extracts local texture and peak features, the multi-scale feature fusion module fuses structural information at different resolutions, the attention module enhances the salient regions of nuclide features, and global average pooling obtains a 256-dimensional high-dimensional feature vector. The obtained features have high discriminative power and high information density, and can be adapted to downstream models.

[0177] S5, Feature Output and Application; In this embodiment, the obtained 256-dimensional feature vector is input into: the Softmax classifier nuclide identification model and the random forest regression soil potassium content inversion model. The experimental results show that: the nuclide classification accuracy is improved from 89% of the traditional peak area feature to 96%; the determination coefficient R² of soil available potassium content inversion is improved from 0.63 to 0.78; the results show that the two-dimensional coding feature of the present invention significantly improves the performance of energy spectrum analysis.

[0178]

Example 2

[0179] In a typical embodiment of the present invention, this embodiment discloses a gamma-ray spectral feature extraction system based on two-dimensional energy spectrum encoding, comprising:

[0180] The energy spectrum data acquisition and preprocessing module is configured to acquire energy spectrum and related metadata, perform channel calibration, standardization, background subtraction, abnormal channel removal, and energy axis unification.

[0181] The two-dimensional encoding module is configured to rearrange the one-dimensional energy spectrum into a two-dimensional matrix, embed local statistical features, perform peak region parameterization encoding, and perform multi-scale mapping.

[0182] The 2D feature map generation module is configured for local structure enhancement, multi-scale feature construction, spatial feature compression, and statistical feature embedding.

[0183] The 2D feature extraction and high-dimensional representation module is configured for convolutional feature extraction, attention feature enhancement, image operator feature extraction, and multi-layer feature fusion.

[0184] Feature output and application module: configured for nuclide identification, element content inversion, soil nutrient estimation, geological structure analysis, and high-precision feature output.

[0185] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention can have various modifications and variations; any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for extracting gamma-ray spectrum features based on two-dimensional energy spectrum encoding, characterized in that: Includes the following steps: S1: Energy Spectrum Data Acquisition and Preprocessing: Acquire the raw one-dimensional energy spectrum data collected by the gamma spectrometer and perform preprocessing operations on it. The preprocessing operations include channel calibration, smoothing and noise reduction, background processing, and normalization to ensure that the input data has consistency and comparability. S2: Construction of two-dimensional encoding of one-dimensional energy spectrum: According to the preset energy spectrum mapping rules, the one-dimensional energy spectrum sequence is rearranged, sliced, spliced ​​and convolutionally expanded according to the energy dimension and the structural dimension to generate a two-dimensional energy spectrum matrix with spatial structure, thereby realizing the two-dimensional representation of energy spectrum data. S3: Generation of two-dimensional energy spectrum feature map: Enhanced encoding is performed on the two-dimensional energy spectrum matrix. The enhanced encoding includes local structure enhancement, scale transformation, spatial feature compression, and statistical feature embedding to form a two-dimensional feature map that can be used by deep learning models and machine learning algorithms. S4: Two-dimensional feature extraction and high-dimensional feature representation: Using an adapted feature extraction model, the two-dimensional feature map is processed in multiple layers to extract multi-scale, deep semantic and local structural features, and to construct a high-dimensional spectral feature representation. S5: Feature Output and Application: The extracted high-dimensional features are used in different application scenarios to achieve high-precision analysis of energy spectrum information. The application scenarios include nuclide identification, element content inversion, soil nutrient estimation, and geological structure analysis.

2. The method for extracting gamma-ray spectral features based on two-dimensional energy spectrum encoding according to claim 1, characterized in that: The specific preprocessing steps in S1 are as follows: processing the original one-dimensional energy spectrum data sequence... Perform energy calibration, among which For the first The count value of each channel, The total number of energy channels; the purpose of the energy calibration is to number the energy channels. Convert to energy value The energy calibration methods include linear and quadratic polynomial calibration: Linear energy calibration: ; Secondary energy calibration: ; in These are calibration coefficients obtained by fitting the characteristic peaks of known nuclides; The calibrated energy spectrum is expressed as follows: ; To mitigate the impact of statistical fluctuations on subsequent two-dimensional coding, Savitzky-Golay filtering is used to smooth the original counting sequence. ; in The coefficients are polynomial fitting coefficients, preserving peak shape characteristics. After processing, the denoised sequence is obtained: ; Background radiation effects are subtracted using a polynomial fitting background algorithm: ; After background subtraction: ; The total count of the energy spectrum after background subtraction is normalized: ; After normalization, the final sequence used for two-dimensional encoding is obtained: ; Finally, the energy spectrum is subjected to integrity and outlier detection, including channel missing checks and abnormal peak checks. ; like If the result is not found, it is considered abnormal and interpolation is performed to repair it.

3. The method for extracting gamma-ray spectral features based on two-dimensional energy spectrum encoding according to claim 1, characterized in that: The two-dimensional coding construction methods include two-dimensional coding based on fixed shape rearrangement, two-dimensional coding based on energy segmentation, two-dimensional coding based on convolution unrolling, two-dimensional coding based on multi-scale mapping, and two-dimensional coding based on statistical structure embedding. Two-dimensional encoding based on fixed shape rearrangement will have a length of The energy spectrum sequence is arranged according to a preset number of rows and columns. Perform filling and trimming to meet the following requirements: ; A two-dimensional matrix is ​​represented as: ; This method can maintain the local continuity of the counting sequence and construct two-dimensional spatial adjacency relationships; Two-dimensional coding based on energy segmentation divides the energy spectrum into energy distribution segments. Each energy segment has a length of [number] segments. Construct a two-dimensional array: ; Among them, the first Behavior: ; Two-dimensional coding based on energy segmentation can reflect the structural differences between different energy regions, which is beneficial for capturing the characteristics of nuclide peak regions; Two-dimensional encoding based on convolution unfolding expands a one-dimensional sequence into a two-dimensional matrix using a sliding window method, where the window size is . Step size is Then the two-dimensional matrix is ​​generated by the following formula: ; The number of rows is: ; This method can enhance the ability to capture local peak features and is suitable for use in convolutional networks; Two-dimensional encoding based on multi-scale mapping can simultaneously preserve details and overall trends, constructing a multi-scale two-dimensional representation of the energy spectrum: Original scale: Downsampling scale: Smoothing scale: Concatenate multi-scale sequences into a matrix: ; This method can significantly enhance the robustness and multi-scale representation of features; To enhance the structural integrity of the two-dimensional representation, two-dimensional coding based on statistical structure embedding incorporates local statistical features of each channel into a two-dimensional matrix. These local statistical features include local mean and local variance. Local variance Construct a two-dimensional matrix: ; Finally, one Two-dimensional feature matrix: 。 4. The method for extracting gamma-ray spectral features based on two-dimensional energy spectrum encoding according to claim 1, characterized in that: The enhanced coding in S3 includes the following aspects: Local structure enhancement involves applying gradient and edge enhancement to local regions of the two-dimensional matrix to highlight local features of the energy spectrum peaks; the horizontal gradient is calculated. and vertical gradient : ; in For a simple convolution operator, * denotes the convolution operation; the local enhancement matrix is ​​represented as: ; in These are weighting coefficients used to control the reinforcement intensity; Scale transformation involves multi-scale processing of the matrix to preserve full-spectrum trends and local peak features. This multi-scale processing includes downsampling, upsampling, and multi-scale stitching. Downsampling: ; Upsampling: ; Multi-scale splicing: ; By combining multiple scales, the feature map simultaneously contains detailed information and global trends; Spatial feature compression involves pooling the two-dimensional matrix to reduce the computational complexity of subsequent models. ; in To achieve the pooling kernel size, the compressed matrix still retains key structural information, but reduces redundant channels and spatial resolution; Statistical feature embedding involves embedding local means and variances at each spatial location to enhance the statistical information of the feature map. ; in For The final feature map is formed by concatenating the statistical features and spatial feature matrix within the local neighborhood centered on the feature map. ; ; in For the number of channels, Given the spatially compressed matrix size, this feature map can be directly used as input to convolutional neural networks and other machine learning models, enabling efficient feature learning and analysis.

5. The method for extracting gamma-ray spectral features based on two-dimensional energy spectrum encoding according to claim 1, characterized in that: The feature extraction model described in S4 includes convolutional neural networks, attention networks, and image feature extraction operators; The convolutional neural network feature extraction method utilizes a convolutional neural network to perform multi-layer convolution operations on a two-dimensional feature map to capture local spatial features and multi-scale texture structures. Perform convolution calculations: ; in: For the first Layer input feature map, ; The first Layer convolution kernel and bias; Indicates the convolution operation; For activation functions; For the first Layer output feature map; To reduce feature dimensionality and enhance local translation invariance, average pooling is employed: ; in The pooling kernel size; The attention network mechanism is enhanced to highlight key spectral regions and important channel features. An attention mechanism is introduced to weight the feature map, first calculating the channel weights: ; Then the feature maps are weighted: ; Next, calculate the spatial location weights: ; The final weighted enhanced feature map is generated as follows: ; The image feature extraction operator further uses image processing operators to extract texture and structural features from the two-dimensional feature map, including: Edge operators: ; Local Binary Pattern (LBP): ; in when ,otherwise ; Multi-level feature fusion integrates features extracted from CNNs, attention mechanisms, and image operators to form a high-dimensional spectral feature representation. ; in For fusion weights; The final high-dimensional spectral features obtained: ; in, Represents the number of high-dimensional channels. This represents the spatial dimensions after convolution, pooling, and attention processing.

6. The method for extracting gamma-ray spectral features based on two-dimensional energy spectrum encoding according to claim 1, characterized in that: The gamma spectroscopy applications described in S6 include: Nuclide identification, utilizing high-dimensional features To determine the nuclide category, a classifier is used. : ; in: To identify the nuclide category, To predefine the number of nuclides, the classifier can be a convolutional neural network, a support vector machine, or a random forest; Element content inversion: Utilizing high-dimensional features to establish an element content prediction model. : ; in: For elements The predicted content value, For the prediction model used, multiple output regressions can be constructed simultaneously for multiple elements: Soil nutrient estimation maps high-dimensional features to soil nutrient indices, which include organic matter, available nitrogen, phosphorus, and potassium. ; in It can be used for machine learning and deep learning models, and the correspondence between energy spectrum features and soil nutrients can be obtained through training; Geological structure analysis, utilizing high-dimensional features Classification and anomaly detection of geological regions: ; in: For geological structure prediction and identification of anomalous areas.

7. A gamma-ray spectrum feature extraction system based on two-dimensional energy spectrum encoding, characterized in that: include: The energy spectrum data acquisition and preprocessing module is configured to acquire energy spectrum and related metadata, perform channel calibration, standardization, background subtraction, abnormal channel removal, and energy axis unification. The two-dimensional encoding module is configured to rearrange the one-dimensional energy spectrum into a two-dimensional matrix, embed local statistical features, perform peak region parameterization encoding, and perform multi-scale mapping. The 2D feature map generation module is configured for local structure enhancement, multi-scale feature construction, spatial feature compression, and statistical feature embedding. The 2D feature extraction and high-dimensional representation module is configured for convolutional feature extraction, attention feature enhancement, image operator feature extraction, and multi-layer feature fusion. Feature output and application module: configured for nuclide identification, element content inversion, soil nutrient estimation, geological structure analysis, and high-precision feature output.