Traditional Chinese medicine auxiliary diagnosis and treatment method, electronic equipment and computer readable storage medium

By using a terminology dictionary and similarity calculation, the problems of inconsistent symptom descriptions and inaccurate prescription recommendations in TCM auxiliary diagnosis and treatment systems have been solved, achieving symptom standardization and automatic prescription recommendation, thereby improving the efficiency and accuracy of diagnosis and treatment.

CN120954641APending Publication Date: 2025-11-14CHINESE SCI CLOUD COMPUTING ACAD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510802487.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

Existing TCM auxiliary diagnosis and treatment systems suffer from problems such as vague and diverse symptom description terminology and inaccurate prescription recommendations.

Method used

The system uses a pre-stored terminology dictionary to extract symptoms from short sentences of patient symptom information, obtains standardized symptoms, and recommends the prescription with the highest similarity through correlation analysis and similarity calculation.

Benefits of technology

It enables the standardization of symptoms and precise prescription recommendations, reducing doctors' manual input time and improving diagnostic efficiency and prescription accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120954641A_ABST
    Figure CN120954641A_ABST
Patent Text Reader

Abstract

The invention discloses a traditional Chinese medicine auxiliary diagnosis and treatment method, electronic equipment and a computer readable storage medium. Performing symptom extraction on the short text sentences representing the symptom information of the patient based on a pre-stored term dictionary to obtain standardized symptoms; performing correlation analysis on the standardized symptoms and symptoms in a medical record database to obtain recommended symptoms; and analyzing similarity measurement values of a symptom set of the standardized symptom and the selected recommended symptom combination and symptoms in the medical record database, and outputting diagnosis data corresponding to the first n medical records with the highest similarity measurement values as recommended prescriptions, including disease and symptom type diagnosis results of the medical record data and medicinal material combinations of prescriptions. According to the method, symptoms can be standardized, associated symptoms and medical record prescriptions can be automatically recommended, the manual input time of doctors is shortened, prompts are given in the inquiry process of the doctors, the doctors are prevented from omitting the symptoms, the doctors are helped to solve clinical diagnosis and treatment difficulties caused by insufficient experience, and meanwhile the accuracy of prescription recommendation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method for assisting diagnosis and treatment in traditional Chinese medicine, an electronic device, and a computer-readable storage medium. Background Technology

[0002] In recent years, many scholars have combined big data and artificial intelligence technologies to develop TCM-assisted diagnosis and treatment systems to assist less experienced medical professionals, which has played a significant role in clinical diagnosis and treatment and the inheritance of TCM. Yu Jiangwei et al. used text mining and automatic classification techniques, employing the TF-IDF algorithm to automatically classify and quantify TCM syndromes, obtaining the syndrome distribution in different syndrome types and verifying the feasibility of TF-IDF relative entropy quantification of TCM syndromes. This method can extract symptom terms from symptom text descriptions, but it cannot handle inconsistent symptom names, diverse symptom names, or the phenomenon of multiple names for one symptom. Ren Jinyu et al. used data mining and metric learning techniques to mine and organize TCM diagnosis and treatment experience knowledge, established a method for calculating case similarity, and designed and implemented a TCM-assisted diagnosis and treatment recommendation system. This method can automatically recommend relevant symptoms and provide prescriptions, but it does not explain how to extract and standardize symptom terms from symptom description texts, and the prescription recommendation method is not entirely the same as that used in this invention.

[0003] While existing technologies can automatically recommend symptoms and provide prescriptions, there are still issues such as vague and diverse symptom descriptions and inaccurate prescription recommendations. Summary of the Invention

[0004] This application provides a TCM-assisted diagnosis and treatment method, an electronic device, and a computer-readable storage medium to address the problems of vague and diverse symptom description terminology and inaccurate prescription recommendations in current TCM-assisted diagnosis and treatment methods.

