Flowability grading method and system based on morphological characteristics of milk powder

By using microscopic image processing and machine learning models, flowability grading is performed based on the morphological characteristics of milk powder, solving the problems of complex and time-consuming detection and unstable judgment in existing technologies, and realizing rapid and objective determination of milk powder flowability level.

CN121385238APending Publication Date: 2026-01-23JIANGNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511476932.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-16
Publication Date
2026-01-23

AI Technical Summary

Technical Problem

Existing methods for testing the flowability of milk powder rely on specialized measuring devices, which are complex, time-consuming, and susceptible to environmental factors. They also lack repeatability and batch-to-batch comparability, making it difficult to achieve online or near-real-time evaluation. Furthermore, the use of a single indicator leads to unstable judgments.

Method used

The flowability grading method based on the morphological characteristics of milk powder predicts the flowability level by acquiring microscopic images, image processing, extracting nine types of two-dimensional shape factors, and using machine learning models (such as random forest, XGBoost, and artificial neural networks). It also combines principal component analysis to form objective judgment rules.

Benefits of technology

It enables rapid, non-destructive, and reproducible determination of milk powder flowability levels, reduces the influence of subjective human factors, improves batch-to-batch comparability and reproducibility, and is suitable for production line quality control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121385238A_ABST
    Figure CN121385238A_ABST
Patent Text Reader

Abstract

The invention discloses a fluidity grading method and system based on morphological characteristics of milk powder. The method comprises the following steps: obtaining fluidity indexes of training samples, constructing a PCA model, and forming grading labels in a principal component score space; the method comprises the following steps: acquiring a microscopic image of to-be-detected milk powder, preprocessing, extracting nine types of two-dimensional shape factors, and summarizing sample layers by using a median; respectively training a random forest and XGBoost to carry out regression prediction on the mobility index; modeling is carried out on the PCA hierarchical labels, and synthetic minority oversampling is introduced to improve coverage and robustness; in the inference stage, good / medium / difference grading is completed only based on images, compared with a process depending on a single instrument and subjective interpretation, the method integrates multi-index information, is objective and reproducible, has the advantages of being non-destructive, rapid, available for small samples and the like, can be suitable for online quality control and inter-batch consistency evaluation of large-scale production, and improves the quality control efficiency and stability.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of milk powder detection, and particularly relates to a flowability grading method and system based on morphological characteristics of milk powder. BACKGROUND

[0002] The common indicators for evaluating the flowability of milk powder currently include the repose angle, the collapse angle, the flat plate angle and the compressibility index. The existing detection relies on special measuring devices and manual reading, and the process is complex and time-consuming, which is difficult to realize online or quasi-real-time evaluation, and is easily affected by factors such as light, humidity, platform vibration and operator experience, and the repeatability and batch comparability are insufficient. On the other hand, engineering practice often sets an empirical threshold for a single indicator, without considering the correlation and comprehensive weight among multiple indicators, resulting in unstable determination of boundary samples and inconsistent conclusions among different batches. In the case of limited sample size or new formula and small batch, it is difficult to complete large-scale calibration and long-term calibration, and the detection cost is high and the maintenance burden is heavy.

[0003] Therefore, a flowability grading method and system based on morphological characteristics of milk powder are urgently needed, which can realize rapid, non-destructive and reproducible grading only by microscopic images in the inference stage. SUMMARY

[0004] To solve the problems of complex process, time-consuming, strong subjectivity and lack of unified determination of multiple indicators in the prior art, the present application provides a flowability grading method based on morphological characteristics of milk powder, which can output the flowability grade only by a single microscopic image in the inference stage.

