Spectral determination method and system applied to food nutritional ingredients

By dividing the food spectral curve into multiple curve segments, and identifying overlapping areas using the difference in the number of extreme points and absorption rate, the problem of low identification accuracy in the prior art is solved, and a more accurate determination of nutrient components is achieved.

CN119470305AInactive Publication Date: 2025-02-18XIAN DAOFA DIGITAL INSTR INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411660447.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-02-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art has low accuracy in identifying overlapping areas in food spectral curves, resulting in some nutrients being masked and difficult to accurately determine.

Method used

By dividing the spectral curve of food into several curve segments, the possibility of overlapping areas is calculated based on the number of extreme points in the curve segment and the difference in absorption rate of characteristic points, and the target curve segment and extreme points are screened to identify overlapping areas. the boundary.

Benefits of technology

It improves the accuracy of overlapping areas identification in the food spectral curve, can more clearly separate the characteristic signals of different nutrients, and enhances the ability to accurately determine food nutrients.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119470305A_ABST
    Figure CN119470305A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of spectrum detection, in particular to a spectrum determination method and system applied to food nutritional ingredients, a spectrum curve of a target sample of food is obtained, the spectrum curve is equally divided into a plurality of curve segments, and the number of extreme points in the curve segments is calculated based on the number of extreme points in the curve segments. According to the characteristic points of the curve segments and the absorptivity difference of any two adjacent characteristic points in the curve segments, the overlapping area possibility of the curve segments is obtained, the overlapping area possibility is used for representing the possibility that overlapping areas exist in the curve segments, and a target curve segment is obtained based on the overlapping area possibility; based on the absorptivity unit difference between each extreme point and the adjacent sampling point in the target curve segment, the target extreme point is obtained through screening, the target extreme point is used for representing the boundary point of the overlapping area in the target curve segment, and the spectrum determination method provided by the invention can improve the accuracy of overlapping area identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of spectrum detection, and in particular to a spectrum determination method and system for food nutritional components. Background Art

[0002] Derivative spectroscopy, also known as differential spectroscopy, is a branch derived from ultraviolet absorption spectroscopy. It has been rapidly developed and widely used in recent years because it can directly measure complex components without separation. The method is simple, fast and accurate. The basic principle of derivative spectroscopy is similar to the function graph of the absorbance (A) of the ultraviolet absorption spectrum against the wavelength λ, which is the function graph of the differential coefficient (dA / dλ) of the absorption spectrum with respect to the wavelength (λ).

[0003] The main nutrients in food include water, protein, fat, carbohydrates, vitamins, minerals, dietary fiber, etc. Different nutrients show unique absorption and reflection characteristics in spectral measurement, so they can be analyzed and quantified through spectral curves. Different nutrients show different absorption peaks and distribution characteristics in spectral measurement, which can be analyzed through the measurement curves of near-infrared, mid-infrared and ultraviolet-visible spectra.

[0004] In the spectral determination of food nutrients, due to the characteristics of the main nutrients in the food, there will be overlapping problems of characteristic absorption peaks in the spectral curve, especially for some nutrients with similar molecular structures or functional groups (such as water and protein). The specific reason is: similar chemical bond vibrations will produce absorption peaks in a similar wavelength range, causing nutrients with high content to mask the characteristic signals of components with low content, which in turn causes some nutrients in general food to be masked, such as the overlap of OH bond spectral information corresponding to meat protein components and water components. In order to remove the influence of the overlapping part on the determination of food nutrients, it is necessary to identify and determine the overlapping area of ​​the spectral curve, and then extract the overlapping features based on differential spectroscopy technology. In the prior art, the identification and judgment of the overlapping area is only carried out by determining the high and low change characteristics of the spectral curve, and the accuracy is low. Summary of the invention

[0005] In view of this, in order to solve the technical problem that the existing identification method cannot accurately identify the overlapping area in the food spectrum curve, the present invention provides a spectrum measurement method and system for food nutritional components.

[0006] The technical solutions adopted are as follows: In a first aspect, an embodiment of the present invention provides a method for spectroscopic determination of food nutrients, comprising: Obtaining a spectrum curve of a target food sample, wherein the abscissa of the spectrum curve is wavelength and the ordinate is absorbance; Dividing the spectrum curve into a plurality of curve segments; Based on the number of extreme points in the curve segment and the difference in absorption rate between any two adjacent feature points in the curve segment, the possibility of the overlap area of ​​the curve segment is obtained. The overlap area possibility is used to characterize the possibility of the existence of the overlap area in the curve segment. Based on the possibility of the overlapped area, obtaining a target curve segment; Based on the unit difference of the absorption rate between each extreme point in the target curve segment and its adjacent sampling points, the target extreme point is screened and obtained, and the target extreme point is used to characterize the boundary point of the overlapping area in the target curve segment.

[0007] In combination with the first aspect, in some possible implementations, the spectrum curve is equally divided into a plurality of curve segments, including: Using a fast Fourier transform algorithm, obtaining a minimum positive period value corresponding to the periodic function of the spectrum curve; Based on the minimum positive period value, the spectrum curve is equally divided into a plurality of curve segments.

[0008] In combination with the first aspect above, in some possible implementations, the process of acquiring the feature points includes: Get the interval length between any two adjacent extreme points in the curve segment, and get the minimum interval length; Dividing the curve segment into a plurality of interval segments according to the minimum interval length; A sampling point is selected from each interval segment as the feature point.

