Intelligent detection method of food impurities based on spectroscopy technology

By performing band division and impurity characteristic analysis on the infrared spectral data of milk powder food, the impurity component characteristic values ​​are constructed, and combined with the similarity matching algorithm, the problem of poor impurity detection accuracy of milk powder food in the existing technology is solved, and higher detection accuracy is achieved sex.

CN118883490BActive Publication Date: 2024-11-29DALIAN DEWANG TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411345209.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2024-11-29
Estimated Expiration
2044-09-26

AI Technical Summary

Technical Problem

In the prior art, in the detection of impurities in milk powder food, the analysis of impurities characteristics in spectral information is lacking, resulting in poor detection accuracy.

Method used

By collecting infrared spectral data of sample milk powder and standard samples, dividing spectral subsequences of each band, analyzing the changes in infrared light intensity, constructing characteristic values ​​of impurity components, and using a similarity matching algorithm for impurity detection.

Benefits of technology

It improves the accuracy of impurities detection in milk powder food, can more fully reflect the differential characteristics caused by impurities, and enhances the accuracy of the detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118883490B_ABST
    Figure CN118883490B_ABST
Patent Text Reader

Abstract

The present application relates to the field of spectral analysis technology, and specifically to a method for intelligent detection of food impurities based on spectral technology, the method comprising: analyzing the change of infrared light intensity in infrared spectral data to construct the intensity difference change degree of each infrared light intensity, analyzing the impurity light absorption abnormality characteristics and impurity light absorption prominent characteristics according to the intensity difference change degree, respectively constructing the impurity component characteristic values ​​of the first and second light intensity difference change sequences of each band, analyzing the similarity between the impurity component characteristic values ​​of the first light intensity difference change sequence and the impurity component characteristic values ​​of the second light intensity difference change sequence of each band, and performing sample milk powder impurity detection based on this similarity. Thus, intelligent detection of food impurities based on spectral technology is realized, avoiding the problem of poor accuracy in the prior art when using the spectral information of the sample milk powder and the basic spectral information of the standard sample milk powder to detect impurities in milk powder food, and improving the accuracy of impurity detection in milk powder food.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of spectral analysis, and in particular to an intelligent detection method for food impurities based on spectral technology. Background Art

[0002] Food safety is related to people's health. With the increasing prominence of food safety issues, the detection of food impurities has become an important part of ensuring food safety. For example, common milk powder foods are very common in people's daily diet because of their advantages such as easy to carry, simple preparation and rich nutrition. However, in the actual production process of milk powder foods, due to the instability of production process parameters or the poor quality of raw materials, the produced milk powder foods contain impurities, which endanger people's health.

[0003] The existing technology detects impurities in milk powder food by using spectral technology to collect spectral information of sample milk powder, and matches the spectral information of the sample milk powder with the basic information of milk powder to detect impurities in milk powder food. However, since it is based only on the extraction of spectral information of milk powder and lacks analysis of impurity characteristics in spectral information, the matching result cannot fully reflect the difference characteristics caused by impurities, resulting in poor accuracy of impurity detection in milk powder food. Summary of the invention

[0004] In order to solve the above technical problems, the present application provides an intelligent detection method for food impurities based on spectral technology to solve the existing problems.

[0005] The food impurity intelligent detection method based on spectroscopy technology of this application adopts the following technical solutions:

[0006] One embodiment of the present application provides a method for intelligent detection of food impurities based on spectroscopy technology, the method comprising the following steps:

[0007] (1) Collect infrared spectrum data of the sample milk powder and the standard sample milk powder respectively, record the sequence composed of infrared light intensities of all wavelengths in the infrared spectrum data of the sample milk powder as a first spectrum data sequence; record the sequence composed of infrared light intensities of all wavelengths in the infrared spectrum data of the standard sample milk powder as a second spectrum data sequence;

[0008] (2) respectively dividing the first and second spectral data sequences to obtain first spectral subsequences and second spectral subsequences of each band; respectively obtaining the intensity difference variation degree of each infrared light intensity in the first and second spectral subsequences of each band according to the variation of the infrared light intensity in the first and second spectral subsequences;

[0009] (3) Obtaining the first and second light intensity difference change sequences of each band according to the light intensity difference change degree; analyzing the impurity light absorption abnormality characteristics and impurity light absorption prominent characteristics according to the first and second light intensity difference change sequences, and constructing the impurity component characteristic values ​​of the first and second light intensity difference change sequences of each band respectively;

[0010] (4) Based on the difference between the impurity component characteristic value of the first light intensity difference change sequence and the impurity component characteristic value of the second light intensity difference change sequence in all bands, the impurity detection in the sample milk powder is performed in combination with the similarity matching algorithm.

