Method and system for intelligently grading quality of dried fish maw based on spectral analysis
By using spectral analysis and visual feature extraction technology, the problems of subjectivity and low efficiency in manual inspection of dried fish maw have been solved, realizing efficient and accurate automatic grading of dried fish maw and improving sorting efficiency and inspection accuracy.
Patent Information
- Application Number
- CN202511759289.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-27
- Publication Date
- 2026-02-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional grading of dried flower maw relies on manual visual inspection, which suffers from poor subjectivity, low efficiency, and inability to quantify key intrinsic quality indicators.
A spectral analysis-based approach was adopted, using a near-infrared spectrometer to collect spectral data of dried flower maw. A predictive model was established by combining the PLS regression algorithm to quantify collagen content and water content. At the same time, surface feature parameters were extracted using a high-definition camera and a neural network model, and a weighted scoring model was used for grading.
It has achieved automated and precise grading of dried flower maw, improved sorting efficiency and accuracy, reduced manual intervention, and achieved a processing speed of 1800 pieces/hour and a collagen content detection error of ≤0.8%.
Smart Images

Figure CN121577565A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of food processing intelligence, and particularly relates to a dry flower glue quality intelligent grading method and system based on spectrum analysis. BACKGROUND
[0002] Traditional dry flower glue grading mainly relies on manual visual inspection, which has significant technical bottlenecks. First, the evaluation standard is highly dependent on the subjective experience of the inspector, and the grading consistency between different inspectors is only 65%-75%, which makes it difficult to ensure the objectivity and repeatability of the results. Second, manual operation is low in efficiency, and a single person can process no more than 200 pieces per hour, which is difficult to meet the needs of large-scale and standardized production. More importantly, the existing method can only make rough judgments based on appearance characteristics (such as color, thickness, and integrity), and cannot quantify the key internal quality indicators such as collagen content and moisture content, which cannot improve the reliability of product quality detection. SUMMARY
[0003] The embodiment of the present application provides a dry flower glue quality intelligent grading method and system based on spectrum analysis to solve the problems in the related art, and the technical scheme is as follows: In a first aspect, the embodiment of the present application provides a dry flower glue quality intelligent grading method based on spectrum analysis, comprising: Collecting spectrum data of the target dry flower glue in a specified wavelength range, processing the spectrum data based on a pre-constructed prediction model to determine the quality indicators of the target dry flower glue; the quality indicators include collagen content and moisture content; Obtaining a visual image of the target dry flower glue, extracting features of the visual image to obtain surface feature parameters of the target dry flower glue; Based on a weighted scoring model, classifying the target dry flower glue according to the quality indicators and the surface feature parameters to determine the target grade of the target dry flower glue.
[0004] In one embodiment, collecting spectrum data of the target dry flower glue in a specified wavelength range comprises: Scanning the target dry flower glue along the thickness direction of the target dry flower glue by a near-infrared spectrometer, collecting spectrum points of the target dry flower glue in a 900nm-1700nm fluctuation range at a specified collection point density to form the spectrum data.
[0005] In one embodiment, the construction method of the prediction model comprises: Collecting dry flower glue samples, and collecting sample data of each dry flower glue sample in a 900nm-1700nm range by a near-infrared spectrometer; Measuring the real indicator parameters of each dry flower glue sample, the real indicator parameters including real collagen content and real moisture content; The key latent variables are extracted from the sample data and the real index parameters by the PLS regression algorithm, a regression relationship is established based on the key latent variables, and a prediction model is obtained.
[0006] In an embodiment, the visual image includes an upper surface visual image and a lower surface visual image of the target dried flower glue captured at the same time; feature extraction is performed on the visual image to obtain the surface feature parameters of the target dried flower glue, including: The upper surface visual image and the lower surface visual image are input into a pre-constructed neural network model, and the upper surface visual image and the lower surface visual image are feature extracted by a shared feature extractor of the neural network model to obtain a shared feature map; Based on the shared feature map, crack segmentation, mold spot detection and overall defect classification are simultaneously performed by multiple parallel task heads of the neural network model; Based on the output results of the multiple parallel task heads, the surface feature parameters of the target dried flower glue are determined.
[0007] In an embodiment, the visual image further includes three-dimensional point cloud data obtained by scanning the surface of the target dried flower glue by a scanning device; feature extraction is performed on the visual image to obtain the surface feature parameters of the target dried flower glue, further including: Based on the three-dimensional point cloud data, a main body region of the surface of the target dried flower glue is extracted, and the thickness values of all points in the main body region are calculated to form a thickness matrix.
[0008] In an embodiment, based on a weighted scoring model, the target dried flower glue is classified according to the quality index and the surface feature parameters, and the target grade of the target dried flower glue is determined, including: The collagen score is calculated according to the quality index, the thickness uniformity score of the target dried flower glue is calculated based on the standard deviation or coefficient of variation of the thickness matrix, and the surface defect score is calculated according to the surface feature parameters; The collagen score, the thickness uniformity score and the surface defect score are weighted to obtain a comprehensive score; Based on a preset classification threshold, the target grade of the target dried flower glue is determined according to the comprehensive score.
[0009] In an embodiment, further comprising: A control instruction is generated according to the target grade of the target dried flower glue, and the control instruction is used to control the pneumatic sorting mechanism to sort the target dried flower glue to a collection channel corresponding to the target grade at a specified working pressure to realize sorting.
[0010] In a second aspect, an embodiment of the present application provides a dried flower glue quality intelligent grading system based on spectral analysis, including: The quality analysis module is configured to collect spectral data of the target dry flower glue in a specified wavelength range, process the spectral data based on a pre-constructed prediction model, and determine a quality index of the target dry flower glue; the quality index includes a collagen content and a water content; The feature analysis module is configured to acquire a visual image of the target dry flower glue, and extract features of the visual image to obtain surface feature parameters of the target dry flower glue. The grade classification module is configured to perform grade classification on the target dry flower glue based on a weighted scoring model according to the quality index and the surface feature parameters, and determine a target grade of the target dry flower glue.
[0011] In a third aspect, an electronic device is provided, which includes a memory and a processor. The memory and the processor are in communication with each other through an internal connection path. The memory is configured to store instructions, and the processor is configured to execute the instructions stored in the memory. When the processor executes the instructions stored in the memory, the processor performs the method in any one of the embodiments of the above aspects.
[0012] In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program. When the computer program is run on a computer, the method in any one of the embodiments of the above aspects is executed.
[0013] The advantages or beneficial effects of the above technical solutions at least include: The present application predicts the collagen content of the target dry flower glue based on a prediction model by acquiring spectral data of the target dry flower glue, and determines the surface feature parameters of the target dry flower glue by analyzing the visual image of the target dry flower glue. The collagen content and the surface feature parameters are subjected to weighted operation to determine the target grade of the target dry flower glue. This process quantifies the internal index of the dry flower glue by using multi-modal data fusion technology, automatically distinguishes the grade of the dry flower glue, reduces the participation of artificial, and improves the grading efficiency and accuracy.
[0014] The above summary is only for the purpose of the description and is not intended to limit in any way. In addition to the illustrative aspects, embodiments and features described above, further aspects, embodiments and features will be readily apparent to those skilled in the art by reference to the drawings and the following detailed description. BRIEF DESCRIPTION OF DRAWINGS
[0015] In the drawings, like reference numerals refer to same or similar functionalities throughout the several views. The drawings are not necessarily to scale. It is to be understood that the drawings only depict several embodiments of the disclosure and are not to be considered as limiting its scope.
[0016] Figure 1A flowchart of the method for intelligent grading of dry flower glue quality based on spectral analysis according to the present application is shown in the figure. Figure 2 A structural block diagram of the electronic device according to an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0017] In the following, only certain exemplary embodiments are simply described. As those skilled in the art can recognize, the described embodiments can be modified in various different ways without departing from the spirit or scope of the present application. Therefore, the drawings and the description are considered to be exemplary in nature rather than limiting.
[0018] Embodiment One The present embodiment provides a method for intelligent grading of dry flower glue quality based on spectral analysis, which can detect the quality of dry flower glue to improve detection accuracy and efficiency.
[0019] As shown in the figure, the method for intelligent grading of dry flower glue quality based on spectral analysis according to the present embodiment specifically includes the following steps: Figure 1 Step S1: Collecting spectral data of the target dry flower glue in a specified wavelength range.
[0020] The target dry flower glue to be detected can be fed by a vibrating disc and transported to a specified detection point by a conveyor belt. The speed of the conveyor belt can be controlled at 0.5 m / s, and the distance of the dry flower glue on the conveyor belt is detected and limited by a spacing controller to ensure that the spacing between the dry flower glue is greater than or equal to 10 cm.
[0021] A near-infrared spectrometer is arranged at the specified detection point to scan the passing target dry flower glue to obtain spectral data of the target dry flower glue. The wavelength range of the near-infrared spectrometer is 900 nm~1700 nm, and the near-infrared spectrometer is used to scan the target dry flower glue along the thickness direction of the target dry flower glue. The collection point density of each target dry flower glue is set according to actual requirements. If the collection point density is too large, the amount of data collected is too large, which affects the subsequent operation efficiency. If the collection point density is too small, the detection accuracy cannot be guaranteed.
[0022] In the present embodiment, 32 spectral points are collected for each target dry flower glue to obtain spectral data. The 32 spectral points should be evenly distributed in a grid shape within the effective area of the surface of the target dry flower glue to fully represent the whole piece of flower glue and avoid being concentrated in a local area. At the same time, the collection points should be at least 5 mm away from the physical edges of the target dry flower glue to avoid spectral distortion caused by edge curvature, sudden thickness change or background interference.
[0023] The point distribution mode of the embodiment aims to overcome the measurement error caused by uneven thickness and composition distribution of dry fish glue. The final spectral data is an average spectrum of 32 points, so as to obtain a stable and reliable overall composition estimation.
[0024] Step S2: processing the spectral data based on the pre-constructed prediction model to determine the quality indicators of the target dry fish glue; the quality indicators include collagen content and water content.
[0025] In the embodiment, the construction method of the prediction model includes: Step S21: collecting dry fish glue samples and collecting sample data of each dry fish glue sample in the range of 900 nm-1700 nm by a near-infrared spectrometer.
[0026] A large number of representative dry fish glue samples are collected, and the number of samples is greater than or equal to 200. It should be noted that the representative dry fish glue samples need to cover the following dimensions: Variety diversity: covering dry fish glue of different sources (such as yellow fish glue, snakehead fish glue, and red-beaked snakehead), different fish species and production places, so as to reflect the common types in the market or industry, Grade coverage: including samples of multiple traditional grading levels such as high, medium and low, to ensure that the model can identify the characteristic differences of different quality levels.
[0027] Physical state diversity: the samples have wide variations in size, thickness, color, integrity, drying degree, etc., simulating various appearances that may be encountered in real circulation or processing links.
[0028] Wide range of internal quality indicators: the key physicochemical indicators such as collagen content and water content should cover the natural variation interval to avoid the model being applicable only to a narrow quality interval.
[0029] The spectral data of each dry fish glue sample is collected by a near-infrared spectrometer with a wavelength range of 900 nm-1700 nm, thereby obtaining a large amount of sample data.
[0030] Through comparative experiments, it is found that the spectral data collected in the range of 900-1700 nm is used for collagen prediction, and the R 2 can reach 0.98; if the spectral collection range is adjusted to 800-1600 nm, the determination coefficient (R 2 ) of the collagen prediction model decreases to 0.92; this result further verifies that the spectral data in the range of 900-1700 nm has the best representation ability.
[0031] Step S22: measuring the real indicator parameters of each dry fish glue sample, including real collagen content and real water content.
[0032] The real collagen content and real water content of each piece of dry flower jelly sample are measured by a traditional method to obtain real index parameters. For example, the detection method of the real collagen content can be: The dry flower jelly sample is crushed, degreased (if necessary), and accurately weighed; 6 mol / L HCl is used to hydrolyze at 110°C for 24 hours to release hydroxyproline; thereafter, the hydroxyproline content can be determined according to the method in GB 5009.124-2016 (such as pre-column derivatization-HPLC method), and the collagen content is calculated according to the conversion formula; wherein the conversion formula is: Collagen content = Hydroxyproline content × K; Wherein, K is the conversion coefficient, and different sources of flower jelly are recommended to use literature or experimental verified values (commonly 7.14~7.52).
[0033] Step S23: Key latent variables are extracted from the sample data and the real index parameters by the PLS regression algorithm, and a regression relationship is established based on the key latent variables to obtain a prediction model.
[0034] In this embodiment, the sample data is referred to as X variable, and the real index parameter is referred to as Y variable; the sample data and the real index parameter are taken as a data set, and the data set is randomly divided into a training set and a test set, the training set is used for model training, and the test set is used for independent evaluation of the prediction ability of the model to prevent overfitting.
[0035] Since the spectral data in the sample data has thousands of wavelength points, they are highly correlated (collinear), and many are noise; therefore, the PLS algorithm is used to extract the most critical latent variable from the spectral data and the real index data, which can capture the common variation of collagen and water.
[0036] Wherein, PLS extracts latent variables from X variables and Y variables through an iterative process, and the core is to find a direction in the X space, so that the projection in this direction (i.e. the first latent variable t1) can best summarize the change of X, and the covariance with the latent variable u1 of Y is maximized. The specific steps are: Step a: Standardize (or pretreat) X and Y data.
[0037] Step b: Find the first weight vector w1, so that the covariance of t1 = X * w1 and u1 = Y * c1 is maximized.
[0038] Step c: Establish the regression model of X and Y to t1 respectively to obtain the regression coefficients p1 and q1.
[0039] Step d: Subtract the part that has been explained by t1 from X and Y to get the residual matrices E and F.
[0040] Step e: Repeat steps b-d with the residual matrices E and F as new X and Y to extract the second latent variable t2 and u2.
[0041] This cycle continues until enough latent variables are extracted. The process achieves feature reduction by maximizing the covariance between latent variables and determines the optimal number of latent variables to avoid overfitting through cross-validation. When the optimal number of latent variables is determined, the PLS algorithm outputs a final regression coefficient vector B, which contains the contribution weight of each wavelength point to the prediction of Y. According to the regression coefficient vector B, a linear regression equation between the spectral data and the component value in the true index parameter is established, thereby obtaining the prediction model.
[0042] Finally, the prediction model is verified and performance evaluated. The determination coefficient (R 2 ), root mean square error (RMSEP), and relative analysis error (RPD) between the predicted value and the true value in the prediction model are calculated using the test set samples. When the RPD is greater than 2.5, the prediction model is considered to have good prediction ability.
[0043] In this embodiment, the spectral data of the target dry flower glue is processed based on the pre-constructed prediction model to determine the quality index of the target dry flower glue, thereby obtaining the collagen content and water content of the target dry flower glue.
[0044] Step S2: Obtain the visual image of the target dry flower glue, extract the surface feature parameters of the target dry flower glue from the visual image.
[0045] The target dry flower glue is transported to the designated detection point by the conveyor belt, and the visual acquisition device is arranged at or around the designated detection point. The visual acquisition device includes two high-definition cameras. One high-definition camera is installed directly above the conveyor belt, and the other high-definition camera is installed directly below the conveyor belt. The resolution of the high-definition camera is 4096x2160. The imaging area of the conveyor belt is made of high-strength transparent glass or engineering plastic. The upper surface visual image and the lower surface visual image of the target dry flower glue are simultaneously acquired by the upper and lower high-definition cameras.
[0046] In this embodiment, the upper surface visual image and the lower surface visual image are input into the pre-constructed neural network model. The multi-scale features of the upper surface visual image and the lower surface visual image are simultaneously extracted by the shared feature extractor of the neural network model to obtain a shared feature map. Based on the shared feature map, multiple tasks are simultaneously executed by multiple parallel task heads of the neural network model. Finally, the output results of the multiple parallel task heads are quantified to determine the surface feature parameters of the target dry flower glue.
[0047] wherein the shared feature extractor is based on a ResNet-18 architecture and adapted to receive a dual-channel input to simultaneously process the upper surface visual image and the lower surface visual image.
[0048] In this embodiment, the tasks that the plurality of parallel task heads simultaneously perform include: The crack segmentation task adopts a semantic segmentation technique and realizes pixel-level classification based on an encoder-decoder architecture. The task fuses shallow detail features and deep semantic features extracted by the backbone network through a skip connection, recovers the spatial resolution after upsampling, generates a binary segmentation map of the same size as the input through a 1x1 convolution and a Sigmoid activation function, and finally outputs a pixel-level crack segmentation map.
[0049] The mold spot detection task is based on a feature pyramid network (FPN) to construct a target detection module, and realizes the positioning of mold spots of different sizes through multi-scale feature fusion. The task presets anchor points at each level of the feature pyramid, uses a convolution layer to predict the boundary box coordinate offset, target confidence and class probability in parallel, and finally outputs the mold spot boundary box and its confidence after post-processing by non-maximum suppression (NMS).
[0050] The overall defect classification task compresses the deep feature map output by the backbone network into a feature vector through global average pooling (GAP), eliminates the spatial dimension and retains high-level semantic information. After mapping through a fully connected layer, the feature vector outputs a "perfect / mild / severe" three-class probability distribution through a Softmax activation function, and finally determines the overall defect level through an argmax operation, and finally outputs the classification results of perfect, continuous defects or severe defects.
[0051] Finally, the crack segmentation map is quantified to obtain the crack density and total length; based on the mold spot boundary box, the number of mold spots is counted, and the total area of the mold spots is calculated; and finally the surface feature parameters including the crack density, total length, number of mold spots, total area of mold spots and overall defect level are obtained.
[0052] Through experiments, the present embodiment uses multi-task learning and a shared feature extractor, which not only improves the detection efficiency, but also promotes each other among different tasks, so that the detection capability of micro cracks (improved to 98.5% accuracy) and low-contrast mold spots (sensitivity up to 0.1 mm2) is significantly enhanced. If the backbone network is replaced by VGG16 instead of ResNet-18 for comparison and verification, the detection accuracy of the crack segmentation task only maintains at 97.8%, and the model inference time increases by about 50%. According to the experimental results, ResNet-18 has higher calculation efficiency while maintaining high accuracy, and is the preferred architecture of the present system.
[0053] Step S3: Based on the weighted scoring model, the target dried flower glue is classified according to the quality index, the surface feature parameter and the thickness matrix, and the target grade of the target dried flower glue is determined.
[0054] It should be noted that the thickness matrix is obtained by a 3D scanning device, that is, a 3D scanning device such as a line laser scanner or a structured light scanner can also be arranged at the designated detection point of the conveying belt or around the same, and the surface of the target dried flower glue is scanned by the 3D scanning device to generate three-dimensional point cloud data of the surface of the target dried flower glue. According to the three-dimensional point cloud data, the main body region of the surface of the target dried flower glue is extracted, the background is removed, the thickness values of all points in the main body region are calculated, and the thickness matrix is formed.
[0055] In this embodiment, the collagen content in the quality index is an important parameter, therefore, the collagen score S P is calculated according to the collagen content of the target dried flower glue. S P = (collagen content-60) / (90-60) * 100, wherein it is assumed that the mass percentage of collagen in the total mass of the sample ranges from 60% to 90%.
[0056] The thickness standard deviation or coefficient of variation of the thickness matrix is calculated, the thickness uniformity score S t is calculated according to the thickness standard deviation or coefficient of variation, and the formula of the thickness uniformity score S t is as follows: S t = (1-thickness standard deviation / average thickness) * 100; wherein the smaller the thickness standard deviation or the lower the coefficient of variation, the more uniform the thickness, and the higher the thickness uniformity score.
[0057] The surface defect score S d is calculated according to the total area of defects according to the surface feature parameter, and the ratio of the total area of defects to the total area of flower glue, and the expression is as follows: S d = (1-total area of defects / total area of flower glue) * 100.
[0058] Subsequently, the comprehensive score is calculated by a nonlinear weighting algorithm, and the expression is as follows: Comprehensive score = (W p *S p 1.2 +W t *S t +W d *S d 0.8 ) / (W p * 100 0.2 +W t +W d * 100-0.2 ); wherein W p is the weight corresponding to the collagen content, which can be set as 0.5; W t is the weight corresponding to the thickness uniformity, which can be set as 0.3; W d is the weight corresponding to the surface defects, which can be set as 0.2. S p 1.2 amplifies the contribution of high collagen content and highlights high quality; and S d 0.8 mainly weakens the marginal effect of extremely low defect area, but is more sensitive to high defect area.
[0059] In another embodiment, the comprehensive surface defect score can also be calculated according to various surface feature parameters to improve the accuracy of the surface defect score. The expression of the surface defect score is: S d = (w c * S crack + w m * S mold + w g * S grade ); wherein S crack is the crack sub-score, S crack = (crack density* w1 + crack total length* w2) * 100; S mold is the mold spot sub-score, S mold = (mold spot number* w3 + mold spot total area* w4) * 100; S grade is the defect level score, which is directly mapped according to the overall defect level (perfect = 0, slight = 50, severe = 100).
[0060] wherein w1, w2, w3, and w4 are the weights of the corresponding parameters, which can be set according to actual conditions. Since mold spots involve food safety, the weight w m corresponding to mold spots should be the highest, the weight w c corresponding to cracks is relatively low, and the weight w g corresponding to defects can be set according to actual conditions.
[0061] In addition, the moisture content score can also be calculated according to the moisture content in the quality index. Finally, the collagen score, the moisture content score, the thickness uniformity score, and the surface defect score are weighted and summed to obtain the comprehensive score. This score can further reflect the real and multi-faceted quality, further improving the detection accuracy.
[0062] Finally, based on the preset classification threshold, the calculated comprehensive score is compared with the classification threshold corresponding to each grade to determine the target grade of the target dried flower glue. In this embodiment, three classification thresholds can be preset: Grade A: comprehensive score ≥ 85 points, and S d ≥ 90 points (i.e. very few defects); Grade B: 70 points ≤ comprehensive score < 85 points; Grade C: comprehensive score < 70 points, or S d < 60 points (i.e. severe defects).
[0063] After determining the comprehensive score of the target dried flower glue, it can be directly applied in the subsequent sorting link, that is, a control instruction is generated according to the target grade of the target dried flower glue, and the control instruction is used to control the pneumatic sorting mechanism to flow the target dried flower glue to the collection channel corresponding to the target grade at a specified working pressure (such as a pressure of 0.6 MPa), so as to automatically complete the sorting process of the target dried flower glue.
[0064] It should be noted that the pneumatic sorting mechanism includes a high-pressure gas source subsystem, which provides stable 0.6 MPa working pressure; an electromagnetic valve array, which responds to the grading signal to control the airflow direction; and a nozzle actuator, which blows the dried flower glue to the corresponding grading collection channel. The specific structure of the pneumatic sorting mechanism has been disclosed in the prior art, and will not be described in detail here.
[0065] The performance comparison experiment results show that compared with the traditional manual sorting method, the present method shows excellent progress in many key performance indicators. The specific comparison is as follows: Sorting efficiency: the processing speed of the present method can reach 1800 pieces / hour, which is at least 9 times the speed of manual sorting (200 pieces / hour).
[0066] Detection accuracy: the non-destructive detection error of the present method for collagen content is not more than ± 0.8%, which is 5 times higher in accuracy than the error of ± 5.2% of manual sorting.
[0067] Sorting reliability: the present method is extremely reliable in identifying defects such as mold growth, with a missed detection rate of only 0.05%, while the missed detection rate of manual sorting due to fatigue and subjective factors is as high as 12.7%, which is reduced by more than 250 times by the present method.
[0068] Embodiment Two This embodiment provides an intelligent quality grading system for dried fish maw based on spectral analysis, mainly including a server, a conveying mechanism, a vision acquisition mechanism including a high-definition camera and a 3D scanning device, and a sorting mechanism. The conveying mechanism is used to transport the target dried fish maw to be tested to a designated point. The vision acquisition mechanism performs visual image acquisition on the target dried fish maw and transmits the acquired data to the server. The server executes the intelligent quality grading method for dried fish maw based on spectral analysis as described above. Finally, the sorting mechanism performs the sorting action.
[0069] The server mainly includes the following modules: The quality analysis module is used to collect spectral data of the target dried flower maw within a specified wavelength range, process the spectral data based on a pre-built prediction model, and determine the quality indicators of the target dried flower maw; the quality indicators include collagen content and water content. The feature analysis module is used to acquire a visual image of the target dried flower maw, extract features from the visual image, and obtain the surface feature parameters of the target dried flower maw. The grading module, based on a weighted scoring model, classifies the target dried flower maw according to quality indicators and surface characteristic parameters, and determines the target grade of the target dried flower maw.
[0070] It should be noted that the functions of each module in this embodiment system can be found in the corresponding descriptions in the above methods, and will not be repeated here.
[0071] Example 3 This embodiment provides an electronic device. Figure 2 A structural block diagram of an electronic device according to an embodiment of the present invention is shown. Figure 2 As shown, the electronic device includes a memory 100 and a processor 200. The memory 100 stores a computer program that can run on the processor 200. When the processor 200 executes the computer program, it implements the intelligent grading method for dried fish maw quality based on spectral analysis as described in the above embodiments. The number of memories 100 and processors 200 can be one or more.
[0072] The electronic device also includes: The communication interface 300 is used to communicate with external devices and perform data exchange and transmission.
[0073] If the memory 100, the processor 200 and the communication interface 300 are implemented independently, the memory 100, the processor 200 and the communication interface 300 can be connected to each other through a bus and complete communication between each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.
[0074] Optionally, in a specific implementation, if the memory 100, the processor 200 and the communication interface 300 are integrated on a chip, the memory 100, the processor 200 and the communication interface 300 can complete communication between each other through an internal interface.
[0075] The embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the method provided in the embodiment of the present application.
[0076] The embodiment of the present application further provides a chip, which comprises a processor, and the processor is used to call and run instructions stored in a memory, so that a communication device installed with the chip executes the method provided in the embodiment of the present application.
[0077] The embodiment of the present application further provides a chip, which comprises an input interface, an output interface, a processor and a memory, and the input interface, the output interface, the processor and the memory are connected through an internal connection path. The processor is used to execute code in the memory, and when the code is executed, the processor is used to execute the method provided in the embodiment of the present application.
[0078] It is to be understood that the above-described processor can be a central processing unit (CPU), but can also be other general purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic components, discrete hardware components, etc. The general purpose processor can be a microprocessor or any conventional processor, etc. It is to be noted that the processor can be an advanced RISC machine (ARM) architecture processor.
[0079] Further, the above-described memory can include read-only memory and random access memory, and can also include non-volatile random access memory. The memory can be volatile memory or non-volatile memory, or can include both volatile and non-volatile memory. The non-volatile memory can include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically EPROM (EEPROM) or flash memory. The volatile memory can include random access memory (RAM) used as an external cache. By way of example, but not limitation, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM) and direct rambus RAM (DR RAM) can be used.
[0080] In the above-described embodiments, all or part can be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part generates the flow or function according to the present application. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium.
[0081] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples. In addition, different embodiments or examples described in the present specification and the features of different embodiments or examples can be combined and combined by those skilled in the art without contradiction.
[0082] In addition, the terms "first", "second" are only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specifically limited.
[0083] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of various changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for intelligent grading of dried flower maw quality based on spectral analysis, characterized in that, include: Spectral data of the target dried flower maw within a specified wavelength range are collected, and the spectral data are processed based on a pre-built prediction model to determine the quality indicators of the target dried flower maw; the quality indicators include collagen content. A visual image of the target dried flower maw is obtained, and features are extracted from the visual image to obtain the surface feature parameters of the target dried flower maw. Based on a weighted scoring model, the target dried flower maw is classified according to the quality indicators and surface feature parameters to determine the target grade of the target dried flower maw.
2. The intelligent grading method for dried flower maw based on spectral analysis according to claim 1, characterized in that, The spectral data of the target dried flower glue within the specified wavelength range includes: The target dried flower glue is scanned along its thickness direction using a near-infrared spectrometer, and spectral points in the target dried flower glue within the fluctuation range of 900nm to 1700nm are collected at a specified sampling point density to form the spectral data.
3. The intelligent grading method for dried flower maw based on spectral analysis according to claim 2, characterized in that, The method for constructing the prediction model includes: Collect dried flower maw samples and acquire sample data of each dried flower maw sample in the range of 900nm~1700nm using a near-infrared spectrometer; The true index parameters of each dried flower maw sample were measured, including the true collagen content and the true water content. The PLS regression algorithm is used to extract key latent variables from the sample data and the real indicator parameters simultaneously. Regression relationships are established based on the key latent variables to obtain the prediction model.
4. The intelligent grading method for dried flower maw based on spectral analysis according to claim 1, characterized in that, The visual images include visual images of the upper surface and the lower surface of the target dried flower glue captured at the same time. The feature extraction process for the visual image to obtain the surface feature parameters of the target dried flower glue includes: The visual images of the upper surface and the lower surface are input into a pre-built neural network model. The shared feature extractor of the neural network model is used to extract features from the visual images of the upper surface and the lower surface to obtain a shared feature map. Based on the shared feature map, crack segmentation, mold detection, and overall defect classification are performed simultaneously through multiple parallel task heads of the neural network model. The surface feature parameters of the target dried flower glue are determined based on the output results of multiple parallel task heads.
5. The intelligent grading method for dried flower maw based on spectral analysis according to claim 4, characterized in that, The visual image also includes three-dimensional point cloud data obtained by scanning the surface of the target dried flower glue using a scanning device; the feature extraction of the visual image to obtain the surface feature parameters of the target dried flower glue further includes: Based on the three-dimensional point cloud data, the main area of the surface of the target dried flower glue is extracted, and the thickness value of all points in the main area is calculated to form a thickness matrix.
6. The intelligent grading method for dried flower maw based on spectral analysis according to claim 5, characterized in that, The weighted scoring model is used to classify the target dried flower maw according to the quality indicators and the surface feature parameters, and the target grade of the target dried flower maw is determined by: The collagen score is calculated based on the quality index, the thickness uniformity score of the target dried flower glue is calculated based on the standard deviation or coefficient of variation of the thickness matrix, and the surface defect score is calculated based on the surface characteristic parameters. The collagen score, the thickness uniformity score, and the surface defect score are weighted and calculated to obtain a comprehensive score. Based on a preset classification threshold, the target grade of the target dried flower maw is determined according to the comprehensive score.
7. The intelligent grading method for dried flower maw based on spectral analysis according to claim 1, characterized in that, Also includes: Based on the target grade of the target dried flower jelly, a control command is generated. The control command is used to control the pneumatic sorting mechanism to divert the target dried flower jelly to the collection channel corresponding to the target grade at a specified working pressure to achieve sorting.
8. A smart grading system for dried flower maw based on spectral analysis, characterized in that, include: The quality analysis module is used to collect spectral data of the target dried flower maw within a specified wavelength range, process the spectral data based on a pre-built prediction model, and determine the quality indicators of the target dried flower maw; the quality indicators include collagen content. The feature analysis module is used to acquire a visual image of the target dried flower maw, extract features from the visual image, and obtain the surface feature parameters of the target dried flower maw. The grading module, based on a weighted scoring model, classifies the target dried flower maw according to the quality indicators and surface feature parameters, and determines the target grade of the target dried flower maw.
9. An electronic device, characterized in that, include: A processor and a memory, wherein the memory stores instructions that are loaded and executed by the processor to implement the intelligent grading method for dried flower maw quality based on spectral analysis as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the intelligent grading method for dried flower maw quality based on spectral analysis as described in any one of claims 1 to 7.