Traditional Chinese medicine automatic decocting method, medium and equipment based on multi-modal data analysis

By using multimodal data analysis and dynamic optimization decision-making models, the decoction strategy for traditional Chinese medicine is adjusted in real time, which solves the problems of unstable quality and safety hazards in traditional Chinese medicine decoction methods. It achieves personalized and precise control and safety monitoring, and improves the intelligence and reliability of the decoction process.

CN120977484BActive Publication Date: 2026-04-21XIAMEN JINGPEI SOFTWARE ENG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIAMEN JINGPEI SOFTWARE ENG CO LTD
Filing Date
2025-10-17
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Traditional Chinese medicine decoction methods rely on manual experience, resulting in unstable decoction quality, inability to achieve personalized and precise control, safety hazards, and inability to monitor changes in the composition of the decoction in real time.

Method used

By employing multimodal data analysis, this method acquires information on traditional Chinese medicine prescriptions and individual patient characteristics, and collects real-time data on the temperature, visual characteristics, and volatile gas composition of the medicinal liquid inside the pot. A dynamic optimization decision model is then used to adjust the decoction strategy to ensure that the active ingredients reach the optimization target while controlling safety risks.

Benefits of technology

It realizes the intelligent, standardized and safe process of traditional Chinese medicine decoction, ensures the stability of efficacy and personalized control, reduces human error, and improves the reliability and safety of the decoction process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120977484B_ABST
    Figure CN120977484B_ABST
Patent Text Reader

Abstract

This application discloses an automated decoction method, medium, and equipment for traditional Chinese medicine (TCM) based on multimodal data analysis. The method first matches a first initial decoction strategy based on the TCM prescription information and generates a second initial decoction strategy by combining patient individual characteristic data. During the decoction process, multimodal state data, such as the time-series temperature data, visual characteristic data, and volatile gas component characteristic spectrum of the liquid in the pot, are simultaneously collected. The multimodal data and individual influencing factors are input into a dynamic optimization decision model. This model calculates the deviation between the real-time component spectrum and the desired trajectory, and comprehensively judges safety conditions such as the intensity of boiling and the risk of dry burning, generating decoction strategy adjustment instructions. By dynamically adjusting the operating parameters of the decoction equipment, the changes in the liquid composition approach the optimization target, while ensuring the safety of the decoction process. This invention solves the problems of traditional decoction methods relying on manual experience, poor quality stability, and lack of personalized and precise control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent manufacturing of traditional Chinese medicine, specifically to an automated decoction method, medium, and equipment for traditional Chinese medicine based on multimodal data analysis. Background Technology

[0002] Decoction of traditional Chinese medicine (TCM) is the core step in the preparation of TCM decoctions, and its quality directly affects the efficacy and clinical treatment. However, traditional TCM decoction methods have long relied on the personal experience of pharmacists, resulting in several inherent defects: First, key parameters such as heat (heating power), time, and water volume during decoction are entirely controlled by experience, lacking quantitative standards, leading to large fluctuations in the quality and poor stability between different batches of decoction. Second, it is impossible to monitor and provide feedback on the dynamic changes of the medicinal components during decoction in real time, leaving the process in a "black box" state, making it difficult to scientifically determine when the optimal decoction effect is achieved, easily resulting in insufficient extraction or excessive decomposition of effective components. Third, traditional methods lack risk intervention mechanisms, making it extremely easy for safety issues such as overflowing or drying out due to improper water control or excessive heat. Finally, existing methods lack the ability to personalize adjustments, failing to dynamically optimize decoction strategies based on individual patient differences (such as constitution, age, and condition), making it difficult to achieve precise decoction tailored to each individual.

[0003] In recent years, although some automated decoction equipment has emerged, its control logic is mostly based on preset fixed time-temperature curves, and it has not yet escaped the category of 'programmed control'. Such equipment cannot cope with the interference of different medicinal material characteristics, water quality and environmental variables. In essence, it has failed to solve the problem of the correlation between decoction process parameters and the dynamic changes of the internal active ingredients of the decoction, and cannot achieve precise control.

[0004] Therefore, developing an automated decoction method that can sense the decoction status in real time and perform intelligent feedback control based on the changing trends of medicinal components is of great significance for ensuring the stability, safety, and personalization of the clinical efficacy of traditional Chinese medicine. Summary of the Invention

[0005] In view of the above problems, the present invention provides a technical solution for automated decoction of traditional Chinese medicine based on multimodal data analysis, which aims to solve the technical problem that traditional Chinese medicine decoction methods cannot cope with the interference caused by different medicinal materials, different water quality and environmental variables, and cannot achieve personalized and precise control.

[0006] To achieve the above objectives, in a first aspect, this application provides an automated decoction method for traditional Chinese medicine based on multimodal data analysis, the method comprising:

[0007] S1: Obtain traditional Chinese medicine prescription information, and match a first initial decoction strategy from a preset strategy library based on the traditional Chinese medicine prescription information. The first initial decoction strategy includes a time-series function of the decoction operation parameters changing over time. The time-series function includes a heating power-time parameter curve and an expected water addition-time parameter curve.

[0008] S2: Obtain individual characteristic data related to the current patient, calculate the individual influence factor based on the individual characteristic data, adjust the parameter curve in the first initial decoction strategy according to the individual influence factor, and generate the second initial decoction strategy.

[0009] S3: Based on the second initial decoction strategy, control the decoction equipment to start the decoction process and acquire multimodal state data synchronously collected during the decoction process in real time. The multimodal state data includes the temperature time series data and visual feature data of the medicinal liquid in the pot of the decoction equipment, as well as the component feature spectrum data of the volatile gas of the medicinal liquid.

[0010] S4: Input the real-time collected multimodal state data and individual influencing factors into the pre-trained dynamic optimization decision model to generate a standard optimization objective, wherein the standard objective includes the expected trajectory of the change of the pharmacodynamic component characteristic spectrum;

[0011] The dynamic optimization decision model is configured as follows:

[0012] Calculate the deviation between the real-time component characteristic spectrum data and the expected trajectory;

[0013] The degree of safety risk is determined based on temperature time-series data and visual feature data, and then compared with the preset safety risk threshold.

[0014] Based on the comparison results of the deviation amount and the degree of safety risk, an instruction to adjust the decoction strategy is output;

[0015] S5: Correct the timing function that was not executed in the second initial decoction strategy according to the decoction strategy adjustment instruction, and adjust the operating parameters of the decoction equipment based on the corrected decoction strategy so that the actual component characteristic spectrum change of the medicine liquid approaches the expected trajectory, while controlling the safety risk level within the preset safety risk threshold.

[0016] Furthermore, the real-time acquisition of multimodal state data synchronously collected during the frying process includes:

[0017] Real-time acquisition of multimodal state data synchronously collected by a multimodal sensor array installed on the frying equipment, wherein the multimodal sensor array includes:

[0018] Temperature sensor, used to collect time-series temperature data of the medicinal liquid inside the pot of the decoction equipment;

[0019] An image sensor is used to collect visual feature data of the medicinal liquid inside the pot of the decoction equipment. The visual feature data is used to characterize the boiling state and color change trend of the medicinal liquid.

[0020] A gas spectral analysis sensor is used to collect the component characteristic spectrum data of the volatile gases from the drug solution.

[0021] Furthermore, the degree of safety risk includes the degree of boiling intensity and the degree of dry burning risk, and the preset safety risk thresholds include the preset overflow risk threshold and the preset dry burning risk threshold.

[0022] The step of determining the level of safety risk based on temperature time-series data and visual feature data, comparing the level of safety risk with a preset safety risk threshold, and outputting a decoction strategy adjustment instruction based on the comparison result of the deviation and the level of safety risk includes:

[0023] The intensity of boiling of the liquid is determined based on the visual feature data, and the intensity of boiling is compared with a preset overflow risk threshold. The degree of dry burning risk is determined based on the temperature time series data, and the degree of dry burning risk is compared with a preset decoction dryness risk threshold.

[0024] Based on the comparison results of the deviation amount, the intensity of boiling and the preset overflow risk threshold, and the comparison results of the dry burning risk degree and the preset dry frying risk threshold, a multi-objective decision-making trade-off is performed, and an adjustment instruction for the frying strategy is output.