[0011] In one embodiment, the first spectrum subsequence and the second spectrum subsequence of each band are obtained as follows:

[0012] The first spectral data sequence is divided into a preset number of subsequences to obtain a first spectral subsequence of each band; the second spectral data sequence is also divided into a preset number of subsequences to obtain a second spectral subsequence of each band.

[0013] In one embodiment, the degree of variation of the light intensity difference of each infrared light intensity in the first and second spectrum subsequences of each band is obtained as follows:

[0014] For the first spectrum subsequence of each wavelength band, obtain the absolute value of the difference between any infrared light intensity in the first spectrum subsequence and each other infrared light intensity in the first spectrum subsequence, and use the sequence composed of all the absolute values ​​as the light intensity difference arrangement sequence of any infrared light intensity in the first spectrum subsequence;

[0015] Obtain a first-order difference sequence of the light intensity difference arrangement sequence of each infrared light intensity in the first spectral subsequence, and use the mean of all data in the first-order difference sequence as the light intensity change amplitude of each infrared light intensity; calculate the arrangement entropy of the light intensity difference arrangement sequence of each infrared light intensity, and the light intensity difference change degree of each infrared light intensity is positively correlated with the light intensity change amplitude of each infrared light intensity and the arrangement entropy;

[0016] Based on the second spectrum subsequence of each band, the light intensity difference variation degree of each infrared light intensity in the first spectrum subsequence is calculated to obtain the light intensity difference variation degree of each infrared light intensity in the second spectrum subsequence of each band.

[0017] In one embodiment, the first and second light intensity difference change sequences of each band are obtained as follows:

[0018] The sequence composed of the light intensity difference variation degrees of all infrared light intensities in the first spectrum subsequence of each band is used as the first light intensity difference variation sequence of each band;

[0019] A sequence composed of the light intensity difference variation degrees of all infrared light intensities in the second spectrum subsequence of each band is used as the second light intensity difference variation sequence of each band.

[0020] In one embodiment, the impurity component characteristic value of the first and second light intensity difference change sequence of each band is obtained in the following manner:

[0021] Obtaining the impurity light absorption anomaly of the first light intensity difference change sequence of each band according to the data anomaly in the first light intensity difference change sequence;

[0022] Perform mutation point detection on each first light intensity difference change sequence to obtain each abnormal data point, and construct a light intensity fluctuation abnormality feature sequence of the first light intensity difference change sequence of each band in combination with the maximum value in each first light intensity difference change sequence;

[0023] Obtain the impurity light absorption prominence value of the first light intensity difference change sequence of each band according to the distinguishing features between the first light intensity difference change sequence and the corresponding light intensity fluctuation abnormal feature sequence;

[0024] The impurity component characteristic value of the first light intensity difference change sequence of each band is positively correlated with the impurity light absorption variability and the impurity light absorption prominence value of the first light intensity difference change sequence of each band;

[0025] Based on the second light intensity difference change sequence, the impurity component characteristic value of the second light intensity difference change sequence of each band is obtained by adopting the calculation method of the impurity component characteristic value of the first light intensity difference change sequence.

[0026] In one embodiment, the impurity absorbance variation of the first light intensity difference variation sequence of each wavelength band is obtained by:

[0027] For each band, the mean of all elements in the first light intensity difference change sequence of the band is obtained and recorded as the first mean; the absolute value of the difference between each light intensity difference change degree in the first light intensity difference change sequence of the band and the first mean is recorded as the absorption variation distance, and the impurity absorption variation degree of the first light intensity difference change sequence of the band is positively correlated with the absorption variation distance and the coefficient of variation of the first light intensity difference change sequence of the band.

[0028] In one embodiment, the light intensity fluctuation abnormality characteristic sequence of the first light intensity difference change sequence of each band is obtained in the following manner:

[0029] The first light intensity difference change sequence of each band is used as the input of the mutation point detection algorithm, and the output is all the abnormal data points in the first light intensity difference change sequence of each band. The sequence composed of all the abnormal data points in the first light intensity difference change sequence of each band and the maximum and minimum values ​​in the first light intensity difference change sequence of each band is used as the light intensity fluctuation abnormality feature sequence of the first light intensity difference change sequence of each band.

[0030] In one embodiment, the impurity light absorption prominence value of the first light intensity difference change sequence of each band is obtained in the following manner:

