EDXRF spectrum intelligent analysis method, system, equipment and medium

By combining multidimensional feature extraction and gradient boosting decision tree model with energy-channel mapping, the problem of incomplete pulse waveform processing in EDXRF spectral analysis is solved, achieving high-precision and high-stability spectral analysis.

CN121997195AInactive Publication Date: 2026-05-08SHENZHEN LAI RAY TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN LAI RAY TECH DEV CO LTD
Filing Date
2026-01-29
Publication Date
2026-05-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing EDXRF spectral analysis methods lack multidimensional feature extraction and standardization in pulse waveform processing, have insufficient adaptability of classification models, and lack structured decision-making mechanisms, resulting in decreased analysis accuracy and stability, especially with severe loss of effective counts in complex detection scenarios.

Method used

By generating standardized multidimensional feature vectors through multidimensional feature extraction, using a pre-trained gradient boosting decision tree model for event classification, and combining energy-channel mapping to generate high-fidelity energy spectra, structured decision-making and differentiated processing of pulse events can be achieved.

Benefits of technology

It improves the accuracy and reliability of EDXRF spectral analysis, and can maximize the retention of effective signal information, reduce false peak interference, and generate high-fidelity energy spectra in complex detection scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121997195A_ABST
    Figure CN121997195A_ABST
Patent Text Reader

Abstract

The invention relates to an EDXRF spectrum intelligent analysis method, system and device and a medium. The method comprises the following steps: acquiring a digital pulse waveform, performing multi-dimensional feature extraction on the digital pulse waveform, and generating a standardized multi-dimensional feature vector; inputting the vector into a pre-trained gradient boosting decision tree model to obtain an event classification result of the current pulse event, taking the event classification result as an event classification judgment result of a preset decision object, and associating the digital pulse waveform to obtain a structured decision object; according to an event classification judgment result in the structured decision object, performing differentiation processing to obtain an effective X-ray photon energy value; and mapping the energy value to a corresponding energy spectrum channel according to an energy-channel mapping relation, and carrying out counting accumulation to generate a high-fidelity energy spectrum. According to the method, through multi-dimensional feature extraction and pre-training model reasoning, the accuracy of pulse signal processing and the fidelity of the energy spectrum are improved, and the precision and stability of EDXRF spectrum analysis in a complex detection scene are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer technology, and in particular relates to an intelligent EDXRF spectral analysis method, system, device and medium. Background Technology

[0002] Energy-dispersive X-ray fluorescence (EDXRF) spectroscopy, due to its advantages of speed, non-destructive nature, and portability, has been widely applied in various fields such as geological exploration, alloy analysis, environmental monitoring, and cultural relic identification. Among them, handheld EDXRF spectrometers have become a key application equipment in the industry due to their flexible on-site detection capabilities. Its core working principle is as follows: After primary X-rays emitted from a miniature X-ray tube irradiate the sample, the sample atoms are excited to produce characteristic X-ray fluorescence. The detector receives these fluorescence photons and converts them into raw analog electrical pulse signals. After amplification by a preamplifier, the raw digital pulse waveform is obtained through preprocessing operations such as pulse shaping and baseline restoration. Further preprocessing of the raw digital pulse waveform yields a digital pulse waveform usable for subsequent analysis. The digital pulse processor then processes this digital pulse waveform, mapping it to the corresponding channels according to energy, generating an energy spectrum histogram, providing a basis for qualitative and quantitative elemental analysis.

[0003] However, existing EDXRF spectral analysis methods still have significant technical shortcomings in practical applications: First, the processing flow for digital pulse waveforms is rigid. Traditional methods often employ a combination of linear filtering and fixed threshold discrimination, relying solely on single features such as pulse peak value and simple width for judgment. They fail to systematically extract and standardize the time-domain, frequency-domain, and morphological multi-dimensional features of digital pulse waveforms, resulting in an incomplete characterization of the essential attributes of pulse signals. Second, models used for pulse event classification lack a clear adaptive training process. Traditional models are mostly general-purpose algorithms that are not specifically trained and optimized based on the pulse sample features detected by EDXRF spectroscopy, leading to inaccurate classification. First, the accuracy is insufficient, making it difficult to effectively distinguish between valid single pulses, resolvable stacked pulses, and invalid events. Second, there is a lack of structured decision-making and correlation mechanisms. Traditional methods do not organically bind the classification results with the original digital pulse waveform to form a structured decision object, resulting in a lack of clear basis for differentiated processing. For complex situations such as pulse stacking, a simple discarding method is used, causing effective count loss. At the same time, it is easy to generate false peak interference such as sum peaks and escape peaks, reducing the fidelity of the energy spectrum. Third, the processing links are relatively isolated. There is no synergistic optimization mechanism between preprocessing, feature extraction, classification decision and energy spectrum generation. When facing high count rate or complex matrix detection scenarios, the analysis accuracy and stability are significantly reduced. Summary of the Invention

[0004] Therefore, it is necessary to provide an EDXRF spectral intelligent analysis method, system, device, and medium to address the aforementioned technical problems, aiming to improve the comprehensiveness and accuracy of digital pulse waveform processing and enhance the pertinence and reliability of pulse event classification, so as to meet the application needs of complex on-site detection scenarios.

[0005] Firstly, this application provides an intelligent EDXRF spectral analysis method, including:

[0006] The process involves acquiring digital pulse waveforms, which are obtained through preprocessing the original digital pulse waveforms; and then performing multidimensional feature extraction on the digital pulse waveforms to generate standardized multidimensional feature vectors.

[0007] The standardized multidimensional feature vector is input into the pre-trained gradient boosting decision tree model for inference to obtain the event classification result of the current pulse event. The event classification result is used as the event classification decision result of the preset decision object, and associated with the digital pulse waveform to obtain the structured decision object.

[0008] Based on the event classification and judgment results in the structured decision object, the corresponding differential processing is performed to obtain the effective X-ray photon energy value; the preset energy-channel mapping relationship is obtained, and the effective X-ray photon energy value is mapped to the corresponding energy spectrum channel according to the energy-channel mapping relationship and counted and accumulated to generate a high-fidelity energy spectrum.

[0009] In one embodiment, multidimensional feature extraction is performed on the digital pulse waveform to generate a standardized multidimensional feature vector, including:

[0010] Time-domain features are extracted from digital pulse waveforms to obtain a time-domain feature subset, which includes pulse amplitude, rise time, fall time, pulse width, pulse area, overshoot parameter, and ringing parameter.

[0011] The discrete wavelet transform of the digital pulse waveform is performed to calculate the energy and statistical characteristics of the approximation coefficients at different decomposition scales, thus obtaining a frequency domain feature subset.

