Traditional Chinese medicine production planning method based on loss function, constraint conditions and homogenization optimizer

Through nonlinear programming algorithms and homogenization optimizers, combined with liquid chromatography and other technologies, the quality stability and consistency problems in the production of traditional Chinese medicines are solved, and the uniformity and quality control of medicinal ingredients in mass production are achieved.

CN114580988BActive Publication Date: 2024-09-13DALIAN INSTITUTE OF CHEMICAL PHYSICS CHINESE ACADEMY OF SCIENCES
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011383814.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-01
Publication Date
2024-09-13
Estimated Expiration
2040-12-01

AI Technical Summary

Technical Problem

Existing traditional Chinese medicine production planning methods cannot effectively handle quality stability and consistency issues in large-scale batch production, and fail to fully consider actual production parameters such as inventory, inventory status, and volume fraction.

Method used

A Chinese herbal medicine blending and homogenization algorithm based on nonlinear programming is used to measure the ingredients of the medicinal materials through liquid chromatography, ultraviolet detectors and infrared detectors, build a component feature matrix, and use a homogenization optimizer to generate a feeding plan to ensure the stability of the production process. Quality consistency.

Benefits of technology

It improves the stability of the content of traditional Chinese medicine ingredients and the stability of the final product quality, and is suitable for mass homogenization production. The algorithm has high accuracy and small deviation range, and is better than the least squares method and genetic algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114580988B
    Figure CN114580988B
Patent Text Reader

Abstract

The present invention relates to a feeding planning method in a traditional Chinese medicine production process. Aiming at the limitations of the existing feeding process of traditional Chinese medicine production, a traditional Chinese medicine production planning method based on a loss function, a restriction condition and a homogenization optimizer is provided. 1) The content of effective ingredients of each batch of traditional Chinese medicine is determined by using a chromatograph and an ultraviolet detector. 2) The component content of each batch of traditional Chinese medicine and important parameters are used to form a sample feature matrix. 3) The loss function is determined according to the set target. 4) Production restriction conditions are added according to production requirements. 5) A homogenization optimizer is used to generate a feeding plan and guide production feeding. The present invention makes a new improvement on the traditional mixing algorithm, and proposes a medicinal material mixing and production planning algorithm that meets production needs for the production process of traditional Chinese medicine products. Actual experiments have confirmed that our algorithm is superior to the least squares method and the genetic algorithm in terms of accuracy and efficiency, and can ensure the stability of the traditional Chinese medicine production process and the quality of the final product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of homogenization of traditional Chinese medicine, and specifically is a traditional Chinese medicine production planning method based on loss function, constraint conditions and homogenization optimizer. Background Art

[0002] The raw materials of Chinese herbal medicines are derived from natural products, and their quality is greatly affected by the place of production, climate, and planting methods. With the continuous development of the Chinese medicine industry and Chinese medicine culture, the production scale of Chinese medicine has been continuously expanded in recent years, and the number of Chinese medicine manufacturers has been increasing. The quality problems of Chinese herbal medicines have become more and more obvious, and quality stability problems have emerged in an endless stream. The stability and consistency between batches have been questioned. These have caused significant losses to the safety and reputation of Chinese medicines, and seriously endangered the sustainable development of the Chinese medicine industry. It is of great significance to the quality control of Chinese medicines to trace the various raw materials of Chinese medicines, establish Chinese medicine quality standards, consider various production parameters and related indicators, and use computer algorithms for production planning. At the current stage, most homogenization operations are usually completed in Excel, and the existing various mixing algorithms and software can only calculate small batches of components with less content, without considering the actual production parameters, and cannot meet the actual production planning needs. If a systematic, comprehensive, and visual production planning method for Chinese medicine materials can be established, it is possible to effectively analyze the components of Chinese medicines, effectively control the quality of Chinese medicine raw materials and products, ensure the healthy development of the market, and improve the overall quality and stability of Chinese medicines.

