A spectral line correction method and system based on dual-mode projection and multi-objective optimization
By employing a spectral correction method based on dual-modal projection and multi-objective optimization, the problem of nonlinear distortion of the energy spectrum in X-ray photon counting detectors under high throughput was solved, achieving high-precision and reliable spectral correction and improving the accuracy of material identification and imaging quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAMEN UNIV
- Filing Date
- 2026-01-27
- Publication Date
- 2026-06-09
AI Technical Summary
Existing X-ray photon counting detectors exhibit severe nonlinear distortion in their output energy spectrum under high-throughput X-ray irradiation, leading to a decrease in the accuracy and reliability of measurement data. Current correction methods have failed to effectively address the nonlinear distortion problem caused by internal physical effects within the detector.
A spectral correction method based on bimodal projection and multi-objective optimization is adopted. Through data acquisition and preprocessing, bimodal feature fusion, feature extraction and physical constraint reconstruction, model training and optimization, a multi-objective joint loss function is constructed, a hard threshold truncation function and physical constraints are introduced, and the model parameters are optimized to correct the spectrum.
It significantly improves the accuracy and reliability of spectral correction, enhances the model's adaptability to dynamically changing operating conditions, ensures that the correction results conform to physical laws, and improves the accuracy of substance identification and imaging quality.
Smart Images