[0012] Morphological features are extracted from digital pulse waveforms to obtain a subset of morphological features. The subset of morphological features includes pulse symmetry, top flatness, and normalized cross-correlation coefficient with a standard monopulse template.

[0013] The time-domain feature subset, frequency-domain feature subset, and morphological feature subset are fused to obtain the initial feature vector;

[0014] Based on the preset feature mean and standard deviation, the initial feature vector is standardized to generate a standardized multidimensional feature vector.

[0015] In one embodiment, a standardized multidimensional feature vector is input into a pre-trained gradient boosting decision tree model for inference to obtain the event classification result of the current pulse event. This event classification result is then used as the event classification decision result for a preset decision object. This is correlated with the digital pulse waveform to obtain a structured decision object, including:

[0016] The standardized multidimensional feature vector is input into the pre-trained gradient boosting decision tree model for inference, and a probability vector is obtained to represent the current impulse event as belonging to each preset category of event.

[0017] Based on the probability vector, the event classification results are obtained by making a decision according to the maximum probability principle. The event classification results include valid single pulses, resolvable stacked pulses, and invalid events.

[0018] A preset decision object is created, and the event classification result is assigned to the event classification decision result of the preset decision object to obtain the initial decision object. When the event classification result is an analyzable stacked pulse, sub-component prediction processing is performed based on the standardized multi-dimensional feature vector to obtain the predicted sub-component information. The predicted sub-component information is stored in the initial decision object to obtain the optimized decision object. The predicted sub-component information includes the predicted energy and predicted relative intensity of the sub-pulse.

[0019] Associate and bind digital pulse waveforms with the optimization decision-making object;

[0020] When the event classification result is not a parsable stacked pulse, the digital pulse waveform is associated and bound with the initial decision object to obtain a structured decision object.

[0021] In one embodiment, based on the event classification decision results in the structured decision object, corresponding differential processing is performed to obtain the effective X-ray photon energy value, including:

[0022] When the event classification decision result is a valid single pulse, the digital pulse waveform is retrieved from the structured decision object;

[0023] Perform pulse amplitude or pulse area calculation on the digital pulse waveform to obtain the corresponding amplitude or area value;

[0024] Based on the preset system energy calibration curve, the amplitude value or area value is converted into the corresponding effective X-ray photon energy value;

[0025] When the event classification decision result is a resolvable stacked pulse, retrieve the digital pulse waveform and predicted sub-component information from the structured decision object;

[0026] Obtain a preset standard single-pulse response function, and establish a convolutional stacking model based on the standard single-pulse response function;

[0027] The estimated energy and estimated relative intensity in the estimated sub-component information are used as the initial values ​​of the sub-pulse parameters of the convolutional superposition model. The parameters of the convolutional superposition model are adjusted by a nonlinear optimization algorithm so that the residual between the synthetic waveform output by the convolutional superposition model and the digital pulse waveform meets the preset convergence condition, thus obtaining the optimized convolutional superposition model.

[0028] The digital pulse waveform is input into the optimized convolutional superposition model and waveform fitting is performed to obtain the fitting result containing the parameters of each sub-pulse. The energy value of each sub-pulse is extracted from the fitting result and used as the corresponding effective X-ray photon energy value.

[0029] When the event classification decision result is an invalid event, the structured decision object and the corresponding associated data are removed.

[0030] In one embodiment, a preset energy-channel mapping relationship is obtained, and the effective X-ray photon energy values ​​are mapped to the corresponding energy spectrum channels according to the energy-channel mapping relationship and counted and accumulated to generate a high-fidelity energy spectrum, including:

[0031] Obtain the preset energy-channel mapping relationship, which is the correspondence between X-ray photon energy and energy spectrum channels;

[0032] For each effective X-ray photon energy value, channel matching is performed according to the energy-channel mapping relationship to obtain the target energy spectrum channel corresponding to each effective X-ray photon energy value;

[0033] The count of each target energy spectrum channel is accumulated and updated to obtain the cumulative count of each energy spectrum channel;

[0034] Based on the cumulative counts of each energy spectrum channel, an energy spectrum histogram is constructed to generate a high-fidelity energy spectrum.

[0035] In one embodiment, the mathematical expression for the standard single-pulse response function is:

[0036]

[0037] in, The time it takes for the pulse to rise to 99% of its peak value, and , ; It is a time variable; The pulse rise time constant; The time constant of the pulse falling edge; The width of the pulse top; The peak amplitude of the pulse; The standard deviation of the detector noise; With a mean of 0 and a variance of Gaussian noise is used to simulate the actual noise characteristics of the detector.

[0038] Secondly, this application also provides an EDXRF spectral intelligent analysis system, comprising:

[0039] The multidimensional feature extraction module is used to acquire digital pulse waveforms, which are obtained by preprocessing the original digital pulse waveforms; multidimensional feature extraction is performed on the digital pulse waveforms to generate standardized multidimensional feature vectors.

[0040] The classification reasoning and object construction module is used to input standardized multi-dimensional feature vectors into a pre-trained gradient boosting decision tree model for reasoning, obtain the event classification result of the current pulse event, and use the event classification result as the event classification decision result of the preset decision object, and associate it with the digital pulse waveform to obtain a structured decision object;

[0041] The differentiation processing and energy spectrum generation module is used to perform corresponding differentiation processing based on the event classification judgment results in the structured decision object to obtain the effective X-ray photon energy value; obtain the preset energy-channel mapping relationship, map the effective X-ray photon energy value to the corresponding energy spectrum channel according to the energy-channel mapping relationship and count and accumulate to generate a high-fidelity energy spectrum.

[0042] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the first aspect.

[0043] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the first aspect.

[0044] The aforementioned intelligent EDXRF spectral analysis method, system, device, and medium first acquire preprocessed digital pulse waveforms and perform multidimensional feature extraction and standardization to generate standardized multidimensional feature vectors. This solves the problem of traditional methods' incomplete characterization of pulse attributes by using a single feature, laying the foundation for accurate classification. Secondly, the standardized feature vectors are input into a pre-trained gradient boosting decision tree model to obtain classification results. The waveforms are then correlated to construct structured decision objects, overcoming the shortcomings of traditional models such as poor adaptability and the disconnect between decision-making and raw data, thus improving the accuracy of pulse event classification. Furthermore, differentiated processing is performed based on the classification results, avoiding the shortcomings of simply discarding accumulated pulses in traditional methods. This maximizes the retention of effective signal information and reduces counting loss and false peak interference. Finally, high-fidelity energy spectra are generated through energy-channel mapping and count accumulation, overcoming the problem of insufficient coordination among processing stages and significantly improving the accuracy and reliability of EDXRF spectral analysis. Attached Figure Description

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

