An abnormality monitoring method, device, equipment and medium applied to extraction of traditional Chinese medicine ingredients
By combining a multi-dimensional sensor network and a process stage identification model with a dynamic threshold library, the problems of multi-parameter coupling and insufficient adaptability of static thresholds in the extraction process of traditional Chinese medicine components are solved. This enables precise monitoring and automated control of the extraction process, thereby improving product quality and production efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANXI YUANHUA TECHNOLOGY CO LTD
- Filing Date
- 2026-02-12
- Publication Date
- 2026-05-26
AI Technical Summary
In the extraction process of Chinese herbal medicine components, traditional monitoring technologies cannot effectively identify the dynamic coupling relationship between multiple parameters, leading to hidden quality anomalies. Furthermore, static thresholds cannot adapt to dynamic process stages, causing false alarms and missed alarms. The lack of automated root cause tracing capabilities affects product quality and production efficiency.
A multi-dimensional sensor network is used to collect multi-source data of the process. Data preprocessing and inference are performed through a process stage identification model. The offset of monitoring variables is calculated using a stage-aware dynamic threshold library. The threshold library is updated by incremental learning, and control adjustment commands are triggered in abnormal situations to achieve precise monitoring of the Chinese medicine extraction process.
Significantly reduces false alarms and false alarms, improves product quality and production efficiency, enables adaptive monitoring of the Chinese medicine extraction process, enhances the timeliness and efficiency of abnormal response, reduces operational risks, and ensures product quality uniformity.
Smart Images

