Grain defective product detection method combining fingerprint spectrum and finite element analysis
By combining fingerprint maps and finite element analysis, a knowledge map of grain quality was constructed, and the problem of single grain detection methods was solved, intelligent detection and early control of grain residue defective products were realized, and the intelligent and predictive capabilities of grain quality detection were improved.
Patent Information
- Application Number
- CN202510934010.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-07-08
AI Technical Summary
The existing grain quality detection methods are single, and cannot fully reveal the dynamic correlation and coupling mechanism of changes in internal and external quality of grain, resulting in lagging detection results, and the early detection and control of the defective product formation process cannot be achieved, affecting the utilization of food resources and food safety.
Combining fingerprint map and finite element analysis, through feature extraction, dimensionality reduction, cross-modal mutual information analysis and feature sparseness evaluation, a knowledge map of grain quality is constructed to realize intelligent detection and identification of grain residue defective products.
Systematically reveal the mechanism of residual grain formation, improve the accuracy and prediction capabilities of the detection model, realize early detection of grain quality changes and quality control throughout the process, reduce the dependence of manual intervention, and improve the intelligent level of grain storage and transportation management.
Smart Images

Figure CN120448799A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of grain quality detection, and more specifically, to a grain defective product detection method combining fingerprint spectrum and finite element analysis. Background Art
[0002] With the expansion and intensive development of grain storage and transportation systems, grain is subject to a variety of environmental factors during harvesting, storage, and transportation, which can easily lead to quality deterioration and the production of defective grain. The formation of defective grain not only affects the efficient utilization of grain resources but also poses food safety risks and threatens the sustainable development of the grain industry chain. How to effectively identify and control the production of defective grain has become a major technical challenge in grain storage and transportation management and quality control.
[0003] Existing grain quality detection methods mostly rely on single-modal detection technologies, such as chemical quality detection based on spectral component analysis, or appearance screening based on visual detection and image processing. The detection means are single and lack the ability to comprehensively analyze changes in the internal and external quality of grains. They are unable to fully reveal the dynamic correlation and coupling mechanism between different quality indicators, and are unable to achieve early detection and control of the defective product formation process. The detection results often lag behind the grain quality change process, resulting in delayed decision-making and increased risks. Therefore, the present invention proposes a method for detecting defective grains that combines fingerprint atlases with finite element analysis in order to solve the above problems. Summary of the Invention
[0004] To achieve the above object, the present invention provides the following technical solutions:
[0005] A method for detecting defective grains by combining fingerprint analysis with finite element analysis comprises the following steps:
[0006] Extracting fingerprint features to obtain a first feature set, and extracting finite element model features to obtain a second feature set;
[0007] Performing feature dimensionality reduction on the first feature set and the second feature set respectively, eliminating redundant variables, and obtaining the chemical modal feature set and the physical modal set;
[0008] Taking the defective grain grade as the target label, the mutual information between each feature in the chemical modal feature set and the target label is calculated, and the first layer of dimensionality reduction is performed to obtain the chemical modal vector. The mutual information between each feature in the physical modal feature set and the target label is calculated, and the first layer of dimensionality reduction is also performed to obtain the physical modal vector.
[0009] Under the condition that the target label is known, cross-modal mutual information analysis is performed to obtain a strongly dependent feature group. At the same time, feature sparsity evaluation and feature stability evaluation are performed. Based on the evaluation results, a method of automatically screening the key features of defective grain is selected and the strongly dependent feature group is processed. Finally, a grain quality knowledge graph with grain quality and physical-chemical indicators as core nodes is constructed for the detection of defective grain.
[0010] In a preferred embodiment, principal component analysis is used for feature dimensionality reduction.
[0011] In a preferred embodiment, the first level of dimensionality reduction refers to:
[0012] A standard threshold is set, and the mutual information between each feature in the chemical modal feature set and the target label, as well as the mutual information between each feature in the physical modal feature set and the target label, are compared with the standard threshold respectively. Features below the standard threshold are eliminated, and features not below the standard threshold are retained.
[0013] In a preferred embodiment, performing cross-modal mutual information analysis refers to:
[0014] The mutual information value between each feature in the chemical modal vector and each feature in the physical modal vector is calculated to form an nchem×nphys MI matrix, where nchem and nphys refer to the number of features in the chemical modal vector and the physical modal vector, respectively. Then, the feature pairs corresponding to the MI values exceeding the preset percentile values are identified and retained to obtain a strongly dependent feature group.
[0015] In a preferred embodiment, the evaluation result refers to:
[0016] The feature sparsity index obtained by feature sparsity evaluation and the feature stability index obtained by feature stability evaluation are performed.
[0017] In a preferred embodiment, the method of automatically screening the key features of defective grains is:
[0018] Fuzzy logic is used to infer the key features of automatic screening of defective grain based on feature sparsity index and feature stability index.
[0019] In a preferred embodiment, the method of automatically screening the key characteristics of defective grain includes:
[0020] L1 regularization feature screening method and recursive feature elimination feature screening method.
[0021] In a preferred embodiment, the logic for obtaining the feature sparsity index is:
[0022] From the set of chemical and physical modal features retained after the initial mutual information screening, identify the features whose mutual information value with the target label is lower than the average mutual information value of all features and record them as low-importance features;
[0023] Count the number of all low-importance features as the total number of invalid or weakly relevant features in the current feature set, and at the same time obtain the number of all retained features as the total number of features for this round of feature evaluation;
[0024] Calculate the degree of dispersion of the mutual information values of all currently retained features among different features, and measure the overall information volatility in the form of standard deviation, which is used as an important parameter to measure the uniformity of feature importance distribution;
[0025] The ratio between the number of low-importance features and the total number of features is nonlinearly enhanced to highlight the impact of the proportion of redundant features on the model quality. At the same time, the mutual information volatility parameter is introduced into the calculation system to comprehensively reflect the impact of feature contribution differences on the selection of feature screening strategies. The two are multiplied together to form the final sparsity index. In the calculation process, in order to adapt to different model requirements and feature structure differences, two constant factors for adjusting sensitivity are set to control the amplification weights of the redundant ratio and volatility respectively.
[0026] In a preferred embodiment, the logic for obtaining the characteristic stability index is:
[0027] From the chemical mode and physical mode feature sets that have been screened by mutual information, conduct multiple cross-validations or use different data partitioning strategies to perform repeated feature screening, and record all the features that are retained in the final feature set in each screening;
[0028] Count the number of features that are always retained in all screening rounds as the "stable selected features", that is, the core features that have always had discriminative ability in all repeated experiments; at the same time, calculate the average number of features selected in each screening process as the "total selected features";
[0029] For features that are stably selected, the importance scores corresponding to them in multiple screenings are counted respectively, and the ratio between the standard deviation of these scores and the average value is calculated as the "score variation ratio" to measure the degree of fluctuation of feature importance;
[0030] The ratio between the "number of stable selected features" and the "total number of selected features" is used as the first indicator, indicating the degree of consistency of the repeated selection of features under multiple experimental conditions; at the same time, "one minus the score variation ratio multiplied by the fluctuation adjustment factor" is used as the second indicator. The two parts are multiplied together to obtain the final feature stability index, and an exponential enhancement factor is set in the calculation process to adjust the response intensity of the stability index to the proportional part.
[0031] Technical effects and advantages of the present invention:
[0032] This invention systematically integrates chemical and physical structure information of grain quality for the first time, breaking through the traditional single detection model and comprehensively revealing the formation mechanism and dynamic evolution of defective grain throughout the entire process of storage and transportation. Through cross-modal mutual information analysis, it accurately captures the dependency and coupling relationship between chemical and physical modal characteristics, achieves a systematic analysis of the linkage effects between different influencing factors, and clarifies the internal and external causal chains of defective product formation. This effectively compensates for the shortcomings of existing technologies in the "information islands" and "data gaps" in the defective grain formation process, significantly improving the interpretability and predictive capabilities of grain quality changes.
[0033] The present invention dynamically determines the automatic feature screening method through feature sparsity assessment and feature stability assessment, ensuring that the key features screened out have high relevance and high stability, thereby improving the generalization ability and robustness of the detection model, i.e., the grain quality knowledge graph. A fuzzy logic decision-making mechanism is adopted to automatically select a regularization method based on sparsity optimization or a recursive feature elimination method to ensure that the model can achieve adaptive optimization in different grain quality data environments. Dimensionality reduction and optimization of high-dimensional complex feature data are achieved, the computational complexity of the detection system is reduced, the efficiency of model training and reasoning is improved, the response speed of grain defective product detection is accelerated, and the detection needs in large-scale grain storage and transportation scenarios are met.
[0034] This invention utilizes a multimodal information fusion method combining fingerprint and finite element analysis, combined with mutual information analysis and dynamic feature screening algorithms, to construct an automated mechanism for detecting and identifying defective grains, reducing reliance on manual intervention and empirical judgment. By constructing a knowledge graph with grain quality and physical and chemical indicators as core nodes, it systematically expresses the evolution of grain quality and the paths by which defective grains are formed, thus realizing the knowledge-driven and intelligent reasoning capabilities of the defective grain detection system. The knowledge graph supports automated operations throughout the entire process of data input, causal analysis, and defect grade determination, significantly improving the intelligence level of grain quality monitoring and business processing efficiency. By constructing high-value nodes and highly dependent paths within the knowledge graph, dynamic grain quality detection and early detection of defective grains are achieved, enabling full-process quality control of grain storage and transportation. Based on the weights of different nodes and paths within the knowledge graph, the main influencing factors of defective grain formation are analyzed, providing a scientific decision-making basis for grain storage and transportation management, reducing the proportion of defective grain, minimizing grain losses, and improving the quality assurance level of the grain industry chain. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to facilitate understanding by those skilled in the art, the present invention will be further described below with reference to the accompanying drawings;
[0036] Figure 1 This is a schematic diagram of a method for detecting defective grains that combines fingerprints with finite element analysis in the present invention.
[0037] Figure 2 This is the experimental data diagram of the recursive feature screening in the present invention.
[0038] Figure 3 This is a comparison chart of the model accuracy before and after recursive screening in the present invention. DETAILED DESCRIPTION
[0039] The following will provide a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0040] Reference Figure 1-Figure 3 The following examples were obtained:
[0041] Example 1:
[0042] Food security is an increasing concern in my country and around the world. During the post-harvest stages of harvesting, storage, and transportation of major grains like wheat, rice, corn, and soybeans, complex environmental factors and imperfect technologies can lead to deterioration in grain quality, resulting in defective grains (such as moldy, insect-infested, damaged, and spoiled grains). These defective grains not only reduce food utilization efficiency but can also pose food safety risks and economic losses. Current issues include:
[0043] Single-technology testing and limited information: Existing grain quality testing methods mostly rely on sensory testing and single physical and chemical indicators. These traditional methods have low accuracy and are unable to conduct a comprehensive, multi-dimensional analysis of the mechanisms that cause defective grains. Isolated data and uncoordinated models: Current testing systems are unable to integrate cross-modal analysis of chemical quality information (such as changes in nutrient content) and physical structure information (such as grain deformation and crack growth).
[0044] This paper addresses the shortcomings of existing grain defect detection technologies and proposes a method for detecting defective grains that combines fingerprint analysis with finite element analysis. This method accurately identifies and dynamically analyzes the formation process of defective grains. The objectives are to: Reveal the patterns of defective grain formation: Through multimodal information analysis (chemistry and physics), systematically elucidate the mechanisms of grain quality deterioration under different environmental conditions, filling a gap in theoretical research on grain storage and transportation quality control. Construct a dynamic model of defective grain quality: A kinetic model of the formation process of different defective grains is established to clarify the causal relationship between "quality indicators and defective product status," thereby facilitating scientific grain management.
[0045] Improve the intelligent detection capabilities of grain quality: Use fingerprint mapping and finite element analysis, integrate multi-dimensional features, break through the limitations of traditional detection methods, and achieve intelligent and automated identification of grain quality deterioration.
[0046] Provide technical support for the precise control of defective grain: Through knowledge graphs, provide decision-making basis for grain warehouse management, transportation scheduling, storage control, etc., reduce grain loss and ensure food security.
[0047] Promote the intelligent upgrading of the grain industry chain; promote the transformation of grain storage and transportation links towards intelligence, digitalization and refinement, and drive the industrial development of related equipment and software systems.
[0048] The present invention proposes a method for detecting defective grains by combining fingerprint analysis with finite element analysis, comprising the following steps:
[0049] Fingerprint features are extracted to obtain the first feature set, and finite element model features are extracted to obtain the second feature set. Grain samples (such as wheat, rice, corn, and soybeans) are tested using fingerprint techniques (such as infrared spectroscopy, mass spectrometry, and fingerprinting) to obtain information on their chemical composition (such as moisture, starch, protein, fat, and cellulose), as well as the distribution characteristics of metabolites produced under different storage and transportation conditions. This first feature set, Xchem, contains a large amount of chemical characteristic data describing changes in grain quality. This provides a detailed chemical basis for analyzing the formation mechanisms of defective grain and captures the compositional fluctuations during grain deterioration. Fingerprints can reveal the chemical trajectory of grain evolution from "high-quality" to "defective," making them an essential prerequisite for analyzing the formation of defective grain.
[0050] Based on finite element analysis (FEA), a physical structure model of grain particles is constructed to simulate their stress behavior, crack generation and expansion, internal damage and deformation under different storage and transportation conditions. The finite element simulation output data is extracted to form the second feature set Xphys, including physical and mechanical parameters such as stress distribution, crack initiation and expansion rate, breakage probability, and displacement. This reveals the physical change laws during the production of defective grains and provides a basis for understanding the damage mode of grains during transportation and stacking. Physical characteristics are an important source of characterization of defective grain breakage and structural degradation, and are the key to determining the degree of deterioration.
[0051] Feature dimensionality reduction was performed on the first and second feature sets, eliminating redundant variables to obtain the chemical modal feature set and the physical modal feature set. Principal component analysis (PCA) dimensionality reduction was applied to the first feature set, Xchem, and the second feature set, Xphys, respectively, eliminating redundant, highly correlated, or noisy feature variables, compressing the data dimensions while retaining the key features that best represent the data structure and trend. Ultimately, two modal feature subsets were formed, designated the chemical modal feature set and the physical modal feature set. This step reduces data complexity, improves the efficiency and accuracy of subsequent analysis, avoids the "curse of dimensionality," eliminates irrelevant variables, highlights the essential characteristics of grain quality changes, and improves model robustness. This step prepares effective features at the "single modality" level, ensuring more accurate feature evaluation in the next step.
[0052] Taking the defective grain grade as the target label, the mutual information between each feature in the chemical modal feature set and the target label is calculated, and the first layer of dimensionality reduction is performed to obtain the chemical modal vector. The mutual information between each feature in the physical modal feature set and the target label is calculated, and the first layer of dimensionality reduction is also performed to obtain the physical modal vector. The mutual information (MI) value of each feature in the two modal feature sets (chemical and physical) and the target label (defective grain grade) is calculated respectively. By setting a standard threshold (such as the MI average or a specific quantile), the features with mutual information values higher than the threshold are screened, and variables with no contribution or weak contribution to the target are eliminated. Finally, two optimized feature vectors are formed: the chemical modal vector and the physical modal vector. The core features that have the greatest impact on the prediction of defective grain grading are accurately identified, further improving the data validity, laying a solid single-modal optimization foundation for subsequent cross-modal analysis, reducing the impact of invalid features, improving the analysis accuracy, and ensuring that the subsequent "cross-modal mutual information analysis" is carried out between the most valuable feature sets.
[0053] Under the condition that the target label is known, cross-modal mutual information analysis is performed to obtain a strongly dependent feature group. At the same time, feature sparsity evaluation and feature stability evaluation are performed. Based on the evaluation results, a method of automatically screening the key features of defective grain is selected and the strongly dependent feature group is processed. Finally, a grain quality knowledge graph with grain quality and physical-chemical indicators as core nodes is constructed for the detection of defective grain.
[0054] The mutual information value between each feature in the chemical modal vector and the physical modal vector is calculated to form an nchem×nphys MI matrix. Under the condition that the target label is known, the strong dependence combination between the two types of features is identified, and the feature pairs exceeding the preset percentile (such as 95%) are sorted in descending order according to the mutual information value to form a strong dependence feature group. The potential coupling mechanism between chemical features and physical features, such as how chemical degradation affects physical damage, is revealed, forming the basis for multimodal data fusion, and providing high-value data input for further comprehensive analysis of the dynamic mechanism of the formation of defective grain products. The strong dependence feature group is the key basis for constructing a joint model, namely the knowledge graph.
[0055] For strongly dependent feature groups, feature sparsity assessment (calculation of the sparsity index) and feature stability assessment (calculation of the stability index) are performed. Sparsity assessment is based on the distribution and volatility analysis of mutual information values, while stability assessment is based on the consistent performance of features across different data partitions and cross-validation. Sparsity assessment identifies sparse feature data distribution and the proportion of invalid features, guiding the type of optimization algorithm to be used. Stability assessment ensures that the selected features remain robust under different scenarios and data sampling conditions, avoiding overfitting or unstable factors. This provides a quantitative basis for the subsequent selection of automatic feature screening algorithms, ensuring the scientific nature and dynamic adaptability of the screening strategy.
[0056] Using fuzzy logic reasoning, we select an automatic feature selection method based on the sparsity index and stability index: high sparsity and low stability → L1 regularization (LASSO); low sparsity and high stability → recursive feature elimination (RFE). We further automatically select and optimize groups of highly dependent features. This enables dynamic intelligent decision-making for feature selection methods, adapting to different data structures and distributions, improving selection effectiveness, and ensuring that the features input to the model are efficient, concise, highly interpretable, and stable. This reduces reliance on human decision-making and enhances the automation and intelligence of the analysis system.
[0057] Based on the strongly dependent feature group and the features after automatic screening and optimization, a grain quality knowledge graph is constructed. The knowledge graph nodes cover grain quality indicators, chemical composition, physical structure characteristics, defective product grades and other information. The edges represent the causal relationship and influence mechanism between features. The knowledge graph is used to identify, classify and monitor the quality of defective grain, realizing the transition of defective grain detection from single parameter detection to comprehensive analysis of multi-source information. The knowledge graph provides knowledge support for intelligent decision-making systems, realizes dynamic early warning, quality control and traceability analysis, promotes intelligent management of grain storage and transportation, and improves food security capabilities and storage and transportation efficiency.
[0058] Principal component analysis is used for feature dimensionality reduction. Taking the first feature set, i.e., fingerprint data, as an example, in this invention, the first feature set comprises multiple grain chemical composition features extracted using fingerprinting techniques (such as infrared spectroscopy and mass spectrometry). For example, moisture content, protein content, starch content, fat content, cellulose content, and characteristic peaks of other metabolites constitute the "raw indicators" in the fingerprint.
[0059] Sample data standardization: Each feature collected from the fingerprint spectrum needs to be standardized due to different scales (for example, moisture expressed as a percentage, protein expressed in milligrams per gram). Standardization eliminates the impact of different units and scales, ensuring that each feature participates in the calculation under the same conditions. After processing, the data for each indicator is concentrated to the same order of magnitude, facilitating subsequent analysis.
[0060] Obtaining correlation: Analyze whether there is a correlation between each indicator in the first feature set. For example, if it is found that the moisture content and starch content have similar changing trends in different samples, there is a high correlation between them. At this time, the correlation analysis method in the existing technology can be used to know which indicators have redundant information.
[0061] Determining the principal component directions: After analyzing the correlations between indicators, mathematical methods are used to identify the directions that describe the greatest data variance. Each such direction represents a new composite indicator, known as a "principal component." The first principal component represents the most informative composite indicator in the data and can explain the vast majority of data variation. Building on the first, the second principal component continues to describe minor information in the remaining data, and so on.
[0062] Obtain the contribution of the principal components: Each principal component has an "explanatory power ratio" for how much information it can explain about the original data. For example, the first principal component may explain 50% of the overall variation in the data, the second principal component another 30%, and the third principal component 10%. Based on the size of the contribution, decide how many principal components to retain. Usually, the principal components with a cumulative explanation rate of more than 85% are selected.
[0063] Forming new comprehensive features: The original multiple indicators are recombined according to the direction of the principal components to form a new set of comprehensive features. For example, principal component one may combine the changes in moisture, starch, and protein; principal component two may combine the changes in fat and cellulose. These two principal components can roughly describe the main information of grain quality.
[0064] Screening for effective features and eliminating redundant variables: Based on principal component contributions and actual business needs, the most representative principal components are selected for subsequent analysis. Indicators with low weights that are grouped within the principal components can be eliminated to avoid interference from redundant data. The resulting chemical modal feature set, derived from principal component analysis, serves as crucial input for subsequent modeling.
[0065] Significance of the analysis results: Through the principal component analysis method, a large amount of original feature data in the first feature set was streamlined into a few representative information comprehensive indicators, which reduced the complexity of model calculation, eliminated redundancy and noise in the data, ensured the efficiency and effectiveness of data input, and laid a data foundation for cross-modal analysis and modeling of the formation patterns of defective grain.
[0066] Suppose the following grain indicators are extracted from a fingerprint: moisture content, protein content, starch content, fat content, and cellulose content. Principal component analysis reveals that principal component 1, which contains comprehensive information about the three main indicators (moisture, starch, and protein), explains 60% of the total information; principal component 2, which contains information about fat and cellulose, explains 25% of the total information; and principal components 3 and beyond explain less information and can be ignored. Therefore, retaining only principal components 1 and 2 can represent 85% of the original feature information. These two principal components serve as the final input features for the "chemical modal vector."
[0067] The second feature set is derived from finite element model simulation analysis of grain particles. Finite element simulations of grain particles (such as wheat, rice, corn, and soybeans) under various storage, transportation, and stacking conditions yield a wealth of physical response characteristic data. These include, but are not limited to, maximum stress, maximum strain, crack initiation time, crack growth rate, particle displacement, damage energy accumulation, and breakage probability, constituting the second feature set (physical modal characteristics).
[0068] An example to illustrate the steps of principal component analysis:
[0069] Standardization: Convert the characteristic values of different dimensions into dimensionless standard values (for example, the mean is 0 and the standard deviation is 1).
[0070] Correlation matrix was constructed: it was found that the maximum stress, crack growth rate, and crushing probability were highly correlated, while the particle displacement and crack initiation time were weakly correlated.
[0071] Extract principal components: The first principal component integrates "maximum stress + crack growth rate + crushing probability + damage energy" to describe the overall damage trend, and the second principal component integrates "grain displacement + crack initiation time" to describe the influence of the initial physical state.
[0072] Contribution rate is obtained: the first principal component explains 60% of the total information, the second principal component explains 30% of the total information, and the cumulative explanation rate is 90%, which meets the analysis requirements.
[0073] New feature formation: The original seven physical features are simplified into two principal component comprehensive features. Subsequent analysis and modeling only need to consider these two principal components instead of all the original variables.
[0074] The first level of dimensionality reduction refers to:
[0075] A standard threshold is set, and the mutual information between each feature in the chemical modal feature set and the target label, as well as the mutual information between each feature in the physical modal feature set and the target label, are compared with the standard threshold respectively. Features below the standard threshold are eliminated, and features not below the standard threshold are retained.
[0076] During the detection and analysis of defective grain products, the system acquires a large number of data features from different modalities, including: chemical modal feature sets (from fingerprint technology), which reflect the changes in moisture, starch, protein, fat and other components in grains. Physical modal feature sets (from finite element analysis technology) reflect the stress conditions, crack propagation, breakage probability and other state information of the physical structure of grain particles during storage and transportation. Due to the large amount of these feature data, some feature information is bound to be redundant, noisy or weakly related to the determination of defective grain products. Therefore, it is necessary to effectively screen these data to retain important features that are meaningful for analysis. The first-level dimensionality reduction is based on this demand and is designed as a key step for screening internal features of a single modality. The specific method of the first-level dimensionality reduction is as follows:
[0077] Step 1: Use grain defect grade as the target label: Grain samples are first graded to determine their quality status, such as high-quality grain, slightly defective grain, moderately defective grain, and severely defective grain. This grade is considered the target of classification or prediction, and is used to determine the closeness of the relationship between each feature and it.
[0078] Step 2: Calculate the information dependency between each feature and the target label: Analyze the impact of each feature on the grain defectiveness grade. Using information theory methods (such as information gain or mutual information calculations), quantify the correlation between each feature and the defectiveness grade. The results are reflected in the "information value" corresponding to each feature. A higher value indicates a closer relationship between the feature and the target label, while a lower value indicates a smaller impact on determining grain grade.
[0079] Step 3: Set standard threshold: According to system requirements, a screening threshold is pre-set, usually determined based on the following method. This threshold serves as the standard for determining whether the feature is retained.
[0080] Method 1: Threshold setting based on the statistical distribution of mutual information values. Principle: Calculate the mutual information values between all features and the target label to form a mutual information sequence. Statistical methods are used to identify key locations in this sequence and determine the threshold. Specific steps: Calculate the mean and standard deviation of the mutual information sequence; set the threshold to the mean plus a preset multiple of the standard deviation, for example: threshold = mean + one standard deviation (moderate filtering); threshold = mean + two standard deviations (conservative retention); retain only features with mutual information values above the threshold. Advantages: Simple calculation, strong adaptability; dynamic adjustment of the standard deviation multiple to adjust retention strength.
[0081] Method 2: Setting a threshold based on the percentile method. Principle: Sort features by mutual information value and set a percentile as the filter threshold. Specific steps: Sort all features by mutual information value from high to low; select the value corresponding to, for example, the 80th (or 90th) percentile as the threshold; retain features with mutual information values above this value. Advantages: Easy to control the filtering ratio; particularly suitable for very high-dimensional feature sets.
[0082] Method 3: Based on the model performance feedback method. Principle: Observe the response of model performance to changes in the mutual information threshold through multiple experiments to find the optimal threshold. Specific steps: Set a set of candidate thresholds (such as the mean, the mean plus one standard deviation, the 80th percentile, etc.); at each threshold, train the model using the retained features and evaluate performance such as precision and recall; and select the threshold that achieves the best performance as the final screening criterion. Advantages: The threshold is highly consistent with the final model result; it is particularly suitable for tasks requiring high precision.
[0083] Method 4: Combining domain knowledge and expert ratings to set thresholds. Principle: Combine expert judgments on feature importance with mutual information values to comprehensively set thresholds. Specific steps: Domain experts score key metrics and provide feature priority recommendations. These scores are then compared with mutual information values to identify regions with high scores on both. Based on expert opinion, an appropriate retention threshold is set (e.g., retaining the top 30% of metrics with the highest correlation with the label). Advantages: Suitable for data with real-world business context; Enhances the interpretability between features and business metrics.
[0084] The above four methods are all commonly used and well-known threshold setting strategies in the prior art. In the implementation of the present invention, an appropriate method can be selected and used according to the different requirements of the task on accuracy, stability, and interpretability.
[0085] Step 4: Feature Screening: The information value of each feature in the chemical and physical modal feature sets is compared against a preset threshold. If the information value of a feature is lower than the threshold, it indicates that the feature has limited discriminative power and is removed. If the information value is higher than or equal to the threshold, it indicates that the feature has strong discriminative power and is retained.
[0086] Step 5: Output the first-level dimensionality reduction results: After completing the above screening process, two new feature sets are obtained: a chemical modal vector, which contains all key chemical composition features that passed the screening; and a physical modal vector, which contains all key physical structure features that passed the screening. These two feature sets will serve as the core input data for subsequent cross-modal analysis and model building.
[0087] The significance of the first-level dimensionality reduction: It removes irrelevant features and optimizes data structure. By eliminating features with weak correlations with grain defectiveness, data redundancy is reduced, data quality is improved, and invalid information interference is avoided, thereby enhancing the accuracy and efficiency of subsequent modeling and analysis. It also reduces computational complexity and improves system efficiency. By eliminating invalid or low-information features, data dimensionality is significantly reduced, reducing computing resources and improving analysis and processing speed. This approach is particularly suitable for processing large-scale and diverse grain testing data. It also enhances the system's generalization and robustness. After the first-level dimensionality reduction, the retained features are more representative, capable of reflecting the underlying patterns of grain quality variation and enhancing the analysis system's adaptability to diverse samples and environmental conditions. It also lays the foundation for cross-modal feature analysis. The first-level dimensionality reduction effectively compresses data dimensionality, ensuring that cross-modal feature mutual information analysis focuses on core features with rich information and clear meaning, thereby improving the scientificity and reliability of subsequent feature fusion and comprehensive analysis.
[0088] Performing cross-modal mutual information analysis means:
[0089] The mutual information value between each feature in the chemical modal vector and each feature in the physical modal vector is calculated to form an nchem×nphys MI matrix, where nchem and nphys refer to the number of features in the chemical modal vector and the physical modal vector, respectively. Then, the feature pairs corresponding to the MI values exceeding the preset percentile values are identified and retained to obtain a strongly dependent feature group.
[0090] The "cross-modality" in the present invention refers to data types from two different sources: chemical modal features and physical modal features: chemical modal features are derived from fingerprint technology, reflecting changes in the chemical composition of grain quality, such as fluctuations in the content of components such as moisture, starch, and protein. Physical modal features are derived from finite element model simulation analysis, reflecting the physical changes of grain particles during storage and transportation, such as stress conditions, crack formation, degree of breakage, etc. Since changes in grain quality are often caused by the combined effects of chemical and physical factors, analyzing the dependencies between different modal features will help reveal the mechanism of the formation of defective grain products.
[0091] Cross-modal mutual information analysis measures whether there is significant dependency or synergistic variation between features by calculating the degree of information correlation between them. A higher mutual information value indicates a stronger correlation between the two features, suggesting the existence of an underlying mechanism that may jointly influence changes in grain quality. The specific analysis steps are as follows:
[0092] Step 1: Determine input data: The input data consists of two feature sets after the first layer of dimensionality reduction: the chemical modal vector, which includes all chemical features retained by the screening, and the physical modal vector, which includes all physical features retained by the screening.
[0093] Step 2: Calculate the mutual information between different modal features: Each feature in the chemical modal vector is paired with each feature in the physical modal vector. Information theory analysis is performed between each pair of features, and their mutual information value is calculated. Mutual information measures the dependency between two different modal features, reflecting the degree of information sharing. For example, the mutual information between moisture content (a chemical feature) and crack growth rate (a physical feature) indicates whether moisture significantly affects the degree of grain breakage.
[0094] Step 3: Form the Mutual Information Matrix: Integrate the mutual information values of all paired features to form a matrix. Rows represent the serial numbers or names of chemical modal features; columns represent the serial numbers or names of physical modal features. Each element in the matrix corresponds to the mutual information value of a feature pair. This matrix comprehensively reflects the distribution of dependencies between all chemical and physical features.
[0095] Step 4: Identify strongly dependent feature combinations: Sort all mutual information values in the mutual information matrix, sorting from highest to lowest. Set a screening criterion, typically based on a percentile, such as selecting feature pairs with mutual information values in the top 5 percentile. All feature combinations above the pre-set percentile are considered to have significant dependencies and are retained. The resulting feature pairs form the strongly dependent feature group.
[0096] Step 5: Output strongly dependent feature groups: The retained strongly dependent feature groups contain both chemical modal features and physical modal features. These feature groups will play a key role in subsequent model training, analysis, and testing.
[0097] The analysis aims to: reveal synergistic effects between data from different modalities: By analyzing mutual information, we can identify synergistic patterns between chemical and physical changes. For example, detecting an increase in moisture may also lead to an increase in cracks. This synergistic relationship reveals a joint factor in the formation of defective grain. It also promotes effective data fusion: Strongly dependent feature pairs serve as key connections between different modalities, providing a reliable basis for subsequent data fusion and model construction. It also avoids information redundancy and the introduction of invalid data, improving the model's analytical capabilities and predictive accuracy. It also provides a scientific basis for the formation mechanism of defective grain: Strongly dependent feature pairs reveal the causal chain in the process of grain quality deterioration, clarifying the internal and external factors that contribute to the formation of defective grain. It also facilitates the construction of a dynamic model of defective grain formation, guiding quality management and risk control during grain storage and transportation. It also improves the accuracy and efficiency of the defective grain detection system: By selecting feature combinations with high mutual information, the number of features can be reduced, improving the efficiency of the detection system. This ensures that all retained features have a high explanatory power for grain quality assessment, thereby enhancing the overall performance of the intelligent defective grain detection system.
[0098] The evaluation results refer to the feature sparsity index obtained from the feature sparsity evaluation and the feature stability index obtained from the feature stability evaluation. The method for automatically selecting key features for defective grain screening involves using fuzzy logic to infer key features for automatic defective grain screening based on the feature sparsity index and feature stability index. Methods for automatically selecting key features for defective grain screening include the L1 regularization feature selection method and the recursive feature elimination feature selection method.
[0099] The logic for obtaining the feature sparsity index is:
[0100] From the chemical modal vectors and physical modal vectors obtained after the preliminary mutual information screening, the number of features judged to be of “low importance” is obtained and recorded as , “low importance” refers to features with MI values lower than the average value, and the total number of features in the chemical mode vector and the physical mode vector is obtained and recorded as , and the standard deviation of the MI values corresponding to each feature in the chemical mode vector and the physical mode vector are recorded as , and then substitute into the following formula:
[0101] ;
[0102] represents the preset sparsity sensitivity factor, represents the preset mutual information fluctuation factor, Represents the feature sparsity index.
[0103] In the actual process of detecting defective grain, cross-modal feature data comes from multiple sources and is high in dimensionality, but only a subset of these features actually contribute to the identification results. To avoid the computational burden and reduced model performance caused by "feature redundancy," a quantitative metric is needed to assess the sparsity of the feature set. This metric can then be used to determine whether to employ algorithms that favor sparsity (such as L1 regularization). The proportion of low-importance features is used to assess redundancy, the mutual information volatility is used to measure feature uncertainty, and the sparsity sensitivity factor is used to adjust sensitivity and algorithm adaptability. The number of low-importance features—features that have little impact on defective grain identification and may even serve as model interference—refers to the total number of features in the cross-modal feature set and serves as the denominator for calculating the proportion of low-importance features. A higher ratio indicates more redundant data and greater sparsity. The mutual information standard deviation (mutual information volatility) refers to the standard deviation of the mutual information values between all retained features and the target label. Greater volatility indicates unstable feature importance, while a high standard deviation indicates greater data uncertainty, necessitating increased sensitivity to sparse features. The sparsity sensitivity factor is used to control the responsiveness of the sparsity index to the proportion of low-importance features. When it is large (greater than 1), it amplifies the influence of the proportion of low-importance features, making the model more sensitive to sparsity and tending to activate a stronger sparsity feature screening mechanism (such as L1 regularization). The mutual information fluctuation factor is used to measure and adjust the impact of mutual information fluctuation. When the value is large, the change in the mutual information standard deviation exacerbates the impact of the final sparsity index, making the model more sensitive to the instability of feature information. The sparsity index (FSI) is the final output of the formula, representing the sparsity level of the current feature set. Higher values indicate greater feature redundancy and instability, and automatic screening methods with strong sparsity (such as L1 regularization) are recommended. Lower values indicate dense and stable feature distribution, and recursive feature elimination, a step-by-step refinement screening method, is recommended.
[0104] The logic for obtaining the characteristic stability index is:
[0105] From the chemical modal vector and physical modal vector obtained after preliminary mutual information screening, the number of features that are always selected into the chemical modal vector and physical modal vector under multiple cross-validations or different data partitioning is obtained and recorded as , the average of the total number of features selected in all screenings is recorded as , the ratio of the standard deviation of the sum of the feature weights to the mean of the features that are always selected into the chemical mode vector and the physical mode vector in all screenings is recorded as , and then substitute into the following formula:
[0106] ;
[0107] Indicates the preset stability enhancement factor, Indicates the preset characteristic change fluctuation factor, Represents the characteristic stability index.
[0108] The feature stability index is a comprehensive indicator that measures the consistency and reliability of a feature in the results under different data partitioning, different sample training or multiple cross-validation conditions. In the grain defective product detection method, the source of cross-modal feature data is complex, and the sample data is diverse and non-stationary. Therefore, the feature sets obtained from different batches and under different conditions often result in inconsistent screening results, which will affect the generalization ability and robustness of the subsequent model. In order to scientifically evaluate the reliability and stability of feature screening results, the present invention constructs a feature stability index to dynamically reflect the consistency and stability in the feature selection process, and guide the selection of automatic feature screening algorithms. The feature stability index determines whether the cross-modal feature has stable representativeness under different sample conditions, avoids the model from relying on features with large fluctuations and instability, improves the generalization ability of the detection model, and serves as one of the important inputs of fuzzy logic rules to determine which automatic screening method to adopt.
[0109] The number of stable selected features refers to the number of features that are always screened into the chemical modal vector and the physical modal vector under multiple cross-validations or different data partitioning. The larger the number, the more stable the feature is under different conditions and the more reliable it is. The average of the total number of features selected in all screenings refers to the average number of features selected in each feature screening. It is a sample number basis and is used as a denominator to measure the proportion of "stable selected features", reflecting the level of feature consistency and the coefficient of variation of feature weights. This value represents the degree of fluctuation in a feature's weight across multiple screening processes. Greater fluctuation indicates instability under different conditions, potentially leading to pseudo-important features caused by data perturbations. Smaller fluctuations indicate consistent importance scores across different experiments, indicating greater reliability. Mathematically, it is the ratio of the standard deviation to the mean of the sum of the feature weights for features consistently selected in the chemical and physical modal vectors across all screenings. The mutual information value reflects the degree of information dependence between a feature and the target label (e.g., defective grain grade). The stronger the information dependence, the greater the feature's importance in the model. The mutual information value can be used directly as the feature weight or, after a simple transformation (normalization), as the weight score.
[0110] Stability Enhancement Factor Used to control the sensitivity of the formula to the "stable selected feature ratio", Larger values emphasize "high stability features," further amplifying their impact on the overall index. The Feature Change Volatility Factor controls the formula's sensitivity to feature weight volatility. Larger values emphasize stability, while greater volatility leads to a significant decrease in the index. The Feature Stability Index is a comprehensive, final output that quantitatively evaluates the overall stability of a feature set. Higher values indicate a stable feature set under varying conditions, indicating strong reliability.
[0111] The feature sparsity index measures the proportion of invalid or low-contribution features in the current feature dataset. When a dataset contains a large number of features that have limited utility in identifying defective grain grades, these features are considered sparse. A higher sparsity index indicates a greater amount of irrelevant information in the feature data, resulting in a sparse and dispersed data state. This index serves as an important basis for determining the need for efficient feature compression screening methods. High sparsity can easily lead to increased model complexity, decreased computational efficiency, and reduced result stability. Therefore, effective means must be used to compress the feature space and eliminate redundant and interfering information.
[0112] The feature stability index measures the consistency of a feature across different sample groupings, data partitioning, or cross-validation processes. If a feature consistently demonstrates good classification and recognition capabilities across different scenarios and is frequently selected, it indicates strong feature stability. A higher stability index indicates that the feature maintains consistency and reliability across different data distributions and model training conditions. Highly stable features improve model generalization and reduce recognition errors caused by data fluctuations.
[0113] Steps and principles of fuzzy logic:
[0114] Background of Fuzzy Logic Reasoning: During grain defect detection, the values of the Feature Sparsity Index and Feature Stability Index are not simply "high" or "low"; they exhibit both continuity and fuzziness. Therefore, using fuzzy logic to comprehensively evaluate these two indices enables a more scientific and dynamic decision-making process for automated screening.
[0115] Fuzzy logic reasoning steps:
[0116] The first step is input fuzzification: The feature sparsity index and feature stability index are used as input variables and are divided into multiple fuzzy levels: the sparsity index is divided into "low sparseness", "medium sparseness", and "high sparseness", and the stability index is divided into "low stability", "medium stability", and "high stability". These levels are quantified using membership functions. The membership function is defined using triangular membership functions, which are symmetrical and easy to calculate and interpret.
[0117] Step 2. Trigonometric function definition of membership function: Trigonometric membership function is a basic membership function in the form of: the function graph presents a "peak" shape, the membership is the maximum value at the middle point, and gradually decreases to the left and right. The function is determined by three points, namely the starting point, the peak point, and the end point. For each input value, the corresponding membership value is calculated according to its position in the trigonometric function interval. The membership value indicates the degree to which the input belongs to a certain level, and the value range is from zero to one. For example: if the sparsity index is a certain value, the value is at the peak position of the "medium sparse" membership function, and the membership is one; if the value deviates from the peak position, the membership decreases linearly.
[0118] Step 3: Rule Base Design: A fuzzy rule base is designed based on different combinations of sparsity and stability indices. For example, if sparsity is high and stability is low, the first screening method (i.e., regularization) is selected. If sparsity is low and stability is high, the second screening method (i.e., recursive screening) is selected. If sparsity is medium and stability is medium, a hybrid strategy or a biased regularization method can be used.
[0119] Step 4: Fuzzy Inference Calculation: A comprehensive calculation is performed based on the membership corresponding to the input values and the pre-set fuzzy rules. The output is synthesized using the maximum membership principle or weighted average method. The inference process is equivalent to selecting the conclusion with the highest degree of conformity from different fuzzy conditions.
[0120] Step 5: Output Defuzzification: Convert the fuzzy inference results into clear decision outputs, clarifying which automated screening method to choose. For example: If the output is "biased toward regularization," then perform regularized screening. If the output is "biased toward recursive screening," then perform recursive feature screening. If the two are close, consider weighing the pros and cons of regularization, and then fine-tune using recursion.
[0121] Regularized filtering methods offer powerful sparsity handling capabilities, automatically compressing the coefficients of less important features to zero, effectively compressing the feature space. A high feature sparsity index indicates a high proportion of invalid information within the features. Regularization methods can quickly filter out irrelevant variables, improving model efficiency and stability. Regularization methods offer fast computational speed and are suitable for large-scale data processing, particularly in high-dimensional, sparse data environments.
[0122] Recursive feature screening methods repeatedly train and evaluate the model, gradually eliminating less influential features while retaining those that contribute most to the target prediction. A high feature stability index indicates that the feature performs consistently across different samples and models, making it suitable for refined screening methods to further optimize model performance. Recursive screening methods can fully leverage the discriminative power of stable features, improving the interpretability and accuracy of the final model.
[0123] In the implementation of the present invention, the experimental process of the recursive feature screening method is as follows: First, a preliminary candidate feature set is determined from the modal feature set after mutual information screening and principal component dimensionality reduction. This set, derived from chemical modalities extracted from fingerprints and physical modalities extracted from finite element analysis, represents all currently available variables for discriminating defective grain grades. Next, to evaluate the feature stability index, the present invention employs a multi-round evaluation mechanism based on cross-validation. Specifically, a five-fold cross-partitioning method is used to randomly divide the total dataset into five parts, with four parts used as training sets and one part used as validation sets for a total of five rounds. In each round, whether each feature is retained by a feature selector (such as a mutual information filter or an L1 regularization selector) is recorded, and features selected for inclusion in the model are assigned an importance score. For each feature, the number of times it was selected across all rounds divided by the total number of rounds is used to determine its frequency of selection. The standard deviation and mean score of each feature across different rounds are also calculated to calculate the degree of variation in its importance. Based on this, the threshold for the feature stability index is set to 0.75. That is, when a feature's selection frequency is greater than or equal to 75% and its score variation is less than 80% of the average level, it is considered a stable feature. When the number of stable features in the entire candidate feature set exceeds 50%, the overall feature stability index is considered high.
[0124] When the feature stability index is high, the recursive feature elimination algorithm is started. The operation steps are as follows: Initial training: Use all stable features to train the classification model and calculate the overall performance indicators, such as accuracy and F1 value. Feature scoring: Use the feature importance calculation method within the model (such as the Gini coefficient based on the tree model or the weight coefficient based on the support vector machine) to sort the current features. Feature elimination: Eliminate one or two features with the lowest scores in each round, and record the model performance. Convergence judgment: If the model performance does not improve significantly after three consecutive rounds of elimination, or shows a downward trend, stop screening and retain the feature set of the previous round as the final core feature set.
[0125] During the experiment, five sets of data sets under different modalities (including different batches of wheat, rice, corn, and soybean samples) were used, corresponding to samples A to E, and compared and verified on the training set and test set. Figure 2 Recursive feature screening experimental data in , and Figure 3The figure shows a comparison of model accuracy before and after recursive filtering. The y-axis represents model accuracy, and the x-axis represents the corresponding groups before and after recursion. The recursive feature filtering experimental data and the corresponding graph reveal the following key information: Stability Verification: Across the five different experimental sample groups, the number of stable features ultimately selected was essentially consistent (between 30 and 40), demonstrating the good stability and repeatability of feature filtering. Accuracy Improvement: After using recursive feature filtering, model accuracy significantly improved across all samples, with an average improvement exceeding 4%. False Positive Rate Reduction: After recursive filtering, the false positive rate significantly decreased, demonstrating that this method effectively eliminated non-discriminative spurious features. Each experimental group showed a significant increase in accuracy after using recursive filtering, with the improvement ranging from approximately 3% to 5%. Experiments B and E exhibited the highest subsequent accuracy, exceeding 90%. The graph visually confirms that the feature filtering strategy positively promotes model performance. This demonstrates that the recursive filtering strategy based on the feature stability index employed in this invention is highly adaptable and repeatable across different samples and experimental conditions.
[0126] By introducing a fuzzy logic system, the feature quality of the analysis object is dynamically evaluated based on the feature sparsity index and feature stability index, and the most appropriate automatic feature screening method is selected scientifically and reasonably: this can not only ensure the high efficiency of data compression and model training, but also ensure that the defective grain detection model has excellent generalization ability and robustness, ultimately significantly improving the accuracy and practicality of the grain defective product detection system.
[0127] The method presented here uses cross-modal mutual information analysis and feature screening to identify key features of defective grains with high reliability and stability. These features, which encompass both chemical indicators and physical structure information of grain quality, form a core feature system that describes changes in grain quality and the patterns of defective grain formation.
[0128] To achieve systematic and structured management of grain defect detection, it is necessary to construct a grain quality knowledge graph based on the above characteristics. This knowledge graph can reveal the inherent connections and mechanisms between different quality characteristics, supporting the intelligent detection and classification of grain defectives.
[0129] Specific steps for building a knowledge graph:
[0130] Determine the core nodes: The core nodes are the most basic components in the knowledge graph and are used to represent key entities related to grain quality. The core nodes in the present invention are divided into three categories: Grain quality index nodes: including chemical composition information such as moisture, starch, protein, fat, cellulose, and mineral elements. Grain physical structure index nodes: including physical characteristics such as crack length, crack propagation rate, particle displacement, stress concentration coefficient, and breakage probability. Grain quality status nodes: including quality grades such as high-quality grain, slightly defective grain, moderately defective grain, and severely defective grain.
[0131] Define node attributes: Each node defines different attribute information based on its characteristic content. Grain quality indicator node attributes include test values, fluctuation ranges, and change trends. Physical structure indicator node attributes include simulation results and damage assessment values. Quality status node attributes include classification standards, reference grade descriptions, and test labels.
[0132] Establishing association edges between nodes: Establishing association relationships between nodes. Relationship types include: Causal relationships: For example, increased moisture leads to faster crack propagation. Interaction relationships: For example, the coupling relationship between changes in starch content and breakage probability. Conditional dependency relationships: For example, under high temperature and high humidity conditions, excessive moisture is a key factor that leads to deterioration in grain quality.
[0133] Determining Relationship Strength and Weight: Each associated edge is assigned a weight based on the results of cross-modal mutual information analysis and feature stability assessment using an expert-assigned method to reflect the degree of influence between different indicators. A larger weight indicates a more significant impact of the relationship on grain quality. This strengthens the connections between high-value nodes in the knowledge graph and highlights important information.
[0134] Forming a knowledge graph network structure: All nodes and edges are structured and combined to form a complete knowledge graph network. The knowledge graph as a whole presents a tree or mesh structure, with different nodes organized into hierarchical and categorized groups based on their relationships, forming a clearly structured and compact graph system.
[0135] Knowledge Graph Visualization: This graphically displays the knowledge graph network, including node, edge, and weight information. Different node types are distinguished by different shapes and colors, and the strength of relationships is represented by the thickness or color of the edges, enhancing the intuitiveness and readability of the graph.
[0136] How to use the knowledge graph:
[0137] Defective Grain Detection: Grain sample test data, including chemical composition data and physical property simulation results, is input into the system. Matching nodes and paths are automatically retrieved from the knowledge graph. Based on the distribution of sample characteristics within the graph, the corresponding quality status node is determined. The system then determines whether the sample is high-quality or defective, as well as the defect grade. Based on the input sample test data, reasoning and analysis are performed along the edges between nodes within the grain quality knowledge graph. By searching for the sum of weights along different paths, the path with the largest sum of weights is prioritized. This path indicates the most significant causal chain of factors leading to changes in grain quality for the current sample. The path with the largest sum of weights reflects the most significant chain of factors influencing quality. The final grain quality grade is output based on the grain quality status node to which the path ends. For example, if the path ends at the "Severely Defective Grain" node, the system outputs a "Severely Defective Grain" judgment. If the path ends at the "High-Quality Grain" node, the system outputs a "High-Quality Grain" judgment.
[0138] Quality Status Analysis and Traceability: Based on the causal relationships within the knowledge graph, we analyze the main factors and causal pathways that lead to defective grain. For example, the analysis indicates that the current sample has an increased probability of breakage due to excessive moisture and rapid crack propagation, ultimately resulting in severe defective grain.
[0139] Risk Warning and Quality Control: The knowledge graph system identifies potential risk points during grain storage and transportation based on historical data and monitoring results. For example, when indicators such as temperature, humidity, and moisture approach critical values, an early warning message is issued, prompting relevant managers to take intervention measures to prevent grain quality deterioration.
[0140] The above formulas are all dimensionless and numerical calculations. The formulas are obtained by collecting a large amount of data and performing software simulation to obtain the most recent real situation. The preset parameters in the formulas are set by technicians in this field according to actual conditions.
[0141] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0142] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0143] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0144] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A method for detecting defective grains by combining fingerprint analysis with finite element analysis, characterized in that: The following steps are involved: Extracting fingerprint features to obtain a first feature set, and extracting finite element model features to obtain a second feature set; Performing feature dimensionality reduction on the first feature set and the second feature set respectively, eliminating redundant variables, and obtaining the chemical modal feature set and the physical modal set; Taking the defective grain grade as the target label, the mutual information between each feature in the chemical modal feature set and the target label is calculated, and the first layer of dimensionality reduction is performed to obtain the chemical modal vector. The mutual information between each feature in the physical modal feature set and the target label is calculated, and the first layer of dimensionality reduction is also performed to obtain the physical modal vector. Under the condition that the target label is known, cross-modal mutual information analysis is performed to obtain a strongly dependent feature group. At the same time, feature sparsity evaluation and feature stability evaluation are performed. Based on the evaluation results, a method of automatically screening the key features of defective grain is selected and the strongly dependent feature group is processed. Finally, a grain quality knowledge graph with grain quality and physical-chemical indicators as core nodes is constructed for the detection of defective grain.
2. The method for detecting defective grains by combining fingerprint analysis and finite element analysis according to claim 1, characterized in that: When reducing feature dimensionality, principal component analysis is used.
3. The method for detecting defective grains by combining fingerprint and finite element analysis according to claim 2, characterized in that: The first level of dimensionality reduction refers to: A standard threshold is set, and the mutual information between each feature in the chemical modal feature set and the target label, as well as the mutual information between each feature in the physical modal feature set and the target label, are compared with the standard threshold respectively. Features below the standard threshold are eliminated, and features not below the standard threshold are retained.
4. The method for detecting defective grains by combining fingerprint analysis and finite element analysis according to claim 3, characterized in that: Performing cross-modal mutual information analysis means: The mutual information value between each feature in the chemical modal vector and each feature in the physical modal vector is calculated to form an nchem×nphys MI matrix, where nchem and nphys refer to the number of features in the chemical modal vector and the physical modal vector, respectively. Then, the feature pairs corresponding to the MI values exceeding the preset percentile values are identified and retained to obtain a strongly dependent feature group.
5. The method for detecting defective grains by combining fingerprint and finite element analysis according to claim 4, characterized in that: The assessment results refer to: The feature sparsity index obtained by feature sparsity evaluation and the feature stability index obtained by feature stability evaluation are performed.
6. The method for detecting defective grains by combining fingerprint and finite element analysis according to claim 5, characterized in that: The method of selecting the key features of automatic screening of defective grains refers to: Fuzzy logic is used to infer the key features of automatic screening of defective grain based on feature sparsity index and feature stability index.
7. The method for detecting defective grains by combining fingerprint and finite element analysis according to claim 6, characterized in that: Methods for automatically screening key characteristics of defective grain include: L1 regularization feature screening method and recursive feature elimination feature screening method.
8. The method for detecting defective grains by combining fingerprint and finite element analysis according to claim 7, characterized in that: The logic for obtaining the feature sparsity index is: From the chemical modal vectors and physical modal vectors obtained after the preliminary mutual information screening, the number of features judged to be "low importance" is obtained and recorded as , "low importance" refers to features with MI values lower than the average value, and the total number of features in the chemical mode vector and the physical mode vector is obtained and recorded as , and the standard deviation of the MI values corresponding to each feature in the chemical mode vector and the physical mode vector are recorded as , and then substitute into the following formula: ; represents the preset sparsity sensitivity factor, represents the preset mutual information fluctuation factor, Represents the feature sparsity index.
9. The method for detecting defective grains by combining fingerprint and finite element analysis according to claim 8, characterized in that: The logic for obtaining the characteristic stability index is: From the chemical modal vector and physical modal vector obtained after preliminary mutual information screening, the number of features that are always selected into the chemical modal vector and physical modal vector under multiple cross-validations or different data partitioning is obtained and recorded as , the average of the total number of features selected in all screenings is recorded as , the ratio of the standard deviation of the sum of the feature weights to the mean of the features that are always selected into the chemical mode vector and the physical mode vector in all screenings is recorded as , and then substitute into the following formula: ; Indicates the preset stability enhancement factor, Indicates the preset characteristic change fluctuation factor, Represents the characteristic stability index.
Citation Information
Patent Citations
Citrus internal and external quality detection and grading method and system based on deep learning
CN119339135A
Key information extraction method and system based on multi-modal model
CN119892215A
Food component analysis method and system based on near infrared spectrum
CN120009222A
Karst forest soil carbon cycle feature extraction method based on multi-modal data fusion
CN120164550A
Enhanced multi-protocol analysis via intelligent supervised embedding (empravise) for multimodal data fusion
WO2012097336A1
Cited By
Plant beverage flavor component detection system and method based on artificial intelligence
CN120801642A
Food processing quality inspection method and system based on fingerprint spectrum
CN121352631A
Fingerprint-based food processing quality inspection methods and systems
CN121352631B