Production place identification method and device and related equipment

By performing spectral analysis on the composition and structure of agricultural products, extracting multiple features and inputting them into the origin identification model, the problem of low accuracy in agricultural product origin identification in the existing technology is solved, and efficient automated origin identification is achieved.

CN120629062APending Publication Date: 2025-09-12INST OF QUALITY STANDARD & TESTING TECH FOR AGRO PROD OF CAAS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510730098.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-03
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

The existing methods for identifying the origin of agricultural products have the problem of low accuracy, especially the methods based on appearance evaluation and physical and chemical index testing cannot effectively distinguish agricultural products close to the origin.

Method used

By performing spectral detection on the target product through component structure analysis, the target spectral features, target index data and target image features are extracted, integrated as input data and input into the origin identification model for identification, and the origin identification is performed using algorithms such as support vector machines, random forests or convolutional neural networks.

Benefits of technology

The accuracy of origin identification of agricultural products is improved, and automated origin identification of target products is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120629062A_ABST
    Figure CN120629062A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of product producing area identification, in particular to a producing area identification method and device and related equipment. The method comprises the following steps: detecting a target product to be subjected to origin identification to obtain a target component structure analysis spectrum of the target product; analyzing the target component structure analysis spectrum to obtain a target spectrogram feature, target index data and a target image feature of the target component structure analysis spectrum; wherein the target spectrogram feature indicates the component structure of the target product; the target index data is biochemical characteristic data of the target product; the target image features are graphic features of graphs in the target component structure analysis spectrum; integrating the target spectrogram feature, the target index data and the target image feature corresponding to the target product into input data; inputting the input data into a producing area identification model to obtain a producing area identification result; the technical problem of low identification accuracy in the existing agricultural product producing area identification technology can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of product origin identification, and in particular to a method, device and related equipment for product origin identification. Background Art

[0002] In the field of agricultural products, different origins can produce agricultural products with different qualities. Therefore, the origin of agricultural products in many cases represents the quality of the agricultural products. Therefore, as consumers' requirements for the quality of agricultural products continue to increase, it is increasingly important to identify the origin of agricultural products.

[0003] In the existing technology, the origin identification of agricultural products usually relies on the appearance evaluation of agricultural products and the detection of physical and chemical indicators. However, the origin identification method based on the appearance evaluation of agricultural products has the problem of strong subjectivity, and the method based on the detection of physical and chemical indicators cannot effectively distinguish agricultural products with close origins, so there is a problem of low identification accuracy. Summary of the Invention

[0004] In view of this, the purpose of this application is to provide the technical field of product origin identification involved in this application, and in particular to provide an origin identification method, device and related equipment to solve the technical problem of low identification accuracy in the existing agricultural product origin identification technology.

[0005] In a first aspect, the present application provides a method for identifying an origin, the method comprising:

[0006] Detecting the target product to be identified by its origin to obtain a target component structure analysis spectrum of the target product;

[0007] Analyzing the target component structure analysis spectrum to obtain target spectrum features, target index data, and target image features of the target component structure analysis spectrum;

[0008] Wherein, the target spectrum feature indicates the component structure of the target product; the target indicator data is the biochemical characteristic data of the target product; the target image feature is the graphic feature of the graph in the target component structure analysis spectrum;

[0009] Integrating the target spectrum features, the target index data, and the target image features corresponding to the target product into input data;

[0010] The input data is input into the origin identification model to obtain an origin identification result.

[0011] In a second aspect, the present application provides an origin identification device, the device comprising: a spectrum acquisition module, a feature extraction module, and an origin identification module;

[0012] The spectrum acquisition module is used to detect the target product to be identified by its origin and obtain a target component structure analysis spectrum of the target product;

[0013] The feature extraction module is used to analyze the target component structure analysis spectrum to obtain the target spectrum features, target index data and target image features of the target component structure analysis spectrum;

[0014] Wherein, the target spectrum feature indicates the component structure of the target product; the target indicator data is the biochemical characteristic data of the target product; the target image feature is the graphic feature of the graph in the target component structure analysis spectrum;

[0015] The origin identification module is used to integrate the target spectrum features, the target index data and the target image features corresponding to the target product into input data;

[0016] The origin identification module is used to input the input data into the origin identification model to obtain an origin identification result.

