An adaptive guided segmentation reconstruction method based on spectrally encoded data

By using an adaptive guided segmented reconstruction method, the structural information of the self-reference spectrum and the global initial spectrum is utilized for spectral reconstruction, which resolves the contradiction between the overall spectral shape and the recovery of local details in traditional methods, and achieves high-precision and stable spectral reconstruction results.

CN122448358APending Publication Date: 2026-07-24SHANGHAI INSTITUTE OF TECHNICAL PHYSICS CHINESE ACADEMY OF SCIENCES
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610802092.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-04
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing spectral reconstruction methods struggle to balance overall spectral continuity with local detail recovery under limited channel conditions, and rely on the reliability of fixed global parameters or reference information, resulting in unstable reconstruction results and large errors.

Method used

An adaptive guided segmented reconstruction method based on spectral encoded data is adopted. A forward model is constructed by using the master response matrix and the reference response matrix. Wavelength correlation confidence is constructed by using the structural strength, local consistency and gradient information of the self-reference spectrum and the global initial spectrum. Segmentation and multi-constraint local optimization are performed, and finally overlapping fusion and global refinement are carried out.

Benefits of technology

It significantly improves the accuracy and stability of underdetermined spectral reconstruction, reduces reliance on human experience, enhances the recovery capability of complex spectral shapes, and is suitable for various spectral detection scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122448358A_ABST
    Figure CN122448358A_ABST
Patent Text Reader

Abstract

The application discloses a kind of adaptive guiding segmented reconstruction methods based on spectral encoding data, belong to spectral detection technical field.The method includes: obtaining main response and reference response vector, based on main response inversion global initial spectrum, based on reference response inversion self-reference spectrum;Utilize the structure intensity of global initial spectrum and self-reference spectrum, consistency and gradient information to construct wavelength-related confidence, realize flexible guidance;According to the fusion target spectrum in spectral valley region, adaptive segmentation with band overlap is carried out;In each segment, a multi-constraint optimization model containing data fidelity, smoothing, reference consistency, gradient consistency and anchoring term is established to solve local spectrum;Finally, the final spectrum is obtained by overlapping fusion and global refinement.The present application can adaptively recover complex peak shape and absorption valley without human intervention, significantly improve the accuracy and stability of underdetermined spectral reconstruction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of spectral detection technology and relates to an adaptive guided segmented reconstruction method based on spectral encoded data. Specifically, it relates to a method for achieving target spectral reconstruction under limited channel response conditions by utilizing self-reference spectrum guidance, multi-constraint segmented optimization, and global refinement. It can be applied to miniature spectrometers, infrared spectral detection, material identification, gas detection, computational imaging, and low-channel spectral sensing systems. Background Technology

[0002] Spectroscopic detection technology can analyze the composition, state, and structure of a target by acquiring its radiation, reflection, or transmission characteristics at different wavelengths. Traditional high-resolution spectroscopic detection systems typically rely on spectroscopic structures such as gratings, prisms, and Fourier interferometers. While these systems can achieve high spectral resolution, they often suffer from problems such as large size, complex structure, high cost, and difficulty in integration.

[0003] In recent years, with the development of miniature spectrometers, computational spectrometers, and multi-channel spectral sensors, acquiring compressed measurement signals using a limited number of response channels and then reconstructing continuous spectra using inversion algorithms has become an important technical approach. This type of method typically represents the spectral reconstruction process as a forward model:

[0004] ,

[0005] in, This represents the finite-dimensional response vector obtained by the sensor. Represents the system response matrix. Indicates the spectrum to be reconstructed. This indicates measurement noise.

[0006] However, in practical applications, the number of response channels is usually much smaller than the number of discrete wavelength points in the spectrum to be reconstructed. Therefore, this problem is a typical underdetermined, ill-conditioned inverse problem. Different spectra may produce similar response vectors. Column correlation of the response matrix, measurement noise, local absorption dips, differences in peak width, and complex multi-peak structures can all lead to problems such as oversmoothing, peak position shift, loss of local details, or even spurious peaks in the reconstruction results.

[0007] Existing spectral reconstruction methods mainly include Tikhonov regularization, non-negative least squares, sparsity constraints, dictionary learning, Gaussian function expansion, and data-driven neural network methods. Among these, analytical methods based on global regularization or fixed global parameters have advantages such as clear physical meaning and less dependence on training samples. However, when the target spectrum simultaneously contains broad peaks, narrow peaks, absorption valleys, and multi-peak stacking structures, fixing global parameters makes it difficult to balance overall smoothness and local resolution. If the regularization is too strong, it can easily cause peak broadening and loss of detail; if the regularization is too weak, it can easily amplify noise and introduce unstable oscillations.

