Intelligent generation method, device and equipment for traditional Chinese medicine diagnosis and treatment medical cases and medium

By combining a knowledge partitioning model and a large language model, the problems of data heterogeneity and insufficient knowledge updates in the generation of TCM medical records were solved, realizing the automated and accurate generation of TCM diagnosis and treatment medical records, and improving the quality and practicality of the medical records.

CN120878089APending Publication Date: 2025-10-31北京中科闻歌科技股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510910925.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

Existing large language models suffer from data heterogeneity, insufficient dynamic knowledge updates, and limited generalization ability in the generation of TCM medical records. They cannot efficiently handle the complex relationships between multimodal and heterogeneous data, resulting in the need for manual intervention in the generated medical records.

Method used

This study employs a combination of knowledge partitioning and large language models. Gaussian mixture models are used to jointly model the distribution of TCM diagnosis and treatment case data and knowledge text data, adaptively partitioning and generating TCM diagnosis and treatment case data. The pre-trained knowledge partitioning and large language models are then used for TCM diagnosis and treatment analysis.

Benefits of technology

It has achieved automated and precise generation of TCM diagnosis and treatment records, improved the quality and practicality of the records, reduced manual intervention, and generated records that conform to TCM diagnosis and treatment logic and are expressed in a natural and accurate manner.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120878089A_ABST
    Figure CN120878089A_ABST
Patent Text Reader

Abstract

The invention relates to a traditional Chinese medicine diagnosis and treatment medical case intelligent generation method and device, equipment and a medium. The intelligent generation method for the traditional Chinese medicine diagnosis and treatment medical cases comprises the steps of receiving symptom query information input by a user; determining a target theme to which the symptom query information belongs, and querying a target knowledge block associated with the target theme; and performing traditional Chinese medicine diagnosis and treatment analysis processing based on the symptom query information and the target knowledge block, and generating a corresponding traditional Chinese medicine diagnosis and treatment medical case. According to the embodiment of the invention, the internal association referenced by the knowledge blocks can be generated according to the user query, the related knowledge blocks can be accurately positioned, the subjectivity and low efficiency of manual partitioning in a traditional knowledge base management method are avoided, then the targeted traditional Chinese medicine diagnosis and treatment medical cases are generated according to the related knowledge blocks, and the user experience is improved. And the quality and practicability of medical cases are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of traditional Chinese medicine technology application, and in particular to a method, device, equipment and medium for intelligent generation of TCM diagnosis and treatment medical records. Background Technology

[0002] With the rapid development of artificial intelligence technology, the application of Large Language Models (LLMs) in the medical field is gradually deepening, especially in the field of traditional Chinese medicine, where they have shown great potential. However, existing large language models still face the following problems in generating medical records for traditional Chinese medicine: data heterogeneity, insufficient dynamic updating of knowledge, and limited generalization ability.

[0003] To address these issues, some studies have attempted to introduce a knowledge self-organizing partitioning mechanism to enhance the model's ability to process structured TCM knowledge. However, these technologies cannot efficiently handle the complex relationships between multimodal and heterogeneous data in TCM diagnosis and treatment. Furthermore, existing models still require manual intervention in aspects such as diagnostic logic and prescription recommendations in generating medical records. Summary of the Invention

[0004] To address the aforementioned technical issues, this disclosure provides a method, apparatus, equipment, and medium for intelligent generation of TCM diagnosis and treatment medical records.

[0005] Firstly, this disclosure provides a method for intelligent generation of TCM diagnosis and treatment medical records, including:

[0006] Receive symptom query information input by the user;

[0007] Determine the target topic to which the symptom query information belongs, and query the target knowledge blocks associated with the target topic;

[0008] Based on the symptom query information and the target knowledge block, traditional Chinese medicine diagnosis and treatment analysis is performed to generate corresponding traditional Chinese medicine diagnosis and treatment records.

[0009] In some embodiments, determining the target topic to which the symptom query information belongs and querying the target knowledge block associated with the target topic includes:

[0010] The target topic to which the symptom query information belongs is determined based on the topic layer in a pre-trained knowledge partitioning model;

[0011] The target knowledge block associated with the target topic is queried in the association layer of the pre-trained knowledge partitioning model.

[0012] In some embodiments, before determining the target topic corresponding to the symptom query information in the topic layer based on the pre-trained knowledge partitioning model, the method further includes:

[0013] Obtain the joint distribution of preprocessed TCM diagnosis and treatment case data and knowledge text data;

[0014] The joint distribution is modeled based on a Gaussian mixture model to obtain the pre-trained knowledge partitioning model.

[0015] In some embodiments, after constructing the joint distribution based on a Gaussian mixture model to obtain the pre-trained knowledge partitioning model, the method further includes:

[0016] The pre-trained knowledge partitioning model is initialized with parameters using a random initialization method to obtain initial model parameters;

