Germanium spectrometer energy spectrum data adaptive optimization method, device and equipment and storage medium

By combining wavelet transform, Kalman filtering, least squares method, and particle swarm optimization algorithm, the energy spectrum data of germanium spectrometer is adaptively optimized, solving the problems of baseline drift and spectral peak distortion, and realizing high-precision energy spectrum analysis.

CN120974160APending Publication Date: 2025-11-18超滑科技(佛山)有限责任公司
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510982285.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-16
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

In the analysis of energy spectrum data in complex environments, germanium spectrometers exhibit irregular baseline drift that is difficult to adapt dynamically, leading to peak position shifts and peak shape distortions, which affect the accuracy of the analysis.

Method used

A method combining wavelet transform, least squares method, Kalman filtering, median filtering and particle swarm optimization algorithm is used to adaptively optimize the energy spectrum data processing flow, including feature extraction, baseline fitting and iterative optimization.

Benefits of technology

It effectively separates low-frequency baselines from high-frequency peak signals, reduces baseline misjudgment rate, enhances anti-interference capability, and ensures the accuracy of spectral peak position and morphological integrity, making it suitable for real-time analysis in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120974160A_ABST
    Figure CN120974160A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of energy spectrum data processing, in particular to a germanium spectrometer energy spectrum data adaptive optimization method and device, equipment and a storage medium. Performing feature extraction on the historical energy spectrum data set based on a wavelet transform method and a least square method; constructing a baseline initial fitting curve according to the corrected low-frequency coefficient features and the reconstructed high-frequency coefficient features; optimizing the baseline initial fitting curve based on a difference operation method and a preset Kalman filtering algorithm; carrying out median filtering processing on the real-time energy spectrum data set based on a median filtering method and a preset sliding window length; performing iterative optimization on the median filtering data set based on a preset particle swarm optimization algorithm and the baseline optimization fitting curve; according to the scheme, multiple algorithms are fused, baseline features are deeply mined, high and low frequency signals are separated, drift is corrected, spectral peak features are reserved, accuracy is improved, and the method is suitable for complex scenes and assists high-precision application of the germanium spectrometer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of energy spectrum data processing technology, specifically to an adaptive optimization method, apparatus, equipment, and storage medium for germanium spectrometer energy spectrum data. Background Technology

[0002] In practical applications, germanium spectrometers are often affected by environmental factors such as strong electromagnetic interference, temperature fluctuations, and mechanical vibrations. These interferences can cause irregular baseline drift in energy spectrum data, leading to peak position shifts and peak shape distortions, severely affecting the accuracy of energy spectrum analysis. For example, in environmental monitoring around nuclear power plants, interference from electromagnetic equipment can cause baseline fluctuations to exceed the normal range by several times. Large data fluctuations can lead to baseline misjudgment: energy spectrum data itself has strong randomness and volatility, especially at low count rates, where statistical fluctuations are significant. Traditional methods struggle to distinguish between fluctuations caused by real signals and noise, easily misjudging noise as baseline changes, leading to incorrect baseline adjustments and resulting in the loss or distortion of spectral peak information. Baseline drift lacks dynamic adaptability: traditional baseline recovery methods often employ fixed-parameter filtering or fitting algorithms. These methods cannot dynamically adjust processing strategies based on real-time changes in energy spectrum data. When baseline drift trends are complex and variable, the recovery effect is poor, failing to meet the needs of high-precision energy spectrum analysis. Summary of the Invention

[0003] To address the shortcomings of the prior art, this invention proposes an adaptive optimization method for germanium spectrometer energy spectrum data.

[0004] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:

[0005] An adaptive optimization method for germanium spectrometer energy spectrum data includes: acquiring historical energy spectrum datasets; extracting features from the historical energy spectrum datasets using wavelet transform and least squares methods to obtain corrected low-frequency coefficient features and reconstructed high-frequency coefficient features; constructing an initial baseline fitting curve based on the corrected low-frequency coefficient features and reconstructed high-frequency coefficient features; optimizing the initial baseline fitting curve using a difference operation method and a preset Kalman filter algorithm to obtain an optimized baseline fitting curve; acquiring real-time energy spectrum datasets; performing median filtering on the real-time energy spectrum datasets using a median filtering method and a preset sliding window length to obtain a median-filtered dataset; and iteratively optimizing the median-filtered dataset using a preset particle swarm optimization algorithm and the optimized baseline fitting curve to obtain a high-quality energy spectrum dataset.

[0006] Furthermore, the feature extraction of the historical energy spectrum dataset based on wavelet transform and least squares methods to obtain corrected low-frequency coefficient features and reconstructed high-frequency coefficient features includes: performing frequency domain analysis on the historical energy spectrum dataset based on wavelet transform to obtain scaling and translation factors; extracting features from the historical energy spectrum dataset based on the scaling and translation factors to obtain low-frequency and high-frequency coefficient features; analyzing the historical energy spectrum dataset based on the low-frequency coefficient features to obtain the low-frequency data length; calculating partial derivatives of the low-frequency coefficient features based on least squares and the low-frequency data length to obtain a fitting coefficient dataset; performing polynomial fitting on the low-frequency coefficient features based on a preset baseline fitting function, the fitting coefficient dataset, and a preset polynomial order range to obtain corrected low-frequency coefficient features; and reconstructing the high-frequency coefficient features based on the fitting coefficient dataset to obtain reconstructed high-frequency coefficient features.