[0025] Furthermore, the dynamic optimization decision model is also configured as follows:

[0026] Based on the individual influencing factors and real-time collected multimodal state data, the component characteristic spectrum data of the medicine liquid and the temperature and liquid level of the medicine liquid in the pot of the decoction equipment are predicted in a rolling manner with a fixed time period or triggering event.

[0027] Calculate the prediction deviation between the component characteristic spectrum and the expected trajectory within the prediction time period, and determine the predicted boiling intensity and dry burning risk based on the predicted liquid temperature and liquid level.

[0028] The cooking strategy adjustment instruction shall be output in advance when at least one of the following conditions is met:

[0029] The predicted deviation will exceed the preset deviation.

[0030] The predicted boiling intensity exceeds the preset overflow risk threshold;

[0031] The predicted risk level of dry burning will exceed the preset dry burning risk threshold.

[0032] Furthermore, the expected trajectory is quantitatively characterized by a composite pharmacodynamic index function. The mathematical expression and parameters of the composite pharmacodynamic index function are determined by matching from a preset mapping rule base based on the types, proportions, and principal-assistant-adjuvant relationships of the medicinal ingredients contained in the traditional Chinese medicine prescription information.

[0033] Calculating the deviation between the real-time component characteristic spectrum data and the desired trajectory includes:

[0034] Based on the mathematical expression of the composite pharmacodynamic index function, the real-time composite pharmacodynamic index value F is calculated from the real-time component characteristic spectrum data. real (t);

[0035] Calculate the real-time composite efficacy index value F real The deviation ΔF(t) between Freal(t) and the expected value F(t) of the expected trajectory at the current time t is calculated by the formula: ΔF(t) = Freal(t) - F(t).

[0036] Furthermore, the mathematical expression can be any of the following:

[0037] F(t) = C i (t) / C j (t);

[0038] Among them, C i (t) and C j (t) represent the relative content values ​​of the i-th and j-th key pharmacological components at time t, obtained from real-time component characteristic spectrum data;

[0039] Alternatively, F(t) = w1 × X1(t) + w2 × X2(t) + ... + w n ×X n (t);

[0040] Where X1(t), X2(t), ..., X n (t) represents n feature values ​​extracted from real-time component characteristic spectrum data, where the feature values ​​are absorbance, absorption peak area, or component concentration at a specific wavelength; w1, w2,...,w n The feature weight parameter is the feature weight parameter corresponding to the feature value, and the weight parameter is determined by the mapping relationship rule base;

[0041] Or, F(t) = ;

[0042] in, Indicates the wavelength at time t. The absorbance value at that time The wavelength weighting function is a preset function, which is determined by the mapping rule base. λ1 and λ2 are the boundaries of the integration wavelength interval.

[0043] Furthermore, the method also includes:

[0044] The dynamic optimization decision model analyzes the composite efficacy index value F in real time. real The rate of change of (t) dF / dt;

[0045] When the duration for which dF / dt remains below a preset change threshold δ exceeds a preset duration T, it is determined that the extraction of the effective components has reached saturation, and the current compound efficacy index value F... real When (t) has entered the target interval of the desired trajectory, a cooking termination command is generated;

[0046] Based on the decoction termination command, the decoction equipment is controlled to stop heating and a decoction completion report is generated. The decoction completion report includes the final compound efficacy index value and the decoction process curve. The decoction process curve includes the change process of the compound efficacy index value over time during this decoction process.

[0047] Furthermore, the method also includes:

[0048] After a simmering task is completed, the entire process data of this simmering is stored. The entire process data includes the first initial simmering strategy, the multimodal state data, the expected trajectory, and the finally calculated simmering strategy adjustment instruction sequence.

[0049] Based on the data of the entire process and the quality evaluation data of the decoction output, the effect of this decoction is evaluated. When the evaluation result reaches the preset excellent standard, a new mapping relationship is established between the first initial decoction strategy and / or the decoction strategy adjustment instruction sequence used in this decoction process and the Chinese medicine prescription information and the individual influencing factors, and updated to the preset strategy library.

[0050] In a second aspect, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the automated decoction method for traditional Chinese medicine based on multimodal data analysis as described in the first aspect of this application.

[0051] In a third aspect, this application provides an electronic device having a computer program stored thereon, including a processor and a storage medium, wherein the computer program is stored on the storage medium, and when executed by the processor, the computer program implements the automated decoction method for traditional Chinese medicine based on multimodal data analysis as described in the first aspect of this application.

[0052] Unlike existing technologies, the above-mentioned technical solution provides an automated decoction method, medium, and equipment for traditional Chinese medicine (TCM) based on multimodal data analysis, belonging to the field of intelligent TCM pharmaceutical technology. This method first matches a first initial decoction strategy based on the TCM prescription information and generates a second initial decoction strategy by combining patient individual characteristic data. During the decoction process, multimodal state data such as the temperature time series data, visual characteristic data, and volatile gas component characteristic spectrum of the decoction in the pot are collected in real time. The multimodal data and individual influencing factors are input into a dynamic optimization decision model. This model calculates the deviation between the real-time component spectrum and the desired trajectory, and comprehensively judges the safety status such as the intensity of boiling and the risk of dry burning, generating decoction strategy adjustment instructions. By dynamically adjusting the operating parameters of the decoction equipment, the changes in the composition of the decoction are brought closer to the optimization target, while ensuring the safety of the decoction process. This invention solves the problems of traditional decoction methods relying on manual experience, poor quality stability, and lack of personalized and precise control, realizing the intelligent, standardized, and safe decoction process.

[0053] The above description of the invention is merely an overview of the technical solution of the present invention. In order to enable those skilled in the art to better understand the technical solution of the present invention and to implement it based on the description and drawings, and to make the above-mentioned objectives and other objectives, features and advantages of the present invention easier to understand, the following description is provided in conjunction with the specific embodiments and drawings of the present invention. Attached Figure Description

[0054] The accompanying drawings are only used to illustrate the principles, implementation methods, applications, features, and effects of specific embodiments of the present invention and other related contents, and should not be considered as limitations on the present invention.

[0055] In the accompanying drawings of the instruction manual:

[0056] Figure 1 This is a first flowchart of the automated decoction method for traditional Chinese medicine based on multimodal data analysis, which is involved in a specific implementation method.

[0057] Figure 2 This is a second flowchart of the automated decoction method for traditional Chinese medicine based on multimodal data analysis, which is involved in a specific implementation method.

[0058] Figure 3 This is the third flowchart of the automated decoction method for traditional Chinese medicine based on multimodal data analysis, which is involved in the specific implementation method.

[0059] Figure 4 A schematic diagram of the modules of the electronic device described in a specific embodiment;

[0060] The reference numerals used in the above figures are explained as follows:

[0061] 10. Electronic devices;

[0062] 101. Processor;

[0063] 102. Storage medium. Detailed Implementation

[0064] To illustrate the possible application scenarios, technical principles, implementable specific solutions, and achievable objectives and effects of this invention in detail, the following description, in conjunction with the listed specific embodiments and accompanying drawings, provides a detailed explanation. The embodiments described herein are merely illustrative of the technical solutions of this invention and are therefore intended only as examples, not as limiting the scope of protection of this invention.

[0065] In this document, the term "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The term "embodiment" appearing in various places throughout the specification does not necessarily refer to the same embodiment, nor does it specifically limit its independence or connection with other embodiments. In principle, in this invention, as long as there are no technical contradictions or conflicts, the technical features mentioned in each embodiment can be combined in any way to form corresponding implementable technical solutions.

[0066] Unless otherwise defined, the technical terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains; the use of related terms herein is merely for the purpose of describing particular embodiments and is not intended to limit the invention.

[0067] In the description of this invention, the term "and / or" is used to describe the logical relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A exists, B exists, and A and B exist simultaneously. Additionally, the character " / " generally indicates that the preceding and following objects have an "or" logical relationship.

[0068] In this invention, terms such as “first” and “second” are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any actual quantity, hierarchy, or order between these entities or operations.