[0017] The initial model parameters are iteratively optimized to obtain the optimized model parameters.

[0018] In some embodiments, the step of performing TCM diagnosis and treatment analysis based on the symptom query information and the target knowledge block to generate corresponding TCM diagnosis and treatment medical records includes:

[0019] Based on a pre-trained large language model, the symptom query information and the target knowledge block are analyzed and processed using traditional Chinese medicine (TCM) diagnostic methods to generate corresponding TCM medical records.

[0020] In some embodiments, before performing TCM diagnosis and treatment analysis on the symptom query information and the target knowledge block based on a pre-trained large language model, the method further includes:

[0021] The initial large language model is trained based on preprocessed TCM diagnosis and treatment case data and knowledge text data to obtain the pre-trained large language model.

[0022] The parameters of the pre-trained large language model are optimized based on a preset loss function and a preset optimization algorithm.

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

[0024] The TCM diagnosis and treatment cases are evaluated based on preset evaluation indicators and preset test datasets to obtain corresponding evaluation results.

[0025] Secondly, this disclosure provides an intelligent device for generating TCM diagnosis and treatment medical records, including:

[0026] The information receiving module is used to receive symptom query information input by the user;

[0027] The data determination module is used to determine the target topic to which the symptom query information belongs, and to query the target knowledge blocks associated with the target topic;

[0028] The medical record generation module is used to perform TCM diagnosis and treatment analysis and processing based on the symptom query information and the target knowledge block to generate corresponding TCM diagnosis and treatment medical records.

[0029] Thirdly, this disclosure provides a device for intelligently generating TCM diagnosis and treatment medical records, including:

[0030] processor;

[0031] Memory, used to store executable instructions;

[0032] The processor is used to read executable instructions from memory and execute the executable instructions to implement the first aspect of the intelligent generation method for TCM diagnosis and treatment medical records.

[0033] Fourthly, this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, enables the processor to implement the intelligent generation method for TCM diagnosis and treatment medical records as described in the first aspect.

[0034] The technical solution provided in this disclosure has the following advantages compared with the prior art:

[0035] The method, apparatus, device, and medium for intelligent generation of TCM diagnosis and treatment medical records disclosed in this embodiment can receive symptom query information input by a user, then determine the target topic to which the symptom query information belongs, and query the target knowledge blocks associated with the target topic. Then, based on the symptom query information and the target knowledge blocks, TCM diagnosis and treatment analysis is performed to generate corresponding TCM diagnosis and treatment medical records. Thus, by generating the inherent relationship between the user query and the referenced knowledge blocks, the relevant knowledge blocks are accurately located, avoiding the subjectivity and inefficiency of manual partitioning in traditional knowledge base management methods. Then, targeted TCM diagnosis and treatment medical records are generated based on the relevant knowledge blocks, improving the quality and practicality of the medical records. Attached Figure Description

[0036] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0037] Figure 1 A flowchart illustrating a method for intelligent generation of TCM diagnosis and treatment medical records provided in this embodiment of the disclosure;

[0038] Figure 2 A flowchart illustrating another method for intelligent generation of TCM diagnosis and treatment medical records provided in this embodiment of the disclosure;

[0039] Figure 3This is a schematic diagram of the structure of a smart device for generating TCM diagnosis and treatment medical records provided in an embodiment of this disclosure;

[0040] Figure 4 This is a schematic diagram of the structure of a smart device for generating TCM diagnosis and treatment medical records, provided in an embodiment of this disclosure. Detailed Implementation

[0041] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0042] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0043] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0044] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0045] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0046] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0047] To address the aforementioned problems, this disclosure provides a method, apparatus, device, and medium for intelligent generation of TCM diagnosis and treatment medical records. The following is a detailed description... Figure 1-2 The method for intelligent generation of TCM diagnosis and treatment medical records provided in this disclosure will be described in detail.

[0048] Figure 1 The illustration shows a flowchart of a method for intelligent generation of TCM diagnosis and treatment medical records provided in an embodiment of this disclosure.

[0049] In this embodiment of the disclosure, the method for intelligently generating TCM diagnosis and treatment records can be executed by an electronic device. The electronic device may include, but is not limited to, devices such as computer equipment, cloud servers, or cloud server clusters.

[0050] like Figure 1 As shown, the intelligent generation method for TCM diagnosis and treatment medical records may include the following steps.

[0051] S110: Receive symptom query information input by the user.

[0052] In this embodiment of the disclosure, the electronic device can receive symptom query information input by the user.

[0053] Optionally, symptom query information can be used to describe the physical ailments and symptoms that the user needs to diagnose. For example, symptom query information could include symptoms such as headache, abdominal pain, nasal congestion, nausea, and vomiting, etc., without limitation in this context.

[0054] Specifically, users can input symptom query information about physical symptoms into electronic devices, which can then receive this symptom query information.

[0055] S120. Determine the target topic to which the symptom query information belongs, and query the target knowledge block associated with the target topic.