[0008] Furthermore, existing methods typically perform a single global inversion directly from the master measurement response, lacking auxiliary reference information for the target spectral shape. When the number of channels in the master response matrix is ​​limited or the column correlation is strong, relying solely on the master response matrix for inversion can easily lead to solution drift. Although some methods can introduce reference spectra or prior templates, if the reference information is used as a rigid constraint, it may cause erroneous guidance in bands where the reference information is unreliable, affecting the final reconstruction accuracy.

[0009] While deep learning-based spectral reconstruction methods perform well in certain scenarios, their performance is highly dependent on the quality and size of the training dataset, and their generalization ability is limited when faced with test samples with different distributions than the training data. Furthermore, the black-box nature of deep networks results in poor physical interpretability, making them unsuitable for applications requiring high interpretability.

[0010] Therefore, a new spectral reconstruction method is needed to fully utilize multi-source response information under limited channel conditions, while maintaining the overall spectral continuity and improving the recovery ability of local peaks, absorption valleys and complex spectral structures. Summary of the Invention

[0011] To address the aforementioned technical problems, this invention provides an adaptive guided segmented reconstruction method based on spectral encoded data. This method utilizes reference response to invert the self-reference spectrum and achieves high-precision spectral reconstruction under limited channel conditions through confidence-based flexible guidance and adaptive segmented multi-constraint optimization.

[0012] To achieve the above objectives, the present invention adopts the following technical solution:

[0013] An adaptive guided segmented reconstruction method based on spectral encoded data includes:

[0014] Step 1: Obtain the main response vector of the target under test in the main measurement channel, and obtain the reference response vector of the target under test in the reference measurement channel;

[0015] Step 2: Establish the master response matrix and the reference response matrix, and construct a forward model between the finite channel response and the reconstructed spectrum of the target.

[0016] Step 3: Based on the master response matrix, Gaussian function expansion, non-negative constraint least squares and regularization constraints, obtain the global initial spectrum of the target to be tested;

[0017] Step 4: Invert the reference response vector based on the reference response matrix to obtain the self-reference spectrum;

[0018] Step 5: Construct wavelength correlation confidence based on the structural strength, local consistency, and structural gradient between the global initial spectrum and the self-reference spectrum;

[0019] Step 6: Construct a fused target spectrum based on the wavelength correlation confidence level, and divide the entire wavelength band of the target under test into overlapping segments according to the fused target spectrum;

[0020] Step 7: Establish a multi-constraint local optimization model within each segment, and solve the local reconstruction spectrum of the segment by combining the data fidelity term, ridge regularization term, smoothing term, reference consistency term, gradient consistency term, and anchoring term.

[0021] Step 8: Weighted fusion of overlapping regions of adjacent segments is performed, and global refinement is carried out across the entire band of the target under test to obtain the final reconstructed spectrum.

[0022] Furthermore, in step 2, the master response vector is represented as the product of the master response matrix and the spectrum to be reconstructed, plus the master measurement noise, to establish a forward model of the master measurement system; the reference response vector is represented as the product of the reference response matrix and the same spectrum to be reconstructed, plus the reference measurement noise, to establish a forward model of the reference measurement system.

[0023] Furthermore, in step 3, the spectrum to be reconstructed is represented as a linear combination of multiple Gaussian functions; the Gaussian function dictionary matrix is ​​multiplied by the principal response matrix to construct an equivalent observation matrix; under non-negative constraints, the magnitude of the Gaussian function coefficients and the second-order difference variation of the spectrum are suppressed simultaneously, and the least squares problem between the equivalent observation matrix and the principal response vector is solved to obtain the Gaussian function coefficients; the Gaussian function coefficients are multiplied by the Gaussian function dictionary matrix to obtain the global initial spectrum.

[0024] Furthermore, in step 4, based on the reference response matrix and the reference response vector, an optimization problem with regularization constraints is solved to obtain a self-reference spectrum, and the self-reference spectrum is then subjected to nonnegativity and smoothing processing.

[0025] Furthermore, in step 5, the intensity of the global initial spectrum and the self-reference spectrum at each wavelength position is compared, and the larger one is taken as the structural intensity at the corresponding position; the closeness between the global initial spectrum and the self-reference spectrum at each wavelength position is calculated as the local consistency at the corresponding position; the rate of change of the structural intensity along the wavelength direction is calculated and normalized as the structural gradient at the corresponding position; the structural intensity, the local consistency, and the structural gradient are fused according to a preset contribution ratio, and the fusion result is subjected to amplitude limiting processing to obtain the wavelength correlation confidence.

[0026] Furthermore, in step 6, for each wavelength position, the self-reference spectrum and the global initial spectrum are weighted and fused using the wavelength correlation confidence as the weight to obtain the fused target spectrum for the entire band; the initial boundary is obtained according to the preset number of segments, and a search window is set within a preset range of each initial boundary. The local low value position of the fused target spectrum is found within the search window as the actual segment boundary, and an overlapping region is set between adjacent segments so that the local reconstruction results of adjacent segments can smoothly transition in the overlapping part.

