A method, system and device for evaluating the quality of saffron raw materials

Through a method that includes image processing and effective ingredient prediction model, the quality evaluation of barley is solved, and the problem of lack of raw barley raw material evaluation method for Tibetan Saffron production in the prior art is solved, and a comprehensive evaluation of the quality of Tibetan Saffron raw materials is achieved.

CN118799259BActive Publication Date: 2025-03-25TIBET RED YEAST BIOLOGICAL CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410764812.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2025-03-25
Estimated Expiration
2044-06-14

AI Technical Summary

Technical Problem

The quality evaluation criteria used in the prior art for evaluating barley are generally to evaluate the integrity of barley, etc., and there is no evaluation method for barley raw materials used to produce saffron.

Method used

A method for evaluating the quality of the raw materials of the Scarborough is provided, including selecting the target barley from the barley to be inspected according to the preset sampling rules and collecting its images; obtaining the first evaluation parameters, the first image group and the second image group through the image cropping rules and the defect detection model; and obtaining the effective ingredient content of the barley through the effective ingredient prediction model to calculate the evaluation parameters of the barley to be inspected.

Benefits of technology

A comprehensive quality assessment of the raw barley raw materials used to produce Tibetan Saffron is achieved, and the effective ingredient content and product quality of Tibetan Saffron is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118799259B_ABST
    Figure CN118799259B_ABST
Patent Text Reader

Abstract

The present application discloses a quality assessment method, system and equipment for saffron raw material, including: selecting target highland barley from the highland barley to be inspected according to a preset sampling rule, collecting an image of the target highland barley as a target image; according to the target image, obtaining a first evaluation parameter, a first image group and a second image group through image cropping rules and a defect detection model; according to the first image group, obtaining a second evaluation parameter by obtaining the effective component content of the highland barley in the first image group, according to the second image group, obtaining a third evaluation parameter by obtaining the effective component content of the highland barley in the second image group; obtaining the evaluation parameters of the highland barley to be inspected according to the first evaluation parameter, the second evaluation parameter and the third evaluation parameter. The problem that the quality assessment standard for evaluating highland barley in the prior art is generally to evaluate the integrity of highland barley, etc., and there is no evaluation method for highland barley raw materials used to produce saffron is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of production automation technology, and in particular to a method, system and equipment for evaluating the quality of saffron raw materials. Background Art

[0002] Highland barley has the characteristics of high protein, high fiber, high vitamins, low fat and low sugar. It also contains oleic acid, linoleic acid, linolenic acid, etc. which have the effect of lowering cholesterol, 18 kinds of amino acids and various trace elements. It itself has rich nutrition and various pharmacological effects.

[0003] Tibetan red yeast rice is made from highland barley as the main raw material and fermented by Monascus purpureus. Red yeast rice has a long history of medicinal and edible use in my country, and has the effects of lowering blood pressure and lipids, promoting blood circulation and removing blood stasis, and promoting digestion and strengthening the spleen. Tibetan red yeast rice, which is made from highland barley as the raw material and fermented by Monascus purpureus, a high-yield lovastatin strain, can not only effectively lower cholesterol, but also the natural lovastatin produced after fermentation can play the role of lowering blood pressure and lipids, promoting blood circulation and removing blood stasis, while not causing damage to the liver and kidneys of the human body.

[0004] At present, since saffron is made from highland barley and fermented with red yeast rice, the quality evaluation of the fermentation product is also based on the content of effective ingredients. The existing quality assessment standards for evaluating highland barley generally evaluate the integrity of the highland barley, etc., and there is no evaluation method for the highland barley raw materials used to produce saffron. Summary of the invention

[0005] The present invention provides a method, system and equipment for evaluating the quality of saffron raw materials, which at least solves the problem that the quality evaluation standard for evaluating highland barley in the prior art is generally to evaluate the integrity of highland barley, etc., and there is no evaluation method for highland barley raw materials used for producing saffron.

[0006] The present invention provides a method for evaluating the quality of safflower raw materials, comprising the following steps:

[0007] Selecting target highland barley from the highland barley to be inspected according to a preset sampling rule, and collecting an image of the target highland barley as a target image;