[0007] Furthermore, the step of reconstructing the high-frequency coefficient features based on the fitted coefficient dataset to obtain the reconstructed high-frequency coefficient features includes: constructing a design matrix based on a preset objective function and the fitted coefficient dataset; obtaining coefficient vectors and data vectors from the design matrix; decomposing the design matrix to obtain an orthogonal matrix and an upper triangular matrix; performing back-substitution on the coefficient vectors based on the orthogonal matrix to obtain the first transpose coefficients; performing back-substitution on the data vectors based on the upper triangular matrix to obtain the second transpose coefficients; and reconstructing the high-frequency coefficient features based on the first and second transpose coefficients to obtain the reconstructed high-frequency coefficient features.

[0008] Furthermore, the optimization of the initial baseline fitting curve based on the difference operation method and the preset Kalman filter algorithm to obtain the optimized baseline fitting curve includes: performing trend analysis on the initial baseline fitting curve based on the difference operation method and the preset baseline change rate to obtain baseline drift characteristics and baseline change rate; analyzing the baseline change rate and baseline drift characteristics to obtain process noise and observation noise; constructing a state equation based on the process noise; constructing an observation equation based on the observation noise; recursively estimating the state equation and observation equation based on the Kalman filter algorithm and the preset adjustment coefficient to obtain the baseline correction value; and optimizing the initial baseline fitting curve based on the baseline correction value and the preset dynamic weighting factor to obtain the optimized baseline fitting curve.

[0009] Furthermore, the median filtering process for the real-time energy spectrum dataset based on the median filtering method and a preset sliding window length to obtain a median-filtered dataset includes: mirror-filling the real-time energy spectrum dataset based on a preset odd-length filtering window and a preset traversal algorithm to obtain a mirror-filled dataset; sorting the mirror-filled dataset according to a preset sorting algorithm to obtain a sorted dataset; and performing median filtering on the sorted dataset based on the median filtering method and the sliding window length to obtain a median-filtered dataset.

[0010] Furthermore, the iterative optimization of the median filter dataset based on a preset particle swarm optimization algorithm and a baseline optimization fitting curve to obtain a high-quality energy spectrum dataset includes: dividing the median filter dataset into intervals to obtain multiple energy spectrum data intervals; predicting multiple energy spectrum data intervals based on the baseline optimization fitting curve to obtain multiple interval baseline offsets; analyzing the median filter dataset based on a preset fitting residual function to obtain fitting residual analysis results; and iteratively optimizing the median filter dataset based on the preset particle swarm optimization algorithm, multiple interval baseline offsets, and fitting residual analysis results to obtain a high-quality energy spectrum dataset.

[0011] Furthermore, the analysis of the median filter dataset based on the preset fitting residual function to obtain the fitting residual analysis results includes: acquiring various sensor characteristic parameters, real-time environmental parameters, and historical baseline drift labels; constructing an interference feature library based on various sensor characteristic parameters, real-time environmental parameters, and historical baseline drift labels; performing fluctuation analysis on the median filter dataset to obtain the degree of fluctuation in the energy spectrum data; and analyzing the degree of fluctuation in the energy spectrum data based on the fitting residual function and the interference feature library to obtain the fitting residual analysis results.

[0012] Furthermore, the adaptive optimization device for germanium spectrometer energy spectrum data includes: a historical data acquisition module for acquiring historical energy spectrum datasets; a feature extraction module for extracting features from the historical energy spectrum dataset based on wavelet transform and least squares methods to obtain corrected low-frequency coefficient features and reconstructed high-frequency coefficient features; a curve construction module for constructing an initial baseline fitting curve based on the corrected low-frequency coefficient features and reconstructed high-frequency coefficient features; a curve optimization module for optimizing the initial baseline fitting curve based on a difference operation method and a preset Kalman filter algorithm to obtain an optimized baseline fitting curve; a real-time data acquisition module for acquiring real-time energy spectrum datasets; a filtering processing module for performing median filtering on the real-time energy spectrum dataset based on a median filtering method and a preset sliding window length to obtain a median filtered dataset; and an iterative optimization module for iteratively optimizing the median filtered dataset based on a preset particle swarm optimization algorithm and the optimized baseline fitting curve to obtain a high-quality energy spectrum dataset.

[0013] Furthermore, the germanium spectrometer energy spectrum data adaptive optimization device includes: a memory and at least one processor, wherein the memory stores instructions; at least one processor invokes the instructions in the memory to cause the germanium spectrometer energy spectrum data adaptive optimization device to perform the various steps of the germanium spectrometer energy spectrum data adaptive optimization method as described above.

[0014] Furthermore, a computer-readable storage medium stores instructions that, when executed by a processor, implement the steps of the adaptive optimization method for germanium spectrometer energy spectrum data as described above.

[0015] The beneficial effects of the adaptive optimization method for germanium spectrometer energy spectrum data of the present invention are as follows:

[0016] In terms of algorithm architecture, the multi-resolution analysis capability of wavelet transform and the fitting characteristics of least squares method are integrated to achieve in-depth mining of baseline features in historical energy spectrum data, effectively separating low-frequency baselines from high-frequency peak signals and reducing the baseline misjudgment rate caused by environmental interference. The introduction of Kalman filtering algorithm, based on the system dynamic Kalman model, performs real-time prediction and correction of the baseline, enabling it to adapt to irregular drift in complex environments and enhancing anti-interference capability. For real-time data processing, the combined application of median filtering and particle swarm optimization algorithms not only preserves the original characteristics of the energy spectrum peaks and reduces peak position shifts and peak shape distortion, but also further improves the accuracy of baseline optimization of energy spectrum data through optimization search. This scheme has dynamic adaptability and can automatically adjust the processing strategy according to real-time data changes, making it suitable for various complex scenarios and meeting real-time analysis requirements. It is of great significance for promoting the high-precision application of germanium spectrometers in nuclear detection, environmental monitoring and other fields. Attached Figure Description

