Data processing method and device, equipment, storage medium and computer program product

By separating the fluorescence baseline spectrum and pure matter spectrum in the MCR-ALS algorithm, the problem of fluorescence signal interference in the Raman spectrum is solved, and the accuracy of the analysis is improved.

CN119903385APending Publication Date: 2025-04-29江苏鉴知技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410435654.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-10
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

When the prior art uses multivariate curve resolution-alternating least squares algorithm (MCR-ALS), the fluorescence signal present in the Raman spectrum interferes, resulting in the inability to accurately obtain the Raman spectrum of real pure substances, affecting the accuracy of qualitative quantitative analysis.

Method used

By obtaining the spectral data of the measured mixed substances in multiple time windows, the matrix is ​​constructed and updated to separate the fluorescence baseline spectrum and the pure matter spectrum, and a reconstruction matrix is ​​formed until the error is less than the preset threshold, and the sample data is determined.

Benefits of technology

It effectively avoids the analysis error of fluorescence baseline spectroscopy, improves the accuracy of obtaining pure material spectra and weight values, and enhances the accuracy of subsequent quantitative and trend analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119903385A_ABST
    Figure CN119903385A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device, equipment, a storage medium and a computer program product, and belongs to the technical field of data processing. The method comprises the following steps of: analyzing a first updating matrix comprising a fluorescence baseline spectrum and a pure substance spectrum through a first matrix of spectral data in a process of performing multivariate curve resolution on the spectral data of a plurality of mixtures by utilizing the characteristics that the fluorescence baseline spectrum waveform is smooth and the pure substance Raman spectrum peak waveform is sharp; the fluorescent baseline spectrum and the pure substance spectrum are distinguished from different types of rows in the first updating matrix, errors caused by the fluorescent baseline spectrum in the pure substance spectrum are avoided, the accuracy of obtaining the pure substance spectrum is improved, the fluorescent baseline spectrum is removed from the first updating matrix, and the corresponding weight value is removed from the second updating matrix, so that the accuracy of obtaining the pure substance spectrum is improved. And obtaining a spectrum matrix of the pure substance spectrum and a weight matrix corresponding to the pure substance spectrum so as to improve the accuracy of quantitative and trend analysis on the substance through the spectrum matrix and the weight matrix.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of data processing technology, and specifically relates to a data processing method, device, equipment, storage medium and computer program product. Background Art

[0002] Multivariate Curve Resolution—Alternating Least Squares (MCR-ALS) is a factor analysis technique used to analyze spectral image data and is widely used in scenarios such as chemometric analysis, microscopic imaging, and hyperspectral microarray scanning.

[0003] In the related technology, MCR-ALS can be used to distinguish the Raman spectra of different substances from the Raman spectra. However, the Raman spectra contain interference from the fluorescence signal, and the fluorescence signal will be randomly split into the Raman spectra of each substance, resulting in the inability to accurately obtain the Raman spectrum of the real pure substance, thereby affecting the accuracy of qualitative and quantitative analysis of the substance molecules using Raman spectroscopy. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a data processing method, apparatus, device, storage medium and computer program product, which can accurately obtain a true spectrum matrix of pure substances, thereby improving the accuracy of qualitative and quantitative analysis of substance molecules using Raman spectroscopy.

[0005] In a first aspect, an embodiment of the present application provides a data processing method, including:

[0006] Acquire spectral data of the measured mixed substance in M ​​time windows, the spectral data including scattering intensities of N wave numbers, and the measured mixed substance includes K substances;

[0007] According to the first matrix corresponding to the spectral data, a product matrix is ​​constructed, the product matrix is ​​a matrix obtained by multiplying the second matrix and the third matrix, the first matrix and the product matrix are matrices with M rows and N columns, the row data of the first matrix is ​​used to characterize the spectral data of the measured mixed substance within the time window, and the column data of the first matrix is ​​used to characterize the scattering intensity of the wave number;

[0008] According to the first matrix, the second matrix and the third matrix are updated to obtain a first updated matrix after the second matrix is ​​updated and a second updated matrix after the third matrix is ​​updated; wherein the first updated matrix includes first-category rows and second-category rows, the row data of the first-category rows are used to characterize the pure substance spectra of substances related to K substances, and the row data of the second-category rows are used to characterize the fluorescence baseline spectra of the mixed substances; the second updated matrix includes first-category columns and second-category columns, the column data of the first-category columns are used to characterize the weight values ​​of the pure substance spectra corresponding to the first-category rows, and the column data of the second-category columns are used to characterize the weight values ​​of the fluorescence baseline spectra corresponding to the second-category rows;

[0009] When the error value between the reconstructed matrix and the first matrix is ​​less than a preset threshold, the sample data is determined, wherein the reconstructed matrix is ​​determined by the first update matrix and the second update matrix, the sample data includes a spectral matrix and a weight matrix, the row data of the spectral matrix is ​​used to characterize the pure substance spectrum of the substance, the column data of the weight matrix is ​​used to characterize the weight value corresponding to the pure substance spectrum, and the sample data is used to perform quantitative and trend analysis on the substance.

[0010] In a second aspect, an embodiment of the present application provides a data processing device, including:

[0011] An acquisition module, used to acquire spectral data of the measured mixed substance in M ​​time windows, the spectral data including scattering intensities of N wave numbers, and the measured mixed substance includes K substances;

[0012] A construction module is used to construct a product matrix according to the first matrix corresponding to the spectral data, the product matrix is ​​a matrix obtained by multiplying the second matrix and the third matrix, the first matrix and the product matrix are matrices with M rows and N columns, the row data of the first matrix is ​​used to characterize the spectral data of the measured mixed substance within the time window, and the column data of the first matrix is ​​used to characterize the scattering intensity of the wave number;

[0013] An updating module is used to update the second matrix and the third matrix according to the first matrix, so as to obtain a first updated matrix after the second matrix is ​​updated and a second updated matrix after the third matrix is ​​updated; wherein the first updated matrix includes first-category rows and second-category rows, the row data of the first-category rows are used to characterize the pure substance spectra of substances related to K substances, and the row data of the second-category rows are used to characterize the fluorescence baseline spectra of the mixed substances; the second updated matrix includes first-category columns and second-category columns, the column data of the first-category columns are used to characterize the weight values ​​of the pure substance spectra corresponding to the first-category rows, and the column data of the second-category columns are used to characterize the weight values ​​of the fluorescence baseline spectra corresponding to the second-category rows;

[0014] A determination module is used to determine sample data when the error value between the reconstructed matrix and the first matrix is ​​less than a preset threshold, wherein the reconstructed matrix is ​​determined by the first update matrix and the second update matrix, and the sample data includes a spectral matrix and a weight matrix, the row data of the spectral matrix is ​​used to characterize the pure substance spectrum of the substance, and the column data of the weight matrix is ​​used to characterize the weight value corresponding to the pure substance spectrum, and the sample data is used to perform quantitative and trend analysis on the substance.

[0015] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, and when the program or instruction is executed by the processor, the steps of the data processing method shown in the first aspect are implemented.

[0016] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the data processing method shown in the first aspect are implemented.

[0017] In a fifth aspect, an embodiment of the present application provides a chip, the chip including a processor and a display interface, the display interface and the processor are coupled, and the processor is used to run programs or instructions to implement the steps of the data processing method shown in the first aspect.

[0018] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the data processing method shown in the first aspect.