[0017] In a third aspect, the present application provides an electronic device comprising a processor and a memory, wherein the memory is used to store an application program, and the processor runs or executes a software program stored in the memory so that the electronic device implements the above-mentioned method for identifying the origin.

[0018] In a fourth aspect, the present application provides a computer-readable storage medium, which is used to store program codes executed by a processor, and the program codes are used to implement the above-mentioned origin identification method.

[0019] In a fifth aspect, the present application provides a computer program product, which includes computer instructions. When the computer instructions are run on an electronic device, the electronic device implements the above-mentioned origin identification method.

[0020] Beneficial effects:

[0021] The present application provides a method for origin identification, which includes: detecting a target product to be identified by origin to obtain a target component structure analysis spectrum of the target product; analyzing the target component structure analysis spectrum to obtain target spectral features, target indicator data and target image features of the target component structure analysis spectrum; wherein the target spectral features indicate the component structure of the target product; the target indicator data is the biochemical characteristic data of the target product; the target image features are the graphic features of the graphics in the target component structure analysis spectrum; integrating the target spectral features, target indicator data and target image features corresponding to the target product into input data; inputting the input data into an origin identification model to obtain an origin identification result; in summary, the origin identification method provided by the present application can automatically identify the origin of the target product. In addition, since its identification process needs to refer to the target spectral features, target indicator data and target image features of the target component structure analysis spectrum of the target product, it can effectively improve the accuracy of origin identification compared with the existing technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. The following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.

[0023] Figure 1 A schematic diagram of the process of the origin identification method provided in an embodiment of the present application;

[0024] Figure 2 This is a schematic diagram of the structure of the origin identification device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0026] First, this application provides a method for identifying origin, such as Figure 1 As shown, Figure 1 This is a flow chart of a method for identifying the origin of an article provided in an embodiment of the present application. The method includes: S110 to S140, as detailed below:

[0027] S110: Detecting the target product to be identified by its origin to obtain a target component structure analysis spectrum of the target product.

[0028] Specifically, in the embodiments of the present application, "place of origin to be identified" means that the place of origin needs to be identified at the current moment; "target product" is the product that needs to be identified by origin at the current moment, and the target product is an agricultural product; "target composition structure analysis spectrum" is the composition structure analysis spectrum of the target product, and the composition structure analysis spectrum can be one or more of the near-infrared spectrum, Raman spectrum and mass spectrum. In actual operation, the composition structure analysis spectrum can also be other types of analytical spectra, which are not exhaustive in this application and can be applied according to actual needs.

[0029] In actual operation, after the target product is determined, the target product can be detected by instruments such as near-infrared spectrometer, Raman spectrometer and mass spectrometer to obtain the target component structure analysis spectrum of the target product.

[0030] In one implementation, before S110, the method further includes: steps (1) to (5), the details of which are as follows:

[0031] Step (1): Obtain N sample products of different origins; where N is a positive integer.

[0032] Specifically, in the embodiment of the present application, the "sample product" is a type of agricultural product, such as cotton from different origins, apples from different origins, etc.; "different origins" refers to "different origins" that can cause the "composition structure analysis spectrum" of the product to be different.

[0033] For example, if the "east side of the mountain" and the "west side of the mountain" can result in different "composition structure analysis spectra" of the products, the "east side of the mountain" and the "west side of the mountain" can be considered as "different origins". If "Mountain A" and "Mountain B" are far apart, but the "composition structure analysis spectra" of the products of "Mountain A" and "Mountain B" are the same, then "Mountain A" and "Mountain B" are generally not considered as "different origins".

[0034] It should be emphasized that, as science and technology are constantly developing, when there is a spectral analysis instrument that can make the "composition structure analysis spectra" of products from "Mountain A" and "Mountain B" different, then "Mountain A" and "Mountain B" can be considered to be "different places of origin".

[0035] In actual operation, the value of N can be determined according to actual needs, and this application does not make any specific restrictions on this; for example, if the origin of a certain type of agricultural product within three provinces is to be identified, only N1 products within the three provinces are needed as sample products; if the origin of a certain type of agricultural product within six provinces is to be identified, N2 products within the six provinces are needed as sample products; wherein N1 and N2 are both positive integers.