[0056] Optionally, the target topic can be generated by mixing multiple potential topics corresponding to the symptom query information. These topics can include basic theories of Traditional Chinese Medicine (TCM), TCM diagnostics, TCM materia medica, and formulary, etc., without limitation. For example, the target topic could be "differentiation and formulas for the common cold" or "conditioning of Yin deficiency constitution," etc., without limitation. The topics follow a multinomial distribution.

[0057] Optionally, the target knowledge block can be a variety of professional TCM knowledge graphs corresponding to the target topic. For example, the knowledge block can be dynamically partitioned according to functional domains (such as "syndrome differentiation and treatment" and "formula compatibility"). The knowledge block generation process follows a Gaussian distribution.

[0058] In this embodiment of the disclosure, the electronic device can analyze the symptom query information, determine the target topic to which the symptom query information belongs, such as "the differentiation and prescription of cold", and query the target knowledge blocks associated with the target topic, such as "differentiation and treatment" and "prescription compatibility".

[0059] S130. Based on the symptom query information and the target knowledge block, perform TCM diagnosis and treatment analysis and processing to generate corresponding TCM diagnosis and treatment medical records.

[0060] In this embodiment of the disclosure, the electronic device can perform TCM diagnosis and treatment analysis based on the symptom query information and the target knowledge block to generate corresponding TCM diagnosis and treatment medical records.

[0061] Specifically, after determining the target knowledge block, the electronic device can perform TCM diagnosis and treatment analysis based on the symptom query information and the target knowledge block, and generate TCM diagnosis and treatment medical records that conform to the logic of TCM diagnosis and treatment by combining the learned TCM knowledge and language patterns.

[0062] Therefore, the system can receive symptom query information input by the user, determine the target topic to which the symptom query information belongs, query the target knowledge blocks associated with the target topic, and then perform TCM diagnosis and treatment analysis based on the symptom query information and the target knowledge blocks to generate corresponding TCM treatment records. Thus, by generating the inherent relationship between the user query and the references in the knowledge blocks, the system accurately locates the relevant knowledge blocks, avoiding the subjectivity and inefficiency of manual partitioning in traditional knowledge base management methods. Furthermore, by generating targeted TCM treatment records based on the relevant knowledge blocks, the system improves the quality and practicality of the treatment records.

[0063] Optionally, S120 may specifically include: determining the target topic to which the symptom query information belongs based on the topic layer in the pre-trained knowledge partitioning model; and querying the target knowledge block associated with the target topic based on the association layer in the pre-trained knowledge partitioning model.

[0064] In this embodiment of the disclosure, the electronic device can determine the target topic to which the symptom query information belongs based on the topic layer in a pre-trained knowledge partitioning model.

[0065] Specifically, electronic devices can input symptom query information into a pre-trained knowledge partitioning model, where the topic layer can determine the target topic corresponding to the symptom query information.

[0066] Furthermore, the electronic device can query the target knowledge block associated with the target topic based on the association layer in the pre-trained knowledge partitioning model.

[0067] Specifically, after determining the target topic, the electronic device can input the target topic into a pre-trained knowledge partitioning model, and the association layer in the knowledge partitioning model can query the target knowledge block corresponding to the target topic.

[0068] Optionally, before determining the target topic corresponding to the symptom query information in the topic layer based on the pre-trained knowledge partitioning model, the method further includes: obtaining the joint distribution of preprocessed TCM diagnosis and treatment case data and knowledge text data; and constructing a model of the joint distribution based on a Gaussian mixture model to obtain the pre-trained knowledge partitioning model.

[0069] In this embodiment of the disclosure, the electronic device can acquire the combined distribution of preprocessed TCM diagnosis and treatment case data and knowledge text data.

[0070] Specifically, electronic devices can collect a large amount of TCM (Traditional Chinese Medicine) medical record data, covering various diseases, symptom descriptions, diagnostic results, treatment plans, and other information. Simultaneously, they can collect relevant TCM knowledge text data, such as classic medical books and academic literature, to construct a TCM knowledge base. Next, the collected data is cleaned to remove duplicate, erroneous, or incomplete records. Preprocessing operations such as word segmentation, stop word removal, and stemming are performed on the text data to transform it into a format suitable for model processing. Based on the logic and knowledge system of TCM diagnosis and treatment, the medical record data is labeled to clarify the relationships between key information such as symptoms, diagnoses, and treatments, providing supervisory signals for subsequent model training.

[0071] Next, the adaptive partitioning problem of the TCM knowledge base is modeled as a two-layer probabilistic generation process. At the topic layer, it is assumed that user query needs for TCM knowledge are generated by a mixture of K latent topics, with each topic following a multinomial distribution. At the association layer, given a topic, the generation process of specific queries and their associated knowledge chunks follows a Gaussian distribution. Here, the latent variables are the latent topics, and the observed variables are query-knowledge chunk combinations (Query-Chunks), resulting in a joint distribution. The joint distribution is a function describing the common probability distribution of two or more random variables in the same sample space, used to analyze the association between random variables, covering both discrete and continuous forms, and used to represent the dependency relationship between topics and knowledge chunks.