[0009] In combination with the first aspect above, in some possible implementations, selecting a sampling point from each interval segment as the feature point includes: selecting a sampling point at the center of the interval segment as the feature point.

[0010] In combination with the first aspect, in some possible implementations, based on the number of extreme points in the curve segment and the difference in absorption rate between any two adjacent feature points in the curve segment, the possibility of the overlap area of ​​the curve segment is obtained, including: Based on the number of extreme value points in the curve segment, the extreme value index of the curve segment is obtained; Based on the difference in absorption rates between any two adjacent feature points in the curve segment, a sharpness index of the curve segment is obtained, wherein the sharpness index is used to characterize the overall level of the difference in absorption rates between all two adjacent feature points in the curve segment; According to the extremum index and the sharpness index, the possibility of the overlap area of ​​the curve segments is obtained, and the possibility of the overlap area is positively correlated with both the extremum index and the sharpness index.

[0011] In combination with the first aspect, in some possible implementations, based on the unit difference of the absorption rate between each extreme point in the target curve segment and its adjacent sampling points, the target extreme point is screened and obtained, including: Obtaining a unit difference in absorption rate between the extreme point and each adjacent sampling point in a set of adjacent sampling points, wherein the set of adjacent sampling points includes a preset number of sampling points adjacent to the extreme point on the left and right sides respectively; Obtaining an overall absorption rate difference according to each of the absorption rate unit differences; According to the overall absorption rate difference, the target extreme value point is screened and obtained.

[0012] In combination with the first aspect above, in some possible implementations, the unit difference in absorbance is a difference in absorbance per unit wavelength between an extreme point and an adjacent sampling point; Obtaining the overall absorption rate difference according to each of the absorption rate unit differences includes: calculating an average value of the absorption rate unit differences to obtain the overall absorption rate difference.

[0013] In combination with the first aspect above, in some possible implementations, the spectrum measurement method further includes: Obtaining the spectral curves of multiple other reference samples of the food, and obtaining the target extreme value point of each reference sample; Sorting the target extreme value points of the target sample and each reference sample in the same sorting manner, and constructing a data sequence of each serial number, wherein the data sequence is composed of two-dimensional coordinate points of the target extreme value points of the target sample and each reference sample belonging to the same serial number, and the two-dimensional coordinate points are composed of wavelength values ​​and absorbances of corresponding target extreme value points; Based on the similarity between the data sequence of each serial number and the data sequence of other serial numbers, the final coincidence point is screened from the target extreme value points of the target sample.

[0014] In combination with the first aspect, in some possible implementations, based on the degree of similarity between the data sequence of each sequence number and the data sequence of each other sequence number, the final coincidence point is screened from the target extreme value points of the target sample, including: Obtaining the degree of similarity between the data sequence of the candidate sequence number and the data sequences of other sequence numbers to obtain a similarity index of the candidate sequence number; the candidate sequence number is any sequence number; According to the similarity index of the candidate sequence number, it is determined whether the target extreme value point of the target sample corresponding to the candidate sequence number is the final coincidence point.

[0015] In a second aspect, an embodiment of the present invention provides a spectral measurement system for food nutritional components, including a memory and a processor, wherein the memory is used to store executable program code, and the processor is used to call and run the program code from the memory to implement the above-mentioned spectral measurement method for food nutritional components.

[0016] The present invention has the following technical effects, including but not limited to: dividing the spectral curve of the target sample of food into multiple curve segments, which is convenient for subsequent targeted processing and improves the accuracy of overlapping area recognition; the number of extreme points represents the complexity of the nutrients corresponding to the spectral curve segment or the degree of confusion of the nutrient content, and the difference in the absorbance between any two adjacent feature points in the curve segment represents the fluctuation between the feature points. The more serious the fluctuation, the higher the complexity of the nutrients corresponding to the curve segment, or the more chaotic the nutrient content. Therefore, the possibility of the overlapping area of ​​the curve segment can be obtained based on these two parameters, so as to judge and obtain the target curve segment. There are overlapping areas of different nutrients in the target curve segment, which improves the accuracy of overlapping area recognition; because the unit difference in absorbance between each extreme point in the target curve segment and its adjacent sampling points represents the degree of difference in absorbance between the extreme point and the surrounding adjacent sampling points, based on the unit difference in absorbance between each extreme point in the target curve segment and its adjacent sampling points, the target extreme point is screened and obtained, and the target extreme point is the boundary point of the overlapping area in the target curve segment, thereby improving the accuracy of overlapping area recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a schematic diagram of the hardware composition of a spectroscopic determination device used for food nutritional components; Figure 2 It is a flow chart of a method for spectroscopic determination of food nutrients provided by the present invention; Figure 3 It is a schematic diagram of the spectrum of protein; Figure 4 It is a flowchart of a specific division method of curve segments; Figure 5 is a flowchart of the process of acquiring feature points in step S3; Figure 6 is a flowchart of the specific implementation process of step S3; Figure 7 is a flowchart of the specific implementation process of step S5; Figure 8 A flow chart of the steps included in a method for spectroscopic determination of food nutritional components provided by the present invention; Fig. 9 It is a structural principle diagram of a spectroscopic determination system for food nutritional components; Fig.10 It is a schematic diagram of the structure of a computer-readable storage medium; Among them, 1 is a spectrum detection instrument, and 2 is a data processor. DETAILED DESCRIPTION