[0027] Furthermore, in step 7, the corresponding segment of the self-reference spectrum is fused with the current segment spectrum using the wavelength correlation confidence as a weight to construct a local target spectrum, which serves as the guiding target for the reference consistency term. The average value of the current segment spectrum and the initial segment spectrum is used as the anchor spectrum. Under multiple candidate Gaussian kernel widths, a multi-constraint optimization problem with the data fidelity term, the ridge regularization term, the smoothing term, the reference consistency term, the gradient consistency term, and the anchor term is solved to obtain multiple candidate local reconstructed spectra. The performance of each candidate local reconstructed spectrum in terms of data fitting degree, reference spectrum matching degree, anchor spectrum deviation degree, and spectral smoothness degree is comprehensively compared, and the one with the best score is selected as the local reconstructed spectrum of the corresponding segment.

[0028] Furthermore, in step 8, for the overlapping regions of adjacent segments, a gradual weighting method is used to fuse the local reconstructed spectra on both sides, so that the segment boundaries are smoothly transitioned to obtain the segmented fused spectrum of the entire band; the median of the optimal Gaussian kernel width selected for each segment is used as the representative kernel width, and the global Gaussian dictionary is reconstructed under the representative kernel width; the segmented fused spectrum is used as the anchoring constraint, and the fused target spectrum is used as the reference constraint to solve the global constrained optimization problem again to obtain the final reconstructed spectrum.

[0029] In a second aspect, the present invention provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the aforementioned adaptive guided segmented reconstruction method based on spectral coded data.

[0030] Thirdly, the present invention provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enable the processor to implement the aforementioned adaptive guided segmented reconstruction method based on spectral encoded data.

[0031] The beneficial effects of this invention are as follows:

[0032] First, it significantly improves the accuracy and stability of underdetermined spectral reconstruction. This invention overcomes the limitations of traditional methods that rely solely on the master response matrix for single global inversion. By introducing a self-reference spectrum obtained from the inversion of the same target reference response as a structural prior, and constructing wavelength correlation confidence based on the structural strength, local consistency, and gradient changes between the global initial spectrum and the self-reference spectrum, it achieves adaptive flexible weighting of reference information, effectively avoiding excessive influence of unreliable prior information on the reconstruction results. Simultaneously, through adaptive segmentation based on the guiding spectrum, multi-constraint local optimization, and overlapping fusion and global refinement, it significantly improves the recovery capability of narrow peaks, multi-peak superposition structures, and absorption valleys in complex spectral shapes without requiring manual pre-setting of smoothing parameters. This greatly improves problems such as peak position shift and loss of local details in traditional methods.

[0033] Second, it significantly reduces reliance on human experience and enhances the intelligence level of the algorithm. This invention employs adaptive Gaussian kernel width selection, flexible weighting based on confidence-based reference information, automatic segment boundary positioning in spectral valley regions, and a multi-round iterative optimization mechanism. This enables the reconstruction algorithm to autonomously adjust its reconstruction strategy based on the local structural features of the target spectrum. This not only significantly reduces reliance on manually preset parameters such as regularization coefficients, smoothed full width at half maximum (FWHM), and the number of segments, but also enhances the algorithm's generalization ability in different application scenarios, providing reliable technical support for automated spectral detection and recognition for non-professional users.

[0034] Third, it has a wide range of applications. This invention is applicable to various underdetermined spectral reconstruction scenarios where the number of main measurement channels is much smaller than the number of spectral sampling points. It is especially suitable for miniaturized computational spectrometers, Fabry-Perot filtered spectral detection systems, limited-channel infrared spectral detection systems, on-chip spectral sensing systems, and portable spectral analysis devices. It can also be extended to reconstruction tasks of various one-dimensional spectral signals such as infrared spectroscopy, visible light spectroscopy, Raman spectroscopy, and fluorescence spectroscopy. Attached Figure Description

[0035] Figure 1This is an overall flowchart of an adaptive guided segmented reconstruction method based on spectral encoded data according to the present invention;

[0036] Figure 2 This is a schematic diagram of the spectral forward measurement model of the present invention;

[0037] Figure 3 This is a schematic diagram illustrating the self-reference spectrum construction and confidence estimation of the present invention;

[0038] Figure 4 This is a schematic diagram of the overlapping segmentation and boundary search of the present invention;

[0039] Figure 5 This is a schematic diagram of the piecewise multi-constraint optimization model of the present invention;

[0040] Figure 6 This is a schematic diagram of the weighted fusion and global refinement of the overlapping area in this invention;

[0041] Figure 7 This is a diagram showing the single-peak reconstruction effect of different center wavelengths in this invention;

[0042] Figure 8 This is a diagram showing the effect of bi-peak reconstruction at different center wavelengths according to the present invention. Detailed Implementation

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

