A method, system and device for controlling drug quality based on Monascus

By using the combination of random probability function and multiple detection technologies in the quality control of Aspergillus drug, using large language models and machine learning for data processing, the problems of low production efficiency and high cost in the existing technology are solved, and the drugs are realized Real-time monitoring and automated adjustment of quality improve the consistency and safety of product quality.

CN118350711BActive Publication Date: 2024-11-26TIBET RED YEAST BIOLOGICAL CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410530121.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-29
Publication Date
2024-11-26
Estimated Expiration
2044-04-29

AI Technical Summary

Technical Problem

The existing Aspergillus drug quality control technology has problems such as low production efficiency, high production costs and sensitivity to environmental conditions, and the application of high-tech methods requires high equipment investment and professional talents.

Method used

Using drug extraction and detection methods based on random probability functions, combined with data from high-performance liquid chromatograph, microbial detection system, atomic absorption spectrometer and stability test chamber, data processing and early warning information are generated through large language models and machine learning technology. Automatically adjust the production process.

Benefits of technology

It improves production efficiency, reduces production costs, realizes real-time monitoring and automated adjustment of drug quality, and improves the consistency and safety of product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118350711B_ABST
    Figure CN118350711B_ABST
Patent Text Reader

Abstract

The present application discloses a method, system and equipment for controlling the quality of medicines based on Monascus, which relates to the field of microbial technology. The method comprises: after each batch is completed in the production process, extracting medicines on the production line based on a random probability function to obtain finished capsules; testing the finished capsules to obtain target test results; inputting the target test results into an information management system to generate early warning information of potential quality problems based on the test results and historical data; and adjusting the production process based on the early warning information. Through the scheme of the present application, production efficiency can be improved and production costs can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of microbial technology, and in particular to a method, system and equipment for controlling the quality of medicines based on Monascus. Background Art

[0002] Monascus is an important industrial microorganism that is widely used in the food and pharmaceutical industries, especially in the production of lipid-lowering drugs such as Monascus erythromycin. Monascus can produce a series of secondary metabolites, which have potential benefits for human health. Therefore, the quality control of Monascus drugs is very important to ensure the safety and effectiveness of the final product. Existing Monascus drug quality control technologies mainly include biochemical analysis, microbial detection, and genetic stability testing. The working principle of these technologies is mainly to evaluate the quality of the product by detecting the content of active ingredients and impurities in raw materials, intermediates in the production process, and final products. Although these methods are effective to a certain extent, they have some problems, such as long time consumption, high cost, and sensitivity to environmental conditions.

[0003] To solve the above problems, in recent years, the industry has begun to explore the use of modern biotechnology and information technology, such as gene editing and computer simulation prediction technology. Through gene editing technology, the metabolic pathway of Monascus can be precisely regulated, thereby improving the yield and purity of the target product; computer simulation prediction technology can predict possible problems before production and optimize the production process. However, these new methods also have defects. For example, gene editing technology may introduce unexpected biosafety issues, and computational simulation relies on the accuracy and comprehensiveness of existing data. Insufficient or poor quality data may lead to inaccurate predictions. In addition, the application of these high-tech methods requires high equipment investment and professional talents, which may limit their popularity.

[0004] Therefore, there is an urgent need for a technical solution to improve production efficiency and reduce production costs. Summary of the invention

[0005] In order to solve the deficiencies of the prior art, the embodiments of the present application provide a method, system and device for controlling the quality of medicines based on Monascus. The present application solves the technical problems of low production efficiency and high production cost in the prior art.

[0006] The present application embodiment provides a method for controlling the quality of drugs based on Monascus, comprising: after each batch is completed in the production process, extracting drugs on the production line based on a random probability function to obtain finished capsules; wherein the random probability function includes: P(k) = Nkp k (1-p) N-k, wherein P represents the extraction probability, k represents the target number of capsules to be extracted, p represents the extraction probability of each capsule, and N represents the total number of capsules; testing the finished capsules to obtain target detection results; inputting the target detection results into an information management system to generate early warning information of potential quality problems based on the detection results and historical data; and adjusting the production process based on the early warning information.

[0007] In a possible implementation, the finished capsules are tested to obtain target test results, including: using a high performance liquid chromatograph to quantitatively analyze the active ingredients and impurities in red yeast rice; using a microbial detection system to automatically culture and count to detect microbial limits; using an atomic absorption spectrometer for quantitative analysis of heavy metals; using a stability test chamber to simulate the storage conditions of drugs under different environments to perform accelerated aging tests; and fusing the output results of the high performance liquid chromatograph, the microbial detection system, the atomic absorption spectrometer and the stability test chamber as the target test results.