[0072] The user query needs consist of K potential topics z. k ∈Z is generated by a mixture, and the topics follow a multinomial distribution:

[0073]

[0074] Query - Block Association Layer: Given topic z k For specific inquiries, please check q. i The generation process of ∈Q and its associated knowledge block cj∈C follows a Gaussian distribution:

[0075] p(q i |z k )~N(μ k,σ k ).

[0076] The latent variable is Z = {z} k The observed variable is the query-chunks combination Q = {q}. i}

[0077] Furthermore, the electronic device can construct a model of the joint distribution based on a Gaussian mixture model to obtain the pre-trained knowledge partitioning model.

[0078] In this embodiment, the electronic device can use a Gaussian Mixture Model (GMM) to model the joint distribution. For example, it can first perform topic sampling, extracting topics from a multinomial distribution; then, under the selected topics, sample user queries; finally, generate observation data, and repeat the above process to generate N independent samples, constituting an observation dataset. The observation variable can be represented as a combination of query and related knowledge blocks.

[0079] Specifically, a Gaussian Mixture Model (GMM) is used to model the joint distribution, and the complete generation process is as follows:

[0080] Topic Sampling: Extracting topics z from a multinomial distribution k ~Multinomial(π).

[0081] Query generation: Sample user queries under the selected topic: p(q) i |z k )~N(μ k ,σ k ).

[0082] Observation data generation: Repeat the above process to generate N independent samples, forming the observation dataset.

[0083] Where q i This represents the generated user query; because the user query and the knowledge text block are strongly correlated, the observed variable can be represented as: x i ={q i ,c i1 ,......,c ih};c ih This represents the h-th text chunk associated with the i-th query.

[0084] Then, the electronic device performs model parameterization representation on the knowledge partitioning model, defining the parameter set Θ = {π, μ}. k ,Σ k}, including the topic mixing coefficient π, and the mean vector μ of the Gaussian distribution of topic-related queries.k The relevant query is the Gaussian distribution covariance matrix Σ. k These parameters will be used to describe the query generation patterns under different topics and the relationship between queries and knowledge blocks.

[0085] Optionally, after constructing the joint distribution model based on the Gaussian mixture model to obtain the pre-trained knowledge partitioning model, the method further includes: initializing the parameters of the pre-trained knowledge partitioning model using a random initialization method to obtain initial model parameters; and iteratively optimizing the initial model parameters to obtain optimized model parameters.

[0086] In this embodiment of the disclosure, the electronic device can use a random initialization method to initialize the parameters of the pre-trained knowledge partitioning model to obtain initial model parameters. Then, the initial model parameters are iteratively optimized to obtain optimized model parameters.

[0087] Specifically, the electronic device uses the Expectation Maximization (EM) algorithm for parameter estimation and employs a random initialization method to initialize the model parameters to obtain the initial model parameters.

[0088] E-step (expectation step): Calculate the posterior probability (i.e., soft partition weight) of each data point belonging to each Gaussian distribution, which is also the responsibility. The formula is: where is the i-th data point, and represents the probability that data point i belongs to the k-th Gaussian distribution. By calculating the responsibility of each data point to each topic, the degree of association between the data point and different topics can be determined.

[0089] Specifically, the posterior probability (i.e., soft partition weight) of each data point belonging to each Gaussian distribution is calculated, representing the probability that the i-th data point is generated by the k-th Gaussian distribution. The formula is:

[0090]

[0091] Where, q i It is the i-th data point. This represents the probability that data point i belongs to the k-th Gaussian distribution.

[0092] M-step (maximization step): Based on the responsibility calculated in the E-step, update the parameter set Θ. Update the mixture weights, where N represents the total responsibility of all data points to the k-th Gaussian distribution, and N is the total number of data points; update the mean vector; update the covariance matrix. By iterating through the E-step and M-step, the model parameters are gradually optimized, enabling the model to better fit the observed data.

[0093] Specifically, update the parameter set Θ:

[0094] Update the mixed weights:

[0095] in This represents the total responsibility of all data points for the k-th Gaussian distribution, where N is the total number of data points.

[0096] Update the mean vector:

[0097] Update the covariance matrix:

[0098] Therefore, by formalizing the adaptive partitioning problem of the knowledge base into a two-layer probabilistic generative model and using a Gaussian mixture model (GMM) to model the joint distribution, the embodiments of this disclosure can automatically divide the TCM knowledge base into multiple knowledge blocks with clear themes and relevance based on the inherent association between user queries and knowledge block references. This self-organizing partitioning mechanism avoids the subjectivity and inefficiency of manual partitioning in traditional knowledge base management methods, realizes automated and precise organization of knowledge, and greatly improves the efficiency of knowledge management.