[0019] In an embodiment of the present application, by acquiring spectral data of the measured mixed substance within M time windows, the spectral data includes the scattering intensity of N wave numbers, and the measured mixed substance includes K substances; according to the first matrix corresponding to the spectral data, a product matrix is ​​constructed, the product matrix is ​​a matrix obtained by multiplying the second matrix and the third matrix, the first matrix and the product matrix are matrices of M rows and N columns, the row data of the first matrix is ​​used to characterize the spectral data of the measured mixed substance within the time window, and the column data of the first matrix is ​​used to characterize the scattering intensity of the wave number; according to the first matrix, the second matrix and the third matrix are updated to obtain a first updated matrix after the second matrix is ​​updated and a second updated matrix after the third matrix is ​​updated; wherein the first updated matrix includes a first type of row and a second type of row, and the row data of the first type of row is used to characterize K substances. The pure substance spectrum of the substance related to the substance, the row data of the second category row is used to characterize the fluorescence baseline spectrum of the mixed substance; the second update matrix includes the first category column and the second category column, the column data of the first category column is used to characterize the weight value of the pure substance spectrum corresponding to the first category row, and the column data of the second category column is used to characterize the weight value of the fluorescence baseline spectrum corresponding to the second category row; when the error value between the reconstructed matrix and the first matrix is ​​less than a preset threshold, determine the sample data, wherein the reconstructed matrix is ​​determined by the first update matrix and the second update matrix, the sample data includes the spectral matrix and the weight matrix, the row data of the spectral matrix is ​​used to characterize the pure substance spectrum of the substance, the column data of the weight matrix is ​​used to characterize the weight value corresponding to the pure substance spectrum, and the sample data is used to perform quantitative and trend analysis on the substance. In this way, the embodiment of the present application utilizes the characteristics that the fluorescence baseline spectrum waveform is relatively gentle and the peak waveform of the Raman spectrum of a pure substance is sharp. In the process of performing multivariate curve resolution on the spectral data of multiple mixtures, the fluorescence baseline spectrum is used as a resolution target, and a first update matrix including the fluorescence baseline spectrum and the pure substance spectrum of the pure substance is resolved through the first matrix corresponding to the spectral data of the measured mixed substance. By dividing the fluorescence baseline spectrum and the pure substance spectrum of the pure substance for different category rows in the first update matrix, the error introduced by the fluorescence baseline spectrum in the spectrum to the resolution can be avoided, so that the resolved pure substance spectrum and the weight value corresponding to the pure substance spectrum are closer to the true value, thereby improving the accuracy of obtaining the pure substance spectrum and the weight value corresponding to the pure substance spectrum. Furthermore, the fluorescence baseline spectrum can be removed from the first update matrix and the second update matrix respectively, and the spectral matrix of the spectral data for characterizing the pure substance spectrum of the substance and the weight matrix for characterizing the weight value corresponding to its pure substance spectrum are obtained, which is helpful for the subsequent quantitative and trend analysis of the substance through the spectral matrix and the weight matrix, thereby improving the accuracy of the quantitative and trend analysis of the substance. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A flowchart of a data processing method provided for some embodiments of the present application;

[0021] Figure 2 A schematic diagram of spectral data of 500 time windows for a data processing method provided in some embodiments of the present application;

[0022] Figure 3 One of the spectrum schematic diagrams corresponding to the spectrum matrix of the data processing method provided in some embodiments of the present application;

[0023] Figure 4 One of the spectrum schematic diagrams corresponding to the weight matrix of the data processing method provided in some embodiments of the present application;

[0024] Figure 5 A second schematic diagram of a spectrum corresponding to a spectrum matrix of a data processing method provided in some embodiments of the present application;

[0025] Figure 6 A schematic diagram of a fluorescence baseline spectrum after analysis according to a data processing method provided in some embodiments of the present application;

[0026] Figure 7 A second schematic diagram of a spectrum corresponding to a weight matrix of a data processing method provided in some embodiments of the present application;

[0027] Figure 8 A schematic diagram of the structure of a data processing device provided for some embodiments of the present application;

[0028] Fig. 9 A schematic diagram of the structure of an electronic device provided for some embodiments of the present application;

[0029] Fig.10 A schematic diagram of the hardware structure of an electronic device provided for some embodiments of the present application. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0031] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0032] Raman spectroscopy is a type of molecular spectroscopy based on the Raman effect. The Raman effect means that when a substance is irradiated with monochromatic excitation light, a series of Raman scattered lights with wavelengths greater than or less than the wavelength of the incident light will be generated. Raman scattered lights of different intensities at different wavelengths constitute the Raman spectrum. The offset of the wavelength of these Raman scattered lights relative to the wavelength of the excitation light corresponds to the type of molecular covalent bonds of the substance, and the scattering intensity of the Raman scattered light reflects the number of covalent bonds of the molecules of the substance being measured. Therefore, Raman spectroscopy can be used to perform qualitative and quantitative analysis on the molecules of the substance.

[0033] In dangerous chemical reactions such as hydrogenation, nitration, fluorination and chlorination, it is often extremely difficult to monitor the concentration of various substances in the reaction. Traditional chromatography and nuclear magnetic resonance methods cannot withstand the high temperature, high pressure and strong corrosion of such reactions, and sampling and testing will inevitably affect the reaction. Raman spectroscopy uses probes that can withstand high temperatures, high temperatures and strong corrosion, and can be directly immersed in the reactor for non-destructive testing without sampling, making it the preferred monitoring method for such reactions.

[0034] In many hazardous chemical reactions, due to unclear reaction mechanisms and process control issues, there are often many unknown substances in the system, and their spectral contributions will introduce significant interference to the detection. Because Raman spectroscopy will simultaneously obtain spectral information of all substances during detection, the spectra formed by the molecular covalent bonds of each substance will overlap with each other, and it is difficult to directly distinguish the Raman spectra of different substances from one spectrum.

[0035] In the related art, when the MCR-ALS algorithm processes Raman spectra, it often cannot obtain the spectrum matrix of the real pure substance because the Raman spectrum contains the interference of the fluorescence baseline spectrum. The fluorescence baseline spectrum will be randomly split into the spectrum of each substance, which will interfere with the subsequent analysis and quantification. If the spectrum of each substance is first de-baselined by the baseline removal algorithm and then analyzed by the MCR-ALS algorithm, since the baseline removal algorithm is based on the characteristics of baseline smoothing, the bottom of the real Raman peak will be deducted in places where the peaks overlap severely, which will cause errors in the subsequent analysis, resulting in the inability to accurately obtain the real Raman spectrum of the pure substance, thereby affecting the accuracy of qualitative and quantitative analysis of the substance molecules using Raman spectroscopy.

[0036] In order to solve the problems in the related art, the embodiments of the present application provide a data processing method, device, equipment, storage medium and computer program product. Figures 1 to 10 , the data processing method provided in the embodiment of the present application is described in detail through specific embodiments and their application scenarios.

[0037] First, combine Figure 1 A data processing method provided in an embodiment of the present application is described in detail.

[0038] Figure 1 A flowchart of a data processing method provided for some embodiments of the present application.

[0039] like Figure 1 As shown, the data processing method includes steps 110 to 130, which are specifically as follows.