[0031] For the first light intensity difference change sequence of each band, the absolute value of the difference between any light intensity difference change degree and each data in the light intensity fluctuation anomaly characteristic sequence of the first light intensity difference change sequence is taken as each abnormal characteristic factor of the any light intensity difference change degree, and the mean of all the abnormal characteristic factors of the any light intensity difference change degree is taken as the light intensity fluctuation anomaly degree of the any light intensity difference change degree; the mean of the light intensity fluctuation anomaly degrees of all the light intensity difference change degrees in the first light intensity difference change sequence is calculated and recorded as the second mean; the difference between the light intensity fluctuation anomaly degree of any light intensity difference change degree and the second mean is obtained, and the impurity absorption prominence degree value of the first light intensity difference change sequence is positively correlated with the difference.

[0032] In one embodiment, the method for detecting impurities in the sample milk powder is:

[0033] The sequence composed of the impurity component characteristic values ​​of the first light intensity difference change sequence of all bands is used as the impurity component characteristic sequence of the first spectrum data sequence; the sequence composed of the impurity component characteristic values ​​of the second light intensity difference change sequence of all bands is used as the impurity component characteristic sequence of the second spectrum data sequence;

[0034] The similarity between the impurity component characteristic sequences of the first spectral data sequence and the second spectral data sequence is obtained by a similarity matching algorithm; and the impurity detection of the sample milk powder is performed based on the similarity between the impurity component characteristic sequences.

[0035] In one embodiment, the impurity detection of the sample milk powder based on the similarity between the characteristic sequences of the impurity components is specifically performed as follows:

[0036] If the similarity between the impurity component feature sequences is greater than or equal to a preset impurity judgment threshold, then the impurity component exists in the sample milk powder; otherwise, the impurity component does not exist in the sample milk powder.

[0037] This application has at least the following beneficial effects:

[0038] The present application collects infrared spectral data of sample milk powder and standard sample milk powder, analyzes the change of infrared light intensity in the infrared spectral data, and constructs the intensity difference change degree of each infrared light intensity, which is conducive to reflecting the influence of impurity components in milk powder on the difference change between infrared light intensity; analyzes the impurity light absorption variation characteristics and impurity light absorption prominence characteristics according to the intensity difference change degree, constructs the impurity component characteristic values ​​of the first and second light intensity difference change sequences of each band respectively, analyzes the similarity between the impurity component characteristic values ​​of the first light intensity difference change sequence and the impurity component characteristic values ​​of the second light intensity difference change sequence of each band, and performs sample milk powder impurity detection based on the similarity, thereby avoiding the problem that when the prior art uses the spectral information of the sample milk powder and the basic spectral information of the standard sample milk powder to detect impurities in milk powder food, because it is only based on the extracted spectral information of the milk powder, lacks the analysis of the impurity characteristics in the spectral information, so that the matching result cannot fully reflect the difference characteristics caused by the impurities, resulting in poor accuracy of impurity detection in milk powder food, thereby improving the accuracy of impurity detection in milk powder food. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0040] Figure 1 A flow chart of the method for intelligent detection of food impurities based on spectroscopy technology provided in this application;

[0041] Figure 2 A schematic diagram of the steps for obtaining the impurity component characteristic value of the first light intensity difference change sequence of each band. DETAILED DESCRIPTION

[0042] In order to further explain the technical means and effects adopted by the present application to achieve the predetermined invention purpose, the specific implementation method, structure, characteristics and effects of the intelligent detection method of food impurities based on spectral technology proposed by the present application are described in detail below in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0043] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.

[0044] The specific scheme of the intelligent detection method of food impurities based on spectral technology provided by the present application is described in detail below with reference to the accompanying drawings.

[0045] An embodiment of the present application provides an intelligent method for detecting food impurities based on spectroscopy technology.

[0046] Specifically, the following food impurity intelligent detection method based on spectroscopy technology is provided, please refer to Figure 1 , the method comprises the following steps:

[0047] Step S1: using an infrared spectrometer to measure the infrared spectrum data of the sample milk powder and the standard sample milk powder respectively, obtaining a first spectrum data sequence according to the infrared spectrum data of the sample milk powder, and obtaining a second spectrum data sequence according to the infrared spectrum data of the standard sample milk powder.

[0048] The purpose of this application is to analyze the impurity characteristics in infrared spectral information so that the matching results can fully reflect the difference characteristics caused by impurities, so as to improve the accuracy of impurity detection in milk powder food.

[0049] (1) Collect infrared spectrum data, specifically:

[0050] A small bag of milk powder is selected from the milk powder food to be tested as the sample milk powder, and a bag of standard sample milk powder is selected at the same time, the standard sample milk powder is a sample milk powder without impurities, the sample milk powder is placed in the left sample bin, and the standard sample milk powder is placed in the right sample bin, and an infrared spectrometer is used to simultaneously perform infrared irradiation on the sample milk powder in the left sample bin and the standard sample milk powder in the right sample bin, and infrared spectrum data of the sample milk powder and the infrared spectrum data of the standard sample milk powder are respectively obtained through the optical probe of the infrared spectrometer, and the infrared spectrum data include the wavelength of infrared light and the infrared light intensity corresponding to the wavelength.

[0051] (2) Construct the first and second spectral data sequences, specifically:

[0052] The sequence of all infrared light intensities in the infrared spectrum data of the sample milk powder in the order of wavelength is taken as the first spectrum data sequence, and the sequence of all infrared light intensities in the infrared spectrum data of the standard sample milk powder in the order of wavelength is taken as the second spectrum data sequence.

[0053] Step S2: Divide the first and second spectral data sequences to obtain first spectral subsequences and second spectral subsequences of each band; obtain the intensity difference variation degree of each infrared light intensity in the first and second spectral subsequences of each band according to the infrared light intensity variation in the first and second spectral subsequences.

[0054] Generally speaking, the nutrients in milk powder foods have relatively consistent infrared light absorption capabilities within a certain wavelength range, and the infrared light intensity within this wavelength range has a high degree of continuity; while impurity components often have outstanding infrared light absorption capabilities within a certain wavelength range, and the infrared light intensity within this wavelength range has an intermittent change characteristic.

[0055] (1) In order to analyze the changing characteristics of infrared light intensity in different wavelength ranges, the first spectrum data sequence is evenly divided into 20 subsequences, and each subsequence is used as the first spectrum subsequence of each band;

[0056] Similarly, the second spectral data sequence is evenly divided into 20 subsequences, and each subsequence is used as the second spectral subsequence of each band. If the spectral data sequence is less than 20 subsequences evenly divided, mean filling is used for filling.

[0057] It should be noted that the number of divided subsequences can be set by the implementer, and this embodiment does not impose any specific limitation.

[0058] (2) According to the data change in the first spectral subsequence, the intensity difference change degree of each infrared light intensity in the first spectral subsequence of each band is obtained, specifically:

[0059] For the spectrum subsequences in each band, the greater the difference in the changes of the infrared light intensities, and the worse the continuity of the changes of the internal infrared light intensities, the more obvious the characteristics of the absorption of infrared light by the impurity components in the band. Then, for the first spectrum subsequence in each band, the absolute value of the difference between any infrared light intensity in the first spectrum subsequence and every other infrared light intensity in the first spectrum subsequence is obtained, and the sequence composed of all the absolute values ​​is used as the light intensity difference arrangement sequence of any infrared light intensity in the first spectrum subsequence;

[0060] Obtain a first-order difference sequence of the light intensity difference arrangement sequence of each infrared light intensity in the first spectral subsequence, and use the mean of all data in the first-order difference sequence as the light intensity change amplitude of the infrared light intensity, wherein the method for obtaining the first-order difference sequence is a well-known technology, and the specific process will not be repeated here;

[0061] The permutation entropy of the light intensity difference arrangement sequence of each infrared light intensity is calculated; the light intensity difference variation degree of each infrared light intensity is positively correlated with the light intensity variation amplitude of each infrared light intensity and the permutation entropy. The calculation of the permutation entropy is a well-known technology, and the specific process is not repeated here.

[0062] Preferably, as an embodiment of the present application, the degree of variation of the light intensity difference of each infrared light intensity may be the product of the permutation entropy and the amplitude of the light intensity variation of each infrared light intensity.

[0063] The larger the amplitude of the light intensity change, the greater the difference in the continuity of the light intensity difference arrangement sequence, and the larger the arrangement entropy of the light intensity difference arrangement sequence, the smaller the consistency of the light intensity difference arrangement sequence and the higher the complexity. At this time, it is reflected that the stronger the effect of the impurity components in the milk powder on the difference in infrared light intensity, the greater the degree of change in the light intensity difference.

[0064] (3) Based on the second spectral subsequence of each band, the light intensity difference variation degree of each infrared light intensity in the first spectral subsequence is calculated to obtain the light intensity difference variation degree of each infrared light intensity in the second spectral subsequence of each band.

[0065] Step S3, obtaining the first and second light intensity difference change sequences of each band respectively according to the light intensity difference change degree; analyzing the impurity light absorption variation characteristics and the impurity light absorption prominence characteristics according to the first and second light intensity difference change sequences, and constructing the impurity component characteristic values ​​of the first and second light intensity difference change sequences of each band respectively.