[0036] Step (2): Detect the sample product to obtain a sample component structure analysis spectrum of the sample product.

[0037] Specifically, in actual operation, although there are multiple types of "composition structure analysis spectra", it should be ensured that the types and quantities of "sample composition structure analysis spectra" corresponding to the sample product are consistent with the types and quantities of "sample composition structure analysis spectra" corresponding to the target product.

[0038] In actual operation, before determining the sample component structure analysis spectrum of the sample product, the sample products from different origins need to be pre-processed including chopping, homogenization and centrifugation, so as to obtain the corresponding sample component structure analysis spectrum.

[0039] Step (3): Analyze the sample component structure analysis spectrum to obtain sample spectrum features, sample index data and sample image features corresponding to the sample component structure analysis spectrum.

[0040] Specifically, in the embodiment of the present application, the spectral features indicate the component structure of the product; the image features are the graphic features of the graphs in the component structure analysis spectrum; and the index data are the biochemical characteristic data of the product.

[0041] In actual operation, although spectral features can indicate the composition structure of the product, that is, in principle, the origin of the product can be identified only by spectral features, according to practical experience, the spectral features of many products with "different origins" are very similar, resulting in the inability to effectively identify the origin of the product through spectral features.

[0042] In order to solve this problem, the embodiment of the present application introduces image features and indicator data to determine more distinguishing features for products with "different origins" to achieve accurate origin identification of the products.

[0043] In one implementation, the sample composition structure analysis spectrum includes: a sample near-infrared spectrum, a sample Raman spectrum, and a sample mass spectrum; step (3) includes: steps (3.1) to (3.3), the details of which are as follows:

[0044] Step (3.1): Based on the sample near-infrared spectrum and the sample Raman spectrum, determine the number, peak area, and peak height of the absorption peaks in the sample near-infrared spectrum, and determine the number, peak area, and peak height of the Raman peaks in the sample Raman spectrum.

[0045] Specifically, the near-infrared spectrum usually shows multiple absorption peaks, so the number of absorption peaks in the near-infrared spectrum, the peak area of ​​each absorption peak and the peak height of each absorption peak, that is, the spectral characteristics, can be counted.

[0046] A Raman spectrum usually shows at least one Raman peak, so the number, peak area, and peak height of the Raman peaks in the Raman spectrum can be counted.

[0047] Step (3.2): According to the mass spectrum of the sample, determine the type of compound indicated by the mass spectrum of the sample, the content of the compound, and the content ratio between different types of compounds.

[0048] Specifically, the mass spectrum can determine the molecular weight and molecular structure, and thus the type of compound, the content of the compound, and the content ratio between different types of compounds, i.e., index data, can be determined based on the compounds corresponding to different molecular weights.

[0049] Step (3.3): Based on the sample near-infrared spectrum, sample Raman spectrum and sample mass spectrum, determine the boundary features, contour features, geometric features and shape distribution features of the graphs in the component structure analysis spectrum of each sample, that is, image features.

[0050] Specifically, whether it is the sample near-infrared spectrum, sample Raman spectrum or sample mass spectrum, there are graphics in the spectrum. Although the graphics in different component structure analysis spectra are different, they all have their own characteristics. Therefore, the boundary characteristics, contour characteristics, geometric characteristics and shape distribution characteristics of the graphics in each component structure analysis spectrum can be analyzed to distinguish between products of "different origins".

[0051] In the embodiments of the present application, "boundary features" refer to attributes such as the shape, direction, and continuity of a graphic, which can be described by quantitative features such as edge strength (the degree of change in the pixel value of the graphic), edge direction (the direction of the graphic, such as horizontal, vertical, and diagonal lines), and boundary closure (whether the graphic is closed).

[0052] In the embodiment of the present application, "contour features" refer to the overall shape and structure of the graphics, which can be described by quantitative features such as perimeter, aspect ratio, circularity, rectangularity and convex hull (the smallest convex polygon containing the contour).

[0053] In the embodiments of the present application, "geometric features" refer to the spatial attributes and mathematical properties of a graphic, which can be described by quantitative features such as the center point, center of gravity or centroid coordinates, and main axis direction (such as the angle between the long axis and the horizontal axis) of the graphic.