[0018] The present embodiment provides a spectrum determination method for food nutrients (hereinafter referred to as the spectrum determination method) configured as a device for food nutrients. The spectrum determination device includes a spectrum detection instrument 1 and a data processor 2. Figure 1 As shown. The spectrum detection instrument 1 and the data processor 2 can be connected via a data transmission line, and the two can also be integrated. The spectrum detection instrument 1 is used to obtain the spectrum curve of the food sample, and the spectrum detection instrument 1 outputs the spectrum curve to the data processor 2, and the data processor 2 is used to execute Figure 2 A spectroscopic method for determining nutritional components of food is shown.

[0019] The target sample of the food may be in a solid, liquid or powder state, depending on the type of food. It should be understood that according to the form of the target sample, the device model of the spectrum detection instrument 1 supporting the spectrum detection of the form is selected.

[0020] In order to improve the accuracy of spectral detection, in this embodiment, the spectral detection instrument 1 is calibrated, and a standard white board is used to calibrate the spectral detection instrument before testing, in order to ensure the consistency of the spectral data. The sampling parameters of the spectral detection instrument 1 are set: the wavelength range is: 400-2500 nm, covering the visible light to near infrared range; the spectral resolution is: 1-10 nm; the integration time is to set the exposure or integration time to optimize the signal-to-noise ratio, usually in the range of 10-100 ms; the number of scans: multiple scans are averaged, usually 3-5 times, to reduce noise and improve data reliability.

[0021] In the prior art, when using spectral methods to detect and analyze food nutrients, some absorption peaks overlap because the absorption peaks of the spectral curves of different nutrients are located in similar areas. The method for distinguishing and judging overlap in the prior art is to perform a simple detection and analysis of the fluctuation of the spectral curve amplitude, which cannot effectively read the detailed information. In order to solve the above problem, Figure 2 As shown, the spectrum measurement method provided in this embodiment includes the following steps: Step S1: obtaining a spectrum curve of a target sample of food, wherein the abscissa of the spectrum curve is wavelength and the ordinate is absorbance.

[0022] Select a portion of the food to be tested as the target sample, perform spectral detection on the target sample using the spectral detection instrument 1, and obtain the spectral curve of the target sample (specifically, the spectral absorbance curve). The horizontal axis of the spectral curve is wavelength (nm), and the vertical axis is absorbance. The spectral curve reflects the absorption effect of the nutritional components of the food target sample at different wavelengths. The higher the absorbance, the higher the corresponding component content, forming a specific absorption peak. For example, Figure 3 As shown, the characteristic absorption bands corresponding to proteins are concentrated between 1450nm and 1940nm. Figure 3 The curve in represents the spectral absorption rate curve, and the part between the two black dots is the characteristic absorption band. It should be understood that the spectral curve is composed of various sampling points, and the data of each sampling point is obtained according to the preset sampling period, and the data of the sampling point is the absorption rate of the corresponding wavelength.

[0023] In this embodiment, the spectrum curve may be preprocessed, including baseline correction, smoothing, etc., in order to ensure the consistency and accuracy of the data in the spectrum curve.

[0024] Step S2: Divide the spectrum curve into a number of curve segments.

[0025] In order to accurately detect the possible overlap area in the spectrum curve, the spectrum curve is divided into several curve segments. The curve segment division method can be directly divided and intercepted according to the horizontal axis length of the spectrum curve to obtain several curve segments of the same length, or it can be obtained by using some existing specific interception algorithms. Among them, the length of the curve segment and the specific number are set according to actual needs.

[0026] Step S3: Based on the number of extreme points in the curve segment and the difference in absorption rate between any two adjacent feature points in the curve segment, the possibility of the overlap area of ​​the curve segment is obtained. The overlap area possibility is used to characterize the possibility of the existence of the overlap area in the curve segment.

[0027] Get the extreme points in each curve segment, which include the maximum and minimum, so as to obtain the extreme point sequence and the number of extreme points in each curve segment. The extreme point sequence is composed of the extreme points contained. Then, there may be the following situation: the number of extreme points in some curve segments is 0. For the curve segments with 0 extreme points, they can be excluded from the subsequent data processing. The number of extreme points in the curve segment reflects the absorption rate variation characteristics of the nutrients in the food after spectral absorption, that is, the complexity of the nutrient content.

[0028] For the sake of convenience, any curve segment is defined as a candidate curve segment. Several feature points are determined from each sampling point in the candidate curve segment to obtain the difference in absorption rate between any two adjacent feature points in the candidate curve segment. The difference in absorption rate between two adjacent feature points represents the fluctuation of the absorption rate between the feature points. The more severe the fluctuation, the more complex the nutritional components corresponding to the candidate curve segment are, or the more chaotic the nutritional content is.

[0029] Therefore, according to the number of extreme points in the candidate curve segment and the difference in absorption rate between any two adjacent feature points in the candidate curve segment, the overlap region possibility of the candidate curve segment is obtained, and the overlap region possibility is used to characterize the possibility of the existence of overlap regions in the candidate curve segment. Thus, the overlap region possibility of each curve segment is obtained.

[0030] Step S4: Based on the possibility of the overlapped area, a target curve segment is obtained.