[0099] When generating TCM treatment records, the system can quickly determine the topic of the query based on the user's input query information using a Geometric Matrix (GMM) model, thereby accurately locating the relevant knowledge blocks. This precise knowledge location capability allows the system to more effectively utilize information in the knowledge base, providing accurate and relevant knowledge support for subsequent record generation, thus improving the accuracy and reliability of record generation.

[0100] Optionally, S130 may specifically include: performing TCM diagnosis and treatment analysis on the symptom query information and the target knowledge block based on a pre-trained large language model to generate corresponding TCM diagnosis and treatment medical records.

[0101] In this embodiment of the disclosure, the electronic device can perform TCM diagnosis and treatment analysis on the symptom query information and the target knowledge block based on a pre-trained large language model. That is, the symptom query information and the target knowledge block are input into the pre-trained large language model, and the large language model combines the TCM knowledge and language patterns it has learned to generate corresponding TCM diagnosis and treatment records.

[0102] Optionally, the method further includes: training an initial large language model based on preprocessed TCM diagnosis and treatment case data and knowledge text data to obtain the pre-trained large language model; and optimizing the parameters of the pre-trained large language model based on a preset loss function and a preset optimization algorithm.

[0103] In this embodiment, the electronic device can train an initial large language model based on preprocessed TCM diagnosis and treatment case data and knowledge text data. For example, a suitable large language model, such as the GPT series or BERT series, can be selected as the basic model for intelligent generation of TCM diagnosis and treatment case data. The large language model is then fine-tuned using the preprocessed TCM diagnosis and treatment case data and knowledge text data to obtain a pre-trained large language model. This pre-trained large language model is better adapted to the language expression and knowledge characteristics of the TCM field. Next, the parameters of the pre-trained large language model are optimized based on a preset loss function and a preset optimization algorithm to adjust the model's parameters and improve its performance on TCM diagnosis and treatment tasks.

[0104] Optionally, the method further includes: evaluating the TCM diagnosis and treatment records based on preset evaluation indicators and preset test datasets to obtain corresponding evaluation results.

[0105] In this embodiment, the electronic device can construct a dedicated test dataset containing TCM diagnosis and treatment queries of different types and difficulties, along with corresponding medical case samples. The test dataset should cover common TCM symptoms and treatment scenarios to ensure the comprehensiveness and reliability of the evaluation results. Appropriate evaluation metrics are selected to assess the generated TCM diagnosis and treatment medical cases, such as precision, recall, F1 score, and BLEU score. Precision is used to evaluate the consistency between the generated medical cases and standard medical cases; recall is used to evaluate the range of medical case information that the model can cover; the F1 score is the harmonic mean of precision and recall, comprehensively reflecting the model's performance; the BLEU score is used to evaluate the similarity between the generated text and the reference text, suitable for evaluating the language quality of the medical case text. The system is comprehensively tested using the test dataset, and the system's performance metrics and the quality of the generated medical cases are recorded. Based on the test results, the problems and shortcomings of the system are analyzed, and targeted improvements and optimizations are made to the model and system to continuously improve the quality and efficiency of intelligent generation of TCM diagnosis and treatment medical cases.

[0106] Therefore, this method organically combines the knowledge self-organizing partitioning mechanism based on the GMM model with a large language model, fully utilizing the powerful language generation capabilities of the large language model. After pre-training and fine-tuning, the large language model can learn rich knowledge and language patterns in the field of Traditional Chinese Medicine (TCM), generating medical record texts that conform to the logic of TCM diagnosis and treatment and are fluently expressed. Compared with traditional medical record generation methods, the medical records generated by this embodiment are more natural and accurate in language expression, better meeting the needs of TCM clinical practice and medical research.

[0107] By combining the adaptive partitioning results of the knowledge base with a large language model, the system can extract relevant knowledge text from the knowledge base based on query information and pass it as input to the large language model. This knowledge fusion approach enables the large language model to fully utilize the professional knowledge in the knowledge base when generating medical records, expanding the knowledge sources for medical record generation and improving the quality and practicality of the medical records.

[0108] Figure 2 This illustration shows a flowchart of another method for intelligent generation of TCM diagnosis and treatment medical records provided in an embodiment of this disclosure.

[0109] like Figure 2 As shown, the electronic device can collect a large amount of TCM (Traditional Chinese Medicine) medical record data, covering various diseases, symptom descriptions, diagnostic results, treatment plans, and other information. Simultaneously, it collects relevant TCM knowledge texts, such as classic medical books and academic literature, to construct a TCM knowledge base. The collected data is cleaned to remove duplicate, erroneous, or incomplete records. Preprocessing operations such as word segmentation, stop word removal, and stemming are performed on the text data to transform it into a format suitable for model processing. Based on the logic and knowledge system of TCM diagnosis and treatment, the medical record data is labeled to clarify the relationships between key information such as symptoms, diagnoses, and treatments, providing supervisory signals for subsequent model training.