[0046] Figure 1 A flowchart of an intelligent EDXRF spectral analysis method is provided as an exemplary embodiment of the present invention;

[0047] Figure 2 A flowchart of a method for generating a high-fidelity energy spectrum is provided as an exemplary embodiment of the present invention;

[0048] Figure 3 This is a schematic diagram of an EDXRF spectral intelligent analysis system provided as an exemplary embodiment of the present invention. Detailed Implementation

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

[0050] In one embodiment, such as Figure 1 As shown, an intelligent EDXRF spectral analysis method is provided. This embodiment illustrates the application of this method to a terminal, such as a handheld EDXRF spectrometer. It is understood that this method can also be applied to a server, or to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0051] S101: Acquire digital pulse waveforms, which are obtained by preprocessing the original digital pulse waveforms; perform multi-dimensional feature extraction on the digital pulse waveforms to generate standardized multi-dimensional feature vectors.

[0052] Specifically, raw digital pulse waveforms often contain interference components such as environmental noise, electronic device thermal noise, and baseline drift. Therefore, preprocessing operations such as pulse shaping, baseline restoration, and preliminary time discrimination can initially filter out invalid interference, highlighting the essential characteristics of the pulse signal and providing high-quality data input for subsequent feature extraction. Furthermore, since the attributes of pulse events, such as whether they are valid signals and whether there is accumulation, are not only reflected in intuitive parameters such as time-domain amplitude and width, but also implicit in deeper information such as signal distortion characteristics in the frequency domain and morphological waveform symmetry, extracting only single-dimensional features cannot fully capture the essential differences of pulses. Therefore, multi-dimensional feature extraction can be performed on the preprocessed digital pulse waveforms, thereby constructing a feature profile of the pulse from different dimensions, providing sufficient judgment basis for subsequent accurate classification.

[0053] S102: Input the standardized multidimensional feature vector into the pre-trained gradient boosting decision tree model for inference to obtain the event classification result of the current pulse event, and use the event classification result as the event classification decision result of the preset decision object, and associate it with the digital pulse waveform to obtain the structured decision object.

[0054] Specifically, the gradient boosting decision tree model can accurately capture the nonlinear correlation between multidimensional features and pulse event types by learning the feature-category mapping relationship of a large number of pulse samples. Furthermore, this model can be trained offline to master the characteristic patterns of various pulse events in EDXRF spectral detection scenarios. During online inference, standardized multidimensional feature vectors can be input into the model without retraining. Only rapid feature matching and probability calculation are needed to output the probability vector of the current pulse event belonging to each category, obtaining the event classification result according to the maximum probability principle. Finally, the event classification result is used as the event classification decision result for the preset decision object, and associated with the digital pulse waveform to obtain a structured decision object. This not only breaks the traditional separation between classification results and raw data but also binds the corresponding digital pulse waveform, allowing subsequent processing stages to directly call the raw signal data without repeated reading or storage. This improves processing efficiency and provides information support for differentiated processing.

[0055] S103: Based on the event classification judgment results in the structured decision object, perform corresponding differential processing to obtain the effective X-ray photon energy value; obtain the preset energy-channel mapping relationship, map the effective X-ray photon energy value to the corresponding energy spectrum channel according to the energy-channel mapping relationship and count and accumulate to generate a high-fidelity energy spectrum.

[0056] Specifically, different types of pulse events have different information values ​​and processing requirements. For example, effective signals contain characteristic energy information of sample elements, requiring precise extraction of energy values. While usable accumulated pulses may have waveform distortion, they still contain effective photon information and require targeted analysis. Ineffective events (such as strong noise or severe accumulation) have no value and must be directly discarded. Therefore, differentiated processing can be performed based on the event classification results in the structured decision-making object, thus avoiding the loss of effective information or interference from invalid signals caused by uniform processing. Secondly, a preset energy-channel mapping relationship can be obtained. This mapping relationship is a core parameter obtained by the system through standard sample calibration. For example, a precise correspondence between X-ray photon energy and energy spectrum channels can be established using characteristic X-rays emitted by a standard sample with known energy, ensuring the accuracy of subsequent energy value-to-channel mapping. Subsequently, the effective X-ray photon energy values ​​can be mapped to the corresponding energy spectrum channels according to this mapping relationship and counted and accumulated. For example, an energy spectrum buffer can be set up to store the count data of each channel. Each time an effective X-ray photon energy value is obtained, its corresponding target channel is determined through the mapping algorithm, and the count of that channel is incremented by 1, updating the channel count in real time. This real-time accumulation process allows for rapid response to pulse events during the detection process. The resulting high-fidelity energy spectrum not only maximizes the retention of the effective signal count but also significantly reduces interference such as false peaks and escape peaks. It can accurately reflect the characteristic X-ray intensity distribution of each element in the sample, providing reliable data support for subsequent qualitative elemental analysis (based on characteristic peak position) and quantitative analysis (based on characteristic peak intensity), significantly improving the accuracy and stability of EDXRF spectral analysis.

[0057] The aforementioned method first extracts and standardizes multidimensional features from digital pulse waveforms, achieving a comprehensive characterization of the essential attributes of pulse signals and solving the problems of single feature extraction and incomplete signal characterization in traditional methods. Secondly, it utilizes a pre-trained gradient boosting decision tree model for inference, associating event classification results with digital pulse waveforms to form structured decision objects, addressing the lack of structured decision-making mechanisms and insufficient classification accuracy in traditional methods. Furthermore, it performs differentiated processing based on event classification results and generates high-fidelity energy spectra through energy-channel mapping, effectively solving the problems of effective count loss and low energy spectrum fidelity in complex situations handled by traditional methods. Through collaborative optimization of each processing stage, this method improves the accuracy and stability of EDXRF spectral analysis in high count rate or complex matrix detection scenarios, enhancing the intelligence level of spectral analysis.

[0058] In one embodiment, multidimensional feature extraction is performed on a digital pulse waveform to generate a standardized multidimensional feature vector, including:

[0059] Time-domain features are extracted from digital pulse waveforms to obtain a time-domain feature subset, which includes pulse amplitude, rise time, fall time, pulse width, pulse area, overshoot parameter, and ringing parameter.

[0060] The discrete wavelet transform of the digital pulse waveform is performed to calculate the energy and statistical characteristics of the approximation coefficients at different decomposition scales, thus obtaining a frequency domain feature subset.

[0061] Morphological features are extracted from digital pulse waveforms to obtain a subset of morphological features. The subset of morphological features includes pulse symmetry, top flatness, and normalized cross-correlation coefficient with a standard monopulse template.