[0040] Step 110, obtaining spectral data of the measured mixed substance within M time windows, the spectral data including scattering intensities of N wave numbers, and the measured mixed substance including K substances; Step 120, constructing a product matrix according to the first matrix corresponding to the spectral data, the product matrix being a matrix obtained by multiplying the second matrix and the third matrix, the first matrix and the product matrix being matrices of M rows and N columns, the row data of the first matrix being used to characterize the spectral data of the measured mixed substance within the time window, and the column data of the first matrix being used to characterize the scattering intensity of the wave number; Step 130, updating the second matrix and the third matrix according to the first matrix, obtaining a first updated matrix after the second matrix is ​​updated and a second updated matrix after the third matrix is ​​updated; wherein the first updated matrix includes first-category rows and second-category rows, and the row data of the first-category rows are used to characterize K The first update matrix comprises a pure substance spectrum of a substance related to a substance, and the row data of the second row is used to characterize the fluorescence baseline spectrum of the mixed substance; the second update matrix comprises a first column and a second column, the column data of the first column is used to characterize the weight value of the pure substance spectrum corresponding to the first row, and the column data of the second column is used to characterize the weight value of the fluorescence baseline spectrum corresponding to the second row; step 140, when the error value between the reconstructed matrix and the first matrix is ​​less than a preset threshold, determine the sample data, wherein the reconstructed matrix is ​​determined by the first update matrix and the second update matrix, the sample data comprises a spectral matrix and a weight matrix, the row data of the spectral matrix is ​​used to characterize the pure substance spectrum of the substance, the column data of the weight matrix is ​​used to characterize the weight value corresponding to the pure substance spectrum, and the sample data is used to perform quantitative and trend analysis on the substance.

[0041] Therefore, in the embodiment of the present application, the characteristics that the fluorescence baseline spectrum waveform is relatively gentle and the peak waveform of the Raman spectrum of the pure substance is sharp can be utilized. In the process of multivariate curve resolution of the spectral data of multiple mixtures, the fluorescence baseline spectrum is used as a resolution target, and the first update matrix including the fluorescence baseline spectrum and the pure substance spectrum of the pure substance is resolved through the first matrix corresponding to the spectral data of the measured mixed substance. By dividing the fluorescence baseline spectrum and the pure substance spectrum of the pure substance for different category rows in the first update matrix, the error introduced by the fluorescence baseline spectrum in the spectrum to the resolution can be avoided, so that the resolved pure substance spectrum and the weight value corresponding to the pure substance spectrum are closer to the true value, thereby improving the accuracy of obtaining the pure substance spectrum and the weight value corresponding to the pure substance spectrum. Furthermore, the fluorescence baseline spectrum can be removed from the first update matrix and the second update matrix respectively, and the spectral matrix of the spectral data for characterizing the pure substance spectrum of the substance and the weight matrix for characterizing the weight value corresponding to its pure substance spectrum are obtained, which is helpful for the subsequent quantitative and trend analysis of the substance through the spectral matrix and the weight matrix, thereby improving the accuracy of the quantitative and trend analysis of the substance.

[0042] Based on this, the above steps are described in detail below, as shown below.

[0043] Regarding step 110 , in some embodiments of the present application, M, N and k are all integers greater than 1. Also, the number of acquired spectral data may be at least one.

[0044] In some embodiments of the present application, a first matrix may be constructed based on the spectral data in the embodiments of the present application. The first matrix is ​​a matrix of M rows and N columns, and the row data of any row in the M rows of the first matrix is ​​used to characterize the spectral data of any time window in the M time windows, and the column data of any column in the N columns of the first matrix is ​​used to characterize the scattering intensity of any wave number in the N wave numbers.

[0045] Exemplarily, a Raman spectroscopy detection system is used to collect spectral data of M time windows during the reaction process. The spectral data includes scattering intensities of N wave numbers, that is, the length of the spectral data is N. Based on this, a first matrix V of size M*N can be formed.

[0046] In some embodiments of the present application, the second matrix H can be randomly initialized by the first matrix. 初 And the third matrix W 初 Among them, the number of columns of the second matrix is ​​equal to the number of rows of the third matrix, that is, to ensure that the second matrix H 初 And the third matrix W 初 can be multiplied to construct a product matrix. And, the number of rows of the first matrix is ​​equal to the number of rows of the second matrix, and the number of columns of the first matrix is ​​equal to the number of columns of the third matrix, so that the second matrix H can be guaranteed 初 And the third matrix W 初 The dimension of the product matrix after multiplication is the same as the first dimension, that is, the product matrix is ​​also a matrix with M rows and N columns.

[0047] In step 130, the first update matrix in the embodiment of the present application is a matrix of 2K rows and N columns, the first type of rows are rows 1 to K in the first update matrix, and the second type of rows are rows K+1 to 2K in the first update matrix; the second update matrix is ​​a matrix of M rows and 2K columns, the first type of columns are columns 1 to K in the second update matrix, and the second type of columns are columns K+1 to 2K in the second update matrix. The column data of the first type of columns are used to characterize the weight value of the pure substance spectrum corresponding to the first type of rows, that is, the weight value of the pure substance spectrum of the substance related to the K substances; the column data of the second type of columns are used to characterize the weight value of the fluorescence baseline spectrum corresponding to the second type of rows, that is, the weight value of the fluorescence baseline spectrum in the mixed substance. The substances related to the aforementioned K substances may include substances remaining after the reaction, that is, substances generated by the reaction, and may also include substances originally participating in the reaction.

[0048] For example, the first update matrix may be 初The spectral matrix after analysis is H, and the size of H is 2K*N. The 2K rows in H can be divided into two categories, namely the first category and the second category. The first category is rows 1 to K, i.e. the first k rows. The row data of each row in the first k rows is used to characterize the pure substance spectrum of each pure substance related to K substances; the second category is rows K+1 to 2K, i.e. the last k rows. The row data of each row in the last k rows is used to characterize the fluorescence baseline spectrum of the measured mixed substance. The second update matrix can be W 初 The parsed spectral data is W, and the size of W is M*2K. The 2K columns in W can also be divided into two categories, namely first-category columns and second-category columns. The first-category columns are 1 to K, i.e., the first k columns. The column data of each column in the first k columns is used to characterize the weight value of the pure substance spectrum corresponding to the first-category row, i.e., the weight value corresponding to the pure substance spectrum of each pure substance related to K substances; the second-category columns are K+1 to 2K, i.e., the last k columns. The column data of each column in the last k columns is used to characterize the weight value of the fluorescence baseline spectrum corresponding to the second-category row, i.e., the weight of the fluorescence baseline spectrum of the measured mixed substance.

[0049] In some embodiments of the present application, the row data of each row in the second matrix is ​​the first preset data, the column data of each column in the third matrix is ​​the second preset data, and the multivariate curve resolution-alternating least squares method includes the non-negative least squares method. Based on this, step 130 can specifically include step 1301 and step 1302.

[0050] Step 1301, updating first preset data according to a first matrix by non-negative least squares method to obtain a first update matrix.

[0051] For example, H can be updated by iterating T times using the non-negative least squares method in the multivariate curve resolution-alternating least squares algorithm. 初 and W 初 The data of the two matrices, T is a positive integer, are as follows:

[0052] Update W by the following formula (1): 初 Column data for each column of the matrix:

[0053] min||W 初j 'HV j || 2

[0054] wxya 初j '≥0 (1)

[0055] Among them, W j 'For W 初 The jth column of the matrix, V j is the jth column of the V matrix. In this way, after T iterations, the W matrix can be obtained.

[0056] Step 1302: Update the second preset data according to the first matrix by non-negative least squares method to obtain a second updated matrix.

[0057] Exemplarily, H is updated by the following formula (2): 初 Row data for each row of the matrix:

[0058] min||H 初i WV i || 2

[0059] H 初i '≥0 (2)

[0060] Among them, H i ' is H 初 The i-th row of the matrix, V i is the i-th row of the V matrix. In this way, after T iterations, the H matrix can be obtained.