[0017] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:

[0018] Figure 1 This is a first flowchart of the adaptive optimization method for germanium spectrometer energy spectrum data provided in an embodiment of the present invention;

[0019] Figure 2 This is a second flowchart of the adaptive optimization method for germanium spectrometer energy spectrum data provided in an embodiment of the present invention;

[0020] Figure 3 This is a third flowchart of the adaptive optimization method for germanium spectrometer energy spectrum data provided in the embodiments of the present invention;

[0021] Figure 4 This is a fourth flowchart of the adaptive optimization method for germanium spectrometer energy spectrum data provided in the embodiments of the present invention;

[0022] Figure 5 This is the fifth flowchart of the adaptive optimization method for germanium spectrometer energy spectrum data provided in the embodiments of the present invention;

[0023] Figure 6 This is the sixth flowchart of the adaptive optimization method for germanium spectrometer energy spectrum data provided in the embodiments of the present invention;

[0024] Figure 7 This is the seventh flowchart of the adaptive optimization method for germanium spectrometer energy spectrum data provided in the embodiments of the present invention;

[0025] Figure 8 This is a schematic diagram of the structure of the adaptive optimization device for germanium spectrometer energy spectrum data provided in an embodiment of the present invention;

[0026] Figure 9 This is a schematic diagram of the structure of the adaptive optimization device for germanium spectrometer energy spectrum data provided in an embodiment of the present invention. Detailed Implementation

[0027] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0028] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” or “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0029] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 An embodiment of the adaptive optimization method for germanium spectrometer energy spectrum data in this invention includes:

[0030] 101. Obtain historical energy spectrum dataset;

[0031] 102. Based on wavelet transform and least squares methods, feature extraction is performed on historical energy spectrum datasets to obtain corrected low-frequency coefficient features and reconstructed high-frequency coefficient features;

[0032] In this embodiment, wavelet transform can decompose energy spectrum data into different frequency domain scales, effectively separating low-frequency baseline signals from high-frequency peak signals; the least squares method is used to fit the low-frequency signals, further extracting baseline features and reducing baseline misjudgment caused by environmental interference.

[0033] 103. Based on the modified low-frequency coefficient characteristics and reconstructed high-frequency coefficient characteristics, the initial baseline fitting curve is constructed;

[0034] 104. The initial baseline fitting curve is optimized based on the difference operation method and the preset Kalman filter algorithm to obtain the optimized baseline fitting curve;

[0035] In this embodiment, the Kalman filter algorithm can dynamically predict and correct the baseline based on the dynamic changes and noise characteristics of the system, adapt to the irregular drift of the baseline in complex environments, and improve the resistance of the baseline fitting curve to environmental interference.

[0036] 105. Obtain real-time energy spectrum dataset;

[0037] 106. Median filtering is performed on the real-time energy spectrum dataset based on the median filtering method and the preset sliding window length to obtain the median filtered dataset;

[0038] 107. Based on the preset particle swarm optimization algorithm and baseline optimization fitting curve, the median filter dataset is iteratively optimized to obtain a high-quality energy spectrum dataset;

[0039] In this embodiment, median filtering can effectively remove impulse noise from the energy spectrum data, retain peak edge information, avoid excessive smoothing, and reduce random fluctuations in the data. By simulating bird flock foraging behavior through particle swarm optimization algorithm, processing real-time data, and searching for the optimal solution in the data space, the accuracy of baseline optimization is further improved, providing a more reliable high-quality energy spectrum dataset with baseline optimization for energy spectrum analysis.

[0040] In this embodiment, the algorithm architecture integrates the multi-resolution analysis capability of wavelet transform with the fitting characteristics of least squares method, enabling in-depth mining of baseline features in historical energy spectrum data. This effectively separates low-frequency baselines from high-frequency peak signals, reducing the baseline misjudgment rate caused by environmental interference. The introduction of the Kalman filter algorithm, based on the system's dynamic Kalman model, performs real-time prediction and correction of the baseline, enabling it to adapt to irregular drifts in complex environments and enhancing its anti-interference capability. For real-time data processing, the combined application of median filtering and particle swarm optimization algorithms not only preserves the original characteristics of the energy spectrum peaks and reduces peak position shifts and peak shape distortions, but also further improves the accuracy of baseline optimization for energy spectrum data through optimization search. This solution has dynamic adaptability and can automatically adjust the processing strategy according to real-time data changes. It is suitable for various complex scenarios, meets the needs of real-time analysis, and is of great significance for promoting the high-precision application of germanium spectrometers in fields such as nuclear detection and environmental monitoring.

[0041] Please see Figure 2 The second embodiment of the adaptive optimization method for germanium spectrometer energy spectrum data in this invention includes:

[0042] 201. Frequency domain analysis of historical energy spectrum datasets based on wavelet transform method to obtain scaling factor and translation factor;

[0043] 202. Extract features from the historical energy spectrum dataset based on the scaling factor and translation factor to obtain low-frequency coefficient features and high-frequency coefficient features;

[0044] In this embodiment, by selecting appropriate wavelet basis functions (such as Daubechies or Symlet) to perform multi-resolution decomposition on the historical energy spectrum dataset, the original signal is decomposed into low-frequency approximation coefficients (reflecting baseline trends) and high-frequency detail coefficients (containing peak signals and noise) at different scales. The scale factor controls the bandwidth of the decomposition, and the translation factor determines the time positioning accuracy.