[0008] In a possible implementation, the output results of a high performance liquid chromatograph, a microbial detection system, an atomic absorption spectrometer and a stability test chamber are integrated as target detection results, including: inputting the outputs of the high performance liquid chromatograph, the microbial detection system, the atomic absorption spectrometer and the stability test chamber into a large language model to obtain an output of a fixed sentence pattern; and performing word embedding processing on the output of the fixed sentence pattern to obtain a target detection result.

[0009] In a possible implementation, the target detection results are input into an information management system to generate early warning information of potential quality problems based on the detection results and historical data, including: performing data cleaning on the target detection results, the data cleaning is used for feature engineering to obtain a feature sequence; constructing a quality classification model, the quality classification model is used to classify the feature sequence to obtain a quality grade; wherein the quality grades include qualified, warning and unqualified; and when the quality grade is unqualified, collecting real-time production parameters, the production parameters are used to input an anomaly detection model to obtain abnormal conditions in the production process.

[0010] In a possible implementation, data cleaning is performed on the target detection result, and the data cleaning is used for feature engineering to obtain a feature sequence, including: automatically identifying and processing missing values, outliers and erroneous data to obtain a complete sequence; and feature engineering is performed on the complete sequence to extract a feature sequence; wherein the feature engineering method includes: in, represents the feature sequence, f decoder represents the decoder function, f encoderrepresents the encoder function, X represents the complete sequence, and R represents the random projection moment.

[0011] In a possible implementation, adjusting the production process according to the early warning information includes: when the quality level is not qualified, passing the feature sequence, the output of the quality classification model and the output of the anomaly detection model into the cause identification model to obtain the target cause; wherein the target cause includes raw material quality, environmental conditions or operational errors; and feeding back the target cause to the production control department to initiate corrective and preventive measures.

[0012] In a possible implementation, when the quality level is not qualified, before the feature sequence, the output of the quality classification model and the output of the anomaly detection model are passed into the cause identification model to obtain the target cause, it also includes: performing self-supervised comparative learning on the cause identification model based on historical data to train the cause identification model.

[0013] In a possible implementation, the self-supervised contrastive learning includes: generating a random mask based on a preset algorithm to cover historical data.

[0014] The embodiment of the present application also provides a drug quality control system based on Monascus, including: a sampling unit, a detection unit, an early warning unit and a feedback unit; wherein the sampling unit is used to extract drugs on the production line based on a random probability function after each batch is completed in the production process to obtain finished capsules; the detection unit is used to detect the finished capsules to obtain target detection results; the early warning unit is used to input the target detection results into an information management system to generate early warning information of potential quality problems based on the detection results and historical data; and the feedback unit is used to adjust the production process according to the early warning information.

[0015] An embodiment of the present application also provides a drug quality control device based on Monascus, comprising: a processor, a memory, and a system bus; wherein the processor and the memory are connected via the system bus; the memory is used to store one or more programs, and the one or more programs include instructions, which, when executed by the processor, enable the processor to execute the method described in the above embodiment.

[0016] Through the Monascus-based drug quality control method, system and equipment provided above, the embodiments of the present application can improve production efficiency and reduce production costs by introducing machine learning large model technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 A schematic flow chart of a method for controlling the quality of a drug based on Monascus provided in an embodiment of the present application;

[0019] Figure 2 A schematic diagram of a drug quality control system based on Monascus provided in an embodiment of the present application. DETAILED DESCRIPTION

[0020] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.

[0021] Those skilled in the art can understand that the terms "first", "second" and the like in the embodiments of the present disclosure are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor represent the necessary logical order between them. It should also be understood that in the embodiments of the present disclosure, "multiple" can refer to two or more, and "at least one" can refer to one, two or more. It should also be understood that for any component, data or structure mentioned in the embodiments of the present disclosure, in the absence of explicit limitation or contrary revelation given in the context, it can generally be understood as one or more. In addition, the term "and / or" in the present disclosure is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present disclosure generally indicates that the associated objects before and after are an "or" relationship. It should also be understood that the description of each embodiment in the present disclosure emphasizes the differences between the embodiments, and the same or similar parts can refer to each other. For the sake of brevity, they will not be repeated one by one.

