Multichannel spectral data computation method
By setting a sampling period to filter spectral data, replacing obviously inaccurate values, and constructing a covariance matrix for spectral value calculation, the problem of large data volume and large error in spectrometers is solved, and efficient and accurate spectral value acquisition is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HEBEI SAILHERO ENVIRONMENTAL PROTECTION HIGH TECH
- Filing Date
- 2023-05-12
- Publication Date
- 2026-06-02
AI Technical Summary
Existing spectrometers output massive amounts of data, making it difficult to determine valid values, and the processing is challenging and prone to errors.
By setting a sampling period, values with differences exceeding a preset value are filtered out and replaced, while values with differences within the preset value are retained. A covariance matrix is constructed and converted into a determinant for calculation. A band is selected for spectral value calculation.
This reduces the computational load of data packets, simplifies the calculations, and improves the accuracy and efficiency of measurement results.
Abstract
Description
Technical Field
[0001] This invention belongs to the field of spectroscopy technology, specifically relating to a method for calculating multi-channel spectral data. Background Technology
[0002] Spectroscopic technology is widely used in environmental monitoring, primarily employing spectrometers. Spectrometers have high data output frequencies; for example, high-performance spectrometers can have sampling periods as short as 1ms and accuracies as low as 0.3nm. Typically, the sampling band covers 200-1200nm, meaning that over 1000 data sets (each forming a data packet) are output per second. Each data packet contains 3000 spectral data points, resulting in a total of 3,000,000 data points in the 200-1200nm band. Other spectrometers produce similar data, with the specific number varying depending on the spectrometer's accuracy and band. In practical applications, various sampling periods are used, including 1ms, 5ms, 10ms, 50ms, and 100ms. The sheer volume of data generated by these high sampling frequencies is enormous, making calculations extremely laborious and preventing the filtering of valid values. Mixing all the data for calculation introduces significantly erroneous values, leading to substantial errors in the final calculation. Summary of the Invention
[0003] This invention provides a method for calculating multi-channel spectral data, aiming to solve the technical problems of existing spectrometers having a large output data volume, making it inconvenient to determine the effective value, making processing difficult, and having large errors.
[0004] To achieve the above objectives, the technical solution adopted by the present invention is: to provide a multi-channel spectral data calculation method, comprising the following steps:
[0005] S10: Determine the sampling periods t1, t2, ..., tn;
[0006] S20: Sample continuously with sampling periods of t1, t2, ..., tn respectively. N data packets are obtained in each sampling period, and each data packet includes a values.
[0007] S30: Set a standard value, calculate the difference between each of the a values in each data packet and the standard value. When the difference exceeds the preset value, the value is replaced. When the difference is lower than or equal to the preset value, the value is retained. This completes the update of multiple data packets.
[0008] S40: Analyze the N data packets in each sampling period, sort them according to the magnitude of numerical fluctuation, and retain the d data packets with the smallest numerical fluctuation, where d is an integer greater than 1;
[0009] S50: Select one data packet from each of the d data packets in each sampling period, construct the covariance matrix, and convert it into a determinant for calculation;
[0010] S60: Replace the data packet selected in each sampling period, repeat step S50, and select the n data packets corresponding to the largest row formula calculation result;
[0011] S70: Select a preset band and calculate the spectral value based on the n data packets selected in step S60.
[0012] In one possible implementation, multiple sampling periods t1, t2, ..., tn are sequentially increased, and a spectrometer is used to continuously sample according to the order of the sampling periods from small to large.
[0013] In one possible implementation, step S30 includes:
[0014] S31: Calculate the average value of a values in each data packet, where the average value is the standard value;
[0015] S32: Calculate the variance of each of the a values in each data packet;
[0016] S33: Calculated using the elimination formula:
[0017] |numerical value - mean| > b × variance
[0018] Where b is a multiple, b = 1~3, and the preset value = b × variance;
[0019] S34: Values that satisfy the elimination formula are replaced, and values that do not satisfy the elimination formula are retained.
[0020] In one possible implementation, when the value is replaced, the value preceding or following the value to be replaced is used.
[0021] In one possible implementation, when the value is replaced, the average of the e values preceding and / or following the value to be replaced is used.
[0022] In one possible implementation, S40 includes:
[0023] S41: Recalculate the variance of the N data packets updated in each sampling period and sort them into a queue according to the size of the variance;
[0024] S42: Select d data packets from the end of the queue with the smallest variance value.
[0025] In one possible implementation, S40 includes:
[0026] S41: Create a scatter plot with the order of the 'a' values in each data packet as the X-axis and the values as the Y-axis;
[0027] S42: Observe the concentration of the scatter plot, and sort the points in the scatter plot from concentrated to dispersed to form a queue;
[0028] S43: Select d data packets from the end of the queue with the highest concentration.
[0029] In one possible implementation, S50 includes:
[0030] S51: Select one data packet from d data packets in each sampling period, with a total of n data packets across multiple sampling periods;
[0031] S52: n data packets form a covariance matrix:
[0032] S1² S1×S2S1×S3……S1×Sa
[0033] S2×S1 S2²S2×S3……S2×Sa
[0034] ...
[0035] Sa×S1 Sa×S2Sa×S3……Sa²
[0036] S53: Convert the covariance matrix to a determinant for calculation.
[0037] In one possible implementation, step S60 specifically includes:
[0038] S61: One data packet is selected for each sampling period, and n data packets form a calculation array;
[0039] S62: Each two adjacent calculation arrays contain different data packets, forming a total of n calculation arrays. Repeat step S50 to calculate until the calculation of n calculation arrays is completed.
[0040] S63: Select the covariance matrix with the largest determinant calculation result, and select the data packet corresponding to that covariance matrix.
[0041] In one possible implementation, step S70 includes:
[0042] S71: Select a preset band, each band value corresponds to n data packets selected in step S60, and each data packet contains a values;
[0043] S72: Calculate the weight of the values in each data packet:
[0044] Weight 1 = Value 1 / (Value 1 + Value 2 + ... + Value a);
[0045] Weight 2 = Value 2 / (Value 1 + Value 2 + ... + Value a)
[0046] ...
[0047] Weight a = Value a / (Value 1 + Value 2 + ... + Value a)
[0048] S73: Reconstruct the data for each data packet:
[0049] Spectral value = numerical value 1 × weight 1 + numerical value 2 × weight 2 + ... + numerical value a × weight a.
[0050] Compared with the prior art, the present application embodiment filters suitable data packets through the calculation process of S10~S70, reduces the amount of data packet calculation, and facilitates the subsequent acquisition of the spectral value corresponding to the wave value, simplifies the calculation difficulty, and improves efficiency. In addition, the calculation process also includes the replacement of values in the data packets and the selection of data packets. This process can adjust obviously inaccurate values in the measurement values and improve the accuracy of the final measurement results. Detailed Implementation
[0051] To make the technical problems, solutions, and beneficial effects of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0052] The multi-channel spectral data calculation method provided by this invention will now be described. The multi-channel spectral data calculation method includes the following steps:
[0053] S10: Determine the sampling periods t1, t2, ..., tn;
[0054] S20: Sample continuously with sampling periods of t1, t2, ..., tn respectively. N data packets are obtained in each sampling period, and each data packet includes a values.
[0055] S30: Set a standard value, calculate the difference between each of the a values in each data packet and the standard value. When the difference exceeds the preset value, the value is replaced. When the difference is lower than or equal to the preset value, the value is retained. This completes the update of multiple data packets.
[0056] S40: Analyze the N data packets in each sampling period, sort them according to the magnitude of numerical fluctuation, and retain the d data packets with the smallest numerical fluctuation, where d is an integer greater than 1;
[0057] S50: Select one data packet from each of the d data packets in each sampling period, construct the covariance matrix, and convert it into a determinant for calculation;
[0058] S60: Replace the data packets selected in each sampling period, repeat step S50, and select the n data packets corresponding to the largest result of the row formula calculation.
[0059] S70: Select a preset band and calculate the spectral value based on the n data packets selected in step S60.
[0060] For ease of understanding, we will use four sampling periods as examples here, and the same applies below. The four sampling periods are 1 millisecond, 5 milliseconds, 10 milliseconds, and 50 milliseconds.
[0061] The specific process is as follows:
[0062] (1) Use a spectrometer to collect 3 (i.e. N=3) samples with a sampling period of 1 millisecond, 3 samples with a sampling period of 5 milliseconds, 3 samples with a sampling period of 10 milliseconds, and 3 samples with a sampling period of 50 milliseconds to obtain 4×3 data packets. Each data packet contains, for example, 5 (i.e. a=5) values. In reality, each data packet can contain up to thousands of values. The fact that each data packet contains 5 values is only for the convenience of explanation and does not mean that the actual situation is the same.
[0063] (2) 1 millisecond:
[0064] Data packet 1: value 1, value 2, value 3, value 4, value 5
[0065] Data packet 2: Value 1, Value 2, Value 3, Value 4, Value 5
[0066] Data packet 3: Value 1, Value 2, Value 3, Value 4, Value 5
[0067] The same applies to the data packets contained in 5 milliseconds, 10 milliseconds, and 50 milliseconds. It should be noted that although the values in different data packets have the same name (for example, the value 1 in data packet 1 and the value 1 in data packet 2 have the same name), in actual detection, it does not mean that values with the same name are equal, nor does it mean that values with different names are not equal.
[0068] (3) Calculate the difference between each value in data packet 1 and the standard value (the difference here is a positive number). When the difference is greater than the preset value, replace the value; if the difference is equal to or lower than the preset value, retain the value to obtain the updated data packet. For example:
[0069] Data packet 1: Value 1, Value 2 (after replacement), Value 3, Value 4, Value 5
[0070] Data packet 2: Value 1, Value 2, Value 3, Value 4 (after replacement), Value 5
[0071] Data packet 3: Value 1 (after replacement), Value 2, Value 3, Value 4, Value 5
[0072] The same applies to the data packets contained in 5 milliseconds, 10 milliseconds, and 50 milliseconds.
[0073] (4) Analyze the three data packets in each sampling period, sort them according to the magnitude of the numerical fluctuation, retain the two with the smallest numerical fluctuation, and store the rest of the data on the hard disk as historical records.
[0074] It should be noted that in the actual detection process, d is an integer greater than 1, and the number of data packets retained in each sampling period is the same.
[0075] (5) If the sampling period is 1 millisecond, the data retained is:
[0076] Data packet 1: Value 1, Value 2 (after replacement), Value 3, Value 4, Value 5
[0077] Data packet 2: Value 1, Value 2, Value 3, Value 4 (after replacement), Value 5
[0078] Similarly, the data packets retained after 5 milliseconds, 10 milliseconds, and 50 milliseconds are sorted according to the size of their variance. For example, if the variance of data packet 1 in each sampling period is less than that of data packet 2;
[0079] Take data packet 1 with a sampling period of 1 millisecond, data packet 1 with a sampling period of 5 milliseconds, data packet 1 with a sampling period of 10 milliseconds, and data packet 1 with a sampling period of 50 milliseconds respectively, and calculate the variances of these four data packets to obtain σx, σy, σz, and σw respectively.
[0080] Construct the covariance matrix:
[0081] σx² σxσyσxσzσxσw
[0082] σyσxσy² σyσzσyσw
[0083] σzσxσzσyσz²σzσw
[0084] σwσxσwσyσwσzσw²
[0085] The formula for calculating the determinant is then:
[0086] The result of the determinant calculation is: [σx²×σy²×σz²×σw²]+[σxσy×σyσz×σzσw×σwσx]+[σxσz×σyσw×σzσx×σwσy]+[σxσw×σyσx×σzσy×σwσz]-[σxσw×σyσz×σzσy×σwσx]-[σxσz×σy²×σzσx×σw²]-[σxσy×σyσx×σzσw×σwσz]-[σx²×σyσw×σz²×σwσy];
[0087] (6) Take data packet 2 with a sampling period of 1 millisecond, data packet 2 with a sampling period of 5 milliseconds, data packet 2 with a sampling period of 10 milliseconds, and data packet 2 with a sampling period of 50 milliseconds respectively, repeat the above step (5) to perform determinant calculation, compare the two determinant calculation results, and if the determinant calculation result of 4 data packets 1 is greater than the determinant calculation result of 4 data packets 2, then take 4 data packets 1.
[0088] (7) Select a preset band (e.g., 300-320nm), which corresponds to 21 wave values. Each of the 21 wave values corresponds to 4 data packets. The values in the 4 data packets corresponding to each wave value are used as the basic calculated spectral values.
[0089] The multi-channel spectral data calculation method provided in this embodiment, compared with the prior art, filters suitable data packets through the calculation process of S10~S70, reduces the amount of data packet calculation, and facilitates the subsequent acquisition of the spectral values corresponding to the wave values, simplifies the calculation difficulty, and improves efficiency. In addition, the calculation process also includes the replacement of values in the data packets and the selection of data packets. This process can adjust obviously inaccurate values in the measurement values and improve the accuracy of the final measurement results.
[0090] In some embodiments, step S10 described above can be implemented as follows: Multiple sampling periods t1, t2, ..., tn are sequentially increased, and a spectrometer is used to continuously sample data in ascending order of sampling period. For example, if 1 millisecond < 5 milliseconds < 10 milliseconds < 50 milliseconds, then during measurement, N measurements are first taken with a sampling period of 1 millisecond, then N measurements are taken with a sampling period of 5 milliseconds, and so on. This process can reduce the influence between two adjacent sampling periods, thereby improving the stability of the measured values.
[0091] In some embodiments, step S30 described above may be implemented as follows. Step S30 includes:
[0092] S31: Calculate the average of a values in each data packet, and the average value is the standard value;
[0093] S32: Calculate the variance of each of the a values in each data packet;
[0094] S33: Calculated using the elimination formula:
[0095] |numerical value - mean| > b × variance
[0096] Where b is a multiple, b = 1~3, and the preset value = b × variance;
[0097] S34: Values that satisfy the elimination formula are replaced, while values that do not satisfy the elimination formula are retained.
[0098] Variance calculation formula:
[0099] Variance² = [(value 1 - mean)² + (value 2 - mean)² + ... + (value a - mean)²] / a.
[0100] Where b is any natural number, not necessarily an integer. The multiple of the variance is used as a preset value for screening the values, which makes it easy to determine the value directly based on the difference between the value and the average value. The determination process is intuitive and has a high accuracy rate.
[0101] In some embodiments, the above-mentioned numerical replacement can be implemented as follows: When a numerical value is replaced, the value preceding or following the value to be replaced is used.
[0102] For example, data packet 1 contains the values 1, 2, 3, 4, and 5. When it is calculated that the value 2 needs to be replaced, the value 2 can be replaced by either the value 1 or the value 3. This means replacing the value 2 with the same number as the value 1, not deleting the value 1 and placing it in the position of the value 2. It is necessary to ensure that the updated data packet still contains 'a' values.
[0103] In some embodiments, the above numerical replacement can be implemented using the following modified implementation. When a numerical value is replaced, the average value of the e values preceding and / or following the value to be replaced is used.
[0104] For example, if the data packet to be updated contains the following values: 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10, and it is calculated that value 5 needs to be replaced, and e is 4, then the average of values 1, 2, 3, and 4 can be used for replacement, as can the average of values 6, 7, 8, and 9, or the average of values 3, 4, 6, and 7. Although this replacement process is slightly more complex than the above process, because it uses the average of d values, the replaced value is closer to the average of the values in the entire data packet, and thus closer to the correct value.
[0105] In some embodiments, step S40 described above may be implemented as follows. S40 includes:
[0106] S41: Recalculate the variance of the N data packets updated in each sampling period and sort them into a queue according to the size of the variance;
[0107] S42: Select d data packets from the end of the queue with the smallest variance value.
[0108] For example, each sampling period contains 3 data packets with variances of σx, σy, and σz. The packets are arranged in a queue according to the size of their variances, where σz < σx < σy. If 2 data packets need to be selected, the data packets corresponding to σz and σx are selected, and the data packet corresponding to σy is stored in the hard disk as a historical record. In this case, the number of data packets corresponding to each sampling period is d.
[0109] By filtering data packets by variance value, data with significantly large variance values are excluded from subsequent calculations, while the data packets with large variance values are retained as the basis for subsequent calculations. This can greatly reduce the amount of data to be calculated and simplify the calculation difficulty.
[0110] In some embodiments, step S40 described above may be implemented using the following modified implementation. S40 includes:
[0111] S41: Create a scatter plot with the order of the 'a' values in each data packet as the X-axis and the values as the Y-axis;
[0112] S42: Observe the concentration of the scatter plot, and sort the points in the scatter plot from concentrated to dispersed to form a queue;
[0113] S43: Select d data packets from the end of the queue with the highest concentration.
[0114] By creating a scatter plot, the dispersion of multiple values in each data packet can be seen intuitively, thereby determining the concentration of values in each data packet. Then, select d data packets with higher concentration and save the other data packets to the hard drive as historical records.
[0115] This embodiment does not require calculation. Scatter plots can be created manually or by computer, resulting in more intuitive results and avoiding the situation where inappropriate data packets are selected due to calculation errors.
[0116] In some embodiments, step S50 described above may be implemented as follows. S50 includes:
[0117] S51: Select one data packet from d data packets in each sampling period, with a total of n data packets across multiple sampling periods;
[0118] S52: n data packets form a covariance matrix:
[0119] S1² S1×S2S1×S3……S1×Sa
[0120] S2×S1 S2²S2×S3……S2×Sa
[0121] ...
[0122] Sa×S1 Sa×S2Sa×S3……Sa²
[0123] S53: Convert the covariance matrix to a determinant for calculation.
[0124] For example, if 3 data packets are selected in each sampling period, and there are a total of 4 sampling periods, and 1 data packet is selected in each of the 4 sampling periods, then the 4 variances corresponding to the 4 data packets are S1, S2, S3, and S4.
[0125] The resulting covariance matrix is:
[0126] S1² S1×S2S1×S3S1×S4
[0127] S2×S1 S2²S2×S3S2×S4
[0128] S3×S1 S3×S2 S3² S3×S4
[0129] S4×S1 S4×S2S4×S3S4²
[0130] We obtain the following from the formula for calculating the determinant:
[0131] The result of the determinant calculation is: (S1²×S2²×S3²×S4²) + [(S1×S2)×(S2×S3)×(S3×S4)×(S4×S1)] + [(S1×S3)×(S2×S4)×(S3×S1)×(S4×S2)] + [(S1×S4)×(S2×S1)×(S3×S2)×(S4×S3)] - [(S1×S4)×(S2×S3)×(S3×S2)×(S4×S1)]-[(S1×S3)×(S2²)×(S3×S1)×(S4²)]- [(S1×S2)×(S2×S1)×(S3×S4)×(S4×S3)]-[(S1²)×(S2×S4)×(S3²)×(S4×S2)];
[0132] The calculation results are obtained by converting the result into a determinant. The larger the result, the greater the difference in spectral data among the d data packets, the more representative the data is, and the more accurate the selected sampling period is.
[0133] In some embodiments, step S60 described above can be implemented using the following variations. Step S60 specifically includes:
[0134] S61: One data packet is selected for each sampling period, and n data packets form a calculation array;
[0135] S62: Each two adjacent calculation arrays contain different data packets, forming a total of n calculation arrays. Repeat step S50 to calculate until the calculation of n calculation arrays is completed.
[0136] S63: Select the covariance matrix with the largest determinant calculation result, and select the data packet corresponding to that covariance matrix.
[0137] For example, data packets 1, 2, and 3 are selected with a sampling period of 1 millisecond. Data packets 1, 2, and 3 are arranged in ascending order of variance. One data packet is selected from each sampling period. Each data packet is in the same position among multiple data packets in the corresponding sampling period (i.e., data packets 1 from four sampling periods form a calculation array, data packets 2 from four sampling periods form a calculation array, and so on). By calculating the data, the determinant calculation results are obtained for each. The calculation array with the largest result is selected, indicating that the data in this calculation array is valid and can be used for subsequent spectral value calculation.
[0138] In some embodiments, step S70 described above may be implemented using the following variations. Step S70 includes:
[0139] S71: Select a preset band, each band value corresponds to n data packets selected in step S60, and each data packet contains a values;
[0140] S72: Calculate the weight of the values in each data packet:
[0141] Weight 1 = Value 1 / (Value 1 + Value 2 + ... + Value a);
[0142] Weight 2 = Value 2 / (Value 1 + Value 2 + ... + Value a)
[0143] ...
[0144] Weight a = Value a / (Value 1 + Value 2 + ... + Value a)
[0145] S73: Reconstruct the data for each data packet:
[0146] Spectral value = numerical value 1 × weight 1 + numerical value 2 × weight 2 + ... + numerical value a × weight a.
[0147] After the calculation in step S60, the most accurate sampling period is determined. The spectral values of the preset band are detected based on this sampling period. After detection, the data is reconstructed through weighting. Compared with directly replacing individual values in the data packet, the reconstructed values are more accurate.
[0148] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for calculating multi-channel spectral data, characterized in that, Includes the following steps: S10: Determine the sampling periods t1, t2, ..., tn; S20: Sample continuously with sampling periods of t1, t2, ..., tn respectively. N data packets are obtained in each sampling period, and each data packet includes a values. S30: Set a standard value, calculate the difference between each of the a values in each data packet and the standard value. When the difference exceeds the preset value, the value is replaced. When the difference is lower than or equal to the preset value, the value is retained. This completes the update of multiple data packets. S40: Analyze the N data packets in each sampling period, sort them according to the magnitude of numerical fluctuation, and retain the d data packets with the smallest numerical fluctuation, where d is an integer greater than 1; S50: Select one data packet from each of the d data packets in each sampling period, construct the covariance matrix, and convert it into a determinant for calculation; S60: Replace the data packet selected in each sampling period, repeat step S50, and select the n data packets corresponding to the largest row formula calculation result; S70: Select a preset band and calculate the spectral value based on the n data packets selected in step S60.
2. The multi-channel spectral data calculation method as described in claim 1, characterized in that, Multiple sampling periods t1, t2, ..., tn are sequentially increased, and the spectrometer is used to continuously sample according to the order of the sampling periods from small to large.
3. The multi-channel spectral data calculation method as described in claim 1, characterized in that, Step S30 includes: S31: Calculate the average value of a values in each data packet, where the average value is the standard value; S32: Calculate the variance of each of the a values in each data packet; S33: Calculated using the elimination formula: |numerical value - mean| > b × variance Where b is a multiple, b = 1~3, and the preset value = b × variance; S34: Values that satisfy the elimination formula are replaced, and values that do not satisfy the elimination formula are retained.
4. The multi-channel spectral data calculation method as described in claim 3, characterized in that, When a value is replaced, the value preceding or following the replaced value is used for replacement.
5. The multi-channel spectral data calculation method as described in claim 3, characterized in that, When a value is replaced, the average of the e values before and / or after the value to be replaced is used.
6. The multi-channel spectral data calculation method as described in claim 3, characterized in that, S40 includes: S41: Recalculate the variance of the N data packets updated in each sampling period and sort them into a queue according to the size of the variance; S42: Select d data packets from the end of the queue with the smallest variance value.
7. The multi-channel spectral data calculation method as described in claim 3, characterized in that, S40 includes: S41: Create a scatter plot with the order of the 'a' values in each data packet as the X-axis and the values as the Y-axis; S42: Observe the concentration of the scatter plot, and sort the points in the scatter plot from concentrated to dispersed to form a queue; S43: Select d data packets from the end of the queue with the highest concentration.
8. The multi-channel spectral data calculation method as described in claim 1, characterized in that, The S50 includes: S51: Select one data packet from d data packets in each sampling period, with a total of n data packets across multiple sampling periods; S52: n data packets form a covariance matrix: S1² S1×S2S1×S3……S1×Sa S2×S1 S2²S2×S3……S2×Sa …… Sa×S1 Sa×S2Sa×S3……Sa² S53: Convert the covariance matrix to a determinant for calculation.
9. The multi-channel spectral data calculation method as described in claim 8, characterized in that, The S60 step specifically includes: S61: One data packet is selected for each sampling period, and n data packets form a calculation array; S62: Each two adjacent calculation arrays contain different data packets, forming a total of n calculation arrays. Repeat step S50 to calculate until the calculation of n calculation arrays is completed. S63: Select the covariance matrix with the largest determinant calculation result, and select the data packet corresponding to that covariance matrix.
10. The multi-channel spectral data calculation method as described in claim 1, characterized in that, The S70 step includes: S71: Select a preset band, each band value corresponds to n data packets selected in step S60, and each data packet contains a values; S72: Calculate the weight of the values in each data packet: Weight 1 = Value 1 / (Value 1 + Value 2 + ... + Value a); Weight 2 = Value 2 / (Value 1 + Value 2 + ... + Value a) …… Weight a = Value a / (Value 1 + Value 2 + ... + Value a) S73: Reconstruct the data for each data packet: Spectral value = numerical value 1 × weight 1 + numerical value 2 × weight 2 + ... + numerical value a × weight a.