[0062] The time-domain feature subset, frequency-domain feature subset, and morphological feature subset are fused to obtain the initial feature vector;

[0063] Based on the preset feature mean and standard deviation, the initial feature vector is standardized to generate a standardized multidimensional feature vector.

[0064] Specifically, the baseline voltage level of the current pulse event can be determined first using a baseline recovery algorithm. Then, the maximum sample value is selected from the sampled data of the digital pulse waveform. The difference between the maximum sample value and the baseline voltage level is taken as the pulse amplitude, which is directly related to the energy of the incident photon. The rise time can be calculated using the industry-standard 10%-90% amplitude threshold method. That is, first determine the sampling time corresponding to 10% and 90% of the pulse amplitude, and the difference between the two times is the rise time. This feature can reflect the detector's response speed and whether the pulse is distorted. Abnormal values ​​usually indicate pulse accumulation or electronic interference. Similarly, the calculation logic for the fall time is the same as that for the rise time. The two sampling times corresponding to the amplitude falling from 90% to 10% after the pulse peak can be selected, and the difference is the fall time. This feature is closely related to the shaping circuit parameters and can help determine the integrity of the pulse. Pulse width can be defined as the full width at 50% of the pulse amplitude. It is obtained by locating the sampling times corresponding to the rising and falling edges of the waveform reaching 50% amplitude and calculating the time difference between them. An excessively wide pulse width is often a direct characteristic of pulse stacking. The pulse area can be obtained by numerically integrating the difference between all sampling points of the digital pulse waveform and the baseline voltage level. The integration interval is from the start to the end of the pulse. In an ideal detection environment, the linear correlation between pulse area and photon energy is better than that between pulse amplitude and pulse area, making it a more robust energy characterization parameter.

[0065] Furthermore, the minimum sample value of the waveform within a preset time window after the pulse peak can be selected, and the difference between this minimum sample value and the baseline voltage level (take the absolute value) can be calculated. This difference, then divided by the pulse amplitude, yields the overshoot parameter. This parameter reflects the circuit matching status or specific types of pulse accumulation; excessive overshoot can lead to waveform distortion. Moreover, ringing phenomena originate from the damping characteristics of electronic systems, and abnormal parameters can help identify noise interference or unstable pulse signals. Therefore, the ringing parameter can be obtained by calculating the number of oscillations of the waveform within a preset time window after the pulse peak and the ratio of the maximum oscillation amplitude to the pulse amplitude.

[0066] Furthermore, distortions in pulse signals (such as accumulation and noise) are often embedded in specific frequency components. Multi-resolution analysis can separate and quantify these hidden features. For example, the db4 wavelet can be chosen as the mother wavelet. This wavelet has the characteristics of tight support and good symmetry, and can maintain good localization characteristics in both the time and frequency domains, adapting to the non-stationary characteristics of pulse signals. By performing three-level discrete wavelet decomposition on the digital pulse waveform, one approximate coefficient sequence (cA3) and three detail coefficient sequences (cD1, cD2, cD3) can be obtained. The approximate coefficient sequence corresponds to the low-frequency slow-change component of the pulse signal, reflecting the global contour of the pulse. The detail coefficient sequences correspond to the high-frequency components of the high, medium, and low frequency bands, respectively. cD1 corresponds to the highest frequency band and mainly contains noise and pulse edge distortion information; cD2 corresponds to the medium frequency band and is sensitive to waveform distortion caused by pulse accumulation; cD3 corresponds to the lower frequency band and can capture local abrupt changes in the waveform. Schematic, the energy calculation of the detail coefficients can be performed using the following formula:

[0067]

[0068] in, This represents the energy of the detail coefficients at the j-th level. This represents the k-th sample value of the j-th layer detail coefficient sequence. This represents the length of the detail coefficient sequence at layer j. This energy value quantifies the signal strength of the corresponding frequency band. Stacked pulses typically exhibit abnormally high energy values ​​at layers cD1 and cD2. The statistical characteristics of the approximation coefficients can include skewness and kurtosis. Skewness reflects the degree of asymmetry in the distribution of the approximation coefficient sequence, while kurtosis reflects the steepness of the distribution. By calculating these two statistical characteristics, the distortion features of the pulse's global profile can be further captured, supplementing the low-frequency domain information that the detail coefficient energy cannot cover.

[0069] The pulse waveform can then be viewed as a two-dimensional shape. By quantifying its morphological differences from the standard single-pulse model, we can identify whether the pulse exhibits distortion or accumulation, thus obtaining a subset of morphological features. Since the rising and falling edges of a single-pulse signal typically possess high symmetry, pulse accumulation disrupts this symmetry, leading to a significant decrease in the correlation coefficient. Therefore, we can use the sampling time corresponding to the pulse peak as the center, extracting sampling data segments with equal rising and falling edge lengths to the left and right of the peak, respectively denoted as the rising edge data sequence and the falling edge data sequence. The Pearson correlation coefficient between the two data sequences is then calculated; this correlation coefficient is the pulse symmetry parameter. The rising and falling edges of a single-pulse signal typically possess high symmetry, while pulse accumulation disrupts this symmetry, resulting in a significant decrease in the correlation coefficient. Furthermore, a sampling window of a preset length can be selected near the pulse peak (the window range covers the peak and a small number of sampling points on both sides), and the variance of all sampled values ​​within the window can be calculated to obtain the top flatness. The smaller the variance, the flatter the pulse top. The effective single pulse top formed by the trapezoidal shape usually has good flatness, while the top of the stacked pulse will have depressions or bulges due to the superposition of multiple sub-pulses, resulting in an increase in variance.

[0070] Furthermore, a standard single-pulse template library can be constructed. This library can be built by collecting pure single-pulse signals at different energy points under a controlled laboratory environment, preprocessing them, and using them as standard templates. By selecting the standard template that is closest to the estimated energy of the current pulse from the template library, the normalized cross-correlation coefficient can be calculated using the following formula:

[0071]

[0072] in, This is the sampling sequence of the current digital pulse waveform. The selected standard single-pulse template sampling sequence, The length of the sampling sequence This is the mean of the current pulse sampling sequence. The coefficient represents the mean of the sampled sequence of the standard template. Its value ranges from -1 to 1. A value closer to 1 indicates a more consistent morphology between the current pulse and the standard template, meaning the pulse is purer. Low similarity indicates pulse distortion or stacking. A structured concatenation method can be used to arrange all feature parameters contained in the temporal feature subset, frequency domain feature subset, and morphological feature subset in a fixed order: "temporal feature subset → frequency domain feature subset → morphological feature subset." This forms a one-dimensional initial feature vector, ensuring structural consistency and repeatability of the feature vector. Each feature occupies a fixed position in the vector, providing structured input for subsequent model training and inference.