[0069] Without further limitations, the use of terms such as “comprising,” “including,” “having,” or other similar expressions in this invention is intended to cover non-exclusive inclusion, which does not exclude the presence of additional elements in a process, method, or product that includes the stated elements, such that a process, method, or product that includes a list of elements may include not only those defined elements but also other elements not expressly listed, or elements inherent to such a process, method, or product.

[0070] In this invention, expressions such as "greater than", "less than", and "exceeding" are understood to exclude the stated number; expressions such as "above", "below", and "within" are understood to include the stated number. Furthermore, in the description of the embodiments of this invention, "multiple" means two or more (including two), and similar expressions related to "multiple" are also understood in this way, such as "multiple groups" and "multiple times", unless otherwise explicitly specified.

[0071] In the description of the embodiments of the present invention, the spatial related expressions used, such as "center," "longitudinal," "lateral," "total length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "vertical," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," "circumferential," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the specific embodiments or drawings. They are only for the purpose of describing the specific embodiments of the present invention or for the reader's understanding, and do not indicate or imply that the device or component referred to must have a specific position, a specific orientation, or be constructed or operated in a specific orientation. Therefore, they should not be construed as limitations on the embodiments of the present invention.

[0072] Unless otherwise explicitly stated or limited, the terms "installation," "connection," "linking," "fixing," and "setting," as used in the description of the embodiments of this invention, should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral arrangement; it can be a mechanical connection, an electrical connection, or a communication connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be the internal connection of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in the embodiments of this invention according to the specific circumstances.

[0073] like Figure 1 As shown, in a first aspect, this application provides an automated decoction method for traditional Chinese medicine based on multimodal data analysis, the method comprising:

[0074] S1: Obtain Chinese medicine prescription information and match the first initial decoction strategy from the preset strategy library based on the Chinese medicine prescription information.

[0075] In step S1, the first initial decoction strategy includes a time-series function of the decoction operation parameters changing over time, and the time-series function includes a heating power-time parameter curve and a expected water addition-time parameter curve.

[0076] The first initial decoction strategy is a standardized decoction plan preset based on a general Chinese medicine prescription (without considering individual differences). It uses a time function with time as the horizontal axis to clarify the changes in heating power and water volume over time. For example, for a certain Chinese medicine prescription, the first initial decoction strategy is to use a heating power of 800W and a water volume of 500ml for the first 30 minutes, and then reduce the power to 600W and stop adding water from 30 to 60 minutes.

[0077] S2: Obtain individual characteristic data related to the current patient, calculate the individual influence factor based on the individual characteristic data, adjust the parameter curve in the first initial decoction strategy according to the individual influence factor, and generate the second initial decoction strategy.

[0078] In step S2, the individual influence factor refers to a quantitative parameter calculated based on the patient's individual characteristics (such as age, weight, constitution (yin deficiency / yang deficiency), underlying diseases (such as diabetes requiring adjustment of the drug concentration)) and is used to correct the general first initial decoction strategy.

[0079] For example, if a patient's constitution is "Yang deficiency," the corresponding individual influence factor is 1.2, meaning the simmering time needs to be extended to enhance the warming and tonifying effects. Conversely, if a patient has hypertension, their individual influence factor is 0.9, meaning the concentration of the medicine needs to be reduced and the amount of water decreased. When multiple individual characteristics of a patient are obtained, such as a 65-year-old male weighing 70kg with a Yang deficiency constitution and a 5-year history of hypertension, a corresponding weight can be assigned to each characteristic. The overall individual influence factor for the current patient can be calculated through weighted calculation. For example, if the weight for Yang deficiency constitution is set to 0.4, the weight for hypertension history to 0.3, and the weight for age (65 years) to 0.3, the formula for calculating the overall individual influence factor is as follows:

[0080] The overall individual impact factor = (Yang deficiency constitution factor × 0.4) + (hypertension factor × 0.3) + (age-related factor × 0.3);

[0081] Then, the parameter curves in the first initial decoction strategy are adjusted based on the calculated individual influence factors. In this embodiment, the parameter curves are the heating power-time parameter curve and the expected water addition-time parameter curve included in the time series function mentioned above.

[0082] S3: Based on the second initial simmering strategy, control the simmering equipment to start the simmering process and acquire multimodal state data synchronously collected during the simmering process in real time.

[0083] In step S3, the multimodal state data includes the time-series temperature data and visual feature data of the medicinal liquid inside the decoction equipment, as well as the component feature spectrum data of the volatile gases emitted from the medicinal liquid. Preferably, real-time acquisition of multimodal state data synchronously collected during the decoction process includes: real-time acquisition of multimodal state data synchronously collected by a multimodal sensor array installed on the decoction equipment.

[0084] In this embodiment, the multimodal sensor array includes:

[0085] Temperature sensor, used to collect time-series temperature data of the medicinal liquid inside the pot of the decoction equipment;

[0086] An image sensor is used to collect visual feature data of the medicinal liquid inside the pot of the decoction equipment. The visual feature data is used to characterize the boiling state and color change trend of the medicinal liquid.

[0087] A gas spectral analysis sensor is used to collect the component characteristic spectrum data of the volatile gases from the drug solution.

[0088] A multimodal sensor array is a hardware collection composed of the three types of complementary sensors mentioned above. It can be installed in specific locations within the decoction equipment. For example, a temperature sensor is inserted into the liquid, an image sensor is aimed at the side window of the pot, and a gas spectral analysis sensor is connected to the exhaust port of the decoction equipment to achieve synchronous data acquisition. For instance, the temperature sensor records the liquid temperature every second as "80℃→95℃→100℃", the image sensor captures the liquid's state every 5 minutes as it changes from clear to pale yellow to dark brown, and the bubbles inside the pot change from small to dense and violently churning. The gas spectral analysis sensor analyzes the components of volatile gases every 10 minutes, such as detecting the characteristic peaks of ephedrine and cinnamaldehyde.

[0089] Visual feature data captures dynamic information about the appearance of the liquid medicine through image sensors, including color (RGB value changes), boiling state (number, size, and rising speed of bubbles), and liquid level (distance between the liquid surface and the rim of the pot). Gas composition characteristic spectrum data is generated by detecting the characteristic absorption peaks of each component in the volatile gases using gas spectral analysis sensors (such as near-infrared spectrometers and gas chromatography-mass spectrometry), forming a component content-time curve.

[0090] Preferably, all sensors are calibrated using the built-in clock module of the boiling device to ensure consistent timestamps of the collected data. For example, at 10:00:00, the temperature sensor records 100°C, the image sensor captures the boiling state, and the gas sensor begins analyzing the components. To improve the accuracy of the collected data, this application also performs preprocessing on the collected sensor data, specifically including:

[0091] For the collected temperature time-series data, outliers are processed. For example, data that occasionally occurs due to the temperature sensor contacting the pot wall too high is smoothed to the average temperature per minute or directly removed.

[0092] For the collected visual feature data, key features are extracted through image algorithms, such as using edge detection algorithms to calculate liquid level height and using color histograms to analyze RGB mean values.

[0093] For the component characteristic spectrum data of the volatile gas collected from the medicinal liquid, characteristic peaks are matched by spectral analysis software, and the relative content of each component at each time is calculated. For example, the relative content of cinnamaldehyde at 10:10:00 is 0.6 mg / L.

[0094] S4: Input the real-time collected multimodal state data and individual influencing factors into the pre-trained dynamic optimization decision model to generate a standard optimization objective, which includes the expected trajectory of changes in the pharmacodynamic component characteristic spectrum; the dynamic optimization decision model is configured to: calculate the deviation between the real-time component characteristic spectrum data and the expected trajectory; determine the degree of safety risk based on temperature time series data and visual feature data, and compare the degree of safety risk with a preset safety risk threshold; based on the comparison result of the deviation and the degree of safety risk, output the decoction strategy adjustment instruction.

[0095] In step S4, the standard optimization objective includes the expected trajectory of the pharmacodynamic component characteristic spectrum determined by the dynamic optimization decision model based on the traditional Chinese medicine prescription information and individual influencing factors. For example, if the traditional Chinese medicine prescription information is Ma Huang Tang (Ephedra Decoction), which needs to highlight the effects of relieving exterior syndromes and dispelling cold, and the current patient's constitution is Yang deficiency, then the warming and invigorating effects of cinnamon twig need to be enhanced during decoction. The generated expected trajectory can protect the following information: after 25 minutes of decoction, the concentration of ephedrine reaches 1.2 mg / L, and the concentration of cinnamaldehyde reaches 0.8 mg / L.