[0005] To solve the above technical problems, the present application provides the following technical solutions: The first object of the present application provides a flowability grading method based on morphological characteristics of milk powder, comprising the following steps: S101, obtaining the flowability indicators of the training samples, standardizing the flowability indicators and establishing a principal component analysis model (PCA), determining the grade determination rule, and forming the grade label; S102, obtaining the microscopic image of the milk powder to be detected, and performing image preprocessing and particle segmentation on the microscopic image by image processing technology; S103, extracting nine types of two-dimensional shape factors based on the microscopic image, and statistically summarizing the median in the sample layer to obtain a feature vector; S104, taking the feature vector as the input, training the random forest and XGBoost regression models respectively, and performing regression prediction on the flowability indicators to obtain the predicted value of the flowability indicators; S105, taking the predicted value of the flowability indicators as the input, and taking the grade label obtained in step S101 as the supervision, training an artificial neural network (ANN) for three-class modeling; S106, in the process of step S105, implementing synthetic minority oversampling technique (SMOTE), outputting the milk powder liquidity grading result.

[0006] Preferably, in the step S101, the liquidity index includes at least one of repose angle, angle of repose, compressibility index, and plate angle. The standardization is zero-mean unit variance standardization, according to the formula The liquidity index is dimensionless; x represents the original observation value, u represents the mean of the index sample, σ represents the standard deviation of the index sample, and z is the standardized value; through this method, indexes of different dimensions or orders of magnitude can be converted to the standard normal scale with the same mean (0) and variance (1), thereby eliminating the dimensional difference and improving the comparability of each index in the subsequent principal component analysis and modeling process. The principal component analysis model obtains the loading matrix and principal component score by characteristic decomposition of the correlation coefficient matrix, retains the first k principal components whose cumulative explained variance reaches the preset threshold, and establishes good / medium / poor three-level judgment rules based on the PC1-PC2 plane (in the principal component score space).

[0007] Preferably, in the step S102, the image preprocessing and particle segmentation are used to obtain the closed contour and boundary of the particle, including: S1021, denoising; S1022, brightness and contrast correction; S1023, gray scale; S1024, morphological operation, using Matlab function to calculate the specific value of each shape factor; S1025, threshold or learning segmentation.

[0008] Preferably, in the step S103, the nine types of two-dimensional shape factors include maximum Feret diameter, minimum Feret diameter, circularity, solidity, convexity, elongation, area, equivalent diameter, and perimeter, and the median is used as a robust statistic to form a feature vector in the sample layer.

[0009] Preferably, in the step S104, a regression model is established for the repose angle, angle of repose, compressibility index, and plate angle, and the corresponding predicted value is output; the feature vector used for model training is selected by feature importance sorting of the median of the nine types of two-dimensional shape factors, so that the cumulative contribution degree reaches or exceeds 85%, to form an input subset of the regression model; the model evaluation index includes R 2 and Q 2 , ; wherein R2 Q represents the model fitting degree, reflecting the model's ability to explain the training data, Q 2 Q represents the model prediction ability, usually obtained by cross-validation, RSS represents the residual sum of squares, that is, the sum of squares of the deviation between the model prediction value and the actual observation value, PRSS represents the prediction residual sum of squares, that is, the sum of squares of the prediction error in the cross-validation process, SS represents the total sum of squares, indicating the total variability of the observation data relative to its mean.

[0010] Preferably, in the step S105, the artificial neural network comprises an input layer, one or more fully connected hidden layers and an output layer, the output layer is a three-class Softmax, the loss function is cross-entropy, the classification loss is calculated according to the cross-entropy function formula, and the cross-entropy function formula is as follows: Wherein, y c is the one-hot encoding of the true label, p c is the predicted probability of the corresponding category. The artificial neural network further comprises an attention weight module for weighting the predicted values of the liquidity indicators.

[0011] Preferably, in the step S106, the synthetic minority oversampling satisfies , λ∈[0,1], wherein, x i and x j are the same level of neighbor samples, and x new is a synthetic sample.

[0012] Preferably, the Mahalanobis distance is calculated for the new sample at the same time, and compared with the control limit during the training period, and when the limit is exceeded, an abnormal prompt is output and retesting is recommended.