[0005] To address the aforementioned technical problems, this application provides a TCM-assisted diagnostic method. This method includes: extracting symptoms from short text phrases representing patient symptoms based on a pre-stored terminology dictionary to obtain standardized symptoms; performing correlation analysis between the standardized symptoms and symptoms in a medical record database to obtain the top m recommended symptoms with the highest correlation, where m is a positive integer greater than or equal to 1; in response to the selection of the m recommended symptoms, combining the standardized symptoms and the selected recommended symptoms into an input symptom set, and calculating the similarity metric between the input symptom set and medical record samples in the medical record database; selecting the corresponding diagnostic data of the top n medical records with the highest similarity metric values, where n is a positive integer greater than or equal to 1, and outputting a recommended prescription, which includes the disease name, syndrome differentiation diagnosis result, and prescription.

[0006] After doctors input the patient's main symptoms, the system standardizes the symptoms and outputs recommended symptoms, significantly reducing the time doctors spend inputting symptoms. Furthermore, multiple recommended symptoms effectively address the issue of inexperienced doctors missing symptoms. Using standardized and recommended symptoms as input for prescription recommendations makes subsequent prescription recommendations more accurate.

[0007] Preferably, the specific steps for extracting standardized symptoms from text phrases representing patient symptoms based on a pre-stored terminology dictionary include:

[0008] Calculate the similarity between the text phrase and the symptom terms in the terminology dictionary;

[0009] When the similarity is greater than a preset similarity threshold, the corresponding terminology symptom is used as the standardized symptom that characterizes the patient's symptom information.

[0010] Preferably, the similarity calculation formula is as follows:

[0011]

[0012] Where, sim (a,b) Let 'a' be the similarity score between two strings, where 'a' is a natural language text sentence containing symptom information and 'b' is symptom terminology keywords. (a,b) Let be the Levenstein distance between two strings, max(|a|,|b|) be the maximum length of the two strings, and i be the i-th character of string a and j be the j-th character of string b. For a i ≠b j When the value is 1, it is 1; otherwise, it is 0.

[0013] Symptoms are extracted from short sentences in the text based on a standardized terminology dictionary, and the symptoms are standardized to unify the expression of symptoms, effectively solving the problem of vague and diverse descriptions of symptoms.

[0014] Preferably, the specific steps of performing a correlation analysis on the standardized symptoms and symptoms in the medical record database to obtain the top m recommended symptoms with the highest correlation, where m is a positive integer greater than or equal to 1, include:

[0015] Calculate the mutual information value between the standardized symptoms and the symptoms in the medical record database;

[0016] The top m symptoms with the highest mutual information values ​​from the medical record database are selected as the recommended symptoms.

[0017] The formula for calculating the mutual information value is as follows:

[0018]

[0019] Where X represents a random symptom, Y represents another random symptom, I(X,Y) represents the mutual information value between symptom X and symptom Y, P(x,y) represents the probability of the two symptoms occurring together, and P(x) and P(y) are the probabilities of a symptom occurring alone.

[0020] Preferably, the accuracy of the recommendations is verified using the normalized loss cumulative gain index of the first m recommended symptoms, and the formula for the normalized loss cumulative gain is as follows:

[0021]

[0022] Among them, rel i The relevance score of the symptom at position i is represented by k, the length of the recommendation list is k, DCG is the deducted cumulative gain is k, IDCG is the list of the top k recommended symptoms to be tested, sorted by relevance from largest to smallest, and NDCG is the normalized deducted cumulative gain is k.

[0023] The algorithm parameters for the correlation analysis are adjusted based on the accuracy of the recommendations.

[0024] By inputting short text sentences describing the patient's symptoms, corresponding related recommended symptoms can be obtained, reducing the workload of doctors manually inputting related symptoms, while ensuring the standardization and accuracy of the input symptoms when recommending prescriptions.

[0025] Preferably, the specific steps for calculating the similarity metric between the input symptom set and the medical record samples in the medical record database include: obtaining the input symptom feature vector of the input symptom set using a word vector model;

[0026] The word vector model is used to obtain the word vectors of each symptom in the medical record database, and a set of symptom feature vector matrix of the symptoms in the medical record database is constructed based on each symptom word vector and its weight.

[0027] The similarity metric between the input symptom feature vector and the symptom feature vector matrix is ​​calculated based on the Euclidean distance formula.

[0028] The Euclidean distance formula is as follows:

[0029]