[0066] (1) For the first spectrum subsequence of each band, a sequence consisting of the light intensity difference change degrees of all infrared light intensities in the first spectrum subsequence is taken as the first light intensity difference change sequence of the band;

[0067] Similarly, a sequence composed of the light intensity difference variation degrees of all infrared light intensities in the second spectrum subsequence of each band is taken as the second light intensity difference variation sequence of each band.

[0068] The degree of variation of light intensity difference reflects the effect of impurities in milk powder on the difference in infrared light intensity. Generally speaking, the worse the consistency of light intensity difference variation within a band, the more it indicates that the characteristics of infrared light absorption by impurities within the band cause a significant change in the characteristics of infrared light absorption by substances in the milk powder.

[0069] (2) Calculating the impurity component characteristic value of the first light intensity difference change sequence of each band according to the first light intensity difference change sequence, specifically:

[0070] (2.1) According to the data anomalies in the first light intensity difference change sequence, the impurity absorbance anomaly of the first light intensity difference change sequence of each band is obtained:

[0071] For each band, the mean of all elements in the first light intensity difference change sequence of the band is obtained and recorded as the first mean; the absolute value of the difference between each light intensity difference change degree in the first light intensity difference change sequence of the band and the first mean is recorded as the light absorption variation distance, and the impurity light absorption variation degree of the first light intensity difference change sequence of the band is positively correlated with the light absorption variation distance and the coefficient of variation of the first light intensity difference change sequence of the band. The calculation of the coefficient of variation is a well-known technology, and the specific process is not repeated here.

[0072] Preferably, as an embodiment of the present application, the impurity absorbance variability of the first light intensity difference change sequence of the band can be the product of the mean of all the absorbance variation distances of the first light intensity difference change sequence of the band and the coefficient of variation of the first light intensity difference change sequence.

[0073] The impurity absorbance variability reflects the degree of variation in the absorption of infrared light by powdered milk powder when impurities appear in the milk powder. That is, the greater the impurity absorbance variability, the more it indicates that impurities appear in the milk powder, and at this time, the greater the degree of variation in the absorption of infrared light by powdered milk powder.

[0074] Furthermore, when large abnormal fluctuations appear in the light intensity difference change sequence, it means that the corresponding band is more likely to be an impurity component that absorbs infrared light, resulting in large singular changes in the phenomenon of milk powder absorbing infrared light.

[0075] (2.2) Perform mutation point detection on each first light intensity difference change sequence to obtain each abnormal data point, and combine the maximum value in each first light intensity difference change sequence to construct the light intensity fluctuation abnormal characteristic sequence of the first light intensity difference change sequence of each band:

[0076] The first light intensity difference change sequence of each band is taken as the input of the Pettitt mutation point detection algorithm, the output of the Pettitt mutation point detection algorithm is all the abnormal data points in the first light intensity difference change sequence of each band, and the sequence composed of all the abnormal data points in the first light intensity difference change sequence of each band and the maximum and minimum values ​​in the first light intensity difference change sequence of each band is taken as the light intensity fluctuation abnormality feature sequence of the first light intensity difference change sequence of each band, wherein the Pettitt mutation point detection algorithm is a well-known technology and the specific process will not be repeated here.

[0077] It should be noted that this embodiment only provides a method for detecting abnormal data points in a sequence. There are many existing methods for detecting abnormal data points. As other implementation methods, the implementer may also select other mutation point detection algorithms to detect abnormal data points in the sequence. This application does not impose any special restrictions on this.

[0078] (2.3) According to the distinguishing features between the first light intensity difference change sequence and the corresponding light intensity fluctuation abnormal characteristic sequence, the impurity light absorption prominence value of the first light intensity difference change sequence of each band is obtained:

[0079] For the first light intensity difference change sequence of each band, the absolute value of the difference between any light intensity difference change degree and each data in the light intensity fluctuation anomaly characteristic sequence of the first light intensity difference change sequence is taken as each abnormal characteristic factor of the any light intensity difference change degree, and the mean of all the abnormal characteristic factors of the any light intensity difference change degree is taken as the light intensity fluctuation anomaly degree of the any light intensity difference change degree; the mean of the light intensity fluctuation anomaly degrees of all the light intensity difference change degrees in the first light intensity difference change sequence is calculated and recorded as the second mean; the difference between the light intensity fluctuation anomaly degree of any light intensity difference change degree and the second mean is obtained, and the impurity absorption prominence degree value of the first light intensity difference change sequence is positively correlated with the difference.