[0013] The second object of the present application provides a liquidity grading system based on the morphological characteristics of milk powder, which adopts the method, and the system comprises: An image acquisition and processing subsystem for acquiring and preprocessing the microscopic images of the milk powder to be detected; A shape factor extraction subsystem for extracting nine types of two-dimensional shape factors and performing median statistics on the sample layer; An indicator prediction subsystem for carrying random forest and XGBoost regression models and outputting the predicted values of the liquidity indicators; A PCA labeling subsystem for establishing a principal component analysis model for the liquidity indicators and generating good / medium / poor grade labels and judgment rules; A grade judgment subsystem for inputting the predicted values of the liquidity indicators into an artificial neural network for three-classification and outputting the grading results; Data management and user interaction subsystem for version management of samples and models, and visual display of hierarchical results and abnormal monitoring information.

[0014] The third object of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed on a processor, causes the processor to perform the method steps.

[0015] Compared with the prior art, the present application has the following beneficial effects: The inference stage of the present application can output the flowability level only by the microscopic image, reduces the influence of human subjective factors and environmental fluctuations, and is faster, non-destructive and convenient for online application compared with the traditional instrument measurement process; The present application unifies the rest angle, collapse angle, flat plate angle and compressibility flowability index data to the score space through principal component analysis, forms an objective and consistent three-level judgment rule, and improves the batch comparability and reproducibility; The present application uses the median of nine two-dimensional shape factors as a robust statistical feature, combines the cascade structure of random forest, XGBoost and artificial neural network, and can also obtain stable performance under small sample conditions; a small number of oversampling is used to enhance the coverage of rare levels; 4、The present application can extend the abnormal monitoring and tracing function, support prompting and retesting of out-of-range samples, and is suitable for production line quality control and batch consistency evaluation. BRIEF DESCRIPTION OF DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0017] Figure 1 A flowchart of the milk powder flowability grading method based on microscopic images provided by a preferred embodiment of the present application is shown; Figure 2 A cascade structure diagram provided by a preferred embodiment of the present application is shown; Figure 3 An artificial neural network (ANN) classifier structure diagram provided by a preferred embodiment of the present application is shown; Figure 4 A PCA labeling module structure diagram provided by a preferred embodiment of the present application is shown; Figure 5 An architecture diagram of the milk powder flowability grading system provided by a preferred embodiment of the present application is shown. DETAILED DESCRIPTION

[0018] The preferred embodiments of the present application will be described below with reference to the drawings, and it should be understood that the preferred embodiments described herein are intended for explaining and illustrating the present application only, and are not intended to limit the present application.

[0019] First, the terms involved in the present application are briefly described: Artificial intelligence is a technology system that simulates or extends human intelligent activities by using computers as carriers, and covers abilities such as perception, learning, reasoning and decision-making. Typical methods include machine learning and deep learning.

[0020] Deep learning is a machine learning method that uses multi-layer neural networks as the core to automatically learn features and patterns from data through hierarchical representation, and can be used for classification, regression and prediction tasks.

[0021] Artificial neural network is a neural network model composed of an input layer, one or more hidden layers and an output layer.

[0022] Principal component analysis is a statistical method for linear transformation of multiple related variables into several mutually unrelated principal components, used for dimensionality reduction and extraction of main variation direction.

[0023] The liquidity indicators are the angle of repose (AOR), the angle of fall (AOF), the compressibility index (CI) and the angle on slope (AS).

[0024] Example 1: Figure 1 A flowchart of a milk powder liquidity grading method based on microscopic images provided by an exemplary embodiment of the present application is shown; referring to Figure 1 As shown, the method comprises: Step S101, based on the four liquidity indicators measured by the BT1001 powder tester, standardization and principal component analysis modeling (PCA) are performed, three-level judgment rules are determined and labels are generated; wherein the liquidity indicators include the angle of repose (AOR), the angle of fall (AOF), the compressibility index (CI) and the angle on slope (AS), all of which are measured one by one according to the test procedures of BT1001 to obtain the original data; the angle of repose is the angle between the slope of the powder pile and the horizontal plane after the powder is naturally piled up on the horizontal plane to form a powder pile, and the smaller the angle, the better the liquidity; the angle of fall is the angle between the slope of the powder pile and the horizontal plane after the surface of the powder pile is collapsed by disturbance, which can reflect the stability of the powder pile together with the angle of repose; the compressibility index is a dimensionless index calculated from the loose bulk density and the tap density, , ρ T represents the tap density, ρ B1 represents the loose bulk density; CI represents the compressibility index, with a larger value generally indicating easier compaction and poorer flowability; the plate angle refers to the angle between the free surface of the powder remaining on the plate and the horizontal plane after the plate embedded in the powder is lifted vertically, with a smaller angle generally indicating better flowability; based on the above measured data, each index is standardized, principal components and their scores are calculated, and a grading decision domain is set in the principal component score space to obtain the grade labels used for supervised modeling.