[0022] At the same time, it should be understood that, for ease of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present disclosure and its application or use. The techniques, methods and devices known to ordinary technicians in the relevant fields may not be discussed in detail, but where appropriate, the techniques, methods and devices should be considered part of the specification. It should be noted that similar numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further discussed in subsequent drawings.

[0023] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0024] Figure 1 A schematic flow chart of a method for controlling drug quality based on Monascus provided in an embodiment of the present application.

[0025] like Figure 1 As shown, at step S101, after each batch is completed in the production process, the drugs on the production line are sampled based on the random probability function to obtain finished capsules. Specifically, whenever a production batch is completed, a sample of finished capsules is randomly selected from the production line immediately, and this process is achieved by an automated sampling system based on a random probability function. The random probability function is a mathematical tool that ensures that each finished capsule has an equal chance of being selected for quality inspection. This method can significantly reduce human selection bias and improve the representativeness and accuracy of sampling. The random sampling process usually includes steps such as setting the sampling ratio, defining random seeds, and generating random numbers. The setting of the sampling ratio and random seeds directly affects the randomness and coverage of the sampling. The collected samples will be sent to the laboratory for detailed quality analysis, including component content testing, solubility testing, appearance and size inspection, etc. Through these comprehensive tests, it can be ensured that each batch of finished capsules meets strict quality standards not only in terms of chemical composition but also in physical form. In one embodiment, the random probability function includes:

[0026] P(k)=Nkp k (1-p) N-k ,

[0027] Among them, P represents the extraction probability, k represents the target number of extracted capsules, p represents the extraction probability of each capsule, and N represents the total number of capsules.

[0028] At step S102, the finished capsules are tested to obtain the target test results. Specifically, it includes using a high performance liquid chromatograph to quantitatively analyze the active ingredients and impurities in red yeast rice. This technology can quickly and accurately identify and measure the concentration of drug ingredients through efficient column separation and precise detectors, ensuring the consistency of active ingredients in each batch of products and the control of impurities within a safe range.

[0029] Use the microbial detection system to automatically culture and count to test the microbial limit. The system can automatically complete the inoculation, culture and counting of samples in a short time, quickly detect the microbial limit in the finished product, and ensure the microbial safety of the product.

[0030] Atomic absorption spectrometer is used for quantitative analysis of heavy metals. The concentration of heavy metals is determined by measuring the amount of light absorbed at a specific wavelength in the sample, thereby assessing its potential risk to human health.

[0031] Use the stability test chamber to simulate the storage conditions of drugs in different environments for accelerated aging testing. By controlling the temperature, humidity and light conditions in the chamber, the stability performance of the drug during actual storage can be predicted to ensure the efficacy and safety of the drug under long-term storage.

[0032] And the output results of the high performance liquid chromatograph, the microbial detection system, the atomic absorption spectrometer and the stability test chamber are merged to serve as the target detection result. In one embodiment, it includes: inputting the output of the high performance liquid chromatograph, the microbial detection system, the atomic absorption spectrometer and the stability test chamber into a large language model to obtain the output of a fixed sentence; and performing word embedding processing on the output of the fixed sentence to obtain the target detection result.

[0033] The output data of the above four devices are input into a large language model. This large language model uses advanced machine learning algorithms to combine the data of various detection technologies to generate a fixed-format output. This output not only contains the data obtained from each device, but also integrates the potential correlations between these data, providing the basis for the final interpretation.

[0034] Next, the fixed sentence output of the large language model is processed by word embedding. Word embedding is a text processing technology that converts words into a series of numbers so that these numbers can represent the semantic content of the words. Through word embedding processing, the output of the model can be converted into a form more suitable for computer processing, and the information contained therein can be further extracted and utilized.

[0035] At step S103, the target detection result is input into the information management system to generate early warning information of potential quality problems based on the detection result and historical data. In the embodiment of the present application, it includes: data cleaning of the target detection result, and the data cleaning is used for feature engineering to obtain a feature sequence. Further, it includes: automatically identifying and processing missing values, outliers and erroneous data to obtain a complete sequence; and feature engineering of the complete sequence to extract a feature sequence.

[0036] Data cleaning is an important part of data preprocessing, which aims to improve the quality of data and make it more suitable for subsequent analysis and processing. During the data cleaning stage, feature engineering is required, which is a technique that uses information in the data to create features that contribute to the performance of the algorithm. The process of feature engineering usually includes selecting features that are highly correlated with the target variable, constructing new features, and transforming features.

