Method for generating yunnan yabuli diarrhea prescription by matching and correlating monarch, minister, assistant and messenger
Patent Information
- Application Number
- CN202611090576.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-22
- Publication Date
- 2026-10-16
AI Technical Summary
因此,相关技术所提供的技术方案无法满足对犊牛腹泻的实际治疗需求
本申请实施例提供的君臣佐使配伍关联的犊牛腹泻方剂生成方法中,若检测到犊牛处于腹泻状态,则采集包括犊牛的体温数据、心率数据、粪便状态以及行为数据的第一指征数据,如此,能够提高第一指征数据的全面性和完整性;并且,基于兽医知识图谱对第一指征数据对应的第一病理特征进行处理,得到用于调整腹泻状态的第一方剂,而兽医知识图谱与兽医典籍关联,如此,借助于兽医典籍中数据的全面性、完整性以及权威性,能够提高第一方剂的针对性和有效性,从而能够实现对腹泻状态的有效控制;与此同时,若采集到第二指征数据,基于第一病理特征以及第二指征数据对应的第二病理特征,对第一方剂中药材的君臣佐使的状态进行调整,生成用于调整腹泻状态的第二方剂,而第二指征数据包括犊牛的病原微生物指征以及血液生化指征,如此,能够实现对第一方剂的针对性和渐进式的调整,进而能够提高第二方剂的针对性和精准度;更进一步地,通过对第一方剂中药材的君臣佐使的状态进行调整,能够实现对第一方剂中药材的药效程度以及效用的细粒度调整,进一步提高第二方剂的精准度,从而使得通过上述方法确定的第二方剂能够满足针对犊牛腹泻的实际治疗需求。
Smart Images