[0003] As described in non-patent document 1, by combining traditional analytical techniques with computer technology and using data analysis methods to establish an intuitive, accurate, efficient and convenient computer processing method for Chinese medicine chromatographic fingerprints, it is possible to make a reasonable evaluation of the chromatographic components of Chinese medicine, thereby establishing quantitative and unified standards, which is conducive to the promotion, application and standardization of Chinese medicine.

[0004] For example, in the patent documents CN102663260A, CN107016240A, CN1850122, the commonly used methods in the current technology include linear programming, simulated annealing, Gaussian elimination, genetic algorithms, etc., which have slow calculation speeds and small calculation samples. They can often only be applied to mixing tasks in the laboratory stage and are difficult to cope with actual production calculations of large-scale batches. At the same time, these algorithms do not consider many objective parameters such as inventory quantity, inventory status, volume fraction, biological effects, etc., and are far from being used for production planning.

[0005] Non-patent literature 1: Xu Yan, Yang Huarui, Yang Yongshou, Xiao Peiyun. Current status and prospects of research on traditional Chinese medicine fingerprints[J]. World Latest Medical Information Abstracts, 2018, 18(76): 91-94. Summary of the invention

[0006] The present invention relates to a method for homogenizing Chinese medicinal materials based on nonlinear programming in view of the limitations of the feeding process of the existing Chinese medicine production. 1) The chromatographic peak area and the content of effective ingredients of each batch of Chinese medicinal materials are measured by using a chromatograph, an ultraviolet detector, and an infrared detector. 2) The component content data and important parameter data of each batch of Chinese medicinal materials are used to form a component characteristic matrix. 3) According to the set target parameters, the homogenization optimizer is used to optimize the production process, generate a feeding plan and guide the production feeding. The present invention makes a new improvement on the traditional mixing algorithm and proposes an algorithm for homogenizing the mixing of medicinal materials using nonlinear programming. Actual experiments have confirmed that our algorithm has high accuracy and a small deviation range, and is superior to the least squares method and genetic algorithm in terms of accuracy, precision and efficiency, thereby ensuring the stability of the content of Chinese medicinal materials, the stability of the Chinese medicine production process and the stability of the final product quality.

[0007] In order to achieve the above object, the technical solution adopted by the present invention is:

[0008] The method for planning the production of traditional Chinese medicine based on loss function, constraint conditions and homogenization optimizer includes: based on the quantitative collection of content information by liquid chromatography, ultraviolet spectrum and infrared spectrum, merging various related parameters to form a feature matrix, using the content matrix and target vector to store data, using the homogenization optimizer, and following the feeding ratio in the traditional Chinese medicine production process to ensure the quality consistency in the production process, including the following steps:

[0009] (1) The content matrix A′ is constructed based on the component contents of multiple batches of medicinal materials input by the user:

[0010]

[0011] where a mn is the content of the nth component in batch m.

[0012] (2) The important information parameter matrix B′ is constructed for the important information parameters of different batches of samples:

[0013]

[0014] where b mn is the characteristic parameter of the nth component in batch m.

[0015] (3) The content matrix and parameter matrix are combined into a sample feature matrix, which is:

[0016]

[0017] (4) For a certain feed ratio vector X, define A as the component content matrix, S as the target vector, T as the transposed sign, and Δ as the residual vector:

[0018] AX T =S+Δ

[0019] Δ=AX T -S

[0020] (5) For the residual vector in (4), the loss function loss is established as follows:

[0021] loss=f(Δ)=f(AX T -S)

[0022] Where f is the specific loss function, and L is defined as the specific loss function:

[0023] loss = L(X T )

[0024] (6) For the loss function described in (5), X T The value range should satisfy the space formed by the production constraints, that is, the production constraint range. Define the constraint set as C, where the i-th constraint is defined as C i , which calculates the function f i , expressed as:

[0025] f i (DX T )≤C i

[0026] Define the generic function G, then:

[0027] G(DX T ))≤C

[0028] (6) For the loss function described in (5), the average optimizer is used to iterate and obtain the user target value. The result for the kth iteration is The homogenization optimizer is denoted as Opt and has:

[0029]