[0073] Specifically, the preset feature mean and standard deviation can be obtained through offline statistics. For example, during the model training phase, representative pulse samples can be collected, and the aforementioned time-domain, frequency-domain, and morphological feature extraction and fusion processes can be performed on each sample to obtain a large number of initial feature vectors. For each feature dimension, the mean and standard deviation of all initial feature vectors on that dimension can be calculated, and these mean and standard deviations can be stored in the system as preset parameters for standardization. Subsequently, the Z-score standardization method can be used to standardize the initial feature vectors. This standardization process can eliminate the differences in dimensions and numerical ranges between different feature dimensions. For example, the numerical range of pulse amplitude may be in the millivolt range, while the numerical range of correlation coefficient is [-1, 1]. After standardization, all feature values ​​are in similar numerical ranges, ensuring that each feature dimension has an equal weight contribution in subsequent model inference, avoiding the dominance of the model's judgment result due to the excessively large numerical range of a certain feature dimension, thereby improving the accuracy and stability of model classification.

[0074] In one embodiment, a standardized multidimensional feature vector is input into a pre-trained gradient boosting decision tree model for inference to obtain the event classification result of the current pulse event. This event classification result is then used as the event classification decision result for a predefined decision object. This is correlated with the digital pulse waveform to obtain a structured decision object, including:

[0075] The standardized multidimensional feature vector is input into the pre-trained gradient boosting decision tree model for inference, and a probability vector is obtained to represent the current impulse event as belonging to each preset category of event.

[0076] Based on the probability vector, the event classification results are obtained by making a decision according to the maximum probability principle. The event classification results include valid single pulses, resolvable stacked pulses, and invalid events.

[0077] A preset decision object is created, and the event classification result is assigned to the event classification decision result of the preset decision object to obtain the initial decision object. When the event classification result is an analyzable stacked pulse, sub-component prediction processing is performed based on the standardized multi-dimensional feature vector to obtain the predicted sub-component information. The predicted sub-component information is stored in the initial decision object to obtain the optimized decision object. The predicted sub-component information includes the predicted energy and predicted relative intensity of the sub-pulse.

[0078] Associate and bind digital pulse waveforms with the optimization decision-making object;

[0079] When the event classification result is not a parsable stacked pulse, the digital pulse waveform is associated and bound with the initial decision object to obtain a structured decision object.

[0080] Specifically, by iteratively constructing and weighting weak classifiers, a strong classifier with strong generalization ability can be formed, resulting in a gradient boosting decision tree model. This model can accurately capture the complex nonlinear relationship between multidimensional features and pulse event categories. Illustratively, during the pre-training process of this model, digital pulse waveform samples covering different detection scenarios, element types, and pulse states are first collected. Complete multidimensional feature extraction and standardization are performed on each sample to obtain a standardized multidimensional feature vector consistent with the feature distribution of the actual application scenario. Subsequently, each sample is labeled with its category based on the true physical state of the pulse. This can be achieved through methods such as controlled light sources in the laboratory and synchronous acquisition with an oscilloscope, forming a category set containing three labels: valid single pulses, resolvable stacked pulses, and invalid events. The standardized multidimensional feature vector of each sample is then associated with its corresponding category label to construct the model training dataset. During training based on this dataset, an additive model iterative optimization can be used. In each iteration, a new weak classifier (using a CART decision tree as the weak classifier) ​​can be constructed based on the prediction residuals of the previous model. The weight coefficients of the weak classifier are then determined by minimizing the loss function using gradient descent. The loss function can be the logarithmic loss function, whose expression is:

[0081]

