Rapid detection system and method for relative content of anthocyanin in berries
The berry spectroscopic scans the wavelength range of 500nm to 550nm by imaging spectrometer and screens the best predicted wavelengths using linear regression method, which solves the problem of insufficient accuracy and speed of berry anthocyanins detection in the prior art, and achieves higher detection accuracy and reliability.
Patent Information
- Application Number
- CN202510219971.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-04-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing berry anthocyanin detection technology has shortcomings in accuracy, speed and applicability, and it is difficult to meet the needs of rapid development and diversified application scenarios of the berry industry.
The berry sample was spectral scanned at wavelengths of 500nm to 550nm, and the light intensity values at each wavelength were recorded. The equations corresponding to each wavelength were constructed by linear regression method, and the wavelength with the smallest mean square error was screened as the best predicted wavelength, which was used to calculate the relative content of anthocyanins.
Through fine spectral scanning and linear regression analysis, the spectral information of anthocyanins is comprehensively captured, which enhances the accuracy and reliability of the detection, and overcomes the problems of missing information and influence of human factors in traditional methods.
Smart Images

Figure CN119757258A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of agricultural product detection, and in particular to a system and method for quickly detecting the relative content of anthocyanins in berries. Background Art
[0002] Anthocyanins, as a natural water-soluble pigment widely found in berries, not only give berries rich and gorgeous colors, but also have multiple physiological functions such as extremely high antioxidant, anti-inflammatory, prevention of cardiovascular diseases and protection of eyesight, showing great application potential in many fields such as food, medicine, and cosmetics. Therefore, accurate and rapid detection of the relative content of anthocyanins in berries is of great significance for berry quality evaluation, variety selection, processing technology optimization, and quality control of related products.
[0003] In the field of anthocyanin content detection in berries, traditional detection methods have many problems. For example, although some chemical analysis methods have acceptable accuracy, the operation process is extremely cumbersome, requiring professionals to spend a lot of time on sample pretreatment, complex reagent preparation and precise titration operations, and the entire process is easily affected by human factors, resulting in the accuracy and repeatability of the results being difficult to guarantee. In addition, some instrumental analysis methods, such as high performance liquid chromatography (HPLC), although they can accurately determine the anthocyanin content, are expensive in equipment, have high maintenance costs, and have strict requirements on the detection environment and samples, making them difficult to promote and apply in some grassroots laboratories or on-site rapid detection scenarios. Some spectral analysis methods may only detect a single wavelength or a limited number of wavelengths, and cannot fully capture the changes in the spectral characteristics of anthocyanins at different wavelengths, thereby affecting the accuracy and reliability of the detection, and it is difficult to establish a widely applicable and highly accurate anthocyanin content prediction model.
[0004] In summary, the existing anthocyanin detection technology has deficiencies in many aspects such as accuracy, rapidity and applicability. It is difficult to meet the needs of the current rapid development of the berry industry and diversified application scenarios for accurate and efficient detection of anthocyanins. An innovative and comprehensive detection method is needed.
[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not constitute the prior art that is already known to one of ordinary skill in the art. Summary of the invention
[0006] The object of the present invention is to provide a system and method for rapid detection of relative content of anthocyanins in berries, so as to solve the problems raised in the above-mentioned background technology.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] A rapid detection system for relative content of anthocyanins in berries, comprising:
[0009] The characteristic value calculation module is used to use an imaging spectrometer to perform spectral scanning on the same type of berry samples at wavelengths of 500nm to 550nm, record the light intensity value of each pixel at each wavelength, calculate the average light intensity of each pixel according to the wavelength, and obtain the characteristic value of light intensity at each wavelength;
[0010] The data integration module is used to extract anthocyanin extract after removing impurities from berry samples, determine the relative content of anthocyanin by chemical titration, record the light intensity characteristic value of each sample and its corresponding relative content of anthocyanin, and construct a standard detection data set;
[0011] The linear equation construction module is used to extract the data of the standard detection data set, take the light intensity characteristic value as the independent variable, and the relative content of anthocyanins as the dependent variable, and construct the linear regression equation corresponding to each wavelength;
[0012] The wavelength screening module is used to substitute the light intensity characteristic values calculated at each wavelength into the corresponding linear regression equation to obtain the predicted value, calculate the mean square error of each wavelength according to the mean square error formula, and the wavelength with the smallest mean square error is taken as the optimal prediction wavelength, and its corresponding formula is the anthocyanin content prediction formula;
[0013] The content detection module is used to use an imaging spectrometer to scan the berries to be detected at the optimal predicted wavelength, calculate the light intensity characteristic value, substitute the light intensity characteristic value into the anthocyanin content prediction formula, and calculate the relative content of anthocyanin.
[0014] Furthermore, the method for calculating the characteristic value of light intensity at each wavelength is:
[0015] Select berry samples of the same variety, the number is recorded as n, n is a positive integer ≥ 30, the wavelength parameter of the imaging spectrometer is set to 500nm to 550nm, the resolution is 1nm, the number of collected pixels is m, m is a positive integer ≥ 1000, for different wavelengths, according to the collected light intensity values of each pixel point, the light intensity characteristic value is calculated by averaging:
[0016]
[0017] In the formula, I TZ,λ Expressed as the characteristic value of light intensity at different wavelengths, I i,λ Represents the light intensity value of the i-th pixel at each wavelength, where i=1, 2, …, m, λ=500, 501, …, 550.
[0018] Further, the method for determining the relative content of anthocyanidins by chemical titration is:
[0019] Select the mass as MAC anthocyanin extract, adding potassium thiocyanate solution as an indicator, with a concentration of The ferric chloride solution is used as the titration reagent. When the color of the anthocyanin extract is stable in blue and does not fade within 30 seconds, the volume of the ferric chloride solution consumed is recorded as The stoichiometric ratio of anthocyanin and ferric chloride is 1, so the formula for calculating the amount of anthocyanin is:
[0020]
[0021] Where n AC The amount of substance expressed as anthocyanin;
[0022] The calculation formula of the quality of anthocyanins is:
[0023] m AC =n AC ·M AC
[0024] In the formula, m AC Expressed as the mass of anthocyanins;
[0025] The calculation formula of the relative content of anthocyanins is:
[0026]
[0027] In the formula, ω AC It is expressed as the relative content of anthocyanins measured by chemical titration method.
[0028] Furthermore, the method for constructing the linear regression equation corresponding to each wavelength is:
[0029] The light intensity characteristic values at each wavelength extracted from the standard detection data set and the corresponding anthocyanin relative content data are denoted as (I TZk,λ ,ω k ), where k = 1, 2, ..., n, where n is a positive integer ≥ 30, representing the number of samples of the berry variety;
[0030] For each wavelength λ, the mean value of the light intensity characteristic value is calculated as:
[0031]
[0032] In the formula, It is expressed as the mean of the light intensity characteristic values;
[0033] The mean calculation formula of the relative content of anthocyanins is:
[0034]
[0035] In the formula, It is expressed as the mean of the relative content of anthocyanins;
[0036] Construct the linear regression equation:
[0037] ω=a λ +b λ I TZ,λ
[0038] In the formula, ω represents the relative content of anthocyanins, a λ Denoted as intercept, b λ Expressed as the slope,
[0039]
[0040] Further, calculating the mean square error of each wavelength according to the mean square error formula includes the following steps:
[0041] The light intensity characteristic value I calculated at each wavelength TZk,λ Substitute into the corresponding linear regression equation ω=a λ +b λ I TZ,λ , the predicted value of anthocyanin relative content calculated based on the regression equation at each wavelength was obtained λ ′, calculate the mean square error corresponding to each wavelength:
[0042]
[0043] In the formula, MSE λ It is expressed as the mean square error corresponding to each wavelength, n is the number of samples, ω′ λ,k It is expressed as the relative content of anthocyanins predicted by the constructed linear regression equation for the kth sample at the wavelength of λ.
[0044] Furthermore, the method for constructing anthocyanin content prediction formula is:
[0045] By calculating the mean square error MSE corresponding to each wavelength λ , find the wavelength that minimizes the mean square error value, mark it as the optimal prediction wavelength, and construct the linear regression equation corresponding to the optimal prediction wavelength:
[0046] ω=a λ′ +b λ′ I TZ,λ′
[0047] Where λ′ is the optimal predicted wavelength for this variety of berries, a λ′ It is expressed as the intercept of the linear regression equation for this variety of berries, b λ′ It is expressed as the slope of the linear regression equation for the berry variety, I TZ,λ′ It is expressed as the characteristic value of light intensity at the best predicted wavelength for this variety of berries.
[0048] Further, the method for calculating the relative content of anthocyanins is:
[0049] Use an imaging spectrometer to perform a spectral scan of the berries to be tested at the best predicted wavelength for this variety of berries, and calculate the light intensity characteristic value by averaging:
[0050]
[0051] In the formula, I TZ,λ′ It is represented by the characteristic value of light intensity at the best predicted wavelength, m is represented by the number of collected pixels, m is a positive integer ≥ 1000, I i represents the light intensity of the i-th pixel, i = 1, 2, ..., m;
[0052] Substitute the light intensity characteristic value into the linear regression equation corresponding to the best predicted wavelength:
[0053] ω=a λ′ +b λ′ I TZ,λ′
[0054] The calculated result was recorded as the relative anthocyanin content of the berry.
[0055] The present invention further provides a method for rapid detection of the relative content of anthocyanins in berries, which is obtained by executing the above-mentioned rapid detection system for the relative content of anthocyanins in berries, and comprises:
[0056] Step 1: Use an imaging spectrometer to perform spectral scanning on the same type of berry samples at wavelengths of 500nm to 550nm, record the light intensity value of each pixel at each wavelength, calculate the average light intensity of each pixel according to the wavelength, and obtain the characteristic value of light intensity at each wavelength;
[0057] Step 2: After removing impurities from the berry samples, extract anthocyanin extracts, determine the relative content of anthocyanins by chemical titration, record the light intensity characteristic value of each sample and its corresponding relative content of anthocyanins, and construct a standard detection data set;
[0058] Step 3: Extract the data of the standard detection data set, take the light intensity characteristic value as the independent variable and the relative content of anthocyanins as the dependent variable, and construct the linear regression equation corresponding to each wavelength;
[0059] Step 4: Substitute the light intensity characteristic values calculated at each wavelength into the corresponding linear regression equation to obtain the predicted value, calculate the mean square error of each wavelength according to the mean square error formula, and the wavelength with the smallest mean square error is taken as the optimal prediction wavelength, and its corresponding formula is the anthocyanin content prediction formula;
[0060] Step 5: Use an imaging spectrometer to scan the berries to be tested at the optimal predicted wavelength, calculate the light intensity characteristic value, substitute the light intensity characteristic value into the anthocyanin content prediction formula, and calculate the relative anthocyanin content.
[0061] Compared with the prior art, the present invention has the following beneficial effects:
[0062] By performing a fine spectral scan in the wavelength range of 500nm to 550nm and accurately calculating the characteristic value of light intensity, the spectral information of anthocyanins at multiple key wavelengths can be comprehensively and systematically captured, overcoming the problem of information loss caused by traditional spectral analysis methods that only detect a single or a few wavelengths. Then, based on the multi-wavelength data, a linear regression equation corresponding to each wavelength is constructed, and the wavelength most relevant to the anthocyanin content is accurately screened out based on the mean square error. The complex relationship between the spectral characteristics of different wavelengths and the anthocyanin content is found, thereby enhancing the accuracy and reliability of the detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 It is a schematic diagram of the overall method flow of the present invention;
[0064] Figure 2 It is a schematic diagram of the overall system module of the present invention. DETAILED DESCRIPTION
[0065] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments.
[0066] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0067] Example:
[0068] See also Figure 1 , the present invention provides a technical solution:
[0069] A rapid detection system for the relative content of anthocyanins in berries, comprising a characteristic value calculation module, a data integration module, a linear equation construction module, a wavelength screening module and a content detection module, wherein:
[0070] The characteristic value calculation module uses an imaging spectrometer to perform spectral scanning on the same type of berry samples at wavelengths of 500nm to 550nm, records the light intensity value of each pixel point at each wavelength, calculates the average light intensity of each pixel point according to the wavelength, and obtains the light intensity characteristic value at each wavelength.
[0071] The conjugated double bond system in anthocyanin molecules can absorb light in this wavelength band, thereby generating electronic transitions and showing obvious light absorption. Anthocyanin, such as cyanidin and delphinidin, have strong absorption at 500nm to 550nm, and compared with other wavelength regions, the absorption peak in this range is not easily affected by environmental factors such as temperature and pH value, and thus is not easily significantly offset or deformed, providing a relatively stable and reliable detection signal. By detecting changes in light intensity within this wavelength range, the content of anthocyanin can be specifically reflected.
[0072] Select berry samples of the same variety, the number of which is recorded as n, where n is a positive integer ≥ 30. A large sample size helps to more comprehensively cover the various characteristics and differences of the berries of this variety, reduce the impact of individual differences on the results, and thus more accurately reflect the overall characteristics of the berries of this variety;
[0073] The wavelength parameters of the imaging spectrometer were set to 500nm to 550nm with a resolution of 1nm to accurately capture these subtle spectral changes;
[0074] When performing the imaging spectrometer scanning operation, it is necessary to ensure that the scanning area is strictly limited to the inside of the berry and must not exceed the boundary range of the berry. The number of pixels collected is m, where m is a positive integer ≥ 1000. The light intensity of different pixels may vary due to factors such as the unevenness of the berry surface and the angle of illumination. A large amount of pixel data can be averaged to remove random errors and more comprehensively reflect the light intensity characteristics of the entire berry sample. For different wavelengths, the light intensity characteristic value is calculated by averaging the light intensity values of each pixel collected:
[0075]
[0076] In the formula, I TZ,λ Expressed as the characteristic value of light intensity at different wavelengths, I i,λ Represents the light intensity value of the i-th pixel at each wavelength, where i=1, 2, …, m, λ=500, 501, …, 550.
[0077] After removing impurities from the berry samples, the data integration module extracted anthocyanin extracts, determined the relative content of anthocyanins by chemical titration, recorded the light intensity characteristic value of each sample and its corresponding relative content of anthocyanins, and constructed a standard detection data set.
[0078] Chemical titration is a classic and accurate method for determining the relative content of anthocyanins. The accurate stoichiometric relationship for calculating the content of anthocyanins can provide reliable dependent variable data for the subsequent construction of a linear regression equation. It can directly react and determine the anthocyanins in the sample and more realistically reflect the actual content of anthocyanins in the sample.
[0079] After removing impurities from the berry sample, select AC anthocyanin extract, adding potassium thiocyanate solution as an indicator, with a concentration of The ferric chloride solution is used as the titration reagent. When the color of the anthocyanin extract is stable in blue and does not fade within 30 seconds, the volume of the ferric chloride solution consumed is recorded as The stoichiometric ratio of anthocyanin and ferric chloride is 1, so the formula for calculating the amount of anthocyanin is:
[0080]
[0081] Where n AC The amount of substance expressed as anthocyanin;
[0082] The calculation formula of the quality of anthocyanins is:
[0083] m AC =n AC ·M AC
[0084] In the formula, m AC Expressed as the mass of anthocyanins;
[0085] The calculation formula for the relative content of anthocyanins is:
[0086]
[0087] In the formula, ω AC It is expressed as the relative content of anthocyanins measured by chemical titration. The chemical titration operation is then repeated for each berry sample, and the corresponding light intensity characteristic value is recorded to construct a standard detection data set.
[0088] The linear equation construction module extracts data from the standard detection data set, takes the light intensity characteristic value as the independent variable and the relative content of anthocyanins as the dependent variable, and constructs the linear regression equation corresponding to each wavelength.
[0089] Many berry samples with different relative anthocyanin contents were collected, and their light intensity values were measured in the wavelength range of 500nm to 550nm. Some related research on the light intensity values of different anthocyanin relative contents at different wavelengths, such as a study on blueberry anthocyanins, obtained the following data:
[0090] |Relative content of anthocyanins, light intensity value at 520nm wavelength|: |0.1, 0.07|, |0.2, 0.15|, |0.3, 0.22|, |0.4, 0.30|, |0.5, 0.38|, |0.6, 0.45|, |0.7, 0.53|, |0.8, 0.60|, |0.9, 0.68|, |1.0, 0.75|
[0091] After drawing the scatter plot, it is clearly observed that at each wavelength, there is a significant linear trend between the characteristic value of light intensity and the relative content of anthocyanins. Compared with other possible fitting curves, the linear regression equation can best fit the distribution of these scattered points, that is, it can describe the intrinsic relationship between the characteristic value of light intensity and the relative content of anthocyanins with the smallest error.
[0092] The light intensity characteristic value at each wavelength and its corresponding anthocyanin relative content data are extracted from the constructed standard detection data set, and recorded as (I TZk,λ ,ω k ), for each wavelength λ, the mean value of the light intensity characteristic value is calculated as:
[0093]
[0094] In the formula, It is expressed as the mean of the light intensity characteristic values;
[0095] The mean calculation formula of the relative content of anthocyanins is:
[0096]
[0097] In the formula, It is expressed as the mean of the relative content of anthocyanins;
[0098] Construct the linear regression equation:
[0099] ω=a λ +b λ I TZ,λ
[0100] In the formula, ω represents the relative content of anthocyanins, a λ Denoted as intercept, b λ Expressed as the slope,
[0101]
[0102] The wavelength screening module substitutes the light intensity characteristic value calculated at each wavelength into the corresponding linear regression equation to obtain the predicted value, and calculates the mean square error of each wavelength according to the mean square error formula. The wavelength with the smallest mean square error is taken as the optimal prediction wavelength, and its corresponding formula is the anthocyanin content prediction formula.
[0103] The mean square error (MSE) is a common indicator to measure the difference between the predicted value and the true value. By calculating the mean square error at each wavelength, the error between the prediction model built based on spectral data and the actual anthocyanin relative content at different wavelengths can be quantified, so as to intuitively understand the accuracy of each wavelength in predicting anthocyanin content.
[0104] The light intensity characteristic value I calculated at each wavelength TZk,λ Substitute into the corresponding linear regression equation ω=a λ +b λ I TZ,λ , the predicted value of anthocyanin relative content calculated based on the regression equation at each wavelength was obtained λ ′, calculate the mean square error corresponding to each wavelength:
[0105]
[0106] In the formula, MSE λ It is expressed as the mean square error corresponding to each wavelength, n is the number of samples, ω′ λ,k It is expressed as the relative content of anthocyanins predicted by the constructed linear regression equation for the kth sample at the wavelength of λ.
[0107] The minimum mean square error means that at this wavelength, the average error between the prediction model based on spectral data and the actual anthocyanin relative content is the smallest, that is, the prediction result is closest to the true value. Selecting such a wavelength as the optimal prediction wavelength can maximize the accuracy and reliability of anthocyanin content prediction and provide more accurate analysis results for practical applications.
[0108] Therefore, by calculating the mean square error MSE corresponding to each wavelength λ (λ=500,501,…,550), find the wavelength that minimizes the mean square error value, mark it as the optimal prediction wavelength, and construct the linear regression equation corresponding to the optimal prediction wavelength:
[0109] ω=a λ′ +b λ′ I TZ,λ′
[0110] Where λ′ is the optimal predicted wavelength for this variety of berries, a λ′ It is expressed as the intercept of the linear regression equation for this variety of berries, b λ′It is expressed as the slope of the linear regression equation for the berry variety, I TZ,λ′ It is expressed as the characteristic value of light intensity at the best predicted wavelength for this variety of berries.
[0111] The content detection module uses an imaging spectrometer to scan the berries to be tested at the optimal predicted wavelength, calculates the light intensity characteristic value, substitutes the light intensity characteristic value into the anthocyanin content prediction formula, and calculates the relative content of anthocyanin.
[0112] For the berries to be tested, when performing the imaging spectrometer scanning operation, find the best predicted wavelength for the berries of this variety, use the imaging spectrometer to perform spectral scanning at the best predicted wavelength for the berries of this variety, and ensure that the scanning area is strictly limited to the inside of the berries and does not exceed the boundary range of the berries. The number of pixels collected during the scanning process is greater than 1000, and the light intensity characteristic value is calculated by averaging:
[0113]
[0114] In the formula, I TZ,λ′ It is represented by the characteristic value of light intensity at the best predicted wavelength, m is represented by the number of collected pixels, m is a positive integer ≥ 1000, I i represents the light intensity of the i-th pixel, i = 1, 2, ..., m;
[0115] Since the best prediction wavelength that best fits the law of change in the relative content of anthocyanins has been determined with the help of the mean square error, the characteristic value of the light intensity at this wavelength is directly substituted into the corresponding linear regression equation:
[0116] ω=a λ′ +b λ′ I TZ,λ′
[0117] The calculated result was recorded as the relative anthocyanin content of the berry.
[0118] See also Figure 2 The present invention also provides a method for rapid detection of the relative content of anthocyanins in berries, which is obtained by executing the above-mentioned rapid detection system for the relative content of anthocyanins in berries, and comprises:
[0119] Step 1: Use an imaging spectrometer to perform spectral scanning on the same type of berry samples at wavelengths of 500nm to 550nm, record the light intensity value of each pixel at each wavelength, calculate the average light intensity of each pixel according to the wavelength, and obtain the characteristic value of light intensity at each wavelength;
[0120] Step 2: After removing impurities from the berry samples, extract anthocyanin extracts, determine the relative content of anthocyanins by chemical titration, record the light intensity characteristic value of each sample and its corresponding relative content of anthocyanins, and construct a standard detection data set;
[0121] Step 3: Extract the data of the standard detection data set, take the light intensity characteristic value as the independent variable and the relative content of anthocyanins as the dependent variable, and construct the linear regression equation corresponding to each wavelength;
[0122] Step 4: Substitute the light intensity characteristic values calculated at each wavelength into the corresponding linear regression equation to obtain the predicted value, calculate the mean square error of each wavelength according to the mean square error formula, and the wavelength with the smallest mean square error is taken as the optimal prediction wavelength, and its corresponding formula is the anthocyanin content prediction formula;
[0123] Step 5: Use an imaging spectrometer to scan the berries to be tested at the optimal predicted wavelength, calculate the light intensity characteristic value, substitute the light intensity characteristic value into the anthocyanin content prediction formula, and calculate the relative anthocyanin content.
[0124] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.
[0125] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product. Those skilled in the art may appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed by hardware or software methods depends on the specific application and design constraints of the technical solution.
[0126] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0127] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A rapid detection system for the relative content of anthocyanins in berries, characterized in that: include: The characteristic value calculation module is used to use an imaging spectrometer to perform spectral scanning on the same type of berry samples at wavelengths of 500nm to 550nm, record the light intensity value of each pixel at each wavelength, calculate the average light intensity of each pixel according to the wavelength, and obtain the characteristic value of light intensity at each wavelength; The data integration module is used to extract anthocyanin extract after removing impurities from berry samples, determine the relative content of anthocyanin by chemical titration, record the light intensity characteristic value of each sample and its corresponding relative content of anthocyanin, and construct a standard detection data set; The linear equation construction module is used to extract the data of the standard detection data set, take the light intensity characteristic value as the independent variable, and the relative content of anthocyanins as the dependent variable, and construct the linear regression equation corresponding to each wavelength; The wavelength screening module is used to substitute the light intensity characteristic values calculated at each wavelength into the corresponding linear regression equation to obtain the predicted value, calculate the mean square error of each wavelength according to the mean square error formula, and the wavelength with the smallest mean square error is taken as the optimal prediction wavelength, and its corresponding formula is the anthocyanin content prediction formula; The content detection module is used to use an imaging spectrometer to scan the berries to be detected at the optimal predicted wavelength, calculate the light intensity characteristic value, substitute the light intensity characteristic value into the anthocyanin content prediction formula, and calculate the relative content of anthocyanin.
2. A rapid detection system for relative content of anthocyanins in berries according to claim 1, characterized in that: The method for calculating the characteristic value of light intensity at each wavelength is: Select berry samples of the same variety, the number is recorded as n, n is a positive integer ≥ 30, the wavelength parameter of the imaging spectrometer is set to 500nm to 550nm, the resolution is 1nm, the number of collected pixels is m, m is a positive integer ≥ 1000, for different wavelengths, according to the collected light intensity values of each pixel point, the light intensity characteristic value is calculated by averaging: In the formula, I TZ,λ Expressed as the characteristic value of light intensity at different wavelengths, I i,λ Represents the light intensity value of the i-th pixel at each wavelength, where i=1, 2, …, m, λ=500, 501, …, 550.
3. A rapid detection system for relative content of anthocyanins in berries according to claim 1, characterized in that: The method for determining the relative content of anthocyanins by chemical titration is: Select the mass as M AC anthocyanin extract, adding potassium thiocyanate solution as an indicator, with a concentration of The ferric chloride solution is used as the titration reagent. When the color of the anthocyanin extract is stable in blue and does not fade within 30 seconds, the volume of the ferric chloride solution consumed is recorded as The stoichiometric ratio of anthocyanin and ferric chloride is 1, so the formula for calculating the amount of anthocyanin is: Where n AC The amount of substance expressed as anthocyanin; The calculation formula of the quality of anthocyanins is: m AC =n AC ·M AC In the formula, m AC Expressed as the mass of anthocyanins; The calculation formula of the relative content of anthocyanins is: In the formula, ω AC It is expressed as the relative content of anthocyanins measured by chemical titration method.
4. A rapid detection system for relative content of anthocyanins in berries according to claim 1, characterized in that: The method for constructing the linear regression equation corresponding to each wavelength is: The light intensity characteristic values at each wavelength extracted from the standard detection data set and the corresponding anthocyanin relative content data are denoted as (I TZk,λ ,ω k ), where k = 1, 2, ..., n, where n is a positive integer ≥ 30, representing the number of samples of the berry variety; For each wavelength λ, the mean value of the light intensity characteristic value is calculated as: In the formula, It is expressed as the mean of the light intensity characteristic values; The mean calculation formula of the relative content of anthocyanins is: In the formula, It is expressed as the mean of the relative content of anthocyanins; Construct the linear regression equation: ω=a λ +b λ I TZ,λ In the formula, ω represents the relative content of anthocyanins, a λ Denoted as intercept, b λ Expressed as the slope, 5. A rapid detection system for relative content of anthocyanins in berries according to claim 1, characterized in that: Calculating the mean square error of each wavelength according to the mean square error formula includes the following steps: The light intensity characteristic value I calculated at each wavelength TZk,λ Substitute into the corresponding linear regression equation ω=a λ +b λ I TZ,λ , the predicted value of anthocyanin relative content calculated based on the regression equation at each wavelength was obtained λ ′, calculate the mean square error corresponding to each wavelength: In the formula, MSE λ It is expressed as the mean square error corresponding to each wavelength, n is the number of samples, ω′ λ,k It is expressed as the relative content of anthocyanins predicted by the constructed linear regression equation for the kth sample at the wavelength of λ.
6. A rapid detection system for relative content of anthocyanins in berries according to claim 5, characterized in that: The method for constructing the anthocyanin content prediction formula is: By calculating the mean square error MSE corresponding to each wavelength λ , find the wavelength that minimizes the mean square error value, mark it as the optimal prediction wavelength, and construct the linear regression equation corresponding to the optimal prediction wavelength: ω=a λ′ +b λ′ I TZ,λ′ Where λ′ is the optimal predicted wavelength for this variety of berries, a λ′ It is expressed as the intercept of the linear regression equation for this variety of berries, b λ′ It is expressed as the slope of the linear regression equation for the berry variety, I TZ,λ′ It is expressed as the characteristic value of light intensity at the best predicted wavelength for this variety of berries.
7. A rapid detection system for relative content of anthocyanins in berries according to claim 6, characterized in that: The method for calculating the relative content of anthocyanins is: Use an imaging spectrometer to perform a spectral scan of the berries to be tested at the best predicted wavelength for this variety of berries, and calculate the light intensity characteristic value by averaging: In the formula, I TZ,λ′ It is represented by the characteristic value of light intensity at the best predicted wavelength, m is represented by the number of collected pixels, m is a positive integer ≥ 1000, I i represents the light intensity of the i-th pixel, i = 1, 2, ..., m; Substitute the light intensity characteristic value into the linear regression equation corresponding to the best predicted wavelength: ω=a λ′ +b λ′ I TZ,λ′ The calculated result was recorded as the relative anthocyanin content of the berry.
8. A method for rapid detection of relative content of anthocyanins in berries, characterized in that: The detection method is obtained by executing a rapid detection system for relative content of anthocyanins in berries according to any one of claims 1 to 7, comprising: Step 1: Use an imaging spectrometer to perform spectral scanning on the same type of berry samples at wavelengths of 500nm to 550nm, record the light intensity value of each pixel at each wavelength, calculate the average light intensity of each pixel according to the wavelength, and obtain the characteristic value of light intensity at each wavelength; Step 2: After removing impurities from the berry samples, extract anthocyanin extracts, determine the relative content of anthocyanins by chemical titration, record the light intensity characteristic value of each sample and its corresponding relative content of anthocyanins, and construct a standard detection data set; Step 3: Extract the data of the standard detection data set, take the light intensity characteristic value as the independent variable and the relative content of anthocyanins as the dependent variable, and construct the linear regression equation corresponding to each wavelength; Step 4: Substitute the light intensity characteristic values calculated at each wavelength into the corresponding linear regression equation to obtain the predicted value, calculate the mean square error of each wavelength according to the mean square error formula, and the wavelength with the smallest mean square error is taken as the optimal prediction wavelength, and its corresponding formula is the anthocyanin content prediction formula; Step 5: Use an imaging spectrometer to scan the berries to be tested at the optimal predicted wavelength, calculate the light intensity characteristic value, substitute the light intensity characteristic value into the anthocyanin content prediction formula, and calculate the relative anthocyanin content.