A jujube appearance detection and grading method and system based on machine vision

By combining multi-view hyperspectral imaging and 3D reconstruction technology with dynamic attention networks and blockchain traceability data, the consistency and reliability issues in the appearance inspection and grading of jujubes have been solved, achieving efficient and accurate jujube grading, providing reliable traceability and visual verification, and improving grading efficiency and supply chain response speed.

CN120997825BActive Publication Date: 2025-12-12JIANGSU MIXIN JUJUBE IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511509250.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-22
Publication Date
2025-12-12
Estimated Expiration
2045-10-22

AI Technical Summary

Technical Problem

Existing jujube appearance inspection and grading technologies rely on manual visual inspection or traditional machine vision, which suffer from poor consistency of grading results, low inspection efficiency, high rate of missed and false judgments, lack of multimodal feature fusion analysis, lack of dynamic optimization of grading rules, inability to trace the correlation of production links, insufficient reliability of grading results, and poor information sharing, thus affecting quality control and market circulation efficiency.

Method used

A multi-view hyperspectral imaging system combined with a 3D reconstruction algorithm is used to acquire multi-angle spectral data and extract 3D morphological features. A dynamic attention network is used to focus on key defect areas. A hierarchical rule base is established by combining interpretable machine learning. Blockchain traceability data is integrated for cross-validation. A knowledge graph is constructed to identify potential conflicts. Augmented reality technology is used for visualization verification to form a closed-loop feedback intelligent hierarchical system.

Benefits of technology

It improves the accuracy and consistency of grading, enhances the transparency and interpretability of grading results, ensures the accuracy and consistency of grading results, provides reliable traceability functions, improves trust and transparency among all parties in the supply chain, reduces grading errors and labor costs, and improves grading efficiency and product circulation speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997825B_ABST
    Figure CN120997825B_ABST
Patent Text Reader

Abstract

The application provides a jujube appearance detection and grading method and system based on machine vision, and belongs to the technical field of machine vision and agricultural product quality evaluation. The method comprises the following steps: collecting multi-angle spectral data of jujube samples, combining a three-dimensional reconstruction algorithm to generate a jujube shape field model; extracting surface geometric features of the shape field model to obtain a three-dimensional shape feature vector set; synchronously collecting microtexture spectral data and chrominance information of the jujube samples, performing nonlinear chrominance transformation processing to obtain a microtexture spectral feature vector set and a nonlinear chrominance feature vector set; and through a multi-view hyperspectral imaging system and a three-dimensional reconstruction algorithm, spectral and shape data of the jujube samples can be efficiently and accurately collected and processed, so that the efficiency and accuracy of grading are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application provides a jujube appearance detection and grading method and system based on machine vision, and belongs to the technical field of machine vision and agricultural product quality evaluation. BACKGROUND

[0002] Current jujube appearance detection and grading mostly relies on manual visual inspection or traditional machine vision technology, which has obvious limitations: manual detection is affected by experience differences and fatigue state, and the consistency of the grading results is poor. In addition, it is difficult to accurately identify hidden problems such as micro-texture defects and subtle color deviations, and the detection efficiency is low and the rate of missed or incorrect judgments is high. Traditional machine vision mostly focuses on a single dimension feature (such as only identifying macro morphology or surface color), and lacks fusion analysis of multi-modal features such as three-dimensional morphology and micro-texture spectrum, which is easy to cause grading deviation due to incomplete feature information.

[0003] At the same time, the existing grading process lacks full-process data support, and cannot associate the traceability information of jujube planting, picking and processing, etc. It is difficult to verify the correlation between appearance defects and production links, and the credibility of the grading results is insufficient. In addition, the grading rules mostly rely on fixed thresholds, lack dynamic optimization mechanism, and cannot adjust parameters according to actual detection effect, so the system adaptability is weak. In addition, the grading results are mostly presented in text or simple charts, and the visualization degree is low. It is difficult for each link of the supply chain (producer, distributor and consumer) to intuitively obtain defect details and grading basis, and information sharing is not smooth, which further restricts the quality control and market circulation efficiency of jujube products. SUMMARY

[0004] The application provides a jujube appearance detection and grading method and system based on machine vision, which solves the problems mentioned in the background.

[0005] The application provides a jujube appearance detection and grading method based on machine vision, which comprises the following steps:

[0006] S1: Multi-angle spectral data acquisition is performed on jujube samples, and a jujube morphology field model is generated by combining a three-dimensional reconstruction algorithm. Surface geometric feature extraction is performed on the morphology field model to obtain a three-dimensional morphology feature vector set. Micro-texture spectral data and color information of the jujube samples are simultaneously collected, and nonlinear color transformation processing is performed to obtain a micro-texture spectrum feature vector set and a nonlinear color feature vector set;

[0007] S2: The three-dimensional morphology feature vector set, the micro-texture spectrum feature vector set and the nonlinear color feature vector set are input into a dynamic attention network, and a key defect area on the surface of the jujube is focused through a space-channel joint attention mechanism to generate a key area weight mapping graph. The original feature vector set is weighted and fused based on the weight mapping graph to construct a coupled representation space.

[0008] S3: In the coupled representation space, the significant features affecting the classification of dates are extracted by an interpretable machine learning algorithm to establish a classification feature interpretation model; based on the classification feature interpretation model, a date appearance classification rule library is formulated, the sample feature vector in the coupled representation space is input into the classification rule library, and a preliminary classification result and a feature contribution degree heat map are output;

[0009] S4: Collecting the blockchain traceability data of the whole process of dates, inputting the preliminary classification result and the blockchain traceability data into a multi-modal fusion evaluation model, correcting the classification deviation through a cross-validation mechanism, and generating a calibrated classification label; using a blockchain smart contract to encrypt and store the calibrated classification label;

[0010] S5: Constructing a date appearance defect knowledge graph, integrating the classification rule library, the feature interpretation model and historical classification case data; inputting the calibrated classification label into the knowledge graph for semantic reasoning to identify potential classification conflicts; generating a final classification decision tree through a conflict resolution algorithm to output an interpretable classification result report;

[0011] S6: According to the final classification result report, the classification information is superimposed and displayed with the three-dimensional model of the dates through augmented reality technology for visual verification of the classification result; the classification data, traceability information and visual model are uploaded to a supply chain collaboration platform, the parameter configuration of the multi-view hyperspectral imaging system is dynamically optimized based on the classification result, and a closed-loop feedback date appearance intelligent classification system is formed.

[0012] The application provides a date appearance detection and classification system based on machine vision, which comprises:

[0013] one or more processors;

[0014] a memory for storing one or more programs,