[0025] Step S102 involves acquiring a microscopic image of the milk powder to be tested, and performing image preprocessing and particle segmentation on the microscopic image. Sample preparation involves weighing approximately 0.08 g of milk powder and adding it to approximately 16 mL of rapeseed oil to form a suspension. Homogenization involves stirring with a magnetic stirrer for approximately 10 seconds to fully disperse the sample. Sampling involves using a pipette to add approximately 1 mL of the suspension to a microscope slide and spreading it evenly. Photographing is performed under an optical digital microscope using approximately 10x objective lens and 10x eyepiece. Image transmission involves importing the obtained sample image into an image processing system. The image preprocessing and particle segmentation are used to obtain the closed contours and boundaries of the particles, including: S1021, noise reduction; S1022, brightness and contrast correction; S1023, grayscale conversion; S1024, morphological operations, using Matlab functions to calculate the specific values ​​of each shape factor; and S1025, thresholding or learned segmentation.

[0026] Step S103: Based on the particle segmentation results obtained in step S102, nine types of two-dimensional shape factors are extracted from the microscopic image using MATLAB, and the median of each factor is taken in the sample layer to form a feature vector; wherein, the conversion between pixels and physical scale is completed according to the imaging scale, and the measurement object is the closed contour of a single particle after removing the edges and abnormal areas; the nine types of shape factors are as follows: Maximum Feret diameter (the maximum length of the parallel caliper projection in any direction, in μm); Minimum Feret diameter (the minimum length of the projection of a parallel caliper in any direction, in μm). Circularity (4πA / P) 2 This reflects how close the shape is to a circle; the closer the value is to 1, the more perfectly round it is. Solidity (A / A) convex (The ratio of particle area to its convex hull area); Convexity (P) convex / P, the ratio of the convex hull perimeter to the particle perimeter; Elongation (the ratio of principal axis length to minor axis length, L)major / L minor ); Area (projected area of ​​particles, unit μm) 2 ); Equivalent diameter (the diameter of a circle with the same area as area A, in μm); Perimeter (circumference, length of the outer boundary of the particle, in μm); Finally, the samples are concatenated in the above order to form a sample feature vector, which is then used for subsequent modeling.

[0027] Step S104: Construct a random forest and XGBoost regression model and train it using the training set; input the feature vector obtained in step S103 into the trained model to obtain the predicted values ​​of AOR, AOF, CI, and AS liquidity indicators respectively, and concatenate the four predicted values ​​into a four-dimensional vector.

[0028] Step S105: Construct an artificial neural network (ANN) and perform three-class classification modeling using the principal component analysis (PCA) model with three-level labels from step S101 as supervision. During the training phase, SMOTE can be used on the training set for synthetic oversampling of the minority class, allowing the classifier to fully engage with the typical and transitional regions of each level during the learning phase. This ensures that the classifier can cover the good / medium / poor classes as much as possible and achieve stable recognition during the validation and testing phases. The four-dimensional prediction vector obtained in step S104 is then input into the ANN for hierarchical training. Specifically, the neural network structure used in this application is shown in Table 1 below.

[0029] Table 1: Artificial Neural Network Structure.