[0008] According to the target image, a first evaluation parameter, a first image group and a second image group are obtained by using an image cropping rule and a defect detection model, wherein the first image group consists of images whose detected defect ratio after cropping is not higher than a first threshold, and the second image group consists of images whose detected defect ratio after cropping is higher than the first threshold;

[0009] According to the first image group, a second evaluation parameter is obtained by obtaining the effective component content of highland barley in the first image group; according to the second image group, a third evaluation parameter is obtained by obtaining the effective component content of highland barley in the second image group;

[0010] The evaluation parameters of the highland barley to be inspected are obtained according to the first evaluation parameter, the second evaluation parameter and the third evaluation parameter.

[0011] Optionally, the step of selecting target barley from the barley to be inspected according to a preset sampling rule and collecting an image of the target barley as a target image comprises:

[0012] Select target highland barley from the highland barley to be inspected according to the preset sampling rules;

[0013] Evenly spreading the target highland barley on a homogeneous plane;

[0014] The image of the target highland barley on the homogeneous plane is collected as the target image.

[0015] Optionally, the step of acquiring the first evaluation parameter, the first image group, and the second image group according to the target image through an image cropping rule and a defect detection model includes:

[0016] According to the target image, marking defective barley in the target image by a defect detection model;

[0017] Obtaining a first evaluation parameter according to the proportion of the defective barley in the target barley;

[0018] According to the target image, obtaining at least two cropped images by using a preset image cropping rule;

[0019] According to the at least two cropped images, images whose defect ratio is not higher than a first threshold are taken as a first image group, and images whose defect ratio is higher than the first threshold are taken as a second image group.

[0020] Optionally, before the step of obtaining the second evaluation parameter by obtaining the effective component content of highland barley in the first image group according to the first image group and obtaining the third evaluation parameter by obtaining the effective component content of highland barley in the second image group according to the second image group, the method further includes:

[0021] Establish a prediction model for active ingredients;

[0022] The step of establishing active ingredient prediction includes:

[0023] Establishing an initial active ingredient prediction model, wherein the initial active ingredient prediction model is configured to use a highland barley image as an input parameter and an active ingredient content as an output parameter;

[0024] Acquire a group of labeled highland barley images with labeled active ingredient content to train and verify the initial active ingredient prediction model;

[0025] Using the verified initial active ingredient prediction model as the active ingredient prediction model;

[0026] The step of obtaining a second evaluation parameter by obtaining the effective component content of highland barley in the first image group according to the first image group, and obtaining a third evaluation parameter by obtaining the effective component content of highland barley in the second image group according to the second image group comprises:

[0027] According to the first image group, the effective ingredient ratio of the target barley in the first image group is predicted by the effective ingredient prediction model to obtain the second evaluation parameter; according to the second image group, the effective ingredient ratio of the target barley in the second image group is predicted by the effective ingredient prediction model to obtain the third evaluation parameter.

[0028] Optionally, the step of obtaining a group of labeled highland barley images with labeled active ingredient content to train and verify the initial active ingredient prediction model includes:

[0029] Acquire several groups of highland barley raw materials, and collect images of the several groups of highland barley raw materials respectively;

[0030] Using the several groups of highland barley raw materials, preparing safflower under standard production conditions to obtain several groups of safflower products;

[0031] Collecting the spectral data or chromatographic data of the several groups of safflower products, and obtaining the active ingredient content of the several groups of safflower products according to the spectral data or chromatographic data;

[0032] The effective ingredient content corresponding to the several groups of highland barley raw material images is obtained according to the effective ingredient content of the several groups of safflower products.

[0033] Optionally, the step of obtaining the active ingredient content of the plurality of groups of safflower products according to the spectral data or chromatographic data comprises:

[0034] Performing preprocessing according to the spectral data or chromatographic data;

[0035] Converting the preprocessed spectral data or chromatographic data into embedded features, wherein the embedded features are input into a feature encoder for encoding processing;

[0036] Using a target encoder to perform hybrid parallel attention calculation on the embedded features, the calculation result is used to fuse with the residual of the embedded features to obtain high-frequency features; and

[0037] Inputting the high-frequency features into a convolutional feedforward network, wherein the convolutional feedforward network is used to perform data dimension reduction to obtain the effective component content of the spectral data or chromatographic data;