[0031] According to the overlapped area possibilities of each curve segment, a target curve segment is screened from each curve segment. The target curve segment is a curve segment with an overlapped area inside. As a specific implementation, a threshold is preset, and the threshold can be set according to actual needs. Based on the specific calculation method of the overlapped area possibility below, the threshold can be set to 0.9, and the curve segment corresponding to the overlapped area possibility greater than or equal to 0.9 is taken as the target curve segment. It should be understood that, through judgment, the number of target curve segments obtained can be 1 or at least 2.

[0032] Step S5: based on the unit difference of the absorption rate between each extreme point in the target curve segment and its adjacent sampling points, a target extreme point is screened and obtained, wherein the target extreme point is used to characterize the boundary point of the overlapping area in the target curve segment.

[0033] For the convenience of explanation, any extreme point in the target curve segment is referred to as a candidate extreme point. The adjacent sampling points of the candidate extreme point in the target curve segment are obtained, and whether the candidate extreme point is the target extreme point is determined according to the unit difference of the absorption rate between the candidate extreme point and the adjacent sampling point. The unit difference of the absorption rate is the difference of the absorption rate per unit wavelength between the extreme point and the adjacent sampling point.

[0034] Thus, all extreme value points in the target curve segment are screened to obtain target extreme value points, which are used to characterize the boundary points of the overlapping area in the target curve segment, that is, the target extreme value points are used as the boundary points of the overlapping area in the target curve segment.

[0035] As a specific implementation, Figure 4 A specific division method of curve segments is given, including: Step S2-1: using a fast Fourier transform algorithm to obtain the minimum positive period value corresponding to the periodic function of the spectrum curve.

[0036] Since the spectral curve is continuous and non-periodic and has a finite length, in order to obtain the specific period size of such a finite non-periodic curve and then apply the result to the determination of the coincidence point, the period result is obtained by means of the fast Fourier transform algorithm (FFT). Accordingly, the fast Fourier transform algorithm is used to obtain the periodic function of the spectral curve and the corresponding minimum positive period value.

[0037] Step S2-2: Based on the minimum positive period value, the spectrum curve is equally divided into a plurality of curve segments.

[0038] Based on the minimum positive period value obtained, the spectrum curve is equally divided into a number of curve segments. As a specific implementation, the spectrum curve is intercepted according to the minimum positive period value, and the length of each curve segment is the minimum positive period value. It should be understood that if the length of the last curve segment is less than the minimum positive period value, the missing length is supplemented after the last curve segment so that its length is the minimum positive period value, and the absorption rate of the supplemented length is 0.

[0039] As a specific implementation, the process of acquiring the feature points in step S3 is as follows: Figure 5 As shown, including: Step S3-1: Obtain the length of the interval between any two adjacent extreme value points in the curve segment, and obtain the minimum length of the interval.

[0040] Get the interval length between any two adjacent extreme value points in the candidate curve segment, that is, the wavelength between any two adjacent extreme value points. Then find the minimum value of each interval length to get the minimum interval length.

[0041] Step S3-2: Divide the curve segment into multiple interval segments according to the minimum interval length.

[0042] According to the minimum interval length obtained, the candidate curve segment is divided into multiple interval segments. As a specific implementation, the shorter the length of the interval segment, the more feature points are obtained therefrom, and the more the feature conditions of the candidate curve segment can be characterized. Therefore, this embodiment presets a proportional value, which is greater than 1, and the minimum interval length obtained is divided by the proportional value, and then the obtained quotient is rounded down to the integer, and the result obtained is the interval segment length. Finally, according to the interval segment length, the curve segment is divided into multiple interval segments, then, except for the last interval segment, the length of each other interval segment is the obtained interval segment length. The length of the last interval segment may be exactly equal to the obtained interval segment length, or it may be less than the obtained interval segment length. Since the purpose of obtaining the interval segment is to obtain feature points therefrom, it does not matter even if the actual length of the last interval segment is less than the obtained interval segment length.

[0043] Step S3-3: Select a sampling point from each interval segment as the feature point.

[0044] A sampling point is selected from each interval segment as the characteristic point of the corresponding interval segment. As a specific example, the present embodiment uses the sampling point at the center of the interval segment as the characteristic point of the corresponding interval segment. It should be understood that if there is not one sampling point at the center, but two sampling points, then one of the two sampling points is randomly selected as the characteristic point. The purpose of determining the characteristic point is to analyze the change of the absorption rate within the curve segment.

[0045] As a specific implementation method, the specific implementation process of step S3 is as follows: Figure 6 As shown, including: Step S3-4: Based on the number of extreme value points in the curve segment, obtain the extreme value index of the curve segment.

[0046] The more extreme points there are in the candidate curve segment, the higher the variation characteristics in the candidate curve segment. It can be understood that the stronger the variation characteristics of the absorbance of the nutrients in the candidate curve segment after spectral absorption, the higher the complexity of the corresponding nutrients and the more chaotic the nutrient content. Therefore, based on the number of extreme points in the candidate curve segment, the extreme value index of the candidate curve segment is obtained. As a specific quantitative method, the number of extreme points in the candidate curve segment is normalized, and the normalized value is used as the extreme value index of the candidate curve segment. Thus, the extreme value index of each curve segment is obtained.

[0047] The normalization method in this embodiment can be a maximum value and minimum value normalization method, or can be the following normalization method: , where y is the normalized value and x is the input value. It is an exponential function with the natural constant e as its base.

[0048] Step S3-5: based on the difference in absorption rate between any two adjacent feature points in the curve segment, obtain a sharpness index of the curve segment, wherein the sharpness index is used to characterize the overall level of the difference in absorption rate between all two adjacent feature points in the curve segment.