[0054] In the embodiment of the present application, "shape distribution features" refer to the distribution patterns of internal pixels or boundary points of a graphic, which can be described by quantitative features such as Fourier descriptors, Hu moments, zernike moments, SIFT (Scale-Invariant Feature Transform) and SURF (Speeded-Up Robust Features).

[0055] In actual operation, before obtaining image features, the composition structure analysis spectrum needs to be preprocessed including baseline correction, denoising and normalization, and then steps including grayscale, denoising, image enhancement, etc. are performed to extract image features.

[0056] In actual operation, in order to improve the accuracy of the determined sample spectral features, sample index data and sample image features, the component structure analysis spectrum can be segmented to determine the sample spectral features, sample index data and sample image features after extracting the ROI (Region of Interest).

[0057] In one implementation, before step (3), the method further includes steps (6) to (7), the details of which are as follows:

[0058] Step (6): Determine the product categories to which the N sample products belong, the quantity scale of the products included in the product categories, and the geographical span of the production places of the N sample products.

[0059] Specifically, according to the above description, there are many image features that can be obtained from the composition structure analysis spectrum, but not every agricultural product's origin identification requires many image features, because whether it is to determine the image features of the sample product or to determine the image features of the target product, it requires an analysis process. Therefore, if the origin of different target products can be accurately identified by a small number of image features, then there is no need to determine a large number of image features.

[0060] In actual operation, although all image features of the near-infrared spectra, Raman spectra and mass spectra of all sample products can be determined, in order to screen the "appropriate number of image features" from "all image features", it is necessary to determine it based on the product categories to which the N sample products belong, the quantity scale of the products included in the product categories, and the geographical span of the production places of the N sample products.

[0061] It should be noted that although it is possible to manually screen the "appropriate number of image features" based on all image features of the near-infrared spectra, Raman spectra and mass spectra of all sample products, different technicians have different screening criteria. More importantly, the purpose of screening the "appropriate number of image features" is to "use as few image features as possible to enable the origin identification model to output accurate origin identification results." However, the knowledge that the origin identification model can learn during the training process is usually non-explicit, so it is necessary to set a unified screening standard to prevent human errors.

[0062] In actual operation, the degree of difference between different types of agricultural products from different origins is different. Although the above degree of difference is determined by natural conditions and the biochemical structure of the product, it can be estimated based on historical origin identification experience, that is, the number of image features can be determined based on the "product types to which N sample products belong."

[0063] For example, if the accuracy of identifying the origin of apples through spectral features is lower than the accuracy of identifying intersecting origins through spectral features, it means that more image features are needed to accurately identify apple products.

[0064] In actual operation, the "quantity scale of products included in the product category" should also be a decisive factor in determining the number of image features, because the larger the quantity scale of products included in the product category, the smaller the gap between products from different origins may be. Therefore, more image features are needed to accurately identify the origin of products under this product category.

[0065] In actual operation, although the number of products under the same product category is relatively small, for example, there are only 5 types, but the 5 products with different origins are geographically distributed relatively close, it means that the gap between products from different origins may be relatively small. Therefore, more image features are required to accurately identify the origin of products under this product category.

[0066] Step (7): Determine the number of sample image features corresponding to the sample products based on product type, quantity scale and geographical span.

[0067] Specifically, in actual operation, quantitative standards can be determined for different product types, different quantity scales and different geographical spans. For example, the quantity range of the corresponding image features of the product type "apple" can be specifically set, and the quantity range of the corresponding image features of the quantity scale of "10 to 19" can be specifically set, and the quantity range of the corresponding image features of the geographical span of "1km to 2km" can be specifically set; in addition, a calculation formula can be set to determine the final number of image features based on the number of image features determined by different product types, different quantity scales and different geographical spans; among them, the "quantification standards" and "calculation formulas" corresponding to different product types, different quantity scales and different geographical spans can be determined according to actual needs, and this application does not make specific limitations on this.

[0068] Step (4): Integrate the sample spectrum features, sample image features and sample index data corresponding to each sample product in the N sample products into a training sample.

[0069] Specifically, in an embodiment of the present application, after determining the sample spectral features, sample image features and sample index data, the sample spectral features, sample image features and sample index data are sequentially subjected to dedimensionalization, normalization and encoding processing, and finally the encoded vectors are fused into a fused feature vector, which is the "training sample".