[0038] The active ingredient content of the several groups of safflower products is obtained according to the active ingredient content values ​​of the spectral data or chromatographic data.

[0039] Optionally, the method for obtaining the evaluation parameter of the highland barley to be inspected according to the first evaluation parameter, the second evaluation parameter and the third evaluation parameter comprises:

[0040] Q 青 =[Q1*Q2+(100-Q1)*Q3] / 100;

[0041] Where Q 青 is the evaluation parameter of the highland barley to be inspected, Q1 is the first evaluation parameter, the full score of the first evaluation parameter is 100, Q2 is the second evaluation parameter, and Q3 is the third evaluation parameter.

[0042] In another aspect, a saffron raw material quality assessment system includes an image acquisition platform and an assessment management platform;

[0043] The image acquisition platform is configured as follows:

[0044] Selecting target highland barley from the highland barley to be inspected according to a preset sampling rule, and collecting an image of the target highland barley as a target image;

[0045] Sending the target image to the evaluation management platform;

[0046] The assessment management platform is configured to:

[0047] Receiving the target image sent by the image acquisition platform;

[0048] According to the target image, a first evaluation parameter, a first image group and a second image group are obtained by using an image cropping rule and a defect detection model, wherein the first image group consists of images whose detected defect ratio after cropping is not higher than a first threshold, and the second image group consists of images whose detected defect ratio after cropping is higher than the first threshold;

[0049] According to the first image group, a second evaluation parameter is obtained by obtaining the effective component content of highland barley in the first image group; according to the second image group, a third evaluation parameter is obtained by obtaining the effective component content of highland barley in the second image group;

[0050] The evaluation parameters of the highland barley to be inspected are obtained according to the first evaluation parameter, the second evaluation parameter and the third evaluation parameter.

[0051] Optionally, the assessment management platform is further configured to:

[0052] According to the evaluation parameters of the highland barley to be inspected, the highland barley to be inspected is allocated to a corresponding warehouse.

[0053] On the other hand, a device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement any of the above methods.

[0054] On the other hand, a computer-readable storage medium is provided. The device includes a memory and a processor. The memory stores a computer program. The processor executes the computer program to implement any of the above methods.

[0055] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0056] The present invention discloses a quality assessment method, system and equipment for saffron raw material, including: selecting target highland barley from highland barley to be inspected according to preset sampling rules, collecting the image of the target highland barley as the target image; according to the target image, obtaining the first evaluation parameter, the first image group and the second image group through image cropping rules and defect detection models; according to the first image group, obtaining the second evaluation parameter by obtaining the effective component content of highland barley in the first image group, according to the second image group, obtaining the third evaluation parameter by obtaining the effective component content of highland barley in the second image group; obtaining the evaluation parameters of the highland barley to be inspected according to the first evaluation parameter, the second evaluation parameter and the third evaluation parameter. The problem that the quality assessment standard for evaluating highland barley in the prior art is generally to evaluate the integrity of highland barley, etc., and there is no evaluation method for highland barley raw materials used to produce saffron is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the specific implementation of the present application or the technical solution in the prior art, the following is a brief introduction to the drawings required for the specific implementation or the prior art description. In all drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, each element or part is not necessarily drawn according to the actual scale.

[0058] Figure 1 Schematic diagram of the process of the quality assessment method of Tibetan red yeast rice raw materials in this application;

[0059] Figure 2 This is a schematic diagram of the structure of a computer device in this application.

[0060] Markings in the figure: 101 - processor, 102 - communication bus, 103 - network interface, 104 - user interface, 105 - memory.

[0061] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0062] In order to enable those skilled in the art to better understand the scheme of the present disclosure, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present disclosure.

[0063] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0064] Example 1

[0065] like Figure 1 As shown, a method for evaluating the quality of saffron raw materials comprises the following steps:

[0066] S1. Select target barley from the barley to be inspected according to a preset sampling rule, and collect an image of the target barley as a target image.

[0067] Optionally, the preset sampling rule may be a sampling method such as simple random sampling, systematic sampling or cluster sampling.

[0068] Optionally, when cluster sampling is used, clustering is done based on test weight.

[0069] Optionally, the target number of highland barley is 1000 to 2000 grains, and the target image size is 4:3 or 16:9.