[0049] As a specific implementation, the difference in absorption rate between any two adjacent feature points in the candidate curve segment is the absolute value of the absorption rate difference. According to the absolute value of the absorption rate difference between any two adjacent feature points in the candidate curve segment, the sharpness index of the candidate curve segment is obtained. Among them, the sharpness index is used to characterize the overall level of the absorption rate difference between all two adjacent feature points in the candidate curve segment. The overall level can be an average value or a sum value. As a specific quantitative method: the calculation formula of the sharpness index is given as follows: in, Indicates The sharpness index of each curve segment; Indicates The total number of feature points in a curve segment; Indicates The first The absorption rate value corresponding to the feature point is Indicates The first The absorption rate value corresponding to the feature point, Norm is the normalization function.

[0050] By adopting the above method, the sharpness index of each curve segment is obtained.

[0051] The greater the difference in absorption rate between adjacent feature points, the more serious the fluctuation in absorption rate between feature points, and the higher the difference in nutrient content within the curve segment, because there are quantitative differences in the absorption rates corresponding to different nutrients.

[0052] Step S3-6: According to the extremum index and the sharpness index, the possibility of the overlap area of ​​the curve segments is obtained, and the possibility of the overlap area is positively correlated with the extremum index and the sharpness index.

[0053] According to the extremum index of the candidate curve segment and the sharpness index of the candidate curve segment, the possibility of the overlap area of ​​the candidate curve segment is obtained. The higher the extremum index of the candidate curve segment, the higher the possibility of the existence of the overlap area in the candidate curve segment; the higher the sharpness index of the candidate curve segment, the higher the possibility of the existence of the overlap area in the candidate curve segment. Therefore, the possibility of the overlap area is positively correlated with both the extremum index and the sharpness index. As a specific quantitative method, the calculation method of the overlap area possibility of the candidate curve segment is given as follows: the product of the extremum index of the candidate curve segment and the sharpness index of the candidate curve segment is used as the overlap area possibility of the candidate curve segment, thereby obtaining the overlap area possibility of each curve segment.

[0054] As a specific implementation method, the specific implementation process of step S5 is as follows: Figure 7 As shown, including: Step S5-1: Obtaining the unit difference of the absorption rate between the extreme point and each adjacent sampling point in the adjacent sampling point set, wherein the adjacent sampling point set includes a preset number of sampling points adjacent to the extreme point on the left and right sides.

[0055] The adjacent sampling points of the candidate extreme value point in the target curve segment are set according to actual needs. In this embodiment, the candidate extreme value point corresponds to an adjacent sampling point set, and the adjacent sampling point set includes a preset number of sampling points adjacent to the left and right of the candidate extreme value point, that is, a preset number of sampling points adjacent to the left of the candidate extreme value point and a preset number of sampling points adjacent to the right of the candidate extreme value point are obtained. Among them, the number of sampling points obtained from the left adjacent and the number of sampling points obtained from the right adjacent can be equal or unequal, and the preset number is set according to actual needs, such as determined by the length of the target curve segment and the position of the candidate extreme value point in the target curve segment. Each sampling point in the adjacent sampling point set is defined as an adjacent sampling point.

[0056] Obtain the unit difference of the absorbance between the candidate extreme point and each adjacent sampling point in the set of adjacent sampling points, wherein the unit difference of the absorbance is the unit wavelength difference of the absorbance between the candidate extreme point and the adjacent sampling point. As a specific implementation, obtain the wavelength difference between the candidate extreme point and the adjacent sampling point, obtain the absorbance difference between the candidate extreme point and the adjacent sampling point, and then calculate the ratio of the absorbance difference to the wavelength difference as the unit difference of the absorbance. If equivalent to Figure 3 In the coordinate system shown, the unit difference in absorption rate is the slope of the line connecting the candidate extreme point and the adjacent sampling point.

[0057] Step S5-2: Obtaining the overall absorption rate difference according to each of the absorption rate unit differences.

[0058] Since the unit difference of the absorption rate between the candidate extreme point and multiple adjacent sampling points is obtained, the average of the unit difference of the absorption rate is calculated to obtain the overall absorption rate difference. As a specific example, the 5 sampling points adjacent to the left of the candidate extreme point and the 5 sampling points adjacent to the right are selected. Since the unit difference of the absorption rate is the slope of the line connecting the candidate extreme point and the adjacent sampling points, a specific calculation formula for the overall absorption rate difference is as follows: in, Indicates The overall absorption rate difference of the extreme points is Indicates The slope of the line connecting the extreme point and the i-th adjacent sampling point, i=-5, ..., -1 represents the sequence number of the adjacent sampling point to the left of the extreme point, and i=1, ..., 5 represents the sequence number of the adjacent sampling point to the right of the extreme point.

[0059] Step S5-3: Screening and obtaining target extreme value points according to the overall absorption rate difference.

[0060] The overall absorbance difference indicates the point ordering of the candidate extreme points. The higher the point ordering, the more the candidate extreme points conform to the boundary points of the overlapping area in properties and characteristics, that is, the corresponding overlapping points after at least two nutrient component spectral results overlap, because the slope values ​​of the sampling points in its neighborhood are all high, which characterizes the high sharpness corresponding to the candidate extreme point.