[0110] Next, the adaptive partitioning problem of the TCM knowledge base is modeled as a two-layer probabilistic generation process. A Gaussian mixture model (GMM) is used to model the joint distribution. The parameter set Θ = {π, μ} is defined. k ,Σ k}, including the topic mixing coefficient π, and the mean vector μ of the Gaussian distribution of topic-related queries. k The relevant query is the Gaussian distribution covariance matrix Σ. k The model parameters are initialized using a random initialization method to provide initial values ​​for subsequent iterative optimization. By continuously iterating through the E-step (calculating the posterior probability) and the M-step (updating the parameters), the model parameters are gradually optimized, enabling the model to better fit the observed data.

[0111] Then, a suitable large language model, such as the GPT series or BERT series, is selected as the foundation model for intelligent generation of TCM diagnosis and treatment records. The large language model is fine-tuned using preprocessed TCM diagnosis and treatment record data and knowledge text data to better adapt it to the language expression and knowledge characteristics of the TCM field. During fine-tuning, appropriate loss functions and optimization algorithms are used to adjust the model parameters and improve its performance on TCM diagnosis and treatment tasks. The adaptive partitioning results of the knowledge base obtained based on the GMM model are combined with the large language model. When generating TCM diagnosis and treatment records, based on the user's input query information, the GMM model is first used to determine the topic to which the query belongs, thereby locating the relevant knowledge blocks. Then, the query information and related knowledge text are used as input and passed to the fine-tuned large language model. Based on the input information, combined with its learned TCM knowledge and language patterns, the large language model generates medical record text that conforms to the logic of TCM diagnosis and treatment.

[0112] Furthermore, the overall system architecture is designed, including a data storage module, a model training module, a query processing module, and a medical record generation module. The data storage module is responsible for storing the TCM knowledge base and training data; the model training module is used to train and optimize the GMM model and the large language model; the query processing module receives user query requests and uses the GMM model to perform knowledge partitioning; the medical record generation module, based on the results from the query processing module, calls the large language model to generate TCM diagnosis and treatment medical records. To improve system performance and response speed, several optimization strategies are adopted. For example, the model is quantized to reduce computational load and storage space; caching technology is used to cache frequently queried knowledge blocks and generated medical record results to reduce redundant calculations; and the system is deployed in a distributed manner to improve its concurrent processing capabilities.

[0113] Finally, a dedicated test dataset was constructed, containing TCM diagnosis and treatment queries of different types and difficulties, along with corresponding medical case samples. The test dataset should cover common TCM symptoms and treatment scenarios to ensure the comprehensiveness and reliability of the evaluation results. Appropriate evaluation metrics were selected to assess the generated TCM diagnosis and treatment medical cases, such as precision, recall, F1 score, and BLEU score. Precision assesses the consistency between the generated medical cases and standard medical cases; recall assesses the range of medical case information that the model can cover; the F1 score is the harmonic mean of precision and recall, comprehensively reflecting the model's performance; and the BLEU score assesses the similarity between the generated text and the reference text, suitable for evaluating the language quality of the medical case text. The system was comprehensively tested using the test dataset, and the system's performance metrics and the quality of the generated medical cases were recorded. Based on the test results, the problems and shortcomings of the system were analyzed, and targeted improvements and optimizations were made to the model and system to continuously improve the quality and efficiency of intelligent generation of TCM diagnosis and treatment medical cases.

[0114] Therefore, based on the user's specific query information, personalized TCM treatment records are generated. Different user queries may correspond to different diseases, symptoms, and treatment needs. The system uses a GMM model to determine the query topic and combines it with a large language model to generate targeted treatment records, providing clinicians with more personalized and accurate decision support. In the clinical diagnosis and treatment process, doctors need to quickly obtain accurate treatment advice. The system of this embodiment has high computing power and fast response speed, and can generate treatment records in a short time, providing doctors with real-time decision support. At the same time, the generated treatment records can serve as a reference for doctors' diagnosis, helping them to understand the condition more comprehensively and improve the accuracy and efficiency of diagnosis.

[0115] Traditional Chinese medicine (TCM) treats a wide variety of diseases, with complex and variable conditions. The adaptive knowledge base partitioning mechanism of this embodiment can automatically adjust the division of knowledge blocks based on different disease characteristics and knowledge associations, enabling the system to adapt to the diagnostic and treatment needs of various TCM diseases. Simultaneously, the large language model can continuously learn new TCM knowledge and clinical experience through fine-tuning, further improving the system's ability to handle different diseases.

[0116] The system architecture of this disclosure is rationally designed, with each module operating independently yet collaboratively, exhibiting good scalability. The system can be easily integrated with other TCM information systems, such as electronic medical record systems and TCM diagnostic equipment, to achieve data sharing and interaction. Furthermore, as TCM knowledge continues to be updated and developed, the system can quickly adapt to and expand upon new knowledge by adding new knowledge texts and adjusting model parameters.