[0070] S2. According to the target image, obtain a first evaluation parameter, a first image group, and a second image group through an image cropping rule and a defect detection model;

[0071] Optionally, the first image group consists of images whose detected defect ratio after cropping is not higher than a first threshold, and the second image group consists of images whose detected defect ratio after cropping is higher than the first threshold;

[0072] Optionally, the image cropping rule may be to crop one image for every 100 grains of barley, or the target image may be evenly cropped into 3*3, 4*4, 5*5, 4*3 or 16*9 images.

[0073] Optionally, the defect detection model includes a target recognition model for identifying highland barley particles and a defect recognition model for identifying highland barley particle defects;

[0074] Optionally, the target recognition model can select convolutional neural network models such as VGG, ResNet, MobileNet, EfficientNet, etc. for recognition;

[0075] Optionally, the defect recognition model can select Yolo, RCNN, ResNet or Transformer models for defect recognition;

[0076] Optionally, highland barley defects include: damaged kernels, diseased kernels, unripe kernels and worm-eaten kernels.

[0077] S3, according to the first image group, obtaining the effective component content of highland barley in the first image group to obtain the second evaluation parameter, according to the second image group, obtaining the effective component content of highland barley in the second image group to obtain the third evaluation parameter;

[0078] Optionally, the active ingredient of highland barley may be Monascus succinate or Monacolin K, etc.

[0079] S4. Obtaining evaluation parameters of the highland barley to be inspected according to the first evaluation parameter, the second evaluation parameter and the third evaluation parameter.

[0080] Optionally, the evaluation parameter of the tested highland barley is positively correlated with the first evaluation parameter, the second evaluation parameter and the third evaluation parameter.

[0081] Example 2

[0082] This embodiment, based on embodiment 1, provides a method for evaluating the quality of saffron raw materials, comprising the following steps:

[0083] S1. Select target barley from the barley to be inspected according to a preset sampling rule, and collect an image of the target barley as a target image.

[0084] Optionally, the step of selecting target barley from the barley to be inspected according to a preset sampling rule and collecting an image of the target barley as the target image includes:

[0085] Select target highland barley from the highland barley to be inspected according to the preset sampling rules;

[0086] Spread the target highland barley evenly on a homogeneous plane;

[0087] The image of the target barley on the homogeneous plane is collected as the target image.

[0088] Specifically, uniform spreading means that when collecting images of target barley, there is no overlapping barley in the image collection direction; the background of the homogeneous plane is dark or black.

[0089] S2. According to the target image, the first evaluation parameter, the first image group and the second image group are obtained through the image cropping rules and the defect detection model. The first image group consists of images whose detected defect ratio after cropping is not higher than the first threshold, and the second image group consists of images whose detected defect ratio after cropping is higher than the first threshold.

[0090] Optionally, the step of obtaining the first evaluation parameter, the first image group, and the second image group by using an image cropping rule and a defect detection model according to the target image includes:

[0091] According to the target image, the defective barley in the target image is marked by a defect detection model;

[0092] According to the proportion of defective highland barley in the target highland barley, a first evaluation parameter is obtained;

[0093] According to the target image, at least two cropped images are obtained by using a preset image cropping rule;

[0094] According to at least two cropped images, images whose defect ratio is not higher than a first threshold are taken as a first image group, and images whose defect ratio is higher than the first threshold are taken as a second image group.

[0095] Optionally, the first evaluation parameter is a percentage parameter, with the highest being 100 and the lowest being 0. The lower the proportion of defective barley in the target barley, the higher the first evaluation parameter.

[0096] Optionally, the first threshold may be a fixed value, such as 5%, 10%, etc., or may be a value of the defect ratio of the cropped images ranked in the top 30% or top 50% of the defect ratio among all the cropped images.

[0097] S3, according to the first image group, obtaining the effective component content of highland barley in the first image group to obtain the second evaluation parameter, according to the second image group, obtaining the effective component content of highland barley in the second image group to obtain the third evaluation parameter;

[0098] Optionally, before the step of obtaining the second evaluation parameter by obtaining the effective component content of highland barley in the first image group according to the first image group and obtaining the third evaluation parameter by obtaining the effective component content of highland barley in the second image group according to the second image group, the method further includes:

[0099] Establish a prediction model for active ingredients;