[0080] Preferably, as an embodiment of the present application, the difference can be the absolute value of the difference between the degree of abnormal light intensity fluctuation of any light intensity difference change degree and the second mean, which is recorded as the impurity absorption degree factor; the impurity absorption prominence value of the first light intensity difference change sequence can be the mean of all impurity absorption degree factors in the first light intensity difference change sequence.

[0081] The impurity absorbance prominence value reflects the prominence of the absorbance phenomenon when impurities appear in milk powder food. That is, the larger the impurity absorbance prominence value, the greater the prominence of the absorbance phenomenon in the corresponding band, and the more obvious the prominent characteristics of the impurity absorbance in the milk powder.

[0082] (2.4) According to the impurity light absorption variability and the impurity light absorption prominence value, the impurity component characteristic value of the first light intensity difference change sequence of each band is obtained:

[0083] The impurity component characteristic value of the first light intensity difference change sequence of each band is positively correlated with the impurity light absorption variability and the impurity light absorption prominence value of the first light intensity difference change sequence of each band.

[0084] Preferably, as an embodiment of the present application, the impurity component characteristic value of the first light intensity difference change sequence of each band can be the product of the impurity absorbance variability and the impurity absorbance prominence value of the first light intensity difference change sequence of each band.

[0085] The impurity component characteristic value reflects the characteristics of the impurity components in the milk powder food reflected in the spectral information, that is, the larger the impurity component characteristic value is, the greater the impurity component characteristics in the milk powder food reflected in the spectral information are.

[0086] (3) Based on the second light intensity difference change sequence, the impurity component characteristic value of the second light intensity difference change sequence of each band is obtained by adopting the calculation method of the impurity component characteristic value of the first light intensity difference change sequence.

[0087] Step S4, detecting impurities in the sample milk powder according to the difference between the impurity component characteristic values ​​of the first light intensity difference change sequence and the impurity component characteristic values ​​of the second light intensity difference change sequence in all bands in combination with a similarity algorithm.

[0088] (1) The sequence composed of the impurity component characteristic values ​​of the first light intensity difference change sequence of all bands is used as the impurity component characteristic sequence of the first spectral data sequence; similarly, the sequence composed of the impurity component characteristic values ​​of the second light intensity difference change sequence of all bands is used as the impurity component characteristic sequence of the second spectral data sequence.

[0089] (2) Performing similarity matching on the impurity component feature sequences of the first spectral data sequence and the second spectral data sequence to obtain the similarity between the impurity component feature sequences of the first spectral data sequence and the second spectral data sequence:

[0090] Preferably, as an embodiment of the present application, the similarity matching can be a method based on cosine similarity to match the impurity component feature sequences, specifically, the impurity component feature sequence of the first spectral data sequence and the impurity component feature sequence of the second spectral data sequence are used as inputs of the cosine similarity algorithm, and the cosine value of the angle between the impurity component feature sequences is calculated using the cosine similarity algorithm. The cosine similarity algorithm is a well-known technology, and the specific process is not repeated here.

[0091] The larger the cosine value of the angle, the worse the similarity of matching between the characteristic sequences of the impurity components, which means that the impurity components are more likely to appear in the sample milk powder.

[0092] It should be noted that this embodiment only provides a similarity matching method for similarity matching between sequences. There are many existing similarity matching methods. As other implementation methods, implementers can also select other similarity matching algorithms to perform similarity matching on sequences. This application does not impose any special restrictions on this.

[0093] (3) Impurity detection of sample milk powder based on the similarity between the characteristic sequences of impurity components:

[0094] The impurity judgment threshold is set. It should be noted that the impurity judgment threshold can be set by the implementer. In this application, the impurity judgment threshold is set to 0.3. When the cosine value of the angle between the characteristic sequences of the impurity components is greater than or equal to the impurity judgment threshold, it is determined that the sample milk powder contains impurity components; when the cosine value of the angle between the characteristic sequences of the impurity components is less than the impurity judgment threshold, it is determined that the sample milk powder does not contain impurity components. This solves the problem that the result of matching the spectral information of the sample milk powder with the basic spectral information of the standard sample milk powder in the prior art cannot fully reflect the difference characteristics caused by impurities, resulting in poor accuracy in detecting impurities in milk powder food.

[0095] The schematic diagram of the steps for obtaining the impurity component characteristic value of the first light intensity difference change sequence of each band is as follows: Figure 2 shown.