[0070] In actual operation, when obtaining the fused feature vector, vector fusion methods such as feature concatenation, feature weighting, and feature fusion based on kernel methods can also be used.

[0071] In one implementation, there are multiple image features, and the number of image features corresponding to different types of sample products is different; step (4) includes: step (4.1), the details of which are as follows:

[0072] Step (4.1): Integrate the multiple sample spectral features, multiple sample index data and multiple sample image features corresponding to each sample product in the N sample products into a training sample in a preset arrangement order.

[0073] Specifically, in actual operation, there are multiple sample spectral features, sample index data and sample image features. When the above data are combined into training samples, they need to be combined in a preset order; among them, when identifying the origin of the target product, it is also necessary to combine multiple target spectral features, multiple target index data and multiple target image features of the target product as input data, otherwise the origin identification model will not be able to output accurate origin identification results.

[0074] Step (5): Train the origin identification model using N training samples.

[0075] Specifically, in the embodiments of the present application, the neural network structure or machine learning algorithm of the origin identification model may be a machine learning algorithm such as support vector machine (SVM), random forest (RF), or convolutional neural network (CNN), and the present application does not make any specific limitations on this.

[0076] It should be noted that when the training samples are input into the origin identification model, the corresponding labels (ie, origin) need to be input into the origin identification model as well.

[0077] In the embodiments of the present application, the training of the origin identification model is iterative training. During the training process, the prediction performance of the origin identification model can be evaluated by performance indicators such as the prediction accuracy, sensitivity and specificity of the origin identification model to further guide the parameter adjustment of the origin identification model; the training stop condition of the origin identification model can be determined according to actual needs, and this application does not make specific limitations on this.

[0078] In one implementation, step (5) includes: step (5.1), details of which are as follows:

[0079] Step (5.1): During the iterative training of the origin identification model using N training samples, if the prediction indicators of the origin identification model do not meet the expected standards after M training rounds, the number of image features corresponding to the sample products is adjusted according to the product type, quantity scale and / or geographical span; where M is a positive integer.

[0080] Specifically, in an embodiment of the present application, in the process of training the origin identification model, in addition to continuously adjusting the model parameters of the origin identification model, the number of image features included in the training samples can also be adjusted. Because the purpose of screening the "appropriate number of image features" is to "use as few image features as possible to make the origin identification model output accurate origin identification results", the number of image features included in the training samples can be adjusted during the training process of the origin identification model.

[0081] S120: Analyze the target component structure analysis spectrum to obtain target spectrum features, target index data, and target image features of the target component structure analysis spectrum.

[0082] Among them, the target spectrum feature indicates the component structure of the target product; the target image feature is the graphic feature of the graph in the target component structure analysis spectrum; and the target indicator data is the biochemical characteristic data of the target product.

[0083] Specifically, in actual operation, it should be ensured that the type and quantity of the "sample component structure analysis spectrum" corresponding to the target product are consistent with the type and quantity of the "sample component structure analysis spectrum" corresponding to the sample product; in actual operation, internal standards can also be added to the target product to improve the accuracy of origin identification.

[0084] For example, 100 samples of target products from Inner Mongolia, Xinjiang, and Ningxia were collected. After the samples were chopped and homogenized, 1g of sample was added to 10mL of ultrapure water, centrifuged, and the supernatant was taken for testing. The target products were tested using instruments such as near-infrared spectrometers with a scanning range of 1000-2500nm and a resolution of 8cm. -1 .

[0085] After obtaining the near-infrared spectrum, the obtained near-infrared spectrum is baseline corrected, denoised, and normalized, and the absorption peak information is extracted using principal component analysis (PCA). The obtained digital image is grayscaled, denoised, and enhanced, and the ROI is extracted using an image segmentation algorithm. Subsequently, the target spectral characteristics, target indicator data, and target image characteristics of the target product are determined based on the above information.

[0086] S130: Integrate the target spectrum features, target index data, and target image features corresponding to the target product as input data.

[0087] Specifically, in actual operation, it should be ensured that the arrangement order of multiple target spectral features, multiple target indicator data and multiple target image features in the input data is consistent with the multiple sample spectral features, multiple sample indicator data and multiple sample image features corresponding to the sample product.

[0088] S140: Input the input data into the origin identification model to obtain an origin identification result.