[0030] Figure 2 This illustration shows a microscopic image-based cascade structure of milk powder flowability according to a preferred embodiment of this application. (Reference) Figure 2 As shown; a cascaded model is constructed, including: an input layer, a liquidity index regression sub-model (AOR regression sub-model, AOF regression sub-model, CI regression sub-model, AS regression sub-model), and an ANN classification model; In this embodiment, the input module receives a preprocessed feature vector from which shape factors are extracted; the liquidity index regression submodule performs regression predictions on the angle of rest (AOR), angle of collapse (AOF), compressibility index (CI), and angle of flatness (AS); wherein AOR and AS are implemented by a random forest model, and AOF and CI can be implemented by a gradient boosting tree (XGBoost) model; the four regression sub-models run independently, taking the same feature vector as input and outputting corresponding predicted values; The ANN classification module is used to receive a four-dimensional vector composed of the prediction results of four regression sub-models, and to perform three-class classification modeling based on the PCA labels in step S101 as supervision signals; preferably, the ANN adopts a sequentially stacked feedforward fully connected structure, and the output layer is Softmax, which is used to output the good / medium / poor grading results of milk powder flowability.

[0031] Figure 3 A structural diagram of an artificial neural network (ANN) classifier provided in a preferred embodiment of this application is shown. (Reference) Figure 3 As shown; the ANN classifier is used to receive the predicted value of the mobility index and output the mobility level of the sample. Its structure includes: an input layer, a first fully connected layer and its ReLU activation, a first Dropout layer, a second fully connected layer and its ReLU activation, a second Dropout layer, and a Softmax output layer; the layers are sequentially connected to form a top-down feedforward network.

[0032] In this embodiment: the input layer receives a four-dimensional index prediction vector; the first fully connected layer maps x to the latent space to obtain h1, and activates it with ReLU to enhance nonlinear representation ability, with the number of hidden units in this layer set to 8; the first Dropout layer randomly deactivates h1 to suppress overfitting, preferably with a deactivation ratio of 0.2; the second fully connected layer further compresses and transforms the features to obtain h2, and activates it with ReLU, with the number of hidden units in this layer set to 2; the second Dropout layer performs random deactivation on h2 to improve model robustness; the Softmax output layer maps the features to a three-class label space, outputting p=[p 好 ,p 中 ,p 差 ], as a probabilistic result of liquidity grading; the final category is determined by argmaxp.

[0033] For ease of understanding, the relevant transformations can be briefly represented as inter-layer mapping and activation: ; ; Among them, ReLU(u)=max(0,u).

[0034] Three-class output: ; During the training phase, the PCA labels from step S101 are used as supervision signals, and the four-dimensional prediction vector from step S104 is used as input for forward-backward propagation to update the network parameters. To improve the coverage of each level in the four-dimensional index space, sample interpolation-based data augmentation (SMOTE) is performed between nearest neighbors of the same level. During the inference phase, the data is directly processed according to...Figure 3 The structure shown outputs good / medium / poor results. L2 regularization is applied to the weights of the fully connected layers, combined with an early stopping strategy to improve generalization performance.

[0035] Figure 4 A structural diagram of a PCA annotation module according to a preferred embodiment of this application is shown. (Reference) Figure 4 As shown, the PCA annotation module includes: input, standardization processing, eigenvalue decomposition of the correlation coefficient matrix, principal component score calculation, and three-level judgment output. Its function is to reduce the dimensionality and aggregate liquidity indicator data to form stable good / medium / poor classification labels, providing supervision signals for subsequent artificial neural networks.

[0036] Specifically, the input consists of four measured indices: angle of rest (AOR), angle of collapse (AOF), compressibility index (CI), and angle of plate (AS). First, zero-mean unit variance standardization is performed to ensure that all indices are on the same scale. Then, the correlation coefficient matrix is ​​calculated based on the standardized matrix, and eigenvalue decomposition is performed. R = VΛV⊤, where R is the correlation coefficient matrix, Λ is the eigenvalue diagonal matrix, and V is the corresponding eigenvector matrix. Based on the magnitude of the eigenvalues, the top k principal components whose cumulative contribution rate reaches a preset threshold (e.g., 85%) are selected, resulting in the projection of the samples into the principal component space: T = ZV k Where Z is the standardized sample matrix, V k Let T be the loading matrix of the first k principal components, and T be the principal component score matrix. Finally, a three-level judgment rule is established in the PC space, and the threshold interval is divided based on the PC1 or PC1–PC2 plane to achieve the classification of sample mobility as good / medium / poor; the output results are used as training labels for the ANN classifier.