[0100] The steps to build an active ingredient prediction include:

[0101] An initial active ingredient prediction model is established, wherein the initial active ingredient prediction model is configured to use highland barley images as input parameters and active ingredient content as output parameters;

[0102] Obtaining a group of labeled highland barley images with labeled active ingredient content to train and verify an initial active ingredient prediction model;

[0103] The verified initial active ingredient prediction model is used as the active ingredient prediction model;

[0104] The steps of obtaining a second evaluation parameter by obtaining the effective component content of highland barley in the first image group according to the first image group, and obtaining a third evaluation parameter by obtaining the effective component content of highland barley in the second image group according to the second image group include:

[0105] According to the first image group, the effective ingredient ratio of the target barley in the first image group is predicted by the effective ingredient prediction model to obtain the second evaluation parameter. According to the second image group, the effective ingredient ratio of the target barley in the second image group is predicted by the effective ingredient prediction model to obtain the third evaluation parameter.

[0106] Through the above method, a connection is established between the image of highland barley particles and the content of active ingredients in the saffron product produced using the highland barley particles, which can better evaluate whether the highland barley is suitable for the production of saffron.

[0107] Optionally, the step of obtaining a group of labeled highland barley images with labeled active ingredient content to train and verify an initial active ingredient prediction model includes:

[0108] Acquire several groups of highland barley raw materials, and collect images of several groups of highland barley raw materials respectively;

[0109] Using several groups of highland barley raw materials, saffron yeast is prepared under standard production conditions to obtain several groups of saffron yeast products;

[0110] Collecting spectral data or chromatographic data of several groups of Tibetan red yeast rice products, and obtaining the effective ingredient content of several groups of Tibetan red yeast rice products according to the spectral data or chromatographic data;

[0111] According to the effective ingredient content of several groups of safflower products, the effective ingredient content corresponding to several groups of highland barley raw material images is obtained.

[0112] Optionally, the step of obtaining the active ingredient content of several groups of safflower products according to the spectral data or chromatographic data comprises:

[0113] Preprocessing based on spectral data or chromatographic data;

[0114] The preprocessed spectral data or chromatographic data is converted into embedded features, and the embedded features are used to input into a feature encoder for encoding processing;

[0115] Using the target encoder to perform hybrid parallel attention calculations on the embedded features, the results of which are used to fuse with the residual of the embedded features to obtain high-frequency features; and

[0116] The high-frequency features are input into a convolutional feedforward network, which is used to reduce the dimension of the data to obtain the effective component content of the spectral data or the chromatographic data;

[0117] The effective ingredient contents of several groups of safflower products are obtained according to the effective ingredient content values ​​of spectral data or chromatographic data.

[0118] Specifically, preprocessing is performed based on the spectral data or the chromatographic data; wherein the preprocessing method includes noise removal:

[0119] ;

[0120] in, represents the preprocessed spectral data or chromatographic data, represents the coordinates of spectral or chromatographic data, represents the two-dimensional inverse wavelet transform operation, represents a two-dimensional wavelet transform operation, represents spectral data or chromatographic data, represents the symbolic function, Represents the noise threshold.

[0121] Specifically, in the step of converting the preprocessed spectral data or chromatographic data into embedded features, and using the embedded features to input a feature encoder for encoding processing, the embedding method includes:

[0122] ;

[0123] in, Represents the frequency domain corresponding to the spatial domain The complex value of the position in , The coordinates in the spatial domain are The target sample intensity at M represents the length of the target sample in the first direction, N Indicates the length of the target sample in the second direction.

[0124] Specifically, the steps of converting the preprocessed spectral data or chromatographic data into embedded features, and inputting the embedded features into a feature encoder for encoding processing include:

[0125] The target encoder is used to group the embedded features to split the embedded features into multiple groups of sub-features in the channel dimension;

[0126] Performing mixed parallel attention calculations on multiple groups of sub-features simultaneously to obtain mixed attention features; and

[0127] The mixed attention features are fused with the residual of the embedded features to obtain high-frequency features.

[0128] S4. Obtaining evaluation parameters of the highland barley to be inspected according to the first evaluation parameter, the second evaluation parameter and the third evaluation parameter.