[0117] Figure 3 A schematic diagram of the structure of a smart device for generating TCM diagnosis and treatment medical records provided in an embodiment of this disclosure is shown.

[0118] like Figure 3 As shown, the TCM diagnosis and treatment medical record intelligent generation device 300 may include an information receiving module 310, a data determining module 320, and a medical record generation module 330.

[0119] The information receiving module 310 can be used to receive symptom query information input by the user.

[0120] The data determination module 320 can be used to determine the target topic to which the symptom query information belongs, and to query the target knowledge block associated with the target topic.

[0121] The medical record generation module 330 can be used to perform TCM diagnosis and treatment analysis and processing based on the symptom query information and the target knowledge block to generate corresponding TCM diagnosis and treatment medical records.

[0122] Therefore, in this embodiment, the system can receive symptom query information input by the user, determine the target topic to which the symptom query information belongs, query the target knowledge block associated with the target topic, and then perform TCM diagnosis and treatment analysis based on the symptom query information and the target knowledge block to generate a corresponding TCM diagnosis and treatment medical record. Thus, by generating the inherent association between the user query and the knowledge block references, the system accurately locates the relevant knowledge block, avoiding the subjectivity and inefficiency of manual partitioning in traditional knowledge base management methods. Furthermore, by generating targeted TCM diagnosis and treatment medical records based on the relevant knowledge blocks, the quality and practicality of the medical records are improved.

[0123] In some embodiments of this disclosure, the data determination module 320 may specifically include a first processing unit and a second processing unit.

[0124] The first processing unit can be used to determine the target topic to which the symptom query information belongs based on the topic layer in a pre-trained knowledge partitioning model.

[0125] The second processing unit can be used to query the target knowledge block associated with the target topic based on the association layer in the pre-trained knowledge partitioning model.

[0126] In some embodiments of this disclosure, the data determination module 320 may further include a data acquisition unit and a model building unit.

[0127] This data acquisition unit can be used to acquire the joint distribution of preprocessed TCM diagnosis and treatment case data and knowledge text data.

[0128] This model building unit can be used to build a model of the joint distribution based on the Gaussian mixture model to obtain the pre-trained knowledge partitioning model.

[0129] In some embodiments of this disclosure, the data determination module 320 may further include a parameter initialization unit and an iterative optimization unit.

[0130] This parameter initialization unit can be used to initialize the parameters of the pre-trained knowledge partitioning model using a random initialization method to obtain the initial model parameters.

[0131] This iterative optimization unit can be used to iteratively optimize the initial model parameters to obtain optimized model parameters.

[0132] In some embodiments of this disclosure, the medical record generation module 330 may specifically include a third processing unit.

[0133] The third processing unit can be used to perform TCM diagnosis and treatment analysis on the symptom query information and the target knowledge block based on a pre-trained large language model, and generate corresponding TCM diagnosis and treatment medical records.

[0134] In some embodiments of this disclosure, the medical record generation module 330 may further include a model training unit and a parameter optimization unit.

[0135] The model training unit can be used to train an initial large language model based on preprocessed TCM diagnosis and treatment case data and knowledge text data to obtain the pre-trained large language model.

[0136] This parameter optimization unit can be used to optimize the parameters of the pre-trained large language model based on a preset loss function and a preset optimization algorithm.

[0137] In some embodiments of this disclosure, the intelligent generation device for TCM diagnosis and treatment medical records 300 may further include an evaluation result module.

[0138] The evaluation results module can be used to evaluate the TCM diagnosis and treatment cases based on preset evaluation indicators and preset test datasets to obtain corresponding evaluation results.

[0139] It should be noted that, Figure 3 The TCM diagnosis and treatment medical record intelligent generation device 300 shown can perform... Figure 1-2 The various steps in the method embodiment shown are implemented. Figure 1-2 The processes and effects in the method embodiments shown are not described in detail here.

[0140] Figure 4 A schematic diagram of the structure of a smart device for generating TCM diagnosis and treatment medical records provided in an embodiment of this disclosure is shown.

[0141] In some embodiments of this disclosure, Figure 4 The TCM diagnosis and treatment record intelligent generation device shown can be an electronic device. Specifically, the electronic device can include, but is not limited to, devices such as computer equipment, cloud servers, or cloud server clusters.

[0142] like Figure 4 As shown, the intelligent generation device for TCM diagnosis and treatment medical records may include a processor 401 and a memory 402 storing computer program instructions.

[0143] Specifically, the processor 401 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0144] Memory 402 may include a large-capacity storage for information or instructions. For example, and not limitingly, memory 402 may include a hard disk drive (HDD), a floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 402 may include removable or non-removable (or fixed) media. Where appropriate, memory 402 may be internal or external to the integrated gateway device. In a particular embodiment, memory 402 is a non-volatile solid-state memory. In a particular embodiment, memory 402 includes read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (Electrically Programmable ROM, EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM), or flash memory, or a combination of two or more of these.