[0030] Stop if and only if the loss function is less than the set value λ:

[0031]

[0032] (7) The obtained X vector can be used as the basis for subsequent material production.

[0033] The sample content matrix module comprises a peak matrix module composed of sample content information, including sample peak area information, quantitative information or normalized quantitative information, and content percentage;

[0034] The number of sample batches m of the peak content matrix module ranges from [2, 50], and the number of quantitative information of each sample ranges from [1, 50], that is, the size of the sample matrix A′ is between [2, 1] and [50, 50].

[0035] The sample important information parameter matrix B′ contains non-component content information of the sample, including sample moisture, humidity, volume parameter, storage time, color value, density, volume parameter, and biological activity;

[0036] The number of sample batches m of the sample important information parameter matrix ranges from [2,50], and the important information parameter of each sample is [1,20], that is, the size of the important information parameter matrix is ​​between [2,1] and [50,20].

[0037] The residual vector is a difference vector between the target vector S and the vector calculated according to the mixing ratio X.

[0038] The loss function model is a function model that takes the mixing ratio vector X as a variable parameter and takes the calculated mixing ratio result scalar as an output.

[0039] The specific phenotypes of the loss function model include:

[0040] The p-order norm of the mixing ratio:

[0041] Content difference p-order norm:

[0042] Content cosine similarity:

[0043] When H is defined as the inventory vector, there is inventory cosine similarity:

[0044] The constraint range of the production model uses a function with a mixing ratio vector as a variable to implement the limitation of production constraints.

[0045] The specific phenotypes of the constraint range model include:

[0046] Content cosine similarity: Its specific value range is [0.8,1].

[0047] Content ratio: Cosine similarity: Its specific value range is [0.8,1.2]

[0048] When H is defined as the inventory vector, there is inventory cosine similarity: Its specific value range is [0.8,1].

[0049] When H is defined as the inventory quantity vector, there is a maximum inventory range: X≤H.

[0050] The average optimization model uses the change in the loss function as the termination condition, and terminates when it meets the value range. If the condition is not met, the mixing vector is solved iteratively;

[0051] Calculated using any of the following algorithms:

[0052] Gradient descent algorithm (SGD), whose momentum value range is [0,1] and learning rate is [0,1];

[0053] Batch Gradient Descent (BGD) with momentum in the range of [0,1] and learning rate in the range of [0,1];

[0054] Nesterov algorithm, characterized by using a ratio in [0.2, 0.8];

[0055] RMSprop algorithm, whose decay rate is in [0.8,1];

[0056] Adam algorithm, whose feature learning rate is between [0,1] and [0.8,1];

[0057] The termination condition has a value range of (0, 1).

[0058] The mixing objects include, but are not limited to, Chinese medicinal raw materials, extracts, volatile oils, fats, extracts, fluid extracts, dry extracts, effective ingredients, and effective parts.

[0059] The advantages and beneficial effects of the present invention are:

[0060] 1. The present invention considers the correlation between production samples and target samples, fully considers the actual parameters of the production process, selects the loss function, production restriction range and optimizer according to user needs, and the results can be directly used for production.

[0061] 2. The method of the present invention is simple and easy to implement, the algorithm has wide applicability, high degree of automation, and takes various production parameters and related indicators into consideration at the same time. It is suitable for large-scale homogenized production and greatly improves the uniformity and quality consistency of traditional Chinese medicine production. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 It is a traditional Chinese medicine production planning algorithm based on loss function, constraint conditions and homogenization optimizer;

[0063] Figure 2 Standard fingerprint spectrum of Gentiana macrophylla;

[0064] Figure 3 Fingerprint spectrum of Gentiana macrophylla samples;

[0065] Figure 4 Comparative fingerprint spectrum of Gentiana macrophylla mixed pair. DETAILED DESCRIPTION

[0066] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation method of the present invention is described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the invention, so the present invention is not limited by the specific implementation disclosed below.