[0096] After 25 minutes of decocting, the concentrations of ephedrine and cinnamaldehyde in the real-time collected component characteristic spectrum data can be compared with the expected trajectory. For example, if the actual concentration of ephedrine is 1.0 mg / L and the actual concentration of cinnamaldehyde is 0.7 mg / L, the heating power of the current decoction can be appropriately increased and the decoction time extended.

[0097] Furthermore, this application also uses temperature timing and visual feature data to determine the safety risks during the decoction process, using these as constraints for adjusting the operating parameters of the decoction equipment. Specifically, when temperature timing data indicates a risk of dry burning, for example, if the temperature sensor consistently collects a temperature of 100℃ and visual features show a decrease in bubbles, the liquid volume may be insufficient. In this case, heating can be paused, and decoction can continue after adding water. Another example is when visual feature data indicates that bubbles from the liquid have overflowed the pot rim by 1cm, indicating a risk of overflow. The decoction strategy adjustment command can be configured to reduce the power to 450W and pause for 1 minute.

[0098] S5: Correct the timing function that was not executed in the second initial decoction strategy according to the decoction strategy adjustment instruction, and adjust the operating parameters of the decoction equipment based on the corrected decoction strategy so that the actual component characteristic spectrum change of the medicine liquid approaches the expected trajectory, while controlling the safety risk level within the preset safety risk threshold.

[0099] For example, if the original plan was to simmer for 4 minutes with the remaining time remaining, the unexecuted "4 minutes 500W" can be corrected to "5 minutes 550W" through the simmering strategy adjustment command. Then, the corrected parameter command is sent to the simmering equipment, and the equipment immediately adjusts its operating status (power is increased to 550W).

[0100] During the corrected decoction process, the multimodal sensor array continuously collects data and feeds it back to the dynamic optimization decision model. The model then analyzes the deviations and safety risks again. If it finds that the active ingredients are close to the expected trajectory (e.g., the ephedrine concentration rises to 1.15 mg / L), it further adjusts the instructions (e.g., "reduce the power to 520W and maintain for 2 minutes"), forming a closed-loop control of "collection-analysis-adjustment-recollection". Ultimately, it ensures that the actual component characteristic spectrum of the decoction changes close to the expected trajectory, while keeping the level of safety risk within the preset threshold throughout the process.

[0101] The above method minimizes human subjective error by transforming the decocting process into a quantified time-series function (clearly defining the specific values ​​of power and water volume over time) and a data-driven model (judging the state based on objective data), ensuring that stable decocting results can be achieved by different operators and different equipment.

[0102] Secondly, the method of this application incorporates patient characteristics such as age, physical condition, and underlying diseases into the strategy adjustment by calculating individual influencing factors. For example, since the liver and kidney functions of children are not fully developed, the concentration of the decoction can be reduced by shortening the decoction time and increasing the amount of water added. For the elderly, whose metabolic capacity is weakened, the dissolution time of the warming and nourishing components can be extended. This effectively solves the problem that traditional methods cannot be adapted to patients with different physical conditions, making the decoction plan more targeted.

[0103] Finally, this application also achieves the dual goals of efficacy and safety during the decoction process. By comprehensively monitoring the decoction status through multimodal data (temperature, vision, gas composition), it can ensure that the medicinal components reach the expected concentration through gas spectral data, avoid the risk of dry burning through temperature data, and avoid the risk of overflow through visual data, thereby improving the reliability and safety of traditional Chinese medicine decoction.

[0104] In some embodiments, the degree of safety risk includes the degree of boiling intensity and the degree of dry burning risk, and the preset safety risk threshold includes a preset overflow risk threshold and a preset dry burning risk threshold;

[0105] like Figure 2 As shown, the step of judging the degree of safety risk based on temperature time-series data and visual feature data, comparing the degree of safety risk with a preset safety risk threshold, and outputting a decoction strategy adjustment instruction based on the comparison result of the deviation and the degree of safety risk includes:

[0106] Step S21: Based on the visual feature data, determine the intensity of boiling of the liquid, compare the intensity of boiling with a preset overflow risk threshold, determine the degree of dry burning risk based on temperature time series data, and compare the degree of dry burning risk with a preset decoction risk threshold.

[0107] S22: Based on the comparison results of the deviation amount, the intensity of boiling and the preset overflow risk threshold, and the comparison results of the dry burning risk degree and the preset dry frying risk threshold, perform multi-objective decision-making and output the frying strategy adjustment instruction.

[0108] In this embodiment, the intensity of boiling is used as a parameter to quantify the boiling intensity of the medicinal liquid. It is calculated based on visual feature data collected by an image sensor. The intensity of boiling can be determined by combining the bubble coverage rate (i.e., the area ratio of bubbles in the medicinal liquid region in the image) and the bubble rising speed (the distance a bubble rises from the bottom of the medicinal liquid to the surface per unit time) determined based on the visual feature data. The more intense the boiling, the easier it is for bubbles to overflow the edge of the pot, indicating a higher risk of overflow.

[0109] The risk level of dry burning is a risk parameter calculated based on a combination of temperature time series data and liquid level data. It can be determined by the temperature rise rate (i.e., the increase in the temperature of the medicinal liquid per unit time, such as 5℃ / minute if the temperature rises from 100℃ to 105℃ in 1 minute) and the liquid level fall rate (i.e., the decrease in the liquid level of the medicinal liquid per unit time, such as 0.5cm / minute if the liquid level drops from 8cm to 7.5cm in 1 minute). The risk level of dry burning increases with the acceleration of the temperature rise rate and the liquid level fall rate. It is used to determine whether there is a risk of decoction drying out (i.e., the medicinal materials sticking to the wall and burning due to insufficient liquid volume).

[0110] Multi-objective decision trade-off refers to the situation where there is a conflict between the two objectives of achieving drug efficacy and controlling safety risks. For example, to reduce the deviation of drug efficacy components, it is necessary to increase the heating power, but increasing the power may lead to increased boiling and increased risk of overflow. The dynamic optimization decision model makes a comprehensive judgment based on preset priority weights (such as the weight of safety risk control being higher than the weight of drug efficacy achievement, ensuring safety first) and selects the optimal adjustment scheme that can minimize drug efficacy deviation to the greatest extent and control safety risks within a preset threshold, thus avoiding the problem of neglecting one aspect for another caused by a single objective.

[0111] Taking the decoction process of Ephedra Decoction at 10:20:00 as an example, the boiling image of the medicinal liquid (resolution 1920×1080, covering the entire medicinal liquid area) acquired by the image sensor is first input. The image is then divided into three parts using an image segmentation algorithm: "medicinal liquid area," "bubble area," and "pot background area." The total area of ​​the medicinal liquid area is calculated to be 120 cm², and the area covered by the bubbles is 72 cm². Based on this, the core indicator of boiling intensity, the bubble coverage rate, is calculated as: (bubble area / medicinal liquid area × 100%) = (72 / 120 × 100% = 60). Meanwhile, the bubble rising speed was calculated using an inter-frame difference algorithm. Specifically, by comparing two frames at 10:20:00 and 10:20:01, five representative bubble marker positions were selected, and the average rising speed was calculated to be 0.8 cm / s. The calculation result was then compared with a preset overflow risk threshold, which is a bubble coverage rate ≥ 70% and a bubble rising speed ≥ 1.0 cm / s. Since the current bubble coverage rate is 60% < 70% and the bubble rising speed is 0.8 cm / s < 1.0 cm / s, it was determined that there is currently no overflow risk.