[0096] In summary, the embodiment of the present application collects infrared spectral data of sample milk powder and standard sample milk powder, analyzes the change of infrared light intensity in the infrared spectral data to construct the light intensity difference change degree of each infrared light intensity, which is conducive to reflecting the influence of impurity components in milk powder on the difference change between infrared light intensity; according to the light intensity difference change degree, the impurity light absorption variation characteristics and the impurity light absorption prominence characteristics are analyzed, and the impurity component characteristic values ​​of the first and second light intensity difference change sequences of each band are respectively constructed, and the similarity between the impurity component characteristic values ​​of the first light intensity difference change sequence of each band and the impurity component characteristic values ​​of the second light intensity difference change sequence is analyzed, and the sample milk powder impurity detection is performed based on this similarity, which avoids the prior art using the spectral information of the sample milk powder and the basic spectral information of the standard sample milk powder to detect impurities in milk powder food. Because it is only based on the extracted spectral information of the milk powder, the analysis of the impurity characteristics in the spectral information is lacking, so that the matching result cannot fully reflect the difference characteristics caused by the impurities, resulting in poor accuracy of impurity detection in milk powder food, thereby improving the accuracy of impurity detection in milk powder food.

[0097] It should be noted that the above-mentioned sequence of the embodiments of the present application is only for description and does not represent the advantages and disadvantages of the embodiments. The above-mentioned specific embodiments of the present application are described. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0098] The various embodiments in the present application are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0099] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Modifications to the technical solutions recorded in the aforementioned embodiments, or equivalent replacement of some of the technical features therein, do not cause the essence of the corresponding technical solutions to deviate 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. An intelligent food impurity detection method based on spectral technology, characterized in that: The method comprises the following steps: (1) Collect infrared spectrum data of the sample milk powder and the standard sample milk powder respectively, record the sequence composed of infrared light intensities of all wavelengths in the infrared spectrum data of the sample milk powder as a first spectrum data sequence; record the sequence composed of infrared light intensities of all wavelengths in the infrared spectrum data of the standard sample milk powder as a second spectrum data sequence; (2) respectively dividing the first and second spectral data sequences to obtain first spectral subsequences and second spectral subsequences of each band; respectively obtaining the intensity difference variation degree of each infrared light intensity in the first and second spectral subsequences of each band according to the variation of the infrared light intensity in the first and second spectral subsequences; (3) Obtaining the first and second light intensity difference change sequences of each band according to the light intensity difference change degree; analyzing the impurity light absorption abnormality characteristics and impurity light absorption prominent characteristics according to the first and second light intensity difference change sequences, and constructing the impurity component characteristic values ​​of the first and second light intensity difference change sequences of each band respectively; (4) Detecting impurities in the sample milk powder based on the difference between the impurity component characteristic value of the first light intensity difference change sequence and the impurity component characteristic value of the second light intensity difference change sequence in all bands in combination with a similarity matching algorithm; The method for obtaining the impurity component characteristic value of the first and second light intensity difference change sequence of each band is: Obtaining the impurity light absorption anomaly of the first light intensity difference change sequence of each band according to the data anomaly in the first light intensity difference change sequence; Perform mutation point detection on each first light intensity difference change sequence to obtain each abnormal data point, and construct a light intensity fluctuation abnormality feature sequence of the first light intensity difference change sequence of each band in combination with the maximum value in each first light intensity difference change sequence; Obtain the impurity light absorption prominence value of the first light intensity difference change sequence of each band according to the distinguishing features between the first light intensity difference change sequence and the corresponding light intensity fluctuation abnormal feature sequence; The impurity component characteristic value of the first light intensity difference change sequence of each band is positively correlated with the impurity light absorption variability and the impurity light absorption prominence value of the first light intensity difference change sequence of each band; Based on the second light intensity difference change sequence, the impurity component characteristic value of the second light intensity difference change sequence of each band is obtained by adopting the calculation method of the impurity component characteristic value of the first light intensity difference change sequence; The method for obtaining the impurity absorbance variation of the first light intensity difference variation sequence of each waveband is as follows: For each band, the mean of all elements in the first light intensity difference change sequence of the band is obtained, which is recorded as the first mean; the absolute value of the difference between each light intensity difference change degree in the first light intensity difference change sequence of the band and the first mean is recorded as the light absorption variation distance, and the impurity light absorption variation degree of the first light intensity difference change sequence of the band is positively correlated with the light absorption variation distance and the coefficient of variation of the first light intensity difference change sequence of the band; The light intensity fluctuation anomaly characteristic sequence of the first light intensity difference change sequence of each band is obtained in the following manner: The first light intensity difference change sequence of each band is used as the input of the mutation point detection algorithm, and the output is all abnormal data points in the first light intensity difference change sequence of each band, and the sequence composed of all abnormal data points in the first light intensity difference change sequence of each band and the maximum and minimum values ​​in the first light intensity difference change sequence of each band is used as the light intensity fluctuation abnormality feature sequence of the first light intensity difference change sequence of each band; The method for obtaining the impurity light absorption prominence value of the first light intensity difference change sequence of each band is as follows: For the first light intensity difference change sequence of each band, the absolute value of the difference between any light intensity difference change degree and each data in the light intensity fluctuation anomaly characteristic sequence of the first light intensity difference change sequence is taken as each abnormal characteristic factor of the any light intensity difference change degree, and the mean of all the abnormal characteristic factors of the any light intensity difference change degree is taken as the light intensity fluctuation anomaly degree of the any light intensity difference change degree; the mean of the light intensity fluctuation anomaly degrees of all the light intensity difference change degrees in the first light intensity difference change sequence is calculated and recorded as the second mean; the difference between the light intensity fluctuation anomaly degree of any light intensity difference change degree and the second mean is obtained, and the impurity absorption prominence degree value of the first light intensity difference change sequence is positively correlated with the difference.