[0044] The purpose of this invention is to address the problems of strong ill-conditioning in spectral reconstruction under limited-channel conditions, the need for manual adjustment of parameters such as the full width at half maximum (FWHM) and full width at half maximum (FWHM) in traditional global regularization methods, and the difficulty in balancing overall spectral continuity with local detail recovery. To this end, an adaptive guided segmented reconstruction method based on spectral encoded data is proposed: a global initial spectrum is obtained through the master response matrix; the reference response is used to invert the reference spectrum as a structural prior; and wavelength correlation confidence is constructed based on the consistency and gradient information of the two, achieving adaptive weighting of the reference information; further, through overlapping segmentation, multi-constraint local optimization, and overlapping fusion and global refinement, the smoothing and fitting weights of different spectral segments are adaptively adjusted without manual intervention, thereby stably recovering complex peak shapes, absorption valleys, and multi-peak structures under underdetermined conditions. Specifically, as shown below... Figure 1 As shown, the method includes:

[0045] Step 1: Obtain the main response vector of the target under test in the main measurement channel, and obtain the reference response vector of the target under test in the reference measurement channel;

[0046] Step 2: Establish the master response matrix and the reference response matrix, and construct a forward model between the finite channel response and the reconstructed spectrum of the target.

[0047] Step 3: Based on the master response matrix, Gaussian function expansion, non-negative constraint least squares and regularization constraints, obtain the global initial spectrum of the target to be tested;

[0048] Step 4: Invert the reference response vector based on the reference response matrix to obtain the self-reference spectrum;

[0049] Step 5: Construct wavelength correlation confidence based on the structural strength, local consistency, and structural gradient between the global initial spectrum and the self-reference spectrum;

[0050] Step 6: Construct a fused target spectrum based on the wavelength correlation confidence level, and divide the entire wavelength band of the target under test into overlapping segments according to the fused target spectrum;

[0051] Step 7: Establish a multi-constraint local optimization model within each segment, and solve the local reconstruction spectrum of the segment by combining the data fidelity term, ridge regularization term, smoothing term, reference consistency term, gradient consistency term, and anchoring term.

[0052] Step 8: Weighted fusion of overlapping regions of adjacent segments is performed, and global refinement is carried out across the entire band of the target under test to obtain the final reconstructed spectrum.

[0053] Furthermore, in step 1,

[0054] The target under test is placed in the spectral measurement system, so that the radiation emitted by the target or the light beam reflected or transmitted by the target is simultaneously or time-divisionally incident on the main measurement channel and the reference measurement channel. The main measurement channel includes a first spectral modulation device and a first detector, used to obtain the response value under the main measurement channel, forming a main response vector. The reference measurement channel includes a second spectral modulation device and a second detector, used to obtain the response value under the reference measurement channel, forming a reference response vector. The first spectral modulation device and the second spectral modulation device have different spectral response characteristics. The response information of the reference measurement channel is used to provide a structural prior that is complementary to that of the main measurement channel, to assist the subsequent adaptive segmented reconstruction process. Specifically, let the main response vector corresponding to the main measurement channel be:

[0055] ,

[0056] in, Indicates the main measurement system at The main response vector is composed of the response values ​​obtained from each main measurement channel. Number of main measurement channels.

[0057] The reference measurement channel response vector is:

[0058] ,

[0059] in, Indicates the reference measurement system at A reference response vector is composed of the response values ​​obtained from each reference measurement channel. The number of measurement channels is for reference.

[0060] Furthermore, such as Figure 2 As shown, in step 2,

[0061] Let the spectrum to be reconstructed (that is, the reconstructed spectrum of the target) be:

[0062] ,

[0063] in, Indicates by The spectral vector to be reconstructed is composed of the spectral intensity values ​​at discrete wavelength points. This represents the number of discrete wavelength points.

[0064] Establish the forward model of the master measurement system:

[0065] ,

[0066] Establish a forward model of the reference measurement system:

[0067] ,

[0068] in, Main response matrix, For reference response matrix, and These are the main measurement noise and the reference measurement noise, respectively.

[0069] Furthermore, in step 3,

[0070] To avoid the lack of global spectral shape constraints in local optimization, this invention first performs global initialization. The spectral vector to be reconstructed is represented as a linear combination of Gaussian functions:

[0071] ,

[0072] in, The Gaussian function dictionary matrix, Let be the coefficients of the basis functions to be solved. This is the width parameter of the Gaussian function.

[0073] For the Each center wavelength , corresponding to Gaussian function for:

[0074] ,

[0075] Here This represents the i-th discrete wavelength sampling point. Substituting this into the forward model of the main measurement system, we get:

[0076] ,

[0077] Define intermediate parameter A:

[0078] ,

[0079] The global initial spectrum is obtained by solving the following non-negativity-constrained optimization problem:

[0080] ,

[0081] in, Let be the ridge regularization coefficient. To smooth the constraint weights, It is a second-order difference matrix used to suppress violent spectral oscillations and maintain spectral continuity.