[0067] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0068] The technical scheme adopted by the present invention is as follows: 1. A homogenization algorithm for Chinese herbal medicine production based on a nonlinear programming algorithm, characterized in that: based on the content information collected by quantitative techniques such as liquid chromatography, ultraviolet spectroscopy, infrared spectroscopy, etc., various related parameters are combined to form a feature matrix, content matrix and target vector are used to store data, a homogenization optimizer is used, and the feed ratio of Chinese herbal medicine production is analyzed according to the nonlinear programming method, including the following steps:

[0069] (1) The content matrix A′ is constructed based on the component contents of multiple batches of medicinal materials input by the user:

[0070]

[0071] where a mn is the content of the nth component in batch m.

[0072] (2) The important information parameter matrix B′ is constructed for the important information parameters of different batches of samples:

[0073]

[0074] where b mn is the nth feature parameter in batch m.

[0075] (3) The content matrix and the information parameter matrix are combined into a sample feature matrix, which is:

[0076]

[0077] (4) For a certain feed ratio vector X, define A as the component content matrix, S as the target vector, T as the transposed sign, and Δ as the residual vector:

[0078] AX T =S+Δ

[0079] Δ=AX T -S

[0080] (5) For the residual vector in (4), the loss function loss is established as follows:

[0081] loss=f(Δ)=f(AX T -S)

[0082] Where f is the specific loss function, and L is defined as the specific loss function:

[0083] loss = L(X T )

[0084] (6) For the loss function described in (5), X T The value range should satisfy the space formed by the constraints. The set of constraints is defined as C, where the i-th constraint is defined as C i , which calculates the function f i It is expressed as:

[0085] f i (DX T )≤C i

[0086] Define the generic function G, then:

[0087] G(DX T ))≤C

[0088] (6) For the loss function described in (5), the average optimizer is used to iterate and obtain the user target value. The result for the kth iteration is The homogenization optimizer is denoted as Opt and has:

[0089]

[0090] Stop if and only if the loss function is less than the set value λ:

[0091]

[0092] (7) The obtained X vector can be used as the basis for subsequent material production.

[0093] The above new step modules include content matrix, important information parameter matrix, loss function, production constraint range, and homogenization optimizer.

[0094] Content matrix module: contains the peak matrix module composed of sample content information, including sample peak area information, quantitative information or normalized quantitative information, and content percentage. The sample batch quantity range is [2,50], and the quantitative information quantity of each sample ranges from [1,50], that is, the sample matrix size is between [2,1] and [50,50].

[0095] Important information parameter matrix: contains non-component content information of samples, including but not limited to sample moisture, humidity, volume parameters, storage time, color value, density, volume parameters, and biological activity. The sample batch quantity range is consistent with the sample content module, which is [2,50]. The important information parameters of each sample are [1,20], that is, the size of the important information parameter matrix is ​​between [2,1] and [50,20].

[0096] The residual vector is a difference vector between the target vector S and the vector calculated according to the mixing ratio X.

[0097] Loss function model: a function model that uses the mixing ratio vector as a variable parameter and the calculated mixing ratio result scalar as the output. Its specific manifestations include but are not limited to:

[0098] The p-order norm of the mixing ratio:

[0099] Content difference p-order norm:

[0100] Content cosine similarity:

[0101] When H is defined as the inventory vector, there is inventory cosine similarity:

[0102] Production constraint range: The production constraint is realized by using a function with a mixing ratio vector as a variable. Its specific manifestations include but are not limited to:

[0103] Content cosine similarity: Its specific value range is [0.8,1].

[0104] Content ratio: Cosine similarity: Its specific value range is [0.8,1.2]

[0105] When H is defined as the inventory vector, there is inventory cosine similarity: Its specific value range is [0.8,1].

[0106] When H is defined as the inventory quantity vector, there is a maximum inventory range: X≤H.

[0107] Production optimizer model: The change in the loss function is used as the termination condition. It terminates when it meets the value range. If the condition is not met, the mixing vector is solved iteratively. The specific algorithm includes but is not limited to:

[0108] Gradient descent algorithm (SGD), whose momentum value range is [0,1] and learning rate is [0,1].