[0037] The model evaluation metrics include R. 2 With Q 2 , ; Among them, R 2 Q represents the model's goodness of fit, reflecting the model's ability to interpret the training data. 2 The model's predictive power is usually obtained through cross-validation. RSS stands for residual sum of squares, which is the sum of squares of the deviations between the model's predicted values ​​and the actual observed values. PRSS stands for prediction residual sum of squares, which is the sum of squares of the prediction errors during cross-validation. SS stands for total sum of squares, which represents the total variability of the observed data relative to its mean.

[0038] The loss function is cross-entropy. The classification loss is calculated using the cross-entropy function formula, which is as follows: Among them, y c For one-hot encoding of the real label, p c This represents the predicted probability for the corresponding category.

[0039] In the embodiments of this application, the introduction of the PCA annotation module can significantly reduce the collinearity effect among multiple indicators and ensure that the classification labels are derived from the comprehensive characteristics of the measured data, making the classification results more objective, stable and repeatable.

[0040] Example 2: Figure 5 A schematic diagram of the milk powder flowability grading system provided in a preferred embodiment of this application is shown. (Reference) Figure 5 As shown, the system provided in this application includes: an image acquisition and processing subsystem 100, a shape factor extraction subsystem 200, an index prediction subsystem 300, a PCA annotation subsystem 400, a grade determination subsystem 500, and a data management and user interaction subsystem 600.

[0041] The image acquisition and processing subsystem 100 includes an image acquisition module 101 and an image preprocessing and segmentation module 102. The image acquisition module 101 acquires a microscopic image of the milk powder to be tested using a digital microscope camera or other image acquisition equipment. The image acquisition module 101 then transmits the acquired high-quality image to the image preprocessing and segmentation module 102. The image preprocessing and segmentation module 102 performs noise reduction, brightness and contrast correction, grayscale conversion, morphological operations, and particle segmentation on the received image to obtain closed particle contours and masks. The image preprocessing and segmentation module 102 transmits the processed image and segmentation results to the data storage module 601 in the data management and user interaction subsystem 600, and simultaneously to the factor calculation module 201 in the shape factor extraction subsystem 200.

[0042] The shape factor extraction subsystem 200 includes a factor calculation module 201 and a factor statistics module 202. The factor calculation module 201 calculates nine two-dimensional shape factors (Maximum Feret, Minimum Feret, Circularity, Solidity, Convexity, Elongation, Area, Equivalent diameter, and Perimeter) based on the particle profile; the factor calculation module 201 then transmits the particle size measurement results to the factor statistics module 202. The factor statistics module 202 takes the median of each shape factor in the sample layer to form a nine-dimensional feature vector; the factor statistics module 202 transmits the nine-dimensional feature vector to the index prediction subsystem 300, and simultaneously transmits a copy of this feature vector to the data storage module 601 in the data management and user interaction subsystem 600.

[0043] The indicator prediction subsystem 300 includes an AOR prediction module 301, an AOF prediction module 302, a CI prediction module 303, and an AS prediction module 304. Each prediction module carries a random forest and an XGBoost regression model, respectively, which take a nine-dimensional feature vector as input and output the corresponding predicted values ​​of the angle of rest (AOR), angle of collapse (AOF), compressibility index (CI), and flat angle (AS). The AOR prediction module 301, AOF prediction module 302, CI prediction module 303, and AS prediction module 304 concatenate the four predicted values ​​into a four-dimensional prediction vector in a predetermined order and transmit this vector to the ANN classification module 501 of the level determination subsystem 500. At the same time, the predicted values ​​of the four liquidity indicators and a copy of the four-dimensional vector are transmitted to the data storage module 601 in the data management and user interaction subsystem 600.

[0044] The PCA annotation subsystem 400 includes a standardization module 401, an eigenvalue decomposition module 402, and a label generation module 403. The standardization module 401 performs zero-mean, unit-variance standardization on the mobility indicators of historical samples (measured by a BT1001 or equivalent device). The eigenvalue decomposition module 402 performs principal component analysis based on the correlation coefficient matrix and calculates the principal component scores. The label generation module 403 outputs three-level labels (good / medium / poor) according to the judgment rules of the principal component score space, serving as a supervision signal and in-store judgment rules during the training phase. The label generation module 403 stores the classification labels and judgment rules in the data storage module 601 of the data management and user interaction subsystem 600, and provides the labels to the ANN classification module 501 of the classification subsystem 500 during training or calibration.