[0030] Where A and B are two symptom feature vectors, (a1, a2, ..., a... n (b1,b2,...,b) and (b1,b2,...,b) n ) are the coordinates of two vectors, and the similarity metric is inversely proportional to the Eulerian distance value.

[0031] To address the aforementioned problems, another technical solution adopted in this application is to provide an electronic device. This electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it performs any of the steps described in the above-mentioned TCM-assisted diagnostic and treatment method.

[0032] To address the aforementioned issues, another technical solution adopted in this application is to provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements any of the steps of the aforementioned TCM-assisted diagnostic and treatment method.

[0033] Compared to existing technologies, the beneficial effects of this application are as follows: This application discloses a TCM-assisted diagnosis and treatment method, electronic device, and computer-readable storage medium. Based on a pre-stored terminology dictionary, symptom extraction is performed on short text phrases representing patient symptom information to obtain standardized symptoms; then, correlation analysis is conducted between the standardized symptoms and symptoms in the medical record database to obtain recommended symptoms; the similarity metric between the standardized symptoms and the selected recommended symptom combinations and the symptoms in the medical record database is analyzed, and the corresponding diagnostic data of the top n medical records with the highest similarity metrics are output as recommended prescriptions, including the disease, syndrome type diagnosis results, and herbal combinations in the medical record data. This application can standardize symptoms, unifying symptom expression; and automatically recommend related symptoms and medical record prescriptions, reducing the time doctors spend manually inputting information, providing prompts during doctor consultations, preventing doctors from missing symptoms or inputting inaccurate information, helping doctors overcome clinical diagnosis and treatment difficulties caused by insufficient experience, and improving the accuracy of recommended prescriptions. Attached Figure Description

[0034] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0035] Figure 1 This is a flowchart illustrating one implementation method of the TCM auxiliary diagnosis and treatment method of this application;

[0036] Figure 2 yes Figure 1 Step 10: A flowchart illustrating the specific implementation method;

[0037] Figure 3 yes Figure 1 Step 11: A flowchart illustrating a specific implementation method;

[0038] Figure 4 yes Figure 1Step 12 is a flowchart illustrating a specific implementation method;

[0039] Figure 5 This is a schematic diagram of the structure of an embodiment of the electronic device of this application;

[0040] Figure 6 This is a schematic diagram of the structure of an embodiment of the computer-readable storage medium of this application. Detailed Implementation

[0041] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0042] The terminology used in one or more embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments of the invention. The singular forms “a,” “the,” and “the” used in one or more embodiments of this application and in the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” used in one or more embodiments of this application refers to and includes any or all possible combinations of one or more associated listed items.

[0043] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this application, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."

[0044] The exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0045] Please see Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the TCM-assisted diagnosis and treatment method of this application.

[0046] Includes the following steps:

[0047] Step 10: Extract symptoms from text phrases representing patient symptoms based on a pre-stored terminology dictionary to obtain standardized symptoms.

[0048] The terminology dictionary is used to standardize and regulate the description of symptoms, including a range of common and specific symptoms, and provides standard definitions, descriptions, and diagnostic criteria for each symptom. It helps doctors and researchers record and analyze patient symptoms more accurately and consistently, contributing to improved diagnostic accuracy and treatment success rates. However, traditional Chinese medicine (TCM) symptoms suffer from inconsistencies in symptom names, broad and unclear meanings, multiple meanings of a single term, arbitrary combinations of complex symptoms, and vague quantitative standards. Furthermore, the lack of a unified terminology dictionary means that the same symptom can be described in multiple ways. To facilitate subsequent processing, it is necessary to standardize TCM symptom descriptions. Therefore, keyword extraction is required based on existing clinical case data and symptoms from authoritative medical books, and these keywords are integrated into a standardized terminology dictionary to provide a unified standard for resolving the problems of vague and diverse symptom descriptions.