[0037] The main tasks of data cleaning include automatically identifying and handling missing values, outliers, and erroneous data. The handling of missing values ​​may include filling (such as using the median, mean, etc.), deletion, or interpolation. Outlier handling may involve removing or correcting these values, especially those data points that may be caused by measurement errors or entry errors. Correction of erroneous data usually requires certain business rules or algorithms to determine the correctness of the data and perform corresponding processing.

[0038] After data cleaning, the resulting complete data sequence is further subjected to feature engineering. This involves extracting feature sequences suitable for model learning. Feature extraction may involve statistical analysis methods, model-based methods, or deep learning methods that can extract useful information from raw data for building predictive models. With these advanced features, the model can more accurately identify potential quality issues and issue early warnings.

[0039] In one embodiment, the feature engineering method comprises:

[0040]

[0041] in, represents the feature sequence, f decoder represents the decoder function, f encoder represents the encoder function, X represents the complete sequence, and R represents the random projection moment.

[0042] Next, a quality classification model is constructed, wherein the quality classification model is used to classify the feature sequence to obtain a quality grade; wherein the quality grade includes qualified, warning and unqualified; and when the quality grade is unqualified, real-time production parameters are collected, and the production parameters are used to input an anomaly detection model to obtain abnormal conditions in the production process.

[0043] Specifically, the model is based on feature sequences obtained previously through data cleaning and feature engineering steps. These feature sequences are converted from data collected during the product inspection process and preprocessed to improve data quality and relevance. The quality classification model can be based on statistical methods such as logistic regression, support vector machine, etc., or it can be based on deep learning neural network models such as convolutional neural network or recurrent neural network, depending on the complexity of the features and the amount of data.

[0044] The output of the model is a quality grade, which is usually divided into three levels: pass, warning and fail. Pass means that the product meets all quality standards and no further intervention is required; warning means that the product may have minor problems that require attention but not necessarily immediate treatment; and fail means that the product has obvious quality problems and action must be taken.

[0045] When the quality classification model determines that the product quality level is not "qualified", the system will automatically trigger the collection of real-time production parameters. These parameters include but are not limited to the speed, temperature, pressure and other key performance indicators of machine operation, which can be obtained in real time from the sensors and monitoring systems of the production line. Collecting these real-time production parameters is to further analyze possible abnormalities in the production process, which is crucial to quickly identify the source of the problem and prevent the problem from expanding.

[0046] The collected real-time production parameters are then fed into an anomaly detection model. The anomaly detection model is usually built to identify data patterns that deviate from regular production patterns. The model may use rule-based methods such as control chart technology, or more advanced machine learning methods such as isolation forests, autoencoders, etc., which are effective in identifying anomalies from large amounts of production data.

[0047] Through such a system configuration, continuous monitoring and real-time quality control of the production process can be achieved, thereby significantly improving product quality assurance capabilities and production efficiency. In addition, the system can also automatically adjust production parameters based on detected problems to prevent more unqualified products from being produced, ensuring the stable operation of the production line and the consistency of product quality.

[0048] At step S104, the production process is adjusted according to the warning information. When the quality level is not qualified, the feature sequence, the output of the quality classification model and the output of the anomaly detection model are input into the cause identification model to obtain the target cause; wherein the target cause includes raw material quality, environmental conditions or operation errors; the target cause is fed back to the production control department to initiate corrective and preventive measures.

[0049] Specifically, when the quality level in the production process does not meet the standard (i.e., it is not "qualified"), the production control system automatically triggers a series of analysis and feedback steps. First, the system collects relevant feature sequences, the output results of the quality classification model, and the output results of the anomaly detection model. Together, these data provide comprehensive information for subsequent cause identification.

[0050] Next, this comprehensive data will be input into a cause identification model. The model is designed to identify the main causes of quality problems from complex data. The cause identification model can be based on machine learning techniques such as decision trees, random forests, or deep learning networks, which are able to process large amounts of data and learn from them the potential factors that cause problems. The output of the cause identification model includes but is not limited to factors such as raw material quality, environmental conditions, or operating errors. These factors are common causes that affect product quality, including:

[0051] Raw material quality: Identify whether the raw materials have quality issues, such as inconsistent ingredients, expiration or contamination.

[0052] Environmental conditions: Analyze whether the production environment affects product quality, such as whether conditions such as temperature, humidity, and dust are within the allowable range.