[0045] The grading subsystem 500 includes an ANN classification module 501 and a result output module 502. The ANN classification module 501 receives the four-dimensional prediction vector from the indicator prediction subsystem 300 and uses the grade labels provided by the PCA annotation subsystem 400 as supervision during the training phase. During the inference phase, the ANN classification module 501 outputs the sample mobility grading result (good / medium / poor) based on the four-dimensional prediction vector. The ANN classification module 501 transmits the grading result to the result output module 502. The result output module 502 generates the final detection result and transmits it to the visualization module 602 and interaction module 603 in the data management and user interaction subsystem 600. Simultaneously, it writes the result, along with a timestamp and sample number, into the data storage module 601 for archiving and traceability.

[0046] The data management and user interaction subsystem 600 includes a data storage module 601, a visualization module 602, and an interaction module 603. The data storage module 601 receives and saves image data, feature vectors, predicted values, labels, and final classification results from the image preprocessing and segmentation module 102, factor statistics module 202, indicator prediction subsystem 300, PCA annotation subsystem 400, and result output module 502, enabling versioned management of samples and models. The visualization module 602 displays the predicted values ​​of the four liquidity indicators, PCA judgments, and ANN classification results in the form of charts and reports, and provides anomaly alerts. The interaction module 603 allows users to query detection records, export reports, initiate retesting, and issue strategy adjustment commands. The interaction module 603 can also send user commands back to the corresponding subsystems to complete the retesting process and model updates.

[0047] In summary, the system provided in this embodiment forms a continuous data flow and functional collaboration through image acquisition and processing, factor extraction, indicator prediction, PCA annotation, grade determination, and data management and interaction: images and segmentation results flow from the image acquisition and processing subsystem 100 to the shape factor extraction subsystem 200 and the data management and user interaction subsystem 600; nine-dimensional features flow from the shape factor extraction subsystem 200 to the shape factor extraction subsystem 300 and the data management and user interaction subsystem 600; predicted values ​​of four flowability indicators and four-dimensional vectors flow from the shape factor extraction subsystem 300 to the grade determination subsystem 500 and the data management and user interaction subsystem 600; training labels and rules flow from the PCA annotation subsystem 400 to the grade determination subsystem 500 and the data management and user interaction subsystem 600; and the final grading result flows from the grade determination subsystem 500 to the data management and user interaction subsystem 600. This system can achieve the grading of milk powder flowability (good / medium / poor) relying solely on microscopic images, and supports result archiving and visualization.

[0048] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for classifying the flowability of milk powder based on the morphological characteristics of the milk powder, characterized in that, The method comprises the following steps: S101, obtaining a liquidity index of a training sample, standardizing the liquidity index, establishing a principal component analysis model, determining a grade determination rule, and forming a grade label; S102, obtaining a microscopic image of the milk powder to be detected, and performing image preprocessing and particle segmentation on the microscopic image through image processing technology; S103, extracting nine types of two-dimensional shape factors based on the microscopic image, and statistically summarizing the median in the sample layer to obtain a feature vector; S104, taking the feature vector as input, training a random forest and XGBoost regression model respectively, performing regression prediction on the liquidity index, and obtaining a predicted value of the liquidity index; S105, taking the predicted value of the liquidity index as input, taking the grade label obtained in step S101 as supervision, training an artificial neural network for three-class modeling; S106, implementing synthetic minority over-sampling in the process of step S105, and outputting a milk powder liquidity grading result.