[0049] Specifically, creating a terminology dictionary involves: collecting natural language text data containing descriptions of TCM symptoms from TCM clinics, hospitals, research reports, medical records, etc., and then performing structured processing on this text data. This includes converting the symptom descriptions in the text into recognizable and categorizable structured data formats, such as tables, labels, and entity recognition. Data annotations should be made as unambiguous as possible. Then, authoritative textbooks or professional books, such as *Traditional Chinese Medicine Diagnostics*, *Traditional Chinese Medicine Symptom Differential Diagnosis*, and *Common Symptom Differential Diagnosis*, are used to obtain the listed symptom terms and their explanations. The terminology of symptoms and their different descriptive methods are analyzed and organized to create an offline symptom terminology dictionary. This dictionary should contain standardized terms for various symptoms, along with their corresponding explanations and descriptions. Tables, databases, or other suitable formats can be used to store and manage this offline symptom terminology dictionary.

[0050] For example, when the obtained text phrases representing patient symptoms are descriptions of clear nasal discharge and runny nose, symptoms can be extracted using a terminology dictionary to obtain the standardized symptom of clear nasal discharge.

[0051] In routine medical visits, issues such as inaccurate symptom descriptions, broad symptom meanings, inconsistent symptom names, and vague symptom quantification standards often arise. Standardizing symptoms by extracting them from short textual phrases representing patient symptoms can effectively address these problems and provide a unified standard for symptom description.

[0052] Specifically, please refer to Figure 2 , Figure 2 Step 10 is a flowchart illustrating a specific implementation method for extracting symptoms from text phrases representing patient symptoms based on a pre-stored terminology dictionary to obtain standardized symptoms. It includes the following steps:

[0053] Step 101: Obtain text phrases related to the patient's symptoms.

[0054] After obtaining the natural language text of the patient describing their condition to the doctor, text segmentation is performed. Breaking the text down into single or multiple words or phrases will yield some words or phrases unrelated to the patient's symptoms, such as "I feel" or "I heard." These noisy contents need to be filtered out using regular expressions or other methods. Finally, by identifying and extracting symptom-related keywords or phrases, text phrases containing information relevant to the patient's symptoms are selected.

[0055] For example, a patient's natural language text describing their symptoms is: "I've been feeling very tired, have a headache, and a slight fever lately." Text segmentation yields multiple phrases: "I've been feeling very tired," "feeling," "very," "tired," "headache," "slightly," and "fever." Regular expressions are used to filter out noisy content, and phrases related to the symptoms are identified and extracted: "tired," "headache," and "fever."

[0056] Step 102: Calculate the similarity between the text phrases and the symptom terms in the terminology dictionary.

[0057] String matching is performed using standardized symptoms and alternative names. Matching similarity is measured using the Levinstein distance, an algorithm that calculates the degree of difference between two strings through a series of insertion, deletion, and replacement operations. To calculate the similarity of two strings, the longer string is trimmed into multiple substrings of the same length as the shorter string. The Levinstein distance between each substring and the shorter string is calculated, and the minimum value is taken as the similarity between the two strings. The calculation formula is as follows:

[0058]

[0059]

[0060] Where, sim (a,b) Let 'a' be the similarity score between two strings, where 'a' is a natural language text sentence containing symptom information and 'b' is symptom terminology keywords. (a,b) Let be the Levenstein distance between two strings, max(|a|,|b|) be the maximum length of the two strings, and i be the i-th character of string a and j be the j-th character of string b. For a i ≠b j When the value is 1, it is 1; otherwise, it is 0.

[0061] For example, given the text phrase "abdominal pain" (associated with patient symptoms) and the standardized symptom "abdominal ache" (as defined in a terminology dictionary), the Levenstein distance can be used to calculate their similarity. First, convert both symptom descriptions into strings, such as "abdominal pain" and "abdominal ache". Then, the Levenstein distance algorithm can be used to calculate their edit distance. A matrix can be created to represent the edit distance between the two strings; the matrix is ​​filled, and the minimum edit distance is found. The minimum edit distance between "abdominal pain" and "abdominal ache" is 2, hence the Levenstein distance Lev... (a,b) The similarity is 2. The maximum length of the two strings is 4, and the similarity between "abdominal pain" and "abdominal pain" is 0.5 using the similarity formula.

[0062] Step 103: When the similarity is greater than the preset similarity threshold, the corresponding terminology symptoms are used as standardized symptoms that characterize the patient's symptom information.