[0082] The basis function coefficients are obtained by solving. Then, the global initial spectrum of the target to be tested is obtained. :

[0083] ,

[0084] In multiple candidates In this process, the optimal global kernel width can be selected based on the weighted score of data fitting error and smoothing error.

[0085] Without loss of generality, the nonnegative least squares solver can be replaced by quadratic programming, projected gradient method, alternating direction multiplier method or other constrained optimization algorithms.

[0086] Furthermore, such as Figure 3 As shown, in step 4,

[0087] This invention further utilizes a reference response matrix and a reference response vector to construct a self-reference spectrum. This self-reference spectrum is neither an external standard spectrum nor a pre-stored template, but is obtained by inverting the measurement results of the same target under the reference response system.

[0088] The self-reference spectrum can be obtained by optimizing the following problem:

[0089] ,

[0090] in, This indicates a self-reference spectrum. This represents the reference coefficient.

[0091] After solving, for Nonnegation and smoothing are performed to make it serve as an auxiliary structural prior for subsequent segmented reconstruction.

[0092] Unlike directly using an external reference template, the self-reference spectrum of this invention originates from the reference measurement response of the same target, reflecting the actual spectral profile of the target under test. Unlike directly using the reference spectrum as a rigid constraint, this invention subsequently controls its participation intensity through a confidence level mechanism, thereby avoiding excessive influence of reference information on the master solution in unreliable bands.

[0093] Furthermore, such as Figure 3 As shown, in step 5,

[0094] Due to self-reference spectrum The reliability varies at different wavelengths. This invention constructs a wavelength-related confidence level, allowing the self-reference spectrum to participate in reconstruction with flexible weights.

[0095] global initial spectrum and self-reference spectrum Normalized to and Define structural strength :

[0096] ,

[0097] Define the degree of local consistency :

[0098] ,

[0099] Define structural gradient :

[0100] ,

[0101] in, This represents the normalization operator. Represents the gradient operator. Indicates structural strength The magnitude of the change in the wavelength direction.

[0102] The structural gradient The structural gradient is used to characterize the degree to which the spectral structure changes with wavelength. When the spectral curve changes gently within a certain wavelength region, the structural gradient is small; when the spectral curve exhibits local structures such as peak edges, valley edges, absorption edges, or rapid fluctuations within a certain wavelength region, the structural gradient is large. By introducing the structural gradient, the sensitivity of confidence estimation to local key structural regions can be improved, thus enabling the self-reference spectrum to play a more effective guiding role in the reconstruction process at wavelengths with significant structural changes.

[0103] Constructing wavelength correlation confidence :

[0104] ,

[0105] in, This represents a truncation function used to limit the calculated confidence level to a preset range. Based on the confidence coefficient, For structural strength The weighting coefficients, For the degree of local consistency The weighting coefficients, For structural gradient Weighting coefficients; and These represent the lower and upper limits of the wavelength-related confidence level, respectively.

[0106] When the global initial spectrum and the self-reference spectrum have high consistency within a certain wavelength region, and the local structure is relatively obvious, the weighted contributions of structure strength, local consistency degree, and structure gradient increase, thus improving the confidence level of that region. Conversely, when the difference between the two is large or the local structure is not obvious, the confidence level decreases. Therefore, the self-reference spectrum can participate in the subsequent reconstruction process with flexible weights, avoiding excessive or erroneous guidance of the reconstruction results in unreliable wavelength regions.

[0107] Furthermore, such as Figure 4 As shown, in step 6,

[0108] Based on the wavelength-related confidence level Constructing a fusion target spectrum :

[0109] ,

[0110] in, This represents element-wise multiplication. Represents the global initial spectrum. Indicates a self-reference spectrum. This represents the wavelength-related confidence vector. For the... Each wavelength position has its fused target spectrum It can be represented as:

[0111] ,

[0112] Therefore, when the confidence level at a certain wavelength position is high, the fused target spectrum inherits more information from the reference spectrum; when the confidence level at a certain wavelength position is low, the fused target spectrum retains more information from the global initial spectrum. In this way, the self-reference spectrum can participate in the reconstruction process in a flexible weighted manner, thereby improving the stability of the reconstruction results and reducing the risk of misguidance caused by unreliable reference information.

[0113] This invention does not simply divide the entire band into equal-length segments, but rather segments the spectrum based on the local structure of the target spectrum. Specifically, initial boundaries are first obtained according to a preset number of segments, and then a search window is set near each initial boundary to find local low-value locations of the target spectrum within the search window as the actual segmentation boundaries.

[0114] The reason for this is that spectral valleys are generally more suitable as segment boundaries than spectral peaks, which can reduce local distortion caused by forcibly cutting off the same spectral peak. Setting overlapping regions between adjacent segments allows for a smooth transition in the local reconstruction results of adjacent segments, reducing boundary discontinuities.