2. A method of classifying the flowability of milk powder based on the morphological characteristics of the milk powder according to claim 1, characterized in that, In the step S101, the liquidity index comprises at least one of a rest angle, a collapse angle, a compressibility index, and a flat plate angle; The standardization is zero-mean unit variance standardization, according to the formula The liquidity index is dimensionless; wherein, x represents the original observation value, u represents the mean of the index sample, σ represents the standard deviation of the index sample, and z is the standardized value. The principal component analysis model obtains a loading matrix and a principal component score by performing characteristic decomposition on a correlation coefficient matrix, retains the first k principal components whose cumulative explained variance reaches a preset threshold, and establishes a good / medium / poor three-grade determination rule in the principal component score space based on a PC1-PC2 plane.

3. The method for classifying the flowability of milk powder based on the morphological characteristics according to claim 1, characterized in that, In the step S102, the image preprocessing and particle segmentation are used to obtain a closed contour and a boundary of a particle, comprising: S1021, denoising; S1022, brightness and contrast correction; S1023, grayscale; S1024, morphological operation, using a Matlab function to calculate specific values of each shape factor; S1025, threshold or learning-based segmentation.

4. The method for classifying the flowability of milk powder based on the morphological characteristics according to claim 1, characterized in that, In the step S103, the nine types of two-dimensional shape factors comprise a maximum Feret diameter, a minimum Feret diameter, a circularity, a solidity, a convexity, an elongation, an area, an equivalent diameter, and a perimeter.

5. The method for classifying the flowability of milk powder based on the morphological characteristics according to claim 1, characterized in that, In the step S104, a regression model is established for the rest angle, collapse angle, compressibility index and flat plate angle respectively, and the corresponding predicted values are output; the feature vector for model training is selected by performing feature importance sorting on the median of the nine types of two-dimensional shape factors, so that the cumulative contribution degree reaches or exceeds 85%, to form an input subset of the regression model; the model evaluation indexes include R 2 with Q 2 , ; wherein R 2 represents the model fitting goodness, reflecting the model's ability to explain the training data, Q 2 represents the model prediction ability, obtained by cross-validation, RSS represents the residual sum of squares, i.e., the sum of the squares of the deviations between the model predicted values and the actual observed values, PRSS represents the prediction residual sum of squares, i.e., the sum of the squares of the prediction errors in the cross-validation process, SS represents the total sum of squares, and indicates the total variability of the observed data relative to its mean.

6. The method for classifying the flowability of milk powder based on the morphological characteristics according to claim 1, characterized in that, In the step S105, the artificial neural network comprises an input layer, one or more fully connected hidden layers, and an output layer, the output layer is a three-class Softmax, the loss function is cross-entropy, the classification loss is calculated according to the cross-entropy function formula, and the cross-entropy function formula is as follows: where y c is a one-hot encoding of the true label, p c is the predicted probability for the corresponding class. The artificial neural network further comprises an attention weight module for weighting the predicted value of the liquidity index.

7. The method for classifying the flowability of milk powder based on the morphological characteristics according to claim 1, characterized in that, In the step S106, the synthetic minority oversampling satisfies , λ ∈ [0, 1], wherein x i is a neighbor sample of the same level as x j , and x new is a synthetic sample.

8. The method for classifying the flowability of milk powder based on the morphological characteristics according to claim 1, characterized in that, The Mahalanobis distance of a new sample is calculated simultaneously and compared with a training period control limit, and when the limit is exceeded, an abnormal prompt is output and retesting is recommended.

9. A flowability classification system based on morphological characteristics of milk powder, characterized in that, The system adopts the method according to any one of claims 1-8, and the system comprises: an image acquisition and processing subsystem for acquiring and preprocessing a microscopic image of the milk powder to be detected; a shape factor extraction subsystem for extracting nine types of two-dimensional shape factors and performing median statistical analysis in the sample layer; an index prediction subsystem for carrying random forest and XGBoost regression models and outputting a predicted value of the liquidity index; a PCA labeling subsystem for establishing a principal component analysis model for the liquidity index and generating a good / medium / poor grade label and a determination rule; The grade determination subsystem is used for inputting the predicted value of the liquidity index into an artificial neural network for three classification and outputting the grading result. The data management and user interaction subsystem is used for version management of the sample and model, and visually displays the grading result and abnormal monitoring information. 10.A computer readable storage medium having stored thereon a computer program, which, when run on a processor, causes the processor to perform the method steps of any one of claims 1-8.