[0063] Specifically, a similarity threshold can be set to 0.5. When the similarity between two terms (symptoms) is greater than 0.5, they can be considered the same symptom. The standardized symptoms from the corresponding terminology dictionary can then be used as a representation of the patient's symptom information, thereby improving the diagnosis and treatment of the patient's condition.

[0064] Furthermore, if no standardized symptoms with a similarity threshold are found during the extraction process, then the symptom with the highest similarity in the terminology dictionary should be selected as the corresponding standardized symptom.

[0065] In other embodiments, the similarity threshold can be set based on the accuracy of the extracted standardized symptoms each time or other practical considerations. For example, if the set threshold results in a text phrase extracting too many standardized symptoms, the threshold should be adjusted higher to facilitate extraction in the next iteration. In a specific embodiment, the natural language text describing the illness is segmented and noise is filtered out to obtain a single text phrase containing symptom information. The similarity of the text phrase is compared with the symptoms in the terminology dictionary, and a similarity threshold of 0.5 is set to extract standardized symptoms. The results of the standardized symptom extraction from some texts are shown in Table 1 below:

[0066] Table 1: Examples of Standardized Symptom Extraction Results

[0067] Case text Standardized symptoms Case text Standardized symptoms Sore throat Sore throat Coughing up phlegm Phlegm Headache Headache wheezing asthma abdominal pain stomach ache I occasionally feel tightness in my chest. Chest tightness I started coughing two days ago cough Irregular menstruation for the past six months Menstrual disorders

[0068] Step 11: Perform a correlation analysis on the standardized symptoms and the symptoms in the medical record database to obtain the top m recommended symptoms with the highest correlation, where m is a positive integer greater than or equal to 1.

[0069] The system automatically generates multiple recommended symptoms based on their relevance, significantly reducing the time doctors spend manually entering relevant symptoms and improving the efficiency of their consultations. Providing doctors with multiple recommended symptoms to choose from effectively addresses the problem of inexperienced doctors missing symptoms or entering inaccurate symptoms.

[0070] Specifically, please refer to Figure 3 , Figure 3 Step 11 involves performing a correlation analysis between standardized symptoms and symptoms in the medical record database to obtain the top m recommended symptoms with the highest correlation. This is a flowchart illustrating a specific implementation method. It includes the following steps:

[0071] Step 111: Calculate the mutual information value between standardized symptoms and symptoms in the medical record database.

[0072] The formula for calculating the mutual information value is as follows:

[0073]

[0074] Where X represents one random symptom, Y represents another random symptom, I(X,Y) represents the mutual information value between symptom X and symptom Y, P(x,y) represents the probability of both symptoms occurring together, and P(x) and P(y) are the probabilities of a single symptom occurring alone. The mutual information value I(X,Y) is equal to the sum of the probabilities of both symptoms occurring together multiplied by log2 (the probabilities of both symptoms occurring together divided by the probabilities of each symptom occurring alone). The larger the mutual information value, the stronger the correlation between the two symptoms; a value of zero indicates that there is no correlation between the two symptoms.

[0075] Step 112: Select the symptoms from the top m medical records databases with the highest mutual information values ​​as recommended symptoms.

[0076] Step 113: Use the normalized depreciation cumulative gain index of the first m recommended symptoms to verify the accuracy of the recommendations.

[0077] The formula for normalized loss cumulative gain is as follows:

[0078]

[0079] Among them, rel i The relevance score of the symptom at position i is represented by k, where k is the length of the recommendation list, DCG is the depreciated cumulative gain, IDCG is a list of the top k recommended symptoms sorted by relevance from highest to lowest, and NDCG is the normalized depreciated cumulative gain, which is directly proportional to accuracy. The relevant algorithm parameters for the correlation analysis are adjusted based on the recommendation accuracy.