[0109] Batch Gradient Descent (BGD) algorithm, whose momentum range is [0,1] and learning rate is [0,1].

[0110] The Nesterov algorithm is characterized by using a ratio in [0.2, 0.8].

[0111] RMSprop algorithm, whose decay rate is in [0.8,1].

[0112] Adam algorithm, whose feature learning rate is in [0,1].

[0113] The mixing objects described in the above algorithm include, but are not limited to, Chinese medicine raw materials, extracts, volatile oils, oils, extracts, fluid extracts, dry extracts, active ingredients, and effective parts.

[0114] like Figure 2 As shown, the present invention collects chromatogram data according to the chromatographic conditions of different samples, integrates them, performs peak matching by using time window and peak area similarity, uses the matching results to establish a content matrix, and then uses a nonlinear programming algorithm to establish a model, and minimizes the residual to obtain the mixing ratio.

[0115] Taking the sample of Gentiana macrophylla as an example, the standard spectrum of Gentiana macrophylla sample was established using authentic medicinal materials. The chromatogram is shown in Figure 2 The same method is used to establish the sample fingerprint spectrum as shown in Figure 3 As shown in the figure, d17, d35, d56, and d74 are different batches of Gentiana macrophylla, which are integrated and the peak areas of the peaks in the time window are stored as vector X ij (x1,x2,……,x n ), for X i1 , X i2 X ij ...X i , select the time window as 1 minute, and calculate the peak area similarity within the time window T. The result is The similarity threshold is controlled to 0.9, and the matching results are obtained after taking the maximum value ω as shown in Table 1.

[0116] Table 1 Spectral matching results of different samples

[0117]

[0118]

[0119] Table 2 Information parameters of different samples

[0120]

[0121] According to the contents of Table 1, a data matrix is ​​established as the content matrix, and the moisture and inventory constitute the important information parameter matrix as shown in Table 2. Standard samples are used as target vectors for modeling.

[0122] The purpose of using the first-order norm of the mixing ratio as the loss function in the calculation process is to minimize the feed amount. Set constraint 1 as the content ratio between [0.8-1.2], constraint 2 as less than the inventory, and constraint 3 as the feed-inventory ratio phase velocity above 0.9. Use Adam as the optimizer and set the learning rate to 0.9 to obtain the production content feed ratio.

[0123] The calculated results were verified by actual experiments. Figure 4 As shown, there are the target spectrum of Gentiana macrophylla and the spectrum of Gentiana macrophylla obtained by feeding according to the feeding ratio.

[0124] The calculated sample similarity after mixing was 99.9%, which met the requirements of the National Pharmacopoeia, indicating that the algorithm model can effectively perform sample homogenization and quality control.

[0125] The above description is only an embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, expansion, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A method for planning the production of traditional Chinese medicine based on a loss function, constraints and a homogenization optimizer, characterized in that: Based on the quantitative content information collected by liquid chromatography, ultraviolet spectroscopy, and infrared spectroscopy, the relevant parameters are combined to form a feature matrix, the content matrix and target vector are used to store data, and the homogenization optimizer is used to follow the feed ratio in the traditional Chinese medicine production process to ensure the quality consistency in the production process, including the following steps: (1) The content matrix A′ is constructed based on the component contents of multiple batches of medicinal materials input by the user: where a mn is the content of the nth component in batch m; (2) The important information parameter matrix B′ is constructed for the important information parameters of different batches of samples: where b mn is the characteristic parameter of the nth component in batch m; (3) The content matrix and parameter matrix are combined into a sample feature matrix, which is: (4) For a certain feed ratio vector X, define A as the component content matrix, S as the target vector, T as the transposed sign, and Δ as the residual vector: AX T =S+Δ Δ=AX T -S (5) For the residual vector in (4), the loss function loss is established as follows: loss=f(Δ)=f(AX T -S) Where f is the specific loss function, and L is defined as the specific loss function: loss=L(X T ) (6) For the loss function described in (5), X T The value range should satisfy the space formed by the production constraints, that is, the production constraint range; define the constraint set as C, where the i-th constraint is defined as C i , which calculates the function f i , expressed as: f i (DX T )≤C i Define the generic function G, then: G(DX T ))≤C (7) For the loss function described in (5), the average optimizer is used to iterate and obtain the user target value. The result for the kth iteration is The homogenization optimizer is denoted as Opt and has: Stop if and only if the loss function is less than the set value λ: (8) The obtained X vector can be used as the basis for subsequent material production.