[0112] Taking the simmering process from 10:20:00 to 10:21:00 as an example, input the temperature time series data (assuming the temperature is 100℃ at 10:20:00, 100.5℃ at 10:20:30, and 101℃ at 10:21:00) and liquid level data (assuming the liquid level is 8cm at 10:20:00 and 7.8cm at 10:21:00). First, calculate the temperature rise rate = (101℃ - 100℃) / 1 minute = 1℃ / minute, excluding sudden temperature rises; second, calculate the liquid level drop rate = (8cm - 7.8cm) / 1 minute = 0.2cm / minute, which is within the normal evaporation rate range. Then, calculate the dry-burning risk value using the preset dry-burning risk assessment formula:

[0113] The dry-burning risk value is calculated as: Temperature rise rate × a + Liquid level drop rate × b, where a and b are set weighting coefficients. For example, a value of 3 for a and a value of 6 for b indicates that a sudden temperature rise has a higher weighting on the impact of dry burning. The calculated dry-burning risk value is 1 × 3 + 0.2 × 6 = 4.2. This calculated dry-burning risk value is then compared with a preset dry-burning risk threshold (e.g., set to 8). Since 4.2 < 8, it is determined that there is currently no dry-burning risk.

[0114] Multi-objective decision-making requires finding a balance between achieving the desired efficacy and safety risks, and can be divided into two categories: conflict-free scenarios and conflict scenarios, as detailed below:

[0115] If the current safety risk assessment result obtained through the aforementioned method is "no risk of overflow or dry burning", and the component characteristic spectrum data shows that the current ephedrine concentration is 1.0 mg / L (the expected concentration at the current moment in the expected trajectory is 1.2 mg / L) and the cinnamaldehyde concentration is 0.7 mg / L (the expected concentration is 0.8 mg / L), the efficacy deviations can be calculated to be -0.2 mg / L and -0.1 mg / L (not reaching the expected trajectory). At this point, the model's decision logic prioritizes safety and minimizing efficacy deviation, taking into account the dissolution patterns of active ingredients (increasing power accelerates dissolution). It then outputs a decoction strategy adjustment instruction, specifically: "From 10:21:00, increase the heating power from 500W to 550W and maintain this power for 5 minutes. During this period, collect the component characteristic spectrum data of the volatile gases from the decoction every 2 minutes to monitor component changes." Five minutes after executing this decoction strategy adjustment instruction, a re-examination showed that the ephedrine concentration increased to 1.18 mg / L and the cinnamaldehyde concentration increased to 0.79 mg / L, with a significant reduction in deviation and no safety risk observed.

[0116] If, during another decoction stage (e.g., at 10:30:00), the component characteristic spectrum data of the volatile gases collected from the decoction shows that the ephedrine concentration is 1.05 mg / L (deviation -0.15 mg / L, still needs to be increased), but the visual characteristic data shows that the bubble coverage has reached 68% (close to the 70% overflow threshold), the bubble rising speed is 0.95 cm / s (close to the 1.0 cm / s risk threshold), and the liquid level data shows that the liquid level in the decoction equipment pot is decreasing at a rate of 0.3 cm / min (within the normal range). At this time, the dynamic optimization decision model determines that "the efficacy deviation exists, but the safety risk is close to the threshold, and the risk needs to be controlled first." If the power is increased, it will lead to increased boiling and trigger the risk of overflow. Therefore, the adjustment scheme of "extending the decoction time instead of increasing the power" is selected. The output decoction strategy adjustment instruction at this time is: "Maintain the power of 500W unchanged, extend the decoction time by 4 minutes, closely monitor the bubble status during the period, and if the bubble coverage exceeds 69%, immediately reduce the power to 480W." Although the strategy adjustment instruction prolongs the decoction time, it avoids the risk of overflowing. At the same time, by continuously and gently heating, the concentration of the active ingredients is slowly increased. Finally, after 4 minutes, the ephedrine concentration rises to 1.16 mg / L, the deviation is reduced to -0.04 mg / L, and the bubble coverage is stable at less than 70%, with no overflow occurring.

[0117] The above scheme optimizes the efficacy to the greatest extent while ensuring safety by setting a priority weight (safety takes precedence over efficacy) and using flexible adjustment strategies (such as using extended time instead of increased power when the risk is close to the threshold). This achieves a balance between the two and effectively improves the stability and reliability of the decoction process.

[0118] In some embodiments, the dynamic optimization decision model is further configured as follows:

[0119] Based on the individual influencing factors and real-time collected multimodal state data, the component characteristic spectrum data of the medicine liquid and the temperature and liquid level of the medicine liquid in the pot of the decoction equipment are predicted in a rolling manner with a fixed time period or triggering event.

[0120] Calculate the prediction deviation between the component characteristic spectrum and the expected trajectory within the prediction time period, and determine the predicted boiling intensity and dry burning risk based on the predicted liquid temperature and liquid level.

[0121] The cooking strategy adjustment instruction shall be output in advance when at least one of the following conditions is met:

[0122] The predicted deviation will exceed the preset deviation.

[0123] The predicted boiling intensity exceeds the preset overflow risk threshold;

[0124] The predicted risk level of dry burning will exceed the preset dry burning risk threshold.

[0125] In this embodiment, rolling prediction refers to the dynamic optimization decision model using a "fixed time period" (e.g., every 5 minutes) or a "trigger event" (e.g., a sudden increase in temperature or a sudden increase in component deviation) as triggering conditions. Based on historical multimodal data and individual influencing factors, it continuously predicts the cooking status (components, temperature, liquid level) for a future period (e.g., the next 10 minutes) using time-series prediction algorithms (e.g., LSTM, ARIMA).

[0126] Triggering events refer to abnormal scenarios that the dynamic optimization decision-making model pre-sets and requires immediate activation of rolling prediction. These include, but are not limited to, a rise in liquid temperature of more than 2°C within 1 minute, a drop in liquid level of more than 1 cm within 5 minutes, a sudden drop in peak intensity of gas component characteristic spectrum data of more than 15%, and an increase in efficacy deviation of more than 0.1 mg / L within 5 minutes. These scenarios usually indicate that the decoction state may be abnormal and require emergency prediction to determine whether it will lead to risks or an increase in deviation.

[0127] Prediction bias refers to the difference between the predicted drug component characteristic spectrum data at a future time (e.g., 10:40:00) and the value in the expected trajectory at that time. For example, if the predicted concentration of ephedrine at 10:40:00 is 1.1 mg / L (the expected value in the trajectory is 1.2 mg / L), then the prediction bias is -0.1 mg / L. This indicator is used to determine whether the future drug efficacy will deviate from the expected range, providing a basis for advance adjustment.

[0128] In this embodiment, the rolling prediction startup mechanism is divided into two categories: regular periodic startup and abnormal trigger startup, as detailed below:

[0129] When initiating rolling predictions in a regular cycle, the dynamic optimization decision model initiates a rolling prediction every 5 minutes by default, such as automatically triggering at 10:00:00, 10:05:00, and 10:10:00. Upon initiating a rolling prediction, the dynamic optimization decision model first calls the historical multimodal dataset, i.e., all data from the start of the current prediction cycle to the current moment (e.g., when initiating a rolling prediction at 10:00:00, it calls the temperature, visual, and gas composition characteristic spectrum data from 9:50:00 to 10:00:00). Simultaneously, it loads previously calculated individual influencing factors (e.g., Yang deficiency constitution factor 1.2, hypertension factor 0.9) as the basic input data for the prediction.

[0130] If a triggering event occurs at an unusual time (e.g., 10:03:00) (e.g., the temperature suddenly rises from 100℃ to 102.5℃, an increase of 2.5℃ within 1 minute, exceeding the trigger threshold of "2℃ increase in 1 minute"), the dynamic optimization decision model immediately interrupts the current routine process and starts emergency rolling prediction. At this time, the range of input data is expanded to include the 10 minutes before the triggering event and data including the time of the triggering event (e.g., 9:53:00-10:03:00), ensuring a comprehensive analysis of the cause of the anomaly and improving prediction accuracy.

[0131] When making rolling forecasts, the dynamic optimization decision model uses a multivariate time series forecasting algorithm (such as an LSTM-based deep learning model, which is good at handling long-term dependencies in time series data) to predict key indicators for the next 10 minutes. The specific process is as follows:

[0132] Taking the rolling forecast starting within the regular cycle of 10:00:00 as an example, input the historical data from 9:50:00 to 10:00:00 (temperature from 90℃ to 100℃, ephedrine concentration from 0.4mg / L to 0.9mg / L, liquid level from 10cm to 9.5cm) and individual influence factors (1.2, 0.9). The model first normalizes the historical multimodal data to eliminate dimensional differences, such as converting temperature and concentration to 0-1 intervals. The normalized historical multimodal data is then input into an LSTM prediction network. The LSTM network learns the trends in historical data, such as a 5°C increase in temperature every 5 minutes, a 0.25 mg / L increase in ephedrine concentration every 5 minutes, and a 0.25 cm decrease in liquid level every 5 minutes. It also incorporates individual influencing factors to correct these trends. For example, if a patient does not have a Yang deficiency constitution and requires enhanced warming and dispersing effects of Ma Huang Tang (Ephedra Decoction), the ephedrine concentration needs to reach the target value faster than the general rate, with a correction ratio of 20% for the growth rate. Finally, the model outputs predictions for the next 10 minutes (10:00:00-10:10:00), specifically including:

[0133] Component prediction: At 10:05:00, the concentration of ephedrine was 1.15 mg / L and the concentration of cinnamaldehyde was 0.7 mg / L; at 10:10:00, the concentration of ephedrine was 1.35 mg / L and the concentration of cinnamaldehyde was 0.85 mg / L.

[0134] Temperature forecast: The temperature will remain stable at 100℃ from 10:00:00 to 10:10:00 (without sudden rises or falls).

[0135] Liquid level prediction: The liquid level at 10:05:00 is 9.25cm; the liquid level at 10:10:00 is 9.0cm. The predicted liquid level drop rate is 0.25cm / minute, which is within the normal range.

[0136] The dynamic optimization decision model then compares the predicted results with the preset thresholds to determine whether there will be any deviation in efficacy or safety risk in the future. If any condition is met, the decoction strategy adjustment instruction will be output in advance.

[0137] If, in the above prediction results, the ephedrine concentration at 10:10:00 is 1.35 mg / L (the expected value in the trajectory is 1.2 mg / L), the prediction deviation is +0.15 mg / L, and the preset deviation threshold is ±0.1 mg / L. The current prediction deviation exceeds the upper limit of the preset deviation threshold, while the temperature and liquid level predictions are normal (indicating no safety risk). At this point, the dynamic optimization decision model determines that "the future efficacy will exceed the limit, and the power needs to be reduced in advance to slow down component dissolution," and outputs an instruction to adjust the pre-decoction strategy, specifically: "From 10:03:00, reduce the heating power from 500W to 480W, maintain this power until 10:10:00, and collect the gas component characteristic spectrum data every 3 minutes during this period to verify the prediction correction effect." After executing the decoction strategy adjustment instruction, the actual detection at 10:10:00 shows that the ephedrine concentration is 1.21 mg / L, with a deviation of +0.01 mg / L. This value is controlled within the preset deviation threshold range, successfully avoiding the problem of excessive efficacy.

[0138] In another prediction period (e.g., 10:15:00), the dynamic optimization decision model predicts that the liquid level at 10:20:00 will drop to 8.2cm (the current liquid level at 10:15:00 is 8.7cm, with a drop rate of 0.1cm / minute, which is within the normal range), but the liquid level at 10:25:00 will drop to 7.9cm, and the temperature prediction shows that the temperature will rise from 100℃ to 101.5℃ after 10:23:00 (due to the heat concentration caused by the drop in liquid level, the temperature rise rate will accelerate), and the predicted dry-burn risk value will reach 8.2 (exceeding the threshold of 8). At this time, the dynamic optimization decision model determines that "the risk of dry-burning will be triggered in the future, and a small amount of water needs to be added in advance to maintain the liquid level," and outputs the decoction strategy adjustment instruction as follows: "At 10:18:00, add 20ml of pure water to the pot through the automatic water adding device of the decoction equipment (the minimum amount of water added based on the liquid level calculation to avoid excessive dilution), and closely monitor the temperature and liquid level changes after adding water." After adding water, the actual liquid level at 10:25:00 was 8.1cm, the temperature was stable at 100.5℃, and the risk of dry burning was 7.5, which did not reach the threshold, thus successfully avoiding the risk of dry burning.

[0139] If the prediction results show that the deviation of the active ingredient (e.g., ±0.05 mg / L), the intensity of boiling (e.g., bubble coverage of 65%), and the risk of dry burning (e.g., 5.8) are all within the preset threshold range within the next 10 minutes, the dynamic optimization decision model will output a command to maintain the current strategy. No parameters need to be adjusted, and data will continue to be collected as originally planned, entering the next prediction cycle.

[0140] The above-mentioned scheme can effectively improve the accuracy and stability of efficacy control during the decoction process of traditional Chinese medicine. By predicting the trend of component changes in advance, it can avoid efficacy fluctuations caused by post-processing adjustments (such as a sharp drop in component concentration due to a significant reduction in power after the fact). Instead, it achieves stable efficacy control through "small-amplitude, advance" adjustments. When minor abnormalities occur during the decoction process (such as a brief increase in power due to voltage fluctuations or changes in liquid level due to differences in water absorption of medicinal materials), the dynamic optimization decision model can promptly capture the impact of these abnormalities on the future state and counteract abnormal interference by outputting decoction strategy adjustment instructions in advance, thereby improving safety and stability.

[0141] In some embodiments, the desired trajectory is quantitatively characterized by a composite pharmacodynamic index function. The mathematical expression and parameters of the composite pharmacodynamic index function are determined by matching from a preset mapping rule base based on the types, proportions, and principal-assistant-adjuvant relationships of the medicinal ingredients contained in the traditional Chinese medicine prescription information.

[0142] Calculating the deviation between the real-time component characteristic spectrum data and the desired trajectory includes:

[0143] Based on the mathematical expression of the composite pharmacodynamic index function, the real-time composite pharmacodynamic index value F is calculated from the real-time component characteristic spectrum data. real (t);

[0144] Calculate the real-time composite efficacy index value F real The deviation ΔF(t) between Freal(t) and the expected value F(t) of the expected trajectory at the current time t is calculated by the formula: ΔF(t) = Freal(t) - F(t).

[0145] Preferably, the mathematical expression is any one of the following:

[0146] F(t) = C i (t) / C j (t);

[0147] Among them, C i (t) and C j(t) represent the relative content values ​​of the i-th and j-th key pharmacological components at time t, obtained from real-time component characteristic spectrum data. Ratio-type functions are suitable for traditional Chinese medicine prescriptions where the ratio of components dependent on the synergistic relationship between principal and assistant herbs is crucial. By calculating the real-time content ratio of two key components (such as principal and assistant herbs), the ratio of the two components is ensured to remain within the effective synergistic range. This is commonly seen in prescriptions that emphasize the proportion of components, such as diaphoretics and harmonizing agents.

[0148] Alternatively, F(t) = w1 × X1(t) + w2 × X2(t) + ... + w n ×X n (t);

[0149] Where X1(t), X2(t), ..., X n (t) represents n feature values ​​extracted from real-time component characteristic spectrum data, where the feature values ​​are absorbance, absorption peak area, or component concentration at a specific wavelength; w1, w2,...,w n The feature weight parameter is the feature value corresponding to the feature value, and the weight parameter is determined by the mapping relationship rule base. The weighted summation function is suitable for traditional Chinese medicine prescription information with multiple components acting together and having different importance. By assigning weights to different feature values ​​(such as component concentration and absorbance), it reflects the difference in contribution of each component to the overall efficacy. It is commonly found in prescriptions with multiple components working synergistically, such as tonifying agents and heat-clearing agents.

[0150] Or, F(t) = ;

[0151] in, Indicates the wavelength at time t. The absorbance value at that time The wavelength weighting function is a preset function, determined by the mapping rule base, where λ1 and λ2 are the boundaries of the integration wavelength interval. Integral functions are suitable for evaluating the efficacy of traditional Chinese medicine prescriptions by integrating multi-wavelength spectral information. By weighted integrating absorbance within a specific wavelength interval, the spectral characteristics of multiple components are integrated, avoiding the limitations of single-wavelength data. This is commonly seen in prescriptions with complex components and no clearly defined single key component.