[0080] In one specific embodiment, the symptom data in the medical record database can be divided into a training set and a test set. First, the mutual information value formula is used to calculate the mutual information value between standardized symptoms and the symptoms in the training set, and the top k symptoms with the highest mutual information values ​​are selected as recommended symptoms. Then, the normalized loss cumulative gain formula is used to calculate the recommendation accuracy of the top k recommended symptoms, and the relevant algorithm parameters for correlation analysis are adjusted based on this recommendation accuracy. Then, based on the adjusted algorithm parameters, the mutual information value of the combined training and test sets with the standardized symptoms is calculated, and the top m symptoms with the highest mutual information values ​​from the medical record database are selected as recommended symptoms. If the value of m is set to 20, the standardized symptoms are used as input symptoms, and the mutual information value is calculated with the symptoms in the full symptom medical record database. The top 20 symptoms with the highest mutual information values ​​are selected as recommended symptoms. The final effect of the recommended symptoms is shown in the table below:

[0081] Table 2: Examples of Recommended Symptom Effectiveness

[0082]

[0083]

[0084] In other embodiments, the value of m can be modified according to the doctor's needs. The proportion of symptoms selected by the doctor when choosing recommended symptoms can also be recorded; a higher proportion indicates a higher recommendation rate. Based on this proportion, the algorithm parameters for the corresponding correlation analysis can be further adjusted to improve the accuracy of symptom recommendations.

[0085] Step 12: In response to the selection of m recommended symptoms, combine the standardized symptoms and the selected recommended symptoms into an input symptom set, and calculate the similarity metric between the input symptom set and the medical record samples in the medical record database.

[0086] Specifically, please refer to Figure 4 , Figure 4 Step 12, in response to the selection of m recommended symptoms, combines the standardized symptoms and the selected recommended symptoms into an input symptom set, and calculates the similarity metric between the input symptom set and the medical record samples in the medical record database—a flowchart illustrating a specific implementation method. It includes the following steps:

[0087] Step 121: Use the word vector model to obtain the input symptom feature vector of the input symptom set.

[0088] In this process, the doctor selects the desired recommended symptoms from the above-mentioned list based on the patient's described symptoms. Upon this selection, the standardized symptoms and the selected recommended symptoms are combined into an input symptom set. Each input symptom is then decomposed using the n-gram decomposition formula of the FastText word vector model, and the decomposed sequence is represented as a vector to obtain the input symptom feature vector.

[0089] In this context, n-gram refers to a text decomposition method that breaks down text into n consecutive items (which can be words, letters, or other units) that are consecutive within the text. In practical applications, n-grams can be unigrams (single item), bigrams (two items), trigrams (three items), etc. For example, decomposing the word "headache" using a bigram (2-gram) yields the n-gram: {"head", "pain"}. The FastText word vector model is then used to generate the corresponding word vectors, which are then combined to obtain the feature vector for "headache". This combination can be achieved by simply adding or averaging the word vectors of all n-grams, or by using more complex methods to obtain a more accurate word vector representation.

[0090] Step 122: Use word vector model to obtain the symptom feature vector matrix of symptoms in the medical record database.

[0091] Similarly, the n-gram decomposition formula of the FastText word vector model is used to decompose each symptom in the medical record database to obtain word vectors for each symptom. Then, based on the word vectors of each symptom and their weights, a set of symptom feature vector matrices for the symptoms in the medical record database is formed. The combination method can be as simple as adding all the word vectors of the n-gram or taking the average, or a more complex method can be used to combine them to obtain a more accurate word vector representation.

[0092] Step 123: Calculate the similarity measure between the input symptom feature vector and the symptom feature vector matrix based on the Euclidean distance formula.

[0093] The Euclidean distance formula is as follows:

[0094]

[0095] Where A and B are two symptom feature vectors, (a1, a2, ..., a... n (b1,b2,...,b) and (b1,b2,...,b) n ) are the coordinates of two vectors, and the similarity metric is inversely proportional to the Euclidean distance value.

[0096] Step 13: Select the corresponding diagnostic data of the top n medical records with the highest similarity scores, where n is a positive integer greater than or equal to 1. The output is the recommended prescription. The recommended prescription includes the disease name, syndrome type diagnosis result, and prescription.