[0061] Therefore, according to the overall absorption rate difference of each extreme point in the target curve segment, the target extreme point is screened. A number can be preset, and the overall absorption rate difference of each extreme point in the target curve segment is sorted from large to small, and the preset number of overall absorption rate differences are obtained, and the extreme point corresponding to the obtained overall absorption rate difference is used as the target extreme point. In order to accurately obtain the overlap area, in this embodiment, the preset number is an even number, such as 2, 4, etc., that is, the number of target extreme points obtained is an even number.

[0062] At this point, the target extreme value point is obtained, that is, the boundary point of the overlap area in the target curve segment is obtained, thereby obtaining the overlap area. Specifically: for any target curve segment, among the target extreme value points contained in the target curve segment, the first target extreme value point and the second target extreme value point enclose the first overlap area, the third target extreme value point and the fourth target extreme value point enclose the second overlap area, and so on, the second to last target extreme value point and the first to last target extreme point enclose the last overlap area. The other target curve segments are processed according to the above process.

[0063] As a more optimal implementation method, in addition to selecting one portion from the food to be tested as the target sample, multiple portions are also selected from the food to be tested, and each portion is defined as a reference sample. Thereby, spectral detection of multiple samples of the food to be tested is achieved, and a spectral curve is obtained corresponding to each sample, which can further eliminate accidental errors. It can also avoid the problem of low credibility of overlapping area distinction caused by the uneven samples and the selection of a single sample. The corresponding nutrients under multiple samples are selected for detection and analysis, and the similarity of the overlapping points is analyzed based on the spectral distinction results of the multiple samples. Then, based on the similarity, the overlap credibility of the overlapping area is judged. The greater the similarity, the higher the corresponding overlap credibility, because it can better represent the consistency of the test results under different samples. Correspondingly, the spectral measurement method also includes the following steps, such as Figure 8 As shown: Step S6: obtaining the spectral curves of other multiple reference samples of the food, and obtaining the target extreme point of each reference sample.

[0064] Obtain spectral curves of multiple reference samples of the food to be tested, the number of reference samples being at least two. Then, according to the above steps, obtain the target extreme value points of each reference sample. It should be understood that the number of target extreme value points of the target sample and each reference sample is the same.

[0065] Step S7: Sort the target extreme points of the target sample and each reference sample in the same sorting method, and construct a data sequence of each serial number, wherein the data sequence is composed of two-dimensional coordinate points of the target extreme points of the target sample and each reference sample belonging to the same serial number, and the two-dimensional coordinate points are composed of the wavelength value and absorbance of the corresponding target extreme point.

[0066] for Figure 3 As shown in the figure, the horizontal coordinate of the two-dimensional coordinate system corresponding to the spectrum curve is the wavelength, and the vertical coordinate is the absorbance. Then for any sampling point in the spectrum curve, it is essentially a two-dimensional coordinate point, which is composed of the wavelength value and absorbance of the corresponding sampling point, where the wavelength value is the horizontal coordinate point and the absorbance is the vertical coordinate point.

[0067] The target extreme points of the target sample and each reference sample are sorted in the same way, specifically according to Figure 3 The target extreme value points of the target samples are sorted according to the size of the wavelength values, and the target extreme value points of each reference sample are sorted according to the size of the wavelength values.

[0068] As a specific example, a coordinate set matrix is ​​constructed based on the target sample and the target extreme points of each reference sample: Among them, M represents the total number of target samples and reference samples (M is greater than or equal to 3), m represents the index of the sample, J represents the number of target extreme points, and j is the index of the target extreme point.

[0069] In the first line: Indicates the wavelength value corresponding to the first target extreme point corresponding to the first sample, Indicates the absorption rate corresponding to the first target extreme point corresponding to the first sample; Indicates the wavelength value corresponding to the second target extreme point corresponding to the first sample, It represents the absorption rate corresponding to the second target extreme point corresponding to the first sample; and so on. Indicates the wavelength value corresponding to the jth target extreme point corresponding to the first sample, Represents the absorption rate corresponding to the jth target extreme point corresponding to the first sample, until, Indicates the wavelength value corresponding to the Jth target extreme point corresponding to the first sample, Represents the absorption rate corresponding to the Jth target extreme point corresponding to the 1st sample.

[0070] Similarly, in the second line: Indicates the wavelength value corresponding to the first target extreme point corresponding to the second sample, Indicates the absorption rate corresponding to the first target extreme point corresponding to the second sample; Indicates the wavelength value corresponding to the second target extreme point corresponding to the second sample, It represents the absorption rate corresponding to the second target extreme point corresponding to the second sample; and so on. Indicates the wavelength value corresponding to the jth target extreme point corresponding to the second sample, Represents the absorption rate corresponding to the jth target extreme point corresponding to the second sample, until, Indicates the wavelength value corresponding to the Jth target extreme point corresponding to the second sample, Represents the absorption rate corresponding to the Jth target extreme point corresponding to the second sample.

[0071] In line m: Indicates the wavelength value corresponding to the first target extreme point corresponding to the mth sample, Indicates the absorption rate corresponding to the first target extreme point corresponding to the mth sample; Indicates the wavelength value corresponding to the second target extreme point corresponding to the mth sample, It represents the absorption rate corresponding to the second target extreme point corresponding to the mth sample; and so on. Indicates the wavelength value corresponding to the jth target extreme point corresponding to the mth sample, Represents the absorption rate corresponding to the jth target extreme point corresponding to the mth sample, until, Indicates the wavelength value corresponding to the Jth target extreme point corresponding to the mth sample, Represents the absorption rate corresponding to the Jth target extreme point corresponding to the mth sample.

