Method and system for judging counterfeit and shoddy health care products based on Euclidean distance
Through the European distance method combined with near-infrared spectroscopy technology, a health product judgment model was constructed, which solved the problem that counterfeit and inferior health products could not be accurately judged in the existing technology, achieved rapid and accurate identification of health products, and improved detection efficiency and accuracy.
Patent Information
- Application Number
- CN202411156155.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-11-29
AI Technical Summary
The existing technology cannot accurately determine counterfeit and inferior health products, mainly due to the insufficient testing capabilities of the quality supervision department, which leads to serious safety and functional hidden dangers of health foods.
Using near-infrared spectroscopy technology based on European distances, the near-infrared spectral data of health product samples is obtained for pre-processing, and the judgment model is constructed, and the characteristic bands are screened using first-order differential derivatives and different pretreatment methods to establish a health product judgment model to achieve treatment. Determine the quick and accurate identification of health products.
It realizes rapid and accurate identification of counterfeit and inferior health products, provides powerful identification means, and improves the accuracy and efficiency of health product testing.
Smart Images

Figure CN119044109A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a system, method, electronic device and storage medium for judging fake and inferior health products based on Euclidean distance. Background Art
[0002] With the continuous development of my country's economy, the living standards of residents have been significantly improved, and residents' awareness of their own health management has gradually increased, resulting in the emergence of a large number of health foods. Although the variety of health foods leaves ample room for residents to choose, the dazzling array of health foods has different quality. Especially in recent years, various health foods that are illegally manufactured, illegally sold, and illegally promoted have flooded the entire health market. Health foods have serious safety and functional risks, especially functional risks have the greatest adverse effects on consumers. Merchants over-exaggerate the efficacy of health foods. In the final analysis, it is because the quality supervision department's detection capabilities are insufficient, which directly affects the efficacy detection of health foods.
[0003] Therefore, there is an urgent need for a method that can accurately determine fake and substandard health products. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a system, method, electronic device and storage medium for judging counterfeit and inferior health products based on Euclidean distance, so as to solve the problem in the prior art that the optical quality of an image cannot be accurately predicted within an appropriate range.
[0005] To achieve the above object, an embodiment of the present invention provides a method for determining counterfeit and inferior health products based on Euclidean distance, and the method specifically comprises:
[0006] Obtaining a certain number of health care product samples, wherein the health care product samples include health care products and counterfeit and inferior health care products;
[0007] Acquire near infrared spectral data corresponding to health products and counterfeit and inferior health products, and pre-process the near infrared spectral data by eliminating constant offset to obtain pre-processed data;
[0008] Constructing a health product determination model by using the Euclidean distance method, inputting the preprocessed data into the health product determination model for training, and obtaining an optimal health product determination model;
[0009] The near infrared spectrum data corresponding to the health product to be determined is input into the optimal health product determination model to obtain the counterfeit and inferior determination result corresponding to the health product to be determined.
[0010] On the basis of the above technical solution, the present invention can also be improved as follows:
[0011] Furthermore, the obtaining of near infrared spectra corresponding to the health products and counterfeit and inferior health products, and preprocessing of the near infrared spectra to eliminate constant offset to obtain preprocessed data, includes:
[0012] The characteristic band corresponding to the near-infrared spectrum data is screened out based on the first-order differential derivative.
[0013] Furthermore, the method of obtaining near infrared spectral data corresponding to the health products and counterfeit and inferior health products, and preprocessing the near infrared spectral data to eliminate constant offset to obtain preprocessed data, further includes:
[0014] Irrelevant information in the near infrared spectroscopy data is eliminated by different preprocessing methods, wherein the preprocessing methods include baseline correction, scatter correction, smoothing correction and scale scaling.
[0015] Furthermore, the health care product determination model is constructed by the Euclidean distance method, and the pre-processed data is input into the health care product determination model for training to obtain the optimal health care product determination model, including:
[0016] Dividing the preprocessed data into a training set, a validation set, and a test set;
[0017] Training the health product determination model based on the training set;
[0018] Performing a performance evaluation on the trained health product determination model based on the validation set to obtain a health product determination model that meets the performance conditions;
[0019] The prediction results of the health care product determination model that meets the performance conditions are evaluated based on the test set to obtain an evaluation index corresponding to the health care product determination model.
[0020] Furthermore, the health care product determination model is constructed by the Euclidean distance method, and the pre-processed data is input into the health care product determination model for training to obtain the optimal health care product determination model, and further includes:
[0021] The class center distances between the health care product to be determined and various health care products in the training set are calculated cyclically to obtain the health care product category corresponding to the nearest class center distance, and the health care product category is determined as the health care product category to be determined.
[0022] Furthermore, the health care product determination model is constructed by the Euclidean distance method, and the pre-processed data is input into the health care product determination model for training to obtain the optimal health care product determination model, and further includes:
[0023] The distance between samples is calculated by formula (1):
[0024] S=D / (D T1 +D T2) formula (1);
[0025] Where DT1 is the threshold of a certain type of substance, DT2 is the threshold of the first type of substance, and D is the distance between the average spectra of the two types of substances.
[0026] Furthermore, the near infrared spectrum data corresponding to the health product to be determined is input into the optimal health product determination model to obtain the counterfeit and inferior determination result corresponding to the health product to be determined, including:
[0027] The accuracy of the optimal health product determination model is evaluated by the distance between samples;
[0028] When S < 1, the two types of discriminant samples intersect;
[0029] When S = 1, the two types of discriminant samples are tangent;
[0030] When S>1, the two types of discriminant samples are separated.
[0031] A system for judging counterfeit and inferior health products based on Euclidean distance, comprising:
[0032] An acquisition module is used to acquire a certain number of health care product samples, wherein the health care product samples include health care products and counterfeit and inferior health care products;
[0033] A preprocessing module, used for obtaining near infrared spectral data corresponding to health products and counterfeit and inferior health products, and performing preprocessing on the near infrared spectral data to eliminate constant offset to obtain preprocessed data;
[0034] A construction module, used to construct a health product determination model by using the Euclidean distance method, input the pre-processed data into the health product determination model for training, and obtain an optimal health product determination model;
[0035] The determination module is used to input the near infrared spectrum data corresponding to the health product to be determined into the optimal health product determination model to obtain the counterfeit and inferior determination result corresponding to the health product to be determined.
[0036] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the steps of the method are implemented when the processor executes the computer program.
[0037] A non-transitory computer-readable storage medium stores a computer program, which implements the steps of the method when executed by a processor.
[0038] The embodiments of the present invention have the following advantages:
[0039] The method for judging counterfeit and inferior health products based on Euclidean distance in the present invention uses near-infrared spectroscopy technology combined with Euclidean distance algorithm to build a health product judgment model, thereby realizing rapid and accurate identification of whether the health products are counterfeit and inferior, and providing a powerful means for identifying health products. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.
[0041] The structures, proportions, sizes, etc. illustrated in this specification are only used to match the contents disclosed in the specification so as to facilitate understanding and reading by persons familiar with the technology. They are not used to limit the conditions under which the present invention can be implemented, and therefore have no substantial technical significance. Any structural modification, change in proportion or adjustment of size shall still fall within the scope of the technical contents disclosed in the present invention without affecting the effects and purposes that can be achieved by the present invention.
[0042] Figure 1 It is a flow chart of the method for judging fake and inferior health products based on Euclidean distance of the present invention;
[0043] Figure 2 This is a schematic diagram of the system for judging fake and inferior health products based on Euclidean distance according to the present invention;
[0044] Figure 3 This is a schematic diagram of the physical structure of the electronic device provided by the present invention.
[0045] The accompanying drawings are denoted as follows:
[0046] Acquisition module 10 , preprocessing module 20 , construction module 30 , determination module 40 , electronic device 50 , processor 501 , memory 502 , bus 503 . DETAILED DESCRIPTION
[0047] The following is a description of the implementation of the present invention by specific embodiments. People familiar with the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] Figure 1FIG. 1 is a flow chart of an embodiment of a method for determining counterfeit and inferior health products based on Euclidean distance according to the present invention. Figure 1 As shown, a method for determining counterfeit and inferior health products based on Euclidean distance provided by an embodiment of the present invention comprises the following steps:
[0049] S101, obtaining a certain number of health care product samples, wherein the health care product samples include health care products and counterfeit and inferior health care products;
[0050] S102, obtaining near infrared spectral data corresponding to health products and counterfeit and inferior health products, and performing preprocessing on the near infrared spectral data to eliminate constant offset to obtain preprocessed data;
[0051] Specifically, the near infrared spectra corresponding to the main organic compound components of health products and counterfeit and inferior health products are obtained to establish the original near infrared spectra library of health products and counterfeit and inferior health products. Near infrared spectral data analysis can use full wavelength data or partial wavelength data. When the full spectrum is used, the mathematical measurement model will improve with the increase of data points, but when the data points are too high, the model will be over-fitted, and the spectral noise or additional components of the sample will cause the partial least squares (PLS) method to analyze these eigenvalues, reducing the accuracy of the model. Therefore, the first-order differential derivative is mainly used here to process the near infrared spectral data, so as to screen out the characteristic bands.
[0052] The infrared spectra of health products and counterfeit and substandard health products are preprocessed to eliminate the constant offset. Different preprocessing methods are used to eliminate the interference of irrelevant information and improve the accuracy of the health product identification model. In addition to the required basic sample characteristic substances, the spectral information collected by near-infrared spectroscopy is often mixed with unnecessary irrelevant information and noise, such as stray light, strong electrical noise, and artificial noise during transmission. Commonly used spectral preprocessing methods include data enhancement transformation, smoothing, derivative, light scattering correction, Fourier transform, vector normalization, maximum and minimum normalization processing, etc. In recent years, methods such as wavelet transform, orthogonal signal correction and net signal analysis have also been widely used.
[0053] Generally speaking, the collected near-infrared spectral data needs to be preprocessed before modeling. According to different functions, preprocessing methods are usually divided into four categories: baseline correction, scattering correction, smoothing correction and scale scaling. Baseline correction is mainly used to eliminate the influence of baseline drift. Representative methods include airPLS, arPLS, SSFBCP and derivative processing; scattering correction is used to eliminate the scattering effect caused by uneven sample particle size and distribution, mainly SNV and MSC; smoothing correction is used to reduce spectral noise and improve signal-to-noise ratio. Common methods include moving average smoothing, SG convolution smoothing, Fourier transform, EMD decomposition, etc.; scale scaling is used to eliminate the influence of scale differences (the problem of large numbers eating small numbers). Common methods include normalization, standardization and centering.
[0054] For baseline drift, simple spectrum data processing cannot effectively eliminate interference information, while derivative spectroscopy can effectively eliminate baseline drift and smooth background interference, providing higher resolution and clearer spectral profile changes than the original spectrum. Its basic principle is to derive the spectrum information. The specific implementation method can be based on first-order or second-order derivative processing according to different needs. The commonly used derivation methods are: direct difference method, Savitzky-Golay window moving polynomial least squares fitting method and second-order derivative method with window optimization selection. For example, direct difference method. The direct difference method is the simplest processing method, which can be directly processed by calling the deriv function in matlab. The specific mathematical calculation method formula is as follows:
[0055] First-order derivative: or,
[0056]
[0057] Second order derivative:
[0058] S103, constructing a health product determination model by using the Euclidean distance method, inputting the preprocessed data into the health product determination model for training, and obtaining an optimal health product determination model;
[0059] Specifically, the preprocessed data is divided into a training set, a validation set and a test set;
[0060] Training the health product determination model based on the training set;
[0061] Performing a performance evaluation on the trained health product determination model based on the validation set to obtain a health product determination model that meets the performance conditions;
[0062] The prediction results of the health care product determination model that meets the performance conditions are evaluated based on the test set to obtain an evaluation index corresponding to the health care product determination model.
[0063] Based on the validation set, the performance of the trained health product determination model is evaluated to obtain a health product determination model that meets the performance conditions; based on the test set, the similarity calculation results of the health product determination model that meets the performance conditions are evaluated to obtain the evaluation index corresponding to the health product determination model. The performance of the health product determination model is evaluated to obtain a percentage score (i.e., the highest score is 100 points and the lowest score is 0 points), and the health product determination model with a score greater than the set value is determined based on the percentage score. For example, a health product determination model with a score greater than 90 points is a health product determination model that meets the performance conditions;
[0064] The evaluation index of the health product determination model that meets the performance conditions is calculated to obtain the evaluation index of the health product determination model, and the evaluation value corresponding to each evaluation index is calculated to obtain the evaluation value, which is used to represent the ability value of the health product determination model on the evaluation index.
[0065] The Euclidean distance method is used to establish a health product determination model, that is, by comparing the distances between samples, the optimal pretreatment method and spectral calculation method are finally determined to establish a health product determination model. The Euclidean distance can be interpreted as the length of the line segment connecting two points. It generally refers to the true distance between two points in m-dimensional space, or the natural length of a vector (that is, the distance from the point to the origin). The Euclidean distance formula is very simple, using the Pythagorean theorem to calculate the distance from the Cartesian coordinates of these points.
[0066] The class center distances between the health care product to be determined and various health care products in the training set are calculated cyclically to obtain the health care product category corresponding to the nearest class center distance, and the health care product category is determined as the health care product category to be determined.
[0067] The distance between samples is calculated by formula (1):
[0068] S=D / (D T1 +D T2 ) formula (1);
[0069] Where DT1 is the threshold of a certain type of substance, DT2 is the threshold of the first type of substance, and D is the distance between the average spectra of the two types of substances.
[0070] S104, inputting the near infrared spectrum data corresponding to the health product to be determined into the optimal health product determination model to obtain the counterfeit and inferior determination result corresponding to the health product to be determined;
[0071] Specifically, for example, in the characteristic bands of 7432.71cm-1~6475.65cm-1, 5488.42cm-1~4580.61cm-1 and 7351.92cm-1~6 824.83cm-1; 5578.24cm-1~5075.21cm-1, the Euclidean distance method is used for qualitative analysis, and the accuracy of the model is evaluated by the model S value.
[0072] The accuracy of the optimal health product determination model is evaluated by the distance between samples;
[0073] When S < 1, the two types of discriminant samples intersect;
[0074] When S = 1, the two types of discriminant samples are tangent;
[0075] When S>1, the two types of discriminant samples are separated.
[0076] The method for judging fake and inferior health products based on Euclidean distance obtains a certain number of health product samples, wherein the health product samples include health products and fake and inferior health products; obtains near infrared spectral data corresponding to health products and fake and inferior health products, and pre-processes the near infrared spectral data to eliminate constant offset to obtain pre-processed data; constructs a health product judgment model by Euclidean distance method, inputs the pre-processed data into the health product judgment model for training, and obtains an optimal health product judgment model; inputs the near infrared spectral data corresponding to the health product to be judged into the optimal health product judgment model, and obtains the fake and inferior judgment result corresponding to the health product to be judged. The problem that fake and inferior health products cannot be accurately judged in the prior art is solved.
[0077] Figure 2 FIG. 1 is a flow chart of an embodiment of a system for determining counterfeit and inferior health products based on Euclidean distance according to the present invention; Figure 2 As shown, a system for judging counterfeit and inferior health products based on Euclidean distance provided by an embodiment of the present invention includes the following steps:
[0078] An acquisition module 10 is used to acquire a certain number of health care product samples, wherein the health care product samples include health care products and counterfeit and inferior health care products;
[0079] A preprocessing module 20 is used to obtain near infrared spectrum data corresponding to health products and counterfeit and inferior health products, and preprocess the near infrared spectrum data to eliminate constant offset to obtain preprocessed data;
[0080] The pre-processing module 20 is also used for:
[0081] The characteristic band corresponding to the near-infrared spectrum data is screened out based on the first-order differential derivative.
[0082] Irrelevant information in the near infrared spectroscopy data is eliminated by different preprocessing methods, wherein the preprocessing methods include baseline correction, scatter correction, smoothing correction and scale scaling.
[0083] A construction module 30 is used to construct a health product determination model by using the Euclidean distance method, input the pre-processed data into the health product determination model for training, and obtain an optimal health product determination model;
[0084] The building block 30 is also used for:
[0085] Dividing the preprocessed data into a training set, a validation set, and a test set;
[0086] Training the health product determination model based on the training set;
[0087] Performing a performance evaluation on the trained health product determination model based on the validation set to obtain a health product determination model that meets the performance conditions;
[0088] The prediction results of the health care product determination model that meets the performance conditions are evaluated based on the test set to obtain an evaluation index corresponding to the health care product determination model.
[0089] The class center distances between the health care product to be determined and various health care products in the training set are calculated cyclically to obtain the health care product category corresponding to the nearest class center distance, and the health care product category is determined as the health care product category to be determined.
[0090] The distance between samples is calculated by formula (1):
[0091] S=D / (D T1 +D T2 ) formula (1);
[0092] Where DT1 is the threshold of a certain type of substance, DT2 is the threshold of the first type of substance, and D is the distance between the average spectra of the two types of substances.
[0093] The determination module 40 is used to input the near infrared spectrum data corresponding to the health product to be determined into the optimal health product determination model to obtain the counterfeit and inferior determination result corresponding to the health product to be determined.
[0094] The determination module 40 is also used for:
[0095] The accuracy of the optimal health product determination model is evaluated by the distance between samples;
[0096] When S < 1, the two types of discriminant samples intersect;
[0097] When S = 1, the two types of discriminant samples are tangent;
[0098] When S>1, the two types of discriminant samples are separated.
[0099] The system for judging fake and inferior health products based on Euclidean distance of the present invention obtains a certain number of health product samples through an acquisition module 10, wherein the health product samples include health products and fake and inferior health products; obtains near infrared spectral data corresponding to health products and fake and inferior health products through a preprocessing module 20, and performs preprocessing of the near infrared spectral data to eliminate constant offset to obtain preprocessed data; a construction module 30 constructs a health product judgment model through the Euclidean distance method, inputs the preprocessed data into the health product judgment model for training, and obtains an optimal health product judgment model; and inputs the near infrared spectral data corresponding to the health product to be judged into the optimal health product judgment model through a judgment module 40, and obtains a counterfeit and inferior judgment result corresponding to the health product to be judged. The method for judging fake and inferior health products based on Euclidean distance solves the problem that fake and inferior health products cannot be accurately judged in the prior art.
[0100] Figure 3 A schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention, such as Figure 3 As shown, the electronic device 50 includes: a processor 501 (processor), a memory 502 (memory) and a bus 503;
[0101] The processor 501 and the memory 502 communicate with each other via the bus 503;
[0102] The processor 501 is used to call the program instructions in the memory 502 to execute the methods provided by the above-mentioned method embodiments, for example, including: obtaining a certain number of health care product samples, wherein the health care product samples include health care products and counterfeit and inferior health care products; obtaining near-infrared spectral data corresponding to the health care products and the counterfeit and inferior health care products, and preprocessing the near-infrared spectral data to eliminate the constant offset to obtain preprocessed data; constructing a health care product determination model through the Euclidean distance method, inputting the preprocessed data into the health care product determination model for training, and obtaining an optimal health care product determination model; inputting the near-infrared spectral data corresponding to the health care product to be determined into the optimal health care product determination model to obtain a counterfeit and inferior determination result corresponding to the health care product to be determined.
[0103] The present embodiment provides a non-transitory computer-readable storage medium, which stores computer instructions. The computer instructions enable a computer to execute the methods provided by the above-mentioned method embodiments, for example, including: obtaining a certain number of health care product samples, wherein the health care product samples include health care products and counterfeit and inferior health care products; obtaining near-infrared spectral data corresponding to the health care products and the counterfeit and inferior health care products, and preprocessing the near-infrared spectral data to eliminate constant offset to obtain preprocessed data; constructing a health care product determination model through the Euclidean distance method, inputting the preprocessed data into the health care product determination model for training, and obtaining an optimal health care product determination model; inputting the near-infrared spectral data corresponding to the health care product to be determined into the optimal health care product determination model to obtain a counterfeit and inferior determination result corresponding to the health care product to be determined.
[0104] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various storage media that can store program codes.
[0105] The device embodiments described above are merely illustrative, wherein 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, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0106] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0107] Although the present invention has been described in detail above by general description and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements can be made to the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all belong to the scope of protection claimed by the present invention.
Claims
1. A method for judging counterfeit and inferior health products based on Euclidean distance, characterized in that: The method for determining counterfeit and inferior health products based on Euclidean distance specifically includes: Obtaining a certain number of health care product samples, wherein the health care product samples include health care products and counterfeit and inferior health care products; Acquire near infrared spectral data corresponding to health products and counterfeit and inferior health products, and pre-process the near infrared spectral data by eliminating constant offset to obtain pre-processed data; Constructing a health product determination model by using the Euclidean distance method, inputting the preprocessed data into the health product determination model for training, and obtaining an optimal health product determination model; The near infrared spectrum data corresponding to the health product to be determined is input into the optimal health product determination model to obtain the counterfeit and inferior determination result corresponding to the health product to be determined.
2. The method for determining counterfeit and inferior health products based on Euclidean distance according to claim 1, characterized in that: The method of obtaining near infrared spectra corresponding to the health products and the counterfeit and inferior health products, and preprocessing the near infrared spectra to eliminate constant offset to obtain preprocessed data includes: The characteristic band corresponding to the near-infrared spectrum data is screened out based on the first-order differential derivative.
3. The method for determining counterfeit and inferior health products based on Euclidean distance according to claim 2, characterized in that: The method of obtaining near infrared spectral data corresponding to the health products and counterfeit and inferior health products, and preprocessing the near infrared spectral data to eliminate constant offset to obtain preprocessed data, further includes: Irrelevant information in the near infrared spectroscopy data is eliminated by different preprocessing methods, wherein the preprocessing methods include baseline correction, scatter correction, smoothing correction and scale scaling.
4. The method for determining counterfeit and inferior health products based on Euclidean distance according to claim 1, characterized in that: The method of constructing a health product determination model by using the Euclidean distance method, inputting the preprocessed data into the health product determination model for training, and obtaining an optimal health product determination model comprises: Dividing the preprocessed data into a training set, a validation set, and a test set; Training the health product determination model based on the training set; Performing a performance evaluation on the trained health product determination model based on the validation set to obtain a health product determination model that meets the performance conditions; The prediction results of the health care product determination model that meets the performance conditions are evaluated based on the test set to obtain an evaluation index corresponding to the health care product determination model.
5. The method for determining counterfeit and inferior health products based on Euclidean distance according to claim 4, characterized in that: The health care product determination model is constructed by the Euclidean distance method, and the pre-processed data is input into the health care product determination model for training to obtain the optimal health care product determination model, and further includes: The class center distances between the health care product to be determined and various health care products in the training set are calculated cyclically to obtain the health care product category corresponding to the nearest class center distance, and the health care product category is determined as the health care product category to be determined.
6. The method for determining counterfeit and inferior health products based on Euclidean distance according to claim 5, characterized in that: The health care product determination model is constructed by the Euclidean distance method, and the pre-processed data is input into the health care product determination model for training to obtain the optimal health care product determination model, and further includes: The distance between samples is calculated by formula (1): S=D / (D T1 +D T2 ) formula (1); Where DT1 is the threshold of a certain type of substance, DT2 is the threshold of the first type of substance, and D is the distance between the average spectra of the two types of substances.
7. The method for determining counterfeit and inferior health products based on Euclidean distance according to claim 6, characterized in that: The step of inputting the near infrared spectrum data corresponding to the health product to be determined into the optimal health product determination model to obtain the counterfeit and inferior determination result corresponding to the health product to be determined includes: The accuracy of the optimal health product determination model is evaluated by the distance between samples; When S < 1, the two types of discriminant samples intersect; When S = 1, the two types of discriminant samples are tangent; When S>1, the two types of discriminant samples are separated.
8. A system for judging counterfeit and inferior health products based on Euclidean distance, characterized in that: include: An acquisition module is used to acquire a certain number of health care product samples, wherein the health care product samples include health care products and counterfeit and inferior health care products; A preprocessing module, used for obtaining near infrared spectral data corresponding to health products and counterfeit and inferior health products, and performing preprocessing on the near infrared spectral data to eliminate constant offset to obtain preprocessed data; A construction module, used to construct a health product determination model by using the Euclidean distance method, input the pre-processed data into the health product determination model for training, and obtain an optimal health product determination model; The determination module is used to input the near infrared spectrum data corresponding to the health product to be determined into the optimal health product determination model to obtain the counterfeit and inferior determination result corresponding to the health product to be determined.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A non-transitory computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