[0061] It should be noted that the multivariate curve resolution-alternating least squares algorithm in the embodiment of the present application can specifically include the non-negative least squares method. In this way, the first matrix composed of the multiple spectra collected can be alternately decomposed and calculated by the non-negative least squares method to obtain the spectral matrix H of each pure substance and the corresponding weight matrix W. The weight matrix W can be used for subsequent quantitative or trend analysis.

[0062] In step 140, two methods of determining the reconstruction matrix are provided in the embodiment of the present application. One is to construct the reconstruction matrix by the first update matrix and the second update matrix, and the other is to first obtain the target update matrix by the first update matrix, and then construct the reconstruction matrix by the target update matrix and the second update matrix. The following describes them respectively.

[0063] In some embodiments of the present application, before step 140 , the data processing method may further include step 1501 .

[0064] Step 1501: construct a reconstruction matrix corresponding to the first matrix based on the first update matrix and the second update matrix.

[0065] In some other embodiments of the present application, before step 140 , the data processing method may further include step 1502 and step 1503 .

[0066] Step 1502 , performing baseline removal processing on the pure substance spectrum corresponding to the row data of the first type of rows, and performing smoothing filtering processing on the fluorescence baseline spectrum corresponding to the row data of the second type of rows, to obtain a target update matrix corresponding to the first update matrix.

[0067] It should be noted that the target update matrix in the embodiment of the present application has the same dimension as the first update matrix, that is, it is also a matrix of 2K rows and N columns. The row data of the first type of rows in the target update matrix are used to characterize the sharp peak signal remaining after removing the smooth baseline signal from the pure substance spectrum; the row data of the second type of rows in the target update matrix are used to characterize the smooth baseline signal remaining after removing the sharp peak signal from the fluorescence baseline spectrum.

[0068] Therefore, compared with the traditional MCR-ALS algorithm, the data processing method provided in the embodiment of the present application can avoid the error introduced by the fluorescence baseline spectrum in the spectrum, so that the first update matrix (or target update matrix) and the second update matrix of the analysis are closer to the true value, which is helpful for the subsequent qualitative and quantitative analysis. Figures 2 to 6 The experimental data are used to illustrate the obtained effects.

[0069] The embodiment of the present application simulates the spectral data of different reaction moments in a chemical reaction, that is, 500 time windows, such as Figure 2 As shown in , each spectral data is the superposition of the pure material spectra of 4 pure substances, namely the Raman spectra, and the weight of each Raman spectrum changes with the reaction time. Figure 3 As shown, this is the spectrum directly parsed by the MCR-ALS algorithm in the prior art, that is, when the fluorescence baseline spectrum is not adjusted, the MCR-ALS algorithm directly parses and obtains the following Figure 3 The spectra shown in the figure show that the spectra of substance 2 and substance 4 have obvious abnormal spectral lines that are concave downward. Next, the comparison between the weight change trend obtained by analysis and the actual weight change trend is as follows Figure 4 As shown in Figure 2, we can see obvious differences between the trends. Figure 2 The spectrum shown in FIG. 1 is automatically adjusted for fluorescence baseline spectrum through the above step 1502, that is, the pure substance spectrum corresponding to the row data of the first type of row is de-baselined to obtain the pure substance spectrum as shown in FIG. Figure 5 As shown in FIG. 1 , and after smoothing and filtering the fluorescence baseline spectrum corresponding to the row data of the second type of row, the fluorescence baseline spectrum obtained is as follows: Figure 6 As shown, in this way, there will be no Figure 3 Next, the weight value change trend obtained by MCR-ALS analysis with automatic adjustment of the fluorescence baseline is compared with the actual weight change trend. Figure 7 As shown, we can see that the differences between the trends are very small and the analysis is very close to the true value.

[0070] Therefore, compared with the traditional MCR-ALS algorithm, the data processing method provided in the embodiment of the present application can avoid the error introduced to the analysis by the fluorescence baseline spectrum in the spectrum, so that the first update matrix (or target update matrix) and the second update matrix of the analysis are closer to the true value, which helps to improve the accuracy of subsequent qualitative and quantitative analysis.

[0071] It should be noted that, in the iterative calculation process of MCR-ALS in the embodiment of the present application, different constraints can be implemented on the pure substance spectrum and the fluorescence baseline spectrum, and this constraint method is applicable to other multivariate curve resolution algorithms of iterative calculation.

[0072] Specifically, step 1502 may include step 15021 and step 15022.

[0073] Step 15021: perform baseline removal processing on the pure substance spectrum corresponding to the row data of the first type of row using a baseline removal algorithm.

[0074] The baseline removal algorithm includes at least one of the following: adaptive iterative reweighted penalty least square (airPLS), polynomial fitting, B-spline fitting, and wavelet transform.

[0075] Exemplarily, the above-mentioned baseline removal algorithm is used to constrain the peak type of the analyzed pure substance spectrum, that is, the pure substance spectrum in rows 1 to k in H is baseline-removed. The purpose of the baseline removal algorithm is to remove the smooth part of the spectrum and leave the sharp peak signal.

[0076] Step 15022, calculate the width of the dynamic smoothing window according to the preset spectral resolution of the spectral measurement device, wherein the spectral measurement device is a device for obtaining spectral data of the measured mixed substance within M time windows; use the width of the dynamic smoothing window as the smoothing unit, and perform smoothing filtering on the fluorescence baseline spectrum corresponding to the row data of the second category of rows.

[0077] Exemplarily, the resolved fluorescence baseline spectrum is smoothed by: the fluorescence baseline spectra of rows k+1 to 2*k in H are smoothed and averaged for each fluorescence baseline spectrum, and the width of the smoothing window should be selected to be more than 5 times the spectral resolution of the spectral measurement device. The purpose of smoothing is to remove the sharp peak signal in the spectrum and leave only the signal of the fluorescence baseline. Here, the spectral measurement device is a device in the Raman spectroscopy detection system.

[0078] Therefore, in the embodiment of the present application, the characteristics of the relatively flat waveform of the fluorescence baseline spectrum and the sharp peak waveform of the Raman spectrum of the pure substance can be utilized. In the process of multivariate curve resolution of the spectral data of multiple mixtures, the fluorescence baseline spectrum is used as a resolution target, and a first update matrix including the fluorescence baseline spectrum and the pure substance spectrum of the pure substance is resolved through the first matrix corresponding to the spectral data of the measured mixed substance. By dividing the fluorescence baseline spectrum and the pure substance spectrum of the pure substance into different category rows in the first update matrix, the error introduced into the resolution by the fluorescence baseline spectrum in the spectrum can be avoided, so that the resolved pure substance spectrum and the weight value corresponding to the pure substance spectrum are closer to the true value, thereby improving the accuracy of obtaining the pure substance spectrum and the weight value corresponding to the pure substance spectrum.

[0079] Step 1503: multiply the target update matrix and the second update matrix to obtain a reconstruction matrix.

[0080] Based on the methods of determining the reconstruction matrix provided in the above two embodiments, the embodiment of the present application further provides step 160 for calculating the error value thereof before step 140 .

[0081] Step 160: Calculate the error value between the reconstructed matrix and the first matrix based on the reconstructed matrix and the first matrix.

[0082] For example, the error values ​​of the two matrices W and H can be calculated by the following formula (3), and the calculation formula of the error e is as follows:

[0083]

[0084] It should be noted that H here refers to the first update matrix in some embodiments of the present application, and may refer to the target update matrix in other embodiments, M is the total number of rows, N is the total number of columns, i is the i-th row in M ​​rows, and j is the j-th column in N columns.