[0089] Specifically, after inputting the input data into the origin identification model, the origin identification result can be obtained; in actual operation, the origin identification result is the probability of multiple origins, among which the origin with the highest probability is the origin of the target product.

[0090] Second, this application provides a device for identifying the origin of the product. Figure 2 As shown, Figure 2 This is a structural diagram of the origin identification device provided in an embodiment of the present application, and the device includes: a spectrum acquisition module 210, a feature extraction module 220 and an origin identification module 230.

[0091] Spectrum acquisition module 210, for detecting the target product to be identified by origin to obtain a target component structure analysis spectrum of the target product;

[0092] A feature extraction module 220 is used to analyze the target component structure analysis spectrum to obtain target spectrum features, target index data and target image features of the target component structure analysis spectrum;

[0093] The target spectrum feature indicates the component structure of the target product; the target indicator data is the biochemical characteristic data of the target product; the target image feature is the graphic feature of the graph in the target component structure analysis spectrum;

[0094] The origin identification module 230 is used to integrate the target spectrogram features, target index data and target image features corresponding to the target product into input data;

[0095] The origin identification module 230 is used to input input data into the origin identification model to obtain an origin identification result.

[0096] In one implementation, the apparatus further includes: a training module;

[0097] A training module is used to obtain N sample products from different origins, where N is a positive integer;

[0098] The training module is also used to test the sample product to obtain a sample component structure analysis spectrum of the sample product;

[0099] The training module is further used to analyze the sample component structure analysis spectrum to obtain sample spectrum features, sample index data and sample image features corresponding to the sample component structure analysis spectrum;

[0100] The training module is further used to integrate the sample spectrum features, sample image features and sample index data corresponding to each sample product in the N sample products into a training sample;

[0101] The training module is also used to train the origin identification model through N training samples.

[0102] In one implementation, the sample composition structure analysis spectrum includes: a sample near-infrared spectrum, a sample Raman spectrum, and a sample mass spectrum; the training module is further used to determine the number, peak area, and peak height of absorption peaks in the sample near-infrared spectrum, and to determine the number, peak area, and peak height of Raman peaks in the sample Raman spectrum based on the sample near-infrared spectrum and the sample Raman spectrum;

[0103] The training module is further used to determine the type of compound indicated by the sample mass spectrum, the content of the compound, and the content ratio between different types of compounds based on the sample mass spectrum;

[0104] The training module is also used to determine the boundary features, contour features, geometric features and shape distribution features of the graphics in the component structure analysis spectrum of each sample based on the sample near-infrared spectrum, sample Raman spectrum and sample mass spectrum.

[0105] In one implementation, the training module is further configured to determine the product categories to which the N sample products belong, the quantity of products included in the product categories, and the geographical span of the production locations of the N sample products;

[0106] The training module is also used to determine the number of sample image features corresponding to the sample products based on product types, quantity scale and geographical span.

[0107] In one implementation, the training module is further configured to, during the iterative training of the origin identification model using N training samples, if the prediction indicators of the origin identification model do not meet the expected standards after M training rounds, adjust the number of image features corresponding to the sample products based on the product type, quantity scale, geographical span and / or distance between origins; wherein M is a positive integer.

[0108] In one implementation, there are multiple image features, and the number of image features corresponding to different types of sample products is different; the training module is also used to integrate multiple sample spectral features, multiple sample indicator data and multiple sample image features corresponding to each sample product in N sample products into a training sample according to a preset arrangement order.

[0109] Third, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, steps S110 to S140 provided in the above embodiment are implemented.

[0110] Fourth, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, steps S110 to S140 of the above embodiment are executed.

[0111] Fifth, the computer program product provided in this application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method in the previous method embodiment. For specific implementation, please refer to steps S110 to S140 of the method embodiment, which will not be repeated here.

[0112] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interface, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0113] In addition, the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0114] Furthermore, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0115] It should be noted that if the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0116] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any actual relationship or order between these entities or operations.