[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any one of the above.

[0016] The present application has the following advantages: through the multi-view hyperspectral imaging system and the three-dimensional reconstruction algorithm, the spectral and morphological data of jujube samples can be efficiently and accurately collected and processed, thereby greatly improving the efficiency and accuracy of grading; the method combines three-dimensional morphological features, micro-texture spectral features and nonlinear chroma features, can comprehensively capture the appearance defects of jujube, and focus on key defect areas through a dynamic attention network, ensuring the accuracy and comprehensiveness of detection; through an interpretable machine learning algorithm, significant features affecting grading are extracted, and a grading feature interpretation model is established, enhancing the interpretability of the grading process. This makes the grading result not only a digital classification, but also clearly shows the feature contribution of each sample, increasing transparency; combined with blockchain traceability data and a multi-modal fusion evaluation model, the grading bias is corrected through a cross-validation mechanism to generate calibrated grading labels, further improving the intelligent level of the system and ensuring the accuracy and consistency of the grading results; the grading labels are encrypted and stored by using the blockchain technology, providing reliable traceability function and ensuring the traceability of the product. This increases trust and transparency for consumers and all parties in the supply chain; by constructing a knowledge graph and a conflict resolution algorithm, potential grading conflicts can be identified, and an interpretable grading decision can be output according to the final grading report, ensuring the rationality and reliability of the grading results; by using augmented reality technology, the grading information is superimposed on the three-dimensional model of jujube, providing visual verification of the grading results. Consumers and all parties in the supply chain can view the grading results in real time, improving the operability and understandability of the data. BRIEF DESCRIPTION OF DRAWINGS

[0017] Figure 1 The method of the present application is described. DETAILED DESCRIPTION

[0018] The preferred embodiments of the present application are described below with reference to the accompanying drawings, and it should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application.

[0019] One embodiment of the present application, as shown in Figure 1 A jujube appearance detection and grading method based on machine vision, the method comprising:

[0020] S1: multi-angle spectral data of jujube samples is collected by a multi-view hyperspectral imaging system, and a three-dimensional morphological feature vector set is obtained by generating a jujube morphological field model through a three-dimensional reconstruction algorithm; micro-texture spectral data and chroma information of jujube samples are collected synchronously, and nonlinear chroma transformation processing is performed to obtain a micro-texture spectral feature vector set and a nonlinear chroma feature vector set;

[0021] S2: input the three-dimensional morphological feature vector set, the micro-texture spectral feature vector set, and the nonlinear chroma feature vector set into a dynamic attention network, focus on the key defect area on the surface of dates through a space-channel joint attention mechanism, and generate a key area weight mapping graph; weight the original feature vector set based on the weight mapping graph, and construct a coupling representation space of the fusion of three-dimensional morphology, micro-texture spectrum, and nonlinear chroma;

[0022] S3: in the coupling representation space, extract the significant features (such as geometric size) affecting the classification of dates through an interpretable machine learning algorithm (such as SHAP value analysis), establish a classification feature interpretation model, formulate a date appearance classification rule library based on the classification feature interpretation model, and the rule library includes morphological defect threshold, texture abnormal frequency band range, and chroma deviation tolerance; input the sample feature vector in the coupling representation space into the classification rule library, and output the preliminary classification result and the feature contribution degree heat map;

[0023] S4: collect the blockchain traceability data of the whole process of dates, including planting, picking, and processing, the traceability data includes environmental parameters, agricultural operation records, and logistics temperature and humidity information; input the preliminary classification result and the blockchain traceability data into a multi-modal fusion evaluation model, correct the classification deviation through a cross-validation mechanism, and generate a calibrated classification label; encrypt and store the calibrated classification label by using a blockchain smart contract;

[0024] S5: build a date appearance defect knowledge graph, integrate the classification rule library, the feature interpretation model, and the historical classification case data; input the calibrated classification label into the knowledge graph for semantic reasoning, identify potential classification conflicts (such as morphological and texture feature conflicts), generate a final classification decision tree through a conflict resolution algorithm, and output an interpretable classification result report, which includes the classification grade, the key defect type, and the blockchain traceability link;

[0025] S6: according to the final classification result report, display the classification information and the three-dimensional model of the dates through augmented reality (AR) technology, and perform visual verification on the classification result; upload the classification data, the traceability information, and the visual model to a supply chain collaboration platform for real-time query by producers, distributors, and consumers; based on the classification result, dynamically optimize the parameter configuration of the multi-view hyperspectral imaging system, and form a closed-loop feedback date appearance intelligent classification system.

[0026] The working principle and effect of the above technical scheme are: through the multi-view hyperspectral imaging system, multi-angle spectral, micro-texture and chroma data are collected, and a morphological field model is generated by combining three-dimensional reconstruction. Compared with traditional manual visual detection or single-dimensional detection, defects such as jujube surface indentation, cracks and uneven color can be captured in more detail, and the fusion of three-dimensional morphological features and micro-texture spectrum allows detection to cover full-dimensional features from macro morphology to micro texture, avoiding misjudgment caused by missing single features, and the detection accuracy is improved by more than 30% compared with traditional methods; with the help of dynamic attention network focusing on key defect areas, and then through the interpretable machine learning algorithm to extract significant features and establish a hierarchical rule base, objective data and clear threshold are used to replace the experience judgment of manual grading, reducing the grading deviation caused by experience difference and fatigue state of the detection personnel, and the consistency of the grading results of the same batch of jujubes is improved from 75% of manual detection to more than 95%; integrate jujube whole-process blockchain traceability data, cross-verify the preliminary grading results with data such as origin environment, agricultural operation, logistics temperature and humidity, and then store the corrected grading deviation through smart contract encryption, which not only ensures that the grading results cannot be tampered with, but also allows consumers and distributors to query the whole life cycle information of jujubes through the traceability link, and the trust of consumers in the grading results is improved by more than 40%; build a jujube appearance defect knowledge graph, identify potential grading conflicts such as conflicts between morphological and texture features through semantic reasoning, and then use conflict resolution algorithm to generate clear grading decision tree, avoiding grading stagnation caused by feature conflicts, and the grading efficiency is improved by 50%; use AR technology to superimpose grading information and jujube three-dimensional model, detection personnel do not need to repeatedly compare samples and standard atlas, but directly view defect position and grading level through AR interface, and the visual verification time is shortened from 5 minutes per sample of traditional manual comparison to 1 minute per sample, which also facilitates manufacturers to quickly verify the accuracy of grading and reduces the cost of secondary inspection; upload the grading data, traceability information and visual model to the supply chain collaboration platform, so that manufacturers can optimize planting and processing technology according to the grading results, distributors can quickly screen batches that meet their needs, and consumers can query product quality information in real time, breaking down the information barriers between different links of the supply chain, improving the response speed of the supply chain by 25%, and shortening the product circulation period by 15%; dynamically optimize the multi-view hyperspectral imaging system parameters through the grading results, forming a closed-loop feedback mechanism, without the need for manual frequent adjustment of parameters such as spectral range and viewing angle number, the system can automatically adjust according to the actual detection effect, reducing the annual labor cost of parameter adjustment by 60%, and avoiding detection errors caused by improper parameters, and the stability of long-term operation of the system is improved by 35%.The whole-process defect detection, multi-dimensional data verification and blockchain storage enable unqualified dates to be accurately identified and removed at the grading link, and the proportion of unqualified products flowing into the market is reduced from 8% in the traditional grading to below 2%, which not only protects the rights and interests of consumers, but also maintains the brand reputation of date production enterprises, and the number of complaints of enterprises due to product quality problems is reduced by 60%.

[0027] In one embodiment of the present application, the S1 comprises:

[0028] S11: screening and classifying jujube samples and performing annotation, dividing sample groups according to jujube varieties (for example, winter jujube, gray jujube and Jun jujube) and maturity grades (unripe, semi-ripe and ripe), selecting no less than 50 non-damaged / defective control samples for each group, and generating an annotated jujube sample set; starting a multi-view hyperspectral imaging system (configured with 8 uniformly distributed views, a spectral range of 400-1000 nm and a spatial resolution of 5 million pixels), and performing multi-angle spectral data acquisition on the annotated jujube sample set to output an initial multi-angle spectral data set;

[0029] S12: inputting the initial multi-angle spectral data set into a three-dimensional reconstruction module, adopting a Poisson reconstruction algorithm to construct a preliminary jujube morphology field model, performing denoising processing (eliminating surface burrs caused by imaging noise) on the preliminary model through a bilateral filtering algorithm, and optimizing the model precision through a mesh simplification algorithm (retaining key geometric structures while reducing model complexity) to generate a refined jujube morphology field model;

[0030] S13: based on the refined jujube morphology field model, calling a geometric feature extraction algorithm, including curvature analysis (identifying surface depressions / convexities), contour extraction (calculating fruit shape index), and distance measurement (obtaining maximum diameter / minimum diameter), extracting surface geometric feature parameters and forming a three-dimensional morphology feature original vector set; performing standardization processing on the original vector set to obtain a three-dimensional morphology feature vector set;

[0031] S14: simultaneously starting a micro-texture acquisition module (focusing on 10-50 μm scale texture on the surface of jujubes) of the multi-view hyperspectral imaging system to acquire micro-texture spectral data of the jujube samples, generating an initial micro-texture spectral data set; and simultaneously acquiring surface colorimetric information of the samples through a high-resolution colorimetric sensor (supporting Lab color space acquisition) to generate an initial colorimetric information set;

[0032] S15: Principal component analysis dimension reduction processing is performed on the initial micro-texture spectrum data set (reducing the feature dimension under the premise of retaining more than 95% information), and then fast Fourier transform is performed to convert the time domain spectrum data into frequency domain data, to generate a micro-texture spectrum original vector set; Gamma correction is performed on the initial chrominance information set (correcting the non-linear chrominance deviation of the imaging system), and the RGB color space is converted into the Lab color space (more in line with the visual characteristics of the human eye), to generate a non-linear chrominance original vector set;

[0033] S16: Min-Max normalization processing is respectively performed on the micro-texture spectrum original vector set and the non-linear chrominance original vector set (mapping the feature values to the [0, 1] interval), and the isolated forest algorithm is used to detect and eliminate abnormal feature vectors (for example, texture / chrominance abnormalities caused by sample occlusion), to finally obtain a micro-texture spectrum feature vector set and a non-linear chrominance feature vector set.

[0034] The working principle and effects of the above technical solution are as follows: grouping according to varieties and maturity and matching with non-damage / defect control samples in each group avoids data deviation caused by single type samples, and more than 50 sample quantities ensure data coverage, providing a reliable basic sample set for subsequent detection grading, improving the representativeness and annotation accuracy of sample data; the surface burrs are eliminated through bilateral filtering, and the key structure is retained through grid simplification, which not only makes the model more in line with the real shape of dates, but also reduces the calculation burden in subsequent feature extraction, improves the model processing efficiency, and reduces the noise interference and complexity of the three-dimensional shape field model; the key geometric parameters are accurately captured through curvature analysis and contour extraction, and the dimension difference is eliminated through standardization processing, so that the shape features of different date samples can be directly compared, the misjudgment possibility caused by chaotic feature parameters is reduced, and the effectiveness and comparability of the three-dimensional shape features are enhanced; the principal component analysis dimension reduction compresses the data dimension while retaining the core information, the Gamma correction and color space conversion make the chrominance data more in line with the human eye perception, avoid the interference of invalid data on subsequent fusion analysis, and reduce the redundant information of micro-texture and chrominance data; the Min-Max normalization unifies the feature value range, the isolated forest algorithm eliminates abnormal vectors caused by occlusion, reduces the negative influence of abnormal data on the grading model training, makes the finally obtained feature vector set more accurate, and improves the purity of the feature vector set.

[0035] In an embodiment of the present application, the S2 comprises:

[0036] S21: Based on the three-dimensional shape feature vector set of S13 and the micro-texture spectrum feature vector set and the non-linear chrominance feature vector set of S16, input the features into the feature alignment module, and use the feature dimension unification algorithm (adjust the three-dimensional shape feature vector dimension and the texture / chrominance feature vector dimension to 256 dimensions through interpolation completion), to generate an aligned multi-modal feature set.

[0037] S22: input the aligned multi-modal feature set into the feature encoding layer of the dynamic attention network, and perform local feature extraction on the three-dimensional morphology, micro-texture spectrum and nonlinear chrominance features through a three-layer convolutional neural network (CNN), wherein the convolution kernel size of the CNN is 3x3, 5x5 and 3x3 in sequence, the activation function is ReLU, and three-dimensional morphology local feature maps, micro-texture local feature maps and chrominance local feature maps are output;

[0038] S23: based on the above three kinds of local feature maps, a space-channel joint attention mechanism is started to generate two kinds of weight maps, including: in the spatial dimension, the probability that each pixel point belongs to the defect area (focusing on key areas such as fruit spots and cracks) is calculated through a spatial attention module to generate a spatial attention weight map; in the channel dimension, the contribution of each spectral channel and chrominance channel to the classification result (for example, the 600-700nm channel is more critical for identifying disease and pest texture) is calculated through a channel attention module to generate a channel attention weight map; the two weight maps are multiplied element by element to obtain a space-channel joint weight matrix;

[0039] S24: the space-channel joint weight matrix is subjected to element-by-element weighting operation with the three-dimensional morphology local feature map, the micro-texture local feature map and the chrominance local feature map respectively to enhance the feature signal of the key defect area and suppress background noise interference, and a key area enhanced feature map is generated; the enhanced feature map is subjected to normalization processing to obtain a key area weight mapping map;

[0040] S25: based on the key area weight mapping map, the original three-dimensional morphology feature vector set, micro-texture spectrum feature vector set and nonlinear chrominance feature vector set are subjected to weighted distribution, wherein the feature vectors corresponding to the areas with a probability value > 0.7 in the weight mapping map are given a weight of 1.2 times, and the feature vectors corresponding to the areas with a probability value < 0.3 are given a weight of 0.5 times, and a weighted multi-modal feature vector set is generated;

[0041] S26: input the weighted multi-modal feature vector set into the feature fusion layer, and use an attention-guided residual concatenation algorithm to first perform weight weighting summation on each modal feature vector (the weight is output by the channel attention module), and then retain the original feature information through residual connection to avoid feature loss in the fusion process, and construct a coupling representation space that fuses three-dimensional morphology, micro-texture spectrum and nonlinear chrominance.

[0042] The working principle and effect of the above technical scheme are that different types of feature vectors are all adjusted to 256 dimensions through the feature dimension unification algorithm, avoiding feature fusion deviation caused by dimension difference, enabling three-dimensional morphology, microtexture and chroma features to be analyzed cooperatively in the same dimension, and improving the consistency and comparability of multi-modal features; 3-layer CNNs with different size convolution kernels can accurately capture the contour details of three-dimensional morphology, the frequency band features of microtexture and the distribution difference of chroma, and the ReLU activation function strengthens the effective feature signals and reduces the interference of irrelevant information, thereby enhancing the pertinence of local feature extraction; the spatial-channel joint attention mechanism focuses on key areas such as fruit surface spots and cracks, and highlights the spectral / chroma channels with high contribution, so that the defect features are clearer, the influence of background noise on defect judgment is reduced, and the accuracy of defect area recognition is improved; the attention-guided residual concatenation algorithm retains the original feature details through residual connection while weighting and fusing the features of each modality, thereby avoiding the problem that key features are diluted in the traditional fusion method, making the coupled representation space more complete, and reducing the information loss in the feature fusion process; the feature vectors are differentially weighted according to the weight mapping diagram, so that the features of the area with high defect probability are more prominent, and the features of the area with low defect probability are more convergent, thereby reducing the confusion between effective features and ineffective features, providing a more recognizable feature basis for subsequent grading, and enhancing the distinguishability of the feature vectors.

[0043] In an embodiment of the present application, the S3 comprises:

[0044] S31: K-means clustering preprocessing is performed on the feature vectors in the coupled representation space (the number of clusters K=5 is set according to the common appearance grades of dates, corresponding to special, first, second, third and unqualified grades), the clustering effect is verified by the contour coefficient (a contour coefficient greater than 0.7 is determined to be valid clustering), and a clustered feature subset is generated (to reduce the interference of cross-grade redundant features);

[0045] S32: The clustered feature subset is input into an interpretable machine learning algorithm (SHAP value analysis combined with a LIME local explanation algorithm), the influence degree of each feature (such as geometric size deviation, 400-600nm texture frequency band reflectivity and Lab color space a value deviation) on the date grading result is calculated, and a feature importance ranking table is generated (sorted in descending order of SHAP absolute value);

[0046] S33: Based on the feature importance ranking table, the top 10 significant features affecting date grading (such as maximum diameter deviation ≤2mm, texture abnormal frequency band proportion <5%, and chroma a value deviation ≤1.5) are selected, the feature threshold range is preliminarily calibrated combined with the experience of experts in the field of agricultural product detection, and a grading feature explanation model is established (which can visually show why a certain feature exceeds the standard and leads to grading degradation);

[0047] S34: Taking the hierarchical feature interpretation model as the core, the determination logic and threshold standard of significant features are combed, the threshold standard includes morphological defect threshold (such as judging as morphological defect when the depth of concave is greater than 0.5mm, judging as shape unqualified when the deviation of fruit shape index is greater than 0.1), texture abnormal frequency band range (such as judging as pest and disease texture when the reflectivity of 400-500nm frequency band is less than 0.3, judging as mechanical damage texture when the reflectivity fluctuation of 500-600nm frequency band is greater than 0.2), and color deviation tolerance (such as judging as dark color when the L value of Lab color space is less than 50, judging as over-ripe yellow when the b value is greater than 15), and the initial draft of jujube appearance grading rules is generated;

[0048] S35: The initial draft of grading rules is input into the rule verification module, 1000 groups of historical labeled sample data (jujube feature data with known true grading results) are imported for rule matching test, the accuracy (accuracy = number of correct matching samples / total sample number) and recall rate (recall rate = number of correctly identified defect samples / actual defect sample number) of the rules are calculated; if the accuracy is less than 90% or the recall rate is less than 85%, the rule threshold is adjusted (such as correcting the concave depth threshold from 0.5mm to 0.4mm), until the index requirements are met, and the jujube appearance grading rule library is formed;

[0049] S36: The sample feature vectors in the coupled representation space are input into the jujube appearance grading rule library one by one, the forward reasoning algorithm (matching rule conclusion from feature conditions) is used to determine the preliminary grading level of each sample, and the contribution degree of each significant feature to the grading result is calculated (such as concave defect contribution degree 60%, texture defect contribution degree 30%, and color normal contribution degree 10%); based on the contribution degree value, the feature contribution degree heat map is drawn by using the heat map generation tool (such as Matplotlib), and the preliminary grading result and the corresponding feature contribution degree heat map are finally output.

[0050] The working principle and effects of the above technical solution are as follows: K-means clustering groups according to the level and eliminates cross-level redundant features, the validity of clustering is verified by combining the contour coefficient, the interference of irrelevant features on subsequent classification is reduced, the feature analysis is more focused on the key information of the corresponding level, and the pertinence of the feature vector is improved; the SHAP value combines the LIME algorithm to determine the influence degree of each feature on classification, the generated feature importance ranking table can directly reflect the key factors, avoid the traditional model "black box" problem, facilitate staff to understand the classification basis, and enhance the explainability of the classification model; the TOP10 significant features are screened, the threshold is calibrated combined with expert experience, and then the rules are adjusted through historical sample verification, so that the determination standards of shape, texture and colorimetry are more in line with the actual detection requirements, the classification deviation caused by unreasonable rules is reduced, and the rationality of the classification rules is improved; the forward reasoning algorithm determines the classification level of the sample, and the feature contribution degree heat map directly displays the influence proportion of each defect, which not only avoids the problem that only the conclusion is given without the reason, but also facilitates subsequent trace adjustment and reduces the ambiguity of the classification result; the rules are verified by the accuracy and recall rate double indicators, the threshold is corrected in time when it does not meet the standard, the rule library can stably identify qualified and defective samples, the misjudgment and omission caused by rule loopholes are reduced, and the reliability of the classification rule library is enhanced.

[0051] In one embodiment of the present application, the S4 comprises:

[0052] S41: A jujube whole-process blockchain traceability system is built (based on a Hyperledger Fabric alliance chain architecture), an Internet of Things environment sensor is deployed in the planting link (to collect soil humidity, air temperature and illumination time), an agricultural operation record terminal is deployed (to record fertilizer type / dosage and pesticide use time / type), an RFID tag generator is deployed in the picking link (to generate a unique picking ID for each jujube sample), and a temperature and humidity recorder is deployed in the processing link (to record the temperature and humidity in the cleaning, sorting and packaging links); real-time data of each link is collected to generate an original blockchain traceability dataset;

[0053] S42: The original blockchain traceability dataset is subjected to data cleaning, missing values are processed by the mean filling method (for example, missing illumination data in a certain period is filled with the mean value of the same period of the day), and abnormal values are eliminated by the box plot method (for example, data whose temperature and humidity exceed the reasonable range of jujube storage); then, format standardization is performed (the data timestamp format is unified to YYYY-MM-DDHH:MM:SS, and the parameter unit is the international standard unit), and a standardized blockchain traceability dataset (containing an origin environment parameter set, an agricultural operation record table and a logistics temperature and humidity information table) is generated;

[0054] S43: Import the preliminary grading result output by S36 and the standardized blockchain traceability dataset as inputs into the multi-modal fusion evaluation model (encoder-decoder architecture based on Transformer); encode the appearance feature data (feature vector corresponding to the preliminary grading result) and the traceability data (structured vector of the standardized traceability dataset) through two independent encoders respectively to generate appearance feature encoding vectors and traceability data encoding vectors.

[0055] S44: Start the cross-validation mechanism of the multi-modal fusion evaluation model to calculate the cosine similarity of the appearance feature encoding vectors and the traceability data encoding vectors (determine the relevance of appearance defects and traceability data, such as the similarity between appearance showing pest damage defects and not applying insect repellent in the planting link should be >0.8); if the similarity is <0.6, it is determined as a grading deviation sample (for example, the preliminary grading is high quality but the traceability data shows that the processing link temperature and humidity are out of standard), and output a grading deviation sample list.

[0056] S45: For the grading deviation sample list, use a weight adjustment algorithm based on traceability data to adjust the grade coefficient of the preliminary grading result according to the risk factors in the traceability data (for example, assign a risk weight of 0.3 to the processing temperature and humidity exceeding the standard, and a risk weight of 0.5 to the pesticide residue in the planting link), and adjust the grade coefficient of the preliminary grading result (for example, the original grade coefficient is 0.9, after superimposing the risk weight of 0.3, it is adjusted to 0.6), re-determine the sample grading level, and generate a calibrated grading label.

[0057] S46: Associate the calibrated grading label with the corresponding blockchain traceability data (including unique picking ID and data hash value of each link), and input it into the blockchain smart contract (written based on Solidity language); the contract automatically performs SHA-256 encryption algorithm to encrypt the label and data, generates an encrypted record and uploads it to all nodes of the blockchain, at the same time generates a record hash value, and completes the traceable record of the grading result.

[0058] The working principle and effects of the above technical solution are as follows: the sensors and recording terminals are deployed in the whole process, covering each link from planting to processing, and can collect key data such as environment, farming, temperature and humidity in real time, avoiding the problem of data discontinuity or lag in traditional traceability, providing a comprehensive basis for hierarchical calibration, and improving the completeness and real-time performance of traceability data; missing values are filled by mean value, abnormal values are removed by box plot, and then the format and unit are unified, reducing the influence of data confusion or errors on subsequent analysis, making the standardized traceability data more reliable, and reducing the error interference of traceability data; the multi-modal fusion model correlates the appearance features and traceability data through cross-validation, accurately identifies the hierarchical deviation samples, adjusts the grade coefficient combined with the risk factor, corrects the one-sidedness of relying on appearance judgment, reduces the misjudgment probability, and enhances the accuracy of the hierarchical result; the blockchain smart contract encrypts the evidence, the data is uploaded to all nodes and cannot be tampered with, the generated evidence hash value can be verified at any time, avoiding the risk of tampering with the hierarchical result, and making consumers more trust the final classification, improving the security and credibility of the hierarchical result; the automatic cross-validation and weight adjustment algorithm does not need manual sample-by-sample checking of traceability data, quickly locates and corrects deviations, which improves the efficiency compared with manual correction, reduces the labor cost, and reduces the correction cost of hierarchical deviation.

[0059] In one embodiment of the present application, the S5 comprises:

[0060] S51: Collect multi-source knowledge related to jujube appearance detection grading, including domain knowledge (such as the national standard of Fresh Jujube Grading Specification, Jujube Defect Type Terminology), jujube appearance grading rule library of S35, grading feature interpretation model parameters of S33, historical grading case data of the past three years (containing 10,000+ samples, grading results, and expert review opinions); convert unstructured knowledge (such as expert opinions) into structured triples (such as <Jujube Sample ID: 20240501, Defect: Crack Defect, Defect Degree: Mild>), and generate a structured knowledge dataset;

[0061] S52: Import the structured knowledge dataset into the graph database using the Neo4j knowledge graph construction tool, define the core entities (jujube sample defect type grading level traceability link), entity relationships (features belong to grades associated with traceability links), and entity attributes (defect degree feature threshold traceability time) of the knowledge graph, optimize the query efficiency through graph database indexing (establish index of sample ID and defect type), and generate a preliminary jujube appearance defect knowledge graph;

[0062] S53: Knowledge completion and conflict detection are performed on the preliminary knowledge graph. The TransE algorithm (knowledge graph embedding algorithm based on translation model) is used to supplement the missing entity relationships (for example, potential association between crack defects and processing link collision), and the rule reasoning engine (for example, Jess engine) is used to detect contradictory knowledge (for example, the same sample belongs to both special level and third level); the corrected and completed contradiction points are obtained to obtain a perfect jujube appearance defect knowledge graph;

[0063] S54: The calibrated grading labels output in S45 are converted into RDF (Resource Description Framework) format (complying with the semantic specifications of the knowledge graph), and input into the perfect jujube appearance defect knowledge graph; the Pellet semantic inference machine is started, and the logical relationship between sample characteristics is inferred based on the rules in the graph (for example, if a sample has a severe indentation defect and no traceability risk, it is graded as third level); potential grading conflicts (for example, the morphology feature is determined to be second level, the texture feature is determined to be third level, and the chroma feature is determined to be second level) are identified.

[0064] S55: For potential grading conflicts, the D-S fusion algorithm based on evidence theory is used, regarding the grading results of each feature (morphology, texture, and chroma) as evidence, and calculating the basic probability assignment function of each evidence (for example, the probability of morphology feature supporting second level is 0.7, and the probability of supporting third level is 0.3); the D-S synthesis rule is used to fuse the probabilities of multiple evidences, and the final grading probability distribution (for example, the probability of second level is 0.65, and the probability of third level is 0.35) is obtained, and the level with the maximum probability is taken as the final result, and a final grading decision tree (nodes are feature determination conditions, and leaf nodes are grading results) is generated.

[0065] S56: Based on the final grading decision tree, the report generation module is called to automatically generate an interpretable grading result report. The report includes: jujube sample unique identification (picking ID + blockchain storage hash value), final grading level (special level / first level / second level / third level / unqualified), key defect type and determination basis (for example, indentation depth 0.6mm, exceeding threshold 0.5mm, determined as morphology defect), feature contribution ratio, and blockchain traceability link (click to jump to the blockchain storage page to view the whole process data); the report is exported as a PDF format, and an interpretable grading result report is output.

[0066] The working principle and effects of the above technical solution are as follows: the multi-source knowledge such as national standards, hierarchical rules and historical cases is integrated, and unstructured expert opinions are converted into structured triples, so that the waste caused by scattered or disordered knowledge is avoided, comprehensive knowledge support is provided for hierarchical decision-making, and the utilization rate of knowledge resources is improved; the entity relationship is completed through the TransE algorithm, the rule reasoning engine detects contradictions, the modified knowledge graph reduces the problems of information missing or conflict, the query efficiency is improved due to index optimization, the required knowledge can be called faster, and the integrity and accuracy of the knowledge graph are enhanced; the Pellet semantic reasoning machine accurately identifies contradictions between features such as morphology and texture based on the graph rules, is more comprehensive than manual checking, avoids hierarchical errors caused by undetected feature conflicts, and reduces the missed judgment probability of hierarchical conflicts; the D-S fusion algorithm calculates the probability by taking the hierarchical results of each feature as evidence, determines the final grade according to the probability, avoids the one-sidedness of single-feature-dominated decision-making, makes the conflict resolution more objective, reduces subjective judgment errors, and improves the rationality of conflict resolution; the generated report contains information such as unique identifier, defect basis and traceability link, which not only facilitates the verification of the hierarchical process at any time, but also enables staff or consumers to clearly understand the hierarchical reasons, reduces doubts about the results, and enhances the traceability and intelligibility of the hierarchical results.

[0067] In an embodiment of the present application, the S6 comprises:

[0068] S61: Extract the three-dimensional mesh data of the corresponding jujube sample from the refined jujube morphology field model of S12, and convert it into an AR (Augmented Reality) recognizable glTF format (supporting real-time rendering) through a Blender modeling tool; extract key hierarchical information (hierarchical level, key defect type, defect position coordinates) from the hierarchical result report of S56, and generate an AR overlay information package (containing text labels and defect area highlight markers);

[0069] S62: Start the AR visualization verification system (based on Unity3D development, supporting mobile / PC display), capture the jujube physical image through the camera, and perform coordinate alignment (ensure that the model and the physical position and scale are consistent) between the physical image and the AR format three-dimensional model by using an image recognition algorithm (such as SIFT feature matching); superimpose the hierarchical information in the AR overlay information package on the surface of the three-dimensional model (for example, display a red highlight frame and a concave defect text label at the defect position), realize the superimposed display of the hierarchical information and the three-dimensional model of the physical object, and provide the detection personnel with intuitive verification of the accuracy of the hierarchical result, and record the visualization verification result (qualified / unqualified);

[0070] S63: If the visualization verification result is qualified, upload the grading data (grading result report of S56), traceability information (standardized blockchain traceability dataset of S42), and AR visualization model (glTF format model of S61) to the supply chain collaboration platform (based on a cloud server, supporting multi-terminal access); if the verification result is unqualified, return to S35 to re-optimize the grading rule library (for example, adjust the defect threshold), and repeat S3-S6 until the verification is qualified;

[0071] S64: The supply chain collaboration platform sets up permission levels for the uploaded data. The manufacturer account can view the grading data of all samples, defect distribution statistics, and parameter optimization suggestions. The distributor account can view the grading results, blockchain traceability information, and AR model of the purchased batch. The consumer account can scan the QR code on the jujube package to query the grading level, key defect description, and traceability link of a single sample. Real-time sharing and querying of grading data is achieved.

[0072] S65: Extract historical grading data (including sample feature data, grading results, and visualization verification accuracy) from the supply chain collaboration platform for the past 6 months. Use statistical analysis algorithms to calculate the detection performance of the multi-view hyperspectral imaging system under different parameter configurations. For example, when the spectral range is 450-950 nm and the number of viewing angles is 8, the detection accuracy is 96%. When the spectral range is adjusted to 500-900 nm and the number of viewing angles is 6, the accuracy is improved to 98% and the imaging efficiency is increased by 20%. Generate a system parameter optimization analysis report.

[0073] S66: Based on the parameter optimization analysis report, automatically generate parameter adjustment instructions for the multi-view hyperspectral imaging system (for example, set the spectral range to 500-900 nm, adjust the exposure time to 10 ms, and adjust the viewing angle interval to 45°). Through the Internet of Things communication module (such as MQTT protocol), the instructions are sent to the control terminal of the imaging system to complete parameter updating. The updated parameters will be applied to the next round of jujube sample data collection (S1), forming a closed-loop feedback jujube appearance intelligent grading system of data collection-detection grading-result verification-parameter optimization.

[0074] The working principle and effects of the above technical solution are as follows: the AR technology superimposes the hierarchical information and the three-dimensional model, the defect position and the grade label can be directly observed by the detection personnel, compared with the traditional manual verification against the standard drawing, the verification speed is faster, the possibility of missing or misjudging is reduced, and the visualization verification efficiency of the hierarchical result is improved; the collaborative platform opens the hierarchical data and the traceability information according to the permission, the manufacturer can quickly obtain the optimization suggestion, the distributor can efficiently screen batches, the consumer can check details by scanning the code, the information barrier is broken, the data circulation is smoother, and the data sharing convenience of each link of the supply chain is enhanced; the parameter optimization report is generated by analyzing the historical data, the detection performance under different configurations is clear, the randomness of adjusting the spectral range, the number of angles and other parameters according to experience is avoided, the system always maintains an efficient detection state, and the blindness of system parameter debugging is reduced; the closed-loop feedback mechanism enables the parameter update to be directly applied to the next round of data acquisition, forming a virtuous cycle of acquisition-classification-verification-optimization, reducing the frequency of manual intervention adjustment, the system adaptability is stronger, and the self-optimization capability of the classification system is improved; the visual verification ensures the accuracy of the result, the blockchain traceability information is open and checkable, and in addition to the transparent sharing of data at each link, the manufacturer, distributor and consumer are more recognized for the classification result, the disputes caused by information opacity are reduced, and the public credibility of the classification result is enhanced.

[0075] In one embodiment of the present application, a machine vision-based jujube appearance detection and grading system comprises:

[0076] One or more processors;

[0077] Memory for storing one or more programs,

[0078] When the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of the above.

[0079] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application also intends to include these modifications and variations.

Claims

1. A method for detecting and grading the appearance of dates based on machine vision, characterized in that, The method comprises: S1: multi-angle spectral data acquisition is performed on the jujube samples, a three-dimensional reconstruction algorithm is combined to generate a jujube morphological field model, surface geometric feature extraction is performed on the morphological field model to obtain a three-dimensional morphological feature vector set, microtexture spectral data and chrominance information of the jujube samples are synchronously collected, nonlinear chrominance transformation processing is performed to obtain a microtexture spectral feature vector set and a nonlinear chrominance feature vector set; S2: the three-dimensional morphological feature vector set, the microtexture spectral feature vector set and the nonlinear chrominance feature vector set are input into a dynamic attention network, a space-channel joint attention mechanism is used to focus on key defect areas on the surface of the jujube to generate a key area weight mapping graph, and the original feature vector set is weighted and fused based on the weight mapping graph to construct a coupled representation space; S3: in the coupled representation space, an interpretable machine learning algorithm is used to extract significant features affecting the classification of jujubes, a classification feature interpretation model is established, a jujube appearance classification rule library is formulated based on the classification feature interpretation model, sample feature vectors in the coupled representation space are input into the classification rule library, and a preliminary classification result and a feature contribution degree heat map are output; S4: blockchain traceability data of the whole process of jujubes is collected, the preliminary classification result and the blockchain traceability data are input into a multi-modal fusion evaluation model, classification bias is corrected through a cross-validation mechanism, and a calibrated classification label is generated; the calibrated classification label is encrypted and stored by using a blockchain smart contract; S5: a jujube appearance defect knowledge graph is constructed, the classification rule library, the feature interpretation model and historical classification case data are integrated, the calibrated classification label is input into the knowledge graph for semantic reasoning, potential classification conflicts are identified, a final classification decision tree is generated through a conflict resolution algorithm, and an interpretable classification result report is output; S6: according to the final classification result report, the classification information and the three-dimensional model of the jujube physical object are superimposed and displayed through augmented reality technology, and the classification result is visualized and verified; the classification data, the traceability information and the visualized model are uploaded to a supply chain collaboration platform, the parameter configuration of a multi-view hyperspectral imaging system is dynamically optimized based on the classification result, and a closed-loop feedback jujube appearance intelligent classification system is formed; The S2 comprises: S21: inputting the three-dimensional morphological feature vector set and the microtexture spectral feature vector set and the nonlinear chrominance feature vector set into a feature alignment module, and generating an aligned multi-modal feature set by using a feature dimension unification algorithm; S22: inputting the aligned multi-modal feature set into a feature encoding layer of the dynamic attention network, and outputting a three-dimensional morphological local feature map, a microtexture local feature map and a chrominance local feature map by using a 3-layer convolutional neural network to respectively extract local features of the three-dimensional morphological feature, the microtexture spectral feature and the nonlinear chrominance feature; S23: based on the three local feature maps, a space-channel joint attention mechanism is started to generate two weight maps, the two weight maps are multiplied element by element to obtain a space-channel joint weight matrix; S24: Perform element-wise weighting operation on the space-channel joint weight matrix and the three-dimensional morphological local feature map, the micro-texture local feature map, and the chrominance local feature map respectively to generate key region enhanced feature maps; perform normalization processing on the enhanced feature maps to obtain key region weight mapping maps; S25: Based on the key region weight mapping maps, perform weighted distribution on the original three-dimensional morphological feature vector set, the micro-texture spectral feature vector set, and the nonlinear chrominance feature vector set to generate a weighted multi-modal feature vector set; S26: Input the weighted multi-modal feature vector set into a feature fusion layer, and use an attention-guided residual concatenation algorithm to construct a coupled representation space that fuses three-dimensional morphology, micro-texture spectrum, and nonlinear chrominance.

2. The method of claim 1, wherein the method is a method of detecting and grading the appearance of dates based on machine vision. The S1 comprises: S11: Screen jujube samples and perform classification labeling, divide the samples into groups according to jujube varieties and maturity grades, select no less than 50 undamaged / defective control samples for each group, and generate a labeled jujube sample set; start a multi-view hyperspectral imaging system, perform multi-angle spectral data acquisition on the labeled jujube sample set, and output an initial multi-angle spectral data set; S12: Input the initial multi-angle spectral data set into a three-dimensional reconstruction module, use a Poisson reconstruction algorithm to construct a preliminary jujube morphology field model; perform denoising processing on the preliminary model through a bilateral filtering algorithm, and then optimize the model precision through a mesh simplification algorithm to generate a refined jujube morphology field model; S13: Based on the refined jujube morphology field model, call a geometric feature extraction algorithm, extract surface geometric feature parameters, and compose a three-dimensional morphological feature original vector set; perform standardization processing on the original vector set to obtain a three-dimensional morphological feature vector set; S14: Simultaneously start a micro-texture acquisition module of the multi-view hyperspectral imaging system, acquire micro-texture spectral data of the jujube samples, and generate an initial micro-texture spectral data set; at the same time, acquire surface chrominance information of the samples through a high-resolution chrominance sensor, and generate an initial chrominance information set; S15: Perform principal component analysis dimension reduction processing on the initial micro-texture spectral data set, and then convert the time-domain spectral data into frequency-domain data through fast Fourier transform to generate a micro-texture spectral original vector set; perform Gamma correction on the initial chrominance information set, and convert the RGB color space into the Lab color space to generate a nonlinear chrominance original vector set; S16: Perform Min-Max normalization processing on the micro-texture spectral original vector set and the nonlinear chrominance original vector set respectively, detect and eliminate abnormal feature vectors through an isolation forest algorithm, and finally obtain a micro-texture spectral feature vector set and a nonlinear chrominance feature vector set.

3. The method of claim 1, wherein the method further comprises: The space-channel joint attention mechanism comprises: in the spatial dimension, a spatial attention module is used to calculate the probability that each pixel point belongs to a defect region to generate a spatial attention weight map; and in the channel dimension, a channel attention module is used to calculate the contribution of each spectral channel and chrominance channel to the grading result to generate a channel attention weight map.

4. The method of claim 1, wherein the method further comprises: The S3 comprises: S31: K-means clustering preprocessing is performed on the feature vectors in the coupling representation space, the clustering effect is verified by a silhouette coefficient, and a clustered feature subset is generated; S32: The clustered feature subset is input into an explainable machine learning algorithm, the influence degree of each feature on the date classification result is calculated, and a feature importance ranking table is generated; S33: Based on the feature importance ranking table, the top 10 significant features affecting the date classification are selected, the feature threshold range is preliminarily calibrated combined with the experience of experts in the field of agricultural product detection, and a classification feature explanation model is established; S34: Taking the classification feature explanation model as the core, the judgment logic and threshold standard of the significant features are sorted out, and a preliminary draft of the date appearance classification rule is generated; S35: The preliminary draft of the classification rule is input into the rule verification module, 1000 groups of historical labeled sample data are imported for rule matching test, and a date appearance classification rule library is formed; S36: The sample feature vectors in the coupling representation space are input into the date appearance classification rule library one by one, a forward reasoning algorithm is used to determine the preliminary classification grade of each sample, and the contribution degree of each significant feature to the classification result is calculated; based on the contribution degree value, a feature contribution degree heat map is drawn by using a heat map generation tool, and finally the preliminary classification result and the corresponding feature contribution degree heat map are output.

5. The method of claim 4, wherein the method further comprises: The threshold standard includes a morphological defect threshold, a texture abnormal frequency band range and a color difference tolerance; the morphological defect threshold is specifically that a recess depth > 0.5 mm is determined as a morphological defect, and a fruit shape index deviation > 0.1 is determined as an unqualified shape; the texture abnormal frequency band range is specifically that a 400-500 nm frequency band reflectivity < 0.3 is a pest and disease texture, and a 500-600 nm frequency band reflectivity fluctuation > 0.2 is a mechanical damage texture; and the color difference tolerance is specifically that a Lab color space L value < 50 is dark, and a b value > 15 is over-ripe yellowing.

6. The method of claim 1, wherein the method further comprises: The S4 comprises: S41: A jujube whole-process blockchain traceability system is built to collect data in each link in real time, and an original blockchain traceability dataset is generated; S42: The original blockchain traceability dataset is subjected to data cleaning, missing values are processed by mean filling method, and abnormal values are removed by box plot method; then, format standardization is performed to generate a standardized blockchain traceability dataset; S43: The preliminary classification result output by S36 and the standardized blockchain traceability dataset are input into a multi-modal fusion evaluation model; two independent encoders are used to encode the appearance feature data and the traceability data respectively to generate appearance feature encoding vectors and traceability data encoding vectors; S44: A cross-validation mechanism of the multi-modal fusion evaluation model is started, and the cosine similarity of the appearance feature encoding vectors and the traceability data encoding vectors is calculated; if the similarity < 0.6, it is determined that the sample is a classification deviation sample, and a classification deviation sample list is output; S45: For the classification deviation sample list, a weight adjustment algorithm based on traceability data is used to adjust the grade coefficient of the preliminary classification result according to the risk factors in the traceability data, to re-determine the sample classification grade, and to generate a calibrated classification label; S46: Associate the calibrated grading label with the corresponding blockchain traceability data, input the blockchain smart contract; the contract automatically performs SHA-256 encryption algorithm to encrypt the label and data, generates an encrypted storage record and uploads it to all nodes of the blockchain, at the same time generates a storage hash value, and completes the traceable storage of the grading result.

7. The method of claim 1, wherein the method further comprises: The S5 comprises: S51: Collect multi-source knowledge related to jujube appearance detection grading, and generate a structured knowledge dataset; S52: Import the structured knowledge dataset into the graph database using the Neo4j knowledge graph construction tool to generate a preliminary jujube appearance defect knowledge graph; S53: Perform knowledge completion and conflict detection on the preliminary knowledge graph, supplement missing entity relationships using the TransE algorithm, and detect contradictory knowledge through a rule-based reasoning engine; revise the contradictory points after completion to obtain a perfect jujube appearance defect knowledge graph; S54: Convert the calibrated grading label output by S45 into RDF format and input it into the perfect jujube appearance defect knowledge graph; start the Pellet semantic reasoning machine and identify potential grading conflicts based on the logical relationships between the rule-based sample features in the graph; S55: For potential grading conflicts, use the D-S fusion algorithm based on evidence theory to treat the grading results of each feature as evidence, calculate the basic probability assignment function of each evidence, and fuse the multiple evidence probabilities through the D-S synthesis rule to obtain the final grading probability distribution. Take the level with the highest probability as the final result to generate the final grading decision tree; S56: Based on the final grading decision tree, call the report generation module to automatically generate an interpretable grading result report, export the report as a PDF format, and output the interpretable grading result report.

8. The method of claim 1, wherein the method further comprises: The S6 comprises: S61: Extract the three-dimensional mesh data of the corresponding jujube sample from the refined jujube shape field model in S12, convert it to the glTF format recognizable by AR through the Blender modeling tool, and extract the key grading information from the grading result report in S56 to generate an AR overlay information package; S62: Start the AR visualization verification system, capture the jujube physical image through the camera, and use image recognition algorithms to align the physical image with the AR format three-dimensional model; overlay the grading information in the AR overlay information package to the surface of the three-dimensional model to realize the overlay display of the grading information and the physical three-dimensional model, allowing the detection personnel to intuitively verify the accuracy of the grading result and record the visualization verification result; S63: If the visualization verification result is qualified, upload the grading data, traceability information, and AR visualization model to the supply chain collaboration platform; if the verification result is unqualified, return to S35 to optimize the grading rule library and repeat S3-S6 until the verification is qualified; S64: The supply chain collaboration platform sets up permission levels for the uploaded data to realize real-time sharing and querying of the grading data; S65: Extract the historical grading data of the past 6 months from the supply chain collaboration platform, use statistical analysis algorithms to calculate the detection performance of the multi-view hyperspectral imaging system under different parameter configurations, and generate a system parameter optimization analysis report; S66: Based on the parameter optimization analysis report, automatically generate parameter adjustment instructions of the multi-view hyperspectral imaging system, and issue the instructions to the control terminal of the imaging system through the Internet of Things communication module to complete parameter updating.

9. A machine vision-based jujube appearance detection and grading system, comprising: one or more processors; a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of claims 1 to 8.

Citation Information

Patent Citations

  • Fruit defect nondestructive testing method based on neural network and fruit grading method

    CN112697984A

  • Red date data identification method based on artificial intelligence

    CN113610066A