[0085] Therefore, after obtaining the error value between the reconstructed matrix and the first matrix, the error value is compared with the preset threshold, and two results can be obtained, one is that the error value is greater than or equal to the preset threshold, and the other is that the error value is less than the preset threshold. Based on the two different results, different steps are performed, as shown below.

[0086] In some embodiments of the present application, when the error value is greater than or equal to a preset threshold, the following steps are iterated until the error value between the reconstructed matrix and the first matrix is ​​less than the preset threshold:

[0087] According to the first matrix, the second matrix and the third matrix are updated to obtain a first updated matrix after the second matrix is ​​updated and a second updated matrix after the third matrix is ​​updated;

[0088] Performing baseline removal processing on the pure substance spectrum corresponding to the row data of the first type of rows in the first update matrix, and performing smoothing filtering processing on the fluorescence baseline spectrum corresponding to the row data of the second type of rows in the first update matrix, to obtain a target update matrix corresponding to the first update matrix;

[0089] Multiply the target update matrix and the second update matrix to obtain the reconstruction matrix.

[0090] Exemplarily, the preset threshold in the embodiment of the present application is an empirical value, that is, the value is 1e-6.

[0091] It should be noted that the steps performed here are the steps 120 and 130 mentioned above. Please refer to the above content for details and will not be repeated here.

[0092] In some other embodiments of the present application, when the error value between the reconstructed matrix and the first matrix is ​​less than a preset threshold, step 140 may be executed. Based on this, step 140 may specifically include steps 1401 to 1403.

[0093] Step 1401, when the error value between the reconstructed matrix and the first matrix is ​​less than a preset threshold, a verification matrix is ​​constructed based on the verification spectral data of the tested mixed substance in M ​​time windows, and the verification matrix is ​​a matrix of M rows and N columns, and the tested mixed substance includes K substances corresponding to the tested mixed substance.

[0094] It should be noted that the check matrix y may be a matrix corresponding to any spectral data involved in quantitative modeling or concentration prediction.

[0095] Step 1402, by using multivariate curve resolution-alternating least squares method, based on the first update matrix and the check matrix, the initial weight matrix is ​​updated to obtain a weight matrix, wherein the weight matrix includes weight values ​​of pure substance spectra of K substance-related substances.

[0096] Exemplarily, the non-negative least squares method is used, that is, the weight matrix x corresponding to y is calculated by the following formula (4), as shown below:

[0097] min||xH-y|| 2

[0098] stx≥0 (4)

[0099] Here, H refers to a first update matrix in some embodiments of the present application, and may refer to a target update matrix in other embodiments.

[0100] Thus, in some embodiments, the weight matrix can also be used alone to perform quantitative and trend analysis on substances. Based on this, only the weights corresponding to the first k pure substance spectra can be taken to participate in subsequent modeling or prediction, thereby avoiding the interference of the fluorescence baseline spectrum. Among them, the modeling algorithm can be a commonly used regression algorithm, such as MLR, PLS, etc.

[0101] Step 1403: extract the data of the first type of rows from the first update matrix to generate spectrum data.

[0102] Therefore, the embodiment of the present application utilizes the characteristics that the fluorescence baseline spectrum waveform is relatively gentle and the peak waveform of the Raman spectrum of the pure substance is sharp. In the process of multivariate curve resolution of the spectral data of multiple mixtures, the fluorescence baseline spectrum is used as a resolution target, and a first update matrix including the fluorescence baseline spectrum and the pure substance spectrum of the pure substance is resolved through the first matrix corresponding to the spectral data of the measured mixed substance. By dividing the fluorescence baseline spectrum and the pure substance spectrum of the pure substance for different category rows in the first update matrix, the error introduced by the fluorescence baseline spectrum in the spectrum to the resolution can be avoided, so that the resolved pure substance spectrum and the weight value corresponding to the pure substance spectrum are closer to the true value, thereby improving the accuracy of obtaining the pure substance spectrum and the weight value corresponding to the pure substance spectrum. Furthermore, the fluorescence baseline spectrum can be removed from the first update matrix and the second update matrix respectively, and the spectral matrix of the spectral data for characterizing the pure substance spectrum of the substance and the weight matrix for characterizing the weight value corresponding to its pure substance spectrum are obtained, which is helpful for the subsequent quantitative and trend analysis of the substance through the spectral matrix and the weight matrix, thereby improving the accuracy of the quantitative and trend analysis of the substance.

[0103] It should be noted that the data processing method provided in the embodiments of the present application can be applied to the application scenarios of qualitative and quantitative analysis of various substances in chemical reactions such as hydrogenation, nitration, fluorination and chlorination. For example, in the chlorination reaction of lithium bis(fluorosulfonyl)imide synthesis process, a mixed substance of chlorosulfonic acid, thionyl chloride and aminosulfonic acid is used as the measured mixed substance. Figure 1-7 In the data processing method, whether bischlorosulfonyl imide is generated in the above-mentioned chlorination reaction is determined by the pure substance spectrum represented by the row data in the target update matrix or the first update matrix. When it is determined that bischlorosulfonyl imide is generated, the content involved in step 140 can be used to quantitatively analyze bischlorosulfonyl imide through the weight matrix and the weight value corresponding to bischlorosulfonyl imide.

[0104] The data processing method provided in the embodiment of the present application can be executed by a data processing device. In the embodiment of the present application, the data processing device executing display is taken as an example to illustrate the device of the data processing method provided in the embodiment of the present application.

[0105] The present application also provides a data processing device. Figure 8 Provide detailed explanation.

[0106] Figure 8 A schematic diagram of the structure of a data processing device provided for some embodiments of the present application.

[0107] like Figure 8 As shown, the data processing device 80 can be applied to an electronic device, and the data processing device 80 can specifically include:

[0108] An acquisition module 801 is used to acquire spectral data of a measured mixed substance in M ​​time windows, where the spectral data includes scattering intensities of N wave numbers, and the measured mixed substance includes K substances;

[0109] A construction module 802 is used to construct a product matrix according to the first matrix corresponding to the spectral data, where the product matrix is ​​a matrix obtained by multiplying the second matrix and the third matrix, the first matrix and the product matrix are matrices with M rows and N columns, the row data of the first matrix is ​​used to characterize the spectral data of the measured mixed substance within the time window, and the column data of the first matrix is ​​used to characterize the scattering intensity of the wave number;

[0110] The updating module 803 is used to update the second matrix and the third matrix according to the first matrix, so as to obtain a first updated matrix after the second matrix is ​​updated and a second updated matrix after the third matrix is ​​updated; wherein the first updated matrix includes first-class rows and second-class rows, the row data of the first-class rows are used to characterize the pure substance spectra of substances related to K substances, and the row data of the second-class rows are used to characterize the fluorescence baseline spectra of the mixed substances; the second updated matrix includes first-class columns and second-class columns, the column data of the first-class columns are used to characterize the weight values ​​of the pure substance spectra corresponding to the first-class rows, and the column data of the second-class columns are used to characterize the weight values ​​of the fluorescence baseline spectra corresponding to the second-class rows;

[0111] The determination module 804 is used to determine the sample data when the error value between the reconstructed matrix and the first matrix is ​​less than a preset threshold value, wherein the reconstructed matrix is ​​determined by the first update matrix and the second update matrix, and the sample data includes a spectral matrix and a weight matrix, the row data of the spectral matrix is ​​used to characterize the pure substance spectrum of the substance, and the column data of the weight matrix is ​​used to characterize the weight value corresponding to the pure substance spectrum, and the sample data is used to perform quantitative and trend analysis on the substance.

[0112] The data processing device 80 in the embodiment of the present application is described in detail below, as shown below.