[0097] The Euclidean distance values ​​are sorted from smallest to largest to obtain medical record data with similarity metrics from highest to lowest. The corresponding diagnostic data of the top n medical records are selected as recommended prescriptions, including the disease name, syndrome differentiation diagnosis, and prescription. The prescription includes the names and dosages of the medicinal materials. In a specific embodiment, the patient's description of symptoms is input as text, and standardized symptoms are extracted using a terminology dictionary. A correlation analysis is performed between the standardized symptoms and the symptoms in the medical record database to obtain the top m recommended symptoms with the highest correlation. In response to the selection of the m recommended symptoms, the standardized symptoms and the selected recommended symptoms are combined into an input symptom set, and the similarity metric between the input symptom set and the medical record samples in the medical record database is calculated. The corresponding diagnostic data of the top n medical records with the highest similarity metrics are selected as recommended prescriptions; the recommended prescriptions include the disease name, syndrome differentiation diagnosis, and prescription. The prescription includes the names and dosages of the medicinal materials.

[0098] The parameter n can be set to 3, and the recommendation score of the prescription will be given in the output. For example, if the patient describes symptoms as "insomnia for 3 months, frequent headaches, irritability, chest tightness and palpitations, poor appetite, and loose stools", the prescription recommendation effect is shown in the table below. A total of 3 prescription recommendations are given, arranged from largest to smallest recommendation score ('count'). Among them, 'idx' is the medical record number in the medical record database, 'diagnosis_list' is the disease suggestion, 'syndrome_list' is the syndrome suggestion, and 'herbs_list' is the composition of the medicines, including the name and dosage of the medicines.

[0099]

[0100] In other embodiments, if the attending physician is familiar with the standardized symptoms, or if the symptoms are relatively simple or obvious, they can manually input a symptom set. The final prescription recommendation is then output based on the similarity metric between the manually input symptom set and medical record samples in the medical record database. Furthermore, some conditions may be affected by age, season, or epidemics. In such cases, the output of the prescription recommendation can be modified by adding relevant factors that may influence the condition to the system for reference.

[0101] Unlike existing technologies, this application provides a TCM-assisted diagnosis and treatment method that can standardize symptoms and automatically recommend prescriptions based on related symptoms and medical records. This reduces the time doctors spend manually inputting information, provides prompts during the doctor's consultation, prevents doctors from missing symptoms, helps doctors solve clinical diagnosis and treatment difficulties caused by insufficient experience, improves consultation efficiency, and enhances the accuracy of recommended prescriptions.

[0102] Please see Figure 5 , Figure 5This is a schematic diagram of an embodiment of the electronic device of this application. The electronic device 200 includes a memory 201 and a processor 202 coupled to each other, and a computer program stored in the memory 201 and running on the processor 202. The processor 202 is used to execute the program instructions stored in the memory 201 to implement the steps of any of the above-described embodiments of the traditional Chinese medicine auxiliary diagnosis and treatment method. In a specific implementation scenario, the electronic device 200 may include, but is not limited to, a microcomputer or a server.

[0103] Specifically, processor 202 controls itself and memory 201 to implement the steps of any of the above-described electronic device embodiments. Processor 202 may also be referred to as a CPU (Central Processing Unit). Processor 202 may be an integrated circuit chip with signal processing capabilities. Processor 202 may also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor. Furthermore, processor 202 may be implemented using integrated circuit chips.

[0104] Please see Figure 6 , Figure 6 This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium of this application. The computer-readable storage medium 310 stores program instructions 312 that can be executed by a processor. The program instructions 312 are used to implement the steps of any of the above embodiments of the traditional Chinese medicine auxiliary diagnosis and treatment method.

[0105] The program instructions 312 are stored in a computer-readable storage medium 310 and include several instructions for causing a network device (which may be a router, personal computer, server or other network device) or processor to perform all or part of the steps of the methods described in the various embodiments of this application.

[0106] Optionally, the storage medium 310 can be any medium capable of storing program instructions 312, such as a USB flash drive, portable hard drive, read-only memory (ROM), random access memory (RAM), disk, or optical disc.

[0107] In the embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