Figure CN122091000A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of traditional Chinese medicine pharmaceutical technology, specifically to an anomaly monitoring method, apparatus, equipment, and computer-readable storage medium applied to the extraction of traditional Chinese medicine components. Background Technology
[0002] Extraction of Chinese herbal ingredients is a core step in the production of traditional Chinese medicine (TCM). Its process is highly complex and dynamically variable, involving the precise and coordinated control of multiple process parameters such as temperature, pressure, stirring speed, solvent flow rate, and liquid level. Traditional monitoring technologies mainly rely on threshold exceedance mechanisms for single parameters, which cannot effectively identify the dynamic coupling relationships and hidden quality anomalies between multiple parameters. Because TCM raw materials are widely available and extraction processes exhibit significant batch-to-batch variations, even if all process parameters are within preset static ranges, abnormal fluctuations in parameter combinations can still lead to a decrease in the uniformity of the final product's components, resulting in material waste and quality risks.
[0003] Meanwhile, the extraction process of traditional Chinese medicine exhibits typical nonlinear multi-stage characteristics, accompanied by complex operating conditions such as process switching, phase change and equipment fluctuations. The existing static threshold system is difficult to adaptively match the normal fluctuation range of different process stages. If the threshold is set too narrowly, it will cause frequent false alarms and lead to operator fatigue. If the threshold is set too wide, it will be unable to capture real abnormal signals, which poses a safety hazard.
[0004] Furthermore, when an anomaly occurs, the monitoring system can only output an overall process status anomaly alert, lacking the ability to automatically trace the root cause of the anomaly. Root cause investigation heavily relies on human experience and professional knowledge, resulting in low diagnostic efficiency and untraceable process, which makes it difficult to meet the needs of modern intelligent manufacturing of traditional Chinese medicine for real-time and accurate monitoring of the process. Summary of the Invention
[0005] To overcome the shortcomings of existing technologies and solve existing technical problems, this invention provides an anomaly monitoring method, device, electronic equipment, and computer-readable storage medium for the extraction of Chinese herbal medicine components. It has the advantages of being able to adapt to the multi-stage characteristics of Chinese herbal medicine extraction, accurately monitor process anomalies, reduce false alarms and missed alarms, and improve product quality and production efficiency.
[0006] In a first aspect, embodiments of the present invention provide an anomaly monitoring method applied to the extraction of traditional Chinese medicine components. The method includes: collecting multi-source process data of the current batch during the extraction process of traditional Chinese medicine using a multi-dimensional sensor network; preprocessing the multi-source process data to obtain a standardized process state vector sequence of the current batch; inferring the standardized process state vector sequence of the current batch using a process stage identification model to obtain a process stage label sequence of the current batch; matching and calculating the standardized process state vector sequence of the current batch with a stage-aware dynamic threshold library based on the obtained process stage label sequence of the current batch to obtain a monitoring variable offset; and performing anomaly monitoring on the obtained monitoring variable offset to obtain anomaly monitoring results.
[0007] In one technical solution, the present invention applies to the abnormal monitoring method for the extraction of traditional Chinese medicine components, and further includes: when the abnormal monitoring results show that the obtained monitoring variable offset is within the threshold range, the stage perception dynamic threshold library is updated based on the standardized process state vector sequence using an incremental learning method.
[0008] In one technical solution, the present invention applies to the abnormal monitoring method for the extraction of traditional Chinese medicine components, and further includes: when the abnormal monitoring result shows that the deviation of the obtained monitoring variable exceeds the threshold range, triggering the generation of a control adjustment command; executing the control adjustment command through an industrial control interface to realize the control of the process flow of traditional Chinese medicine component extraction.
[0009] In one technical solution, before inferring the standardized process state vector sequence of the current batch using the process stage identification model, the method further includes: training the process stage identification model based on the standardized process state vector sequence set of historical high-quality batches and the stage label sequence set corresponding to the historical high-quality batches; and supervising the training of the process stage identification model using the cross-entropy loss function.
[0010] In one technical solution, the embodiment of the present invention describes using a process stage identification model to infer the standardized process state vector sequence of the current batch to obtain the process stage label sequence of the current batch, which includes: inputting the standardized process state vector sequence of the current batch into the process stage identification model; extracting each window sequence segment in a sliding window manner; using the trained process stage identification model to perform real-time inference on each window sequence segment of the current batch, and outputting the stage label probability vector at each moment of the current batch; selecting the process stage label with the largest probability value in the stage label probability vector at each moment of the current batch as the real-time process stage label at the corresponding moment, and obtaining the process stage label sequence of the current batch.
[0011] In one technical solution, an embodiment of the present invention, based on the obtained process stage label sequence of the current batch, matches and calculates the standard process state vector sequence of the current batch with a stage-aware dynamic threshold library to obtain the monitoring variable offset. This includes: acquiring the stage-aware dynamic threshold library; for each moment and each monitoring variable dimension in the standardized process state vector sequence of the current batch, retrieving the stage-aware dynamic threshold corresponding to the obtained process stage label and monitoring variable dimension of the current batch from the stage-aware dynamic threshold library; extracting the standardized value of the monitoring variable dimension corresponding to the current batch at the current moment from the standardized process state vector of the current batch; and calculating the monitoring variable offset based on the relationship between the extracted standardized value of the monitoring variable dimension corresponding to the current batch at the current moment and the retrieved stage-aware dynamic threshold.
[0012] Secondly, embodiments of the present invention also provide an anomaly monitoring device applied to the extraction of traditional Chinese medicine components. The device includes: a data acquisition module for acquiring multi-source process data of the current batch during the extraction process of traditional Chinese medicine using a multi-dimensional sensor network; a preprocessing module for preprocessing the multi-source process data to obtain a standardized process state vector sequence of the current batch; an inference module for inferring the standardized process state vector sequence of the current batch using a process stage identification model to obtain a process stage label sequence of the current batch; a matching calculation module for matching the standardized process state vector sequence of the current batch with a stage-aware dynamic threshold library based on the obtained process stage label sequence of the current batch to obtain a monitoring variable offset; and an anomaly monitoring module for anomaly monitoring of the obtained monitoring variable offset to obtain anomaly monitoring results.
[0013] In one technical solution, the anomaly monitoring device for the extraction of traditional Chinese medicine components according to an embodiment of the present invention further includes: a model training module, used to train the process stage identification model based on the set of standardized process state vector sequences of historical high-quality batches and the set of stage label sequences corresponding to historical high-quality batches before the inference module uses the process stage identification model to infer the standardized process state vector sequence of the current batch; and to use the cross-entropy loss function to supervise the training of the process stage identification model.
[0014] Thirdly, embodiments of the present invention also provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method for abnormal monitoring of traditional Chinese medicine component extraction.
[0015] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are invoked or executed by a processor, the computer-executable instructions cause the processor to implement the above-mentioned abnormal monitoring method applied to the extraction of traditional Chinese medicine components.
[0016] This invention provides an anomaly monitoring method, apparatus, device, and computer-readable storage medium for the extraction of traditional Chinese medicine components. It utilizes a multi-dimensional sensor network to collect multi-source process data for the current batch during the extraction process and preprocesses the data to obtain a standardized process state vector sequence for the current batch. Subsequently, a process stage identification model is used to infer from this sequence to obtain a process stage label sequence for the current batch. Based on the obtained process stage label sequence, the standardized process state vector sequence of the current batch is matched with a stage-aware dynamic threshold library to calculate the shift of monitoring variables. Finally, anomaly monitoring is performed on the obtained monitoring variable shift to obtain anomaly monitoring results. Thus, this invention effectively overcomes the limitations of existing technologies, such as insufficient multi-parameter collaborative analysis and the inability of static thresholds to adapt to dynamic processes. Furthermore, by collecting multi-source process data of the Chinese medicine extraction process, and after preprocessing, a process stage identification model is used to obtain a stage label sequence. Then, dynamic thresholds are matched to calculate the offset for anomaly monitoring. This effectively solves the problem that traditional monitoring technologies cannot handle multi-parameter dynamic coupling and multi-stage adaptation. It has the advantages of being able to adapt to the multi-stage characteristics of Chinese medicine extraction, accurately monitor process anomalies, reduce false alarms and false alarms, and improve product quality and production efficiency. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the abnormal monitoring method for the extraction of traditional Chinese medicine components according to Embodiment 1 of the present invention. Figure 2 This is a flowchart illustrating another method for monitoring anomalies in the extraction of traditional Chinese medicine components according to an embodiment of the present invention. Figure 3 This is a schematic diagram of the composition of the abnormal monitoring device for the extraction of traditional Chinese medicine components according to Embodiment 1 of the present invention; Figure 4 This is a schematic diagram of the composition structure of another abnormal monitoring device applied to the extraction of traditional Chinese medicine components according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the composition structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without inventive effort are within the scope of protection of the present application.
[0019] Existing methods for monitoring the extraction process of traditional Chinese medicine components suffer from insufficient multi-parameter collaborative analysis capabilities when dealing with the complexity and dynamic variability of the process, making it difficult to identify hidden quality anomalies. Furthermore, the commonly used static thresholds cannot effectively adapt to the dynamic, multi-stage characteristics of the extraction process, leading to frequent false alarms and missed alarms, which affect product quality uniformity and production efficiency.
[0020] To address the aforementioned shortcomings, this invention provides an anomaly monitoring method for the extraction of components from traditional Chinese medicine, such as... Figure 1 As shown, the process includes the following steps: S101, using a multi-dimensional sensor network to collect multi-source process data of the current batch during the extraction of traditional Chinese medicine; S102, preprocessing the multi-source process data to obtain a standardized process state vector sequence for the current batch; S103, using a process stage identification model to infer the standardized process state vector sequence of the current batch to obtain a process stage label sequence for the current batch; S104, based on the obtained process stage label sequence of the current batch, matching and calculating the standard process state vector sequence of the current batch with a stage-aware dynamic threshold library to obtain the monitoring variable offset; S105, performing anomaly monitoring on the obtained monitoring variable offset to obtain anomaly monitoring results.
[0021] In step S101 above, specifically, a multi-dimensional sensor network is used to collect multi-source process data for the current batch during the extraction of traditional Chinese medicine. For example, temperature sensors, pressure sensors, flow sensors, liquid level sensors, and stirring speed sensors can be deployed at key locations such as the inner wall of the extraction tank, the heating jacket, the condenser, and the pump body. These sensors can be configured to continuously collect their respective process parameter values at a preset sampling frequency (e.g., once per second or once per minute), and the collected data is transmitted to the data processing unit via wired or wireless means.
[0022] The multidimensional sensor network refers to a network system composed of multiple sensors of different types. These sensors are deployed at key locations in the extraction process of traditional Chinese medicine to collect real-time data on various process parameters such as temperature, pressure, stirring speed, solvent flow rate, liquid level, pH value, and conductivity. This network can provide comprehensive and continuous process status information. The multi-source process data refers to the raw, heterogeneous data set collected by the multidimensional sensor network during the extraction process. This data may contain information on various process parameters with different sampling frequencies, dimensions, and data formats.
[0023] In step S102 above, specifically, the original data may contain missing values, outliers, or different dimensions. Missing data can be handled using interpolation or mean imputation, and outliers can be identified and removed using statistical methods (e.g., the three-standard-deviation method). Subsequently, the cleaned data is normalized, for example using min-max normalization or Z-score standardization, mapping all parameter values to a unified numerical range, thereby forming a series of standardized process state vectors with fixed dimensions and continuous time. The standardized process state vector sequence refers to a series of numerical vectors with fixed dimensions, continuously arranged in the time dimension, formed after preprocessing the original multi-source process data, unifying the dimensions of different parameters, eliminating noise, and normalizing the data. Each vector represents the process state at a certain moment, and its sequence reflects the dynamic evolution of the process.
[0024] In step S103 above, specifically, the process stage identification model is used to infer the standardized process state vector sequence of the current batch to obtain the process stage label sequence of the current batch. For example, the process stage identification model can be a machine learning model based on time series analysis, such as a hidden Markov model or a recurrent neural network. In practical applications, the standardized process state vector sequence can be used as the input of the model. The model analyzes the input sequence through its internal logic and outputs the process stage label corresponding to each time point or each time period, such as "water wetting stage", "heating reflux stage", "filtration stage" or "concentration stage".
[0025] Here, the process stage identification model refers to a trained intelligent model whose function is to automatically identify and output the specific stage of the current process based on the input standardized process state vector sequence. This model can dynamically capture stage transitions during the extraction process, such as heating, heat preservation, reflux, and concentration. The process stage label sequence refers to the process stage identifier assigned to each moment or time period in the sequence after the process stage identification model infers from the standardized process state vector sequence. This sequence clearly indicates the specific process stage of the extraction process at different time points.
[0026] In step S104 above, specifically, based on the current process stage label, the normal fluctuation range (i.e., dynamic threshold) of each monitoring variable dimension under that stage can be found from the stage-aware dynamic threshold library. Then, the standardized value of the corresponding monitoring variable dimension in the current standardized process state vector is compared with the found dynamic threshold. For example, the difference between the standardized value and the upper or lower limit of the threshold can be simply calculated, or it can be determined whether the standardized value falls outside the threshold range, thereby quantifying the offset of the monitoring variable.
[0027] The aforementioned stage-aware dynamic threshold library refers to a dataset storing dynamic thresholds corresponding to different process stages and different monitoring variable dimensions. This threshold library can provide an adaptive normal fluctuation range based on changes in the current process stage, rather than using fixed static thresholds. The monitoring variable offset is a quantitative indicator of the degree of deviation between the standardized values of monitoring variables in the current batch standardized process state vector sequence and the stage-aware dynamic threshold. This offset reflects the degree to which the current process state deviates from the normal stage range, indicating potential anomalies.
[0028] In step S105 above, the obtained offset of the monitored variable is subjected to anomaly monitoring to obtain anomaly monitoring results. For example, the calculated offset of the monitored variable can be compared with a preset anomaly judgment threshold. When the offset of a monitored variable exceeds the judgment threshold, it is judged as an anomaly. The anomaly monitoring results can be output in the form of alarm signals, visual charts, or log records to alert operators or automation systems that there are potential anomalies in the current process.
[0029] This invention relates to an anomaly monitoring method for the extraction of traditional Chinese medicine components. By integrating multi-dimensional sensor network data acquisition, data standardization, dynamic identification of process stages, adaptive threshold matching for each stage, and offset monitoring, it effectively solves the problems of insufficient multi-parameter collaborative analysis and the inability of static thresholds to adapt to dynamic process stages during the extraction process of traditional Chinese medicine. Furthermore, this invention can comprehensively capture the complex dynamic changes in the process, accurately identify hidden quality anomalies, and dynamically adjust the monitoring thresholds according to the real-time process stages, significantly reducing false alarms and missed alarms, thereby improving the monitoring accuracy and product quality uniformity of the extraction process of traditional Chinese medicine components.
[0030] In the above embodiments of the present invention, an anomaly monitoring method is proposed to detect anomalies in the extraction process of traditional Chinese medicine. However, in this process, when the deviation of the monitored variable is within the threshold range, the dynamic threshold library for stage perception is static and cannot be adaptively updated according to new data, resulting in a long-term decrease in monitoring accuracy or inability to adapt to dynamic changes in the process, thereby increasing the risk of false alarms or missed alarms.
[0031] Based on this, in one embodiment of the present invention, the present invention is applied to an anomaly monitoring method for the extraction of traditional Chinese medicine components. The method further includes: when the anomaly monitoring result indicates that the obtained monitoring variable offset is within the threshold range, an incremental learning method is used to update the stage perception dynamic threshold library based on the standardized process state vector sequence.
[0032] Specifically, when the anomaly monitoring results indicate that the deviation of the monitored variable is within a threshold range, it means that the current Chinese medicine extraction process is operating normally and no significant anomalies have been detected. This condition can be achieved by: the system continuously monitoring the deviation of the monitored variable and comparing it with a preset normal fluctuation threshold; when the deviation falls within this threshold range, it is considered to be within the normal range, triggering a subsequent incremental learning and update mechanism; or, through the anomaly monitoring results output by the anomaly monitoring module, which clearly indicate whether the current process status is normal; if the result shows "normal" or "no anomalies," then this condition is met.
[0033] Building upon this, incremental learning is employed for updates. Incremental learning is a machine learning paradigm whose core principle is to allow the model to be updated incrementally as it receives new data, without having to retrain the entire model from scratch, thus effectively addressing the time-varying nature of the process. In practical implementation, this can be based on online learning algorithms. For example, when a new standardized process state vector sequence is received, the parameters of the stage-aware dynamic threshold library can be slightly adjusted or recalculated using this new data to reflect the latest process state distribution. Alternatively, a periodic mini-batch update strategy can be adopted, where the threshold library is locally optimized at regular intervals or after accumulating a certain amount of new data, for example, by updating threshold statistics using methods such as moving averages or exponentially weighted averages.
[0034] Furthermore, the update is based on a standardized process state vector sequence and aims to update the stage-aware dynamic threshold library. This means that the statistical parameters (such as mean, standard deviation, quantiles, etc.) of the corresponding stage in the stage-aware dynamic threshold library are updated using the standardized process state vector sequence of the current batch, combined with its corresponding process stage label. For example, a moving average method can be used to incorporate the statistical information of the new data points into the existing threshold calculation; or, during incremental learning, the new standardized process state vector sequence is used as a training sample, and the parameters of the threshold library are adjusted through iterative optimization algorithms (such as a variant of gradient descent) to better fit the latest normal process data distribution.
[0035] Through the above technical solution, this embodiment of the invention introduces an incremental learning mechanism to update the stage-aware dynamic threshold library when monitoring results indicate that the deviation of the monitored variable is within the threshold range, i.e., when the process is running normally. This conditional update strategy ensures that the threshold library adjustment is triggered only when the system is running normally, thereby avoiding the introduction of noisy data under abnormal conditions and ensuring the reliability and data quality of the update process. Simultaneously, the incremental learning approach allows the system to gradually absorb new process data without frequent large-scale model retraining, significantly reducing computational resource consumption and enabling real-time adaptation to dynamic changes in the traditional Chinese medicine extraction process. Updating based on standardized process state vector sequences, utilizing preprocessed standardized data, ensures data consistency and comparability, providing a high-quality foundation for threshold library optimization. Finally, by dynamically adjusting the stage-aware dynamic thresholds, the robustness of the anomaly monitoring system is enhanced, effectively reducing false alarms and false negatives, and improving the long-term stability and accuracy of anomaly monitoring in the traditional Chinese medicine extraction process.
[0036] In the above embodiments of this application, an anomaly monitoring method is also proposed to detect anomalies in the extraction process of traditional Chinese medicine. However, when an anomaly is detected, there is a lack of an automated response mechanism, which makes it difficult to trace the root cause and results in low diagnostic efficiency. It requires human experience and professional knowledge to intervene, thereby delaying the handling of anomalies and increasing safety risks.
[0037] Based on this, in one embodiment of the present invention, the present invention is applied to an anomaly monitoring method for the extraction of traditional Chinese medicine components. The method further includes: when the anomaly monitoring result indicates that the deviation of the obtained monitoring variable exceeds the threshold range, triggering the generation of a control adjustment command; and executing the control adjustment command through an industrial control interface to realize the control of the process flow of traditional Chinese medicine component extraction.
[0038] Specifically, when anomaly monitoring results indicate that the deviation of the monitored variable exceeds a threshold range, this condition means that after anomaly monitoring of the monitored variable deviation, the system determines that the current process state has deviated from the normal operating range. Anomaly monitoring results can be determined by comparing the monitored variable deviation with preset dynamic thresholds (e.g., control limits based on statistical process control (SPC) charts, such as Shewhart charts, CUSUM charts, or EWMA charts). When the deviation exceeds the upper or lower limit of these dynamic thresholds, it is judged as an anomaly. Alternatively, a control model established using multivariate statistical analysis methods, such as principal component analysis (PCA) or partial least squares (PLS), can also be used. When the residuals or T2 statistic of new data points in the model space exceed preset limits, it also indicates that the monitored variable deviation exceeds the threshold range.
[0039] Based on this, control adjustment commands are triggered and generated. These commands are issued in response to detected anomalies, aiming to restore process parameters to a normal or optimized state. Generating these commands can be based on a predefined rule base; for example, pre-setting corresponding adjustment strategies (such as reducing heating power or increasing pump speed) for specific types of deviations (e.g., excessively high temperature or excessively low pressure). Another approach is to utilize model-based control strategies. For instance, by establishing a mathematical model of the process, the optimal control quantity adjustment command can be calculated in real time based on the current abnormal state and the desired target state. Furthermore, expert systems or fuzzy logic controllers can be used to generate adjustment commands based on empirical knowledge or fuzzy rules.
[0040] Subsequently, the control adjustment commands are executed through the industrial control interface. The industrial control interface is a crucial link in realizing information exchange and control command transmission between the monitoring system and the actual production equipment. This interface can be a programmable logic controller (PLC), a distributed control system (DCS), or a supervisory control and data acquisition system (SCADA), etc. Executing control adjustment commands means converting the generated digital instructions into physical signals through these interfaces. For example, controlling the frequency converter to adjust the motor speed through an analog output module, or controlling the opening and closing of a solenoid valve through a digital output module, thereby directly acting on the actuators (such as heaters, stirrers, pumps, valves, etc.) in the traditional Chinese medicine extraction process.
[0041] Ultimately, the goal is to achieve control over the extraction process of traditional Chinese medicine components. This control involves actively intervening in and adjusting key parameters during the extraction process, such as temperature, pressure, stirring speed, solvent flow rate, and liquid level, through the execution of the aforementioned adjustment commands. This control can be feedback control, adjusting based on the deviation between actual measured values and set values, or feedforward control, making pre-adjustments based on predicted disturbances. Through precise control, the aim is to maintain process parameters within their optimal operating range, correct abnormal deviations, ensure extraction efficiency, product quality, and process stability, and avoid material loss or product defects caused by abnormalities.
[0042] Through the above technical solution, in this embodiment of the invention, when the abnormal monitoring results clearly indicate that the deviation of the monitored variable exceeds the threshold range, the system can automatically trigger and generate corresponding control adjustment instructions, effectively avoiding the delay and subjectivity of manual judgment and intervention. Subsequently, these instructions are quickly executed through the industrial control interface, directly acting on the actuators of the traditional Chinese medicine extraction process, realizing real-time and precise control of the process flow. This not only significantly improves the timeliness and efficiency of abnormal response and effectively avoids material waste and product quality decline caused by the failure to correct abnormalities in a timely manner, but also transforms abnormal handling from highly dependent on human experience to automated, traceable intelligent control, thereby greatly reducing operational risks and ensuring the stable operation of the traditional Chinese medicine component extraction process and the uniformity of product quality.
[0043] In the above embodiments of this application, a process stage identification model is proposed to use reasoning to identify process stages. However, in its implementation, the model needs to be accurately trained to ensure the reliability of stage identification. Otherwise, the model may not be able to adapt to historical high-quality process patterns, resulting in incorrect stage label prediction, which in turn leads to misjudgment or failure of abnormal monitoring.
[0044] Based on this, in one embodiment of the present invention, the present invention also provides an anomaly monitoring method applied to the extraction of traditional Chinese medicine components, such as... Figure 2 As shown, before step S103 uses the process stage identification model to infer the standardized process state vector sequence of the current batch, the method further includes: S201, training the process stage identification model based on the set of standardized process state vector sequences of historical high-quality batches and the set of stage label sequences corresponding to historical high-quality batches; and using the cross-entropy loss function to supervise the training of the process stage identification model.
[0045] Specifically, the "training of the process stage identification model" aims to enable the model to learn and master the inherent characteristics and transition patterns of different process stages in the extraction of traditional Chinese medicine. By training with historical high-quality batch data, the model can establish a mapping relationship from process state vectors to process stage labels, thereby accurately identifying the process stage of the current batch in subsequent real-time monitoring. The training process can employ various machine learning or deep learning methods. For example, a model based on a recurrent neural network (RNN) or long short-term memory network (LSTM) can be constructed. This model can effectively process sequential data, capture the temporal dependencies in the process state vector sequence, and thus identify different process stages. Another approach is to use a model based on the Transformer architecture, whose self-attention mechanism can better capture long-distance dependencies in the sequence, improving the accuracy of stage identification. Furthermore, traditional machine learning algorithms such as support vector machines (SVM) or random forests can be used to train the stage classification model by extracting statistical features of the process state vectors as input.
[0046] Meanwhile, "supervised training of the process stage identification model using the cross-entropy loss function" is a crucial step in ensuring the model's learning effectiveness. The cross-entropy loss function, a commonly used classification loss function, measures the difference between the model's predicted probability distribution and the true label distribution. By minimizing this loss function, the model's output stage label probability distribution is made closer to reality, thereby improving the model's accuracy in classifying process stages. During supervised training, for each training sample, the model outputs a predicted stage label probability vector, while the true label is a one-hot encoded vector. The cross-entropy loss function calculates the difference between these two vectors and uses this difference as the target for model optimization. For example, a standard multi-class cross-entropy loss function can be used, suitable for the model to output the probability of each stage and compare it with the actual stage. Another approach is to use a weighted cross-entropy loss function when considering the potential imbalance in the number of samples across different process stages. This assigns higher weights to the loss of the minority classes to avoid bias towards the majority class. Furthermore, for sequence labeling tasks, training can be performed by combining a Conditional Random Field (CRF) layer with a cross-entropy loss function to capture the transition probabilities between stages, thereby further improving the overall stage identification accuracy of the sequence.
[0047] Through the above technical solution, this embodiment of the invention, before inferring the standardized process state vector sequence of the current batch using the process stage identification model, pre-trains the process stage identification model based on a set of standardized process state vector sequences of historical high-quality batches and corresponding stage label sequence sets, and uses a cross-entropy loss function for supervised training. This allows the model to fully learn and master the stage characteristics and transition rules under high-quality process modes. This effectively solves the problem of unreliable stage identification caused by untrained or insufficiently trained models, significantly improving the model's adaptability to the complex dynamics of the traditional Chinese medicine extraction process and the accuracy of stage identification. Accurate stage identification is the foundation for subsequent stage-aware dynamic threshold matching calculations, thereby avoiding misjudgments or failures in abnormal monitoring caused by incorrect stage label predictions, ensuring the reliability of abnormal monitoring results, and providing a solid technical guarantee for the stable operation of the traditional Chinese medicine component extraction process and the uniformity of product quality.
[0048] In the above embodiments of the present invention, the present invention proposes to use a process stage identification model for reasoning to identify process stages. However, in its implementation, the reasoning process lacks real-time performance and accuracy, resulting in inaccurate process stage identification and affecting the reliability of subsequent anomaly monitoring.
[0049] Based on this, the embodiments of the present invention further propose to use a process stage identification model to infer the standardized process state vector sequence of the current batch to obtain the process stage label sequence of the current batch. Specifically, it includes: inputting the standardized process state vector sequence of the current batch into the process stage identification model; extracting each window sequence segment in a sliding window manner; using the trained process stage identification model to perform real-time inference on each window sequence segment of the current batch to output the stage label probability vector at each moment of the current batch; selecting the process stage label with the largest probability value in the stage label probability vector at each moment of the current batch as the real-time process stage label at the corresponding moment to obtain the process stage label sequence of the current batch.
[0050] Specifically, inputting the standardized process state vector sequence of the current batch into the process stage identification model aims to ensure that the input data has undergone standardization, providing a consistent and reliable foundation for model inference and avoiding errors introduced by data inconsistencies. In practice, the standardized process state vector sequence can be directly transmitted to the input layer of the process stage identification model through a data interface. This can be a batch processing operation, inputting the entire sequence at once, or a streaming operation, inputting each vector in the sequence in chronological order. Alternatively, a data buffer queue mechanism can be used to temporarily store the standardized process state vector sequence and then input it into the process stage identification model in batches or one by one according to the model's processing capacity and real-time requirements, to smooth the data flow and avoid model overload or data loss.
[0051] Extracting each window sequence segment using a sliding window approach and then using a trained process stage recognition model to perform real-time inference on each window sequence segment of the current batch, outputting the stage label probability vector for each time step of the current batch, is key to achieving real-time, fine-grained stage recognition. The sliding window captures local dynamic changes and temporal features in the process, overcoming subtle fluctuations that may be overlooked in overall sequence processing, thus enhancing adaptability to process stage transitions. For example, a fixed window size (e.g., a vector containing N time steps) and a fixed sliding step size can be set (e.g., sliding once every M time steps, where M is typically less than N to achieve window overlap). The model infers for each extracted window sequence segment and outputs the probability distribution of each stage within the time period represented by the window. For each time step within the window, the stage label probability vector can be obtained by weighted averaging or taking the probability of the window's center time step. Another implementation method is to use an adaptive sliding window mechanism, dynamically adjusting the window size and sliding step size based on the rate of change of the process state or preset process feature points. For example, when the process conditions change drastically, the window size and step size can be reduced to improve sensitivity, while when the conditions are stable, the window size and step size can be increased to improve computational efficiency. The model infers for each adaptive window segment and outputs the corresponding stage label probability vector.
[0052] Selecting the process stage label with the highest probability value from the stage label probability vector corresponding to each time step of the current batch as the real-time process stage label for that time step, thus obtaining the process stage label sequence for the current batch, is a decision-making process that transforms the model's probability output into explicit stage labels. This decision-making based on the highest confidence level enhances the accuracy and reliability of stage identification. For example, for each time step, the process stage label with the highest probability value can be directly selected from its corresponding stage label probability vector as the real-time process stage label for that time step. Furthermore, to improve the stability of the label sequence, a smoothing mechanism can be introduced on top of the direct maximum probability selection. For example, considering the stage labels of the previous N time steps, if the maximum probability label at the current time step differs significantly from the label at the previous time step, but their probability values are close, smoothing may be performed through majority voting or weighted averaging to avoid frequent stage jumps.
[0053] Through the above technical solution, this embodiment of the invention inputs the standardized process state vector sequence of the current batch into the process stage identification model, ensuring the consistency and reliability of the input data and laying the foundation for subsequent inference. Furthermore, extracting each window sequence segment using a sliding window method can capture local dynamic changes and temporal features in the process, overcoming subtle fluctuations that may be ignored during overall sequence processing, thereby enhancing adaptability to process stage transitions. The trained process stage identification model is used to perform real-time inference on each window sequence segment of the current batch, effectively achieving immediate analysis and response to process data, ensuring that the inference process is synchronized with process changes, and reducing identification errors caused by delays. The stage label probability vector for each moment in the current batch is output, providing a probability distribution of the possible stages at each moment, rather than a single label, increasing the flexibility and fault tolerance of identification. Finally, the process stage label with the highest probability value in the stage label probability vector corresponding to each moment of the current batch is selected as the real-time process stage label for that moment, and decisions are made based on the highest confidence level, strengthening the accuracy and reliability of stage identification. The above technical solutions significantly improve the real-time performance and accuracy of process stage identification, effectively solving the problem of inaccurate stage identification caused by the lack of real-time performance and accuracy in the reasoning process, thereby improving the reliability of subsequent anomaly monitoring.
[0054] In the above embodiments of this application, the present invention also proposes to perform matching calculations based on process stage tag sequences to monitor anomalies. However, in its implementation, the matching calculation is not accurate and efficient enough, which may lead to the inability to accurately adapt to dynamic changes of multiple variables and multiple times, affecting the accuracy of anomaly detection or the efficiency of root cause tracing.
[0055] To address this, this embodiment of the invention further proposes to match and calculate the monitoring variable offset based on the obtained process stage label sequence of the current batch with the standard process state vector sequence of the current batch and the stage-aware dynamic threshold library. Specifically, this includes: obtaining the stage-aware dynamic threshold library; for each moment and each monitoring variable dimension in the standardized process state vector sequence of the current batch, retrieving the stage-aware dynamic threshold corresponding to the obtained process stage label and monitoring variable dimension of the current batch from the stage-aware dynamic threshold library; extracting the standardized value of the monitoring variable dimension corresponding to the current batch at the current moment from the standardized process state vector of the current batch; and calculating the monitoring variable offset based on the relationship between the extracted standardized value of the monitoring variable dimension corresponding to the current batch at the current moment and the retrieved stage-aware dynamic threshold.
[0056] The acquisition of a phase-aware dynamic threshold library aims to provide necessary reference benchmarks for subsequent anomaly monitoring. This threshold library stores the normal fluctuation ranges or statistical characteristics of various monitoring variables at different process stages in the extraction of traditional Chinese medicine. For example, this threshold library can be a multidimensional lookup table or database pre-trained and stored using historical high-quality batch data, which records in detail the normal fluctuation ranges corresponding to each process stage and each monitoring variable dimension, such as mean, standard deviation, and upper and lower limits. Furthermore, this threshold library can also be read in real-time or near real-time from a dynamically updated storage system (e.g., a distributed database or in-memory database), which may continuously optimize and adjust the thresholds through mechanisms such as incremental learning to adapt to minor changes or long-term drift in the process.
[0057] For each moment and each monitoring variable dimension in the standardized process state vector sequence of the current batch, the system retrieves the corresponding stage-aware dynamic threshold from the stage-aware dynamic threshold library. This ensures the contextual relevance and accuracy of anomaly detection. Specifically, for the process stage label and a specific monitoring variable dimension at the current moment, the system performs an exact match query in the pre-built stage-aware dynamic threshold library. For example, it quickly locates the dynamic threshold (such as upper limit, lower limit, or statistical distribution parameter) corresponding to the stage and variable through hash mapping or index lookup. Alternatively, fuzzy matching or rule-based retrieval strategies can be used. When an exact match threshold does not exist, interpolation or inference is performed based on the thresholds of similar stages or adjacent variables to address data sparsity or new operating conditions, thereby improving the system's robustness.
[0058] The standardized values of the monitoring variable dimensions corresponding to the current batch at the current moment are extracted from the standardized process state vector of the current batch. This aims to obtain the actual measured values of the process parameters at the current moment for comparison with dynamic thresholds. This can be achieved by directly accessing and extracting the values corresponding to specific monitoring variable dimensions from the standardized process state vector at the current moment using indexes or field names. For example, if the standardized process state vector is an array, it is obtained through array indices; if the vector is a dictionary or structure, it is obtained through key names. In another implementation, a data validation can be performed before extraction to ensure that the extracted values are within a reasonable range, avoiding subsequent calculation anomalies due to data acquisition or preprocessing errors, thereby improving data reliability.
[0059] Based on the relationship between the extracted standardized values of the monitoring variables corresponding to the current batch at the current moment and the retrieved stage-aware dynamic threshold, the monitoring variable offset is calculated. Its purpose is to quantify the degree of deviation between the current process state and the normal range. For example, the distance between the standardized value and the threshold range (e.g., upper and lower limits) can be calculated. If the standardized value exceeds the upper limit, the offset can be defined as (standardized value - upper limit); if it is below the lower limit, the offset is (lower limit - standardized value); and within the threshold range, the offset is 0. Alternatively, the deviation between the standardized value and the stage mean can be calculated and divided by the standard deviation (Z-score) to represent the offset in a standardized manner. In more complex implementations, multivariate statistical methods can be used, such as calculating the probability that the standardized value falls outside the threshold distribution, or using multivariate statistics such as Mahalanobis distance to measure the offset, taking into account the correlation between variables and thus providing a more comprehensive anomaly assessment.
[0060] Through the above technical solutions, this invention significantly improves the accuracy and efficiency of anomaly monitoring by refining the processing of each moment and each monitored variable dimension, and combining it with dynamic thresholds based on stage perception for matching calculations. Specifically, acquiring a dynamic threshold library based on stage perception provides fundamental data for dynamically adapting to the complexity of the traditional Chinese medicine extraction process; precise retrieval of each moment and each monitored variable dimension ensures the contextual relevance of anomaly judgment, effectively reducing false alarms and false negatives; extracting standardized values provides real process status data; and the offset calculation based on the relationship between standardized values and dynamic thresholds can quantify the degree of anomaly and directly indicate the specific variables that deviate from the normal range, thereby facilitating the rapid identification of the root cause variables of the anomaly and greatly improving the efficiency and traceability of anomaly diagnosis. This meticulous matching calculation method enables the system to more accurately capture the dynamic changes of multiple variables and multiple stages in the traditional Chinese medicine extraction process, thereby effectively solving the problems of insufficient matching accuracy and efficiency.
[0061] Secondly, the extraction process of traditional Chinese medicine components is a core link in the manufacturing of traditional Chinese medicine. This process is complex and dynamic, involving the precise control of various process parameters such as temperature, pressure, stirring speed, solvent flow rate, and liquid level. However, existing technologies for monitoring anomalies in this process suffer from several limitations: a lack of multi-parameter collaborative analysis capabilities, static thresholds that cannot adapt to dynamic multi-stage processes, and difficulties in tracing the root causes of anomalies. This results in the inability to identify hidden quality anomalies even when all process parameters are within the set range. Furthermore, static threshold settings are prone to false alarms or missed alarms, affecting product quality uniformity and increasing the risk of material waste.
[0062] To address the aforementioned shortcomings, this invention provides an anomaly monitoring device for the extraction of traditional Chinese medicine components. This device utilizes a modular design to achieve multi-parameter collaborative analysis and stage-adaptive monitoring. Specifically, as shown... Figure 3 As shown, the device 30 includes a data acquisition module 301, used to acquire multi-source process data of the current batch during the extraction of traditional Chinese medicine using a multi-dimensional sensor network; a preprocessing module 302, used to preprocess the multi-source process data to obtain a standardized process state vector sequence of the current batch; an inference module 303, used to infer the standardized process state vector sequence of the current batch using a process stage identification model to obtain a process stage label sequence of the current batch; a matching calculation module 304, used to match and calculate the standard process state vector sequence of the current batch with a stage-aware dynamic threshold library based on the obtained process stage label sequence of the current batch to obtain the monitoring variable offset; and an anomaly monitoring module 305, used to monitor the obtained monitoring variable offset for anomalies and obtain anomaly monitoring results.
[0063] In this embodiment of the invention, by combining the process stage identification model with a stage-aware dynamic threshold library through dynamic matching, multi-parameter collaborative analysis and stage-adaptive threshold adjustment of the traditional Chinese medicine extraction process are achieved. Specifically, the inference module 303 dynamically identifies the process stage label sequence based on the standardized process state vector sequence, enabling the matching calculation module 304 to retrieve the corresponding threshold from the stage-aware dynamic threshold library according to the real-time process stage, avoiding the limitations of static thresholds in adapting to dynamic changes in multiple stages such as heating, reflux, and concentration. Simultaneously, the standardized process state vector sequence generated by the preprocessing module 302 integrates multi-source process parameters, allowing the calculation of the monitoring variable offset to reflect the coupling relationship between variables and effectively identify hidden quality anomalies that cannot be captured by a single parameter exceeding its limit. Furthermore, the anomaly monitoring module 305 directly makes judgments based on the monitoring variable offset, achieving rapid anomaly location and root cause tracing by quantifying the degree of deviation.
[0064] Through the above technical solutions, the embodiments of the present invention can accurately distinguish between normal process fluctuations and real anomalies, significantly reduce false alarms and missed alarms, and improve the response efficiency of operators to alarm signals. At the same time, the adaptive adjustment mechanism of the stage-aware dynamic threshold library ensures the optimization of monitoring sensitivity under different process stages, while the quantitative output of the monitoring variable offset provides traceable data for tracing the root causes of anomalies, thereby systematically improving the monitoring accuracy of the extraction process of traditional Chinese medicine components, the uniformity of product quality, and the utilization rate of production resources.
[0065] In the above embodiments of the present invention, the present invention also proposes a process stage identification model for inferring process stage label sequences. However, in its implementation, if the model training is inaccurate or not robust, it may lead to stage identification errors, thereby affecting the accuracy of anomaly monitoring and increasing the risk of false alarms or missed alarms.
[0066] Based on this, in one embodiment of the present invention, an abnormality monitoring device for the extraction of traditional Chinese medicine components is further proposed, such as... Figure 4 As shown, the device 40 includes a model training module 401, which is used to train the process stage identification model based on the set of standardized process state vector sequences of historical high-quality batches and the set of stage label sequences corresponding to historical high-quality batches before the inference module 303 uses the process stage identification model to infer the standardized process state vector sequence of the current batch; and to use the cross-entropy loss function to supervise the training of the process stage identification model.
[0067] The model training module 401 is a core component of the device 40, whose main function is to manage and execute the training process of machine learning models. Specifically, this module can be a standalone software unit deployed on a server or dedicated computing device, efficiently completing model training tasks by calling the application programming interfaces (APIs) provided by mature machine learning frameworks (e.g., TensorFlow, PyTorch, etc.). Furthermore, this module can also be designed as an integrated subsystem of an anomaly monitoring system, specifically responsible for handling training data preprocessing, selecting appropriate model architectures, optimizing and adjusting model parameters, and monitoring the entire training process in real time to ensure training quality and efficiency.
[0068] The process stage identification model is trained using a standardized set of process state vector sequences based on historical high-quality batches and a set of corresponding stage label sequences. This technical feature aims to provide high-quality, representative training data for the process stage identification model. By collecting a large amount of process data from historical high-quality batches (i.e., batches that successfully produced products meeting quality standards) and combining it with human expert experience or automated algorithms to generate corresponding stage labels, this data is used as input for supervised learning, enabling the model to learn and internalize the normal and stable dynamic patterns of the traditional Chinese medicine extraction process. For example, one approach is to first rigorously screen historical data to ensure that only high-quality batch data without anomalies is included, and then have domain experts label the key time points in these batch data to form accurate stage label sequences. Another approach is to utilize transfer learning strategies, first pre-training the base model on a general large-scale process dataset, and then fine-tuning the pre-trained model using a small amount of carefully labeled historical high-quality batch data to better adapt it to the specific dynamic patterns and characteristics of the traditional Chinese medicine extraction process.
[0069] The process stage identification model is trained under supervised conditions using the cross-entropy loss function, which serves as a key optimization objective during training. Its role is to quantify the difference between the model's predicted stage label probability distribution and the actual stage label distribution, guiding iterative updates of the model parameters based on this difference. Specifically, for multi-class classification problems, a classification cross-entropy loss function can be used. This function effectively penalizes the model's predictions of incorrect classes and encourages the model to make higher probability predictions of correct classes, thereby improving classification accuracy. Furthermore, to further enhance the model's generalization ability and prevent overfitting, the cross-entropy loss function can be combined with various regularization techniques (e.g., L1 / L2 regularization, Dropout, etc.) to ensure the model maintains good performance even when facing new and unseen data.
[0070] Through the above technical solutions, the embodiments of the present invention can effectively solve the problems of inaccurate or unrobust training of process stage identification models. Specifically, by training the process stage identification model based on a standardized set of process state vector sequences and corresponding stage label sequences from historical high-quality batches, the model is ensured to learn the normal and stable dynamic patterns of the traditional Chinese medicine extraction process, thereby avoiding model bias caused by data noise or lack of representativeness and significantly improving the generalization ability of stage identification. Simultaneously, the process stage identification model is trained under supervision using the cross-entropy loss function, which optimizes model parameters for classification tasks, minimizes prediction errors, and makes the stage label probability vectors output by the model more accurate, thereby enhancing the reliability of stage identification. These measures work synergistically to enable the process stage identification model to more accurately identify each stage in the traditional Chinese medicine extraction process, providing a more reliable stage label sequence for the subsequent matching calculation module. This effectively reduces false alarms and missed alarms in anomaly monitoring caused by stage identification errors, ultimately improving the accuracy and reliability of the entire anomaly monitoring device.
[0071] Thirdly, corresponding to Figure 1 or Figure 2 The present invention also provides a computer device, such as an abnormal monitoring method applied to the extraction of components from traditional Chinese medicine. Figure 5 As shown, the computer device 50 includes a memory 501, a processor 502, and a computer program stored in the memory 501 and executable on the processor 502. When the processor 502 executes the computer program, it implements the above-mentioned abnormal monitoring method applied to the extraction of Chinese herbal medicine components.
[0072] Specifically, the memory 501 and processor 502 mentioned above can be general-purpose memory and processor, without any specific limitations. When the processor 502 runs the computer program stored in the memory 501, it can execute the above-mentioned abnormal monitoring method applied to the extraction of traditional Chinese medicine components.
[0073] Fourthly, corresponding to Figure 1 or Figure 2 The present invention also provides a computer-readable storage medium for anomaly monitoring methods applied to the extraction of traditional Chinese medicine components. This computer-readable storage medium stores computer-executable instructions, which, when invoked or executed by a processor, cause the processor to implement the anomaly monitoring method applied to the extraction of traditional Chinese medicine components. Through the above technical solution, the computer-readable storage medium, as a physical carrier, enables the anomaly monitoring method to be persistently stored and deployed on different devices, solving the problem of reliance on human experience.
[0074] The following is a more specific example to illustrate the above-mentioned technical solution of the present invention in more detail: In a traditional Chinese medicine ingredient extraction plant, it is necessary to monitor the extraction process of active ingredients in a batch of medicinal materials in real time to ensure product quality and process stability. This extraction process is a typical multi-stage dynamic process, involving multiple links such as feeding, heating, heat preservation, and cooling. The process parameters of each link (such as temperature, pressure, stirring speed, solvent flow rate, liquid level, pH value, conductivity, etc.) have their specific normal fluctuation range and interaction relationships.
[0075] First, a multi-dimensional sensor network is deployed on the extraction equipment, including temperature sensors, pressure sensors, flow meters, level gauges, stirring speed sensors, pH sensors, and conductivity sensors. These sensors continuously collect multi-source process data for the current batch of traditional Chinese medicine extraction during the extraction process. For example, readings from all sensors are collected every few seconds, forming a high-dimensional time-series data stream.
[0076] Next, the collected multi-source process data undergoes preprocessing. This includes data cleaning (noise removal and missing value imputation), unit unification, and standardization. For example, data of different dimensions such as temperature, pressure, and flow rate are converted into uniform dimensionless values using min-max normalization or Z-score standardization methods, thus obtaining a standardized process state vector sequence for the current batch. This standardization process ensures the comparability of different parameters in subsequent analyses and lays the foundation for multi-parameter collaborative analysis, avoiding the limitations of judging based on single parameter limits.
[0077] Before real-time monitoring can be implemented, a process stage identification model needs to be trained. This model is trained based on a standardized set of process state vector sequences from historical high-quality batches and a set of stage label sequences corresponding to these batches, annotated by experts. For example, historical data is labeled as "feeding stage," "heating stage," "heating stage," and "cooling stage." During training, a cross-entropy loss function is used to supervise the model's training, enabling it to accurately learn and identify the characteristic patterns of different process stages.
[0078] During the extraction process of the current batch, the preprocessed standardized process state vector sequence is input into the trained process stage recognition model. The model extracts each window sequence segment using a sliding window approach and performs real-time inference on these segments. For example, the model analyzes the data segment of the most recent minute and outputs the stage label probability vector for each moment in the current batch. This vector represents the probability that the current moment belongs to each process stage. The system selects the process stage label with the highest probability value from the stage label probability vectors corresponding to each moment in the current batch as the real-time process stage label for that moment, thus obtaining the process stage label sequence for the current batch. For example, in the early stage of extraction, the model identifies it as the "heating stage"; when the temperature reaches the set value and stabilizes, the model identifies it as the "heat preservation stage". This dynamic stage recognition capability can solve the problem that traditional static thresholds cannot adapt to multi-stage processes.
[0079] Based on the obtained process stage label sequence of the current batch, the system matches the standardized process state vector sequence of the current batch with a stage-aware dynamic threshold library to calculate the monitoring variable offset. Specifically, the system first obtains the stage-aware dynamic threshold library, which stores the normal fluctuation range (i.e., dynamic threshold) of each monitoring variable dimension under each process stage. For each moment and each monitoring variable dimension in the standardized process state vector sequence of the current batch, the system retrieves the stage-aware dynamic threshold corresponding to the process stage label and monitoring variable dimension identified at the current moment from the stage-aware dynamic threshold library. For example, in the "heating stage," the dynamic threshold of temperature may be an increasing range; while in the "heat preservation stage," the dynamic threshold of temperature is a stable range. Subsequently, the system extracts the standardized value of the monitoring variable dimension corresponding to the current batch at the current moment from the standardized process state vector of the current batch. Finally, based on the relationship between the extracted standardized value and the retrieved stage-aware dynamic threshold, the monitoring variable offset is calculated. For example, if the current moment is in the "heat preservation stage," and the standardized value of the actual temperature deviates significantly from the temperature dynamic threshold corresponding to the "heat preservation stage," the calculated offset will be large. This dynamic threshold mechanism with stage awareness can accurately reflect the normal fluctuation range of different process stages, significantly reduce the occurrence of false alarms and false alarms, and overcome the shortcomings of static thresholds that cannot adapt to dynamic and ever-changing processes.
[0080] Finally, the obtained monitoring variable offsets are monitored for anomalies to obtain anomaly monitoring results. If the anomaly monitoring results indicate that the obtained monitoring variable offsets are within the threshold range, meaning that all monitoring variables are within the normal fluctuation range of the current process stage, the process is considered normal. At this point, the system adopts an incremental learning approach, updating the stage-aware dynamic threshold library based on the standardized process state vector sequence of the current batch. This means that the system will continuously optimize and adjust the dynamic thresholds of each stage based on the continuously accumulated normal process data, making them more accurate and robust, and further improving the accuracy of monitoring. If the anomaly monitoring results indicate that the obtained monitoring variable offsets exceed the threshold range, for example, if the offset of the stirring speed is too large in the "heat preservation stage," indicating an abnormal stirring, the system will immediately trigger the generation of control adjustment commands. For example, generating a command to "adjust the stirring motor power." Subsequently, this control adjustment command is executed through the industrial control interface to achieve real-time control of the process flow for the extraction of traditional Chinese medicine components. This instant response and automatic adjustment capability can not only correct process deviations in a timely manner, avoid the occurrence of hidden quality anomalies, and reduce material waste, but also provide specific clues for subsequent root cause tracing by clearly identifying which variable is abnormal at which stage, thereby improving diagnostic efficiency.
[0081] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, modifications can still be made to the embodiments. 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. An anomaly monitoring method applied to the extraction of components from traditional Chinese medicine, characterized in that, The method includes: Multi-dimensional sensor networks are used to collect multi-source process data for the current batch during the extraction of traditional Chinese medicine. The multi-source process data is preprocessed to obtain a standardized process state vector sequence for the current batch; The process stage identification model is used to infer the standardized process state vector sequence of the current batch to obtain the process stage label sequence of the current batch. Based on the obtained process stage label sequence of the current batch, the standard process state vector sequence of the current batch is matched and calculated with the stage-aware dynamic threshold library to obtain the monitoring variable offset. The obtained offset of the monitoring variable is used for anomaly monitoring to obtain anomaly monitoring results.
2. The anomaly monitoring method according to claim 1, characterized in that, The method further includes: When the abnormal monitoring results indicate that the obtained monitoring variable offset is within the threshold range, the stage perception dynamic threshold library is updated based on the standardized process state vector sequence using an incremental learning method.
3. The anomaly monitoring method according to claim 1, characterized in that, The method further includes: When the abnormal monitoring results indicate that the offset of the obtained monitoring variable exceeds the threshold range, a control adjustment command is triggered. The control adjustment instructions are executed through the industrial control interface to control the process flow of extracting Chinese herbal medicine components.
4. The anomaly monitoring method according to claim 1, characterized in that, Before inferring the standardized process state vector sequence of the current batch using the process stage identification model, the method further includes: A process stage identification model is trained based on a set of standardized process state vector sequences from historical high-quality batches and a set of stage label sequences corresponding to historical high-quality batches. The process stage identification model is trained under supervision using the cross-entropy loss function.
5. The anomaly monitoring method according to any one of claims 1 to 4, characterized in that, The step of using a process stage identification model to infer the standardized process state vector sequence of the current batch to obtain the process stage label sequence of the current batch includes: Input the standardized process state vector sequence of the current batch into the process stage identification model; Each window sequence segment is extracted using a sliding window method. The trained process stage identification model is used to perform real-time inference on each window sequence segment of the current batch, and outputs the stage label probability vector for each moment of the current batch. The process stage label with the highest probability value in the stage label probability vector corresponding to each moment of the current batch is selected as the real-time process stage label for the corresponding moment, thus obtaining the process stage label sequence of the current batch.
6. The anomaly monitoring method according to any one of claims 1 to 4, characterized in that, Based on the obtained process stage label sequence of the current batch, the standard process state vector sequence of the current batch is matched and calculated with the stage-aware dynamic threshold library to obtain the monitoring variable offset, including: Acquire a phase-aware dynamic threshold library; For each moment and each monitoring variable dimension in the standardized process state vector sequence of the current batch, retrieve the stage-aware dynamic threshold corresponding to the obtained process stage label and monitoring variable dimension of the current batch from the stage-aware dynamic threshold library. Extract the standardized value of the monitoring variable dimension corresponding to the current batch at the current moment from the standardized process state vector of the current batch; The monitoring variable offset is calculated based on the relationship between the standardized value of the monitoring variable dimension corresponding to the current batch at the current time and the retrieved stage-aware dynamic threshold.
7. An anomaly monitoring device applied to the extraction of components from traditional Chinese medicine, characterized in that, The device includes: The data acquisition module is used to collect multi-source process data of the current batch during the extraction of traditional Chinese medicine using a multi-dimensional sensor network. The preprocessing module is used to preprocess the multi-source process data to obtain a standardized process state vector sequence for the current batch. The reasoning module is used to reason about the standardized process state vector sequence of the current batch using the process stage identification model to obtain the process stage label sequence of the current batch. The matching calculation module is used to match the standard process state vector sequence of the current batch with the stage-aware dynamic threshold library based on the obtained process stage label sequence of the current batch to obtain the monitoring variable offset. The anomaly monitoring module is used to monitor the anomalies of the obtained monitoring variable offsets and obtain anomaly monitoring results.
8. The anomaly monitoring device according to claim 7, characterized in that, The device includes: The model training module is used to train the process stage identification model based on the set of standardized process state vector sequences of historical high-quality batches and the set of stage label sequences corresponding to historical high-quality batches before the inference module uses the process stage identification model to infer the standardized process state vector sequence of the current batch. The cross-entropy loss function is used to supervise the training of the process stage identification model.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 6.
10. A computer storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions that, when invoked or executed by a processor, cause the processor to perform the method as described in any one of claims 1 to 6.