[0152] In this embodiment, the mapping relationship rule base refers to a pre-built database of "prescription features - function parameters" to store the composite efficacy index function types and parameter values ​​(such as weights and integral intervals) corresponding to different prescriptions (such as Ephedra Decoction and Cinnamon Twig Decoction) and different principal-assistant-adjuvant-guide structures (such as Ephedra as the principal drug and Cinnamon Twig as the assistant drug), and to support the rapid matching of appropriate functions based on prescription information.

[0153] For example, the input traditional Chinese medicine prescription information is: "Ephedra 10g (principal herb), Cinnamon Twig 6g (assistant herb), Apricot Kernel 9g (adjuvant herb), Prepared Licorice Root 3g (guide herb)," which belongs to the category of relieving exterior syndromes and dispelling cold. The core efficacy is "promoting lung function and relieving asthma, dispelling cold and relieving exterior syndromes." By extracting the key features of the prescription, it can be determined that the principal herb is Ephedra (the core active ingredient is ephedrine), and the assistant herb is Cinnamon Twig (the core active ingredient is cinnamaldehyde). The ratio of the principal and assistant herbs is 10:6 ≈ 1.67:1, and the efficacy target is that ephedrine and cinnamaldehyde work synergistically to enhance the effect of dispelling cold and relieving exterior syndromes.

[0154] By retrieving the mapping relationship rule base, information on traditional Chinese medicine prescriptions with the formula "chief drug Ephedra, assistant drug Cinnamon Twig, ratio 1.5-2:1" was obtained. The composite pharmacodynamic index function type was preset to "relative content ratio of two key components", i.e., F(t)=C i (t) / C j (t) is used for calculation, where C is in the current Chinese medicine prescription information. i The content of ephedrine, the principal ingredient of the drug, C j The content of cinnamaldehyde, an ingredient in the principal drug, is determined by the mapping relationship rule, which clearly states that this type of prescription must maintain the ratio of ephedrine to cinnamaldehyde between 1.5 and 1.8 to ensure synergistic effects between the principal and the principal drugs.

[0155] By determining the composite pharmacodynamic index function as F(t) = C 麻黄碱 (t) / C 桂皮醛 (t), the expected ratio in the trajectory stabilizes at 1.6±0.1 within 20-30 minutes of simmering. Based on the matched function type, parameters are extracted from the multimodal data and real-time index values ​​are calculated: for example, the component characteristic spectrum data (obtained by analysis, C) collected by the gas spectral analysis sensor at t=25 minutes is used. 麻黄碱 (25) = 1.2 mg / L, C 桂皮醛 (25) = 0.75 mg / L). Based on the established function F(t) = C 麻黄碱 (t) / C 桂皮醛 Substituting (t) into the real-time component data, we get F. real (25) = 1.2 / 0.75 = 1.6. Comparing the real-time index value with the expected trajectory value, the deviation is 0, indicating that the current efficacy is completely consistent with the expected target, and there is no need to adjust the strategy for the efficacy deviation.

[0156] If F real (25)=1.8, F(25)=1.6, then ΔF(25)=0.2, which exceeds the allowable range of ±0.1, and the subsequent adjustment of the operating parameters of the decocting equipment needs to be initiated.

[0157] In some embodiments, the method further includes:

[0158] The dynamic optimization decision model analyzes the composite efficacy index value F in real time. real The rate of change of (t) dF / dt;

[0159] When the duration for which dF / dt remains below a preset change threshold δ exceeds a preset duration T, it is determined that the extraction of the effective components has reached saturation, and the current compound efficacy index value F... real When (t) has entered the target interval of the desired trajectory, a cooking termination command is generated;

[0160] Based on the decoction termination command, the decoction equipment is controlled to stop heating and a decoction completion report is generated. The decoction completion report includes the final compound efficacy index value and the decoction process curve. The decoction process curve includes the change process of the compound efficacy index value over time during this decoction process.

[0161] Furthermore, the decoction completion report also includes basic information, such as the prescription name, patient information, decoction start / end time, and the name of the prescribing physician. For example, a decoction completion report might record a final composite efficacy index value F=1.610, key component concentrations (ephedrine 1.21mg / L, cinnamaldehyde 0.75mg / L); a composite efficacy index value changing over time from F=1.6 at 10:30:00 minutes to F=1.610 at 10:34:00 minutes; as well as heating power change curves and temperature change curves.

[0162] The aforementioned scheme, by monitoring the rate of change in efficacy indicators, can accurately identify the dissolution saturation point of the active ingredients, avoiding the drawbacks of fixed-time termination in traditional decoction (such as insufficient efficacy due to incomplete saturation, or component destruction and excessive concentration due to over-decoction). This ensures maximum efficacy while reducing energy and material waste. Simultaneously, the generation of a decoction completion report enables full-process traceability of the decoction process. All key data (efficacy, power, temperature) are recorded and archived, facilitating subsequent analysis of the correlation between decoction effects and patient efficacy, and providing data support for prescription optimization and decoction strategy iteration. Furthermore, the automation of termination judgment eliminates the need for manual intervention, reducing the workload of operators, while ensuring consistent termination timing across different batches of decoction, further improving the stability of decoction quality.

[0163] In some embodiments, such as Figure 3 As shown, the method further includes:

[0164] Step S31: After a simmering task is completed, store the entire process data of this simmering, including the first initial simmering strategy, the multimodal state data, the expected trajectory, and the finally calculated simmering strategy adjustment instruction sequence.

[0165] Step S32: Based on the data of the entire process and the quality evaluation data of the decoction output, evaluate the effect of this decoction. When the evaluation result reaches the preset excellent standard, establish a new mapping relationship between the first initial decoction strategy and / or the decoction strategy adjustment instruction sequence used in this decoction process and the Chinese medicine prescription information and the individual influencing factor, and update it to the preset strategy library.

[0166] In this embodiment, the drug solution quality evaluation data is used as quantitative data to assess the final drug solution quality, including the final compound efficacy index value, key component concentration, drug solution pH value, clarity, etc.

[0167] The preset excellent standard is a set of indicators for judging the excellent decoction effect based on industry norms and clinical needs. For example, the final compound efficacy index value is within the target range of the expected trajectory, the key component concentration meets the standard rate of ≥95%, and no safety risk events (overflow, dry burning) occur.

[0168] The above solution is based on a strategy library update mechanism of excellent cases, which enables the preset strategy library to have self-iteration and optimization capabilities. As high-quality cases are accumulated, the personalized strategies in the strategy library that are adapted to different prescriptions and different constitutions will be continuously enriched. The strategy matching accuracy and the rate of excellent results in subsequent decoction tasks will continue to improve, gradually reducing the need for significant adjustments to the initial strategy and improving the efficiency of automated decoction.

[0169] In a second aspect, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the automated decoction method for traditional Chinese medicine based on multimodal data analysis as described in the first aspect of the present invention.

[0170] The computer-readable storage medium may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.

[0171] The non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD ROM); the magnetic surface memory may be a disk storage device or a magnetic tape storage device.