2. The method for planning the production of traditional Chinese medicine based on the loss function, the constraint condition and the homogenization optimizer according to claim 1, characterized in that: The sample content matrix module includes a peak matrix module composed of sample content information, including sample peak area information, quantitative information or normalized quantitative information, and content percentage; The number of sample batches m of the peak matrix module ranges from [2, 50], and the number of quantitative information of each sample ranges from [1, 50], that is, the size of the sample matrix A′ is between [2, 1] and [50, 50].

3. The method for planning the production of traditional Chinese medicine based on loss function, constraint conditions and homogenization optimizer according to claim 1, characterized in that: The sample important information parameter matrix B ′ Contains non-component content information of the sample, including sample moisture, humidity, volume parameters, storage time, color value, density, volume parameters, and biological activity; The number of sample batches m of the sample important information parameter matrix ranges from [2,50], and the important information parameter of each sample is [1,20], that is, the size of the important information parameter matrix is ​​between [2,1] and [50,20].

4. The method for planning the production of traditional Chinese medicine based on loss function, constraint conditions and homogenization optimizer according to claim 1, characterized in that: The residual vector is a difference vector between the target vector S and the vector calculated according to the mixing ratio X.

5. The method for planning the production of traditional Chinese medicine based on loss function, constraint conditions and homogenization optimizer according to claim 1, characterized in that: The loss function model is a function model that takes the mixing ratio vector X as a variable parameter and takes the calculated mixing ratio result scalar as an output.

6. According to the method for planning the production of traditional Chinese medicine based on loss function, constraint conditions and homogenization optimizer according to claim 5, the specific phenotype of the loss function model includes: The p-order norm of the mixing ratio: Content difference p-order norm: Content cosine similarity: When H is defined as the inventory vector, there is inventory cosine similarity:

7. The method for planning the production of traditional Chinese medicine based on loss function, constraint conditions and homogenization optimizer according to claim 1, characterized in that: The constraint range of the production model is implemented by a function with the mixing ratio vector as a variable to limit the production constraints.

8. According to the method for planning the production of traditional Chinese medicine based on loss function, constraint conditions and homogenization optimizer according to claim 7, the specific phenotype of the constraint range model includes: Content cosine similarity: Its specific value range is [0.8,1]; Content ratio: Cosine similarity: Its specific value range is [0.8,1.2] When H is defined as the inventory vector, there is inventory cosine similarity: Its specific value range is [0.8,1]; When H is defined as the inventory quantity vector, there is a maximum inventory range: X≤H.

9. The method for planning the production of traditional Chinese medicine based on loss function, constraint conditions and homogenization optimizer according to claim 1, characterized in that: The average optimizer model uses the change in the loss function as the termination condition. It terminates when it meets the value range. If the condition is not met, the mixed vector is solved iteratively. Calculated using any of the following algorithms: Gradient descent algorithm (SGD), whose momentum value range is [0,1] and learning rate is [0,1]; Batch Gradient Descent (BGD) algorithm, whose momentum range is [0,1] and learning rate is [0,1]; Nesterov algorithm, characterized by using a ratio in [0.2, 0.8]; RMSprop algorithm, whose decay rate is in [0.8,1]; Adam algorithm, whose feature learning rate is between [0,1] and [0.8,1]; The termination condition has a value range of (0, 1).

10. According to the Chinese medicine production planning method based on loss function, constraint conditions and homogenization optimizer according to claim 1, the mixing objects include but are not limited to Chinese medicine raw materials, extracts, volatile oils, oils, extracts, fluid extracts, dry extracts, effective ingredients, and effective parts.