[0053] Operational error: Check whether there are any improper operations during the production process, such as equipment adjustment errors, operator errors, etc.

[0054] Once the target cause is identified, this information is fed back to the production control department. Based on the target cause information received, the production control department initiates the corresponding corrective and preventive measures. This may include adjusting equipment settings, changing or checking raw material batches, retraining operators, etc. to ensure that the problem is resolved and prevent similar problems from occurring in the future.

[0055] It should be noted that before the feature sequence, the output of the quality classification model and the output of the anomaly detection model are passed into the cause identification model, it also includes: self-supervised comparative learning of the cause identification model based on historical data to train the cause identification model. The purpose of designing the cause identification model is to effectively identify the root causes of production quality problems from the outputs of the feature sequence, quality classification model and anomaly detection model. These causes may include raw material problems, environmental factors, operational errors and other factors. In order for the cause identification model to accurately perform this identification, the model needs to be fully trained before actual application.

[0056] The embodiment of the present application uses a self-supervised contrastive learning method to train the cause identification model. Self-supervised learning is a machine learning technique in which the model learns through self-generated labels without the need for manually annotated data. Contrastive learning is a form of self-supervised learning that trains the model by comparing the similarities and differences between different data samples, allowing the model to capture key features and patterns in the data. The specific implementation steps are as follows:

[0057] A large number of samples are extracted from historical production data, which include various parameters recorded in the production process and the corresponding quality results. Each sample contains feature sequences, quality classification results, and anomaly detection results.

[0058] Automatically generate training labels based on historical data. This can be achieved by defining some rules, for example, classifying similar quality issues into the same category and different types of quality issues into different categories.

[0059] During the contrastive learning phase, the model learns to distinguish which factors are associated with specific quality issues. This is done by minimizing the distance between similar samples and maximizing the distance between dissimilar samples. In this way, the model is able to learn the subtle differences between factors that lead to different quality outcomes.

[0060] The results obtained from contrastive learning are used to iteratively optimize the model until the performance of the model reaches the preset standard.

[0061] Through this training method, the cause identification model can effectively learn how to distinguish and identify different causes of production problems from complex data without external supervision. This not only improves the robustness and accuracy of the model, but also reduces the need to rely on a large amount of labeled data, thereby reducing training costs and time. In addition, this method also helps the model to respond quickly and accurately to new and unseen production situations in practical applications.

[0062] Figure 2 A schematic diagram of a drug quality control system based on Monascus provided in an embodiment of the present application. It should be understood that the system shown in the figure is exemplary and non-restrictive. This means that the system architecture involved is not limited to a specific form or design, but is presented as an example. In other words, the architecture shown in the figure can be regarded as a way of expression to clearly describe related concepts and relationships, and does not exclude other forms of architecture. Therefore, when interpreting the architecture in the picture, it should be understood that the model has flexibility and diversity, and its purpose is to provide an exemplary description rather than a restrictive provision on a specific form.

[0063] Specifically, the embodiment of the present application includes a sampling unit, a detection unit, an early warning unit and a feedback unit; wherein the sampling unit 201 is used to extract the medicines on the production line based on a random probability function after each batch is completed in the production process to obtain finished capsules; the detection unit 202 is used to detect the finished capsules to obtain target detection results; the early warning unit 203 is used to input the target detection results into an information management system to generate early warning information of potential quality problems based on the detection results and historical data; and the feedback unit 204 is used to adjust the production process according to the early warning information.

[0064] Furthermore, an embodiment of the present application also provides a drug quality control device based on Monascus, comprising: a processor, a memory, and a system bus; the processor and the memory are connected via the system bus; the memory is used to store one or more programs, and the one or more programs include instructions, which, when executed by the processor, enable the processor to execute any of the above methods.

[0065] Furthermore, an embodiment of the present application also provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute any one of the detection methods of the above-mentioned processing methods.