[0145] The processor 401 reads and executes the computer program instructions stored in the memory 402 to perform the steps of the intelligent generation method for TCM diagnosis and treatment medical records provided in this embodiment of the disclosure.

[0146] In one example, the intelligent generation device for TCM diagnosis and treatment medical records may also include a transceiver 403 and a bus 404. For example, Figure 4 As shown, the processor 401, memory 402 and transceiver 403 are connected via bus 404 and communicate with each other.

[0147] Bus 404 includes hardware, software, or both. For example, and not limitingly, a bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 404 may include one or more buses. Although specific buses are described and illustrated in the embodiments of this application, this application considers any suitable bus or interconnection.

[0148] This disclosure also provides a computer-readable storage medium that can store a computer program. When the computer program is executed by a processor, the processor enables the processor to implement the intelligent generation method for TCM diagnosis and treatment medical records provided in this disclosure.

[0149] The aforementioned storage medium may include, for example, a memory 402 containing computer program instructions, which can be executed by the processor 401 of the intelligent generation device for TCM diagnosis and treatment records to complete the intelligent generation method for TCM diagnosis and treatment records provided in this embodiment. Optionally, the storage medium may be a non-transitory computer-readable storage medium, such as a ROM, random access memory (RAM), compact disc ROM (CD-ROM), magnetic tape, floppy disk, and optical data storage device.

[0150] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the term "comprising" is 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.

[0151] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for intelligently generating TCM diagnosis and treatment medical records, characterized in that, include: Receive symptom query information input by the user; Determine the target topic to which the symptom query information belongs, and query the target knowledge blocks associated with the target topic; Based on the symptom query information and the target knowledge block, traditional Chinese medicine diagnosis and treatment analysis is performed to generate corresponding traditional Chinese medicine diagnosis and treatment records.

2. The method according to claim 1, characterized in that, The step of determining the target topic to which the symptom query information belongs and querying the target knowledge block associated with the target topic includes: The target topic to which the symptom query information belongs is determined based on the topic layer in a pre-trained knowledge partitioning model; The target knowledge block associated with the target topic is queried in the association layer of the pre-trained knowledge partitioning model.

3. The method according to claim 2, characterized in that, Before determining the target topic corresponding to the symptom query information in the topic layer of the pre-trained knowledge partitioning model, the method further includes: Obtain the joint distribution of preprocessed TCM diagnosis and treatment case data and knowledge text data; The joint distribution is modeled based on a Gaussian mixture model to obtain the pre-trained knowledge partitioning model.

4. The method according to claim 3, characterized in that, After constructing the joint distribution based on the Gaussian mixture model to obtain the pre-trained knowledge partitioning model, the method further includes: The pre-trained knowledge partitioning model is initialized with parameters using a random initialization method to obtain initial model parameters; The initial model parameters are iteratively optimized to obtain the optimized model parameters.

5. The method according to claim 1, characterized in that, The step of performing TCM diagnosis and treatment analysis based on the symptom query information and the target knowledge block to generate corresponding TCM diagnosis and treatment medical records includes: Based on a pre-trained large language model, the symptom query information and the target knowledge block are analyzed and processed using traditional Chinese medicine (TCM) diagnostic methods to generate corresponding TCM medical records.

6. The method according to claim 5, characterized in that, Before performing TCM diagnosis and treatment analysis on the symptom query information and the target knowledge block based on the pre-trained large language model, the method further includes: The initial large language model is trained based on preprocessed TCM diagnosis and treatment case data and knowledge text data to obtain the pre-trained large language model. The parameters of the pre-trained large language model are optimized based on a preset loss function and a preset optimization algorithm.

7. The method according to claim 1, characterized in that, The method further includes: The TCM diagnosis and treatment cases are evaluated based on preset evaluation indicators and preset test datasets to obtain corresponding evaluation results.

8. A smart device for generating medical records in traditional Chinese medicine diagnosis and treatment, characterized in that, include: The information receiving module is used to receive symptom query information input by the user; The data determination module is used to determine the target topic to which the symptom query information belongs, and to query the target knowledge blocks associated with the target topic; The medical record generation module is used to perform TCM diagnosis and treatment analysis and processing based on the symptom query information and the target knowledge block to generate corresponding TCM diagnosis and treatment medical records.

9. A device for intelligently generating medical records for traditional Chinese medicine diagnosis and treatment, characterized in that, include: processor; Memory, used to store executable instructions; The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the intelligent generation method of TCM diagnosis and treatment medical records as described in any one of claims 1-7.

10. A non-volatile computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, causes the processor to implement the intelligent generation method for TCM diagnosis and treatment medical records as described in any one of claims 1-7.