[0113] In some embodiments of the present application, the data processing device 80 may further include a processing module; wherein:

[0114] A processing module, used for performing baseline removal processing on the pure substance spectrum corresponding to the row data of the first type of rows, and performing smoothing filtering processing on the fluorescence baseline spectrum corresponding to the row data of the second type of rows, to obtain a target update matrix corresponding to the first update matrix;

[0115] Multiply the target update matrix and the second update matrix to obtain the reconstruction matrix.

[0116] In some embodiments of the present application, the processing module can be specifically used to perform baseline removal processing on the pure substance spectrum corresponding to the row data of the first category of rows through a baseline removal algorithm; wherein the baseline removal algorithm includes at least one of the following: adaptive iterative reweighted penalized least squares method, polynomial fitting algorithm, B-spline fitting algorithm, wavelet transform.

[0117] In some embodiments of the present application, the processing module may be specifically used to calculate the width of the dynamic smoothing window according to a preset spectral resolution of a spectral measurement device, wherein the spectral measurement device is a device for obtaining spectral data of a measured mixed substance within M time windows;

[0118] The width of the dynamic smoothing window is used as the smoothing unit, and smoothing filtering is performed on the fluorescence baseline spectrum corresponding to the row data of the second type of rows.

[0119] In some embodiments of the present application, the first update matrix is ​​a matrix of 2K rows and N columns, the first type of rows are rows 1 to K in the first update matrix, and the second type of rows are rows K+1 to 2K in the first update matrix;

[0120] The second update matrix is ​​a matrix of M rows and 2K columns, the first type of columns are columns 1 to K in the second update matrix, and the second type of columns are columns K+1 to 2K in the second update matrix;

[0121] The target update matrix has the same dimension as the first update matrix. The row data of the first type of rows in the target update matrix are used to characterize the sharp peak signals remaining after removing the smooth baseline from the pure substance spectrum; the row data of the second type of rows in the target update matrix are used to characterize the smooth baseline signals remaining after removing the sharp peak signals from the fluorescence baseline spectrum.

[0122] In some embodiments of the present application, the update module 803 is specifically used to, when the row data of each row in the second matrix is ​​the first preset data, the column data of each column in the third matrix is ​​the second preset data, and when the multivariate curve resolution-alternating least squares method includes the non-negative least squares method, update the first preset data according to the first matrix by the non-negative least squares method to obtain a first updated matrix; and update the second preset data according to the first matrix by the non-negative least squares method to obtain a second updated matrix.

[0123] In some embodiments of the present application, the data processing device 80 may further include a computing module; wherein,

[0124] The construction module 802 may also be used to construct a reconstruction matrix corresponding to the first matrix based on the first update matrix and the second update matrix;

[0125] The calculation module is used to calculate the error value between the reconstruction matrix and the first matrix based on the reconstruction matrix and the first matrix.

[0126] In some embodiments of the present application, the data processing device 80 may further include an iteration module, wherein;

[0127] The iterative module is used to iterate the following steps when the error value is greater than or equal to a preset threshold value until the error value between the reconstructed matrix and the first matrix is ​​less than the preset threshold value:

[0128] According to the first matrix, the second matrix and the third matrix are updated to obtain a first updated matrix after the second matrix is ​​updated and a second updated matrix after the third matrix is ​​updated;

[0129] Performing baseline removal processing on the pure substance spectrum corresponding to the row data of the first type of rows in the first update matrix, and performing smoothing filtering processing on the fluorescence baseline spectrum corresponding to the row data of the second type of rows in the first update matrix, to obtain a target update matrix corresponding to the first update matrix;

[0130] Multiply the target update matrix and the second update matrix to obtain the reconstruction matrix.

[0131] In some embodiments of the present application, the determination module 804 is specifically used to construct a check matrix according to the check spectrum data of the tested mixed substance in M ​​time windows when the error value between the reconstructed matrix and the first matrix is ​​less than a preset threshold, wherein the check matrix is ​​a matrix of M rows and N columns, and the tested mixed substance includes K substances corresponding to the tested mixed substance;

[0132] By using a multivariate curve resolution-alternating least squares method, based on a first update matrix and a check matrix, an initial weight matrix is ​​updated to obtain a weight matrix, wherein the weight matrix includes weight values ​​of pure substance spectra of K substances related to the substances;

[0133] The data of the first type of rows are extracted from the first update matrix to generate spectral data.

[0134] The data processing device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0135] The data processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0136] The data processing device provided in the embodiment of the present application can realize Figures 1 to 7 The various processes implemented in the data processing method embodiment shown achieve the same technical effect, and will not be described again here to avoid repetition.

[0137] Based on this, the data processing device provided in the embodiment of the present application obtains spectral data of the measured mixed substance within M time windows, the spectral data includes the scattering intensity of N wave numbers, and the measured mixed substance includes K substances; according to the first matrix corresponding to the spectral data, a product matrix is ​​constructed, the product matrix is ​​a matrix obtained by multiplying the second matrix and the third matrix, the first matrix and the product matrix are matrices with M rows and N columns, the row data of the first matrix is ​​used to characterize the spectral data of the measured mixed substance within the time window, and the column data of the first matrix is ​​used to characterize the scattering intensity of the wave number; according to the first matrix, the second matrix and the third matrix are updated to obtain a first updated matrix after the second matrix is ​​updated and a second updated matrix after the third matrix is ​​updated; wherein the first updated matrix includes first-category rows and second-category rows, and the row data of the first-category rows Used to characterize the pure substance spectrum of substances related to K substances, and the row data of the second type of rows are used to characterize the fluorescence baseline spectrum of the mixed substance; the second update matrix includes first type columns and second type columns, the column data of the first type of columns are used to characterize the weight value of the pure substance spectrum corresponding to the first type of rows, and the column data of the second type of columns are used to characterize the weight value of the fluorescence baseline spectrum corresponding to the second type of rows; when the error value between the reconstructed matrix and the first matrix is ​​less than a preset threshold, determine the sample data, wherein the reconstructed matrix is ​​determined by the first update matrix and the second update matrix, the sample data includes a spectral matrix and a weight matrix, the row data of the spectral matrix is ​​used to characterize the pure substance spectrum of the substance, the column data of the weight matrix is ​​used to characterize the weight value corresponding to the pure substance spectrum, and the sample data is used to perform quantitative and trend analysis on the substance. In this way, the embodiment of the present application utilizes the characteristics that the fluorescence baseline spectrum waveform is relatively gentle and the peak waveform of the Raman spectrum of a pure substance is sharp. In the process of performing multivariate curve resolution on the spectral data of multiple mixtures, the fluorescence baseline spectrum is used as a resolution target, and a first update matrix including the fluorescence baseline spectrum and the pure substance spectrum of the pure substance is resolved through the first matrix corresponding to the spectral data of the measured mixed substance. By dividing the fluorescence baseline spectrum and the pure substance spectrum of the pure substance for different category rows in the first update matrix, the error introduced by the fluorescence baseline spectrum in the spectrum to the resolution can be avoided, so that the resolved pure substance spectrum and the weight value corresponding to the pure substance spectrum are closer to the true value, thereby improving the accuracy of obtaining the pure substance spectrum and the weight value corresponding to the pure substance spectrum. Furthermore, the fluorescence baseline spectrum can be removed from the first update matrix and the second update matrix respectively, and the spectral matrix of the spectral data for characterizing the pure substance spectrum of the substance and the weight matrix for characterizing the weight value corresponding to its pure substance spectrum are obtained, which is helpful for the subsequent quantitative and trend analysis of the substance through the spectral matrix and the weight matrix, thereby improving the accuracy of the quantitative and trend analysis of the substance.