[0066] It can be known from the description of the above implementation mode that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment method can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., including several instructions for enabling a computer device (which can be a personal computer, a server, or a network communication device such as a media gateway, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.

[0067] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0068] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0069] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for controlling the quality of medicines based on Monascus, It is characterized in that include: After each batch is completed in the production process, the drugs on the production line are sampled based on a random probability function to obtain finished capsules; The random probability function includes: P(k)=kp k (1-p) N-k , Among them, P represents the extraction probability, k represents the target number of extracted capsules, p represents the extraction probability of each capsule, and N represents the total number of capsules; Testing the finished capsules to obtain target test results; The target detection result is input into an information management system to generate early warning information of potential quality problems according to the detection result and historical data; including: performing data cleaning on the target detection result, the data cleaning is used for feature engineering to obtain a feature sequence; building a quality classification model, the quality classification model is used to classify the feature sequence to obtain a quality grade; wherein the quality grade includes qualified, warning and unqualified; and when the quality grade is unqualified, collecting real-time production parameters, the production parameters are used to input an abnormality detection model to obtain abnormal conditions in the production process; Wherein, data cleaning is performed on the target detection result, and the data cleaning is used for feature engineering to obtain a feature sequence, including: automatically identifying and processing missing values, outliers and erroneous data to obtain a complete sequence; and feature engineering is performed on the complete sequence to extract a feature sequence; wherein the feature engineering method includes: in, represents the feature sequence, f decoder represents the decoder function, e encoder represents the encoder function, X represents the complete sequence, and R represents the random projection moment: The production process is adjusted according to the early warning information.

2. The control method according to claim 1, It is characterized in that Testing the finished capsule to obtain the target test result includes: Quantitative analysis of active ingredients and impurities in red yeast rice using high performance liquid chromatography; Use microbial detection systems to automatically culture and count to test microbial limits; Use atomic absorption spectrometer for quantitative analysis of heavy metals; Use stability test chambers to simulate storage conditions of drugs in different environments for accelerated aging testing; and The output results of the high performance liquid chromatography, microbial detection system, atomic absorption spectrometer and stability test chamber are integrated as the target detection results.

3. The control method according to claim 2, It is characterized in that The output results of the HPLC, microbial detection system, atomic absorption spectrometer and stability test chamber are integrated to provide target test results including: Input the outputs of the high performance liquid chromatograph, microbial detection system, atomic absorption spectrometer, and stability test chamber into the large language model to obtain outputs of fixed sentences; and The output of the fixed sentence pattern is subjected to word embedding processing to obtain a target detection result.

4. The control method according to claim 1, It is characterized in that Adjusting the production process according to the early warning information includes: When the quality level is not qualified, the feature sequence, the output of the quality classification model and the output of the anomaly detection model are input into the cause identification model to obtain the target cause; wherein the target cause includes raw material quality, environmental conditions or operation errors; Feedback of the target causes to production control to initiate corrective and preventive actions.

5. The control method according to claim 4, It is characterized in that When the quality level is not qualified, before the feature sequence, the output of the quality classification model and the output of the anomaly detection model are input into the cause identification model to obtain the target cause, the method further includes: A self-supervised contrastive learning is performed on the cause identification model based on historical data to train the cause identification model.

6. The control method according to claim 5, It is characterized in that The self-supervised contrastive learning includes: Generate random masks based on a preset algorithm to overwrite historical data.

7. A drug quality control system based on Monascus using the control method according to any one of claims 1 to 6, It is characterized in that include: Sampling unit, detection unit, early warning unit and feedback unit; among them, The sampling unit is used to extract drugs on the production line based on a random probability function after each batch is completed in the production process to obtain finished capsules; The detection unit is used to detect the finished capsule to obtain a target detection result; The early warning unit is used to input the target detection result into an information management system to generate early warning information of potential quality problems based on the detection result and historical data; including: performing data cleaning on the target detection result, the data cleaning is used for feature engineering to obtain a feature sequence; constructing a quality classification model, the quality classification model is used to classify the feature sequence to obtain a quality grade; wherein the quality grade includes qualified, warning and unqualified; and when the quality grade is unqualified, collecting real-time production parameters, the production parameters are used to input an abnormality detection model to obtain abnormal conditions in the production process; Wherein, data cleaning is performed on the target detection result, and the data cleaning is used for feature engineering to obtain a feature sequence, including: automatically identifying and processing missing values, outliers and erroneous data to obtain a complete sequence; and feature engineering is performed on the complete sequence to extract a feature sequence; wherein the feature engineering method includes: in, represents the feature sequence, f decoder represents the decoder function, f encoder represents the encoder function, X represents the complete sequence, R represents the random projection moment; and The feedback unit is used to adjust the production process according to the early warning information.

8. A drug quality control device based on Monascus, It is characterized in that include: A processor, a memory, and a system bus; wherein the processor and the memory are connected via the system bus; The memory is used to store one or more programs, wherein the one or more programs include instructions, and when the instructions are executed by the processor, the processor executes the method according to any one of claims 1 to 6.