2. The method for intelligent detection of food impurities based on spectroscopy technology according to claim 1, characterized in that: The first spectrum subsequence and the second spectrum subsequence of each band are obtained in the following manner: The first spectral data sequence is divided into a preset number of subsequences to obtain a first spectral subsequence of each band; the second spectral data sequence is also divided into a preset number of subsequences to obtain a second spectral subsequence of each band.

3. The method for intelligent detection of food impurities based on spectroscopy technology according to claim 1, characterized in that: The method for obtaining the intensity difference variation degree of each infrared light intensity in the first and second spectrum subsequences of each band is as follows: For the first spectrum subsequence of each wavelength band, obtain the absolute value of the difference between any infrared light intensity in the first spectrum subsequence and each other infrared light intensity in the first spectrum subsequence, and use the sequence composed of all the absolute values ​​as the light intensity difference arrangement sequence of any infrared light intensity in the first spectrum subsequence; Obtaining a first-order difference sequence of the light intensity difference arrangement sequence of each infrared light intensity in the first spectrum subsequence, and taking the mean of all data in the first-order difference sequence as the light intensity change amplitude of each infrared light intensity; Calculating the permutation entropy of the light intensity difference arrangement sequence of each infrared light intensity, the light intensity difference variation degree of each infrared light intensity is positively correlated with the light intensity variation amplitude of each infrared light intensity and the permutation entropy; Based on the second spectrum subsequence of each band, the light intensity difference variation degree of each infrared light intensity in the first spectrum subsequence is calculated to obtain the light intensity difference variation degree of each infrared light intensity in the second spectrum subsequence of each band.

4. The method for intelligent detection of food impurities based on spectroscopy technology according to claim 1, characterized in that: The acquisition method of the first and second light intensity difference change sequence of each band is: The sequence composed of the light intensity difference variation degrees of all infrared light intensities in the first spectrum subsequence of each band is used as the first light intensity difference variation sequence of each band; A sequence composed of the light intensity difference variation degrees of all infrared light intensities in the second spectrum subsequence of each band is used as the second light intensity difference variation sequence of each band.

5. The method for intelligent detection of food impurities based on spectroscopy technology according to claim 1, characterized in that: The method for detecting impurities in the sample milk powder is: The sequence composed of the impurity component characteristic values ​​of the first light intensity difference change sequence of all bands is used as the impurity component characteristic sequence of the first spectrum data sequence; the sequence composed of the impurity component characteristic values ​​of the second light intensity difference change sequence of all bands is used as the impurity component characteristic sequence of the second spectrum data sequence; The similarity between the impurity component characteristic sequences of the first spectral data sequence and the second spectral data sequence is obtained by a similarity matching algorithm; and the impurity detection of the sample milk powder is performed based on the similarity between the impurity component characteristic sequences.

6. The method for intelligent detection of food impurities based on spectroscopy technology according to claim 5, characterized in that: The impurity detection of the sample milk powder based on the similarity between the impurity component feature sequences is specifically: If the similarity between the impurity component feature sequences is greater than or equal to a preset impurity judgment threshold, then the impurity component exists in the sample milk powder; otherwise, the impurity component does not exist in the sample milk powder.

Citation Information

Patent Citations

  • Near-infrared autocorrelation spectrum detection method for melamine doped in milk powder

    CN106596464A

  • Near infrared spectrum (NIR) based seed cotton impurity detection method

    CN106770006A

  • Foreign matter analysis method, storage medium storing foreign matter analysis program, and foreign matter analysis apparatus

    US20210247233A1