Figure CN122930375A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent generation technology of traditional Chinese medicine veterinary drugs, specifically to, but not limited to, a method for generating a formula for calf diarrhea based on the relationship between the principal, assistant, adjuvant, and guide herbs. Background Technology
[0002] In large-scale dairy farming, calf diarrhea is one of the most common diseases. Due to its high morbidity and mortality rates, calf diarrhea can easily cause significant economic losses to the dairy farming industry.
[0003] Meanwhile, traditional Chinese veterinary medicine has unique advantages in treating calf diarrhea. Its core lies in the theory of syndrome differentiation and treatment, and the principle of combining principal, assistant, and adjuvant herbs. This involves combining principal herbs with assistant herbs to enhance efficacy, and adjuvant herbs to harmonize and regulate, thus creating a synergistic therapeutic effect. In recent years, automated TCM diagnostic and treatment techniques have been gradually introduced into the treatment of calf diarrhea.
[0004] However, related technologies typically use the principal, assistant, adjuvant, and guide herbs as post-hoc evaluation criteria for prescriptions, rather than as structural constraints during the generation process. Therefore, the technical solutions provided by these technologies cannot meet the actual treatment needs for calf diarrhea. Summary of the Invention
[0005] Based on the above technical problems, this application provides a method for generating a formula for calf diarrhea based on the combination of principal, assistant, adjuvant, and guide herbs, which can meet the actual treatment needs for calf diarrhea.
[0006] The technical solution provided in this application is as follows: This application provides a method for generating a formula for calf diarrhea based on the compatibility of principal, assistant, adjuvant, and guide herbs. The method includes: If a calf is detected to be in a state of diarrhea, first indicator data is collected; wherein, the first indicator data includes the calf's body temperature data, heart rate data, fecal condition and behavioral data; The first pathological feature corresponding to the first indication data is processed based on the veterinary knowledge graph to obtain the first prescription; wherein, the veterinary knowledge graph is associated with veterinary classics; If second indication data is collected, the principal, assistant, adjuvant, and guide properties of the medicinal materials in the first prescription are adjusted based on the first pathological feature and the second pathological feature corresponding to the second indication data to generate a second prescription; wherein, the second prescription is used to adjust the diarrhea state; the second indication data includes the pathogenic microorganism indications and blood biochemical indications of the calf.
[0007] The method for generating a formula for calf diarrhea based on the compatibility of principal, assistant, adjuvant, and guide herbs provided in this application has at least the following beneficial effects: In the method for generating a calf diarrhea prescription based on the principle of monarch-minister-assistant-guide combination provided in this application embodiment, if a calf is detected to be in a state of diarrhea, first indicator data including the calf's body temperature, heart rate, fecal condition, and behavioral data are collected. This improves the comprehensiveness and completeness of the first indicator data. Furthermore, based on a veterinary knowledge graph, the first pathological features corresponding to the first indicator data are processed to obtain a first prescription for adjusting the diarrhea state. Since the veterinary knowledge graph is associated with veterinary classics, the comprehensiveness, completeness, and authority of the data in veterinary classics can be utilized to improve the targeting and effectiveness of the first prescription, thereby achieving effective control of the diarrhea state. At the same time, if second indicator data is collected... Based on the first pathological characteristics and the second pathological characteristics corresponding to the second indicator data, the principal, assistant, adjuvant, and guide properties of the medicinal materials in the first prescription are adjusted to generate a second prescription for adjusting diarrhea. The second indicator data includes pathogenic microorganism indicators and blood biochemical indicators of calves. In this way, the first prescription can be adjusted in a targeted and gradual manner, thereby improving the targeting and accuracy of the second prescription. Furthermore, by adjusting the principal, assistant, adjuvant, and guide properties of the medicinal materials in the first prescription, the efficacy and effectiveness of the medicinal materials in the first prescription can be adjusted at a fine-grained level, further improving the accuracy of the second prescription. Thus, the second prescription determined by the above method can meet the actual treatment needs for calf diarrhea. Attached Figure Description
[0008] Figure 1 A flowchart illustrating the method for generating a formula for calf diarrhea based on the compatibility of principal, assistant, adjuvant, and guide herbs, as provided in the embodiments of this application. Figure 2 This is a schematic diagram of the training process provided in an embodiment of this application. Detailed Implementation
[0009] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0010] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0011] In large-scale dairy farming, calf diarrhea is one of the most common diseases. Due to its high morbidity and mortality rates, calf diarrhea can easily cause significant economic losses to the dairy farming industry.
[0012] Meanwhile, traditional Chinese veterinary medicine has unique advantages in treating calf diarrhea. Its core lies in the theory of syndrome differentiation and treatment, and the principle of combining principal, assistant, and adjuvant herbs. This involves combining principal herbs with assistant herbs to enhance efficacy, and adjuvant herbs to harmonize and regulate, thus creating a synergistic therapeutic effect. In recent years, automated TCM diagnostic and treatment techniques have been gradually introduced into the treatment of calf diarrhea.
[0013] However, in the related art, the monarch, minister, assistant and guide are usually used as a posteriori evaluation criteria for prescriptions, rather than structural constraints in the generation process. Therefore, the technical solutions provided by the related art cannot meet the actual diagnosis and treatment demands for calf diarrhea.
[0014] Figure 1 is a schematic flowchart of a method for generating a calf diarrhea prescription with monarch, minister, assistant and guide compatibility association provided by the embodiments of the present application, as Figure 1 shown, the method may include the following steps: Step 101: If it is detected that a calf is in a diarrhea state, first indicator data is collected.
[0015] Wherein, the first indicator data includes body temperature data, heart rate data, fecal state and behavior data of the calf.
[0016] Correspondingly, if it is not detected that the calf is in a diarrhea state, the first indicator data may not be collected.
[0017] In some embodiments, image data and / or video data may be tracked and collected by an image acquisition device disposed in a target area, and feature recognition may be performed on the image data and / or video data, so as to determine whether the calf is in a diarrhea state.
[0018] In some embodiments, the body temperature data may include fluctuation data of the calf's body temperature within at least one time period; for example, the body temperature data may include a body temperature time series; correspondingly, the body temperature data may be obtained by continuously collecting the calf's body temperature at a preset first sampling frequency through an implantable body temperature sensor or a wearable body temperature sensor.
[0019] In some embodiments, the heart rate data may include fluctuation data of the calf's heart rate within at least one time period, and may further include a variability indicator of the calf's heart rate; for example, the heart rate data may include a heart rate time series; correspondingly, the heart rate data may be obtained by tracking and collecting the calf's heart rate at a preset second sampling frequency through a smart collar or an electrocardiogram patch; the heart rate variability indicator may include Standard Deviation of Normal-to-Normal intervals (SDNN), Root Mean Square of Successive Differences (RMSSD), and Low Frequency / High Frequency (LF / HF).
[0020] In some embodiments, the state of feces may include the shape, viscosity, and formability of calf feces; correspondingly, the state of feces can be obtained by analyzing feces images; for example, feces images may include a set of images of calf feces acquired by an image acquisition device.
[0021] In some embodiments, behavioral data may include the calf's mental state, appetite, and activity level; for example, behavioral data can be obtained by analyzing behavioral video data of the calf; for example, behavioral video data can be acquired by an image acquisition device.
[0022] Step 102: Process the first pathological features corresponding to the first indication data based on the veterinary knowledge graph to obtain the first prescription.
[0023] Among them, the veterinary knowledge graph is linked to veterinary classics.
[0024] In some embodiments, veterinary texts may include classic Chinese medicine books and references for recording, diagnosing, treating, and monitoring diarrhea in calves.
[0025] In some embodiments, a veterinary knowledge graph may be pre-established, and the veterinary knowledge graph may contain a set of prescriptions recorded in veterinary texts for treating diarrhea in calves of different severity, different disease types, different ages, or different days; exemplarily, the veterinary knowledge graph may include a set of nodes and a set of edges for connecting the nodes in the set of nodes.
[0026] Specifically, the node set in the veterinary knowledge graph can include syndrome type nodes, medicinal material nodes, efficacy nodes, and contraindication nodes.
[0027] Among them, the syndrome node includes three nodes: damp-heat diarrhea, cold-damp diarrhea, and spleen deficiency diarrhea; specifically, each syndrome node is associated with the main symptom description, tongue appearance characteristics, pulse characteristics, and stool characteristics.
[0028] Specifically, the medicinal material nodes include nodes of commonly used Chinese medicinal materials for treating calf diarrhea, which may include nodes such as Coptis chinensis, Scutellaria baicalensis, Pulsatilla chinensis, Fraxinus rhynchophylla, Atractylodes macrocephala, Poria cocos, dried ginger, cinnamon, and licorice. It should be noted that the medicinal material nodes may include cinnamaldehyde monomer nodes, which represent cinnamaldehyde, the main active ingredient in the Chinese medicine cinnamon. This node can participate in the prescription generation as an independent quantifiable node.
[0029] For example, efficacy nodes may include nodes such as warming the middle and dispelling cold, clearing heat and drying dampness, strengthening the spleen and replenishing qi, astringing the intestines and stopping diarrhea, antibacterial and anti-inflammatory, and promoting digestion.
[0030] For example, the contraindication node may include the Eighteen Incompatibilities Group node and the Nineteen Antagonisms Group node. These nodes are used to identify the incompatibilities between medicinal materials.
[0031] Specifically, the edge set in the veterinary knowledge graph can include edges related to the principal-assistant-adjuvant relationship, edges related to the eighteen incompatibilities and nineteen contraindications, edges related to efficacy, edges related to synergy, and edges related to syndrome types and symptoms.
[0032] Among them, the monarch-minister-assistant-guide relationship edge is used to connect the syndrome node and the medicinal material node, and is used to represent the compatibility role played by the medicinal material corresponding to the medicinal material node connected to the syndrome node when treating a certain syndrome. The edge weight ranges from [0, 1]. The higher the weight, the higher the compatibility importance of the medicinal material in the treatment of the syndrome. The initial value of the weight is set based on the records of Chinese veterinary medicine classics and expert experience, and is automatically optimized through model training in the future.
[0033] The "Eighteen Incompatibilities and Nineteen Antagonisms" edge is used to connect medicinal herb nodes, indicating that there are incompatibilities between the different medicinal herbs represented by the connected medicinal herb nodes; its edge weight is fixed at 1, indicating that they are prohibited from being used together; for example, cinnamon and red ochre have nineteen antagonisms, and aconite and pinellia have eighteen incompatibilities, so the cinnamon node and red ochre node, and the aconite node and pinellia node, can be connected by the "Eighteen Incompatibilities and Nineteen Antagonisms" edge.
[0034] Efficacy edges are used to connect medicinal material nodes and efficacy nodes, specifically representing the pharmacological effects of the medicinal material corresponding to the medicinal material node; their edge weights are pre-determined based on the content of effective components of the medicinal material and pharmacological experimental data.
[0035] Collaborative edges are used to connect medicinal herb nodes, indicating that the combined use of the medicinal herbs corresponding to the connected medicinal herb nodes has a synergistic effect. The edge weight is determined based on the combined drug use index in pharmacological experiments.
[0036] The syndrome-symptom edge is used to connect the syndrome node and the symptom feature vector, indicating that the syndrome corresponding to the syndrome node has the typical clinical manifestations described by the symptom feature vector.
[0037] In some embodiments, the construction of a veterinary knowledge graph may include two sub-steps: entity extraction and relation weight initialization; specifically as follows: For entity extraction, a Bidirectional Encoder Representations from Transformers Conditional Random Field (BERT-CRF) can be used to extract entities from veterinary texts. Specifically, the text in the veterinary texts is first segmented into sentences to obtain a sentence set. Then, the sentences in the sentence set are processed using Bidirectional Encoder Representations from Transformers (BERT) to obtain a set of context-related word vectors. Finally, the word vector set is processed using a Conditional Random Field (CRF) to obtain an entity set. The entity set can include syndrome entities, medicinal material entities, efficacy entities, and contraindication entities. Syndrome entities can correspond to syndrome nodes, medicinal material entities can correspond to medicinal material nodes, efficacy entities can correspond to efficacy nodes, and contraindication entities can correspond to contraindication nodes.
[0038] For the initialization of relation weights, an edge set can be constructed based on the associations between different entities in veterinary classics, and then initial edge weights can be assigned to various types of edges in the edge set based on veterinary classics and expert experience.
[0039] For example, for the relationship between the monarch, minister, assistant, and envoy, the initial weights can be set according to the paired roles, and the weight of the edge corresponding to the monarch medicine can be greater than that of the minister medicine. The weight of the edge corresponding to the minister medicine can be greater than that of the assistant medicine. For example, the weight of the edge corresponding to the monarch medicine can be 0.8-1.0, the weight of the edge corresponding to the minister medicine can be 0.5-0.8, and the weight of the edge corresponding to the assistant medicine can be 0.2-0.5.
[0040] For example, the edge weights corresponding to efficacy edges and synergistic edges can be quantified based on pharmacological experimental data.
[0041] For example, the weight of the forbidden edge in the Eighteen Inverses and Nineteen Taboos is fixed at 1.
[0042] In some embodiments, the first pathological feature may include a feature set obtained by extracting features from various data in the process of processing the first indication data; specifically, the first pathological feature may be obtained in the following ways: The body temperature time series data were statistically averaged to obtain body temperature features consisting of the mean body temperature, standard deviation of body temperature, slope of body temperature rise, slope of body temperature fall, peak body temperature, and the duration of the peak body temperature. Heart rate data were statistically averaged to obtain heart rate features consisting of the mean heart rate, standard deviation of heart rate, slope of heart rate rise, slope of heart rate fall, peak heart rate, and the duration of the peak heart rate. Fecal features were extracted from fecal state using a convolutional neural network. Spatiotemporal features were extracted from behavioral videos used to represent behavioral data using keyframe sampling and a two-dimensional convolutional network to obtain behavioral features. The body temperature features, heart rate features, fecal features, and behavioral features were concatenated to obtain the first pathological feature.
[0043] In some embodiments, the first prescription may be used to initially adjust the diarrheal condition after confirmation by a veterinarian or professional technician.
[0044] In some embodiments, the first prescription may include a preliminarily determined prescription for controlling the spread or worsening of diarrhea; exemplaryly, the first prescription may include at least one traditional Chinese medicine; specifically, the first prescription may be obtained in the following ways: The first pathological feature is analyzed to determine the target disease corresponding to the first pathological feature. Then, based on the target disease, the syndrome nodes in the veterinary knowledge graph are screened to obtain the target syndrome. The set of Chinese medicines associated with the target syndrome that are not connected by the contraindication edges of the Eighteen Incompatibilities and Nineteen Antagonisms is determined as the candidate Chinese medicine set. Next, based on the efficacy of the efficacy edges associated with the candidate Chinese medicine set in the veterinary knowledge graph and the target disease, the composition of each Chinese medicine in the candidate Chinese medicine set is adjusted to obtain the first prescription.
[0045] In some embodiments, the first prescription can be obtained within a first time period; exemplaryly, the length of the first time period can be adjusted according to at least one of the severity of the diarrheal condition, the age of the calf in months or days, the rate of transmission of the diarrheal condition in the herd, and the extent of transmission; exemplaryly, the length of the first time period can be shortened as the severity increases, the age decreases, the rate of transmission increases, and the extent of transmission expands; exemplaryly, the first time period can include 4 hours or 6 hours starting from the collection of the first indicator data.
[0046] Step 103: If the second indication data is collected, adjust the principal, assistant, adjuvant, and guide status of the medicinal materials in the first prescription based on the first pathological feature and the second pathological feature corresponding to the second indication data to generate the second prescription.
[0047] The second prescription is used to adjust the diarrhea condition; the second indication data includes pathogenic microorganism indicators and blood biochemical indicators in calves.
[0048] Accordingly, if no second indicator data is collected, the status of the principal, assistant, adjuvant, and guide herbs in the first prescription can be left unchanged during the second time period to generate the second prescription.
[0049] In some embodiments, the first prescription can adjust the diarrheal state before the second prescription is generated.
[0050] In some embodiments, pathogen indicators may include data on the types and relative abundance of pathogens in calves; for example, fecal samples of calves may be collected and tested using metagenomic sequencing or 16S ribosomal ribonucleic acid (16S rRNA) sequencing technology to obtain data on the types and relative abundance of pathogens.
[0051] In some embodiments, blood biochemical indicators may include blood biochemical index data of calves; specifically, blood samples from the jugular vein of calves may be collected and tested using a fully automated biochemical analyzer to obtain blood biochemical index data including white blood cell count, neutrophil percentage, C-reactive protein, albumin, and total protein.
[0052] In some embodiments, the second pathological feature may include a second feature set obtained by feature extraction from the data in the second indication data.
[0053] In some embodiments, the second prescription may include a modified result of the first prescription; for example, the types of Chinese herbs contained in the second prescription may be the same as or different from the types of Chinese herbs contained in the first prescription, and the dosage of the Chinese herbs contained in the second prescription may be the same as or different from the dosage of the Chinese herbs contained in the first prescription.
[0054] In some embodiments, the second formulation can be generated in the following manner: The first pathological feature represents the first disease, and the second pathological feature represents the second disease. If the second disease and the first disease belong to the same category, a third-party agent corresponding to the second disease is obtained from the veterinary knowledge graph. Then, the first prescription is modified based on the third-party agent to obtain the second prescription. Specifically, the set of medicinal materials in the first prescription can be adjusted based on the set of medicinal materials corresponding to the third-party agent to obtain the first prescription with adjusted medicinal materials. Then, the dosage of medicinal materials in the first prescription with adjusted medicinal materials is adjusted to obtain the second prescription.
[0055] If the second symptom is a different category from the first symptom, the first and second indication data are collected again, and the above process is repeated. If the new second symptom is a different category from the new first symptom, the first and second pathological features are integrated, and the integrated first and second pathological features are analyzed through a veterinary knowledge graph to obtain the second prescription.
[0056] In some embodiments, the second prescription can be generated within a second time period; for example, the second time period may include the time period starting from the detection of diarrhea in calves; it should be noted that the second time period includes the first time period, and may include the first time period and the second time period starting at the same time point, but the end point of the second time period may include the time period in which the second prescription is generated; specifically, the time period length corresponding to the second time period may be greater than the time period length corresponding to the first time period, because the time required to collect and confirm the second indicator data is greater than the time required to collect and confirm the first indicator data.
[0057] As can be seen from the above, in the method for generating a calf diarrhea prescription based on the principle of monarch-minister-assistant-guide compatibility provided in this application embodiment, if a calf is detected to be in a state of diarrhea, first indicator data including the calf's body temperature, heart rate, fecal condition, and behavioral data are collected. This improves the comprehensiveness and completeness of the first indicator data. Furthermore, based on a veterinary knowledge graph, the first pathological features corresponding to the first indicator data are processed to obtain a first prescription for adjusting the diarrhea state. Since the veterinary knowledge graph is associated with veterinary classics, the comprehensiveness, completeness, and authority of the data in veterinary classics can be utilized to improve the targeting and effectiveness of the first prescription, thereby achieving effective control of the diarrhea state. At the same time, if a second indicator is collected... Based on the first pathological feature and the second pathological feature corresponding to the second indicator data, the principal, assistant, and adjuvant herbs in the first prescription are adjusted to generate a second prescription for adjusting diarrhea. The second indicator data includes pathogenic microorganism indicators and blood biochemical indicators in calves. In this way, the first prescription can be adjusted in a targeted and gradual manner, thereby improving the targeting and accuracy of the second prescription. Furthermore, by adjusting the principal, assistant, and adjuvant herbs in the first prescription, the efficacy and effects of the herbs in the first prescription can be adjusted at a fine-grained level, further improving the accuracy of the second prescription. Thus, the second prescription determined by the above method can meet the actual treatment needs for calf diarrhea.
[0058] Based on the foregoing embodiments, the method for generating a formula for calf diarrhea based on the compatibility of principal, assistant, adjuvant, and guide herbs provided in this application embodiment, by adjusting the state of the principal, assistant, adjuvant, and guide herbs in the first formula based on the first pathological feature and the second pathological feature corresponding to the second indicator data, to generate a second formula, can be achieved through the following steps: Step A1: Determine the set of probabilities of the evidence type corresponding to the first indicator data.
[0059] Among them, the first prescription is associated with the probability set of syndrome types.
[0060] In some embodiments, the syndrome probability set may include a set of probabilities of at least two syndrome types corresponding to the first indicator data; correspondingly, the target syndrome type corresponding to the first prescription may include the syndrome type corresponding to the syndrome type with the largest value in the syndrome probability set; for example, the at least two syndrome types may include damp-heat syndrome type, cold-damp syndrome type and spleen deficiency syndrome type, and the sum of syndrome probabilities in the syndrome probability set may be 1.
[0061] In some embodiments, the probability set of the certificate type can be determined in the following way: The first indicator data is used to extract features by a lightweight convolutional neural network to obtain a set of syndrome probabilities. For example, the lightweight convolutional neural network may include an input layer, two cascaded fully connected layers and an output layer. The output layer can output three-dimensional results to output the probabilities of damp-heat syndrome, cold-damp syndrome and spleen deficiency syndrome, respectively.
[0062] Step A2: Combine the first pathological feature and the second pathological feature to obtain the comprehensive pathological feature.
[0063] It should be noted that the execution order of steps A1 and A2 can be adjusted or executed in parallel, and this application embodiment does not limit this.
[0064] Step A3: Using a relational graph convolutional network based on veterinary knowledge graph, process the probability set of syndrome types and comprehensive pathological features to obtain the set of embedding vectors corresponding to the set of medicinal materials contained in the first prescription.
[0065] In some embodiments, the embedding vectors in the embedding vector set can represent the name, efficacy, contraindications and indications of the medicinal materials in the medicinal material set as a whole; for example, the cinnamaldehyde node can contain its initial dosage information, so that its corresponding embedding vector can also contain dosage information.
[0066] In some embodiments, the nth embedding vector corresponding to the nth medicinal material in the medicinal material set can be obtained in any of the following ways: The syndrome probability with the largest value in the syndrome probability set is determined as the target syndrome. Attribute data associated with the syndrome node corresponding to the target syndrome is obtained from the veterinary knowledge graph. If the attribute data matches the features described by the comprehensive pathological features, a weighted aggregation of the neighbor nodes associated with the nth medicinal material node is performed using a relational graph convolutional network to obtain the nth embedding vector. The neighbor nodes can include the medicinal material node corresponding to the nth medicinal material, as well as its first-level and second-level neighbor nodes. n can be an integer greater than or equal to 1.
[0067] It should be noted that in the process of obtaining the nth embedding vector, the eighteen inverse rules and nineteen antagonistic rules between the neighboring nodes and the corresponding medicinal node of the nth medicinal material need to be considered.
[0068] Step A4: Determine the selection probability set based on the set of embedding vectors.
[0069] Among them, the selection probability in the selection probability set includes the probability that the medicinal material in the first prescription is selected.
[0070] In some embodiments, the nth selection probability corresponding to the nth medicinal material in the selection probability set can be determined in the following way: The utility and contraindications represented by the nth embedding vector are analyzed to obtain the nth application scenario corresponding to the nth medicinal material. Then, the nth selection probability is determined based on the nth degree of matching between the nth application scenario and the comprehensive pathological characteristics. For example, the nth selection probability can increase with the increase of the nth degree of matching.
[0071] Step A5: Determine the set of selected doses based on the set of embedded vectors.
[0072] Among them, the selected doses in the selected dose set include the doses corresponding to the medicinal materials in the first prescription.
[0073] In some embodiments, the nth selected dose corresponding to the nth medicinal material can be determined in the following way: Based on the degree of difference between the nth utility parameter represented by the nth embedding vector and the target parameter corresponding to the pathology in the comprehensive pathological features, the nth selected dose is determined; wherein, the nth utility parameter may include the minimum dose of the nth medicine in treating or alleviating diarrhea and its complications, and the target parameter may include the maximum dosage of the nth medicine corresponding to the calf's age, weight, and comprehensive pathological features.
[0074] It should be noted that the execution order of steps A4 and A5 can be adjusted or executed in parallel, and this application embodiment does not limit this.
[0075] Step A6: Generate the second prescription based on the selection probability set and the selection dose set.
[0076] In some embodiments, the second formulation can be generated in the following manner: The herbs in the first set whose probability is greater than or equal to the probability threshold in the selection probability set are identified as target herbs. Then, based on the selection dose set, the principal, assistant, adjuvant, and guiding herbs are determined from the set of target herbs. Finally, the second prescription is generated based on the principal, assistant, adjuvant, and guiding herbs.
[0077] As can be seen from the above, the method for generating a calf diarrhea prescription based on the monarch-minister-assistant-guide combination provided in this application embodiment determines the probability set of syndrome types corresponding to the first indicator data, which can improve the accuracy of the probability set of syndrome types; furthermore, by splicing the first pathological feature and the second pathological feature, a comprehensive pathological feature is obtained, thus enabling a comprehensive and accurate representation of the calf diarrhea state through the comprehensive pathological feature; on this basis, by using a relational graph convolutional network based on a veterinary knowledge graph, processing the probability set of syndrome types and the comprehensive pathological feature, an embedding vector set corresponding to the set of medicinal materials contained in the first prescription is obtained, which not only improves the comprehensiveness and accuracy of the embedding vector set, but also enables an intuitive quantification of the efficacy and indications of the set of medicinal materials contained in the first prescription through the embedding vector set; at the same time, by determining the selection probability set and the selection dosage set based on the embedding vector set, and generating a second prescription based on the selection probability set and the selection dosage set, the accuracy of the monarch-minister-assistant-guide combination of medicinal materials in the second prescription can be improved.
[0078] Based on the foregoing embodiments, the method for generating a formula for calf diarrhea based on the compatibility of principal, assistant, adjuvant, and guide herbs provided in this application can be implemented by determining the selection probability set based on the set of embedded vectors in the following ways: The first decoder decodes the set of embedded vectors to obtain a set of decoding probabilities; the decoding probabilities in the set of decoding probabilities that are greater than or equal to the probability threshold are determined as selection probabilities, and the set of selection probabilities is determined as the selection probability set.
[0079] The first decoder includes a first multi-layer perceptron (MLP) and a second MLP, which are cascaded together.
[0080] In some embodiments, the first decoder may include a first MLP and a second MLP set in cascade, and may also include a first activation function set in cascade with the second MLP; wherein the first activation function may be a sigmoid function; for example, the first decoder may be pre-trained based on a sample set, and the training process will be described later.
[0081] As can be seen from the above, the method for generating a formula for calf diarrhea based on the compatibility of principal, assistant, adjuvant, and guide herbs provided in this application embodiment processes the embedded vector set by a first decoder composed of a first MLP and a second MLP set in a cascaded configuration to obtain a decoding probability set. In this way, by leveraging the fully connected feature fusion advantage of the two MLPs, the method can fully track and capture the medicinal efficacy and syndrome features in the embedded vector set, thereby improving the accuracy of the decoding probability set. Furthermore, by determining the decoding probabilities in the decoding probability set that are greater than or equal to the probability threshold as the selection probabilities, and determining the set of selection probabilities as the selection probability set, the accuracy of the selection probability set can be improved.
[0082] Based on the foregoing embodiments, in the method for generating a formula for calf diarrhea based on the compatibility of principal, assistant, adjuvant, and guide herbs provided in this application, the decoding probabilities in the decoding probability set that are greater than or equal to the probability threshold are determined as selection probabilities, which can be achieved in the following way: Obtain the taboo rules; filter the candidate medicinal material set based on the taboo rules to obtain the target medicinal material set; determine the probability corresponding to the target medicinal material in the target medicinal material set as the selection probability.
[0083] Among them, the candidate medicinal material set includes medicinal materials whose decoding probability is greater than or equal to the probability threshold in the decoding probability set; the first prescription includes the candidate medicinal material set; the contraindication rules include the eighteen incompatibilities rule and the nineteen incompatibilities rule.
[0084] In some embodiments, the candidate medicinal materials set may include medicinal materials in the first prescription that have a decoding probability greater than or equal to a probability threshold.
[0085] In some embodiments, the contraindication rules may include medication rules associated with a first set of nodes that are associated with all medicinal material nodes in the veterinary knowledge graph; specifically, the first set of nodes may include at least one contraindication group node, and the contraindication rules may include a set of rules represented by the first set of nodes, consisting of the Eighteen Incompatibilities Group node and the Nineteen Antagonism Group node, which stipulate that medicinal materials cannot be used simultaneously.
[0086] In some embodiments, the contraindication rules may include medication rules associated with a second node set in the veterinary knowledge graph that is associated with a set of medicinal material nodes corresponding to the candidate medicinal material set; for example, the second node set may include at least one contraindication node, and the contraindication rules may include a set of rules represented by the second node set, consisting of the Eighteen Incompatibilities Group nodes and the Nineteen Antagonism Group nodes, which stipulate that medicinal materials cannot be used simultaneously, or the second node set may not contain contraindication group nodes.
[0087] In some embodiments, taboo rules can be obtained in any of the following ways: All taboo nodes are obtained from the veterinary knowledge graph to form the first node set. The set of rules that cannot be used simultaneously for medicinal materials associated with the taboo nodes in the first node set is determined as taboo rules.
[0088] The forbidden nodes associated with the candidate medicinal materials in the veterinary knowledge graph are identified as the second node set, and the set of rules that cannot be used simultaneously among the medicinal materials associated with the forbidden nodes in the second node set are identified as forbidden rules.
[0089] In some embodiments, the target medicinal material set can be a candidate medicinal material set, or a proper subset of the candidate medicinal material set; correspondingly, the target medicinal material set can be obtained in the following ways: First, update the decoding probability of each medicinal herb in the candidate medicinal herb set to obtain the corrected probability. The specific process is as follows: Obtain a third node set composed of medicinal herb nodes associated with the taboo rule. If the third node set includes at least two medicinal herbs from the candidate medicinal herb set, for example, the third node set includes the k-th medicinal herb and the p-th medicinal herb from the candidate medicinal herb set, then retain the larger of the k-th decoding probability corresponding to the k-th medicinal herb and the p-th decoding probability corresponding to the p-th medicinal herb, and determine the medicinal herb corresponding to the larger of the k-th decoding probability and the p-th decoding probability as the target medicinal herb. At the same time, correct the smaller of the k-th decoding probability and the p-th decoding probability to 0, to obtain the k-th corrected probability corresponding to the k-th medicinal herb and the p-th corrected probability corresponding to the p-th medicinal herb. If the third node set does not contain at least two medicinal herbs from the candidate medicinal herb set, but only contains one medicinal herb from the candidate medicinal herb set, for example, the third node set only contains the k-th medicinal herb from the candidate medicinal herb set, then determine the k-th corrected probability corresponding to the k-th medicinal herb as the k-th decoding probability corresponding to the k-th medicinal herb.
[0090] Secondly, based on the set of corrected probabilities, the medicinal materials in the candidate set are screened to obtain the target set of medicinal materials; the details are as follows: The medicinal materials with a correction probability greater than 0 in the candidate medicinal material set are identified as target medicinal materials, and the set of target medicinal materials is identified as the target medicinal material set.
[0091] In some embodiments, the selection probability may include the modified probability corresponding to the target medicinal material in the target medicinal material set.
[0092] As can be seen from the above, in the method for generating a calf diarrhea prescription based on the compatibility of principal, assistant, adjuvant, and guide herbs provided in this application embodiment, contraindication rules including the Eighteen Incompatibilities and Nineteen Antagonisms are obtained, and the candidate herb set is screened based on the contraindication rules to obtain the target herb set. The candidate herb set includes herbs whose decoding probabilities are greater than or equal to the probability threshold in the decoding probability set. The first prescription includes the candidate herb set. In this way, targeted screening of the candidate herb set contained in the first prescription can be achieved in the dimension of herb contraindications, thereby improving the safety of herbs in the target herb set. On this basis, the probability corresponding to the target herb in the target herb set is determined as the selection probability, which can improve the accuracy of the selection probability.
[0093] Based on the foregoing embodiments, the method for generating a formula for calf diarrhea based on the compatibility of principal, assistant, adjuvant, and guide herbs provided in this application can be implemented by determining the set of selected doses based on the set of embedded vectors in the following ways: The set of embedded vectors is decoded by a second decoder to obtain the set of selected doses.
[0094] The second decoder includes a cascaded third MLP and a fourth MLP.
[0095] In some embodiments, the second decoder further includes a second activation function cascaded with the fourth MLP; for example, the second activation function may be a sigmoid function.
[0096] In some embodiments, the selection of the dose set can be obtained in the following manner: The set of embedding vectors that correspond to the set of selection probabilities in the set of embedding vectors is determined as the set of target embedding vectors. Then, the set of target embedding vectors is processed by the second decoder to obtain the set of dosages of medicinal materials corresponding to the set of target embedding vectors, and the above set of dosages is determined as the set of selection dosages.
[0097] For example, the second decoder can be pre-trained based on a sample set, the training process of which will be described below.
[0098] As can be seen from the above, the method for generating a formula for calf diarrhea based on the compatibility of principal, assistant, adjuvant, and guide herbs provided in this application generates a set of selected doses by decoding the set of embedded vectors through a second decoder. The second decoder includes a third MLP and a fourth MLP set in cascade. In this way, by taking advantage of the fully connected feature fusion of the two MLPs, the correlation between the efficacy of medicinal materials, syndrome characteristics, and dosage of medicinal materials in the set of embedded vectors can be fully tracked and captured, thereby improving the accuracy of the selected dose set.
[0099] Based on the foregoing embodiments, the method for generating a formula for calf diarrhea based on the compatibility of principal, assistant, adjuvant, and guide herbs provided in this application embodiment, which processes the first pathological feature corresponding to the first indication data based on a veterinary knowledge graph to obtain the first formula, can be implemented in the following ways: Feature extraction was performed on the first pathological feature to obtain the target syndrome corresponding to the diarrhea state; based on the target syndrome, the medicinal material nodes in the veterinary knowledge graph were screened to obtain the first prescription.
[0100] In some embodiments, the first prescription can be obtained in the following manner: The first pathological feature is analyzed to determine the target disease corresponding to the first pathological feature. Then, based on the target disease, the syndrome nodes in the veterinary knowledge graph are screened to obtain the target syndrome. The set of medicinal material nodes connected to the target syndrome through the monarch-minister-adjuvant-guide edge is determined as the set of Chinese medicines to be screened. Next, the edge weights connected to the set of Chinese medicines to be screened are sorted in descending order. The set of Chinese medicines in the set of Chinese medicines to be screened whose edge weights are greater than or equal to the weight threshold is determined as the first prescription.
[0101] As can be seen from the above, the method for generating a formula for calf diarrhea based on the compatibility of principal, assistant, adjuvant, and guide herbs provided in this application extracts features from the first pathological feature to obtain the target syndrome corresponding to the diarrhea state, thereby improving the correlation between the target syndrome and the first pathological feature. Furthermore, the method filters the medicinal material nodes in the veterinary knowledge graph based on the target syndrome to obtain the first formula, thereby improving the correlation between the first formula and the first pathological feature as well as the veterinary knowledge graph. This improves the safety, effectiveness, and targeting of the first formula.
[0102] Based on the foregoing embodiments, the method for generating a formula for calf diarrhea based on the compatibility of principal, assistant, adjuvant, and guide herbs provided in this application can further perform the following steps: Step B1: Obtain the m-th embedding vector corresponding to the m-th medicinal material in the second prescription.
[0103] Where m is an integer greater than or equal to 1 and less than or equal to M, and M is an integer greater than 1 used to characterize the quantity of medicinal materials contained in the second prescription.
[0104] In some embodiments, the m-th embedding vector may include the embedding vector corresponding to the m-th medicinal material in the set of embedding vectors.
[0105] Step B2: Obtain the syndrome feature vector corresponding to the diarrhea state.
[0106] In some embodiments, the syndrome feature vector may include comprehensive pathological features of the target syndrome; for example, the syndrome feature vector may be obtained in the following ways: The first pathological feature or the comprehensive pathological feature is extracted by using a convolutional neural network to obtain the syndrome feature vector.
[0107] Step B3: Determine the m-th weight of the m-th medicinal material based on the m-th embedding vector and the syndrome feature vector.
[0108] In some embodiments, the m-th weight can characterize the importance of the m-th medicinal material in the treatment of diarrhea; correspondingly, the m-th weight can be determined in the following way: Mapping the proof type feature vector to the target dimension yields the mapped proof type vector. Mapping the m-th embedding vector to the target dimension yields the m-th mapped embedding. Equation (1) is used to calculate the mapped proof type vector, the m-th mapped embedding, the m-th embedded vector, and the proof type feature vector to obtain the m-th weight. : (1) in, For the mapping proof vector, For the m-th embedding vector, For the m-th mapping embedding, As the eigenvector of the proof type, T is used to... Perform transpose calculation.
[0109] Step B4: Generate prescription description information based on the first weight to the Mth weight.
[0110] The prescription description information includes information on the importance of the medicinal effects of the herbs in the second prescription.
[0111] In some embodiments, the prescription description information can be generated in the following ways: Based on the weights from the first to the Mth weights, the roles of the principal, assistant, adjuvant, and guide herbs in the second prescription are determined, and the corresponding selected dosages are obtained. At the same time, the efficacy description data corresponding to the herbs in the second prescription are obtained from the veterinary knowledge graph. Then, the roles of the herbs, the selected dosages, and the efficacy description data are integrated to obtain the prescription description information.
[0112] It should be noted that, for cinnamaldehyde monomer, its role as a medicinal material can be directly determined based on its selected dose and a pre-set set of dose thresholds. For example, if the selected dose of cinnamaldehyde monomer is greater than or equal to the first dose threshold, then cinnamaldehyde monomer is the principal drug; if its selected dose is greater than or equal to the second dose threshold but less than the first dose threshold, then cinnamaldehyde monomer is the assistant drug; if its selected dose is greater than or equal to the third dose threshold but less than the second dose threshold, then cinnamaldehyde monomer is the adjuvant drug. Among these, the first dose threshold can be greater than the second dose threshold, the second dose threshold can be greater than the third dose threshold, and the first to third dose thresholds can constitute a set of dose thresholds.
[0113] For example, special treatment can be added for medicinal materials with toxic risks; for instance, if a medicinal material has hepatotoxicity or nephrotoxicity and its weight is greater than the toxicity dose threshold, its role can be adjusted to an adjuvant, and a toxicity warning can be marked in the output, indicating that the medicinal material plays a role in restraining the toxicity or bias of the principal drug in the second prescription.
[0114] For example, the efficacy description data in the prescription description information may include the roles and mechanisms of action of the principal drug, assistant drug, and adjuvant drug in the second prescription.
[0115] For example, if the second prescription is related to a historical prescription, the prescription description information may also include the following prompt: This prescription is structurally similar to the historical prescription, and its clinical application experience can be referenced.
[0116] For example, prescription description information can be output and stored in a structured text format, making it easy for veterinarians to read and record.
[0117] As can be seen from the above, in the method for generating a formula for calf diarrhea based on the compatibility of principal, assistant, adjuvant, and guide herbs provided in this application embodiment, after obtaining the m-th embedding vector corresponding to the m-th herb in the second formula and the syndrome feature vector corresponding to the diarrhea state, the m-th weight of the m-th herb is determined based on the m-th embedding vector and the syndrome feature vector. In this way, the mutual correlation between the m-th weight, the syndrome feature vector, and the m-th embedding vector is realized. Furthermore, formula description information is generated based on the first weight to the M-th weight, and the formula description information includes description information on the importance of the efficacy of the herbs in the second formula. In this way, through the formula description information, a comprehensive and intuitive description and characterization of the efficacy of the herbs in the second formula can be achieved.
[0118] To illustrate the therapeutic effect of the technical solution provided by the present invention on calf diarrhea, Table 1 shows the statistical results of the actual treatment data of the comparative scheme provided in the embodiments of this application and the actual treatment data of this scheme.
[0119] The comparison schemes include Scheme 1 and Scheme 2. Scheme 1 includes the original formula of traditional Huanglian Jiedu Decoction, while Scheme 2 includes conventional antibiotic treatment including ceftiofur sodium. Correspondingly, the statistical parameters corresponding to the above statistical results include: Ninety calves were randomly divided into three groups based on their age and weight. The calves in the first group were then treated according to this plan, Plan 1, and Plan 2, respectively. The age range could include the first age range of 7 to 14 days and the second age range of 15 to 21 days. The weight range could include the first weight range of less than 40 kg and the second weight range of greater than or equal to 40 kg.
[0120] The efficacy was scored using a third-party efficacy evaluation method.
[0121] Evaluation metrics include 72-hour cure rate, average cure time, and may also include daily weight gain and treatment cost.
[0122]
[0123] Table 1 As shown in Table 1, compared with the control group, this treatment plan improved in terms of 72-hour cure rate, average cure time, and daily weight gain recovery. However, in terms of treatment cost, it increased compared with the control group, but still decreased compared with the control group.
[0124] It should be noted that, in the embodiments of this application, the relational graph convolutional network, the first decoder, and the second decoder can be pre-trained based on the sample set. Figure 2 This is a schematic diagram of the training process provided in an embodiment of this application.
[0125] For example, a sample set can be pre-collected, and sample labels can be set for the sample data in the sample set. The sample data in the sample set may include a first sample indicator corresponding to the first indicator data and a second sample indicator corresponding to the second indicator data. The sample labels corresponding to the sample data may include a syndrome type label, a therapeutic effect label, and a prescription label corresponding to the first sample indicator and the second sample indicator, respectively. The syndrome type label may include the actual syndrome type corresponding to the first sample indicator and the second sample indicator. The therapeutic effect label may include the actual therapeutic effect of the prescription corresponding to the first sample indicator and the second sample indicator. The prescription label may include the name or number of the prescription corresponding to the first sample indicator and the second sample indicator, and may also include the actual dosage of each Chinese herb in the above prescription.
[0126] For example, such as Figure 2 As shown, the method for obtaining the first pathological feature through the aforementioned embodiment can be used to process the first sample indicator to obtain the first sample pathological feature. Then, the first sample pathological feature is processed through an initial relation graph convolutional network to obtain a sample predicted syndrome probability set. The sample predicted syndrome probability set may include the damp-heat probability corresponding to the damp-heat syndrome, the cold-damp probability corresponding to the cold-damp syndrome, and the cold-deficiency probability corresponding to the spleen deficiency syndrome. The sum of the damp-heat probability, the cold-damp probability, and the cold-deficiency probability can be 1.
[0127] For example, the syndrome corresponding to the highest probability value in the sample predicted syndrome probability set can be determined as the sample predicted syndrome for the pathological characteristics of the first sample, and the veterinary knowledge graph can be searched to obtain the initial prescription corresponding to the sample predicted syndrome from the veterinary knowledge graph; wherein, the initial prescription may contain at least two Chinese medicines.
[0128] For example, the second sample indicators can be processed using the method for obtaining the second pathological features in the foregoing embodiments to obtain the second sample pathological features, and the first sample pathological features and the second sample pathological features can be spliced together to obtain the pathological feature splicing result.
[0129] For example, the pathological feature splicing results, the probability of the largest value in the sample predicted syndrome probability set, and the veterinary knowledge graph can be processed by the initial relation graph convolutional network to obtain the sample embedding vector set corresponding to the set of embedding vectors of each Chinese medicine in the initial prescription.
[0130] For example, the sample embedding vector set can be processed by the initial first decoder to obtain the sample selection probability set; for example, in the process of obtaining the sample selection dose set, the Gumbel-Sigmoid reparameterization method shown in Equation (2) can be used to determine the independent binary classification probability of the i-th medicinal material in the initial prescription. Corresponding discrete indicator variables : (2) in, For noise sampled from the Gumbel(0,1) distribution, To sample the temperature parameter, during training, the temperature is gradually annealed from a high value, such as 1.0, to a low value, such as 0.1.
[0131] For example, the target medicinal material set can be obtained by filtering the sample candidate medicinal material set based on the taboo rules in the aforementioned embodiments, and the probability corresponding to the target medicinal material set can be determined as the sample selection probability.
[0132] For example, the sample embedding vector can be processed by an initial second decoder to obtain a sample selected dose set.
[0133] For example, the prescriptions corresponding to the sample selection dose set can be identified as candidate sample prescriptions.
[0134] For example, the dose loss in the above data processing can be evaluated by using the binary cross-entropy between the sample-selected dose set and the actual dose set of the corresponding prescription; wherein, the sample-selected dose for cinnamaldehyde... The dose-adaptive mechanism shown in equation (3) can be used for calculation: (3) in, For the sigmoid function, The boundary temperature parameter is used for verification, and its value can be 0.1. The probability of cold and dampness. For the probability of damp heat, For the probability of cold deficiency, ( , , Let be the first weight set, and its value can be (0.35, 0.15, 0.075). This is the initial sample dose for cinnamaldehyde.
[0135] This design allows for a smooth and continuous variation of cinnamaldehyde sample selection within the range of [0.075, 0.40]. This design ensures that the dose approaches a high value (0.35) when cold and dampness predominate, a low value (0.15) when damp heat predominates, and a minimum value (0.075) when spleen deficiency is the main factor, with smooth and differentiable boundaries.
[0136] For example, an initial discriminator can be used to judge the compatibility, efficacy, and safety of the medicinal materials contained in the candidate sample prescription.
[0137] Specifically, the rationality of the combination can be determined by the following method: calculating the cosine similarity between the sample embedding vectors of any two herbs in the herb set corresponding to the sample selected dosage set, and determining the cosine similarity as the rationality score of the combination between any two herbs.
[0138] The efficacy can be assessed by using a graph neural network based on a veterinary knowledge graph to predict the cure rate of the set of medicinal herbs included in the selected dosage set.
[0139] For example, safety can be assessed by using a multilayer perceptron to evaluate the cumulative toxicity and risk of liver and kidney function effects of the herbal medicine set corresponding to the selected dose set of the sample. Specifically, toxicity grading data of the herbal medicines in the above herbal medicine set can be established, and toxicity classifications including dimensions such as hepatotoxicity, nephrotoxicity, and neurotoxicity can be configured. The toxicity grading data and toxicity classifications can be integrated to obtain a safety score.
[0140] For example, the comprehensive score of the medicinal material set corresponding to the sample selection dose set can be calculated using equation (4). : (4) in,( , , The second weight set is set in advance, and its values can be set in advance based on the clinical experts' assessment of the compatibility, efficacy prediction, and safety importance. As for the score for the compatibility of the matches, For the cure rate, This is a security score.
[0141] For example, the overall score can also be the discrimination loss of the initial discriminator.
[0142] For example, the generation loss corresponding to the initial first decoder, the initial second decoder, and the initial relational graph convolutional network. It can be calculated using equation (5): (5) in, This is a positive penalty that occurs when incompatible medicinal materials are selected simultaneously, used in conjunction with hard constraint masks to ensure compatibility safety. As a penalty for dosage deviation, ( , ) is the third set of weights, whose values can be adjusted or set according to the actual training needs.
[0143] For example, the parameters of the first decoder, the initial second decoder, and the initial relational graph convolutional network can be adjusted according to the generation loss and the comprehensive score shown in Equation (4) to obtain the first decoder, the second decoder, and the relational graph convolutional network.
[0144] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.
[0145] The methods disclosed in the various method embodiments provided in this application can be arbitrarily combined to obtain new method embodiments without conflict.
[0146] The features disclosed in the various product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0147] The features disclosed in the various method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.
[0148] It should be noted that the aforementioned computer-readable storage media can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM), etc.; or it can be various electronic devices including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0149] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0150] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0151] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware nodes. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0152] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0153] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0154] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0155] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for generating a formula for calf diarrhea based on the compatibility of principal, assistant, adjuvant, and guide herbs, characterized in that, The method includes: If a calf is detected to be in a state of diarrhea, first indicator data is collected; wherein, the first indicator data includes the calf's body temperature data, heart rate data, fecal condition and behavioral data; The first pathological feature corresponding to the first indication data is processed based on the veterinary knowledge graph to obtain the first prescription; wherein, the veterinary knowledge graph is associated with veterinary classics; If second indication data is collected, the principal, assistant, adjuvant, and guide properties of the medicinal materials in the first prescription are adjusted based on the first pathological feature and the second pathological feature corresponding to the second indication data to generate a second prescription; wherein, the second prescription is used to adjust the diarrhea state; the second indication data includes the pathogenic microorganism indications and blood biochemical indications of the calf.
2. The method according to claim 1, characterized in that, The step of adjusting the principal, assistant, adjuvant, and guiding herbs in the first prescription based on the first pathological feature and the second pathological feature corresponding to the second indicator data to generate a second prescription includes: Determine the set of syndrome probability corresponding to the first indicator data; wherein, the first prescription is associated with the set of syndrome probability. The first pathological feature and the second pathological feature are spliced together to obtain the comprehensive pathological feature; Based on the veterinary knowledge graph, the relationship graph convolutional network processes the syndrome probability set and the comprehensive pathological features to obtain the embedding vector set corresponding to the set of medicinal materials contained in the first prescription. A selection probability set is determined based on the set of embedded vectors; wherein, the selection probability in the selection probability set includes the probability that the medicinal material in the first prescription is selected; A set of selected doses is determined based on the set of embedded vectors; wherein, the selected doses in the set of selected doses include the doses corresponding to the medicinal materials in the first prescription; The second prescription is generated based on the set of selection probabilities and the set of selection dosages.
3. The method according to claim 2, characterized in that, Determining the selection probability set based on the embedded vector set includes: The embedded vector set is decoded by a first decoder to obtain a decoding probability set; wherein, the first decoder includes a first multilayer perceptron and a second multilayer perceptron set in a cascaded manner. The decoding probabilities in the set of decoding probabilities that are greater than or equal to the probability threshold are determined as the selection probabilities; The set of selection probabilities is defined as the selection probability set.
4. The method according to claim 3, characterized in that, The step of determining the selection probability from the decoding probability set that is greater than or equal to the probability threshold includes: Obtain the taboo rules; wherein, the taboo rules include the eighteen inverse rules and the nineteen taboo rules; The candidate medicinal materials set is screened based on the taboo rules to obtain the target medicinal materials set; wherein, the candidate medicinal materials set includes medicinal materials in the decoding probability set whose decoding probability is greater than or equal to the probability threshold; the first prescription includes the candidate medicinal materials set; The probability corresponding to the target medicinal material in the target medicinal material set is determined as the selection probability.
5. The method according to claim 2, characterized in that, The step of determining the selected dose set based on the embedded vector set includes: The set of embedded vectors is decoded by a second decoder to obtain the set of selected doses; wherein the second decoder includes a third multilayer perceptron and a fourth multilayer perceptron cascaded together.
6. The method according to claim 1, characterized in that, The first prescription is obtained by processing the first pathological feature corresponding to the first indication data based on the veterinary knowledge graph, including: Feature extraction is performed on the first pathological feature to obtain the target syndrome corresponding to the diarrhea state; Based on the target syndrome type, the medicinal material nodes in the veterinary knowledge graph are screened to obtain the first prescription.
7. The method according to any one of claims 1 to 6, characterized in that, The method further includes: Obtain the m-th embedding vector corresponding to the m-th medicinal material in the second prescription; where m is an integer greater than or equal to 1 and less than or equal to M, and M is an integer greater than 1 and is used to characterize the number of medicinal materials contained in the second prescription; Obtain the syndrome feature vector corresponding to the diarrhea state; Based on the m-th embedding vector and the syndrome feature vector, determine the m-th weight of the m-th medicinal material; Based on the first weight to the Mth weight, formula description information is generated; wherein, the formula description information includes description information on the importance of the medicinal effects of the medicinal materials in the second formula.