[0138] Optional, such as Fig. 9As shown, an embodiment of the present application also provides an electronic device 90, including a processor 901 and a memory 902, wherein the memory 902 stores programs or instructions that can be executed on the processor 901, and when the program or instructions are executed by the processor 901, the various steps of the above-mentioned data processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.

[0139] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.

[0140] Fig.10 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.

[0141] The electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, a processor 1010 and other components.

[0142] Those skilled in the art will appreciate that the electronic device 1000 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1010 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.10 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0143] Among them, in the embodiment of the present application, the processor 1010 is used to obtain the spectral data of the measured mixed substance in M ​​time windows, the spectral data includes the scattering intensity of N wave numbers, and the measured mixed substance includes K substances. The processor 1010 is also used to construct a product matrix according to the first matrix corresponding to the spectral data, the product matrix is ​​a matrix obtained by multiplying the second matrix and the third matrix, the first matrix and the product matrix are matrices with M rows and N columns, the row data of the first matrix is ​​used to characterize the spectral data of the measured mixed substance in the time window, and the column data of the first matrix is ​​used to characterize the scattering intensity of the wave number. The processor 1010 is also used to update the second matrix and the third matrix according to the first matrix, so as to obtain a first updated matrix after the second matrix is ​​updated and a second updated matrix after the third matrix is ​​updated; wherein the first updated matrix includes a first type of row and a second type of row, the row data of the first type of row is used to characterize the pure substance spectrum of the substance related to K substances, and the row data of the second type of row is used to characterize the fluorescence baseline spectrum of the mixed substance; the second updated matrix includes a first type of column and a second type of column, the column data of the first type of column is used to characterize the weight value of the pure substance spectrum corresponding to the first type of row, and the column data of the second type of column is used to characterize the weight value of the fluorescence baseline spectrum corresponding to the second type of row. The processor 1010 is also used to determine sample data when the error value between the reconstructed matrix and the first matrix is ​​less than a preset threshold, wherein the reconstructed matrix is ​​determined by the first updated matrix and the second updated matrix, the sample data includes a spectrum matrix and a weight matrix, the row data of the spectrum matrix is ​​used to characterize the pure substance spectrum of the substance, the column data of the weight matrix is ​​used to characterize the weight value corresponding to the pure substance spectrum, and the sample data is used to perform quantitative and trend analysis on the substance.

[0144] The electronic device 1000 is described in detail below, as shown below.

[0145] In some embodiments of the present application, the processor 1010 is used to perform baseline removal processing on the pure substance spectrum corresponding to the row data of the first type of rows, and perform smoothing filtering processing on the fluorescence baseline spectrum corresponding to the row data of the second type of rows, to obtain a target update matrix corresponding to the first update matrix;

[0146] Multiply the target update matrix and the second update matrix to obtain the reconstruction matrix.

[0147] In some embodiments of the present application, the processor 1010 can be specifically used to remove the baseline of the pure substance spectrum corresponding to the row data of the first category of rows through a baseline removal algorithm; wherein the baseline removal algorithm includes at least one of the following: adaptive iterative reweighted penalized least squares method, polynomial fitting algorithm, B-spline fitting algorithm, wavelet transform.

[0148] In some embodiments of the present application, the processor 1010 may be specifically configured to calculate the width of the dynamic smoothing window according to a preset spectral resolution of a spectral measurement device, wherein the spectral measurement device is a device for acquiring spectral data of a measured mixed substance within M time windows;

[0149] The width of the dynamic smoothing window is used as the smoothing unit, and smoothing filtering is performed on the fluorescence baseline spectrum corresponding to the row data of the second type of rows.

[0150] In some embodiments of the present application, the first update matrix is ​​a matrix of 2K rows and N columns, the first type of rows are rows 1 to K in the first update matrix, and the second type of rows are rows K+1 to 2K in the first update matrix;

[0151] The second update matrix is ​​a matrix of M rows and 2K columns, the first type of columns are columns 1 to K in the second update matrix, and the second type of columns are columns K+1 to 2K in the second update matrix;

[0152] The target update matrix has the same dimension as the first update matrix. The row data of the first type of rows in the target update matrix are used to characterize the sharp peak signals remaining after removing the smooth baseline from the pure substance spectrum; the row data of the second type of rows in the target update matrix are used to characterize the smooth baseline signals remaining after removing the sharp peak signals from the fluorescence baseline spectrum.

[0153] In some embodiments of the present application, the processor 1010 is specifically used to, when the row data of each row in the second matrix is ​​the first preset data, the column data of each column in the third matrix is ​​the second preset data, and when the multivariate curve resolution-alternating least squares method includes the non-negative least squares method, update the first preset data according to the first matrix by the non-negative least squares method to obtain a first updated matrix; and update the second preset data according to the first matrix by the non-negative least squares method to obtain a second updated matrix.

[0154] In some embodiments of the present application, the processor 1010 may also be configured to construct a reconstruction matrix corresponding to the first matrix based on the first update matrix and the second update matrix;

[0155] Based on the reconstruction matrix and the first matrix, an error value between the reconstruction matrix and the first matrix is ​​calculated.

[0156] In some embodiments of the present application, the processor 1010 may also be configured to, when the error value is greater than or equal to a preset threshold, iterate the following steps until the error value between the reconstructed matrix and the first matrix is ​​less than the preset threshold:

[0157] According to the first matrix, the second matrix and the third matrix are updated to obtain a first updated matrix after the second matrix is ​​updated and a second updated matrix after the third matrix is ​​updated;

[0158] Performing baseline removal processing on the pure substance spectrum corresponding to the row data of the first type of rows in the first update matrix, and performing smoothing filtering processing on the fluorescence baseline spectrum corresponding to the row data of the second type of rows in the first update matrix, to obtain a target update matrix corresponding to the first update matrix;

[0159] Multiply the target update matrix and the second update matrix to obtain the reconstruction matrix.

[0160] In some embodiments of the present application, the processor 1010 is specifically used to, when the error value between the reconstructed matrix and the first matrix is ​​less than a preset threshold, construct a check matrix according to the check spectrum data of the tested mixed substance in M ​​time windows, the check matrix being a matrix of M rows and N columns, and the tested mixed substance includes K substances corresponding to the tested mixed substance;

[0161] By using a multivariate curve resolution-alternating least squares method, based on a first update matrix and a check matrix, an initial weight matrix is ​​updated to obtain a weight matrix, wherein the weight matrix includes weight values ​​of pure substance spectra of K substances related to the substances;

[0162] The data of the first type of rows are extracted from the first update matrix to generate spectral data.

[0163] It should be understood that the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042, and the graphics processor 10041 processes the image data of the static image or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1006 may include a display panel, and the display panel may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch display. Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as a volume display button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0164] The memory 1009 can be used to store software programs and various data. The memory 1009 can mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area can store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1009 can include a volatile memory or a non-volatile memory, or the memory 1009 can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1009 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0165] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to the operating system, user interface, and application programs, and the modem processor mainly processes wireless display signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1010.

[0166] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned data processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0167] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0168] In addition, an embodiment of the present application further provides a chip, which includes a processor and a display interface, the display interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned data processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0169] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0170] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned data processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0171] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0172] In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in a reverse order according to the functions involved. For example, the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.

[0173] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.