[0072] In row M: Indicates the wavelength value corresponding to the first target extreme point corresponding to the Mth sample, Indicates the absorption rate corresponding to the first target extreme point corresponding to the Mth sample; Indicates the wavelength value corresponding to the second target extreme point corresponding to the Mth sample, It represents the absorption rate corresponding to the second target extreme point corresponding to the Mth sample; and so on. Indicates the wavelength value corresponding to the jth target extreme point corresponding to the Mth sample, Represents the absorption rate corresponding to the jth target extreme point corresponding to the Mth sample, until, Indicates the wavelength value corresponding to the Jth target extreme point corresponding to the Mth sample, Represents the absorption rate corresponding to the Jth target extreme point corresponding to the Mth sample.

[0073] by For example, It represents the j-th target extreme point corresponding to the m-th sample, that is, it represents the two-dimensional coordinate point corresponding to the j-th target extreme point corresponding to the m-th sample.

[0074] Each row of the coordinate set matrix represents the set of target extreme value points corresponding to each sample, where, as a specific implementation, the first row is the target sample, and starting from the second row, each reference sample is represented. Therefore, there are M-1 reference samples in the total number of samples M.

[0075] Each column of the coordinate set matrix represents the target extreme value points of each sample belonging to the same target extreme value point sequence number. Specifically, the first column represents the target extreme value point set of the first target extreme value point of the target sample and each reference sample, the second column represents the target extreme value point set of the second target extreme value point of the target sample and each reference sample, and so on. The Jth column represents the target extreme value point set of the Jth target extreme value point of the target sample and each reference sample. The target extreme value point set of each sequence number is the data sequence of each sequence number, thereby constructing the data sequence of each sequence number, and each data sequence constitutes a column vector.

[0076] Step S8: Based on the similarity between the data sequence of each serial number and the data sequence of other serial numbers, the final coincidence point is screened from the target extreme value points of the target sample.

[0077] For the sake of convenience, the serial number of any target extreme value point is set as the candidate serial number. The similarity between the data sequence of the candidate serial number and the data sequence of each other serial number is obtained to obtain the similarity index of the candidate serial number. Then, according to the similarity index of the candidate serial number, it is determined whether the target extreme value point of the target sample corresponding to the candidate serial number is the final coincidence point.

[0078] Specifically: based on the coordinate set matrix in the above text, obtain the similarity between the first column vector and each other column vector, and then average the obtained similarities, and the result is the similarity index of the first column vector, that is, the similarity index corresponding to the first target extreme point; obtain the similarity between the second column vector and each other column vector, and then average the obtained similarities, and the result is the similarity index of the second column vector, that is, the similarity index corresponding to the second target extreme point; obtain the similarity between the third column vector and each other column vector, and then average the obtained similarities, and the result is the similarity index of the third column vector, that is, the similarity index corresponding to the third target extreme point; and so on, until the similarity between the last column vector and each other column vector is obtained, and then average the obtained similarities, and the result is the similarity index of the last column vector, that is, the similarity index corresponding to the last target extreme point. So far, the similarity index corresponding to each target extreme point is obtained. Among them, the similarity can be cosine similarity, that is, the similarity is obtained by using the cosine similarity algorithm.

[0079] The higher the similarity, the higher the coincidence of the target extreme point in the target sample and the corresponding column, and the higher the possibility that the target extreme point is the boundary of the overlapping area of ​​the spectral detection results of different nutrients.

[0080] Therefore, a number can be preset and defined as the preset number of final coincidence points. The similarity indexes corresponding to the target extreme value points in the target curve segment are sorted from large to small, and the preset number of similarity indexes before the final coincidence point is obtained, and the target extreme value points corresponding to the preset number of similarity indexes before the final coincidence point are used as the final coincidence points. In order to accurately obtain the overlap area, in this embodiment, the preset number of final coincidence points is an even number, such as 2, 4, etc., that is, the number of final coincidence points obtained is an even number. Moreover, it should be understood that the preset number of final coincidence points is less than the preset number of target extreme value points in the foregoing text. The final overlap area is obtained according to the final coincidence point.

[0081] The process of obtaining the final overlap area is as follows: for any final overlap point contained in a target curve segment, the first final overlap point and the second final overlap point enclose the first overlap area, the third final overlap point and the fourth final overlap point enclose the second overlap area, and so on, the second to last final overlap point and the first to last final overlap point enclose the last overlap area. The other target curve segments are processed according to the above process to obtain the overlap areas in each target curve segment.

[0082] In the subsequent step, after obtaining the final overlapping area, the overlapping area is split to obtain the unpacking result, which can eliminate the influence of the overlap of food nutrients, accurately characterize the various nutrients in the food, and achieve the purpose of error-free measurement, thereby realizing the accurate measurement of food nutrients. The overlapping area can be subjected to secondary differentiation for detection (secondary differentiation is an existing technology and will not be elaborated here), which amplifies the width and narrowness of the absorption peak that exists due to differences in nutrient absorption rate, etc., and improves the recognition in the process of distinguishing the absorption peak.

[0083] As another implementation, the above steps S6-S8 may not be set.

