CN-122022547-A - Computer vision-based quality monitoring and analyzing system for traditional Chinese medicine decoction pieces
Abstract
The invention relates to the technical field of computer vision and image processing, in particular to a computer vision-based quality monitoring and analyzing system for traditional Chinese medicine decoction pieces, which comprises an image acquisition module, a processing module and a processing module, wherein the image acquisition module is used for periodically acquiring images of decoction pieces to generate a time sequence image data set; the system comprises a multiscale feature extraction module, a dynamic quality evolution modeling module, a trend prediction and early warning module, a tracing and intervention decision module and a treatment suggestion generation module, wherein the multiscale feature extraction module is used for extracting fusion feature vectors from images, the dynamic quality evolution modeling module is used for constructing a quality state evolution model based on a gating circulation unit network, the trend prediction and early warning module is used for deducing a future quality state and generating early warning signals, and the tracing and intervention decision module is used for associating environment data and generating treatment suggestions. The invention realizes continuous monitoring, trend prediction and intelligent early warning of the dynamic degradation process of the quality of the traditional Chinese medicine decoction pieces.
Inventors
- LI JINTAO
- PAN JUNLING
- ZHANG QINGPO
Assignees
- 禹州市百草汇药业有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251230
Claims (10)
- 1. The quality monitoring and analyzing system for the traditional Chinese medicine decoction pieces based on computer vision is characterized by comprising the following components: The image acquisition module is used for carrying out sequential image acquisition on the traditional Chinese medicine decoction pieces in the same batch or the same storage unit according to a preset periodic time interval so as to generate a time sequence image data set; the multi-scale feature extraction module is used for executing spatial domain feature extraction and frequency domain feature extraction on each frame image in the time sequence image data set in parallel to generate a fusion feature vector; The dynamic quality evolution modeling module is used for receiving the fusion feature vector sequence which is output by the multi-scale feature extraction module and is arranged in time sequence, constructing a quality state evolution model based on a gating circulation unit network, fitting the dynamic process of the change of the appearance quality features of decoction pieces along with time, and outputting a hidden state vector representing the current quality state; The trend prediction and early warning module is used for deducing the quality states of a plurality of time steps in the future through a forward prediction network based on the current hidden state vector output by the dynamic quality evolution modeling module, calculating the quality degradation rate and the deviation degree, and comparing the quality degradation rate and the deviation degree with a preset multi-level early warning threshold value to generate a corresponding quality early warning signal; And the traceability and intervention decision-making module is used for associating the quality early warning signals, the corresponding image acquisition time-space information and the environment sensor data, constructing a quality event traceability map and generating targeted warehouse environment adjustment or material treatment suggestion instructions based on a preset rule base.
- 2. The computer vision-based quality monitoring and analysis system for decoction pieces of traditional Chinese medicine according to claim 1, wherein the multi-scale feature extraction module comprises a spatial domain feature extraction sub-module and a frequency domain feature extraction sub-module; The spatial domain feature extraction submodule is used for performing color space conversion on an input image, converting the input image from RGB color space to HSV color space and Lab color space, and respectively calculating histogram statistical features of the converted image in H, S, V, L, a, b channels, including mean value, variance, skewness and kurtosis; The frequency domain feature extraction submodule is used for performing two-dimensional fast Fourier transform on a gray level diagram of an input image to obtain a spectrogram thereof, and calculating energy distribution of the spectrogram in a plurality of preset radial frequency bands and angular sectors to be used as frequency domain features for representing the overall morphological regularity and the periodic texture structure of decoction pieces; the multi-scale feature extraction module is further used for splicing and standardizing all feature values output by the spatial domain feature extraction submodule and the frequency domain feature extraction submodule to form a fusion feature vector of the frame image.
- 3. The computer vision-based quality monitoring and analyzing system for traditional Chinese medicine decoction pieces according to claim 1, wherein the input of the gating circulation unit network in the dynamic quality evolution modeling module is a fused characteristic vector sequence arranged in time sequence, the network selectively memorizes historical state information and fuses current input through an updating gate and resetting gate mechanism so as to output a hidden state vector at each time step, and the hidden state vector is defined as a compression representation of the quality evolution history of the decoction pieces up to the current moment.
- 4. The computer vision-based quality monitoring and analyzing system for traditional Chinese medicine decoction pieces according to claim 1, wherein the trend prediction and early warning module comprises a forward prediction network composed of fully connected layers, wherein the forward prediction network takes a current time hidden state vector output by the dynamic quality evolution modeling module as input, and deduces predicted hidden state vectors corresponding to the 1 st and 3 rd time steps in the future through forward propagation; the trend prediction and early warning module is also used for calculating the Euclidean distance change rate of the current hidden state vector and the hidden state vector of the last period in a feature space to be used as the instant quality degradation rate; The system presets 4-level early warning thresholds of green, yellow, orange and red, respectively corresponds to different numerical value intervals of the degradation rate and the deviation degree, and when the calculated degradation rate or the deviation degree numerical value falls into a certain early warning interval, the trend prediction and early warning module generates an early warning signal of a corresponding level.
- 5. The computer vision-based quality monitoring and analyzing system for traditional Chinese medicine decoction pieces, which is disclosed in claim 1, is characterized in that the traceability and intervention decision module is activated immediately after receiving an early warning signal, the module firstly invokes the temperature and humidity sensor readings of the storage unit in the same time period from an environment monitoring database according to an image acquisition identification code and a timestamp associated with the early warning signal, then the module constructs a traceability map taking a time axis as a main line and taking a quality state and an environment parameter as nodes, applies an association rule mining algorithm to analyze time sequence correlation between a quality degradation event and specific environment parameter fluctuation, and finally the module is matched with a preset rule base according to an analysis result to generate a warehouse environment adjustment or material treatment suggestion instruction.
- 6. The computer vision-based quality monitoring and analyzing system for traditional Chinese medicine decoction pieces, which is disclosed in claim 5, is characterized in that the rule base comprises a plurality of production rules, the production rules are in the form of corresponding relations of conditions and execution actions, the conditions are set based on association rule mining results of the traceability map, and the execution actions are specific operation instructions for warehouse environment regulation and control equipment or a warehouse management system.
- 7. The computer vision-based quality monitoring and analyzing system for traditional Chinese medicine decoction pieces, as set forth in claim 1, is characterized by further comprising a model online updating module, wherein the model online updating module is used for periodically collecting new time-series image data of which quality labels are confirmed through manual review and taking the new time-series image data as an incremental training data set, and the module adopts an elastic weight consolidation algorithm to finely tune a gating circulation unit network in the dynamic quality evolution modeling module, so that the system is suitable for a new data mode and can prevent catastrophic forgetting of the learned knowledge by applying constraint on important parameters of the network.
- 8. The computer vision based quality monitoring and analysis system of traditional Chinese medicine decoction pieces according to claim 7, wherein the elastic weight consolidation algorithm introduces a quadratic penalty term for important parameters in a loss function, wherein the penalty term is in the form of square of the difference between network parameters and old task optimal parameters, multiplied by an importance measure of the parameters, and the importance measure is calculated based on a fischer information matrix diagonal element of the parameters.
- 9. The computer vision-based quality monitoring and analysis system for decoction pieces of traditional Chinese medicine according to claim 1, wherein the system is operated on a layered data processing architecture, the layered data processing architecture comprising an edge layer, a convergence layer and a cloud platform layer; The edge layer is deployed on a local server of each storage area and is responsible for executing the functions of the image acquisition module and the multi-scale feature extraction module and uploading the generated fusion feature vector; The convergence layer is deployed in a regional data center and is responsible for operating the dynamic quality evolution modeling module and the trend prediction early warning module, processing the data streams of all storage units in the regional and generating early warning signals; And the cloud platform layer is used as a central decision and knowledge base, operates the traceability and intervention decision module and the model online updating module, integrates the whole-area data, performs advanced analysis and strategy generation, and issues updated model parameters to each convergence layer.
- 10. The computer vision-based quality monitoring and analyzing system for traditional Chinese medicine decoction pieces, as set forth in claim 1, is characterized in that the image acquisition module is configured by disposing a fixed high-resolution industrial camera at a key node of a storage area of the traditional Chinese medicine decoction pieces, disposing an annular LED light source to provide stable and uniform illumination conditions, distributing a unique identification code for each storage unit or batch, automatically triggering shooting by the system control camera according to a fixed frequency of 1 time per day, binding acquired images with the identification code, a timestamp and acquisition position coordinates, and storing the acquired images in a time sequence database.
Description
Computer vision-based quality monitoring and analyzing system for traditional Chinese medicine decoction pieces Technical Field The invention belongs to the technical field of computer vision and image processing, and particularly relates to a quality monitoring and analyzing system for traditional Chinese medicine decoction pieces based on computer vision. Background The quality of the traditional Chinese medicine decoction pieces is directly related to the clinical curative effect and the medication safety as a main form of clinical application of the traditional Chinese medicine. The quality monitoring of the traditional Chinese medicine decoction pieces is a key link in the modernization and standardization process of the traditional Chinese medicine, and relates to objective evaluation of multidimensional appearance characters such as color, morphology, impurity content, mildew, worm damage and the like of the decoction pieces. Traditional quality monitoring mainly relies on manual experience judgment or laboratory physicochemical analysis, and is difficult to meet the requirements of large-scale and continuous production and warehouse management. The quality monitoring technology of the traditional Chinese medicine decoction pieces based on computer vision aims to realize automatic and non-contact rapid evaluation of appearance quality of the decoction pieces through image acquisition, feature extraction and intelligent analysis. The basic principle of the technology is that a high-resolution camera is utilized to capture decoction piece images, visual characteristics such as color, texture, shape and the like of the decoction piece images are quantified through an image processing algorithm, and then the visual characteristics are compared with a standard sample database to judge the quality grade or identify specific defects. The system model and algorithm of the real-time quality judgment of the static sample are mainly used for training and optimizing the image data of a single time point. However, the quality of the traditional Chinese medicine decoction pieces is a dynamic evolution process in the storage circulation process, and the appearance characteristics of the traditional Chinese medicine decoction pieces are continuously changed under the comprehensive influence of various factors such as temperature, humidity, time and the like. The existing monitoring system cannot effectively integrate multiple batches of image data on a time sequence, and lacks modeling and predicting capabilities for quality degradation trend of decoction pieces. This results in a delay in management decisions, which can only passively respond to the quality problems that have occurred, and can not be pre-warned and intervened before significant quality degradation occurs. Disclosure of Invention The invention aims to provide a computer vision-based quality monitoring and analyzing system for traditional Chinese medicine decoction pieces, which is used for solving the problem that in the prior art, only static and single-time quality judgment can be carried out on the traditional Chinese medicine decoction pieces, but dynamic quality degradation trend of the traditional Chinese medicine decoction pieces in the storage circulation process cannot be modeled, predicted and early-warned. The invention provides a computer vision-based quality monitoring and analyzing system for traditional Chinese medicine decoction pieces, which comprises the following components: The image acquisition module is used for carrying out sequential image acquisition on the traditional Chinese medicine decoction pieces in the same batch or the same storage unit according to a preset periodic time interval so as to generate a time sequence image data set; the multi-scale feature extraction module is used for executing spatial domain feature extraction and frequency domain feature extraction in parallel for each frame image in the time sequence image dataset so as to generate a fusion feature vector; The dynamic quality evolution modeling module is used for receiving the fused feature vector sequence which is output by the multi-scale feature extraction module and is arranged in time sequence, constructing a quality state evolution model based on a gating circulation unit network, fitting the dynamic process of the change of the appearance quality features of decoction pieces along with time, and outputting a hidden state vector representing the current quality state; The trend prediction and early warning module is used for deducing the quality states of a plurality of time steps in the future through a forward prediction network based on the current hidden state vector output by the dynamic quality evolution modeling module, calculating the quality degradation rate and the deviation degree, and comparing the quality degradation rate and the deviation degree with a preset multilevel early warning threshold value to generate a corresponding qu