[0108] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0109] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0110] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0111] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A traditional Chinese medicine auxiliary diagnostic and treatment method, characterized in that, include: Based on a pre-stored terminology dictionary, symptoms are extracted from short text sentences that represent patient symptoms to obtain standardized symptoms; A correlation analysis is performed on the standardized symptoms and the symptoms in the medical record database to obtain the top m recommended symptoms with the highest correlation, where m is a positive integer greater than or equal to 1; In response to the selection of the m recommended symptoms, the standardized symptoms and the selected recommended symptoms are combined into an input symptom set, and the similarity metric between the input symptom set and the medical record samples in the medical record database is calculated. Select the corresponding diagnostic data of the top n medical records with the highest similarity metric values, where n is a positive integer greater than or equal to 1, and output the recommended prescription, which includes the disease name, syndrome type diagnosis result and prescription.

2. The TCM auxiliary diagnosis and treatment method according to claim 1, characterized in that, The method extracts standardized symptoms from text phrases representing patient symptoms based on a pre-stored terminology dictionary, including: Calculate the similarity between the text phrase and the symptom terms in the terminology dictionary; When the similarity is greater than a preset similarity threshold, the corresponding terminology symptom is used as the standardized symptom that characterizes the patient's symptom information.

3. The TCM auxiliary diagnosis and treatment method according to claim 2, characterized in that, The formula for calculating the similarity is: Where, sim (a,b) Let 'a' be the similarity score between two strings, where 'a' is a natural language text sentence containing symptom information and 'b' is symptom terminology keywords. (a,b) Let be the Levenstein distance between two strings, max(|a|,|b|) be the maximum length of the two strings, i be the i-th character of a, and j be the j-th character of b; For a i ≠b j When the value is 1, it is 1; otherwise, it is 0.

4. The TCM auxiliary diagnosis and treatment method according to claim 1, characterized in that, The standardized symptoms and symptoms in the medical record database are analyzed for correlation to obtain the top m recommended symptoms with the highest correlation, where m is a positive integer greater than or equal to 1, including: Calculate the mutual information value between the standardized symptoms and the symptoms in the medical record database; The top m symptoms with the highest mutual information values ​​from the medical record database are selected as the recommended symptoms.

5. The TCM-assisted diagnostic and treatment method according to claim 4, characterized in that, The formula for calculating the mutual information value is: Where X represents a random symptom, Y represents another random symptom, I(X,Y) represents the mutual information value between symptom X and symptom Y, P(x,y) represents the probability of the two symptoms occurring together, and P(x) and P(y) are the probabilities of a symptom occurring alone.

6. The TCM auxiliary diagnostic and treatment method according to claim 1 or 4, characterized in that, The aforementioned TCM-assisted diagnostic and treatment methods also include: The accuracy of the recommendations is verified using the normalized depreciation cumulative gain index of the first m recommended symptoms. The formula for the normalized depreciation cumulative gain is as follows: Among them, rel i The relevance score of the symptom at position i is represented by k, the length of the recommendation list is k, DCG is the deducted cumulative gain is k, IDCG is the list of the top k recommended symptoms to be tested, sorted by relevance from largest to smallest, and NDCG is the normalized deducted cumulative gain is k. The algorithm parameters for the correlation analysis are adjusted based on the accuracy of the recommendations.

7. The TCM auxiliary diagnosis and treatment method according to claim 1, characterized in that, The calculation of the similarity metric between the input symptom set and the medical record samples in the medical record database includes: The input symptom feature vectors of the input symptom set are obtained using a word vector model; The word vector model is used to obtain the word vectors of each symptom in the medical record database, and a set of symptom feature vector matrix of the symptoms in the medical record database is constructed based on each symptom word vector and its weight. The similarity metric between the input symptom feature vector and the symptom feature vector matrix is ​​calculated based on the Euclidean distance formula.

8. The TCM auxiliary diagnosis and treatment method according to claim 7, characterized in that, The Euclidean distance formula is as follows: Where A and B are two symptom feature vectors, (a1, a2, ..., a... n (b1,b2,...,b) and (b1,b2,...,b) n ) are the coordinates of two vectors, and the similarity metric is inversely proportional to the Euclidean distance value.

9. An electronic device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the steps of the method as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method as described in any one of claims 1 to 8.