[0084] This embodiment also provides a spectrum measurement system 900 for food nutritional components. Fig. 9 As shown, it includes a memory 901 and a processor 902, the memory 901 is used to store an executable program code 903, and the processor 902 is used to call and run the program code 903 from the memory 901 to implement Figure 2 The spectroscopic method shown is applied to the determination of nutritional components in food.

[0085] This embodiment also provides a computer-readable storage medium 1000, such as Fig.10 As shown, the computer readable storage medium 1000 stores a computer program code 1001. When the computer program code 1001 is executed on a computer, the computer executes Figure 2 The spectroscopic method shown is applied to the determination of nutritional components in food.

[0086] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for spectroscopic determination of food nutrients, characterized in that: include: Obtaining a spectrum curve of a target food sample, wherein the abscissa of the spectrum curve is wavelength and the ordinate is absorbance; Dividing the spectrum curve into a plurality of curve segments; Based on the number of extreme points in the curve segment and the difference in absorption rate between any two adjacent feature points in the curve segment, the possibility of the overlap area of ​​the curve segment is obtained. The overlap area possibility is used to characterize the possibility of the existence of the overlap area in the curve segment. Based on the possibility of the overlapped area, obtaining a target curve segment; Based on the unit difference of the absorption rate between each extreme point in the target curve segment and its adjacent sampling points, the target extreme point is screened and obtained, and the target extreme point is used to characterize the boundary point of the overlapping area in the target curve segment.

2. The method for spectroscopic determination of food nutrients according to claim 1, characterized in that: The spectrum curve is equally divided into a number of curve segments, including: Using a fast Fourier transform algorithm, obtaining a minimum positive period value corresponding to the periodic function of the spectrum curve; Based on the minimum positive period value, the spectrum curve is equally divided into a plurality of curve segments.

3. The method for spectroscopic determination of food nutrients according to claim 1, characterized in that: The process of acquiring the feature points includes: Get the interval length between any two adjacent extreme points in the curve segment, and get the minimum interval length; Dividing the curve segment into a plurality of interval segments according to the minimum interval length; A sampling point is selected from each interval segment as the feature point.

4. The method for spectroscopic determination of food nutrients according to claim 3, characterized in that: Selecting a sampling point from each interval segment as the feature point includes: selecting a sampling point at the center of the interval segment as the feature point.

5. The method for spectroscopic determination of food nutrients according to claim 1, characterized in that: Based on the number of extreme points in the curve segment and the difference in absorption rate between any two adjacent feature points in the curve segment, the possibility of the overlap area of ​​the curve segment is obtained, including: Based on the number of extreme value points in the curve segment, the extreme value index of the curve segment is obtained; Based on the difference in absorption rates between any two adjacent feature points in the curve segment, a sharpness index of the curve segment is obtained, wherein the sharpness index is used to characterize the overall level of the difference in absorption rates between all two adjacent feature points in the curve segment; According to the extremum index and the sharpness index, the possibility of the overlap area of ​​the curve segments is obtained, and the possibility of the overlap area is positively correlated with both the extremum index and the sharpness index.

6. The method for spectroscopic determination of food nutrients according to claim 1, characterized in that: Based on the unit difference of the absorption rate between each extreme point in the target curve segment and its adjacent sampling points, the target extreme point is screened and obtained, including: Obtaining a unit difference in absorption rate between the extreme point and each adjacent sampling point in a set of adjacent sampling points, wherein the set of adjacent sampling points includes a preset number of sampling points adjacent to the extreme point on the left and right sides respectively; Obtaining an overall absorption rate difference according to each of the absorption rate unit differences; According to the overall absorption rate difference, the target extreme value point is screened and obtained.

7. The method for spectroscopic determination of food nutrients according to claim 6, characterized in that: The unit difference of absorbance is the difference of absorbance between the extreme point and the adjacent sampling point at unit wavelength; Obtaining the overall absorption rate difference according to each of the absorption rate unit differences includes: calculating an average value of the absorption rate unit differences to obtain the overall absorption rate difference.

8. The method for spectroscopic determination of food nutrients according to claim 1, characterized in that: The spectrometry method further comprises: Obtaining the spectral curves of multiple other reference samples of the food, and obtaining the target extreme value point of each reference sample; Sorting the target extreme value points of the target sample and each reference sample in the same sorting manner, and constructing a data sequence of each serial number, wherein the data sequence is composed of two-dimensional coordinate points of the target extreme value points of the target sample and each reference sample belonging to the same serial number, and the two-dimensional coordinate points are composed of wavelength values ​​and absorbances of corresponding target extreme value points; Based on the similarity between the data sequence of each serial number and the data sequence of other serial numbers, the final coincidence point is screened from the target extreme value points of the target sample.

9. The method for spectroscopic determination of food nutrients according to claim 8, characterized in that: Based on the similarity between the data sequence of each serial number and the data sequence of other serial numbers, the final coincidence points are screened from the target extreme value points of the target sample, including: Obtaining the degree of similarity between the data sequence of the candidate sequence number and the data sequences of other sequence numbers to obtain a similarity index of the candidate sequence number; the candidate sequence number is any sequence number; According to the similarity index of the candidate sequence number, it is determined whether the target extreme value point of the target sample corresponding to the candidate sequence number is the final coincidence point.

10. A spectroscopic determination system for food nutritional components, characterized in that: It comprises a memory and a processor, wherein the memory is used to store executable program code, and the processor is used to call and run the program code from the memory to implement the spectral determination method for food nutritional components as described in any one of claims 1-9.