[0172] The volatile memory may be random access memory (RAM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synclink dynamic random access memory (SLDRAM), and direct memory bus random access memory (DRRAM). The computer-readable storage media described in the embodiments of the present invention are intended to include these and any other suitable types of memory.

[0173] like Figure 4 As shown, in a third aspect, the present invention provides an electronic device 10, including a processor 101 and a storage medium 102, wherein a computer program is stored on the storage medium, and when the computer program is executed by the processor, it implements the automated decoction method for traditional Chinese medicine based on multimodal data analysis as described in the first aspect of the present invention.

[0174] In some embodiments, the processor may be implemented by software, hardware, firmware, or a combination thereof, and may be a circuit, one or more of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field-programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, or a microprocessor, thereby enabling the processor to execute some or all of the steps, or any combination thereof, of the automated decoction method for traditional Chinese medicine based on multimodal data analysis described in the various embodiments of this application.

[0175] Finally, it should be noted that although the above embodiments have been described in the text and drawings of this application, this should not limit the scope of patent protection of this application. Any technical solutions that are based on the essential concept of this application and utilize the content described in the text and drawings of this application, resulting in equivalent structural or procedural substitutions or modifications, as well as the direct or indirect application of the technical solutions of the above embodiments to other related technical fields, are all included within the scope of patent protection of this application.

Claims

1. An automated decoction method for traditional Chinese medicine based on multimodal data analysis, characterized in that, The method includes: S1: Obtain traditional Chinese medicine prescription information, and match a first initial decoction strategy from a preset strategy library based on the traditional Chinese medicine prescription information. The first initial decoction strategy includes a time-series function of the decoction operation parameters changing over time. The time-series function includes a heating power-time parameter curve and an expected water addition-time parameter curve. S2: Obtain individual characteristic data related to the current patient, calculate the individual influence factor based on the individual characteristic data, adjust the parameter curve in the first initial decoction strategy according to the individual influence factor, and generate the second initial decoction strategy. S3: Based on the second initial decoction strategy, control the decoction equipment to start the decoction process and acquire multimodal state data synchronously collected during the decoction process in real time. The multimodal state data includes the temperature time series data and visual feature data of the medicinal liquid in the pot of the decoction equipment, as well as the component feature spectrum data of the volatile gas of the medicinal liquid. S4: Input the real-time collected multimodal state data and individual influencing factors into the pre-trained dynamic optimization decision model to generate a standard optimization objective, wherein the standard objective includes the expected trajectory of the change of the pharmacodynamic component characteristic spectrum; The dynamic optimization decision model is configured as follows: Calculate the deviation between the real-time component characteristic spectrum data and the expected trajectory; The degree of safety risk is determined based on temperature time-series data and visual feature data, and then compared with the preset safety risk threshold. Based on the comparison results of the deviation amount and the degree of safety risk, an instruction to adjust the decoction strategy is output; S5: Correct the timing function that was not executed in the second initial decoction strategy according to the decoction strategy adjustment instruction, and adjust the operating parameters of the decoction equipment based on the corrected decoction strategy so that the actual component characteristic spectrum of the medicine liquid approaches the expected trajectory, while controlling the safety risk level within the preset safety risk threshold. The degree of safety risk includes the degree of boiling intensity and the degree of dry burning risk, and the preset safety risk thresholds include the preset overflow risk threshold and the preset dry burning risk threshold. The step of determining the level of safety risk based on temperature time-series data and visual feature data, comparing the level of safety risk with a preset safety risk threshold, and outputting a decoction strategy adjustment instruction based on the comparison result of the deviation and the level of safety risk includes: The intensity of boiling of the liquid is determined based on the visual feature data, and the intensity of boiling is compared with a preset overflow risk threshold. The degree of dry burning risk is determined based on the temperature time series data, and the degree of dry burning risk is compared with a preset decoction dryness risk threshold. Based on the comparison results of the deviation amount, the intensity of boiling and the preset overflow risk threshold, and the comparison results of the dry burning risk and the preset dry frying risk threshold, a multi-objective decision-making trade-off is made, and an adjustment instruction for the frying strategy is output. The dynamic optimization decision model is further configured as follows: Based on the individual influencing factors and real-time collected multimodal state data, the component characteristic spectrum data of the medicine liquid, as well as the temperature and liquid level of the medicine liquid in the pot of the decoction equipment, are predicted in a rolling manner with a fixed time period or a triggering event. Calculate the prediction deviation between the component characteristic spectrum and the expected trajectory within the prediction time period, and determine the predicted boiling intensity and dry burning risk based on the predicted liquid temperature and liquid level. The cooking strategy adjustment instruction shall be output in advance when at least one of the following conditions is met: The predicted deviation will exceed the preset deviation. The predicted boiling intensity exceeds the preset overflow risk threshold; The predicted risk of dry burning will exceed the preset risk threshold for dry burning; The expected trajectory is quantitatively characterized by a composite pharmacodynamic index function. The mathematical expression and parameters of the composite pharmacodynamic index function are determined by matching from a preset mapping rule base based on the types, proportions, and principal-assistant-adjuvant relationships of the medicinal ingredients contained in the traditional Chinese medicine prescription information. Calculating the deviation between the real-time component characteristic spectrum data and the desired trajectory includes: Based on the mathematical expression of the composite pharmacodynamic index function, the real-time composite pharmacodynamic index value F is calculated from the real-time component characteristic spectrum data. real (t); Calculate the real-time composite efficacy index value F real The deviation ΔF(t) between Freal(t) and the expected value F(t) of the expected trajectory at the current time t is calculated by the formula: ΔF(t) = Freal(t) - F(t).

2. The automated decoction method for traditional Chinese medicine based on multimodal data analysis as described in claim 1, characterized in that, Real-time acquisition of multimodal state data synchronously collected during the frying process includes: Real-time acquisition of multimodal state data synchronously collected by a multimodal sensor array installed on the frying equipment, wherein the multimodal sensor array includes: Temperature sensor, used to collect time-series temperature data of the medicinal liquid inside the pot of the decoction equipment; An image sensor is used to collect visual feature data of the medicinal liquid inside the pot of the decoction equipment. The visual feature data is used to characterize the boiling state and color change trend of the medicinal liquid. A gas spectral analysis sensor is used to collect the component characteristic spectrum data of the volatile gases from the drug solution.

3. The automated decoction method for traditional Chinese medicine based on multimodal data analysis as described in claim 1, characterized in that, The mathematical expression can be any of the following: F(t)= C i (t) / C j (t); Among them, C i (t) and C j (t) represent the relative content values ​​of the i-th and j-th key pharmacological components at time t, obtained from real-time component characteristic spectrum data; Alternatively, F(t) = w1 × X1(t) + w2 × X2(t) + ... + w n ×X n (t); Where X1(t), X2(t), ..., X n (t) represents n feature values ​​extracted from real-time component characteristic spectrum data, where the feature values ​​are absorbance, absorption peak area, or component concentration at a specific wavelength; w1, w2,...,w n The feature weight parameter is the feature weight corresponding to the feature value, and the weight parameter is determined by the mapping relationship rule base; Or, F(t) = ; in, Indicates the wavelength at time t. The absorbance value at that time The wavelength weighting function is a preset function, which is determined by the mapping rule base. λ1 and λ2 are the boundaries of the integration wavelength interval.

4. The automated decoction method for traditional Chinese medicine based on multimodal data analysis as described in claim 1 or 3, characterized in that, The method further includes: The dynamic optimization decision model analyzes the composite efficacy index value F in real time. real The rate of change of (t) dF / dt; When the duration for which dF / dt remains below a preset change threshold δ exceeds a preset duration T, it is determined that the extraction of the effective components has reached saturation, and the current compound efficacy index value F... real When (t) has entered the target interval of the desired trajectory, a cooking termination command is generated; Based on the decoction termination command, the decoction equipment is controlled to stop heating and a decoction completion report is generated. The decoction completion report includes the final compound efficacy index value and the decoction process curve. The decoction process curve includes the change process of the compound efficacy index value over time during this decoction process.

5. The automated decoction method for traditional Chinese medicine based on multimodal data analysis as described in claim 1, characterized in that, The method further includes: After a simmering task is completed, the entire process data of this simmering is stored. The entire process data includes the first initial simmering strategy, the multimodal state data, the expected trajectory, and the finally calculated simmering strategy adjustment instruction sequence. Based on the data of the entire process and the quality evaluation data of the decoction output, the effect of this decoction is evaluated. When the evaluation result reaches the preset excellent standard, a new mapping relationship is established between the first initial decoction strategy and / or the decoction strategy adjustment instruction sequence used in this decoction process and the Chinese medicine prescription information and the individual influencing factors, and updated to the preset strategy library.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the automated decoction method for traditional Chinese medicine based on multimodal data analysis as described in any one of claims 1 to 5.

7. An electronic device having a computer program stored thereon, characterized in that, It includes a processor and a storage medium, wherein a computer program is stored on the storage medium, and when the computer program is executed by the processor, it implements the automated decoction method for traditional Chinese medicine based on multimodal data analysis as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Intelligent medicine decocting control method and device based on traditional Chinese medicine e-commerce platform and electronic equipment

    CN120319392A

  • Traditional Chinese medicine decoction piece decoction water adding amount calculation method based on deep learning

    CN120581134A