[0129] Optionally, a method for obtaining evaluation parameters of highland barley to be inspected according to the first evaluation parameter, the second evaluation parameter and the third evaluation parameter includes:

[0130] Q 青 =[Q1*Q2+(100-Q1)*Q3] / 100;

[0131] Where Q 青 are the evaluation parameters of the tested highland barley, Q1 is the first evaluation parameter, the full score of the first evaluation parameter is 100, Q2 is the second evaluation parameter, and Q3 is the third evaluation parameter.

[0132] Since some defects in highland barley particles do not affect the content of active ingredients in the final red yeast rice product, the above method can be used to comprehensively evaluate the quality of the highland barley to be tested.

[0133] Example 3

[0134] A saffron yeast raw material quality assessment system, comprising an image acquisition platform and an assessment management platform;

[0135] The image acquisition platform is configured as follows:

[0136] Selecting target barley from the barley to be inspected according to the preset sampling rules, and collecting an image of the target barley as the target image;

[0137] Sending the target image to the evaluation management platform;

[0138] The Assessment Management Platform is configured to:

[0139] Receive the target image sent by the image acquisition platform;

[0140] According to the target image, a first evaluation parameter, a first image group and a second image group are obtained by using an image cropping rule and a defect detection model, wherein the first image group consists of images whose detected defect ratio after cropping is not higher than a first threshold, and the second image group consists of images whose detected defect ratio after cropping is higher than the first threshold;

[0141] According to the first image group, the second evaluation parameter is obtained by obtaining the effective component content of highland barley in the first image group; according to the second image group, the third evaluation parameter is obtained by obtaining the effective component content of highland barley in the second image group;

[0142] The evaluation parameters of the highland barley to be inspected are obtained according to the first evaluation parameter, the second evaluation parameter and the third evaluation parameter.

[0143] Optionally, the assessment management platform is further configured to:

[0144] According to the evaluation parameters of the barley to be inspected, the barley to be inspected is allocated to the corresponding warehouse.

[0145] Example 4

[0146] This embodiment provides a device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement any of the above methods.

[0147] Specifically, Figure 2 As shown, Figure 2 This is a schematic diagram of the structure of an electronic device of the hardware operating environment involved in the embodiment of the present application. The electronic device may include: a processor 101, such as a central processing unit (CPU), a communication bus 102, a user interface 104, a network interface 103, and a memory 105. Among them, the communication bus 102 is used to realize the connection and communication between these components. The user interface 104 may include a display (Display), an input unit such as a keyboard (Keyboard), and the user interface 104 may also include a standard wired interface and a wireless interface. The network interface 103 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 105 may optionally be a storage device independent of the aforementioned processor 101. The memory 105 may be a high-speed random access memory (RAM) memory, or it may be a stable non-volatile memory (NVM), such as at least one disk storage. The processor 101 may be a general-purpose processor, including a central processing unit, a network processor, etc., or it may be a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component.

[0148] Those skilled in the art will appreciate that Figure 2 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0149] like Figure 2 As shown, the memory 105 as a storage medium may include an operating system, a network communication module, a user interface module, and an application program for implementing a method for evaluating the quality of saffron raw materials.

[0150] exist Figure 2 In the electronic device shown, the network interface 103 is mainly used for data communication with the network server; the user interface 104 is mainly used for data interaction with the user; the processor 101 and the memory 105 in the present application can be set in the electronic device, and the electronic device calls the application program stored in the memory 105 for implementing a method for evaluating the quality of Tibetan red yeast rice raw materials through the processor 101 to implement the above method.

[0151] Example 5

[0152] This embodiment provides a computer-readable storage medium, on which a computer program is stored, and a processor executes the computer program to implement any of the above methods.

[0153] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or various devices including one or any combination of the above memories. The computer may be various computing devices including intelligent terminals and servers.

[0154] In the above embodiments of the present disclosure, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0155] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be 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 interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0156] 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, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0157] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0158] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable non-volatile storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a non-volatile storage medium, including a number of instructions to enable a device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the various embodiments of the present disclosure. The aforementioned non-volatile storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0159] The above are only preferred embodiments of the present disclosure. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present disclosure. These improvements and modifications should also be regarded as the protection scope of the present disclosure.

Claims