[0117] The above description is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, various modifications and variations of the present application are possible. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A method for identifying origin, characterized in that: The method comprises: Detecting the target product to be identified by its origin to obtain a target component structure analysis spectrum of the target product; Analyzing the target component structure analysis spectrum to obtain target spectrum features, target index data, and target image features of the target component structure analysis spectrum; Wherein, the target spectrum feature indicates the component structure of the target product; the target indicator data is the biochemical characteristic data of the target product; the target image feature is the graphic feature of the graph in the target component structure analysis spectrum; Integrating the target spectrum features, the target index data, and the target image features corresponding to the target product into input data; The input data is input into the origin identification model to obtain an origin identification result.

2. The method according to claim 1, characterized in that Before detecting the target product to be identified by the place of origin to obtain a target component structure analysis spectrum of the target product, the method further includes: Obtain N sample products from different origins; where N is a positive integer; Testing the sample product to obtain a sample component structure analysis spectrum of the sample product; Analyzing the sample component structure analysis spectrum to obtain sample spectrum features, sample index data, and sample image features corresponding to the sample component structure analysis spectrum; Integrate the sample spectrum features, the sample image features, and the sample index data corresponding to each of the N sample products into a training sample; The origin identification model is trained using N training samples.

3. The method according to claim 2, characterized in that The sample component structure analysis spectrum includes: a sample near-infrared spectrum, a sample Raman spectrum, and a sample mass spectrum; the sample spectrum characteristics, sample index data, and sample image characteristics corresponding to the sample component structure analysis spectrum obtained by analyzing the sample component structure analysis spectrum include: Determining the number, area, and height of absorption peaks in the near-infrared spectrum of the sample, and determining the number, area, and height of Raman peaks in the Raman spectrum of the sample, based on the near-infrared spectrum of the sample and the Raman spectrum of the sample; Determining the types of compounds, compound contents, and content ratios between different types of compounds indicated by the mass spectrum of the sample according to the mass spectrum of the sample; The boundary features, contour features, geometric features and shape distribution features of the graphs in each of the sample component structure analysis spectra are determined according to the sample near-infrared spectrum, the sample Raman spectrum and the sample mass spectrum.

4. The method according to claim 2, characterized in that Before analyzing the sample component structure analysis spectrum to obtain sample spectrum features, sample index data, and sample image features corresponding to the sample component structure analysis spectrum, the method further includes: Determining the product categories to which the N sample products belong, the quantity of products included in the product categories, and the geographical span of the production locations of the N sample products; The number of the sample image features corresponding to the sample products is determined according to the product type, the quantity scale and the geographical span.

5. The method according to claim 4, characterized in that The training of the origin identification model using the N training samples includes: During the iterative training of the origin identification model using N training samples, if after M rounds of training, the prediction indicators of the origin identification model do not meet the expected standards, the number of image features corresponding to the sample products is adjusted according to the product type, the quantity scale and / or the geographical span; wherein M is a positive integer.

6. The method according to claim 2, characterized in that There are multiple image features, and the number of image features corresponding to different types of sample products is different; integrating the sample spectrum features, the sample image features, and the sample index data corresponding to each of the N sample products into a training sample includes: The plurality of sample spectral features, the plurality of sample index data and the plurality of sample image features corresponding to each of the N sample products are integrated into one training sample in a preset arrangement order.

7. A device for identifying origin, characterized in that: The device comprises: a spectrum acquisition module, a feature extraction module and an origin identification module; The spectrum acquisition module is used to detect the target product to be identified by its origin and obtain a target component structure analysis spectrum of the target product; The feature extraction module is used to analyze the target component structure analysis spectrum to obtain the target spectrum features, target index data and target image features of the target component structure analysis spectrum; Wherein, the target spectrum feature indicates the component structure of the target product; the target indicator data is the biochemical characteristic data of the target product; the target image feature is the graphic feature of the graph in the target component structure analysis spectrum; The origin identification module is used to integrate the target spectrum features, the target index data and the target image features corresponding to the target product into input data; The origin identification module is used to input the input data into the origin identification model to obtain an origin identification result.

8. An electronic device, characterized in that: The electronic device includes a processor and a memory, the memory is used to store an application program, and the processor runs or executes the software program stored in the memory so that the electronic device can implement the origin identification method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store program codes executed by a processor, and the program codes are used to implement the method for identifying the origin of any one of claims 1 to 6.

10. A computer program product, characterized in that The computer program product includes computer instructions, and when the computer instructions are run on an electronic device, the electronic device implements the origin identification method according to any one of claims 1 to 6.