[0045] 203. Analyze the historical energy spectrum dataset based on the characteristics of low-frequency coefficients to obtain the length of low-frequency data;

[0046] In this embodiment, the complexity of baseline changes can be quantified by statistically analyzing the data length of low-frequency coefficient features. A longer data length indicates a slowly changing baseline trend, while a shorter data length corresponds to a rapidly fluctuating baseline.

[0047] 204. Based on the least squares method and the length of low-frequency data, partial derivatives of the low-frequency coefficient features are calculated to obtain the fitted coefficient dataset;

[0048] 205. Based on the preset baseline fitting function, fitting coefficient dataset and preset polynomial order range, perform polynomial fitting on the low-frequency coefficient features to obtain the corrected low-frequency coefficient features.

[0049] In this embodiment, the least squares method is used to fit the low-frequency coefficients, and the fitting coefficients are calculated by taking partial derivatives. This method can find the optimal polynomial coefficients in the presence of noise, so as to minimize the error between the fitted curve and the actual baseline.

[0050] In this embodiment, the baseline fitting function is in polynomial form:

[0051] f(t) = a0 + a1t + a2t 2 +...+a n t n , where n is the order of the polynomial, which is determined based on the complexity of the baseline drift and can be updated by the dimension of the fitted coefficient dataset;