[0082] in, The true class label vector of the sample (using one-hot encoding, if the sample belongs to class c) (The rest of the categories are 0). This is the prediction function of the model. Total number of categories ( , The model predicts the probability that a sample belongs to class c. This loss function effectively measures the difference between the predicted probability and the true label, ensuring the convergence of model training. After training, redundant branch nodes in the decision tree can be removed through pruning operations to reduce model complexity, improve online inference speed, and adapt to the real-time requirements of embedded platforms. By inputting the standardized multidimensional feature vector of the current impulse event into the pre-trained model, the model can perform feature matching by traversing the decision tree nodes. It then calculates the posterior probability of the current impulse belonging to each preset event class by combining the weight coefficients of each weak classifier. The posterior probabilities of each class constitute a probability vector, where each element takes values ​​in the range [0,1], and the sum of all elements is 1.

[0083] Specifically, based on the probability vector, the decision-making process can be performed according to the maximum probability principle. First, all elements in the probability vector are traversed, and the category index corresponding to the element with the largest value is determined. The event category corresponding to this category index is the classification result of the current pulse event. Furthermore, to ensure the robustness of the decision, a probability threshold can be set. When the maximum probability value is lower than a preset threshold, the current pulse event is determined to be an invalid event, avoiding misclassification due to feature ambiguity. For example, the probability vector feature corresponding to a valid single pulse can be that the probability of a certain element (corresponding to the valid single pulse category) is significantly higher than the other two categories, usually close to 1. The probability vector feature corresponding to an analytically stacked pulse can be that the probability of the corresponding category element is at an intermediate level, and the probabilities of the other two categories are low. The probability vector feature corresponding to an invalid event can be that there is no clearly dominant element, or the maximum probability value is lower than the preset threshold. Through this decision-making process, three different types of pulse events can be accurately distinguished, providing a clear basis for subsequent differentiated processing.

[0084] Furthermore, the pre-defined decision object can be designed using a structured data format, including a category decision result field, a digital pulse waveform association field, and an optional sub-component prediction information field. This data structure enables the organic binding of the decision result and the original data, solving the problem of separation between traditional classification results and the original signal. For example, the structured data structure can be initialized first, and the event classification result obtained through the maximum probability principle can be written into the category decision result field. After the assignment is completed, an initial decision object containing only core decision information is obtained. When the classification result is an analyzable stacked pulse, since there is a stable statistical correlation between the multidimensional features of the analyzable stacked pulse and the parameters (energy, relative intensity) of each sub-pulse constituting the stacked pulse, this correlation model can be further established to achieve sub-component prediction. In the sub-component prediction process, a gradient boosting regression-based prediction model can be used. This model shares the sample data from the training phase with the pulse classification model. By using the standardized multidimensional feature vector of the analyzable stacked pulse sample as input and the corresponding real sub-pulse energy and relative intensity as output, the regression model is trained. Therefore, by inputting the standardized multidimensional feature vector of the currently resolvable stacked pulses into the regression model, the predicted energy and predicted relative intensity of the sub-pulses can be directly output. The predicted relative intensity is defined as the proportion of each sub-pulse's energy to the total energy of all sub-pulses, satisfying the constraint that the sum of the relative intensities of all sub-pulses is 1. The obtained predicted sub-component information is written into the sub-component prediction information field of the initial decision object. After completing the field supplementation, the optimized decision object is obtained, which contains the classification decision result, original waveform association information, and sub-component prediction information, providing key initial parameters for subsequent physical model inversion. Furthermore, a data pointer mapping mechanism can be used to store the starting address pointer of the digital pulse waveform data in system memory in the digital pulse waveform association field of the optimized decision object. Through this pointer, the corresponding digital pulse waveform data can be directly called without additional copying and storage, further improving data retrieval efficiency.

[0085] Specifically, when the event classification result is not a parseable stacked pulse, i.e., for the classification results of valid single pulses and invalid events, no sub-component prediction information is needed. Therefore, the same data pointer mapping mechanism as the optimized decision object can be directly adopted. The memory address pointer of the digital pulse waveform is stored in the digital pulse waveform association field of the initial decision object, and after binding, the final structured decision object is formed. Furthermore, regardless of the event classification result type, the final structured decision object contains the category decision result and the corresponding digital pulse waveform association information. The structured decision object corresponding to parseable stacked pulses also additionally contains sub-component prediction information. Through this structured design, it can be ensured that subsequent processing steps directly obtain all necessary information from the decision object.

[0086] In one embodiment, based on the event classification decision results in the structured decision object, corresponding differential processing is performed to obtain the effective X-ray photon energy value, including:

[0087] When the event classification decision result is a valid single pulse, the digital pulse waveform is retrieved from the structured decision object;

[0088] Perform pulse amplitude or pulse area calculation on the digital pulse waveform to obtain the corresponding amplitude or area value;

[0089] Based on the preset system energy calibration curve, the amplitude value or area value is converted into the corresponding effective X-ray photon energy value;

[0090] When the event classification decision result is a resolvable stacked pulse, retrieve the digital pulse waveform and predicted sub-component information from the structured decision object;

[0091] Obtain a preset standard single-pulse response function, and establish a convolutional stacking model based on the standard single-pulse response function;

[0092] The estimated energy and estimated relative intensity in the estimated sub-component information are used as the initial values ​​of the sub-pulse parameters of the convolutional superposition model. The parameters of the convolutional superposition model are adjusted by a nonlinear optimization algorithm so that the residual between the synthetic waveform output by the convolutional superposition model and the digital pulse waveform meets the preset convergence condition, thus obtaining the optimized convolutional superposition model.

[0093] The digital pulse waveform is input into the optimized convolutional superposition model and waveform fitting is performed to obtain the fitting result containing the parameters of each sub-pulse. The energy value of each sub-pulse is extracted from the fitting result and used as the corresponding effective X-ray photon energy value.

[0094] When the event classification decision result is an invalid event, the structured decision object and the corresponding associated data are removed.

[0095] Specifically, when the event classification decision result is a valid single pulse, the corresponding waveform sampling data sequence can be directly read from the structured decision object based on the memory address pointer of the digital pulse waveform stored in the decision object, thus eliminating the need for additional data copying and saving memory resources. Based on this sequence, the baseline voltage level corresponding to the pulse event (output by the baseline recovery module during preprocessing) can be obtained first. The maximum sample value is then selected from the waveform sampling data, and the difference between the maximum sample value and the baseline voltage level is determined as the pulse amplitude value. Furthermore, the difference between each sampling point in the waveform sampling data and the baseline voltage level can be numerically integrated. The integration interval is from the pulse triggering moment to the moment the waveform falls back to the baseline level. The trapezoidal integration method is used to obtain the pulse area value. Subsequently, according to the preset system energy scale curve, the amplitude value or area value can be converted into the corresponding effective X-ray photon energy value. This curve is obtained through calibration using a standard X-ray source. For example, pulse signals from multiple characteristic X-ray sources with known energies (such as characteristic X-rays from elements like Fe and Cu) can be acquired, and the pulse amplitude or area value corresponding to each standard energy can be recorded. With the standard energy as the ordinate and the corresponding amplitude / area value as the abscissa, a quadratic polynomial-form calibration curve is obtained by fitting using the least squares method. Its expression can be: V represents the amplitude or area value. , , To obtain the fitted scale coefficients, substitute the calculated amplitude or area values ​​into the expression to obtain the corresponding effective X-ray photon energy values.

[0096] Specifically, when the event classification decision result is a resolvable stacked pulse, the digital pulse waveform and estimated sub-component information can be retrieved from the memory address pointer of the decision object. The estimated energy and relative intensity of the sub-pulse stored in the sub-component prediction information field of the decision object can also be read. By obtaining the preset standard single-pulse response function, a convolutional stacking model can be established based on the standard single-pulse response function. The preset standard single-pulse response function is the calibration pulse model of the detector and signal processing link, and its mathematical expression can be:

[0097]

[0098] in, The time it takes for the pulse to rise to 99% of its peak value, and , ; It is a time variable; The pulse rise time constant; The time constant of the pulse falling edge; The width of the pulse top; The peak amplitude of the pulse; The standard deviation of the detector noise; With a mean of 0 and a variance of Gaussian noise is used to simulate the actual noise characteristics of the detector. This function divides a single pulse into three stages: rising edge, flat top, and falling edge, describing the waveform of each stage with an exponential function, and combining Gaussian noise to fit the actual signal characteristics. The convolutional superposition model established based on this function can be expressed as follows: ,in This is the measured stacked pulse waveform; This represents the number of sub-pulses. The sub-pulse amplitude coefficient; This is the sub-pulse delay time; This represents the peak amplitude of the sub-pulse; the remaining parameters are fixed values ​​calibrated by the system.

[0099] Furthermore, based on the predicted sub-component information, the predicted energy of the sub-pulse can be substituted into the system energy calibration curve to deduce the peak amplitude of the sub-pulse. As its initial value, the estimated relative intensity is used as... initial value (satisfying) And the time value estimated based on the waveform peak interval can be used as... The initial value is then used. Subsequently, the Levenberg-Marquardt algorithm can be used to calculate the residual sum of squares Res. Let be the objective function, where These are the measured waveform sample values. For model-synthesized waveform sample values, The parameter vector to be optimized is given. When the sum of squared residuals is less than a preset threshold or the parameter update magnitude is less than a preset threshold, the optimization can be stopped, and the optimized convolutional stacking model can be obtained.

[0100] By inputting the digital pulse waveform into the optimized convolutional stacking model and performing waveform fitting, the fit between the synthesized waveform and the measured waveform can be verified, and the fitting results including the optimized sub-pulse parameters can be obtained. The parameters of each sub-pulse can then be... By substituting the values ​​into the system energy calibration curve, the corresponding effective X-ray photon energy values ​​can be obtained. Furthermore, when the event classification result is an invalid event, the memory space occupied by the decision object and associated waveform data can be released to avoid invalid data interfering with the energy spectrum quality.

[0101] In one embodiment, such as Figure 2 As shown, a preset energy-channel mapping relationship is obtained. Effective X-ray photon energy values ​​are mapped to the corresponding energy spectrum channels according to the energy-channel mapping relationship and counted and accumulated to generate a high-fidelity energy spectrum, including:

[0102] S201: Obtain the preset energy-channel mapping relationship, which is the correspondence between X-ray photon energy and energy spectrum channels;

[0103] S202: For each effective X-ray photon energy value, channel matching is performed according to the energy-channel mapping relationship to obtain the target energy spectrum channel corresponding to each effective X-ray photon energy value;

[0104] S203: Accumulate and update the count for each target energy spectrum channel to obtain the cumulative count for each energy spectrum channel;

[0105] S204: Based on the cumulative counts of each energy spectrum channel, construct an energy spectrum histogram and generate a high-fidelity energy spectrum.

[0106] Specifically, the energy-channel mapping relationship is the correspondence between X-ray photon energy and energy spectrum channels, and this mapping relationship can be pre-calibrated. For example, a standard sample containing multiple known characteristic X-ray energies (such as a multi-element standard alloy including low, medium, and high energy ranges) can be selected. For the characteristic X-rays of each standard element, the corresponding effective X-ray photon energy value is collected, and the initial channel position of this energy value in the energy spectrum is recorded (determined by the initial channel allocation logic of the multichannel analyzer). By collecting at least 5 standard characteristic points with different energies, the energy-channel mapping relationship can be established. For independent variables and corresponding energy spectrum channels For the dependent variable, a quadratic polynomial fitting can be used to establish a mapping function, and its expression can be:

[0107]

[0108] in, , , To fit the obtained calibration coefficients, this function can further compensate for the nonlinear deviation between energy spectrum channels and energies, ensuring channel matching accuracy across the entire energy range. After calibration, the coefficients of this function are stored in the system's non-volatile memory, which can serve as a preset energy-channel mapping relationship for subsequent use.

[0109] Intuitively, the effective X-ray photon energy value can be substituted into a preset energy-channel mapping function to calculate the corresponding channel value (usually a floating-point number). This channel value is then rounded to the nearest integer, which is the target energy spectrum channel. Boundary checks can be performed: if the calculated channel value is less than the minimum channel number (usually 0), it is matched to the minimum channel; if it is greater than the maximum channel number (e.g., 1023 corresponds to channel 1024), it is matched to the maximum channel, avoiding storage errors caused by channel out-of-bounds errors. Furthermore, the count of each target energy spectrum channel can be cumulatively updated to obtain the cumulative count of each channel. This can be achieved by pre-allocating contiguous memory space as an energy spectrum buffer, organized as an array where each element corresponds to the count of an energy spectrum channel. Initially, all elements are set to 0. When performing count accumulation on the target energy spectrum channel, the element value of the corresponding channel index in the energy spectrum buffer can be incremented by 1. This operation ensures that when multiple energy values ​​are processed concurrently, the count of each channel is correctly accumulated only once, without loss or duplicate accumulation. After the accumulation is completed, the value of each element in the energy spectrum buffer is the cumulative count of the corresponding channel.

[0110] Specifically, arranging the cumulative counts in the energy spectrum buffer according to channel order forms a two-dimensional "channel-count" data sequence, which is the core data of the energy spectrum histogram, thus enabling the construction of a high-fidelity energy spectrum. Furthermore, the energy values ​​involved in the counting in this spectrum undergo differential processing (retaining valid single-pulse energy, resolving sub-pulse energies of resolvable stacked pulses, and eliminating invalid events), and channel matching is based on a precisely calibrated mapping relationship. Therefore, the positions of characteristic peaks in the spectrum are consistent with the actual characteristic X-ray energies of the elements, and the peak counts accurately reflect the elemental fluorescence intensity, while avoiding count loss and false peak interference caused by discarding stacked pulses in traditional processing.

[0111] Based on the same inventive concept, this application also provides an EDXRF spectral intelligent analysis system for implementing the aforementioned EDXRF spectral intelligent analysis method. The solution provided by this system is similar to the implementation described in the above method; therefore, the specific limitations of one or more embodiments of the EDXRF spectral intelligent analysis system provided below can be found in the limitations of the EDXRF spectral intelligent analysis method described above, and will not be repeated here.

[0112] In one exemplary embodiment, such as Figure 3 As shown, an EDXRF spectral intelligent analysis system 300 is provided, comprising:

[0113] The multidimensional feature extraction module 301 is used to acquire digital pulse waveforms, which are obtained by preprocessing the original digital pulse waveforms; multidimensional feature extraction is performed on the digital pulse waveforms to generate standardized multidimensional feature vectors;

[0114] The classification reasoning and object construction module 302 is used to input standardized multi-dimensional feature vectors into a pre-trained gradient boosting decision tree model for reasoning, obtain the event classification result of the current pulse event, and use the event classification result as the event classification judgment result of the preset decision object, and associate it with the digital pulse waveform to obtain a structured decision object;

[0115] The differentiation processing and energy spectrum generation module 303 is used to perform corresponding differentiation processing based on the event classification judgment results in the structured decision object to obtain the effective X-ray photon energy value; obtain the preset energy-channel mapping relationship, map the effective X-ray photon energy value to the corresponding energy spectrum channel according to the energy-channel mapping relationship and count and accumulate it to generate a high-fidelity energy spectrum.

[0116] In one exemplary embodiment, the present invention also provides a computer device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the EDXRF spectral intelligent analysis method of this application. A multi-core processor is preferred to improve the parallel processing capability of the system. The memory provides sufficient temporary storage space to support program execution and data processing. The memory capacity should be large enough to accommodate large amounts of data and computational tasks.

[0117] In one exemplary embodiment, the present invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the EDXRF spectral intelligent analysis method of this application. The computer-readable storage medium may include: read-only memory, random access memory (RAM), solid-state drive (SSD), or optical disk, etc.

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

Claims

1. A smart EDXRF spectral analysis method, characterized in that, The method includes: A digital pulse waveform is acquired by preprocessing the original digital pulse waveform; multidimensional feature extraction is performed on the digital pulse waveform to generate a standardized multidimensional feature vector; The standardized multidimensional feature vector is input into a pre-trained gradient boosting decision tree model for inference to obtain the event classification result of the current pulse event. The event classification result is then used as the event classification decision result of the preset decision object, and associated with the digital pulse waveform to obtain a structured decision object. Based on the event classification judgment results in the structured decision object, perform corresponding differential processing to obtain the effective X-ray photon energy value; obtain the preset energy-channel mapping relationship, map the effective X-ray photon energy value to the corresponding energy spectrum channel according to the energy-channel mapping relationship and perform counting accumulation to generate a high-fidelity energy spectrum.

2. The method according to claim 1, characterized in that, The step of extracting multidimensional features from the digital pulse waveform to generate a standardized multidimensional feature vector includes: The digital pulse waveform is subjected to time-domain feature extraction to obtain a time-domain feature subset; the time-domain feature subset includes pulse amplitude, rise time, fall time, pulse width, pulse area, overshoot parameter and ringing parameter; The digital pulse waveform is subjected to discrete wavelet transform processing, and the statistical characteristics of the energy and approximation coefficients of the detail coefficients at different decomposition scales are calculated to obtain a frequency domain feature subset. Morphological features are extracted from the digital pulse waveform to obtain a subset of morphological features; the subset of morphological features includes pulse symmetry, top flatness, and normalized cross-correlation coefficient with a standard single pulse template; The time-domain feature subset, the frequency-domain feature subset, and the morphological feature subset are fused to obtain an initial feature vector; Based on the preset feature mean and standard deviation, the initial feature vector is standardized to generate the standardized multidimensional feature vector.

3. The method according to claim 1, characterized in that, The standardized multidimensional feature vector is input into a pre-trained gradient boosting decision tree model for inference to obtain the event classification result of the current pulse event. This event classification result is then used as the event classification decision result for a preset decision object. This is correlated with the digital pulse waveform to obtain a structured decision object, including: The standardized multidimensional feature vector is input into the pre-trained gradient boosting decision tree model for inference to obtain a probability vector representing the current impulse event as belonging to each preset category of event; Based on the probability vector, a decision is made according to the maximum probability principle to obtain the event classification result; the event classification result includes valid single pulses, resolvable stacked pulses, and invalid events. A preset decision object is created, and the event classification result is assigned to the event classification decision result of the preset decision object to obtain an initial decision object. When the event classification result is the parseable stacked pulse, sub-component prediction processing is performed based on the standardized multi-dimensional feature vector to obtain predicted sub-component information. The predicted sub-component information is stored in the initial decision object to obtain an optimized decision object. The predicted sub-component information includes the predicted energy and predicted relative intensity of the sub-pulse. The digital pulse waveform is associated and bound with the optimization decision object; When the event classification result is not the resolvable stacked pulse, the digital pulse waveform is associated and bound with the initial decision object to obtain the structured decision object.

4. The method according to claim 3, characterized in that, The step of performing corresponding differential processing based on the event classification judgment results in the structured decision object to obtain the effective X-ray photon energy value includes: When the event classification decision result is the valid single pulse, the digital pulse waveform is retrieved from the structured decision object; The digital pulse waveform is processed by pulse amplitude or pulse area calculation to obtain the corresponding amplitude value or area value; According to the preset system energy calibration curve, the amplitude value or the area value is converted into the corresponding effective X-ray photon energy value; When the event classification decision result is the parseable stacked pulse, the digital pulse waveform and the estimated sub-component information are retrieved from the structured decision object; Obtain a preset standard single-pulse response function, and establish a convolutional stacking model based on the standard single-pulse response function; The estimated energy and estimated relative intensity in the estimated sub-component information are used as the initial values ​​of the sub-pulse parameters of the convolutional superposition model. The parameters of the convolutional superposition model are adjusted by a nonlinear optimization algorithm so that the residual between the synthesized waveform output by the convolutional superposition model and the digital pulse waveform satisfies the preset convergence condition, thus obtaining the optimized convolutional superposition model. The digital pulse waveform is input into the optimized convolutional superposition model for waveform fitting to obtain a fitting result containing parameters of each sub-pulse. The energy value of each sub-pulse is extracted from the fitting result and used as the corresponding effective X-ray photon energy value. When the event classification decision result is an invalid event, the structured decision object and the corresponding associated data are removed.

5. The method according to claim 1, characterized in that, The step of obtaining a preset energy-channel mapping relationship, mapping the effective X-ray photon energy value to the corresponding energy spectrum channel according to the energy-channel mapping relationship, and counting and accumulating the data to generate a high-fidelity energy spectrum includes: Obtain the preset energy-channel mapping relationship, which is the correspondence between X-ray photon energy and energy spectrum channels; For each effective X-ray photon energy value, channel matching processing is performed according to the energy-channel mapping relationship to obtain the target energy spectrum channel corresponding to each effective X-ray photon energy value; The count of each target energy spectrum channel is accumulated and updated to obtain the cumulative count of each energy spectrum channel; Based on the cumulative counts of each energy spectrum channel, an energy spectrum histogram is constructed to generate the high-fidelity energy spectrum.

6. The method according to claim 4, characterized in that, The mathematical expression for the standard single-pulse response function is: in, The time it takes for the pulse to rise to 99% of its peak value, and , ; It is a time variable; The pulse rise time constant; The time constant of the pulse falling edge; The width of the pulse top; The peak amplitude of the pulse; The standard deviation of the detector noise; With a mean of 0 and a variance of Gaussian noise is used to simulate the actual noise characteristics of the detector.

7. An intelligent EDXRF spectral analysis system, characterized in that, The system includes: A multidimensional feature extraction module is used to acquire a digital pulse waveform, which is obtained by preprocessing the original digital pulse waveform; multidimensional feature extraction is performed on the digital pulse waveform to generate a standardized multidimensional feature vector; The classification reasoning and object construction module is used to input the standardized multidimensional feature vector into the pre-trained gradient boosting decision tree model for reasoning, obtain the event classification result of the current pulse event, and use the event classification result as the event classification judgment result of the preset decision object, and associate it with the digital pulse waveform to obtain the structured decision object; The differentiation processing and energy spectrum generation module is used to perform corresponding differentiation processing based on the event classification judgment results in the structured decision object to obtain effective X-ray photon energy values; obtain a preset energy-channel mapping relationship, map the effective X-ray photon energy values ​​to the corresponding energy spectrum channels according to the energy-channel mapping relationship and perform counting accumulation to generate a high-fidelity energy spectrum.

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

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.