Dairy cow mastitis drug recommendation and efficacy evaluation method based on knowledge graph
Patent Information
- Application Number
- CN202611189119.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-06
- Publication Date
- 2026-10-13
AI Technical Summary
但是,其存在着一个明显的局限性,即推荐模型多为静态构建,无法根据疗效反馈数据进行持续自适应更新
通过构建用药推荐、疗效评估、图谱更新的完整闭环反馈机制,解决了现有奶牛乳房炎用药推荐模型无法根据疗效反馈数据进行持续自适应更新的技术问题。在推荐方案执行后获取多维生理恢复数据并计算量化疗效评分,基于该评分同时驱动知识图谱关系权重的动态调节和推荐模型参数的增量更新,使得推荐系统能够随着临床数据的持续积累不断优化,克服了传统静态模型在面对耐药菌演变、个体差异显著等复杂病例时推荐精度持续下降的缺陷。
Smart Images

Figure CN122907384A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge graph technology, specifically to a knowledge graph-based method for recommending medications and evaluating the efficacy of treatments for mastitis in dairy cows. Background Technology
[0002] With the large-scale and intelligent development of modern animal husbandry, dairy cow health farming is constantly moving towards precision and digitalization. This trend has brought many significant advantages in improving the level of dairy cow health monitoring, optimizing the allocation of diagnostic and treatment resources, and ensuring the quality and safety of dairy products. However, along with this, mastitis in dairy cows, as a common disease on farms, faces multiple severe challenges in clinical diagnosis and treatment, including a complex pathogen spectrum, increasingly prominent drug resistance, and significant individual differences.
[0003] In clinical medication decisions for mastitis in dairy cows, veterinarians primarily rely on a comprehensive assessment of pathogen susceptibility test results, the cow's physiological condition, and existing clinical experience. In recent years, some approaches have attempted to assist medication recommendations by constructing drug-disease association knowledge bases or using rule-based reasoning, which has improved the standardization and efficiency of medication decisions to some extent. However, a significant limitation exists: the recommendation models are mostly statically constructed and cannot be continuously adaptively updated based on efficacy feedback data. This leads to difficulties in consistently improving the efficacy matching of recommended solutions when facing complex cases with drug-resistant bacterial infections, mixed infections, or significant individual differences. This can result in medication bias, prolonged treatment cycles, and disease recurrence, ultimately causing irreparable economic losses to dairy farms. Summary of the Invention
[0004] The purpose of this invention is to provide a knowledge graph-based method for recommending medications and evaluating the efficacy of treatments for mastitis in dairy cows, in order to address the shortcomings of the prior art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a knowledge graph-based method for recommending and evaluating the efficacy of medications for mastitis in dairy cows, applicable to target lactating dairy cows, characterized by comprising: Acquire dynamic physiological state data and pathogen susceptibility data of the target lactating dairy cows; Based on the dynamic physiological state data, the pathogen sensitivity data, and the preset knowledge graph for the diagnosis and treatment of bovine mastitis, candidate drug treatment plans are generated through multi-objective fusion reasoning. The knowledge graph for the diagnosis and treatment of bovine mastitis includes the relationships between drug entities, disease entities, pathogen entities, drug sensitivity result entities, efficacy indicator entities, symptom entities, and physiological characteristic entities. The candidate drug regimen is executed to obtain multidimensional physiological recovery data of the target lactating dairy cows and to calculate a quantitative efficacy score. Based on the quantitative efficacy score, the relation weights in the knowledge graph of bovine mastitis diagnosis and treatment are dynamically updated to obtain the weight results. Based on the weighting results, the model parameters of the recommendation model used in the multi-objective fusion inference are adjusted.
[0006] In a preferred embodiment, the step of generating candidate treatment plans through multi-objective fusion reasoning based on the dynamic physiological state data, the pathogen sensitivity data, and a preset knowledge graph for the diagnosis and treatment of bovine mastitis includes: Retrieve a set of candidate drug entities that meet the pathogen sensitivity data constraints in the knowledge graph for the diagnosis and treatment of bovine mastitis. The pathogen sensitivity data constraints include: the drug sensitivity result entity corresponding to the candidate drug entity should be sensitive or intermediate, and sensitive drugs should be selected first. For each candidate drug entity in the candidate drug entity set, the expected efficacy index, drug sensitivity matching index, compatibility safety index, physiological compatibility index, and economic index are calculated based on the knowledge graph of bovine mastitis diagnosis and treatment. Based on a preset weighting strategy, the efficacy expectation index, the drug sensitivity matching index, the compatibility safety index, the physiological compatibility index, and the economic index are weighted and fused to obtain a comprehensive recommendation score. The candidate drug entity set is sorted based on the comprehensive recommendation score to generate the candidate drug treatment plan.
[0007] In a preferred embodiment, the step of calculating efficacy expectation indicators, drug sensitivity matching indicators, compatibility safety indicators, physiological compatibility indicators, and economic indicators for each candidate drug entity in the candidate drug entity set based on the bovine mastitis diagnosis and treatment knowledge graph includes: The entity and relation representation in the knowledge graph of bovine mastitis diagnosis and treatment are learned by using a relational graph convolutional network to obtain a low-dimensional vector representation of each entity; Based on the low-dimensional vector representation, the multidimensional association features between the physiological feature entities corresponding to the target lactating dairy cow and each candidate drug entity are calculated. The multidimensional correlation features are input into a multilayer perceptron, which outputs the efficacy expectation index, the drug sensitivity matching index, the compatibility safety index, the physiological compatibility index, and the economic index. It also includes the step of generating recommendation explanation information: In the knowledge graph for the diagnosis and treatment of mastitis in dairy cows, multiple candidate relationship paths are searched between the drug entities in the candidate treatment plan and the physiological characteristic entities of the target lactating dairy cow; Based on path length, relation type weight, and node centrality index, calculate the explanatory confidence score for each of the candidate relation paths. The candidate relation path with the highest explanation confidence score is selected as the target explanation path; The entity names and relation names in the target interpretation path are mapped to preset natural language templates to generate structured explanatory text for showing users the basis for recommending the drug entities.
[0008] In a preferred embodiment, acquiring multidimensional physiological recovery data of the target lactating dairy cow and calculating a quantitative efficacy score based on the multidimensional physiological recovery data includes: The improvement rate of milk somatic cell count, milk yield recovery rate, symptom improvement score, pathogen clearance rate, recurrence rate, and side effects of the target lactating dairy cows after a preset treatment cycle are obtained as the multidimensional physiological recovery data. Based on the improvement rate of milk somatic cell count, the recovery rate of milk production, the symptom improvement score, the pathogen clearance rate, the recurrence rate, and the occurrence of side effects, the quantitative efficacy score is calculated using a multi-dimensional efficacy scoring model. Specifically, the multi-dimensional efficacy scoring model is as follows: Q = α × milk somatic cell count improvement rate + β × milk yield recovery rate + γ × symptom improvement score + δ × pathogen clearance rate + ε × (1 - recurrence rate) - ζ × side effect weight; Wherein, α, β, γ, δ, ε, and ζ are configurable weight parameters for the improvement rate of somatic cell count in milk, the recovery rate of milk production, the symptom improvement score, the pathogen clearance rate, the recurrence rate, and side effects, respectively. The pathogen clearance rate was determined based on negative bacterial culture results from breast milk after treatment. In a preferred embodiment, the method further includes: determining the efficacy level based on the correspondence between the quantitative efficacy score and a preset level threshold; The efficacy levels include cured, significantly effective, improved, and ineffective.
[0009] In a preferred embodiment, dynamically updating the relation weights in the bovine mastitis diagnosis and treatment knowledge graph based on the quantified efficacy score includes: Determine the relationship between the quantitative efficacy score and a preset first threshold and a second threshold, wherein the first threshold is greater than the second threshold; If the quantitative efficacy score is greater than or equal to the first threshold, then the drug entity, treatment relationship and disease entity corresponding to the candidate medication regimen are located in the knowledge graph of bovine mastitis diagnosis and treatment, and the relationship weight between the drug entity, the treatment relationship and the disease entity is increased according to the preset first adjustment step size. If the quantitative efficacy score is less than the second threshold, the relationship weight is reduced by a preset second adjustment step, and a check mark is added to the relationship edge between the drug entity, the treatment relationship and the disease entity. If the quantitative efficacy score is greater than or equal to the second threshold and less than the first threshold, then the relationship weight remains unchanged; The relation weights are used to adjust the probability of the drug entity being selected as a candidate drug entity in subsequent multi-objective fusion inference.
[0010] In a preferred embodiment, the step of dynamically updating the recommendation model parameters used for the multi-objective fusion inference based on the quantified efficacy score includes: Collect the accumulated multidimensional physiological recovery data and the corresponding quantitative efficacy scores within a preset time window to construct an incremental training dataset; Based on the incremental training dataset, the elastic weight consolidation algorithm is used to update the parameters of the recommendation model. While updating the network weights in the recommendation model that are related to the incremental training dataset, regularization penalties are applied to historical network weights that are unrelated to the incremental training dataset by calculating the diagonal elements of the Fisher information matrix of the network weights, so as to avoid catastrophic forgetting. It also includes: when the quantitative efficacy score is detected to be greater than or equal to the first threshold, and the combination of drug entity and disease entity corresponding to the candidate medication regimen does not exist in the knowledge graph of bovine mastitis diagnosis and treatment, a triplet containing the drug entity, the disease entity and the treatment relationship is added to the knowledge graph of bovine mastitis diagnosis and treatment.
[0011] In a preferred embodiment, the entity types of the bovine mastitis diagnosis and treatment knowledge graph include drug entities, disease entities, pathogen entities, drug sensitivity result entities, efficacy indicator entities, symptom entities, and physiological characteristic entities. The relationship types in the knowledge graph for the diagnosis and treatment of mastitis in dairy cows include treatment relationships, sensitive or resistant relationships, relationships with side effects, compatibility relationships, physiological compatibility relationships, contraindication relationships, recommendation-rating relationships, and triggering relationships; The nodes and edges in the knowledge graph for the diagnosis and treatment of bovine mastitis are constructed by extracting and integrating data from veterinary pharmacopoeia, clinical treatment guidelines, and historical treatment records.
[0012] In a preferred embodiment, acquiring the dynamic physiological state data and pathogen susceptibility data of the target lactating dairy cow includes: The current milk yield and milk characteristics data of the target lactating dairy cows are collected in real time from an Internet of Things sensor network. Data on somatic cell counts, bacterial culture, and antibiotic susceptibility testing of milk from the target lactating dairy cows were obtained from laboratory testing equipment. Obtain basic information and historical medical data of the target lactating dairy cows from the ranch management system; The current milk production data, the milk characteristics data, the milk somatic cell count data, the bacterial culture data, the antibiotic sensitivity test data, the basic information data, and the historical medical data are time-stamp aligned. For data fields with missing values, a time-series-based interpolation algorithm is used to impute the missing values, thereby obtaining the dynamic physiological state data and the pathogen sensitivity data.
[0013] In a preferred embodiment, the method further includes a step of optimizing recommendations based on historical medical data: Based on the pathogen sensitivity data and the dynamic physiological state data, a set of similar cases is retrieved from the historical diagnosis and treatment database. The similarity between each historical case in the set of similar cases and the target lactating dairy cow in terms of pathogen type and physiological state characteristics is greater than a preset similarity threshold. Extract the historical medication regimens and corresponding historical efficacy rates for each historical case in the set of similar cases; The historical efficacy rate is used as an auxiliary scoring factor and incorporated into the comprehensive recommendation score calculation of the multi-objective fusion reasoning, so as to improve the ranking priority of historical medication regimens with historical efficacy rates higher than the preset efficacy rate threshold in the similar case set among the candidate medication regimens.
[0014] The technical effects and advantages provided by the present invention in the above technical solution are as follows: By constructing a complete closed-loop feedback mechanism encompassing medication recommendation, efficacy evaluation, and knowledge graph updates, this system addresses the technical challenge of existing dairy cow mastitis medication recommendation models failing to continuously and adaptively update based on efficacy feedback data. After the recommended treatment plan is implemented, multidimensional physiological recovery data is acquired, and a quantitative efficacy score is calculated. This score simultaneously drives the dynamic adjustment of knowledge graph relation weights and the incremental update of recommendation model parameters. This allows the recommendation system to continuously optimize with the accumulation of clinical data, overcoming the shortcomings of traditional static models that suffer from a continuous decline in recommendation accuracy when facing complex cases such as evolving drug-resistant bacteria and significant individual differences. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0016] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] Example 1, please refer to Figure 1 As shown in this embodiment, the knowledge graph-based method for recommending and evaluating the efficacy of medications for mastitis in dairy cows is applicable to target lactating dairy cows and includes: Step S1: Obtain dynamic physiological status data and pathogen susceptibility data of the target lactating dairy cows.
[0019] Specifically, dynamic physiological state data reflects the current health status and production performance of dairy cows, such as real-time milk yield, milk conductivity, body temperature, and activity level; pathogen sensitivity data comes from laboratory test results, including bacterial culture and identification results and antibiotic susceptibility test reports. These data form the basis for subsequent personalized inference, ensuring that the recommended scheme can accurately match individual differences and pathogen characteristics.
[0020] Step S2: Based on dynamic physiological state data, pathogen sensitivity data, and a pre-defined knowledge graph for the diagnosis and treatment of bovine mastitis, candidate drug treatment plans are generated through multi-objective fusion reasoning. The knowledge graph for the diagnosis and treatment of bovine mastitis includes the relationships between drug entities, disease entities, pathogen entities, drug sensitivity result entities, efficacy indicator entities, symptom entities, and physiological characteristic entities.
[0021] Specifically, multi-objective fusion reasoning is not simply rule matching, but a decision-making process that comprehensively considers multiple dimensions such as efficacy, safety, and economy. Knowledge graphs, as structured knowledge bases, semantically link scattered veterinary domain knowledge, enabling the reasoning engine to traverse the graph and uncover potential effective treatment options, thus overcoming the limitations of traditional methods that rely solely on single indicators or empirical rules.
[0022] Step S3: Execute the candidate drug regimen, obtain multidimensional physiological recovery data of the target lactating dairy cows, and calculate the quantitative efficacy score.
[0023] Specifically, multidimensional physiological recovery data is an objective, quantitative record of treatment effectiveness, distinct from subjective clinical observation. Quantitative efficacy scoring transforms complex clinical manifestations into calculable values, providing a standardized evaluation basis for subsequent feedback and optimization, and resolving the problem of ambiguity in efficacy assessment.
[0024] Step S4: Based on the quantitative efficacy score, dynamically update the relation weights in the knowledge graph of bovine mastitis diagnosis and treatment to obtain the weight results.
[0025] Specifically, this process enables the adaptive evolution of the knowledge graph. When a treatment is proven effective in clinical practice, its association strength in the graph is enhanced; conversely, it is weakened. This dynamic adjustment mechanism transforms the knowledge graph from a static knowledge storage container into an active knowledge base that continuously accumulates experience through clinical practice.
[0026] Step S5: Based on the weight results, adjust the model parameters of the recommendation model used for multi-objective fusion inference.
[0027] Specifically, the parameter adjustment of the recommendation model and the update of the graph weights together form a complete two-layer feedback loop. The optimization of the model parameters enables the inference engine to learn the latest efficacy patterns, thereby exhibiting higher accuracy and robustness in subsequent recommendation tasks, and realizing the continuous iterative upgrade of the diagnosis and treatment decision system.
[0028] In some implementations, to further enhance the scientific rigor and practicality of candidate drug regimens, the process of generating candidate drug regimens through multi-objective fusion reasoning in step S2 can be further refined as follows: A set of candidate drug entities that meet pathogen sensitivity data constraints is retrieved from the knowledge graph for the diagnosis and treatment of bovine mastitis. These constraints include: the drug sensitivity result entity corresponding to the candidate drug entity should be sensitive or intermediate, with sensitive drugs being prioritized. For each candidate drug entity in the set, efficacy expectation indicators, drug sensitivity matching degree indicators, compatibility safety indicators, physiological compatibility indicators, and economic indicators are calculated based on the knowledge graph for the diagnosis and treatment of bovine mastitis. Based on a preset weighting strategy, the efficacy expectation indicators, drug sensitivity matching degree indicators, compatibility safety indicators, physiological compatibility indicators, and economic indicators are weighted and fused to obtain a comprehensive recommendation score. The candidate drug entity set is then ranked based on the comprehensive recommendation score to generate candidate treatment plans.
[0029] Specifically, drug sensitivity testing, acting as a hard filter, first eliminates resistant drugs, ensuring the microbiological effectiveness of medication from the source. Building on this, the calculation of the five-dimensional indicators covers key decision-making factors such as therapeutic efficacy, pharmacological safety, individual fit, and cost control. For example, the physiological fit indicator considers the cow's parity, lactation stage, and liver and kidney function, avoiding unnecessary metabolic burden on cows in specific physiological periods. The weighted fusion strategy allows ranch managers to flexibly adjust the weights of each dimension according to actual operational goals, such as increasing the weight of expected efficacy indicators during epidemic outbreaks or increasing the weight of economic indicators during cost-sensitive periods, thereby achieving personalized recommendations that balance scientific rigor and practicality.
[0030] In some implementations, to improve the accuracy of indicator calculation and enhance the interpretability of recommendation results, deep learning techniques can be used to calculate various indicators for each candidate drug entity in the candidate drug entity set based on the bovine mastitis diagnosis and treatment knowledge graph: A relational graph convolutional network is used to learn the representations of entities and relationships in the bovine mastitis diagnosis and treatment knowledge graph, obtaining low-dimensional vector representations of each entity; based on these low-dimensional vector representations, multi-dimensional association features between the physiological characteristic entities corresponding to the target lactating cow and each candidate drug entity are calculated; these multi-dimensional association features are input into a multilayer perceptron, outputting efficacy expectation indicators, drug sensitivity matching indicators, compatibility safety indicators, physiological fit indicators, and economic indicators.
[0031] Simultaneously, the method also includes the step of generating recommendation explanation information: in the knowledge graph of bovine mastitis diagnosis and treatment, multiple candidate relationship paths are searched between drug entities in candidate medication plans and physiological characteristic entities of target lactating cows; based on path length, relationship type weight, and node centrality index, the explanation confidence score of each candidate relationship path is calculated; the candidate relationship path with the highest explanation confidence score is selected as the target explanation path; the entity names and relationship names in the target explanation path are mapped to a preset natural language template to generate structured explanation text for showing users the basis for drug entity recommendations.
[0032] Specifically, relational graph convolutional networks can effectively capture high-order semantic relationships in knowledge graphs, transforming discrete symbolic knowledge into continuous vector space representations, thereby improving the accuracy of multi-indicator predictions. Meanwhile, interpretable path recommendation mechanisms address the black-box problem of artificial intelligence models by transforming abstract reasoning processes into natural language descriptions easily understood by veterinarians. For example, recommending cefquinome because it is effective against Staphylococcus aureus and suitable for early lactation cows, with a historical efficacy rate of 87% in similar cases, significantly enhances clinical users' trust in and adoption rate of intelligent recommendation results.
[0033] In some implementation methods, in order to achieve an objective quantitative evaluation of the therapeutic effect, the process of obtaining multidimensional physiological recovery data and calculating a quantitative therapeutic effect score in step S3 can be specifically implemented as follows: obtaining data on the improvement rate of milk somatic cell count, milk yield recovery rate, symptom improvement score, pathogen clearance rate, recurrence rate, and side effects of the target lactating dairy cow after a preset treatment cycle, as multidimensional physiological recovery data; and calculating a quantitative therapeutic effect score based on the improvement rate of milk somatic cell count, milk yield recovery rate, symptom improvement score, pathogen clearance rate, recurrence rate, and side effects through a multidimensional therapeutic effect scoring model.
[0034] The multi-dimensional efficacy scoring model is as follows:
[0035] in, , , , , , These are configurable weighted parameters for improving milk somatic cell count, milk production recovery rate, symptom improvement score, pathogen clearance rate, recurrence rate, and side effects; the pathogen clearance rate is determined based on the negative result of milk bacterial culture after treatment.
[0036] The method also includes: determining the efficacy level based on the correspondence between the quantitative efficacy score and the preset level threshold; wherein the efficacy level includes cure, significant effect, improvement and no effect.
[0037] Specifically, the scoring model constructs a comprehensive evaluation system covering multiple dimensions such as inflammation resolution, recovery of production performance, pathogen clearance, and safety. This reflects the degree of recovery from inflammation in breast tissue. Directly related to the economic benefits of the ranch, It is the gold standard for determining whether an infection has been cured, and This reflects a focus on animal welfare and food safety. Through configurable weight parameters, the model can adapt to the different management priorities of different ranches at different times. The classification of therapeutic efficacy levels provides a clear grading basis for subsequent atlas updates, avoiding information loss caused by relying on single numerical feedback.
[0038] In some implementations, to achieve refined self-maintenance of the knowledge graph, the process of dynamically updating relationship weights based on quantitative efficacy scores in step S4 can adopt a dual-threshold segmented adjustment strategy: Determine the relationship between the quantitative efficacy score and the preset first and second thresholds, where the first threshold is greater than the second threshold; If the quantitative efficacy score is greater than or equal to the first threshold, the drug entity, treatment relationship and disease entity corresponding to the candidate medication regimen are located in the knowledge graph of bovine mastitis diagnosis and treatment, and the relationship weight between the drug entity, treatment relationship and disease entity is increased according to the preset first adjustment step size. If the quantitative efficacy score is less than the second threshold, the relationship weight is reduced according to the preset second adjustment step size, and a check mark is added to the relationship edge between the drug entity, the treatment relationship and the disease entity. If the quantitative efficacy score is greater than or equal to the second threshold and less than the first threshold, the relationship weight remains unchanged.
[0039] Among them, the relation weight is used to adjust the probability of a drug entity being selected as a candidate drug entity in subsequent multi-objective fusion inference.
[0040] Specifically, the dual-threshold design introduces the concept of grayscale ranges, maintaining stable weights for treatments with intermediate efficacy to avoid graph oscillations caused by fluctuations from a single treatment. Adding a "review pending" marker to low-efficacy treatments is a human-machine collaborative safety mechanism that prompts veterinary experts to manually review the association, distinguishing between drug ineffectiveness and accidental factors such as individual differences or operational errors, thus preventing erroneous knowledge from contaminating the graph. The dynamic adjustment of relationship weights directly affects subsequent recommendation probabilities, giving high-efficacy treatments a natural advantage in ranking and achieving a survival-of-the-fittest knowledge evolution.
[0041] In some implementations, to ensure the model's continuous learning ability while avoiding catastrophic forgetting, the process of adjusting the recommendation model parameters in step S5 can employ incremental learning techniques: collecting accumulated multidimensional physiological recovery data and corresponding quantitative efficacy scores within a preset time window to construct an incremental training dataset; based on the incremental training dataset, using an elastic weight consolidation algorithm to update the recommendation model parameters; while updating the network weights in the recommendation model that are related to the incremental training dataset, applying regularization penalties to historical network weights unrelated to the incremental training dataset by calculating the diagonal elements of the Fisher information matrix of the network weights, in order to avoid catastrophic forgetting.
[0042] In addition, when the quantitative efficacy score is detected to be greater than or equal to the first threshold, and the combination of drug entity and disease entity corresponding to the candidate treatment regimen does not exist in the knowledge graph of bovine mastitis diagnosis and treatment, a triple containing drug entity, disease entity and treatment relationship is added to the knowledge graph of bovine mastitis diagnosis and treatment.
[0043] Specifically, the Elastic Weight Consolidation Algorithm identifies parameters important to historical tasks using the Fisher Information Matrix and protects them during the update process, ensuring that the model does not lose old, effective knowledge while learning new therapeutic patterns. The New Triplet Self-Expansion Mechanism endows the system with the ability to discover new knowledge. When effective treatment plans not yet included in the knowledge graph emerge in clinical practice, the system can automatically convert them into structured knowledge, expanding the coverage boundaries of the knowledge graph and ensuring the timeliness and completeness of the diagnostic and treatment knowledge system.
[0044] In some implementations, to support the above reasoning and evaluation process, the construction of a knowledge graph for the diagnosis and treatment of bovine mastitis needs to cover rich semantic information: entity types include drug entities, disease entities, pathogen entities, drug sensitivity result entities, efficacy indicator entities, symptom entities, and physiological characteristic entities; relationship types include treatment relationships, sensitive or resistant relationships, relationships with side effects, compatibility relationships, physiological adaptation relationships, contraindication relationships, recommendation-rating relationships, and triggering relationships.
[0045] The nodes and edges in the knowledge graph for the diagnosis and treatment of mastitis in dairy cows are constructed by extracting and integrating data from veterinary pharmacopoeia, clinical treatment guidelines, and historical treatment records.
[0046] Specifically, the combination of seven entity types and eight relation types constitutes a complete semantic network for the diagnosis and treatment of mastitis in dairy cows. For example, the drug-compatibility-drug relationship can support the safety check of combined drug use, and the physiological characteristic-contraindication-drug relationship can prevent the misuse of prohibited drugs in pregnant cows. The multi-source data fusion construction strategy ensures both the authority and standardization of knowledge, while incorporating real-world clinical experience, giving the knowledge graph both theoretical depth and practical application.
[0047] In some implementations, to ensure the quality of the input data, the data acquisition process in step S1 may include the integration and processing of multi-source heterogeneous data: real-time acquisition of current milk yield data and milk trait data of the target lactating cow from the Internet of Things sensor network; acquisition of somatic cell count data, bacterial culture data, and antibiotic sensitivity test data of the milk of the target lactating cow from laboratory testing equipment; and acquisition of basic information data and historical medical data of the target lactating cow from the ranch management system.
[0048] The current milk production data, milk trait data, milk somatic cell count data, bacterial culture data, antibiotic susceptibility test data, basic information data, and historical diagnosis and treatment data are timestamped and aligned. For data fields with missing values, a time series-based interpolation algorithm is used to impute the missing values, thereby obtaining dynamic physiological state data and pathogen susceptibility data.
[0049] Specifically, multi-source data acquisition covered three dimensions: dairy cow physiology, pathogen detection, and management records, providing a data foundation for comprehensive evaluation. Timestamp alignment resolved the issue of inconsistent sampling frequencies across different devices, ensuring the temporal synchronization of multimodal data. Time series interpolation algorithms effectively addressed data gaps caused by sensor malfunctions or missed detections, guaranteeing the integrity and temporal continuity of input data and laying a reliable data foundation for subsequent accurate inference.
[0050] In some implementations, to fully utilize historical clinical experience, the method may also include a step of optimizing recommendations based on historical treatment data: Based on pathogen susceptibility data and dynamic physiological state data, a set of similar cases is retrieved from the historical treatment database, where each historical case in the set shares a similarity with the target lactating cow in pathogen type and physiological state characteristics greater than a preset similarity threshold; historical medication regimens and corresponding historical efficacy rates are extracted from each historical case in the set of similar cases; the historical efficacy rate is used as an auxiliary scoring factor and integrated into the comprehensive recommendation score calculation of multi-objective fusion reasoning to improve the ranking priority of historical medication regimens with historical efficacy rates higher than a preset efficacy threshold in the set of similar cases among candidate medication regimens.
[0051] Specifically, the similar case retrieval mechanism introduces case-based reasoning, compensating for the limitations of knowledge graphs in expressing implicit experience. Historical effectiveness, as direct evidence from real-world data, provides strong empirical support for the recommendation results. When the theoretical derivations in the knowledge graph align with historical practical experience, the recommendation confidence is doubly validated; when discrepancies exist, the historical effectiveness rate serves as a correction factor, guiding the recommendation results to be closer to clinical practice and further enhancing the practical effectiveness of the recommendation scheme.
[0052] Through the above implementation methods, this embodiment establishes a complete closed-loop data system of recommendation, treatment, evaluation, and update. This closed-loop mechanism not only enables personalized generation of medication regimens and objective quantitative evaluation of efficacy, but more importantly, it drives the co-evolution of the knowledge graph and recommendation model through a two-layer feedback mechanism. This continuous learning capability allows the system to adapt to the evolution of pathogen resistance and individual physiological differences, significantly improving the precision of medication and treatment effectiveness for bovine mastitis, while also providing interpretable and reliable intelligent support for veterinary clinical decision-making.
[0053] Example 2, to further illustrate the effectiveness of the above efficacy scoring model, provides an exemplary description with specific numerical values. Based on Example 1, this example verifies the quantitative assessment capability and parameter sensitivity of the multi-dimensional efficacy scoring model in actual clinical scenarios by constructing specific clinical case data.
[0054] In practical implementation, the weighting parameter configuration of the multi-dimensional efficacy scoring model directly determines the orientation of the evaluation results. For the treatment characteristics of bovine mastitis, the following parameter configuration is recommended: α=0.20, β=0.15, γ=0.15, δ=0.20, ε=0.15, ζ=0.15. Here, α and δ are both set to a relatively high weight of 0.20, reflecting the core principle of balancing inflammation reduction and complete pathogen eradication in the treatment of bovine mastitis. This focuses on both the relief of clinical symptoms and, more importantly, on microbiological cure to prevent latent infections from becoming chronic. β and ε respectively characterize milk production recovery and relapse prevention, reflecting the balance between farm economic benefits and long-term health management. γ is used to quantify the degree of improvement in subjective symptoms. ζ, as a side effect penalty factor, ensures that medication safety has a place in the comprehensive evaluation, avoiding the neglect of animal welfare or dairy product safety due to an excessive pursuit of efficacy. It should be understood that the above weights are only a preferred configuration. In practical applications, farms can adaptively adjust each parameter according to their own business objectives or specific epidemic stages.
[0055] To visually demonstrate the model's computational process, a clinical case of a lactating Holstein cow, numbered C-2024-0156, was constructed. This cow was diagnosed with clinical mastitis caused by Staphylococcus aureus infection. After implementing the candidate treatment regimen and completing the preset treatment cycle, the following multidimensional physiological recovery data were collected: the milk somatic cell count improvement rate was 85%, indicating significant control of mammary inflammation; the milk yield recovery rate was 78%, showing that production performance was recovering but not fully restored; the symptom improvement score was 4 out of 5, corresponding to the near disappearance of clinical signs such as mammary redness, swelling, heat, and pain; the pathogen clearance rate was 100%, meaning that the post-treatment milk bacterial culture results were negative; the 30-day recurrence rate was 10%; and the side effect weight was 0.2, indicating that mild gastrointestinal reactions occurred during treatment but did not affect overall health. Substituting the above data into the multidimensional efficacy scoring model, the calculated quantitative efficacy score Q was 82.3. According to the preset grading rules, the score falls into the effective range, indicating that the treatment plan is effective but there is still room for optimization. This suggests that veterinarians need to pay attention to the further recovery of milk production and the control of relapse risk in subsequent management.
[0056] During the candidate drug selection phase, a multi-objective fusion reasoning mechanism comprehensively and quantitatively ranks different drugs. Taking this case as an example, the system screened out three candidate drugs: cefquinoxime, amoxicillin-clavulanic acid, and gentamicin. Cefquinoxime performed best across five evaluation dimensions: its expected efficacy score was 0.92, drug sensitivity matching was 1.0 (sensitive), compatibility safety was 0.95, physiological compatibility was 0.90, and economic efficiency was 0.75. Its weighted overall recommendation score was the highest, making it the preferred option. While amoxicillin-clavulanic acid scored highly in economic efficiency (0.90), its slightly lower drug sensitivity matching (intermediate) placed it second in overall score. Gentamicin, despite its low drug sensitivity matching (1.0) and low price, ranked third due to its low physiological compatibility score at the cow's current lactation stage (potential nephrotoxicity risk). This quantitative ranking based on multi-dimensional data effectively avoids decision-making biases that might arise from relying solely on drug sensitivity results or empirical medication.
[0057] To demonstrate the indispensability of the six-dimensional weighting parameters, this embodiment further conducted a comparative analysis of parameter sensitivity. Using the same set of data from the aforementioned case C-2024-0156, the score changes when key dimensions were missing were tested.
[0058] In the first scenario, if the side effect weighting parameter ζ is set to 0, meaning the impact of drug side effects is disregarded, the quantitative efficacy score Q rises to 85.3 points, and the efficacy level is mistakenly judged as a cure. This result masks the fact that the drug caused gastrointestinal reactions, which may lead veterinarians to overlook potential medication safety hazards, accumulating drug resistance or harming the health of dairy cows during long-term treatment.
[0059] In the second scenario, if the pathogen clearance rate weighting parameter δ is set to 0, i.e., bacterial culture results are ignored and evaluation is based solely on symptom improvement and recovery of milk production, the quantitative efficacy score Q drops sharply to 62.3 points, and the efficacy level is downgraded to "improved." This result fails to objectively reflect the crucial fact that the pathogen has been completely eliminated, which may lead veterinarians to mistakenly believe that the treatment has failed and frequently change medications, increasing costs and exacerbating the risk of antibiotic overuse. The above comparative examples fully demonstrate that only the synergistic effect of all six dimensions can truly and comprehensively reflect the treatment effect; the absence of any single dimension will lead to distorted evaluation results, thereby misleading clinical decisions.
[0060] Regarding the thresholds for classifying efficacy levels, it is recommended to set the first threshold at 85 points and the second threshold at 60 points. When the quantitative efficacy score is greater than or equal to 85 points, it is judged as cured, meaning that all indicators have reached an ideal state, and the corresponding treatment relationship weight in the knowledge graph will be positively enhanced. When the score is greater than or equal to 60 points but less than 85 points, it is judged as significantly effective or improved, belonging to the gray area of effectiveness but requiring attention, and the graph weight remains stable to accumulate more samples. When the score is less than 60 points, it is judged as ineffective, and the system will automatically reduce the weight of the relevant relationship and add a mark for review. This tiered threshold design ensures the rapid accumulation of high-efficacy treatments, provides an observation window for medium-efficacy treatments, and establishes an early warning mechanism for low-efficacy treatments, ensuring the robustness and accuracy of the dynamic updates of the knowledge graph.
[0061] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A knowledge graph-based method for recommending medications and evaluating the efficacy of treatments for mastitis in dairy cows, applicable to target lactating dairy cows, characterized in that... include: Acquire dynamic physiological state data and pathogen susceptibility data of the target lactating dairy cows; Based on the dynamic physiological state data, the pathogen sensitivity data, and the preset knowledge graph for the diagnosis and treatment of bovine mastitis, candidate drug treatment plans are generated through multi-objective fusion reasoning. The knowledge graph for the diagnosis and treatment of bovine mastitis includes the relationships between drug entities, disease entities, pathogen entities, drug sensitivity result entities, efficacy indicator entities, symptom entities, and physiological characteristic entities. The candidate drug regimen is executed to obtain multidimensional physiological recovery data of the target lactating dairy cows and to calculate a quantitative efficacy score. Based on the quantitative efficacy score, the relation weights in the knowledge graph of bovine mastitis diagnosis and treatment are dynamically updated to obtain the weight results. Based on the weighting results, the model parameters of the recommendation model used in the multi-objective fusion inference are adjusted.
2. The knowledge graph-based method for recommending and evaluating the efficacy of medications for mastitis in dairy cows according to claim 1, characterized in that: The process of generating candidate treatment plans through multi-objective fusion reasoning based on the dynamic physiological state data, the pathogen sensitivity data, and a pre-set knowledge graph for the diagnosis and treatment of bovine mastitis includes: Retrieve a set of candidate drug entities that meet the pathogen sensitivity data constraints in the knowledge graph for the diagnosis and treatment of bovine mastitis. The pathogen sensitivity data constraints include: the drug sensitivity result entity corresponding to the candidate drug entity should be sensitive or intermediate, and sensitive drugs should be selected first. For each candidate drug entity in the candidate drug entity set, the expected efficacy index, drug sensitivity matching index, compatibility safety index, physiological compatibility index, and economic index are calculated based on the knowledge graph of bovine mastitis diagnosis and treatment. Based on a preset weighting strategy, the efficacy expectation index, the drug sensitivity matching index, the compatibility safety index, the physiological compatibility index, and the economic index are weighted and fused to obtain a comprehensive recommendation score. The candidate drug entity set is sorted based on the comprehensive recommendation score to generate the candidate drug treatment plan.
3. The knowledge graph-based method for recommending and evaluating the efficacy of medications for mastitis in dairy cows according to claim 2, characterized in that: For each candidate drug entity in the candidate drug entity set, based on the bovine mastitis diagnosis and treatment knowledge graph, the following indicators are calculated: expected efficacy index, drug sensitivity matching index, compatibility safety index, physiological compatibility index, and economic index, including: The entity and relation representation in the knowledge graph of bovine mastitis diagnosis and treatment are learned by using a relational graph convolutional network to obtain a low-dimensional vector representation of each entity; Based on the low-dimensional vector representation, the multidimensional association features between the physiological feature entities corresponding to the target lactating dairy cow and each candidate drug entity are calculated. The multidimensional correlation features are input into a multilayer perceptron, which outputs the efficacy expectation index, the drug sensitivity matching index, the compatibility safety index, the physiological compatibility index, and the economic index. It also includes the step of generating recommendation explanation information: In the knowledge graph for the diagnosis and treatment of bovine mastitis, multiple candidate relationship paths are searched between drug entities in the candidate treatment plans and physiological characteristic entities of the target lactating cow; Based on path length, relation type weight, and node centrality index, calculate the explanatory confidence score for each of the candidate relation paths. The candidate relation path with the highest explanation confidence score is selected as the target explanation path; The entity names and relation names in the target interpretation path are mapped to preset natural language templates to generate structured explanatory text for showing users the basis for recommending the drug entities.
4. The knowledge graph-based method for recommending and evaluating the efficacy of medications for mastitis in dairy cows according to claim 1, characterized in that: The process of acquiring multidimensional physiological recovery data of the target lactating dairy cows and calculating a quantitative efficacy score based on the multidimensional physiological recovery data includes: The improvement rate of milk somatic cell count, milk yield recovery rate, symptom improvement score, pathogen clearance rate, recurrence rate, and side effects of the target lactating dairy cows after a preset treatment cycle are obtained as the multidimensional physiological recovery data. Based on the improvement rate of somatic cell count in breast milk, the recovery rate of milk production, the symptom improvement score, the pathogen clearance rate, the recurrence rate, and the occurrence of side effects, the quantitative efficacy score is calculated using a multi-dimensional efficacy scoring model. Specifically, the multi-dimensional efficacy scoring model is as follows: Q = α × milk somatic cell count improvement rate + β × milk yield recovery rate + γ × symptom improvement score + δ × pathogen clearance rate + ε × (1 - recurrence rate) - ζ × side effect weight; Wherein, α, β, γ, δ, ε, and ζ are configurable weight parameters for the improvement rate of somatic cell count in milk, the recovery rate of milk production, the symptom improvement score, the pathogen clearance rate, the recurrence rate, and side effects, respectively. The pathogen clearance rate was determined based on negative bacterial culture results from breast milk after treatment. It also includes: determining the efficacy level based on the correspondence between the quantitative efficacy score and the preset level threshold; The efficacy levels include cured, significantly effective, improved, and ineffective.
5. The knowledge graph-based method for recommending and evaluating the efficacy of medications for mastitis in dairy cows according to claim 4, characterized in that: The dynamic updating of relationship weights in the bovine mastitis diagnosis and treatment knowledge graph based on the quantitative efficacy score includes: Determine the relationship between the quantitative efficacy score and a preset first threshold and a second threshold, wherein the first threshold is greater than the second threshold; If the quantitative efficacy score is greater than or equal to the first threshold, then the drug entity, treatment relationship and disease entity corresponding to the candidate medication regimen are located in the knowledge graph of bovine mastitis diagnosis and treatment, and the relationship weight between the drug entity, the treatment relationship and the disease entity is increased according to the preset first adjustment step size. If the quantitative efficacy score is less than the second threshold, the relationship weight is reduced by a preset second adjustment step, and a check mark is added to the relationship edge between the drug entity, the treatment relationship and the disease entity. If the quantitative efficacy score is greater than or equal to the second threshold and less than the first threshold, then the relationship weight remains unchanged; The relation weights are used to adjust the probability of the drug entity being selected as a candidate drug entity in subsequent multi-objective fusion inference.
6. The knowledge graph-based method for recommending and evaluating the efficacy of medications for mastitis in dairy cows according to claim 5, characterized in that: The step of dynamically updating the recommendation model parameters used for multi-objective fusion inference based on the quantitative efficacy score includes: Collect the accumulated multidimensional physiological recovery data and the corresponding quantitative efficacy scores within a preset time window to construct an incremental training dataset; Based on the incremental training dataset, the elastic weight consolidation algorithm is used to update the parameters of the recommendation model. While updating the network weights in the recommendation model that are related to the incremental training dataset, regularization penalties are applied to historical network weights that are unrelated to the incremental training dataset by calculating the diagonal elements of the Fisher information matrix of the network weights, so as to avoid catastrophic forgetting.
7. The knowledge graph-based method for recommending and evaluating the efficacy of medications for mastitis in dairy cows according to claim 6, characterized in that: The method further includes: when the quantitative efficacy score is detected to be greater than or equal to the first threshold, and the combination of drug entity and disease entity corresponding to the candidate medication regimen does not exist in the bovine mastitis diagnosis and treatment knowledge graph, adding a triplet containing the drug entity, the disease entity and the treatment relationship to the bovine mastitis diagnosis and treatment knowledge graph.
8. The knowledge graph-based method for recommending and evaluating the efficacy of medications for mastitis in dairy cows according to claim 1, characterized in that: The entity types of the knowledge graph for the diagnosis and treatment of mastitis in dairy cows include drug entities, disease entities, pathogen entities, drug sensitivity result entities, efficacy indicator entities, symptom entities, and physiological characteristic entities. The relationship types in the knowledge graph for the diagnosis and treatment of mastitis in dairy cows include treatment relationships, sensitive or resistant relationships, relationships with side effects, compatibility relationships, physiological compatibility relationships, contraindication relationships, recommendation-rating relationships, and triggering relationships; The nodes and edges in the knowledge graph for the diagnosis and treatment of bovine mastitis are constructed by extracting and integrating data from veterinary pharmacopoeia, clinical treatment guidelines, and historical treatment records.
9. The knowledge graph-based method for recommending and evaluating the efficacy of medications for mastitis in dairy cows according to claim 1, characterized in that: The acquisition of dynamic physiological state data and pathogen susceptibility data of the target lactating dairy cow includes: The current milk yield and milk characteristics data of the target lactating dairy cows are collected in real time from an Internet of Things sensor network. Data on somatic cell counts, bacterial culture, and antibiotic susceptibility testing of milk from the target lactating dairy cows were obtained from laboratory testing equipment. Obtain basic information and historical medical data of the target lactating dairy cows from the ranch management system; The current milk production data, the milk characteristics data, the milk somatic cell count data, the bacterial culture data, the antibiotic sensitivity test data, the basic information data, and the historical medical data are time-stamp aligned. For data fields with missing values, a time-series-based interpolation algorithm is used to impute the missing values, thereby obtaining the dynamic physiological state data and the pathogen sensitivity data.
10. The method for recommending and evaluating the efficacy of medications for bovine mastitis based on knowledge graphs according to claim 1, characterized in that: The method also includes a step of optimizing recommendations based on historical medical data: Based on the pathogen sensitivity data and the dynamic physiological state data, a set of similar cases is retrieved from the historical diagnosis and treatment database. The similarity between each historical case in the set of similar cases and the target lactating dairy cow in terms of pathogen type and physiological state characteristics is greater than a preset similarity threshold. Extract the historical medication regimens and corresponding historical efficacy rates for each historical case in the set of similar cases; The historical efficacy rate is used as an auxiliary scoring factor and incorporated into the comprehensive recommendation score calculation of the multi-objective fusion reasoning, so as to improve the ranking priority of historical medication regimens with historical efficacy rates higher than the preset efficacy rate threshold in the similar case set among the candidate medication regimens.