[0052] For the low-frequency coefficient feature b = [b1, b2, ... b M By performing partial derivative calculations, we can obtain a = [a0, a1, ... a n ], t corresponds to the i-th low-frequency coefficient b i The serial number (e.g., t) i , which represents the position of the i-th data point, is used to describe the trend of the baseline as the data points change sequentially;

[0053] 206. Based on the fitted coefficient dataset, reconstruct the high-frequency coefficient features to obtain the reconstructed high-frequency coefficient features;

[0054] In this embodiment, the high-frequency coefficients are reconstructed using the coefficient information obtained during the fitting process. This step ensures that the position and intensity information of the energy spectrum peaks are accurately preserved after baseline correction.

[0055] In this embodiment, during the frequency domain decomposition stage, the multi-resolution characteristics of wavelet transform enable the separation of baseline and peak signals. Dynamic adjustment of the scaling and translation factors ensures the analysis of different frequency components of the energy spectrum data. Baseline complexity is quantified by low-frequency data length and optimized using partial derivatives of the least squares method, effectively reducing baseline fitting errors. A dynamic polynomial order selection mechanism further enhances the algorithm's adaptability, automatically adjusting the fitting strategy based on baseline variation characteristics. In the signal reconstruction stage, high-frequency feature reconstruction technology based on fitting coefficients reduces baseline drift while fully preserving peak signal characteristics, improving the energy spectrum resolution of the energy spectrum data. This scheme can control baseline drift errors in real time, providing solid technical support for high-quality optimization and quantitative analysis of radionuclide data.

[0056] Please see Figure 3The third embodiment of the adaptive optimization method for germanium spectrometer energy spectrum data in this invention includes:

[0057] 301. The design matrix is ​​constructed based on the preset objective function and the fitting coefficient dataset;

[0058] In this embodiment, the objective function (such as the ridge regression objective function, weighted least squares objective function, etc.) defines the optimization direction of the fitting coefficients, and the fitting coefficient dataset is the core parameter to be solved;

[0059] 302. Obtain the coefficient vector and data vector from the design matrix;

[0060] In this embodiment, by arranging matrix elements, the requirements for polynomial fitting, baseline correction, etc., are transformed into a mathematical structure that can be solved using linear algebra tools.

[0061] 303. Decompose the design matrix to obtain an orthogonal matrix and an upper triangular matrix;

[0062] In this embodiment, the orthogonality of the orthogonal matrix and the special structure of the upper triangular matrix facilitate the subsequent back-substitution solution, while also improving the numerical stability of the calculation and avoiding numerical ill-conditioned problems that may occur when solving directly.

[0063] 304. Substitute the coefficient vector back into the orthogonal matrix to obtain the first transpose coefficient;

[0064] 305. Substitute the data vector back into the upper triangular matrix to obtain the second transpose coefficient;

[0065] 306. Reconstruct the high-frequency coefficient features based on the first transpose coefficient and the second transpose coefficient to obtain the reconstructed high-frequency coefficient features;

[0066] In this embodiment, these transpose coefficients contain optimization information for data features during the fitting process. By applying them to high-frequency coefficient features, the influence of baseline fitting on peak signals can be corrected, the true position and intensity of energy spectrum peaks can be restored, and high-quality reconstructed high-frequency coefficient features can be obtained, providing an accurate data basis for subsequent energy spectrum analysis.

[0067] In this embodiment, the fitted coefficient dataset is transformed into a design matrix with a standard linear algebra structure through an objective function. The design matrix is ​​then decomposed to obtain orthogonal and upper triangular matrices. Their special properties are used to simplify the back-substitution solution process, avoid numerical ill-conditioning, and improve the overall computational stability and efficiency. The transpose coefficients obtained contain data optimization information, which can be used to correct the influence of baseline fitting on peak signals and restore the true shape of energy spectrum peaks when reconstructing high-frequency coefficient features. This provides reliable data support for nuclide identification and activity calculation, and demonstrates strong adaptability and practicality in energy spectrum analysis under complex environments.

[0068] Please see Figure 4 The fourth embodiment of the adaptive optimization method for germanium spectrometer energy spectrum data in this invention includes:

[0069] 401. Based on the difference operation method and the preset baseline change rate, perform trend analysis on the initial baseline fitting curve to obtain baseline drift characteristics and baseline change rate;

[0070] In this embodiment, the initial baseline fitting curve is processed using a difference operation method. By calculating the difference between adjacent data points, the degree of change of the baseline at different times is quantified, thereby obtaining the baseline change rate. For example, for a discrete baseline curve data sequence g(t), the first-order difference...

[0071] Δg(t) = g(t) - g(t-1) reflects the change in the baseline between adjacent time points. Combined with the preset baseline change rate threshold, the speed trend of baseline change can be determined. By comprehensively analyzing the baseline change rate and curve shape, baseline drift characteristics such as drift direction (rising, falling or fluctuating), drift amplitude, and change period can be extracted. These characteristics together constitute the baseline state vector, providing key information for subsequent modeling.

[0072] 402. Analyze the baseline change rate and baseline drift characteristics to obtain process noise and observation noise;

[0073] In this embodiment, the irregular changes in the baseline of the energy spectrum data caused by environmental interference (such as electromagnetic and temperature fluctuations) can be regarded as process noise; the measurement error or data acquisition error of the detector itself belongs to observation noise.

[0074] 403. The state equations are constructed based on the process noise;

[0075] 404. The observation equation is constructed based on the observation noise;

[0076] In this embodiment, the state equation can be expressed as x(t) = Ax(t) + ω(t), and the observation equation is z(t) = Hx(t) + v(t), where x(t) is the preset baseline state vector, A is the state transition matrix, ω(t) is the process noise, z(t) is the observed data, H is the observation matrix, and v(t) is the observation noise. The state equation is used to describe the dynamic change of the baseline state over time, reflecting the internal evolution mechanism of the system. The observation equation is used to establish the connection between the actual observed data and the true baseline state, reflecting the noise influence in the measurement process.

[0077] 405. Based on the Kalman filter algorithm and preset adjustment coefficients, the state equation and observation equation are recursively estimated to obtain the baseline correction value;

[0078] In this embodiment, at each time step, the current state is first predicted based on the state of the previous moment (time update), and then the predicted state is corrected (measurement update) and the adjustment coefficient is adjusted by combining the current observation data. By continuously recursively estimating, the true state of the baseline is gradually approximated, and the baseline correction value can compensate for the baseline drift error, smooth the curve fluctuation, and finally obtain the baseline optimization fitting curve, which provides a reliable baseline reference for the accurate optimization of energy spectrum data.

[0079] 406. Optimize the initial baseline fitting curve based on the baseline correction value to obtain the optimized baseline fitting curve;

[0080] In this embodiment, the baseline change rate is quantified and the baseline trend is determined based on differential operations. The system extracts drift direction features and generates process noise and observation noise to provide input for subsequent modeling. In terms of noise processing, process noise caused by environmental interference and observation noise caused by measurement errors are scientifically distinguished. A complete baseline change model is constructed through state equations and observation equations to clearly characterize the dynamic evolution mechanism of the baseline and the impact of measurement errors. By using the Kalman filter algorithm in conjunction with adjustment coefficients and iterative optimization through time updates and measurement updates, the baseline prediction state is corrected in real time, effectively suppressing noise interference and making the baseline correction value fit the real change trend. Finally, the optimized baseline fitting curve can reduce baseline drift error, smooth data fluctuations, and provide reliable support for energy spectrum analysis such as nuclide identification and activity calculation. It exhibits strong anti-interference ability and dynamic adaptability in complex and ever-changing detection environments.

[0081] Please see Figure 5 The fifth embodiment of the adaptive optimization method for germanium spectrometer energy spectrum data in this invention includes:

[0082] 501. Based on a preset odd-length filtering window and a preset traversal algorithm, the real-time energy spectrum dataset is mirror-filled to obtain a mirror-filled dataset.

[0083] In this embodiment, an odd-length filtering window is a fundamental requirement for median filtering. An odd length ensures that there is a clear intermediate value within the window, which facilitates median filtering. The data at both ends of the dataset is expanded in a mirror-symmetric manner. For example, if the data sequence at the beginning of the dataset is ([a,b,c]), it can be expanded to ([c,b,a,a,b,c]) after mirror filling. The purpose of this is to ensure that the boundary data is also within the complete filtering window when performing boundary data filtering, thereby avoiding filtering distortion caused by boundary effects.

[0084] 502. Sort the mirror-filled dataset according to the preset sorting algorithm to obtain a sorted dataset;

[0085] In this embodiment, the dataset after mirror filling is sorted according to a sorting algorithm (such as quicksort, mergesort, etc.). The essence of median filtering is to select the median value of the data within the window to replace the original data points. Only after sorting can the median value be determined quickly and accurately, ensuring the effectiveness of the filtering operation.

[0086] 503. Median filtering is applied to the sorted dataset based on the median filtering method and the sliding window length to obtain a median-filtered dataset;

[0087] In this embodiment, median filtering can effectively remove impulse noise (such as randomly occurring spike signals) in energy spectrum data, while better preserving the edge information of spectral peaks. This is because median filtering is based on the sorting characteristics of the data and does not perform average processing on the data like mean filtering, thus avoiding blurring and distortion of spectral peak details.

[0088] In this embodiment, an odd-length filtering window combined with mirror-filling technology is used to effectively solve the boundary effect problem of median filtering, ensuring the integrity and accuracy of boundary data during filtering. A sorting algorithm is used to sort the data, providing a reliable basis for calculating intermediate values ​​for median filtering and ensuring the effectiveness of the filtering operation. The median filtering method can effectively remove impulse noise from the energy spectrum data while preserving peak edge information to the maximum extent, avoiding signal distortion. The implementation of this scheme provides a high-quality data foundation for energy spectrum analysis, improving the accuracy and reliability of nuclide identification and quantitative analysis.

[0089] Please see Figure 6 The sixth embodiment of the adaptive optimization method for germanium spectrometer energy spectrum data in this invention includes:

[0090] 601. Divide the median filter dataset into intervals to obtain multiple energy spectrum data intervals;

[0091] In this embodiment, the median filter dataset is divided into intervals, that is, the continuous energy spectrum data is divided into multiple sub-intervals according to certain rules. The division method can be based on energy range, number of data points, etc., for example, dividing into intervals of 100 data points or dividing into intervals of 50keV for each energy channel of the energy spectrum. By dividing into intervals, the overall data is decomposed into multiple local units, which facilitates subsequent fine processing based on the characteristics of different intervals.

[0092] 602. Based on the baseline optimization fitting curve, predict multiple energy spectrum data intervals to obtain the baseline offset of multiple intervals;

[0093] In this embodiment, the baseline optimization fitting curve reflects the overall baseline change trend of the energy spectrum data. By applying this curve to each interval, the offset of the data in each interval relative to the baseline is calculated. For example, in a certain interval, by comparing the values ​​of the actual data points with the corresponding positions of the baseline curve, the baseline offset of that interval is obtained, thereby quantifying the degree of baseline deviation in each interval and providing direction for subsequent optimization.

[0094] 603. Analyze the median filtered dataset based on the preset fitting residual function to obtain the fitting residual analysis results;

[0095] 604. Based on the preset particle swarm optimization algorithm, multiple interval baseline offsets and fitting residual analysis results, the median filter dataset is iteratively optimized to obtain a high-quality energy spectrum dataset;

[0096] In this embodiment, the particle swarm optimization algorithm simulates the foraging behavior of bird flocks, treating each particle as a set of possible solutions (such as different combinations of baseline adjustment parameters). By continuously updating the position and velocity of the particles, the algorithm searches for the optimal solution in the solution space. In each iteration, the quality of the solution corresponding to each particle is evaluated based on the interval baseline offset and the results of the fitting residual analysis, guiding the particles to move towards a better solution. After multiple iterations, a set of optimal parameters is finally obtained, which is used to optimize the median filter dataset to obtain a high-quality energy spectrum dataset.

[0097] In this embodiment, the median filter dataset is flexibly divided into intervals, decomposing the overall data into multiple local units and performing refined processing based on the characteristics of different intervals. The baseline offset of each interval is predicted using the baseline optimization fitting curve, quantifying the degree of baseline deviation and pointing the way for optimization. The data fitting effect is analyzed by combining the fitting residual function to clarify the optimization target. On this basis, the particle swarm optimization algorithm is used to simulate the bird flock foraging mechanism, dynamically search for the optimal solution, and iteratively adjust the parameters to achieve deep optimization of the energy spectrum data. This scheme can effectively correct baseline deviation and reduce data error, providing a high-quality data foundation for nuclide identification, activity calculation and other analyses, and exhibits strong adaptability and efficiency in complex environments.

[0098] Please see Figure 7 The seventh embodiment of the adaptive optimization method for germanium spectrometer energy spectrum data in this invention includes:

[0099] 701. Obtain various sensor characteristic parameters, real-time environmental parameters, and historical baseline drift tags;

[0100] 702. An interference feature library is constructed based on the characteristic parameters of various sensors, real-time environmental parameters, and historical baseline drift labels;

[0101] In this embodiment, various sensor characteristic parameters (such as the energy resolution and sensitivity of the germanium spectrometer detector, etc.), real-time environmental parameters (environmental variables such as temperature, humidity, and electromagnetic intensity), and historical baseline drift tags (marking the type, degree, and corresponding environmental conditions of baseline drift in historical data) are included. These data cover hardware performance, environmental interference factors, and historical baseline change information, providing a comprehensive data foundation for the construction of the interference database and rich historical interference experience for energy spectrum data processing algorithms.

[0102] 703. Perform fluctuation analysis on the median filtered dataset to obtain the degree of fluctuation in the energy spectrum data;

[0103] 704. Analyze the fluctuation of energy spectrum data based on the fitting residual function and the interference feature library to obtain the fitting residual analysis results;

[0104] In this embodiment, the fitting residual analysis results obtained in this way can not only determine whether the data fluctuations are caused by known interference factors, but also analyze the comprehensive impact of different interference factors on data fluctuations and fitting residuals, and finally obtain comprehensive fitting residual analysis results, clarifying the source of data error and potential interference mechanisms.

[0105] In this embodiment, an interference feature library is constructed by integrating sensor characteristics, real-time environmental parameters, and historical baseline drift labels, accumulating rich experience in the correlation between hardware performance, environmental interference, and baseline changes. Fluctuation analysis is performed on the median filter dataset, and combined with the fitting residual function and in-depth analysis of the interference feature library, it can not only pinpoint data fluctuations caused by known interference factors, but also quantify the comprehensive influence of multiple factors and locate the root cause of data errors. This solution effectively improves the anti-interference capability of energy spectrum data processing, provides a reliable basis for subsequent nuclide analysis, baseline optimization, etc., and demonstrates strong adaptability and reliability in complex and ever-changing detection environments.

[0106] The adaptive optimization method for germanium spectrometer energy spectrum data in the embodiments of the present invention has been described above. The adaptive optimization device for germanium spectrometer energy spectrum data in the embodiments of the present invention is described below. Please refer to [link to relevant documentation]. Figure 8One embodiment of the adaptive optimization device for germanium spectrometer energy spectrum data in this invention includes:

[0107] Historical data acquisition module 1 is used to acquire historical energy spectrum datasets;

[0108] Feature extraction module 2 is used to extract features from historical energy spectrum datasets based on wavelet transform and least squares methods to obtain corrected low-frequency coefficient features and reconstructed high-frequency coefficient features;

[0109] Curve construction module 3 is used to construct the initial baseline fitting curve based on the modified low-frequency coefficient features and reconstructed high-frequency coefficient features;

[0110] Curve optimization module 4 is used to optimize the initial baseline fitting curve based on the difference operation method and the preset Kalman filter algorithm to obtain the optimized baseline fitting curve.

[0111] Real-time data acquisition module 5 is used to acquire real-time energy spectrum datasets;

[0112] The filtering module 6 is used to perform median filtering on the real-time energy spectrum dataset based on the median filtering method and the preset sliding window length to obtain the median filtered dataset.

[0113] Iterative optimization module 7 is used to iteratively optimize the median filter dataset based on a preset particle swarm optimization algorithm and baseline optimization fitting curve to obtain a high-quality energy spectrum dataset.

[0114] In terms of algorithm architecture, the multi-resolution analysis capability of wavelet transform and the fitting characteristics of least squares method are integrated to achieve in-depth mining of baseline features in historical energy spectrum data, effectively separating low-frequency baselines from high-frequency peak signals and reducing the baseline misjudgment rate caused by environmental interference. The introduction of Kalman filtering algorithm, based on the system dynamic Kalman model, performs real-time prediction and correction of the baseline, enabling it to adapt to irregular drift in complex environments and enhancing anti-interference capability. For real-time data processing, the combined application of median filtering and particle swarm optimization algorithms not only preserves the original characteristics of the energy spectrum peaks and reduces peak position shifts and peak shape distortion, but also further improves the accuracy of baseline optimization of energy spectrum data through optimization search. This scheme has dynamic adaptability and can automatically adjust the processing strategy according to real-time data changes, making it suitable for various complex scenarios and meeting real-time analysis requirements. It is of great significance for promoting the high-precision application of germanium spectrometers in nuclear detection, environmental monitoring and other fields.

[0115] Figure 9This is a schematic diagram of the structure of the adaptive optimization device for germanium spectrometer energy spectrum data provided in this embodiment of the invention. The adaptive optimization device 900 can vary significantly due to different configurations or performance characteristics. It may include one or more central processing units (CPUs) 910 (e.g., one or more processors) and a memory 920, and one or more media 930 (e.g., one or more mass storage devices) storing application programs 933 or data 932. The memory 920 and media 930 can be temporary or persistent storage. The program stored in the media 930 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the adaptive optimization device 900. Furthermore, the processor 910 may be configured to communicate with the media 930 and execute the series of instruction operations in the media 930 on the adaptive optimization device 900 to implement the steps of the adaptive optimization method for germanium spectrometer energy spectrum data provided in the above-described method embodiments.

[0116] The germanium spectrometer energy spectrum data adaptive optimization device 900 may also include one or more power supplies 940, one or more wired or wireless network interfaces 950, one or more input / output interfaces 960, and / or one or more operating systems 931, such as Windows Server, MacOSX, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 9 The illustrated structure of the adaptive optimization device for germanium spectrometer energy spectrum data does not constitute a limitation on the adaptive optimization device 900 for germanium spectrometer energy spectrum data. It may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.

[0117] A computer-readable medium storing instructions that, when executed by a processor, implement the steps of the adaptive optimization method for germanium spectrometer energy spectrum data as described above.

[0118] The present invention and its embodiments have been described above. This description is not restrictive. The accompanying drawings are only one embodiment of the present invention. The actual content is not limited thereto. In short, if a person skilled in the art is inspired by this description and designs a similar structure and embodiment without departing from the spirit of the present invention, such design should fall within the protection scope of the present invention.

Claims

1. An adaptive optimization method for germanium spectrometer energy spectrum data, characterized in that, include: Obtain historical energy spectrum dataset; Feature extraction of historical energy spectrum datasets is performed using wavelet transform and least squares methods to obtain corrected low-frequency coefficient features and reconstructed high-frequency coefficient features; The initial baseline fitting curve is constructed by modifying the low-frequency coefficient characteristics and reconstructing the high-frequency coefficient characteristics. The initial baseline fitting curve is optimized based on the difference operation method and the preset Kalman filter algorithm to obtain the optimized baseline fitting curve. Obtain real-time energy spectrum dataset; The real-time energy spectrum dataset is processed by median filtering based on the median filtering method and the preset sliding window length to obtain the median filtered dataset. The median filter dataset is iteratively optimized based on a pre-defined particle swarm optimization algorithm and a baseline optimization fitting curve to obtain a high-quality energy spectrum dataset.

2. The adaptive optimization method for germanium spectrometer energy spectrum data as described in claim 1, characterized in that, The method of extracting features from historical energy spectrum datasets based on wavelet transform and least squares methods to obtain corrected low-frequency coefficient features and reconstructed high-frequency coefficient features includes: Frequency domain analysis of historical energy spectrum datasets was performed using wavelet transform to obtain the scaling factor and translation factor. Feature extraction is performed on the historical energy spectrum dataset based on the scaling factor and translation factor to obtain low-frequency coefficient features and high-frequency coefficient features; The historical energy spectrum dataset is analyzed based on the characteristics of low-frequency coefficients to obtain the length of low-frequency data; The partial derivatives of the low-frequency coefficient features are calculated based on the least squares method and the length of the low-frequency data to obtain the fitted coefficient dataset. Based on a preset baseline fitting function, a fitting coefficient dataset, and a preset range of polynomial order values, polynomial fitting is performed on the low-frequency coefficient features to obtain corrected low-frequency coefficient features. Based on the fitted coefficient dataset, the high-frequency coefficient features are reconstructed to obtain the reconstructed high-frequency coefficient features.

3. The adaptive optimization method for germanium spectrometer energy spectrum data as described in claim 2, characterized in that, The step of reconstructing high-frequency coefficient features based on the fitted coefficient dataset to obtain reconstructed high-frequency coefficient features includes: The design matrix is ​​constructed based on the preset objective function and the fitting coefficient dataset. Obtain the coefficient vector and data vector from the design matrix; The design matrix is ​​decomposed to obtain an orthogonal matrix and an upper triangular matrix; The coefficient vector is solved by back substitution using the orthogonal matrix to obtain the first transpose coefficient; The data vector is solved by back-substituting it using the upper triangular matrix to obtain the second transpose coefficient; The high-frequency coefficient features are reconstructed based on the first transpose coefficient and the second transpose coefficient to obtain the reconstructed high-frequency coefficient features.

4. The adaptive optimization method for germanium spectrometer energy spectrum data as described in claim 1, characterized in that, The optimization of the initial baseline fitting curve based on the difference operation method and the preset Kalman filter algorithm to obtain the optimized baseline fitting curve includes: Trend analysis is performed on the initial baseline fitting curve based on the difference operation method and the preset baseline change rate to obtain the baseline drift characteristics and baseline change rate; The baseline change rate and baseline drift characteristics were analyzed to obtain process noise and observation noise; The state equations are constructed based on the process noise. The observation equation is constructed based on the observation noise. The state equation and observation equation are recursively estimated based on the Kalman filter algorithm and preset adjustment coefficients to obtain the baseline correction value; The initial baseline fitting curve is optimized based on the baseline correction value and the preset dynamic weighting factor to obtain the optimized baseline fitting curve.

5. The adaptive optimization method for germanium spectrometer energy spectrum data as described in claim 1, characterized in that, The median filtering process, based on the median filtering method and a preset sliding window length, is used to perform median filtering on the real-time energy spectrum dataset to obtain a median-filtered dataset, including: The real-time energy spectrum dataset is mirror-filled based on a preset odd-length filtering window and a preset traversal algorithm to obtain a mirror-filled dataset. The mirror-filled dataset is sorted according to a preset sorting algorithm to obtain a sorted dataset; The sorted dataset is processed by median filtering based on the median filtering method and the sliding window length to obtain a median-filtered dataset.

6. The adaptive optimization method for germanium spectrometer energy spectrum data as described in claim 1, characterized in that, The median filter dataset is iteratively optimized based on a preset particle swarm optimization algorithm and a baseline optimization fitting curve to obtain a high-quality energy spectrum dataset, including: The median-filtered dataset is divided into intervals to obtain multiple energy spectrum data intervals; Predict the baseline offset for multiple energy spectrum data intervals based on the baseline optimization fitting curve; The median filtered dataset is analyzed based on a preset fitting residual function to obtain the fitting residual analysis results; The median filter dataset is iteratively optimized based on particle swarm optimization algorithm, multiple interval baseline offsets, and fitting residual analysis results to obtain a high-quality energy spectrum dataset.

7. The adaptive optimization method for germanium spectrometer energy spectrum data as described in claim 6, characterized in that, The analysis of the median filtered dataset based on the preset fitting residual function to obtain the fitting residual analysis results includes: Acquire various sensor characteristic parameters, real-time environmental parameters, and historical baseline drift tags; An interference feature library was constructed based on various sensor characteristic parameters, real-time environmental parameters, and historical baseline drift labels. Fluctuation analysis was performed on the median-filtered dataset to obtain the degree of fluctuation in the energy spectrum data; The fluctuation of the energy spectrum data is analyzed based on the fitting residual function and the interference feature library to obtain the fitting residual analysis results.

8. An adaptive optimization device for germanium spectrometer energy spectrum data, characterized in that, include: The historical data acquisition module is used to acquire historical energy spectrum datasets; The feature extraction module is used to extract features from the historical energy spectrum dataset based on wavelet transform and least squares methods to obtain corrected low-frequency coefficient features and reconstructed high-frequency coefficient features; The curve construction module is used to construct the initial baseline fitting curve based on the modified low-frequency coefficient features and reconstructed high-frequency coefficient features. The curve optimization module is used to optimize the initial baseline fitting curve based on the difference operation method and the preset Kalman filter algorithm to obtain the optimized baseline fitting curve. The real-time data acquisition module is used to acquire real-time energy spectrum datasets; The filtering module is used to perform median filtering on the real-time energy spectrum dataset based on the median filtering method and the preset sliding window length to obtain the median filtered dataset. The iterative optimization module is used to iteratively optimize the median filter dataset based on a preset particle swarm optimization algorithm and baseline optimization fitting curve to obtain a high-quality energy spectrum dataset.

9. An adaptive optimization device for germanium spectrometer energy spectrum data, characterized in that, include: A memory and at least one processor, wherein the memory stores instructions; At least one of the processors invokes the instructions in the memory to cause the germanium spectrometer energy spectrum data adaptive optimization device to perform the steps of the germanium spectrometer energy spectrum data adaptive optimization method as described in any one of claims 1-7.

10. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement each step of the adaptive optimization method for germanium spectrometer energy spectrum data as described in any one of claims 1-7.

Citation Information

Cited By

  • Method and system for rapidly identifying non-ferrous metal ore based on XRF (X-Ray Fluorescence) and photon activation analysis

    CN121412533A