[0115] Without loss of generality, the segment boundaries can be determined based on the location of spectral valleys, gradient changes, curvature changes, or confidence distributions.

[0116] Furthermore, such as Figure 5 As shown, in step 7,

[0117] After obtaining the segmented intervals and wavelength correlation confidence levels, local optimization is performed on each spectral segment. For the first segment... There are several segments, and their corresponding wavelength index ranges are defined as follows: The length of this interval is Let the principal response matrix be... In the wavelength index range The corresponding column submatrix is The Gaussian function dictionary within this segment is ,in, is the kernel width parameter of the Gaussian function.

[0118] In order to ensure that the current segment primarily interprets measurement information not yet interpreted by other segments, the current global spectral estimate is first constructed at the [missing information]. A spectrum with zeros embedded in one segment and unchanged in other segments. And calculate the corresponding local residuals:

[0119] ,

[0120] in, The main response vector of the main measurement channel. Main response matrix, This indicates the remaining measurement information that needs to be explained for the current segment after deducting contributions from other segments.

[0121] Let the current segmented spectrum, the initial segmented spectrum, and the reference segmented spectrum be respectively: , and Let the local confidence vector be... Then, based on the local confidence vector Constructing the local target spectrum:

[0122] ,

[0123] in, This represents element-wise multiplication. The local target spectrum... This is used to introduce guiding information into the current segment using a self-reference spectrum; when the confidence level at a certain wavelength position is high, the local target spectrum inherits more information from the reference segment spectrum; when the confidence level at a certain wavelength position is low, the local target spectrum retains more information from the current segment spectrum.

[0124] Constructing the anchoring spectrum:

[0125] ,

[0126] Among them, the anchoring spectrum This is used to limit the excessive deviation of local optimization results from the current global estimate and initial reconstruction results, thereby improving the stability of the segmented reconstruction process.

[0127] Define the confidence weight matrix :

[0128] ,

[0129] Define the gradient weight matrix :

[0130] ,

[0131] in, This represents constructing a diagonal matrix from vectors. It is a vector composed of the average confidence scores of adjacent sampling points, used to assign weights to the changing trends between adjacent wavelength points.

[0132] For each candidate kernel width The following local optimization objective function is established:

[0133] ,

[0134] in, For the first The Gaussian function coefficients in each segment, and satisfy the nonnegativity constraint. ; It is a first-order difference matrix used to characterize the variation trend of the spectrum between adjacent wavelength points; It is a second-order difference matrix used to constrain the smoothness of the spectral curve; Let be the ridge regularization coefficient. To smooth the constraint weights, For reference to consistency weight, For gradient consistency weights, The anchor term weight.

[0135] The aforementioned local optimization objective function includes six types of constraint terms. Among them, the data fidelity term is used to ensure that the current piecewise reconstruction result explains as much local residual as possible within the measurement domain. The ridge regularization term is used to suppress excessively large basis function coefficients and improve solution stability; the smoothing term is used to reduce unreasonable oscillations in the local reconstruction spectrum; the reference consistency term is used to make the local reconstruction results close to the self-reference guided results at high confidence wavelength positions; the gradient consistency term is used to maintain the trend of local edges, absorption valley boundaries and spectral shape changes; and the anchoring term is used to limit the local solution from excessively shifting relative to the current global estimate and the initial reconstruction results.

[0136] The local solutions corresponding to different candidate kernel widths are scored. The scoring can comprehensively consider data residuals, reference errors, anchoring errors and smoothing errors. The local reconstruction result with the best score is selected as the output of this segment.

[0137] Furthermore, such as Figure 6 As shown, in step 8,

[0138] Because there are overlapping areas between adjacent segments, directly splicing the reconstruction results of each segment can easily lead to discontinuities or local abrupt changes at the connection points. Therefore, this invention uses triangular weights to fuse the reconstruction results of segments within the overlapping areas. Specifically, a higher weight is assigned to the current local optimum at the center of the segment, and the weight of the current segment is gradually reduced near the segment boundary, gradually transitioning to the existing global estimate or the estimate of adjacent segments.

[0139] Without loss of generality, overlapping and fusion weights can also be Gaussian weights, cosine weights, or linearly increasing and decreasing weights.

[0140] The above method allows for a smooth transition of local reconstruction results at segment boundaries, reducing boundary artifacts introduced by segment reconstruction. In a preferred embodiment, the entire segment update process performs at least two iterations, enabling the local improvements obtained in the previous iteration to continue to propagate to adjacent intervals in the subsequent iteration, thereby further improving the consistency of global reconstruction.

[0141] After completing all segment updates, this invention does not directly use the segment splicing result as the final spectrum, but further performs a global refinement (the global refinement stage can use the median kernel width, average kernel width, or reselect the kernel width based on the verification error). Specifically, the median of the optimal kernel width selected for each segment is statistically analyzed and used as the representative kernel width for the global refinement stage; a new global Gaussian dictionary is established under this kernel width, and the fused spectrum is used as the anchor prior, with the fused target spectrum as the reference prior, to solve the global constrained optimization problem again.