1. A method for evaluating the quality of safflower raw materials, characterized in that: The following steps are involved: Selecting target highland barley from the highland barley to be inspected according to a preset sampling rule, and collecting an image of the target highland barley as a target image; According to the target image, a first evaluation parameter, a first image group and a second image group are obtained by using an image cropping rule and a defect detection model, wherein the first image group consists of images whose detected defect ratio after cropping is not higher than a first threshold, and the second image group consists of images whose detected defect ratio after cropping is higher than the first threshold; According to the first image group, a second evaluation parameter is obtained by obtaining the effective component content of highland barley in the first image group; according to the second image group, a third evaluation parameter is obtained by obtaining the effective component content of highland barley in the second image group; Acquire the evaluation parameter of the highland barley to be inspected according to the first evaluation parameter, the second evaluation parameter and the third evaluation parameter; The step of obtaining the first evaluation parameter, the first image group and the second image group according to the target image through the image cropping rule and the defect detection model includes: According to the target image, marking defective barley in the target image by a defect detection model; Obtaining a first evaluation parameter according to the proportion of the defective barley in the target barley; According to the target image, obtaining at least two cropped images by using a preset image cropping rule; According to the at least two cropped images, taking images with defect ratios not higher than a first threshold as a first image group, and taking images with defect ratios higher than the first threshold as a second image group; Before the step of obtaining the second evaluation parameter by obtaining the effective component content of highland barley in the first image group according to the first image group and obtaining the third evaluation parameter by obtaining the effective component content of highland barley in the second image group according to the second image group, the method further includes: Establish a prediction model for active ingredients; The step of establishing active ingredient prediction includes: Establishing an initial active ingredient prediction model, wherein the initial active ingredient prediction model is configured to use a highland barley image as an input parameter and an active ingredient content as an output parameter; Acquire a group of labeled highland barley images with labeled active ingredient content to train and verify the initial active ingredient prediction model; Using the verified initial active ingredient prediction model as the active ingredient prediction model; The step of obtaining a second evaluation parameter by obtaining the effective component content of highland barley in the first image group according to the first image group, and obtaining a third evaluation parameter by obtaining the effective component content of highland barley in the second image group according to the second image group comprises: According to the first image group, predict the effective component ratio of the target highland barley in the first image group by using the effective component prediction model to obtain a second evaluation parameter; according to the second image group, predict the effective component ratio of the target highland barley in the second image group by using the effective component prediction model to obtain a third evaluation parameter; The method for obtaining the evaluation parameter of the highland barley to be inspected according to the first evaluation parameter, the second evaluation parameter and the third evaluation parameter comprises: Q 青 =[Q1*Q2+(100-Q1)*Q3] / 100; Where Q 青 is the evaluation parameter of the highland barley to be inspected, Q1 is the first evaluation parameter, the full score of the first evaluation parameter is 100, Q2 is the second evaluation parameter, and Q3 is the third evaluation parameter.

2. A method for assessing the quality of saffron raw materials as claimed in claim 1, characterized in that: The step of selecting target highland barley from the highland barley to be inspected according to the preset sampling rule and collecting the image of the target highland barley as the target image comprises: Select target highland barley from the highland barley to be inspected according to the preset sampling rules; Evenly spreading the target highland barley on a homogeneous plane; The image of the target highland barley on the homogeneous plane is collected as the target image.

3. A method for assessing the quality of saffron raw materials as claimed in claim 1, characterized in that: The step of obtaining a group of labeled highland barley images with labeled active ingredient content to train and verify the initial active ingredient prediction model comprises: Acquire several groups of highland barley raw materials, and collect images of the several groups of highland barley raw materials respectively; Using the several groups of highland barley raw materials, preparing safflower under standard production conditions to obtain several groups of safflower products; Collecting the spectral data or chromatographic data of the several groups of safflower products, and obtaining the active ingredient content of the several groups of safflower products according to the spectral data or chromatographic data; The effective ingredient content corresponding to the several groups of highland barley raw material images is obtained according to the effective ingredient content of the several groups of safflower products.

