Traditional Chinese medicine concentration process management method based on block chain
Through IoT sensors and blockchain technology, the problem of lack of real-time and security in the existing technology is solved, real-time monitoring and data security of the traditional Chinese medicine concentration process is realized, and the controllability and stability of the process parameters are improved.
Patent Information
- Application Number
- CN202510422620.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-08-08
AI Technical Summary
The existing traditional Chinese medicine concentration process management methods lack real-time, accuracy and safety, and it is difficult to meet the needs of modern traditional Chinese medicine pharmaceuticals for precise control of process parameters and secure storage of data.
The Internet of Things sensor collects the drug concentration process parameters in real time, generates a standardized process data matrix, and writes it to the distributed storage node of the blockchain. Multi-dimensional analysis is performed based on the preset logic judgment model, and process state evaluation parameters are generated. When the security threshold is exceeded, the modulation parameters are calculated and adjustment instructions are generated, and feedback to the concentration device control end for real-time adjustment.
Real-time monitoring and dynamic adjustment of the traditional Chinese medicine concentration process is realized, the controllability and stability of process parameters is improved, the security and integrity of data is ensured, and the risk of human error is reduced.
Smart Images

Figure CN120447359A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of traditional Chinese medicine concentration technology, and more specifically, to a traditional Chinese medicine concentration process management method based on blockchain. Background Art
[0002] Traditional Chinese medicine (TCM) concentration is a critical step in the pharmaceutical manufacturing process. Process parameters such as temperature, pressure, liquid concentration, and time directly impact the quality and efficacy of the concentrated TCM. Traditional TCM concentration process management relies primarily on manual recordkeeping and monitoring, which is not only inefficient but also prone to inaccurate and untimely data recording, making it difficult to adjust and optimize process parameters in real time. Furthermore, data security and integrity are difficult to guarantee, making it susceptible to tampering and loss. The development of the Internet of Things (IoT) and blockchain technologies has made it possible to apply these advanced technologies to TCM concentration process management. IoT sensors can collect process parameters in real time, enabling automated data collection and transmission, while blockchain technology provides distributed storage and tamper-proof data records, ensuring data security and credibility.
[0003] In the process of implementing the embodiments of the present invention, the inventors found that there are at least the following problems or defects in the existing technology: the existing Chinese medicine concentration process management method lacks real-time performance, accuracy and safety, and it is difficult to meet the needs of modern Chinese medicine pharmaceutical manufacturing for precise control of process parameters and secure data storage. Summary of the Invention
[0004] The present invention provides a blockchain-based method for managing a traditional Chinese medicine concentration process, comprising:
[0005] S1. Collect real-time parameter set X of the traditional Chinese medicine concentration process through IoT sensors;
[0006] S2. Perform dynamic data preprocessing on the parameter set X to generate a standardized process data matrix Y;
[0007] S3. Write the standardized process data matrix Y into the distributed storage node of the blockchain;
[0008] S4. Perform multi-dimensional analysis of Y based on a preset process logic judgment model to generate process status evaluation parameter Z;
[0009] S5. When Z exceeds the preset safety threshold, the modulation parameter generation algorithm is started to calculate the modulation parameter set M;
[0010] S6. Execute the demodulation verification process according to the modulation parameter set M and generate a process adjustment instruction set C;
[0011] S7. Feedback the process adjustment instruction set C to the concentration equipment control terminal and update the process parameter record in the blockchain.
[0012] Furthermore, step S1 includes:
[0013] S11. Collect temperature parameters T∈[Tmin,Tmax], where Tmin=50°C, Tmax=120°C;
[0014] S12. Collect pressure parameters P∈[Pmin,Pmax], where Pmin=0.5MPa, Pmax=3.0MPa;
[0015] S13. Collect the concentration parameter D∈[Dmin,Dmax] of the drug solution, where Dmin=10%, Dmax=95%;
[0016] S14. Collect time parameters t∈[tstart, tend], where tstart is the process start time and tend is the process end time;
[0017] S15. Construct a real-time parameter set X = T, P, D, t.
[0018] Furthermore, the dynamic data preprocessing in step S2 includes:
[0019] S21. Establish data normalization formula:
[0020]
[0021] Where: Y i is the standardized parameter value; X i is the original parameter value (i∈T,P,D,t); X min ,X max is the minimum / maximum value of the parameter allowable range; α is the dynamic weight factor, α∈[0.8,1.2]; β is the correction factor, β=0.1×ln(tt start +1);
[0022] S22. Calculate the dynamic weight factor α:
[0023]
[0024] Where: γ is the adjustment coefficient, γ∈[0.1,0.3];
[0025] S23. Constructing a standardized process data matrix Y = [Y T ,Y P ,Y D ,Y t ].
[0026] Furthermore, step S3 includes:
[0027] S31. Decompose the matrix Y into n×m dimensional sub-data blocks Yij , where n≥4, m≥3;
[0028] S32. Perform hash operation on each sub-data block:
[0029] H(Y ij )=SHA-3(Y ij ||Nonce)
[0030] Among them: Nonce is the blockchain random number;
[0031] S33. Organize the hash value into a Merkle tree structure and write it into the smart contract;
[0032] S34. Select the master node for data storage through the practical Byzantine fault tolerance algorithm.
[0033] Furthermore, the calculation formula of the process state evaluation parameter Z in step S4 is:
[0034]
[0035] Where: w k is the weight coefficient of the kth parameter, satisfying ∑w k =1;
[0036] (μ k is the expected value, σ k is the variance);
[0037] g(Y)=max{0,Y T ·Y P -θ·Y D}
[0038] θ is the process correlation coefficient, θ∈[0.5,0.9]; η is the dynamic adjustment factor, η∈[0.5,1.2].
[0039] Furthermore, the modulation parameter generation algorithm of step S5 includes:
[0040] S51. Establish the modulation equation:
[0041]
[0042] Where: i is the modulation coefficient, λ i ∈[0.2,0.8]; ΔY i =Y i (t)-Y i (t-Δt) (parameter change); δ i is the process sensitivity threshold, δ i =0.1×(Y i,max -Yi,min );
[0043] S52. Calculate the composite modulation factor:
[0044]
[0045] Where: Z target is the expected process state value; κ is the convergence coefficient, κ∈[0.05,0.15];
[0046] S53. Generate modulation parameter set M=M T ,M P ,M D ,ξ.
[0047] Furthermore, step S6 includes:
[0048] S61. Construct demodulation verification function:
[0049]
[0050] Where: τ is the verification coefficient, τ∈[0.1,0.3]; is the reference modulation parameter;
[0051] S62. When V(M)≥V threshold , perform parameter conversion:
[0052] C k =M k ·(1+ρ·sgn(ΔY k ))
[0053] Where: ρ is the adjustment step size, ρ∈[0.05,0.1];
[0054] S63. Generate process adjustment instruction set C=C T ,C P ,C D .
[0055] Furthermore, the calculation formula of the verification coefficient τ is:
[0056]
[0057] Where: Z safe is the safety threshold, ΔZ=0.1×(Z max -Z min ).
[0058] Furthermore, it also includes:
[0059] S8. Establish feedback optimization model:
[0060]
[0061] Where: ζ is the learning rate, ζ∈[0.01,0.05]; is the forecast adjustment value; This is the maximum allowable adjustment.
[0062] S9. Update the correlation coefficient of the logical judgment model:
[0063]
[0064] Where: ∈ is the update rate, ∈∈[0.005,0.015]; V avg is the average value of historical verification values; V std is the standard deviation of historical validation values.
[0065] Furthermore, in step S7:
[0066] The update period Δt of the process adjustment instruction set C satisfies:
[0067]
[0068] Where: t base ∈[30s,120s] is the reference period, ΔZ target =0.05×(Z max -Z min );
[0069] A new blockchain transaction record is generated for each update, which contains the following fields: block height, timestamp, pre-adjustment parameter Hash, adjustment instruction Hash, and digital signature.
[0070] The above-described embodiments of the present invention have at least the following beneficial effects: This method enables real-time monitoring and dynamic adjustment of the traditional Chinese medicine (TCM) concentration process, ensuring that process parameters are always optimized, thereby improving the quality and efficacy of the TCM concentrate. Furthermore, by leveraging the distributed storage and tamper-proof nature of blockchain, the security and integrity of process data can be guaranteed, preventing data tampering or loss, and providing reliable data support for the TCM pharmaceutical manufacturing process.
[0071] This method can also collect process parameters in real time through IoT sensors, enabling automated data collection and transmission, improving the efficiency and accuracy of data collection. Furthermore, blockchain-based smart contracts can automatically execute process logic judgments and parameter adjustments, reducing manual intervention and the risk of human error, further improving the controllability and stability of the traditional Chinese medicine concentration process. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily apparent by reading the following detailed description with reference to the accompanying drawings, in which several embodiments of the present invention are shown by way of example and not limitation, in which:
[0073] Figure 1 A schematic diagram of a process flow for a blockchain-based traditional Chinese medicine concentration process management method provided in one embodiment of the present invention. DETAILED DESCRIPTION
[0074] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided solely to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. Rather, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.
[0075] Those skilled in the art will appreciate that the embodiments of the present invention may be implemented as a system, apparatus, device, method, or computer program product. Therefore, the present invention may be implemented in the following forms: entirely in hardware, entirely in software (including firmware, resident software, microcode, etc.), or in a combination of hardware and software.
[0076] It should be noted that any number of elements in the drawings is for illustration only and not for limitation, and any naming is only for distinction and does not have any limiting meaning.
[0077] Reference below Figure 1 , Figure 1 This is a flow chart of a blockchain-based Chinese medicine concentration process management method provided by one embodiment of the present invention. Figure 1 As shown, a blockchain-based Chinese medicine concentration process management method 100 includes:
[0078] S1. Collect real-time parameter set X of the traditional Chinese medicine concentration process through IoT sensors;
[0079] S2. Perform dynamic data preprocessing on the parameter set X to generate a standardized process data matrix Y;
[0080] S3. Write the standardized process data matrix Y into the distributed storage node of the blockchain;
[0081] S4. Perform multi-dimensional analysis of Y based on a preset process logic judgment model to generate process status evaluation parameter Z;
[0082] S5. When Z exceeds the preset safety threshold, the modulation parameter generation algorithm is started to calculate the modulation parameter set M;
[0083] S6. Execute the demodulation verification process according to the modulation parameter set M and generate a process adjustment instruction set C;
[0084] S7. Feedback the process adjustment instruction set C to the concentration equipment control terminal and update the process parameter record in the blockchain.
[0085] It should be noted that this embodiment relates to a blockchain-based method for managing the concentration process of traditional Chinese medicine (TCM) that achieves precise management and control of the TCM concentration process through multiple steps. First, IoT sensors collect a set of real-time parameters, X, of the TCM concentration process. These parameters, including temperature, pressure, liquid concentration, and time, are key indicators for monitoring and adjusting the concentration process. Next, dynamic data preprocessing is performed on the collected parameter set X to generate a standardized process data matrix, Y. This step ensures data uniformity and comparability. The standardized process data matrix Y is then written to the distributed storage nodes of the blockchain, leveraging the blockchain's immutability and distributed nature to ensure data security and reliability. Y is then analyzed multi-dimensionally based on a preset process logic judgment model to generate a process status assessment parameter, Z. This step is used to assess whether the current process status is within a safe range. When Z exceeds a preset safety threshold, a modulation parameter generation algorithm is initiated to calculate a modulation parameter set, M. A demodulation verification process is then performed based on M to generate a set of process adjustment instructions, C. Finally, C is fed back to the concentration equipment control terminal, and the process parameter record in the blockchain is updated, enabling real-time adjustment and recording of process parameters.
[0086] Specifically, the temperature parameter T collected by the IoT sensor ranges from 50°C to 120°C, the pressure parameter P ranges from 0.5MPa to 3.0MPa, the concentration parameter C ranges from 10% to 95%, and the time parameter t ranges from the process start time t start To process termination time t end The acquisition of these parameters is achieved through high-precision sensors to ensure the accuracy and real-time nature of the data. Dynamic data preprocessing includes data normalization using the formula
[0087]
[0088] in, is the standardized parameter value, x i is the original parameter value, x min and x max are the minimum and maximum values of the parameter allowable range, Q is the dynamic weight factor, ranging from 0.8 to 1.2, and R is the correction factor. The calculation formula is:
[0089] R=0.1×ln(tt start +1)
[0090] In this way, parameter values in different ranges can be normalized to the same scale, which facilitates subsequent processing and analysis.
[0091] Preferably, the dynamic weight factor Q in data normalization can be obtained by the formula
[0092]
[0093] Calculation, where α is the adjustment coefficient, ranging from 0.1 to 0.3. This allows the weight factor to change over time and better adapt to dynamic changes in the process. In addition, during the blockchain storage process, the standardized process data matrix Y is decomposed into n×m dimensional sub-data blocks Y ij , where n ≥ 4 and m ≥ 3. A hash operation is performed on each sub-data block. The hash value is organized into a Merkle tree structure and written into the smart contract. A practical Byzantine fault-tolerant algorithm is used to select a master node for data storage, ensuring data security and consistency. These steps together form an efficient and reliable management system for the traditional Chinese medicine concentration process, capable of real-time monitoring and adjustment of process parameters to ensure product quality.
[0094] In some embodiments, step S1 includes:
[0095] S11. Collect temperature parameters T∈[Tmin,Tmax], where Tmin=50°C, Tmax=120°C;
[0096] S12. Collect pressure parameters P∈[Pmin,Pmax], where Pmin=0.5MPa, Pmax=3.0MPa;
[0097] S13. Collect the concentration parameter D∈[Dmin,Dmax] of the drug solution, where Dmin=10%, Dmax=95%;
[0098] S14. Collect time parameters t∈[tstart, tend], where tstart is the process start time and tend is the process end time;
[0099] S15. Construct a real-time parameter set X = T, P, D, t.
[0100] It should be noted that this embodiment describes in detail how to collect key parameters in the traditional Chinese medicine concentration process through Internet of Things sensors and construct a real-time parameter set X. This step is the basis of the entire process management method, ensuring the accuracy and timeliness of subsequent data processing and process adjustments. First, the collection range of the temperature parameter T is set between 50°C and 120°C. This range covers the common temperature changes in the traditional Chinese medicine concentration process and can effectively monitor the heating process. Secondly, the collection range of the pressure parameter P is 0.5MPa to 3.0MPa. This range is suitable for the working pressure of most traditional Chinese medicine concentration equipment, ensuring the comprehensiveness of pressure monitoring. Thirdly, the collection range of the liquid medicine concentration parameter C is 10% to 95%. This range covers the concentration changes from the initial liquid medicine to the final concentrated liquid, providing accurate data support for concentration control. Finally, the collection of the time parameter t starts from the process start time t start To process termination time t end , ensuring the time monitoring of the entire process. By collecting these parameters, the real-time status of the Chinese medicine concentration process can be fully understood.
[0101] Specifically, the temperature parameter T is collected using high-precision temperature sensors installed in key locations of the concentration equipment, capable of sensing temperature changes in real time. The pressure parameter P is collected using pressure transmitters, which convert pressure signals into electrical signals for data transmission and processing. The drug concentration parameter C is typically collected using a refractive index sensor or concentration meter, which can quickly and accurately measure drug concentration. The time parameter t is collected using a system clock or timer, ensuring accurate time recording. The selection and placement of these sensors and devices are designed to ensure accurate and reliable data collection. Furthermore, the real-time parameter set X is constructed by integrating the collected temperature, pressure, drug concentration, and time parameters into a comprehensive data set reflecting the process status, providing a foundation for subsequent data processing and process evaluation.
[0102] Preferably, in order to improve the accuracy and reliability of data acquisition, a redundant design can be adopted, that is, multiple sensors can be installed at key locations to ensure the stability and accuracy of the data. For example, multiple temperature sensors can be installed at different locations of the concentration equipment, and the accuracy of temperature measurement can be improved through data fusion technology. In addition, in order to adapt to different types of traditional Chinese medicine concentration processes, the parameter acquisition range can be flexibly adjusted. For example, for certain special processes that require higher temperatures or pressures, the temperature and pressure acquisition range can be appropriately expanded. At the same time, in order to ensure the accuracy of time parameters, high-precision clock synchronization technology can be used to ensure the time consistency of the entire system. These optimization measures can further improve the accuracy of parameter acquisition and the stability of the system, thereby better supporting the management and control of traditional Chinese medicine concentration processes.
[0103] In some embodiments, the dynamic data preprocessing in step S2 includes:
[0104] S21. Establish data normalization formula:
[0105]
[0106] Where: Y i is the standardized parameter value; X i is the original parameter value (i∈T,P,D,t); X min ,X max is the minimum / maximum value of the parameter allowable range; α is the dynamic weight factor, α∈[0.8,1.2]; β is the correction factor, β=0.1×ln(tt start +1).
[0107] S22. Calculate the dynamic weight factor α:
[0108]
[0109] Where: γ is the adjustment coefficient, γ∈[0.1,0.3];
[0110] S23. Constructing a standardized process data matrix Y = [Y T ,Y P ,Y D ,Y t ].
[0111] It should be noted that this embodiment describes in detail the specific operations of the dynamic data preprocessing in step S2, which is intended to convert the collected real-time parameter set X into a standardized process data matrix Y. This step is crucial for subsequent process state assessment and parameter adjustment. First, a data normalization formula is established to convert the original parameter values into standardized parameter values for subsequent processing and analysis. Second, a dynamic weight factor is calculated, which is adjusted according to time changes to adapt to the dynamic characteristics of the process. Finally, a standardized process data matrix Y is constructed, and the normalized parameter values are organized into a matrix form for subsequent storage and processing.
[0112] Specifically, the data normalization formula is
[0113]
[0114] in, is the standardized parameter value, x i is the original parameter value, x min and x max The dynamic weight factor Q ranges from 0.8 to 1.2, and the calculation formula of the correction factor R is:
[0115] R=0.1×ln(tt start +1)
[0116] The calculation formula of dynamic weight factor Q is:
[0117]
[0118] Where α is the adjustment coefficient, ranging from 0.1 to 0.3. These formulas can normalize parameter values in different ranges to the same scale, while also considering the impact of time on the parameters, improving the accuracy and reliability of the data.
[0119] Preferably, to further improve the accuracy and adaptability of data preprocessing, the calculation formulas for the dynamic weight factor Q and the correction factor R can be optimized. For example, more process parameters or environmental factors, such as humidity and equipment status, can be introduced to more comprehensively reflect the dynamic characteristics of the process. In addition, machine learning algorithms can be used to train and optimize the normalization formula to improve its adaptability to different process conditions.
[0120] More specifically, the parameters in the normalization formula can be regularly calibrated and updated to ensure its accuracy and stability in long-term operation. These optimization measures can better adapt to the complexity and dynamics of the traditional Chinese medicine concentration process and improve the performance and reliability of the entire system.
[0121] In some embodiments, step S3 includes:
[0122] S31. Decompose the matrix Y into n×m dimensional sub-data blocks Y ij , where n≥4, m≥3;
[0123] S32. Perform hash operation on each sub-data block:
[0124] H(Y ij )=SHA-3(Y ij ||Nonce)
[0125] Among them: Nonce is the blockchain random number;
[0126] S33. Organize the hash value into a Merkle tree structure and write it into the smart contract;
[0127] S34. Select the master node for data storage through the practical Byzantine fault tolerance algorithm.
[0128] It should be noted that this embodiment describes in detail the specific operation of writing the standardized process data matrix Y into the blockchain distributed storage node in step S3. This step utilizes the distributed storage and non-tamperable characteristics of the blockchain to ensure the security and reliability of the process data. First, the matrix Y is decomposed into n×m dimensional sub-data blocks, where the value ranges of n and m are n≥4 and m≥3 respectively. This decomposition method helps to improve the flexibility and scalability of data storage. Then, a hash operation is performed on each sub-data block to generate a unique hash value. This process ensures the integrity and traceability of the data. The hash value is then organized into a Merkle tree structure, which can efficiently verify the integrity and consistency of the data. Finally, the master node is selected for data storage through a practical Byzantine fault-tolerant algorithm. This algorithm can ensure the consistency and reliability of data in a distributed network.
[0129] Specifically, the matrix Y is decomposed into n×m dimensional sub-data blocks, where the specific values of n and m can be adjusted according to the actual storage requirements and the performance of the blockchain network. For example, n=4 and m=3 can be selected to ensure that the size of each sub-data block is moderate, neither too large to cause storage pressure nor too small to affect data processing efficiency. The formula for the hash operation is
[0130] H(Y ij )=Y ij -3(Y ij ||Y ij+1 )
[0131] Among them, Y ij Represents a sub-data block, and || represents a data concatenation operation. Hash values are organized according to a Merkle tree structure. This structure calculates hash values layer by layer, ultimately generating a root hash value that verifies the integrity of the entire dataset. A practical Byzantine Fault Tolerance algorithm is used to select a master node for data storage. This algorithm ensures data consistency and reliability even in the event of partial node failure or malicious attacks.
[0132] To further improve the security and efficiency of data storage, the hashing operation and Merkle tree structure can be optimized. For example, a more secure hashing algorithm, such as SHA-256, can be used to enhance data collision resistance. Furthermore, the Merkle tree structure can be adjusted, such as increasing the number of layers or changing the branching factor, to accommodate datasets of varying sizes. Furthermore, a distributed storage architecture can be adopted, storing data blocks across multiple nodes to improve data availability and fault tolerance.
[0133] More specifically, data stored on the blockchain can be regularly backed up and restored to ensure long-term data preservation and reliability. These optimization measures can better meet the needs of traditional Chinese medicine concentration process management and improve the performance and stability of the entire system.
[0134] In some embodiments, the calculation formula of the process state evaluation parameter Z in step S4 is:
[0135]
[0136] Where: w k is the weight coefficient of the kth parameter, satisfying ∑w k =1;
[0137] (μ k is the expected value, σ k is the variance);
[0138] g(Y)=max{0,Y T ·Y P -θ·Y D}
[0139] θ is the process correlation coefficient, θ∈[0.5,0.9]; η is the dynamic adjustment factor, η∈[0.5,1.2].
[0140] It should be noted that this embodiment describes in detail the specific operation of performing multi-dimensional analysis on the standardized process data matrix Y based on the preset process logic judgment model in step S4 to generate the process status evaluation parameter Z. This step is the core link in evaluating the state of the Chinese medicine concentration process. By comprehensively analyzing the dynamic changes of multiple parameters, it is determined whether the process is in a safe and efficient state. First, the formula for calculating the process status evaluation parameter Z is:
[0141]
[0142] Among them, w k is the weight coefficient of the kth parameter, satisfying ∑w k =1,f k (x k ) is the activation function for the kth parameter, g(t) is the process-related coefficient, and β is the dynamic adjustment factor. This formula comprehensively considers the weight and dynamic changes of each parameter and can accurately assess the process status.
[0143] Specifically, the weight coefficient w kThe setting of needs to be determined based on the degree of influence of each parameter on the process state. For example, temperature and pressure parameters have a greater impact on the process state and can be assigned higher weights, such as w1 = 0.4 and w2 = 0.3, while the influence of liquid concentration and time parameters is relatively small and can be assigned lower weights, such as w3 = 0.2 and w4 = 0.1. The activation function f k (x k ) uses the Sigmoid function, that is
[0144]
[0145] Among them, μ k is the expected value, σ k is the variance. The calculation formula of process correlation coefficient g(t) is
[0146] g(t)=min{0,w t ·t-θ·t safe}
[0147] Among them, w t is the process sensitivity threshold, θ is the dynamic adjustment factor, t safe The setting and calculation methods of these parameters ensure the accuracy and reliability of process status assessment.
[0148] Preferably, in order to further improve the accuracy and adaptability of process status assessment, the weight coefficient w can be k and the dynamic adjustment factor β. For example, machine learning algorithms, such as neural networks or support vector machines, can be used to train and optimize the weight coefficients and dynamic adjustment factors to improve their adaptability to different process conditions. Furthermore, the process status assessment model can be regularly calibrated and updated to ensure its accuracy and stability in long-term operation.
[0149] More specifically, additional process parameters or environmental factors, such as equipment status and operator skills, can be introduced to more comprehensively assess the process status. These optimization measures can better adapt to the complexity and dynamics of the TCM concentration process and improve the performance and reliability of the entire system.
[0150] In some embodiments, the modulation parameter generation algorithm of step S5 includes:
[0151] S51. Establish the modulation equation:
[0152]
[0153] Where: i is the modulation coefficient, λ i ∈[0.2,0.8]; ΔY i =Y i(t)-Y i (t-Δt) (parameter change); δ i is the process sensitivity threshold, δ i =0.1×(Y i,max -Y i,min );
[0154] S52. Calculate the composite modulation factor:
[0155]
[0156] Where: Z target is the expected process state value; κ is the convergence coefficient, κ∈[0.05,0.15];
[0157] S53. Generate modulation parameter set M=M T ,M P ,M D ,ξ.
[0158] It should be noted that this embodiment describes in detail the specific operation of the modulation parameter generation algorithm in step S5, which is used to calculate the modulation parameter set M when the process state evaluation parameter Z exceeds the preset safety threshold range. This step is a key link in realizing the dynamic adjustment of process parameters. By accurately calculating the modulation parameters, it is ensured that the process state can be quickly restored to a safe range. First, a modulation equation is established, which comprehensively considers factors such as the modulation coefficient, process sensitivity threshold, and parameter change. Secondly, a composite modulation factor is calculated, which combines the parameter change and the expected process state value to further optimize the modulation parameters. Finally, the modulation parameter set M is generated to provide accurate parameter support for subsequent process adjustments.
[0159] Specifically, the modulation equation is
[0160]
[0161] Where η is the modulation coefficient, ranging from 0.2 to 0.8, δ is the adjustment coefficient, Δx k is the parameter change, and the calculation formula is
[0162] Δx k =x k (t)-x k (t-Δt)
[0163] σ k is the process sensitivity threshold, and the calculation formula is:
[0164]
[0165] The calculation formula of the composite modulation factor is:
[0166]
[0167] Among them, x target is the desired process state value, and γ is the convergence coefficient, ranging from 0.05 to 0.15. Through these formulas, the modulation parameter set M can be accurately calculated, providing a scientific basis for process adjustment.
[0168] Preferably, to further improve the accuracy and adaptability of the modulation parameter generation algorithm, the modulation equation and the calculation formula for the composite modulation factor can be optimized. For example, additional process parameters or environmental factors, such as equipment status and operator skills, can be introduced to more comprehensively reflect the dynamic characteristics of the process. In addition, machine learning algorithms, such as neural networks or support vector machines, can be used to train and optimize the modulation parameter generation algorithm to improve its adaptability to different process conditions.
[0169] More specifically, the modulation parameter generation algorithm can be regularly calibrated and updated to ensure its accuracy and stability in long-term operation. These optimization measures can better adapt to the complexity and dynamics of the traditional Chinese medicine concentration process and improve the performance and reliability of the entire system.
[0170] In some embodiments, step S6 includes:
[0171] S61. Construct demodulation verification function:
[0172]
[0173] Where: τ is the verification coefficient, τ∈[0.1,0.3]; is the reference modulation parameter;
[0174] S62. When V(M)≥V threshold , perform parameter conversion:
[0175] C k =M k ·(1+ρ·sgn(ΔY k ))
[0176] Where: ρ is the adjustment step size, ρ∈[0.05,0.1];
[0177] S63. Generate process adjustment instruction set C=C T ,C P ,C D .
[0178] It should be noted that this embodiment describes in detail the specific operations of performing the demodulation verification process according to the modulation parameter set M in step S6 to generate the process adjustment instruction set C. This step is the key link in converting the modulation parameters into actual executable process adjustment instructions, ensuring that the process parameters can be accurately adjusted according to the evaluation results. First, a demodulation verification function is constructed, which is used to verify the validity and rationality of the modulation parameters. Second, when the value of the verification function reaches a preset threshold, parameter conversion is performed to convert the modulation parameters into specific process adjustment instructions. Finally, the process adjustment instruction set C is generated to provide clear adjustment guidance for the concentration equipment control end.
[0179] Specifically, the construction formula of the demodulation verification function is:
[0180]
[0181] Among them, a k is the validation coefficient, ranging from 0.1 to 0.3, M k is the modulation parameter, M 0k is the reference modulation parameter. The calculation formula of the verification coefficient a_k is
[0182]
[0183] Among them, M safe is the safety threshold, ΔM=0.1×(M max -M min ). When V(M)≥V threshold When , parameter conversion is performed, the formula is
[0184] C k =M k ·(1+d·sgn(ΔM k ))
[0185] Where d is the adjustment step size, ranging from 0.05 to 0.1. Through these formulas, the modulation parameters can be converted into specific process adjustment instructions to ensure accurate adjustment of process parameters.
[0186] Preferably, to further improve the accuracy and adaptability of the demodulation verification process, the demodulation verification function and parameter conversion formula can be optimized. For example, more process parameters or environmental factors, such as equipment status and operator skills, can be introduced to more comprehensively verify the effectiveness of the modulation parameters. In addition, machine learning algorithms, such as neural networks or support vector machines, can be used to train and optimize the demodulation verification function and parameter conversion formula to improve their adaptability to different process conditions.
[0187] More specifically, the demodulation verification process can be regularly calibrated and updated to ensure its accuracy and stability in long-term operation. These optimization measures can better adapt to the complexity and dynamics of the traditional Chinese medicine concentration process and improve the performance and reliability of the entire system.
[0188] In some embodiments, the calculation formula of the verification coefficient τ is:
[0189]
[0190] Where: Z safe is the safety threshold, ΔZ=0.1×(Z max -Z min ).
[0191] It should be noted that this embodiment describes in detail the specific calculation method of the verification coefficient in step S7. This coefficient is used in the demodulation verification function to ensure the validity of the modulation parameters. The calculation of the verification coefficient involves the safety threshold and the parameter change amount. These factors jointly affect the output of the verification function and thus determine whether to perform parameter conversion. Specifically, the calculation formula of the verification coefficient comprehensively considers the difference between the process parameters and the safety threshold, as well as the amplitude of the parameter change. The nonlinear mapping is performed through the hyperbolic tangent function, so that the verification coefficient can change smoothly within a certain range.
[0192] Specifically, the calculation formula of the verification coefficient is:
[0193]
[0194] Among them, M is the current modulation parameter, M safe is the safety threshold, ΔM=0.1×(M max -M min ). Safety threshold M safe It is pre-set based on process requirements to ensure that process parameters remain within a safe range. The parameter variation, ΔM, reflects the fluctuation range of the modulation parameters and is calculated by multiplying the difference between the maximum and minimum values by 0.1. The hyperbolic tangent function, tanh, maps the input values to the interval [-1, 1], resulting in a verification coefficient, a, varying within the range [0.1, 0.3]. This calculation method dynamically adjusts the verification coefficient based on the relative position of the modulation parameters to the safety threshold to accommodate varying process conditions.
[0195] Preferably, to further improve the accuracy and adaptability of the verification coefficient calculation, the parameters in the formula can be optimized. For example, the coefficient before the hyperbolic tangent function can be adjusted to change the rate of change of the verification coefficient. In addition, more process parameters or environmental factors, such as equipment status and operator skills, can be introduced to more comprehensively reflect the dynamic characteristics of the process.
[0196] More specifically, machine learning algorithms, such as neural networks or support vector machines, can be used to train and optimize the calculation model for the validation coefficients to improve its adaptability to different process conditions. These optimization measures can better adapt to the complexity and dynamic nature of the traditional Chinese medicine concentration process and improve the performance and reliability of the entire system.
[0197] In some embodiments, further comprising:
[0198] S8. Establish feedback optimization model:
[0199]
[0200] Where: ζ is the learning rate, ζ∈[0.01,0.05]; is the forecast adjustment value; This is the maximum allowable adjustment.
[0201] S9. Update the correlation coefficient of the logical judgment model:
[0202]
[0203] Where: ∈ is the update rate, ∈∈[0.005,0.015]; V avg is the average value of historical verification values; V std is the standard deviation of historical validation values.
[0204] It should be noted that this embodiment details the specific operations of establishing a feedback optimization model in step S8. This model is used to optimize the adjustment process of process parameters based on the predicted adjustment value and the maximum allowable adjustment amount. By introducing a feedback optimization mechanism, the accuracy and efficiency of process adjustment can be further improved, ensuring that the process parameters can quickly converge to the target value. Specifically, the feedback optimization model dynamically adjusts the update speed and amplitude of the process parameters through parameters such as the learning rate, the predicted adjustment value, and the maximum allowable adjustment amount, thereby achieving fine control of the process.
[0205] Specifically, the formula of the feedback optimization model is
[0206] M(t+1)=M(t)+η·(M predicted -M avg )
[0207] Among them, M(t) is the process parameter at the current moment, η is the learning rate, ranging from 0.01 to 0.05, M predicted is the forecast adjustment value, M avgis the average value of historical verification values. The learning rate η controls the speed of process parameter adjustment. A smaller learning rate can ensure the stability of the adjustment process, but may prolong the convergence time; a larger learning rate can speed up the convergence speed, but may cause instability in the adjustment process. The maximum allowable adjustment amount M max The maximum range of each adjustment is limited to prevent the process status from exceeding the safe range due to excessive parameter adjustment.
[0208] Preferably, in order to further improve the performance of the feedback optimization model, the learning rate η and the maximum allowable adjustment amount M can be adjusted. max Dynamic adjustments can be made. For example, adaptive algorithms can be used to dynamically adjust the learning rate based on real-time feedback from the process status to balance adjustment speed and stability. Furthermore, additional process parameters or environmental factors, such as equipment status and operator skills, can be introduced to more comprehensively optimize the process parameter adjustment process.
[0209] More specifically, machine learning algorithms, such as neural networks or support vector machines, can be used to train and optimize the feedback optimization model to improve its adaptability to different process conditions. These optimization measures can better adapt to the complexity and dynamic nature of the traditional Chinese medicine concentration process and improve the performance and reliability of the entire system.
[0210] In some embodiments, in step S7:
[0211] The update period Δt of the process adjustment instruction set C satisfies:
[0212]
[0213] Where: t base ∈[30s,120s] is the reference period, ΔZ target =0.05×(Z max -Z min );
[0214] A new blockchain transaction record is generated each time an update is made, which contains the following fields: block height, timestamp, pre-adjustment parameter hash, adjustment instruction hash, and digital signature.
[0215] It should be noted that this embodiment describes in detail the specific operation of updating the correlation coefficient of the logical judgment model in step S9, which is used to dynamically adjust the correlation coefficient of the model based on the mean and standard deviation of the historical verification values. By introducing a feedback optimization mechanism, the accuracy and adaptability of process parameter adjustment can be further improved, ensuring the accuracy and reliability of process status assessment. Specifically, updating the correlation coefficient of the logical judgment model involves parameters such as the learning rate, the mean and standard deviation of the historical verification values, and the dynamic adjustment of these parameters to achieve fine control and optimization of the process.
[0216] Specifically, the formula for updating the correlation coefficient of the logical judgment model is:
[0217]
[0218] Among them, β new is the updated correlation coefficient, β old is the correlation coefficient before updating, η is the update rate, ranging from 0.005 to 0.015, V(t) is the current verification value, V avg is the average value of historical verification values, V std The standard deviation of the historical validation values. The learning rate η controls the speed of updating the correlation coefficient. A smaller learning rate ensures stability during the update process, but may prolong the model's convergence time. A larger learning rate accelerates model convergence but may lead to instability during the update process. The mean and standard deviation of the historical validation values reflect the model's performance during historical runs. These statistics allow the correlation coefficient to be dynamically adjusted to adapt to process changes.
[0219] To further improve the performance of the logic judgment model, the update rate η and the initial value of the correlation coefficient can be optimized. For example, an adaptive algorithm can be used to dynamically adjust the update rate based on real-time feedback from the process status to balance update speed and stability. Furthermore, additional process parameters or environmental factors, such as equipment status and operator skills, can be introduced to more comprehensively optimize the correlation coefficient of the logic judgment model.
[0220] More specifically, machine learning algorithms, such as neural networks or support vector machines, can be used to train and optimize the logical judgment model to improve its adaptability to different process conditions. These optimization measures can better adapt to the complexity and dynamic nature of the traditional Chinese medicine concentration process and improve the performance and reliability of the entire system.
[0221] The above-described embodiments of the present invention have the following beneficial effects: This method can achieve real-time monitoring and dynamic adjustment of the traditional Chinese medicine concentration process, ensuring that process parameters are always in an optimal state, thereby improving the quality and efficacy of the traditional Chinese medicine concentrate. Specifically, the real-time parameter set collected by the IoT sensor is written to the blockchain after dynamic data preprocessing. A pre-set process logic judgment model is used for multi-dimensional analysis to generate process status assessment parameters. When the assessment parameters exceed the safety threshold, the modulation parameter generation algorithm is automatically activated, the modulation parameter set is calculated, and a demodulation verification process is performed. A process adjustment instruction set is generated and fed back to the concentration equipment control terminal, and the process parameter record in the blockchain is simultaneously updated. This process can effectively improve the controllability of the process and the stability of product quality.
[0222] Furthermore, this method leverages blockchain's distributed storage and immutability to ensure the security and integrity of process data, preventing data tampering or loss and providing reliable data support for the TCM production process. Furthermore, leveraging blockchain's smart contract technology, process logic judgment and parameter adjustments can be automated, reducing manual intervention and the risk of human error. By updating the correlation coefficients of the feedback optimization model and the logic judgment model, the accuracy and adaptability of process parameter adjustments can be further improved, ensuring the efficient operation of the TCM concentration process and the continuous improvement of product quality.
[0223] Furthermore, the storage medium of the embodiment of the present application stores program instructions that can implement all the above methods, wherein the program instructions can be stored in the above storage medium in the form of a software product, including a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or a terminal device such as a computer, a server, a mobile phone, or a tablet.
[0224] The above descriptions are merely some preferred embodiments of the present invention and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present invention is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also encompass other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned inventive concept. For example, a technical solution formed by mutually replacing the above-mentioned features with (but not limited to) technical features having similar functions disclosed in the embodiments of the present invention.
Claims
1. A blockchain-based Chinese medicine concentration process management method, characterized by The following steps are involved: S1. Collect real-time parameter set X of the traditional Chinese medicine concentration process through IoT sensors; S2. Perform dynamic data preprocessing on the parameter set X to generate a standardized process data matrix Y; S3. Write the standardized process data matrix Y into the distributed storage node of the blockchain; S4. Perform multi-dimensional analysis of Y based on a preset process logic judgment model to generate process status evaluation parameter Z; S5. When Z exceeds the preset safety threshold range, the modulation parameter generation algorithm is started to calculate the modulation parameter set M; S6. Execute the demodulation verification process according to the modulation parameter set M and generate a process adjustment instruction set C; S7. Feedback the process adjustment instruction set C to the concentration equipment control terminal and update the process parameter record in the blockchain.
2. The method according to claim 1, wherein Step S1 includes: S11. Collect temperature parameters T∈[Tmin,Tmax], where Tmin=50°C and Tmax=120°C. S12. Collect pressure parameters P∈[Pmin,Pmax], where Pmin=0.5MPa, Pmax=3.0MPa; S13. Collect the concentration parameter D∈[Dmin,Dmax] of the drug solution, where Dmin=10%, Dmax=95%; S14. Acquire time parameters t∈[tstart, tend], where tstart is the process start time and tend is the process end time; S15. Construct a real-time parameter set X = T, P, D, t.
3. The method according to claim 1, wherein The dynamic data preprocessing in step S2 includes: S21. Establish data normalization formula: Among them, Y i is the standardized parameter value; X i is the original parameter value; X min ,X max is the minimum and maximum value of the parameter allowable range; α is the dynamic weight factor; β is the correction factor; S22. Calculate the dynamic weight factor α: Among them, γ is the adjustment coefficient, t start The process start timestamp, t end The timestamp of process end; S23. Construct standardized process data matrix Y = [Y T ,Y P ,Y D ,Y t ].
4. The method according to claim 1, wherein Step S3 includes: S31. Decompose the matrix Y into n×m dimensional sub-data blocks Y ij ; S32 performs a hash operation on each sub-data block; S33. Organize the hash value into a Merkle tree structure and write it into the smart contract; S34. Select the master node for data storage through the practical Byzantine fault tolerance algorithm.
5. The method according to claim 1, wherein The calculation formula of the process state evaluation parameter Z in step S4 is: Among them, w k is the weight coefficient of the kth parameter; f k (Y k ) is the function of the kth parameter; g(Y) is the process function; Among them, μ k is the mean value of parameter k in the historical qualified batches stored in the blockchain, σ k is the variance; Y k is the standardized value of the kth parameter; g(Y)=max{0,Y T ·AND P -θ·Y D } λ is the process coefficient; η is the dynamic adjustment factor; Y T 、Y P 、Y D are the standardized values of temperature, pressure and drug solution concentration parameters respectively.
6. The method according to claim 1, wherein The modulation parameter generation algorithm of step S5 includes: S51. Establish the modulation equation: Where: i is the modulation coefficient; ΔY i is the parameter change; δ i is the process sensitivity threshold; Z is the process state evaluation parameter; M i is the modulation parameter; S52. Calculate the composite modulation factor: Among them, Z target is the expected process state value; κ is the convergence coefficient; ξ is the composite tempering factor; S53. Generate modulation parameter set M=M T ,M P ,M D ,ξ.
7. The method according to claim 1, wherein Step S6 includes: S61. Construct demodulation verification function: Among them, τ is the verification coefficient; is the reference modulation parameter; V(M) is the demodulation verification function; M j is the modulation parameter; S62. When V(M)≥V threshold When executing parameter conversion: V threshold Threshold value for demodulation verification function: C k =M k ·(1+ρ·sgn(ΔY k )) Where ρ is the adjustment step size; C k Adjust instruction parameters for the process; S63. Generate process adjustment instruction set C=C T ,C P ,C D , Among them, C is the process adjustment instruction set; C T 、C P 、C D They are the adjustment instruction parameters for temperature, pressure and liquid concentration respectively.
8. The method according to claim 7, wherein The calculation formula of the verification coefficient τ is: Among them, Z safe is the safety threshold; τ is the verification coefficient; ΔZ is the characteristic measurement value of the process state evaluation parameter.
9. The method according to claim 1, wherein Also includes: S8. Establish feedback optimization model: Among them, ζ is the learning rate; is the forecast adjustment value; is the maximum allowable adjustment; C k Adjust parameters for actual process; w k (t+1) is the weight coefficient of the kth parameter at time t+1; w k (t) is the weight coefficient of the kth parameter at time t; S9. Update the correlation coefficient of the logical judgment model: Where: ∈ is the update rate; V avg is the average value of historical verification values; V std is the standard deviation of historical verification values; θ new Process correlation coefficient after not updating; θ old is the process correlation coefficient before updating; V(M) is the demodulation verification function value; V avg is the average value of historical verification values; V std is the standard deviation of historical validation values.
10. The method according to claim 1, wherein In step S7: A new blockchain transaction record is generated for each update, which contains the following fields: block height, timestamp, pre-adjustment parameter Hash, adjustment instruction Hash, and digital signature.