[0142] This global refinement process preserves the detailed information obtained from local segmented optimization while mitigating minor splicing errors that may occur during segmented updates using global consistency regression. The final output spectrum undergoes nonnegation, normalization, and Savitzky-Golay smoothing after each round of solving to suppress numerical perturbations and ensure the stability and physical plausibility of the output spectrum.

[0143] Example

[0144] This embodiment uses spectral reconstruction in the 3000–5000 nm band as an example to illustrate the specific implementation of the present invention.

[0145] The wavelength range is set to 3000–5000 nm, and the sampling step size is 5 nm. The master response matrix contains 32 channels, and the reference response matrix contains 16 channels (without loss of generality, the number of master response channels can be 8, 16, 32, 64, or other numbers, and the number of reference response channels can also be set according to the system architecture). The master response matrix is ​​constructed using a relatively wide Gaussian response function, and the reference response matrix is ​​constructed using a relatively narrow Gaussian response function (without loss of generality, the Gaussian function can be replaced by B-spline basis functions, wavelet basis functions, polynomial basis functions, or other continuous basis functions). The spectrum to be reconstructed can be a single-peak spectrum, a double-peak spectrum, a multi-peak spectrum, or a real material spectrum. The candidate Gaussian kernel width set is set as follows: Set the ridge regularization coefficient as follows: Set the smoothing constraint weights as follows: Set the reference consistency weight as follows: Set the gradient consistency weights as follows: Set the number of segments to 4 and the number of overlapping points between adjacent segments to 8.

[0146] Based on the master response matrix and the principal response vector The equivalent observation matrix is ​​constructed using Gaussian function expansion:

[0147] ,

[0148] For each candidate kernel width Solve the nonnegativity-constrained optimization problem to obtain candidate initial spectra. Then, select the optimal kernel width based on the weighted scores of data fitting error and smoothing error to obtain the global initial spectrum. .

[0149] Based on the reference response matrix and reference response vector Solve the regularized inversion problem to obtain the self-reference spectrum. The self-reference spectrum is nonnegated, normalized, and smoothed to improve its stability.

[0150] The global initial spectrum and self-reference spectrum are normalized, and the structural strength, local consistency, and gradient information are calculated. The confidence level is then constructed as follows:

[0151] ,

[0152] Then construct the fusion target spectrum:

[0153] ,

[0154] The target spectrum is divided into multiple segments with overlapping bands. For each segment, the local residual is calculated first:

[0155] ,

[0156] Then, a multi-constraint local optimization model is established to solve the candidate kernel widths respectively, and the optimal local reconstruction result of the segment is selected based on the comprehensive score.

[0157] The segmented optimization is performed in one or more rounds. In this embodiment, the segmented update is performed in two rounds.

[0158] Triangular weights are used to perform weighted fusion of overlapping regions between adjacent segments. Then, the median of the optimal kernel width of each segment is taken as the global refinement kernel width, the global dictionary is reconstructed, and a global constrained optimization is performed to obtain the final reconstructed spectrum.

[0159] like Figure 7 As shown, the single-peak reconstruction results demonstrate that the method of this invention can maintain good peak position tracking and peak shape recovery capabilities at different center wavelength positions. Figure 8 As shown, the bimodal reconstruction results demonstrate that the method of this invention can maintain good bimodal resolution even with adjacent peak structures, reducing problems such as peak merging, peak position shift, and loss of local valleys. Therefore, the method of this invention is beneficial for improving the reconstruction accuracy and stability of complex spectral structures under limited channel conditions.

[0160] In a second aspect, the present invention provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the aforementioned adaptive guided segmented reconstruction method based on spectral coded data.

[0161] Thirdly, the present invention provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enable the processor to implement the aforementioned adaptive guided segmented reconstruction method based on spectral encoded data.

[0162] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. An adaptive guided segmented reconstruction method based on spectral encoded data, characterized in that, include: Step 1: Obtain the main response vector of the target under test in the main measurement channel, and obtain the reference response vector of the target under test in the reference measurement channel; Step 2: Establish the master response matrix and the reference response matrix, and construct a forward model between the finite channel response and the reconstructed spectrum of the target. Step 3: Based on the master response matrix, Gaussian function expansion, non-negative constraint least squares and regularization constraints, obtain the global initial spectrum of the target to be tested; Step 4: Invert the reference response vector based on the reference response matrix to obtain the self-reference spectrum; Step 5: Construct wavelength correlation confidence based on the structural strength, local consistency, and structural gradient between the global initial spectrum and the self-reference spectrum; Step 6: Construct a fused target spectrum based on the wavelength correlation confidence level, and divide the entire wavelength band of the target under test into overlapping segments according to the fused target spectrum; Step 7: Establish a multi-constraint local optimization model within each segment, and solve the local reconstruction spectrum of the segment by combining the data fidelity term, ridge regularization term, smoothing term, reference consistency term, gradient consistency term, and anchoring term. Step 8: Weighted fusion of overlapping regions of adjacent segments is performed, and global refinement is carried out across the entire band of the target under test to obtain the final reconstructed spectrum.