Figure CN122172259A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of spectral line correction technology, and in particular to a spectral line correction method and system based on dual-modal projection and multi-objective optimization. Background Technology
[0002] X-ray photon counting detectors are one of the core hardware components for current spectral CT imaging and high-precision material identification. They directly convert X-ray photons and distinguish their energies using semiconductor materials, possessing high spatial resolution, no dark current noise, and the ability to simultaneously acquire multiple energy spectra. They are considered a key technology for achieving low-dose, high signal-to-noise ratio imaging. However, this detector faces a fundamental challenge in practical applications: under high-throughput X-ray irradiation conditions, its output energy spectrum undergoes severe nonlinear distortion, directly limiting the accuracy and reliability of its measurement data.
[0003] This distortion is mainly caused by internal physical effects within the detector. Firstly, polarization: under high-flux irradiation, space charge accumulates inside semiconductor materials such as cadmium telluride, leading to electric field distortion and decreased charge collection efficiency, manifested as a shift in the energy spectrum towards lower energies and a nonlinear reduction in photon count. Secondly, pulse stacking: when the photon incident rate is too high, multiple pulses overlap during the dead time of the readout circuit, being incorrectly recorded as a single high-energy pulse, resulting in a shift in the energy spectrum towards higher energies and count loss. Experiments show that as the X-ray tube current increases, the detector's output spectrum experiences characteristic peak shifts, peak distortion, and even a decrease in the count rate, such as... Figure 6 As shown (with the increase of X-ray tube current (from 200μA to 600μA), the spectral shape becomes severely distorted, characteristic peaks are buried or shifted, and the total number of photons received by the detector decreases instead of increasing. This severe nonlinear distortion renders conventional detection ineffective.) Existing correction schemes are divided into hardware and software categories, but both have limitations. Hardware improvements, such as adding filters or complex circuits, increase system cost and complexity; while software algorithms, such as correction models based on statistical moments or simple neural networks, often fail to fully model the strong nonlinear and channel-differentiated coupling relationship between key physical parameters such as tube current and complex distortions. They also lack strict constraints on physical consistency such as energy conservation and characteristic peak fidelity, resulting in insufficient correction accuracy and generalization ability under dynamic operating conditions.
[0004] In summary, spectral distortion in photon counting detectors at high throughput is a specific technical problem caused by a well-defined physical mechanism and strongly correlated with operating parameters. Existing correction methods fall short in terms of deep embedding of the physical mechanism and dynamic adaptive correction, making it difficult to ensure the physical reliability of the results while improving numerical accuracy. This has become a key technical bottleneck restricting the realization of the theoretical potential of this advanced detector in fields such as precise matter identification. Therefore, developing an intelligent correction method that can explicitly model the influence of physical parameters and strictly adhere to the detector's physical mechanism has clear technical necessity and application value. Summary of the Invention
[0005] In view of this, the purpose of this invention is to propose a spectral line correction method based on dual-modal projection and multi-objective optimization, which can solve at least one of the technical problems in the background art.
[0006] According to one aspect of the present invention, a spectral line correction method based on dual-modal projection and multi-objective optimization is provided, the method comprising: Data acquisition and preprocessing: acquire distorted X-ray absorption spectrum data and corresponding background spectrum data collected under different tube current conditions, normalize the spectrum data, extract spectral feature vectors characterizing the decay characteristics of the material, and standardize the tube current parameters to form dual-mode preprocessed data containing spectral modes and physical control modes. Dual-modal feature fusion: The standardized tube current parameters are extended in the time dimension to generate a physical parameter sequence with the same dimension as the spectral feature vector; The spectral feature vector and the physical parameter sequence are fused to obtain the fused dual-modal feature tensor; Feature extraction and physical constraint reconstruction: The dual-modal feature tensor input sequence feature extraction network is used for deep feature extraction to obtain high-dimensional semantic features that characterize the spectral distortion law; The high-dimensional semantic features are converted into an initial predicted spectrum through a regression mapping layer; The theoretical maximum photon flux of the detector in each energy channel is calculated based on the current tube current parameters, and the initial predicted spectrum is physically constrained using a hard threshold truncation function to output the corrected spectrum; Model training; constructing a multi-objective joint loss function to train the encoder-decoder network and the linear projection layer; wherein, the multi-objective joint loss function includes at least a pointwise reconstruction error term, a global energy conservation constraint term, and a feature peak fidelity term; Model optimization and spectral correction: The model parameters are optimized using optimization algorithms, and the trained model is applied to correct the input spectrum.
[0007] The aforementioned technical solution constitutes a systematic solution to the problem of nonlinear distortion in high-throughput spectral lines. Its core advantage lies in its structured design, which deeply embeds domain physics knowledge into a data-driven deep learning framework, thereby achieving simultaneous improvements across multiple key performance indicators. Specifically, its advantages are mainly reflected in the following three aspects directly supported by its technical features: First, regarding input representation and model perception capabilities, the "data acquisition and preprocessing" and "dual-modal feature fusion" processes construct a deep coupling representation of physical parameters and spectral data by extending the tube current parameters in the time dimension and aligning and fusing them with the spectral sequence in the channel dimension. This design enables the model to explicitly perceive and learn the differentiated modulation patterns of radiative flux changes in the spectral response of different energy channels, thereby enhancing the model's adaptive correction capability for dynamically changing operating conditions. Second, regarding the physical reliability of the output results, the "hard threshold truncation function" introduced in "feature extraction and physical constraint reconstruction," based on the detector's theoretical response, acts as an embedded physical boundary constraint, forcibly limiting the network output to a physically feasible range. This effectively prevents the model from generating artifacts that violate physical laws, ensuring the fundamental rationality of the corrected spectrum in terms of photon count and energy distribution. Finally, regarding the comprehensive guidance of model optimization, the multi-objective joint loss function constructed in "model training," which includes a "global energy conservation constraint term" and a "feature peak fidelity term," guides the model to simultaneously pursue numerical accuracy, overall energy conservation, and key feature fidelity during training. This avoids the smoothing or distortion of characteristic peaks that may result from optimizing only a single point-by-point error, and improves the usability of the calibrated spectrum in subsequent tasks such as substance identification.
[0008] In summary, this scheme forms a complete enhancement loop through targeted design of three stages: perception, reconstruction, and optimization. Its advantages are concentrated in the following aspects: enhancing the model's ability to perceive complex physical relationships through dual-modal fusion; ensuring the reliability of the output results through embedded physical constraints; and guiding the model to achieve optimal overall performance through multi-objective optimization. These technical features work together to enable the scheme to more reliably and accurately recover high-fidelity spectra that conform to physical laws, compared to traditional methods that ignore the dynamic influence of physical parameters or lack strict physical constraints.
[0009] In some embodiments, the time-dimensional expansion of the standardized tube current parameters in the dual-modal feature fusion specifically involves: By using the Kronecker product, the scalar tube current parameters are multiplied by an all-one vector to generate a sequence vector of physical parameters of the same length as the number of spectral energy channels.
[0010] The above technical solution provides a structured foundation for achieving deep fusion of physical parameters and spectral data at the channel level. Specifically, its advantages are reflected in the following three aspects: First, regarding dimensional alignment and structural consistency, this operation uses mathematical rules to copy and expand a single scalar value into a vector with the same length as the number of detector energy channels. This ensures matching in the data structure dimension when subsequently concatenating or fusing with spectral feature vectors, creating the prerequisite for channel-by-channel correlation calculations. Second, regarding preserving and transmitting global information of physical parameters, the sequence vector generated by this operation has a value at each position that is equivalent to the original normalized tube current parameter. This means that the complete scalar information of the physical control parameters is transmitted undiminished and unambiguously to every time step of the sequence (i.e., every energy channel), allowing the model to "perceive" the exact same global operating conditions when processing data from each channel. Finally, regarding providing clear physical interpretation and computational efficiency, compared to mapping scalars to sequences with different values through complex neural networks, this method of multiplying a Kronecker product with an all-one vector has a clear and direct physical meaning (i.e., "the same current value acts on all channels"), and as a linear operation, it has extremely low computational overhead, introducing almost no additional model parameters or training burden.
[0011] In summary, this scheme connects scalar physical parameters with high-dimensional spectral sequence data through a mathematically clear and computationally simple operation.
[0012] In some embodiments, during feature extraction and physical constraint reconstruction, when using a hard threshold truncation function for physical upper limit constraint, a truncation operation is performed in forward propagation, and a pass-through estimator mechanism is used in backpropagation to maintain gradient flow.
[0013] The above technical solution effectively solves the optimization problem arising from embedding physical hard constraints into trainable neural networks through a deterministic algorithm strategy. Specifically, its advantages are reflected in two parallel aspects: First, it ensures the deterministic physical compliance of the output results. The hard thresholding operation in forward propagation enforces the network output within the theoretical upper limit calculated based on the prior physical model using deterministic mathematical rules, providing a fundamental guarantee for the reliability of the correction results. Second, it maintains the feasibility of model parameter optimization. Since the hard thresholding function is not differentiable at the threshold point, directly embedding it into the network would cause gradient vanishing at that point, hindering training. The pass-through estimator mechanism constructs a gradient path compatible with complex forward mappings by defining its backpropagation gradient as 1, allowing the error signal to be backpropagated through this constraint layer, thereby ensuring that the entire network can perform effective gradient descent optimization.
[0014] In summary, the advantages of this scheme are that by separating the logic of forward inference and backward propagation, it simultaneously achieves the output's compliance with physical rules and the mathematical completeness of the model training process.
[0015] In some embodiments, the global energy conservation constraint term in the multi-objective joint loss function is used to constrain the deviation between the total photon flux of the corrected spectrum and the true total photon flux.
[0016] In the above technical solution, from the perspective of optimization objectives, the model is given a clear direction for recovering key macroscopic physical properties of the spectrum, in order to address and alleviate the core physical problem of photon "count loss" caused by pulse stacking effect. Specifically, its advantages are reflected in the following two aspects: First, in correcting specific physical distortions, this constraint term drives the model to learn and compensate for the nonlinear counting loss caused by pulse stacking by calculating and minimizing the deviation of the total photon flux between the corrected spectrum and the true spectrum. This makes the model's optimization objective no longer merely similarity in spectral morphology, but also includes the inherent requirement of restoring the correct physical quantities. Second, in improving the overall performance of the model, this constraint term complements the "point-by-point reconstruction error term" and the "characteristic peak fidelity term." The "point-by-point error term" ensures detailed fitting of the spectral curve morphology, the "characteristic peak fidelity term" focuses on the accuracy of local key features, and the "global energy conservation constraint term" guarantees the correctness of the overall physical quantities of the spectrum. The three work together to guide the model to seek an optimal solution that approximates the true values in terms of microscopic morphology, key features, and macroscopic physical quantities, avoiding the mean regression or feature distortion problems that may occur when optimizing only a single objective.
[0017] In summary, this scheme constrains the output space of the model, making the correction results not only similar in waveform but also closer to the distortion-free real state in physical essence, thus enhancing the physical credibility and overall effectiveness of the correction scheme.
[0018] In some embodiments, the characteristic peak fidelity term in the multi-objective joint loss function is used to constrain the difference between the characteristic peak amplitude of the corrected spectrum and the true characteristic peak amplitude.
[0019] The above technical solution specifically enhances the model's ability to recover key local extrema features in the spectrum, improving the usability and accuracy of the corrected spectrum in substance identification and qualitative analysis. Specifically, its advantages are reflected in the following two technical aspects: First, characteristic peaks (such as absorption edges) in X-ray absorption spectra serve as fingerprints for identifying and distinguishing the chemical composition of different substances. This constraint term, by comparing and minimizing the difference between the predicted and actual characteristic peak amplitudes, guides the model's optimization focus to these crucial local features for subsequent analysis, effectively preventing the model from unintentionally smoothing or weakening these key but potentially low-amplitude peak positions when optimizing overall waveform similarity. Second, this characteristic peak fidelity term, together with the "global energy conservation constraint term" and the "point-by-point reconstruction error term," constitutes a multi-scale constraint. The "point-by-point error term" ensures a basic fit of the spectral curve on each discrete energy channel, the "global constraint term" ensures the accuracy of physical quantities, and the "characteristic peak fidelity term" ensures the geometric fidelity of the local topological features most sensitive to substance identification. These three elements work together to ensure that the model output closely approximates reality in terms of macroscopic physical quantities, microscopic waveform details, and key fingerprint features.
[0020] In summary, this approach closely aligns the model optimization process with the final spectral application objective (substance identification), thereby significantly improving the practical effectiveness of the calibration results in addressing the problem of "difficulty in distinguishing substances with similar chemical compositions" and enhancing the overall value of the approach.
[0021] In some embodiments, the multi-objective joint loss function further includes a spectral morphology linear correlation regularization term, used to maximize the Pearson correlation coefficient between the corrected spectrum and the true spectrum.
[0022] In the above technical solution, a metric that is more sensitive to the overall waveform similarity of the spectrum is introduced into the loss function. This effectively compensates for the shortcomings of the pointwise error metric in optimizing the objective, guiding the model to focus on and maintain the global distribution pattern of the spectrum. Specifically, its advantages are reflected in the following two aspects: First, regarding the complementarity and higher-order consistency of optimization objectives, metrics such as mean squared error (MSE) focus on the absolute numerical accuracy of each independent data point, but may not be sensitive enough to translation, scaling, or local distortions of the overall waveform. The Pearson correlation coefficient measures the linear correlation between two sets of data in their trends, and its optimization objective directly aims to make the overall "shape" of the predicted spectrum consistent with the true spectrum. Even if there are systematic scaling differences in the absolute counts of the two, a high correlation coefficient can still be obtained as long as the change patterns are highly consistent. Using this as a loss term, in conjunction with MSE optimization, can help the model better reproduce the macroscopic fluctuations and trends of the spectrum while ensuring numerical accuracy. Second, in terms of enhancing the model's generalization ability and robustness, since this loss term focuses on morphological correlation rather than absolute strength, it helps to reduce the model's overfitting to the absolute count levels of specific samples, encouraging the model to learn more universal spectral distortion and correction patterns. When faced with inputs that are not fully covered by training data or contain slight noise, this constraint helps to output a more morphologically reasonable spectrum, improving the stability of the correction scheme.
[0023] In summary, this scheme introduces a higher-order optimization objective based on statistics and focusing on the similarity of the overall distribution. This adds an explicit requirement for global morphological consistency to numerical regression. This makes the model's optimization direction more comprehensive, pursuing not only "numerical similarity" but also "morphological similarity," thereby further improving the fidelity and reliability of the correction results from the perspective of the overall distribution.
[0024] In some embodiments, during the data acquisition and preprocessing, the physical strength conservation factor corresponding to the current conditions of each tube is calculated and stored synchronously during normalization processing, and is used for physical consistency verification or loss calculation in the model training.
[0025] In the above technical solution, key scalar parameters determined by hardware physical characteristics are decoupled from the data and made explicit, providing an independent, stable, and interpretable benchmark reference for subsequent physical consistency optimization of the model. Specifically, its advantages are reflected in the following two aspects: First, regarding ensuring the complete preservation and accurate traceability of physical quantity information, since the normalization process of spectral data loses absolute intensity information, the physical intensity conservation factor (which typically characterizes the total attenuation ratio of the distorted spectrum relative to the standard background under a specific tube current) is calculated synchronously and stored independently, thus completely preserving the physical truth value of the total system response level that varies depending on the operating condition (tube current). This avoids the need for the model to infer this information from the normalized data later, ensuring the accuracy of the benchmark. Second, regarding providing direct physical supervision signals for model training, the stored factor can be directly used to construct physical constraints during training, such as for calculating the true total flux benchmark in the loss of the "global energy conservation constraint term," or as a criterion for physical consistency verification. This introduces a deterministic physical truth value to the data-driven model that does not depend on the model's own output, enabling model optimization to be explicitly guided to recover the correct physical magnitude, enhancing the physical orientation of the training process and the interpretability of the results.
[0026] In summary, this scheme transforms the physical response characteristics of the front-end hardware system into a constraint that can be directly invoked by the back-end optimization algorithm during the preprocessing stage, thereby realizing the transfer and utilization of physical prior knowledge in the data processing flow.
[0027] According to another aspect of the present invention, a spectral line correction system based on dual-modal projection and multi-objective optimization is provided, wherein the system comprises, based on the above method: The data acquisition and preprocessing module is used to acquire distorted X-ray absorption spectrum data and corresponding background spectrum data collected under different tube current conditions, normalize the spectrum data, extract spectral feature vectors characterizing the decay characteristics of the material, and standardize the tube current parameters to form dual-mode preprocessed data containing spectral modes and physical control modes. The dual-modal feature fusion module is used to extend the time dimension of the standardized tube current parameters to generate a physical parameter sequence with the same dimension as the spectral feature vector; the spectral feature vector and the physical parameter sequence are fused to obtain the fused dual-modal feature tensor; The feature extraction and physical constraint reconstruction module is used to perform deep feature extraction on the dual-modal feature tensor input sequence feature extraction network to obtain high-dimensional semantic features that characterize the spectral distortion law; convert the high-dimensional semantic features into an initial predicted spectrum through a regression mapping layer; calculate the theoretical maximum photon flux of the detector in each energy channel based on the current tube current parameters, and use a hard threshold truncation function to impose a physical upper limit constraint on the initial predicted spectrum, and output the corrected spectrum; The model training module is used to construct a multi-objective joint loss function to train the encoder-decoder network and the linear projection layer; wherein, the multi-objective joint loss function includes at least a pointwise reconstruction error term, a global energy conservation constraint term, and a feature peak fidelity term; The model optimization and spectral line correction module is used to optimize model parameters through optimization algorithms and apply the trained model to correct the input spectrum.
[0028] In order to better utilize the above methods, this application proposes a spectral line correction system based on dual-modal projection and multi-objective optimization. Each module corresponds to a step of the above methods, and its specific principle has been described above and will not be repeated here.
[0029] According to another aspect of the present invention, a spectral line correction device based on dual-modal projection and multi-objective optimization is provided, comprising: At least one processor and a memory communicatively connected to said at least one processor; The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method described above.
[0030] In the above technical solution, to better operate and process the method, the method is stored in memory, and the processor executes the stored method. It should be noted that the principle and effect of each step have been described above and will not be elaborated upon here.
[0031] According to another aspect of the present invention, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the above-described method.
[0032] In the above technical solution, to better operate and use the method, the method is stored in a computer-readable storage medium and implemented using a processor. It should be noted that the principle and effect of each step have been described above and will not be elaborated upon here. Attached Figure Description
[0033] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 This is a flowchart illustrating an embodiment of a spectral line correction method based on dual-modal projection and multi-objective optimization according to the present invention. Figure 2 This is a schematic diagram of the technical route of an embodiment of the spectral line correction method based on dual-modal projection and multi-objective optimization of the present invention; Figure 3 This is a schematic diagram of the SpectralTransformer spectral line correction model structure of an embodiment of the spectral line correction method based on dual-modal projection and multi-objective optimization according to the present invention. Figure 4 This is a schematic diagram comparing the substance classification confusion matrix before and after correction in an embodiment of a spectral line correction method based on dual-modal projection and multi-objective optimization according to the present invention. Figure 5 This is a schematic diagram of an embodiment of a spectral line correction system based on dual-modal projection and multi-objective optimization according to the present invention. Figure 6 This is a schematic diagram of spectral distortion in photon counting detectors under different tube currents in existing technology. Detailed Implementation
[0035] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be particularly noted that the following embodiments are for illustrative purposes only and do not limit the scope of the invention. Similarly, the following embodiments are only some, not all, embodiments of the present invention, and all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0036] This invention addresses the severe spectral distortion problem of existing photon counting detectors under high-throughput X-ray irradiation. This distortion stems from spectral shifts to lower energies (leftward shift) caused by polarization effects in semiconductor materials and spectral shifts to higher energies (rightward shift) caused by pulse stacking effects in ASIC circuits, along with the loss of photon counting nonlinearity. Furthermore, existing correction algorithms often neglect the complex nonlinear coupling between X-ray tube current parameters and spectral distortion, and lack physical constraints (such as ignoring the conservation of total photon count, the accuracy of characteristic peak positions, and the linear relationship of spectral morphology). This results in limited accuracy improvement and poor physical consistency of the corrected spectrum in material classification tasks. The purpose of this invention is to provide a correction method. This method aims to explore the mechanism of spectral distortion, establish a tandem model of polarization and pulse stacking effects to obtain simulation datasets, and propose a dual-modal projection layer design that integrates tube current parameters and spectral data to enhance the model's ability to perceive nonlinear distortions under different radiative fluxes. Simultaneously, a physical constraint layer (truncation constraint) and a multi-objective joint loss function including MSE loss, relative total intensity loss, peak difference loss, and linear relationship loss are introduced into the model to jointly optimize spectral morphology fidelity and physical consistency. Ultimately, a high-precision mapping from distorted spectra to ideal spectra is achieved, effectively recovering the characteristic peaks and total photon number of the spectrum, significantly improving the accuracy of material identification and imaging quality.
[0037] Example 1 Please see Figure 1 , Figure 2 ; Figure 1 A flowchart illustrating this embodiment is shown; Figure 2 This invention demonstrates the overall technical approach of the invention, from mechanism exploration and simulation modeling to deep learning correction, and intuitively reflects the complete research ideas and scheme architecture adopted to solve the above-mentioned technical problems.
[0038] Please see Figure 1 A spectral line correction method based on dual-modal projection and multi-objective optimization, the method comprising: S1. Data acquisition and preprocessing: Acquire distorted X-ray absorption spectrum data and corresponding background spectrum data collected under different tube current conditions, normalize the spectrum data, extract spectral feature vectors characterizing the decay characteristics of the material, and standardize the tube current parameters to form dual-mode preprocessed data containing spectral modes and physical control modes. In this embodiment, during the data acquisition and preprocessing, the physical strength conservation factor corresponding to the current conditions of each tube is calculated and stored synchronously during normalization, and is used for physical consistency verification or loss calculation in the model training.
[0039] For example, this step aims to construct a high-fidelity spectral training dataset and perform standardization on the input data under physical consistency constraints. The specific implementation process is as follows: 1.1 Constructing a Multi-Condition Spectral Acquisition Space An experimental platform for an X-ray photon counting detector was built, and the tube voltage of the X-ray source was set. U The value is a constant 80 kV. The tube current scan space is defined as Ω. I Within the range of 200uA to 600uA, with Δ I = 20u A is used for discrete sampling with a step size of 20u. The sampling space can be represented as:
[0040] in, =200uA, K This represents the total number of sampling points. (For Ω) I Each current condition in Collect distorted X-ray absorption spectrum data set S dist and the corresponding standard background spectral data set S bg .
[0041] 1.2 Spectral Normalized Response Mapping To eliminate background noise and extract the essential absorption characteristics of substances, a normalization mapping process is first performed on the original spectral data. Then, by calculating the relative response intensities of the distorted spectrum and the background spectrum at each energy channel, a dimensionless feature vector characterizing the attenuation properties of the substance is extracted. This step aims to decouple the detector's baseline response from the matter absorption signal, providing physically consistent input characteristics for subsequent models. Define the first... k The original distorted spectral vector under each current condition is: The background spectral vector is ,in N The number of energy channels of the detector ( N =512). Calculate the spectral characteristic response vector. The element of its nth channel The calculation formula is as follows:
[0042] in, To prevent tiny extreme values where the denominator is zero (e.g., 1e) -8 This step preserves the relative intensity relationships between the energy level channels.
[0043] 1.3 Extraction of Physical Strength Conservation Factor because Since absolute count information is lost, a physical intensity conservation factor is needed to ensure the accurate recovery of the physical magnitude during the final reconstruction stage. Because conventional normalization loses the absolute intensity information of the spectrum (i.e., the total number of photons), a "physical intensity conservation factor" must be pre-calculated and stored to recover the physical magnitude during subsequent denormalization. This factor characterizes the ratio of the total energy attenuation of the distorted spectrum to the background spectrum under this current condition, and its calculation formula is defined in functional form:
[0044] in, It is the identity mapping function. This factor It will be retained as an independent feature for subsequent physical consistency verification of the correction results.
[0045] 1.4 Nonlinear Normalization Based on Dynamic Extrema To adapt to the input dynamic range of deep learning models and preserve the nonlinear characteristics of spectral morphology, the spectral feature response vector is... Perform interval constraint normalization. Define the normalization mapping operator. For vectors any element in Its normalized value The calculation formula is as follows:
[0046] in, and These represent the infimum (minimum) and supremum (maximum) within all energy channels of the current sample, respectively. This is the numerical stability constant. This operation precisely maps the spectral data to the (0, 1) interval while preserving the topological structure of the characteristic peaks.
[0047] 1.5 Standardized Projection of Tube Current Parameters For another branch of dual-mode input—tube current parameters To eliminate dimensional differences and match the network weight distribution, standard deviation standardization (Z-Score Standardization) or extreme value standardization is used. This embodiment uses extreme value standardization to map it to a dimensionless space:
[0048] Finally, a preprocessed dataset for model input is constructed.
[0049] S2. Dual-modal feature fusion: Extend the time dimension of the standardized tube current parameters to generate a physical parameter sequence with the same dimension as the spectral feature vector; fuse the spectral feature vector with the physical parameter sequence to obtain the fused dual-modal feature tensor; In this embodiment, the time dimension expansion of the standardized tube current parameters in the dual-modal feature fusion is specifically achieved by multiplying the scalar tube current parameters with an all-one vector through the Kronecker product operation to generate a physical parameter sequence vector of the same length as the number of spectral energy channels.
[0050] It is important to note that by extending the model to include the tube current, a global operating variable, as a "channel-level conditional variable" in the sequence modeling process, the network can learn to implement differentiated nonlinear corrections for different energy channels under different tube current conditions. This allows the network to characterize and compensate for the coupling nonlinear relationship between tube current and distortion mechanisms (polarization, accumulation, etc.). In other words, the extension is not simply adding dimensionality for its own sake, but rather to achieve "conditional channel-level mapping" and "alignment with the computational granularity of the sequence model," structurally improving the learnability and controllability of high-throughput distortion.
[0051] For example, this step aims to address the problem that a single spectral input cannot characterize the nonlinear distortion caused by changes in radiative flux. By constructing a bimodal projection layer, discrete tube current scalar parameters are mapped to a high-dimensional spectral feature space, achieving deep feature fusion of physical control parameters and spectral data. The specific implementation process is as follows: 2.1 Defining the Heterogeneous Input Space The input space of a deep learning model is defined as consisting of two heterogeneous subspaces: Spectral characteristic subspace ,in N For the detector energy channel dimension (in this embodiment) N =512). No. k The preprocessed spectral vector of each sample is represented as follows: .
[0052] Physical control subspace , No. k The normalized tube current scalar parameter corresponding to each sample is expressed as follows: c (k) .
[0053] 2.2 Temporal Expansion of Physical Parameters To achieve scalar parameters c (k) With vector data Channel-wise alignment is used to construct a time-dimensional extension operator. This operator utilizes the Kronecker Product principle to transform scalars... c (k) with all-1 vectors Perform calculations to generate a current feature vector of the same length as the spectral sequence:
[0054] in This is a single column vector, with its dimension consistent with the number of energy channels N of the detector. This step ensures that the physical control parameters have explicit feature representation at each time step of each energy channel. By transforming and upgrading the discrete "external electrical control parameters" into continuous "spatial / energy domain features," this invention breaks down the modal barrier between physical parameters and energy spectrum data. This equal-length serialization process provides an equivalent perceptual dimension for the subsequent self-attention mechanism of the Transformer architecture, enabling the model to capture the differential modulation effect of current intensity on each specific energy location channel by channel.
[0055] 2.3 Tensor Concatenation of Heterogeneous Features Constructing feature fusion operators In the feature channel dimension, the spectral vector and current eigenvector Perform the splicing operation. For the i-th energy channel node in the sequence ( Constructing a local bimodal input vector :
[0056] in, This represents a vector concatenation operation. Thus, the original one-dimensional spectral sequence is reconstructed into a sequence of length [missing information]. N A bimodal tensor sequence with a feature depth of 2 . 2.4 Nonlinear High-dimensional Projection Mapping To capture the nonlinear modulation relationship between tube current and spectral intensity, a learnable linear projection transformation is constructed. The coupling characteristics between spectral intensity and physical parameters are automatically learned using a weight matrix. The projection weight matrix is defined. and bias vector , where d modelLet be the embedding dimension of the hidden layer in the Transformer model. For the input of the i-th channel... Its projected high-dimensional feature vector The calculation is as follows:
[0057] This formula achieves a mapping from a low-dimensional physical space to a high-dimensional feature space, enabling the model to adaptively adjust its correction strategy for spectral distortion based on the magnitude of the tube current. The technical significance of this projection process lies in the fact that it not only achieves a mapping from a low-dimensional physical space to a high-dimensional semantic space, but more importantly, it allows the Transformer's attention mechanism to perceive in real time how the current magnitude changes the response weights of each energy channel. This design achieves deep decoupling and collaborative modeling of electrical parameters and physical mechanisms within the deep learning model, enabling the model to adaptively adjust the correction step size and compensation intensity for pulse stacking and polarization effects based on real-time tube current conditions, fundamentally solving the pain point of insufficient generalization ability of traditional models under dynamic conditions.
[0058] S3. Feature Extraction and Physical Constraint Reconstruction: The dual-modal feature tensor input sequence feature extraction network is used for deep feature extraction to obtain high-dimensional semantic features that characterize the spectral distortion law; the high-dimensional semantic features are converted into an initial predicted spectrum through a regression mapping layer; the theoretical maximum photon flux of the detector in each energy channel is calculated based on the current tube current parameters, and a hard threshold truncation function is used to impose a physical upper limit constraint on the initial predicted spectrum, and the corrected spectrum is output. In this embodiment, when using a hard threshold truncation function to perform physical upper limit constraints in feature extraction and physical constraint reconstruction, a truncation operation is performed in forward propagation, and a pass-through estimator mechanism is used to maintain gradient flow in backward propagation.
[0059] For example, this step aims to leverage the powerful sequence modeling capabilities of deep neural networks to map the bimodal latent space features obtained in step S2 back to the real physical photon counting space. By constructing an improved SpectralTransformer architecture, it achieves the capture of long-range spectral dependencies and the enforcement of physical consistency constraints. The specific implementation process is as follows: Please see Figure 3 The figure visually illustrates the complete process of the SpectralTransformer model proposed in this invention, including dual-modal input processing, encoder-decoder feature extraction, physical constraint layer, and multi-objective loss function feedback mechanism for training.
[0060] 3.1 Self-Attention Encoding for Globally Dependent Features The bimodal feature tensor sequence output in step S2 Enter to L In a stacked encoder structure, a multi-head self-attention operator is constructed to capture nonlocal correlations between different energy regions in the spectrum (e.g., pulse stacking effects in high-energy regions are often correlated with photon statistics in low-energy regions). For the first l Layer encoder, with input stream defined as Z (l-1) Calculate the projection matrix W of query, key, and value. Q W K W V The mathematical formal description of the self-attention mechanism is as follows:
[0061] Wherein, scaling factor This is used to prevent gradient vanishing due to excessively large dot product values. It employs a multi-head concatenation mechanism. H Attention results in each subspace yield global context features. This process allows the model to "pay attention" to the contribution weight of any position in the spectral sequence to the distortion of the current channel.
[0062] 3.2 Depth Transformation of Nonlinear Semantic Space To enhance the model's ability to fit complex distortion functions (exponential decay of polarization effects and probability distribution of pulse stacking), a position-wise feed-forward network (FFN) is introduced after the attention layer.
[0063] Define nonlinear transformation operators It includes two linear transformations and one ReLU activation function:
[0064] To address the degradation problem in deep networks, residual connections and layer normalization are introduced in each sub-layer. l The final output of the layer The iterative formula is:
[0065] After deep feature extraction by the L-layer encoder and decoder, a high-order tensor containing the physical laws of spectral distortion is obtained.
[0066] 3.3 Regression Mapping in Physical Space To address the probability distribution normalization limitation caused by the terminal softmax layer when applying traditional Transformer models to classification tasks, this invention constructs a direct regression mapping layer. A dimensionality reduction mapping operator is defined. High-dimensional semantic features are integrated using fully connected layers (MLP). Projecting onto a one-dimensional scalar space yields the unconstrained predicted photon number. :
[0067] This step removes the probability constraint of Softmax, allowing the network to output arbitrary positive real numbers, thus adapting to the continuous value characteristic of the physical quantity of photon counting.
[0068] 3.4 Physics-Informed Hard Constraints on Physical Mechanism Boundaries To ensure that the model output strictly conforms to the physical limits of photon detection, a hard threshold truncation operator based on the detector response mechanism is introduced. The physical boundary function is defined. Calculate the theoretical maximum photon flux of the i-th energy channel under ideal dead-zone-free conditions based on the current tube current parameter I. According to physical derivation, this theoretical upper limit is linearly related to the current multiplication factor M:
[0069] in, The number of photons at the reference current. The current multiplication factor is defined as the current tube current I. k With reference current I base The ratio of . Construct the final physical constraint output equations:
[0070] This formula forces the truncation of any predicted value that exceeds the physical limit by minimizing the operator. This eliminates non-physical artifacts that may occur in the early stages of model training, ensuring the physical interpretability of the corrected spectrum under the law of energy conservation.
[0071] In the parameter optimization phase of model training, to address the "vanishing gradient" problem caused by the discontinuous derivative of the hard threshold truncation operator at the boundary and the zero gradient in the truncation interval, this invention further introduces a Straight-Through Estimator (STE) mechanism. The STE mechanism solves the problem of parameter updates being impossible when the derivative of the hard threshold function is 0 in the non-zero interval by approximating the derivative of the truncation function to 1 during backpropagation. The core logic of this mechanism is that during forward propagation, the system strictly executes the aforementioned hard truncation of the physical boundary to ensure the physical rationality of the output spectrum; while during backpropagation gradient calculation, the influence of the nonlinear truncation operator is skipped, and the gradient is approximated as an identity mapping. This design has significant technical advantages: it allows the gradient information generated by the loss function to "penetrate" the physical constraint layer and be directly fed back to the front-end Transformer backbone network. Even if the model's predicted values temporarily exceed the physical possibility limit in the early stages of training, the model can still obtain a valid search direction, thereby forcing the network parameters to converge to a solution space that conforms to the physical mechanism. This strategy of "forward strict constraint and backward gradient compensation" enables a deep decoupling and fusion of deep learning's powerful nonlinear fitting capabilities with the underlying physical characteristics of the detector hardware.
[0072] S4. Model training; Construct a multi-objective joint loss function to train the encoder-decoder network and the linear projection layer; wherein, the multi-objective joint loss function includes at least a pointwise reconstruction error term, a global energy conservation constraint term, and a feature peak fidelity term; In this embodiment, the global energy conservation constraint term in the multi-objective joint loss function is used to constrain the deviation between the total photon flux of the corrected spectrum and the true total photon flux.
[0073] In this embodiment, the characteristic peak fidelity term in the multi-objective joint loss function is used to constrain the difference between the characteristic peak amplitude of the corrected spectrum and the true characteristic peak amplitude.
[0074] In this embodiment, the multi-objective joint loss function further includes a spectral morphology linear correlation regularization term, which is used to maximize the Pearson correlation coefficient between the corrected spectrum and the true spectrum.
[0075] For example, this step aims to address the "mean regression" phenomenon (i.e., fitting only the overall trend while losing high-frequency details) that often occurs in deep learning models during regression tasks. To ensure that the reconstructed spectrum strictly approximates the true physical distribution in terms of morphological topology, energy conservation, and key feature points, this invention constructs a multi-objective joint loss functional with four physical dimensions. The specific implementation process is as follows: 4.1 Defining the Composite Optimization Objective Space The model training process is formalized in the parameter space. Finding the optimal solution The optimization problem. Define a composite objective functional. This functional is a linearly weighted combination of a pointwise reconstruction error term, a global energy conservation term, an eigenvalue constraint term, and a morphological linear correlation term. Its mathematical expression is as follows:
[0076] Wherein, λ1, λ2, and λ3 are hyperparameter balancing factors used to adjust the contribution weights of different physical constraints in the gradient descent process.
[0077] 4.2 Point-wise Reconstruction Fidelity To ensure the predicted spectrum With the true spectrum A mean squared error (MSE) functional is constructed to approximate the numerical values at each discrete energy channel. For input data with batch size B and number of channels N, this term is defined as a distance measure in the L2 norm space:
[0078] This driving model learns the basic distribution profile of the spectrum, which is the cornerstone of convergence.
[0079] 4.3 Global Energy Conservation Constraint To address the nonlinear distortion of "photon loss" that occurs in photon counting detectors at high throughput, a relative loss term for total intensity is introduced. This term forces the total photon flux output by the model to be consistent with the flux in the real physical scenario, ensuring that the law of conservation of energy is enforced at the algorithm level. Its mathematical form is defined as the absolute deviation of the integral (summation) ratio:
[0080] This constraint effectively corrects the count rate loss caused by the pulse accumulation effect by penalizing the deviation in total energy.
[0081] 4.4 Feature Extremum Topology Alignment Considering that characteristic peaks in X-ray absorption spectra contain crucial information for material identification (such as K-edge absorption edges), a peak difference loss term is constructed to prevent peak clipping or shifting caused by smoothing effects. This term constrains the predicted spectral maxima to strictly approximate the true values in amplitude.
[0082] This ensures the geometric fidelity of key high-frequency features in the spectrum, which is crucial for distinguishing substances with similar chemical compositions.
[0083] 4.5 Morphological Linear Correlation Regularization To constrain the geometric similarity of the overall spectral waveform, rather than focusing solely on absolute numerical error, a linear relationship loss term based on the Pearson Correlation Coefficient is introduced. This term aims to maximize the linear covariance between the predicted and true distributions, and its formal definition is as follows:
[0084] in and These are the sample means. This constraint forces the model to learn the "shape" features of the spectrum, rather than simply regressing the "numerical" values, thereby improving the model's robustness in generalizing across different substances.
[0085] 4.6 Physical weighting of hyperparameter space Based on the sensitivity of each physical quantity to image quality, weighting coefficients are set as λ1 = 1.5 (emphasizing total energy recovery), λ2 = 0.5 (considering peak details), and λ3 = 1.0 (maintaining morphological consistency). Through this multi-objective joint optimization strategy, the model can find a Pareto optimal solution that satisfies all physical constraints in the high-dimensional feature space.
[0086] S5. Model optimization and spectral correction: The model parameters are optimized using optimization algorithms, and the trained model is applied to correct the input spectrum.
[0087] For example, this step aims to solve the multi-objective functional extremum problem defined in step S4 using a numerical optimization algorithm, thereby determining the optimal parameter set in the SpectralTransformer model. This ultimately achieves the inverse mapping from the distorted measurement space to the ideal physical space. The specific implementation process is as follows: 5.1 Mathematical Formulation of Optimization Objective The training process of a deep neural network is defined as running in the hypothesis space. Find parameters in Optimal estimate This makes it possible to use the training dataset Minimize the expected empirical risk. Construct the optimization objective equation:
[0088] in, The forward mapping function characterizing the SpectralTransformer, This is the Lagrange composite loss functional with physical constraints defined in step S4. This equation drives the model to approximate the true inverse distortion operator by minimizing the differences between the predicted and true spectra in morphology, intensity, and topology.
[0089] 5.2 Gradient Descent Dynamics Based on Adaptive Moment Estimation To achieve fast and stable convergence on high-dimensional non-convex loss surfaces, a stochastic gradient descent algorithm based on Adaptive Moment Estimation (Adam) is employed. The first-order moment estimate at time step t is defined. (Momentum) and Second Moment Estimation (Non-central variance):
[0090] The parameter update rule follows the following dynamic equation:
[0091] in, The dynamic learning rate is where and The exponential decay rate of the moment estimate is used to control the step size of parameter updates. and These are the moment estimates after bias correction. This embodiment executes the optimization process on an NVIDIA RTX 4070 computing platform, setting the training epochs to 30, and monitoring the gradient norm of the loss function on the validation set. Determine the convergence state to ensure that the model reaches a global near-optimal solution under limited computing power.
[0092] 5.3 Reconstruction of well-posed solutions to the physical inverse problem After training, fix the model parameters. Deploy the inference engine. For any input real-time distorted spectral vector and the corresponding tube current state The model outputs a reconstructed high-fidelity spectrum. :
[0093] This reconstruction process is not merely a regression of numerical values, but also a physical inverse transformation of the detector polarization and pulse stacking effects. Experimental verification shows that the reconstructed spectrum reduces the Kullback-Leibler divergence index to 1.0 × 10⁻⁶. -4 The order of magnitude is significantly better than the 1.2 × 10⁻⁶ of the traditional multilayer perceptron (MLP) method. -4 While preserving the accuracy of the characteristic peak positions, it also restored the photon count statistics suppressed by the stacking effect, providing a data foundation with physical fidelity for subsequent material identification tasks.
[0094] Compared with existing technologies, this invention significantly improves correction accuracy and material recognition rate. Compared with benchmark models that use only a single spectral input (such as MLP or conventional CNN), the SpectralTransformer model proposed in this invention achieves breakthrough improvements in several key indicators. To further verify the actual improvement effect of this invention on material recognition performance, nine polymer materials with similar physicochemical properties were selected for classification experiments. Figure 4 The comparison of the confusion matrix before and after correction is presented. Experimental data shows that the corrected spectrum improves the classification accuracy from 86.2% in the original distorted data to 95.5%. Furthermore, in terms of the Kullback-Leibler Divergence (KL) metric, which measures the similarity of spectral distributions, this invention achieves a value on the order of 1.0 × 10⁻⁴, a reduction of 85% compared to the original data and an improvement of 17% compared to traditional methods.
[0095] Furthermore, existing technologies often focus only on fitting the overall waveform, which can easily lead to clipping or shifting of key characteristic peaks. This invention introduces a multi-objective joint loss function that includes "peak difference loss" and "total intensity relative loss," forcing the model to adhere to the law of energy conservation and the physical response mechanism of the detector. Experimental results show that the corrected spectrum can still accurately recover characteristic peaks masked by pulse stacking effects under high-throughput conditions (>560 μA), effectively solving the industry problem of difficulty in distinguishing chemically similar substances (such as PC and PETG).
[0096] Furthermore, unlike traditional methods that treat tube current as a fixed parameter or ignore its influence, this invention innovatively designs a dual-modal projection layer. This architecture explicitly models the nonlinear coupling relationship between tube current and spectral distortion, enabling the model to adaptively adjust the correction strategies for polarization and pulse stacking effects based on real-time acquired current parameters. Ablation studies demonstrate that this dual-modal mechanism is key to maintaining high stability of the model within a high dynamic range (200-600 uA).
[0097] Furthermore, despite the introduction of a complex Transformer architecture, thanks to the non-autoregressive inference mechanism and efficient matrix operation design, the single inference time of this invention on mainstream computing platforms (such as NVIDIA RTX 4070) is only 4.1 ms. This demonstrates that this solution not only boasts high accuracy but also extremely high computational efficiency, fully meeting the stringent time requirements of rapid non-destructive testing in industrial production lines and real-time medical CT imaging.
[0098] It should be noted that this embodiment is mainly verified based on different tube current conditions under constant tube voltage (80kV), but the dual-modal projection architecture of this invention has inherent scalability. As an alternative, this method is also applicable to non-constant tube voltage or kVp switching scenarios. By introducing tube voltage as a third physical mode at the input, the model can learn the comprehensive influence modulation relationship of voltage changes on the energy spectrum distribution and pulse stacking effect, thereby achieving broad-spectrum correction under multi-voltage fusion. In addition, physical control parameters such as exposure time, filter thickness, or detector operating temperature can also be used as auxiliary mode inputs to this architecture to further improve the correction accuracy under complex operating conditions.
[0099] It should be noted that the "dual-modal projection layer" in this embodiment uses a vector stitching and projection method. Alternatively, gated fusion mechanisms, bilinear pooling, or cross-attention mechanisms can also be used to achieve deep coupling between spectral features and physical parameters. Any approach that introduces physical control parameters to assist in guiding spectral feature correction should fall within the scope of this patent.
[0100] It should be noted that this embodiment employs a Transformer architecture based on global self-attention. Alternatively, Long Short-Term Memory (LSTM / GRU), one-dimensional convolutional neural networks (1D-CNN), state-space models (Mamba), or generative adversarial networks (GANs) can also be used as feature extractors. As long as the proposed "multi-objective physical consistency loss function" and "bimodal projection mechanism" are used during training, similar distortion compensation effects can be achieved.
[0101] It is important to note that this embodiment is based on a cadmium telluride (CdTe) photon counting detector for verification, but the physical modeling and correction logic are also applicable to detectors made of other semiconductor materials such as cadmium zinc telluride (CZT), silicon (Si), gallium arsenide (GaAs), or selenide amorphous materials. Only the theoretical flux threshold in the physical constraint layer needs to be fine-tuned according to the charge transport characteristics of the specific material. In terms of applications, this solution is not limited to single-energy spectral material identification but can also be extended to various radiation imaging fields such as multi-energy spectral CT image reconstruction, large-aperture non-destructive testing in industry, and security inspection.
[0102] It is important to note that spectral correction differs from general sequence regression, exhibiting characteristics such as strong inter-channel coupling, sensitivity to peak shape topology, strong physical meaning of total counts, and significant variations in distortion mechanisms under high throughput with varying operating conditions. Therefore, directly transferring bimodal projection, physical hard constraints, and multi-objective losses introduces additional engineering and algorithmic challenges: for example, the different effects of the same current in different energy regions, many-to-one mappings caused by hidden state variables, boundary biases due to hard truncation, and differences in the optimality of multi-objective weights across different current segments. To address these issues, further improvements can be made without altering the core innovations: such as introducing energy region-aware current encoding / gating, introducing state proxy variables, employing a combination of soft and hard constraints or projection-type physical constraints, using peak region / peak shape topology losses, and conditionalized multi-objective weights. This allows for more robust peak shape recovery, more consistent total count conservation, and stronger downstream classification gains when real data is scarce or operating conditions are more complex.
[0103] Example 2 Please see Figure 5 A spectral line correction system based on dual-modal projection and multi-objective optimization, based on the method described in one embodiment, the system comprising: The data acquisition and preprocessing module is used to acquire distorted X-ray absorption spectrum data and corresponding background spectrum data collected under different tube current conditions, normalize the spectrum data, extract spectral feature vectors characterizing the decay characteristics of the material, and standardize the tube current parameters to form dual-mode preprocessed data containing spectral modes and physical control modes. The dual-modal feature fusion module is used to extend the time dimension of the standardized tube current parameters to generate a physical parameter sequence with the same dimension as the spectral feature vector; the spectral feature vector and the physical parameter sequence are fused to obtain the fused dual-modal feature tensor; The feature extraction and physical constraint reconstruction module is used to perform deep feature extraction on the dual-modal feature tensor input sequence feature extraction network to obtain high-dimensional semantic features that characterize the spectral distortion law; convert the high-dimensional semantic features into an initial predicted spectrum through a regression mapping layer; calculate the theoretical maximum photon flux of the detector in each energy channel based on the current tube current parameters, and use a hard threshold truncation function to impose a physical upper limit constraint on the initial predicted spectrum, and output the corrected spectrum; The model training module is used to construct a multi-objective joint loss function to train the encoder-decoder network and the linear projection layer; wherein, the multi-objective joint loss function includes at least a pointwise reconstruction error term, a global energy conservation constraint term, and a feature peak fidelity term; The model optimization and spectral line correction module is used to optimize model parameters through optimization algorithms and apply the trained model to correct the input spectrum.
[0104] In this embodiment, in order to better utilize the method described in one of the embodiments, this application proposes a spectral line correction system based on dual-modal projection and multi-objective optimization. Each module corresponds to each step of the above method, and its specific principle has been described above and will not be repeated here.
[0105] Example 3 A spectral line correction device based on dual-modal projection and multi-objective optimization includes: At least one processor and a memory communicatively connected to said at least one processor; The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method described in one of the embodiments.
[0106] In this embodiment, to better run and process the method described in one of the embodiments, the above method is stored in a memory, and the stored method is executed using a processor. It should be noted that the principle and effect of each step have been described above and will not be elaborated further here.
[0107] Example 4 A computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in one of the embodiments.
[0108] In this embodiment, to better operate and use the method described in one of the embodiments, the above method is stored in a computer-readable storage medium, and the above method is implemented using a processor. It should be noted that the principle and effect of each step have been described above and will not be elaborated further here.
[0109] The above description is only a part of the embodiments of the present invention and does not limit the scope of protection of the present invention. Any equivalent device or equivalent process transformation made based on the content of the present invention specification and drawings, or direct or indirect application in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A spectral line correction method based on dual-modal projection and multi-objective optimization, characterized in that, The method includes: Data acquisition and preprocessing: acquire distorted X-ray absorption spectrum data and corresponding background spectrum data collected under different tube current conditions, normalize the spectrum data, extract spectral feature vectors characterizing the decay characteristics of the material, and standardize the tube current parameters to form dual-mode preprocessed data containing spectral modes and physical control modes. Dual-modal feature fusion: The standardized tube current parameters are extended in the time dimension to generate a physical parameter sequence with the same dimension as the spectral feature vector; The spectral feature vector and the physical parameter sequence are fused to obtain the fused dual-modal feature tensor; Feature extraction and physical constraint reconstruction: The dual-modal feature tensor input sequence feature extraction network is used for deep feature extraction to obtain high-dimensional semantic features that characterize the spectral distortion law; The high-dimensional semantic features are converted into an initial predicted spectrum through a regression mapping layer; The theoretical maximum photon flux of the detector in each energy channel is calculated based on the current tube current parameters, and the initial predicted spectrum is physically constrained using a hard threshold truncation function to output the corrected spectrum; Model training; constructing a multi-objective joint loss function to train the encoder-decoder network and the linear projection layer; wherein, the multi-objective joint loss function includes at least a pointwise reconstruction error term, a global energy conservation constraint term, and a feature peak fidelity term; Model optimization and spectral correction: The model parameters are optimized using optimization algorithms, and the trained model is applied to correct the input spectrum.
2. The spectral line correction method based on dual-modal projection and multi-objective optimization as described in claim 1, characterized in that, In the dual-modal feature fusion, the time dimension expansion of the standardized tube current parameters is specifically achieved by multiplying the scalar tube current parameters with an all-one vector through the Kronecker product operation to generate a physical parameter sequence vector of the same length as the number of spectral energy channels.
3. A spectral line correction method based on dual-modal projection and multi-objective optimization as described in claim 1 or 2, characterized in that, In the feature extraction and physical constraint reconstruction, when using the hard threshold truncation function for physical upper limit constraint, a truncation operation is performed in forward propagation, and a pass-through estimator mechanism is used in backpropagation to maintain gradient flow.
4. The spectral line correction method based on dual-modal projection and multi-objective optimization as described in claim 1, characterized in that, The global energy conservation constraint term in the multi-objective joint loss function is used to constrain the deviation between the total photon flux of the corrected spectrum and the true total photon flux.
5. The spectral line correction method based on dual-modal projection and multi-objective optimization as described in claim 1, characterized in that, The characteristic peak fidelity term in the multi-objective joint loss function is used to constrain the difference between the characteristic peak amplitude of the corrected spectrum and the true characteristic peak amplitude.
6. The spectral line correction method based on dual-modal projection and multi-objective optimization as described in claim 1, characterized in that, The multi-objective joint loss function also includes a spectral morphology linear correlation regularization term, which is used to maximize the Pearson correlation coefficient between the corrected spectrum and the true spectrum.
7. The spectral line correction method based on dual-modal projection and multi-objective optimization as described in claim 1, characterized in that, In the data acquisition and preprocessing, the physical strength conservation factor corresponding to the current conditions of each tube is calculated and stored synchronously during normalization, and is used for physical consistency verification or loss calculation in the model training.
8. A spectral line correction system based on dual-modal projection and multi-objective optimization, characterized in that, Based on the method according to any one of claims 1-7, the system comprises: The data acquisition and preprocessing module is used to acquire distorted X-ray absorption spectrum data and corresponding background spectrum data collected under different tube current conditions, normalize the spectrum data, extract spectral feature vectors characterizing the decay characteristics of the material, and standardize the tube current parameters to form dual-mode preprocessed data containing spectral modes and physical control modes. The dual-modal feature fusion module is used to extend the time dimension of the standardized tube current parameters to generate a physical parameter sequence with the same dimension as the spectral feature vector; the spectral feature vector and the physical parameter sequence are fused to obtain the fused dual-modal feature tensor; The feature extraction and physical constraint reconstruction module is used to perform deep feature extraction on the dual-modal feature tensor input sequence feature extraction network to obtain high-dimensional semantic features that characterize the spectral distortion law; convert the high-dimensional semantic features into an initial predicted spectrum through a regression mapping layer; calculate the theoretical maximum photon flux of the detector in each energy channel based on the current tube current parameters, and use a hard threshold truncation function to impose a physical upper limit constraint on the initial predicted spectrum, and output the corrected spectrum; The model training module is used to construct a multi-objective joint loss function to train the encoder-decoder network and the linear projection layer; wherein, the multi-objective joint loss function includes at least a pointwise reconstruction error term, a global energy conservation constraint term, and a feature peak fidelity term; The model optimization and spectral line correction module is used to optimize model parameters through optimization algorithms and apply the trained model to correct the input spectrum.
9. A spectral line correction device based on dual-modal projection and multi-objective optimization, characterized in that, include: At least one processor and a memory communicatively connected to said at least one processor; The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.