[0174] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A data processing method, characterized in that: include: Acquire spectral data of a measured mixed substance in M ​​time windows, wherein the spectral data includes scattering intensities of N wave numbers, and the measured mixed substance includes K substances; According to the first matrix corresponding to the spectral data, a product matrix is ​​constructed, wherein the product matrix is ​​a matrix obtained by multiplying the second matrix and the third matrix, the first matrix and the product matrix are matrices of M rows and N columns, the row data of the first matrix is ​​used to characterize the spectral data of the measured mixed substance within the time window, and the column data of the first matrix is ​​used to characterize the scattering intensity of the wave number; According to the first matrix, the second matrix and the third matrix are updated to obtain a first updated matrix after the second matrix is ​​updated and a second updated matrix after the third matrix is ​​updated; wherein the first updated matrix includes first-category rows and second-category rows, the row data of the first-category rows are used to characterize the pure substance spectra of substances related to the K substances, and the row data of the second-category rows are used to characterize the fluorescence baseline spectra of the mixed substances; the second updated matrix includes first-category columns and second-category columns, the column data of the first-category columns are used to characterize the weight values ​​of the pure substance spectra corresponding to the first-category rows, and the column data of the second-category columns are used to characterize the weight values ​​of the fluorescence baseline spectra corresponding to the second-category rows; When the error value between the reconstructed matrix and the first matrix is ​​less than a preset threshold, sample data is determined, wherein the reconstructed matrix is ​​determined by the first update matrix and the second update matrix, and the sample data includes a spectral matrix and a weight matrix, the row data of the spectral matrix is ​​used to characterize the pure substance spectrum of the substance, and the column data of the weight matrix is ​​used to characterize the weight value corresponding to the pure substance spectrum, and the sample data is used to perform quantitative and trend analysis on the substance.

2. The method according to claim 1, characterized in that In the case where the error value between the reconstructed matrix and the first matrix is ​​less than a preset threshold, before determining the sample data, the method further includes: Performing baseline removal processing on the pure substance spectrum corresponding to the row data of the first type of rows, and performing smoothing filtering processing on the fluorescence baseline spectrum corresponding to the row data of the second type of rows, to obtain a target update matrix corresponding to the first update matrix; The target update matrix and the second update matrix are multiplied to obtain the reconstruction matrix.

3. The method according to claim 2, characterized in that The method of performing baseline removal processing on the pure substance spectrum corresponding to the row data of the first type of rows and performing smoothing filtering processing on the fluorescence baseline spectrum corresponding to the row data of the second type of rows to obtain a target update matrix corresponding to the first update matrix includes: The pure substance spectrum corresponding to the row data of the first type of row is subjected to baseline removal processing by a baseline removal algorithm; wherein the baseline removal algorithm comprises at least one of the following: an adaptive iterative reweighted penalized least squares method, a polynomial fitting algorithm, a B-spline fitting algorithm, and a wavelet transform; And, according to the preset spectral resolution of the spectral measurement device, the width of the dynamic smoothing window is calculated, wherein the spectral measurement device is a device for obtaining the spectral data of the measured mixed substance within M time windows; taking the width of the dynamic smoothing window as the smoothing unit, the fluorescence baseline spectrum corresponding to the row data of the second category row is smoothed and filtered to obtain a target update matrix corresponding to the first update matrix.

4. The method according to any one of claims 1 to 3, characterized in that: The first update matrix is ​​a matrix of 2K rows and N columns, the first type of rows are rows 1 to K in the first update matrix, and the second type of rows are rows K+1 to 2K in the first update matrix; The second update matrix is ​​a matrix of M rows and 2K columns, the first type of columns are columns 1 to K in the second update matrix, and the second type of columns are columns K+1 to 2K in the second update matrix; The target update matrix has the same dimension as the first update matrix, and the row data of the first type of rows in the target update matrix are used to characterize the sharp peak signal remaining after removing the smooth baseline from the spectrum of the pure substance; The row data of the second type of rows in the target update matrix are used to characterize the signal of the smooth baseline remaining after removing the sharp peak signal from the fluorescence baseline spectrum.

5. The method according to claim 1, characterized in that In the case where the error value between the reconstructed matrix and the first matrix is ​​less than a preset threshold, before determining the sample data, the method further includes: Based on the first update matrix and the second update matrix, construct a reconstruction matrix corresponding to the first matrix; Based on the reconstruction matrix and the first matrix, an error value between the reconstruction matrix and the first matrix is ​​calculated.

6. The method according to claim 1, characterized in that The method further comprises: When the error value is greater than or equal to the preset threshold, iterate the following steps until the error value between the reconstructed matrix and the first matrix is ​​less than the preset threshold: According to the first matrix, the second matrix and the third matrix are updated to obtain a first updated matrix after the second matrix is ​​updated and a second updated matrix after the third matrix is ​​updated; Performing baseline removal processing on pure substance spectra corresponding to row data of the first type of rows in the first update matrix, and performing smoothing filtering processing on fluorescence baseline spectra corresponding to row data of the second type of rows in the first update matrix, to obtain a target update matrix corresponding to the first update matrix; The target update matrix and the second update matrix are multiplied to obtain the reconstruction matrix.

7. The method according to claim 1, characterized in that The determining of sample data when the error value between the reconstructed matrix and the first matrix is ​​less than a preset threshold comprises: When the error value between the reconstructed matrix and the first matrix is ​​less than a preset threshold, a check matrix is ​​constructed according to the check spectrum data of the tested mixed substance in M ​​time windows, wherein the check matrix is ​​a matrix of M rows and N columns, and the tested mixed substance includes K substances corresponding to the tested mixed substance; updating an initial weight matrix based on the first update matrix and the check matrix by using a multivariate curve resolution-alternating least squares method to obtain the weight matrix, wherein the weight matrix includes weight values ​​of pure substance spectra of substances related to the K substances; The data of the first type of rows are extracted from the first update matrix to generate the spectral data.

8. A data processing device, characterized in that: include: An acquisition module, used to acquire spectral data of a measured mixed substance in M ​​time windows, wherein the spectral data includes scattering intensities of N wave numbers, and the measured mixed substance includes K substances; A construction module, used to construct a product matrix according to the first matrix corresponding to the spectral data, wherein the product matrix is ​​a matrix obtained by multiplying the second matrix and the third matrix, the first matrix and the product matrix are matrices with M rows and N columns, the row data of the first matrix is ​​used to characterize the spectral data of the measured mixed substance within a time window, and the column data of the first matrix is ​​used to characterize the scattering intensity of the wave number; An updating module, configured to update the second matrix and the third matrix according to the first matrix, to obtain a first updated matrix after the second matrix is ​​updated and a second updated matrix after the third matrix is ​​updated; wherein the first updated matrix includes a first type of row and a second type of row, the row data of the first type of row is used to characterize the pure substance spectrum of the substance related to the K substances, and the row data of the second type of row is used to characterize the fluorescence baseline spectrum of the mixed substance; the second updated matrix includes a first type of column and a second type of column, the column data of the first type of column is used to characterize the weight value of the pure substance spectrum corresponding to the first type of row, and the column data of the second type of column is used to characterize the weight value of the fluorescence baseline spectrum corresponding to the second type of row; A determination module is used to determine sample data when an error value between a reconstructed matrix and the first matrix is ​​less than a preset threshold, wherein the reconstructed matrix is ​​determined by the first update matrix and the second update matrix, and the sample data includes a spectral matrix and a weight matrix, the row data of the spectral matrix is ​​used to characterize the pure substance spectrum of the substance, and the column data of the weight matrix is ​​used to characterize the weight value corresponding to the pure substance spectrum, and the sample data is used to perform quantitative and trend analysis on the substance.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the steps of the data processing method according to any one of claims 1 to 7 are implemented.

10. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the steps of the data processing method according to any one of claims 1 to 7.