2. The adaptive guided segmented reconstruction method based on spectral encoded data according to claim 1, characterized in that, In step 2, the master response vector is represented as the product of the master response matrix and the spectrum to be reconstructed plus the master measurement noise, thus establishing a forward model of the master measurement system; the reference response vector is represented as the product of the reference response matrix and the same spectrum to be reconstructed plus the reference measurement noise, thus establishing a forward model of the reference measurement system.

3. The adaptive guided segmented reconstruction method based on spectral encoded data according to claim 1, characterized in that, In step 3, the spectrum to be reconstructed is represented as a linear combination of multiple Gaussian functions; the Gaussian function dictionary matrix is ​​multiplied by the principal response matrix to construct an equivalent observation matrix; under non-negative constraints, the magnitude of the Gaussian function coefficients and the second-order difference variation of the spectrum are suppressed simultaneously, and the least squares problem between the equivalent observation matrix and the principal response vector is solved to obtain the Gaussian function coefficients; the Gaussian function coefficients are multiplied by the Gaussian function dictionary matrix to obtain the global initial spectrum.

4. The adaptive guided segmented reconstruction method based on spectral encoded data according to claim 1, characterized in that, In step 4, based on the reference response matrix and the reference response vector, an optimization problem with regularization constraints is solved to obtain a self-reference spectrum, and the self-reference spectrum is then nonnegated and smoothed.

5. The adaptive guided segmented reconstruction method based on spectral encoded data according to claim 1, characterized in that, In step 5, the intensity of the global initial spectrum and the self-reference spectrum at each wavelength position is compared, and the larger one is taken as the structural intensity at the corresponding position; the closeness between the global initial spectrum and the self-reference spectrum at each wavelength position is calculated as the local consistency at the corresponding position. The rate of change of the structural intensity along the wavelength direction is calculated and normalized to serve as the structural gradient at the corresponding location. The structural intensity, the degree of local coherence, and the structural gradient are fused according to a preset contribution ratio, and the fusion result is subjected to amplitude limiting to obtain the wavelength-related confidence level.

6. The adaptive guided segmented reconstruction method based on spectral encoded data according to claim 1, characterized in that, In step 6, for each wavelength position, the self-reference spectrum and the global initial spectrum are weighted and fused using the wavelength correlation confidence as the weight to obtain the fused target spectrum for the entire band. The initial boundary is obtained according to the preset number of segments. A search window is set within the preset range of each initial boundary. The local low value position of the fusion target spectrum is found in the search window as the actual segment boundary. An overlapping region is set between adjacent segments so that the local reconstruction results of adjacent segments can smoothly transition in the overlapping part.

7. The adaptive guided segmented reconstruction method based on spectral encoded data according to claim 1, characterized in that, In step 7, the corresponding segments of the self-reference spectrum are fused with the current segment spectrum using the wavelength correlation confidence as weight to construct a local target spectrum, which is used as the guiding target of the reference consistency term. The average value of the current segment spectrum and the initial segment spectrum is used as the anchor spectrum. Under multiple candidate Gaussian kernel widths, a multi-constraint optimization problem with the data fidelity term, the ridge regularization term, the smoothing term, the reference consistency term, the gradient consistency term, and the anchor term is solved to obtain multiple candidate local reconstructed spectra. By comprehensively comparing the performance of each candidate local reconstructed spectrum in terms of data fit, reference spectrum matching, anchor spectrum deviation, and spectral smoothness, the spectrum with the best score is selected as the local reconstructed spectrum for the corresponding segment.

8. The adaptive guided segmented reconstruction method based on spectral encoded data according to claim 1, characterized in that, In step 8, for the overlapping areas of adjacent segments, a gradual weighting method is used to fuse the local reconstructed spectra on both sides, so that the segment boundary is smoothly transitioned and the segmented fused spectrum of the whole band is obtained. The median of the optimal Gaussian kernel width selected for each segment is used as the representative kernel width. The global Gaussian dictionary is then reconstructed under the representative kernel width. The segmented fused spectrum is used as the anchoring constraint, and the fused target spectrum is used as the reference constraint. The global constrained optimization problem is solved again to obtain the final reconstructed spectrum.

9. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When one or more programs are executed by the one or more processors, the one or more processors implement the adaptive guided segmented reconstruction method based on spectral coded data as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, It stores executable instructions that, when executed by a processor, enable the processor to implement the adaptive guided segmented reconstruction method based on spectral encoded data as described in any one of claims 1-8.