4. A method for assessing the quality of saffron raw materials as claimed in claim 3, characterized in that: The step of obtaining the active ingredient content of the plurality of groups of safflower products according to the spectral data or chromatographic data comprises: Performing preprocessing according to the spectral data or chromatographic data; Converting the preprocessed spectral data or chromatographic data into embedded features, wherein the embedded features are input into a feature encoder for encoding processing; Using a target encoder to perform hybrid parallel attention calculation on the embedded features, the calculation result is used to fuse with the residual of the embedded features to obtain high-frequency features; and Inputting the high-frequency features into a convolutional feedforward network, wherein the convolutional feedforward network is used to perform data dimension reduction to obtain the effective component content of the spectral data or chromatographic data; The active ingredient content of the several groups of safflower products is obtained according to the active ingredient content values ​​of the spectral data or chromatographic data.

5. A safflower raw material quality assessment system, characterized in that: Including image acquisition platform and evaluation management platform; The image acquisition platform is configured as follows: Selecting target highland barley from the highland barley to be inspected according to a preset sampling rule, and collecting an image of the target highland barley as a target image; Sending the target image to the evaluation management platform; The assessment management platform is configured to: Receiving the target image sent by the image acquisition platform; According to the target image, a first evaluation parameter, a first image group and a second image group are obtained by using an image cropping rule and a defect detection model, wherein the first image group consists of images whose detected defect ratio after cropping is not higher than a first threshold, and the second image group consists of images whose detected defect ratio after cropping is higher than the first threshold; According to the first image group, a second evaluation parameter is obtained by obtaining the effective component content of highland barley in the first image group; according to the second image group, a third evaluation parameter is obtained by obtaining the effective component content of highland barley in the second image group; Acquire the evaluation parameter of the highland barley to be inspected according to the first evaluation parameter, the second evaluation parameter and the third evaluation parameter; The step of obtaining the first evaluation parameter, the first image group and the second image group according to the target image through the image cropping rule and the defect detection model includes: According to the target image, marking defective barley in the target image by a defect detection model; Obtaining a first evaluation parameter according to the proportion of the defective barley in the target barley; According to the target image, obtaining at least two cropped images by using a preset image cropping rule; According to the at least two cropped images, taking images with defect ratios not higher than a first threshold as a first image group, and taking images with defect ratios higher than the first threshold as a second image group; Before the step of obtaining the second evaluation parameter by obtaining the effective component content of highland barley in the first image group according to the first image group and obtaining the third evaluation parameter by obtaining the effective component content of highland barley in the second image group according to the second image group, the method further includes: Establish a prediction model for active ingredients; The step of establishing active ingredient prediction includes: Establishing an initial active ingredient prediction model, wherein the initial active ingredient prediction model is configured to use a highland barley image as an input parameter and an active ingredient content as an output parameter; Acquire a group of labeled highland barley images with labeled active ingredient content to train and verify the initial active ingredient prediction model; Using the verified initial active ingredient prediction model as the active ingredient prediction model; The step of obtaining a second evaluation parameter by obtaining the effective component content of highland barley in the first image group according to the first image group, and obtaining a third evaluation parameter by obtaining the effective component content of highland barley in the second image group according to the second image group comprises: According to the first image group, predict the effective component ratio of the target highland barley in the first image group by using the effective component prediction model to obtain a second evaluation parameter; according to the second image group, predict the effective component ratio of the target highland barley in the second image group by using the effective component prediction model to obtain a third evaluation parameter; The method for obtaining the evaluation parameter of the highland barley to be inspected according to the first evaluation parameter, the second evaluation parameter and the third evaluation parameter comprises: Q 青 =[Q1*Q2+(100-Q1)*Q3] / 100; Where Q 青 is the evaluation parameter of the highland barley to be inspected, Q1 is the first evaluation parameter, the full score of the first evaluation parameter is 100, Q2 is the second evaluation parameter, and Q3 is the third evaluation parameter.

6. A safflower raw material quality assessment system as claimed in claim 5, characterized in that: The evaluation management platform is also configured to: According to the evaluation parameters of the highland barley to be inspected, the highland barley to be inspected is allocated to a corresponding warehouse.

7. A device, characterized in that: The device comprises a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the computer program to implement the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Method for quantitatively detecting solid fermentation index distribution difference through hyperspectral image technology

    CN105241824A

  • Method for detecting content of effective components of Xinkeshu tablet based on near infrared spectrum technology

    CN113310926A