Traditional Chinese medicine voice input method and system based on semantic perception and dynamic dialectical reasoning

By constructing a dynamic diagnostic drug pool and performing semantic matching in the traditional Chinese medicine input system, the problems of homophony confusion and deviation from clinical diagnosis have been solved, achieving high accuracy and intelligence in the voice input of traditional Chinese medicine.

CN122309716APending Publication Date: 2026-06-30CHENGDU ZIJIELIU TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHENGDU ZIJIELIU TECH CO LTD
Filing Date
2026-06-01
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing Chinese medicine input technology suffers from problems such as difficulty in distinguishing homophones and low input accuracy due to detachment from clinical diagnostic context.

Method used

By acquiring voice input data of traditional Chinese medicine and electronic medical record text, named entity recognition is performed. A dynamic syndrome differentiation drug pool is constructed by combining traditional Chinese medicine knowledge graph. The voice recognition results are expanded with confounding words of traditional Chinese medicine. The semantic matching score between candidate traditional Chinese medicine and syndrome differentiation elements is calculated to determine the real name of traditional Chinese medicine.

Benefits of technology

It improved the accuracy of voice input for traditional Chinese medicine, reduced the error rate, decreased the burden of manual verification for doctors, and enhanced the intelligence level of the electronic medical record system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122309716A_ABST
    Figure CN122309716A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of natural language processing technology. To address the problem of low input accuracy in existing technologies, it discloses a method and system for inputting traditional Chinese medicine (TCM) speech based on semantic perception and dynamic dialectical reasoning. This invention identifies TCM diagnostic elements in electronic medical records and dynamically constructs a diagnostic medicine pool by combining it with a TCM knowledge graph. This allows speech recognition to move beyond mechanical reliance on acoustic models and integrate with clinical diagnosis. Simultaneously, this invention expands the acoustic candidate word sequence with TCM-related confusing words, generating a more comprehensive set of TCM candidates. This set is then combined with the diagnostic medicine pool to generate candidate TCMs. Next, the semantic matching score between each candidate TCM and the diagnostic elements is calculated, and the corresponding real TCM name is determined based on this score. Therefore, this invention avoids mechanical recognition detached from syndromes and treatment principles and can effectively distinguish TCMs that are confused by homophones or near-homophones, thus reducing the input error rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the cross - technical field of natural language processing, speech recognition and traditional Chinese medicine informatization, and particularly relates to a traditional Chinese medicine speech input method and system based on semantic perception and dynamic syndrome differentiation reasoning. Background Art

[0002] Currently, the input of traditional Chinese medicine in the field of medical informatization mainly relies on the following three types of technologies. The first type: general speech recognition input: using a general medical speech recognition engine to convert the doctor's oral content into text, and then extracting the names of traditional Chinese medicines through keyword matching. This is the implementation method of most traditional Chinese medicine electronic medical record systems at present. The second type: speech recognition enhanced by a static thesaurus: on the basis of general speech recognition, a traditional Chinese medicine noun dictionary is pre - loaded in advance to improve the recognition priority of the names of traditional Chinese medicines. Some systems will perform post - verification in combination with basic medication taboo rules. The third type: an independent syndrome differentiation assistance system. The system recommends possible traditional Chinese medicine prescriptions according to the patient's symptoms, tongue and pulse information, etc. through a rule engine or a machine learning model, and the doctor can manually select and input.

[0003] Among them, the existing traditional Chinese medicine input technologies have the following deficiencies: (1) It is difficult to distinguish homophonic confusions. There are a large number of homophonic and near - homophonic words in the names of traditional Chinese medicines (such as "Clematidis Radix" and "Epimedii Herba", "Forsythiae Fructus" and "Lianzhao", "Poria" and "Polyporus", etc.). It is difficult to accurately distinguish them solely relying on the acoustic model, resulting in a high input error rate. (2) It is divorced from the clinical syndrome differentiation context. The existing speech recognition process is completely independent of the patient's medical record information, simply converting sound into text mechanically. When multiple acoustic candidate words are recognized, the system cannot determine which traditional Chinese medicine conforms to the "syndrome" and "treatment principles and methods" of the current patient, and can only rely on the doctor's manual verification. Therefore, due to the above - mentioned deficiencies, how to provide a traditional Chinese medicine speech input method based on semantic perception and dynamic syndrome differentiation reasoning with high accuracy has become an urgent problem to be solved. Summary of the Invention

[0004] The purpose of the present invention is to provide a traditional Chinese medicine speech input method and system based on semantic perception and dynamic syndrome differentiation reasoning, so as to solve the problems of difficult distinction of homophonic confusions and low accuracy of traditional Chinese medicine speech input caused by being divorced from the clinical syndrome differentiation context in the prior art.

[0005] To achieve the above purpose, the present invention adopts the following technical solutions: In the first aspect, a traditional Chinese medicine speech input method based on semantic perception and dynamic syndrome differentiation reasoning is provided, including: Obtain traditional Chinese medicine speech input data and the electronic medical record text of the current user being questioned; Named entity recognition is performed on the electronic medical record text to obtain TCM syndrome differentiation element information. Based on the TCM syndrome differentiation element information, knowledge retrieval is performed in the Chinese herbal medicine knowledge graph to obtain the Chinese herbal medicine names that match the TCM syndrome differentiation element information. In order to use the obtained Chinese herbal medicine names to form a dynamic syndrome differentiation drug pool. The traditional Chinese medicine voice input data is subjected to speech recognition to obtain an acoustic candidate word sequence, and the acoustic candidate word sequence is expanded with traditional Chinese medicine confusion words to obtain a traditional Chinese medicine candidate set; The names of Chinese medicines in the dynamic syndrome differentiation drug pool and the Chinese medicine candidate set are used as candidate Chinese medicines, and the semantic matching score between each candidate Chinese medicine and the information of the Chinese medicine syndrome differentiation elements is calculated. Based on the semantic matching score of each candidate Chinese medicine, the real Chinese medicine name corresponding to the Chinese medicine voice input data is determined from all candidate Chinese medicines.

[0006] Based on the aforementioned disclosures, this invention identifies TCM diagnostic elements in electronic medical records and dynamically constructs a "diagnostic medicine pool" by combining it with a TCM knowledge graph. This allows the speech recognition process to move beyond mechanical reliance on acoustic models and integrate into the clinical diagnostic context. Simultaneously, this invention expands the acoustic candidate word sequence for speech recognition with TCM-related confusing words, generating a more comprehensive set of TCM candidates. This set is then combined with the diagnostic medicine pool to generate candidate TCMs. Next, the semantic matching score between each candidate TCM and the diagnostic elements is calculated, and based on this, the actual TCM name corresponding to the TCM speech input data is determined. Therefore, this invention avoids mechanical recognition detached from syndromes and treatment principles, and semantic matching effectively distinguishes homophones or near-homophones that can be confused with TCMs. This reduces the input error rate, decreases the burden of manual verification for doctors, and significantly improves the accuracy and intelligence of TCM speech input in electronic medical record systems.

[0007] In one possible design, the TCM syndrome differentiation element information includes: syndrome information and symptom information, wherein the semantic matching score between each candidate Chinese herbal medicine and the TCM syndrome differentiation element information is calculated, including: Obtain a heterogeneous graph network based on syndrome differentiation and traditional Chinese medicine, wherein the heterogeneous graph network contains traditional Chinese medicine nodes, efficacy nodes, syndrome nodes and symptom nodes, and the edges between nodes represent the association weights between nodes. From the heterogeneous graph network, the syndrome nodes corresponding to the syndrome information and the symptom nodes corresponding to the symptom information are determined, and are respectively used as target syndrome nodes and target symptom nodes. Each candidate Chinese medicine is used as a candidate node, and the optimal association path between each candidate node and each target syndrome node, as well as the optimal association path between each candidate node and each target symptom node, is determined from the heterogeneous graph network. By utilizing the optimal association path between each candidate node and each target syndrome node, as well as the optimal association path between each candidate node and each target symptom node, the semantic matching score between each candidate Chinese medicine and the TCM syndrome differentiation element information is calculated.

[0008] In one possible design, the optimal association path between each candidate node and each target symptom node is determined from the heterogeneous graph network, including: For any candidate node, determine the shortest path from the heterogeneous graph network to any target symptom node; Determine if the number of shortest paths is greater than 1; If so, calculate the total weight of each shortest path, where the total weight of any shortest path is the product of the association weights between the nodes in that shortest path. The shortest path with the largest total weight is taken as the optimal association path between any candidate node and any target syndrome node. After all target syndrome nodes have been queried, the optimal association path between any candidate node and each target syndrome node is obtained.

[0009] In one possible design, the semantic matching score between each candidate herb and each target syndrome node is calculated using the optimal association path between each candidate node and each target symptom node, as well as the optimal association path between each candidate herb and each target symptom node. This includes: For any candidate node, calculate the first path weight of the optimal association path between the candidate node and each target symptom node, and the second path weight of the optimal association path between the candidate node and each target symptom node; Summing the weights of each first path and each second path yields the initial semantic matching score between any candidate node and the TCM syndrome differentiation element information. The initial semantic matching score is normalized to obtain the semantic matching score between any candidate node and the TCM syndrome differentiation element information.

[0010] In one possible design, the acoustic candidate word sequence is expanded with Chinese medicine (TCM) confusion words to obtain a TCM candidate set, including: Part-of-speech tagging is performed on the acoustic candidate word sequence to obtain acoustic candidate words that belong to nouns in the acoustic candidate word sequence, and the acoustic candidate words that belong to nouns are used as target words; Retrieve similar Chinese medicines corresponding to the target word from the Chinese medicine pronunciation similarity database; The candidate set of traditional Chinese medicines is formed by using the acoustic candidate word sequence and the similar traditional Chinese medicines corresponding to the target word.

[0011] In one possible design, when knowledge retrieval is performed in the Chinese herbal medicine knowledge graph based on the TCM syndrome differentiation elements information to obtain the Chinese herbal medicine names that match the TCM syndrome differentiation elements information, the graph confidence of the Chinese herbal medicine names that match the TCM syndrome differentiation elements information is also obtained at the same time. The process of performing voice recognition on the recorded Chinese medicine voice data includes: Feature extraction was performed on the voice input data of traditional Chinese medicine to obtain voice features; The speech features are input into the speech recognition model to obtain the acoustic candidate word sequence, and at the same time, the speech confidence of each acoustic candidate word in the acoustic candidate word sequence is obtained.

[0012] In one possible design, the candidate Chinese medicine includes acoustic candidate words in the acoustic candidate word sequence, similar Chinese medicines corresponding to the acoustic candidate words, and syndrome differentiation Chinese medicines in the dynamic syndrome differentiation medicine pool, and the similar Chinese medicines corresponding to each acoustic candidate word are obtained by expanding the acoustic candidate word sequence with Chinese medicine confusion words; Specifically, based on the semantic matching score of each candidate traditional Chinese medicine (TCM), the actual TCM name corresponding to the TCM voice input data is determined from all candidate TCMs, including: Obtain the acoustic model score corresponding to each candidate Chinese medicine. If any candidate Chinese medicine is an acoustic candidate word, the acoustic model score of that candidate Chinese medicine is the speech confidence of the corresponding acoustic candidate word. If any candidate Chinese medicine is a syndrome differentiation Chinese medicine, the acoustic model score of that candidate Chinese medicine is the spectrum confidence of the corresponding syndrome differentiation Chinese medicine. If any candidate Chinese medicine is a similar Chinese medicine to the acoustic candidate word, the Viterbi forced alignment algorithm is used to determine the acoustic model score of that candidate Chinese medicine. The acoustic model score and semantic matching score corresponding to each candidate Chinese medicine are weighted and summed to obtain the comprehensive confidence score of each candidate Chinese medicine. From all candidate traditional Chinese medicines, the candidate with the highest overall confidence level is selected as the pre-selected traditional Chinese medicine; Determine whether the overall confidence level of the pre-selected Chinese medicine is greater than or equal to the first threshold; If so, the name of the pre-selected Chinese medicine will be used as the actual name of the Chinese medicine and entered into the system.

[0013] In one possible design, determining whether the overall confidence level of the pre-selected traditional Chinese medicine is greater than or equal to a first threshold includes: If not, then determine whether the overall confidence level is between the second threshold and the first threshold, wherein the second threshold is less than the first threshold; If yes, a TCM confirmation prompt message is output, and in response to the TCM confirmation interactive operation, the name of the pre-selected TCM is used as the actual TCM name; otherwise, a re-entry prompt message is output or a candidate list is generated for visual display, wherein the candidate list contains all candidate TCMs.

[0014] In one possible design, the method further includes: Record the interactive data generated during each instance of traditional Chinese medicine (TCM) voice input. This interactive data includes the voice features corresponding to the TCM voice input data and the identified actual TCM name. By utilizing interactive data, the speech recognition model is incrementally trained to achieve feedback optimization.

[0015] Secondly, a voice input system for traditional Chinese medicine based on semantic perception and dynamic dialectical reasoning is provided, including: The acquisition unit is used to acquire voice input data for traditional Chinese medicine and the electronic medical record text of the current patient. The dynamic syndrome differentiation drug pool generation unit is used to perform named entity recognition on electronic medical record text to obtain TCM syndrome differentiation element information, and based on the TCM syndrome differentiation element information, to perform knowledge retrieval in the TCM knowledge graph to obtain TCM names that match the TCM syndrome differentiation element information, so as to use the obtained TCM names to form a dynamic syndrome differentiation drug pool. An acoustic decoding unit is used to perform speech recognition on the Chinese medicine speech input data to obtain an acoustic candidate word sequence, and to expand the acoustic candidate word sequence with Chinese medicine confusion words to obtain a Chinese medicine candidate set; The semantic matching unit is used to take the names of Chinese medicines in the dynamic syndrome differentiation drug pool and the Chinese medicine candidate set as candidate Chinese medicines, and calculate the semantic matching score between each candidate Chinese medicine and the information of the Chinese medicine syndrome differentiation elements. The input unit is used to determine the real Chinese medicine name corresponding to the Chinese medicine voice input data from all candidate Chinese medicines based on the semantic matching score of each candidate Chinese medicine.

[0016] Thirdly, a traditional Chinese medicine voice input device based on semantic perception and dynamic dialectical reasoning is provided. Taking the device as an electronic device as an example, it includes a memory, a processor, and a transceiver that are connected in sequence. The memory is used to store computer programs, the transceiver is used to send and receive messages, and the processor is used to read the computer programs and execute the traditional Chinese medicine voice input method based on semantic perception and dynamic dialectical reasoning as described in the first aspect or any possible design of the first aspect.

[0017] Fourthly, a storage medium is provided, on which instructions are stored, which, when executed on a computer, perform the traditional Chinese medicine voice input method based on semantic perception and dynamic dialectical reasoning as described in the first aspect or any possible design of the first aspect.

[0018] Fifthly, a computer program product containing instructions is provided, which, when executed on a computer, causes the computer to perform the Chinese medicine voice input method based on semantic perception and dynamic dialectical reasoning as described in the first aspect or any possible design of the first aspect.

[0019] Beneficial effects: (1) This invention identifies the TCM syndrome differentiation elements in electronic medical records and dynamically constructs a "syndrome differentiation drug pool" by combining it with a TCM knowledge graph. This makes the speech recognition process no longer mechanically dependent on acoustic models, but integrated into the clinical syndrome differentiation context. At the same time, this invention expands the TCM confusion words in the acoustic candidate word sequence of speech recognition to generate a more comprehensive TCM candidate set. Then, it combines the TCM confusion drug pool with the candidate TCM drugs to generate candidate TCM drugs. Next, the semantic matching score of each candidate TCM drug with the syndrome differentiation elements is calculated, and based on this, the real TCM drug name corresponding to the TCM speech input data is determined. Thus, this invention avoids mechanical recognition that is detached from syndromes and treatment principles, and can effectively distinguish TCM drugs that are confused by homophones or near-homophones based on semantic matching. This reduces the input error rate and the burden of manual verification for doctors, thereby significantly improving the accuracy and intelligence level of TCM speech input in electronic medical record systems.

[0020] (2) The present invention designs a three-level confidence threshold strategy, which can balance automation and accuracy. That is, in the high confidence scenario, fully automatic data entry is achieved, in the medium confidence scenario, intelligent interactive confirmation and recommendation is provided, and in the low confidence scenario, a candidate list is displayed or a prompt for re-entry is given. In this way, the time for doctors to manually correct errors and input on the keyboard is reduced, and the continuity of the diagnosis and treatment ideas is maintained.

[0021] (3) This invention has incremental learning capability, realizes the adaptive learning and continuous optimization of the system, making the system more and more intelligent as it is used, gradually adapting to the accent characteristics of doctors and forming a personalized experience. Attached Figure Description

[0022] Figure 1 A flowchart illustrating the steps of the traditional Chinese medicine voice input method based on semantic perception and dynamic dialectical reasoning provided in an embodiment of the present invention; Figure 2 A structural diagram of the Traditional Chinese Medicine Voice Input System based on Semantic Perception and Dynamic Dialectical Reasoning provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in conjunction with the accompanying drawings and descriptions of the embodiments or the prior art. Obviously, the following description of the structure of the accompanying drawings is only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. It should be noted that the description of these embodiments is for the purpose of helping to understand the present invention, but does not constitute a limitation of the present invention.

[0024] It should be understood that although the terms first, second, etc., may be used herein to describe various units, these units should not be limited by these terms. These terms are only used to distinguish one unit from another. For example, a first unit may be referred to as a second unit, and similarly, a second unit may be referred to as a first unit, without departing from the scope of the exemplary embodiments of the invention.

[0025] It should be understood that the term "and / or" that may appear in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, B exists alone, and A and B exist simultaneously. The term " / and" that may appear in this document describes another relationship between related objects, indicating that two relationships can exist. For example, A / and B can mean: A exists alone, and A and B exist alone. In addition, the character " / " that may appear in this document generally indicates that the related objects before and after it are in an "or" relationship.

[0026] Example: See Figure 1 As shown, the Chinese medicine voice input method based on semantic perception and dynamic dialectical reasoning provided in the first aspect of this embodiment can be executed by a computer device with certain computing resources, but is not limited to. For example, the computer device can be, but is not limited to, a server, an edge computer, or a personal computer (PC, which refers to a multi-purpose computer of a size, price, and performance suitable for personal use; desktop computers, laptops, mini-laptops, tablets, and ultrabooks are all personal computers), a smartphone, or a personal digital assistant (PDA). It is understood that the aforementioned execution subject does not constitute a limitation on the embodiments of this application. Accordingly, the operation steps of this method can be, but are not limited to, the steps S1 to S5 below.

[0027] S1. Acquire the voice input data for traditional Chinese medicine and the electronic medical record text of the current patient. In specific applications, step S1 is a multimodal data acquisition process. For example, but not limited to, acquiring the doctor's spoken voice stream through a microphone array, and then using endpoint detection technology to remove ambient noise in the consultation room to obtain the voice input data for traditional Chinese medicine. At the same time, the electronic medical record text of the current patient can be read in real time from the medical information system (HIS) to complete the acquisition of multimodal data. Optionally, the electronic medical record text may include, but is not limited to, the current patient's chief complaint, present medical history, tongue and pulse examination, diagnosis results, treatment principles and methods, etc.

[0028] Thus, after obtaining multimodal data, medical record semantic understanding and dynamic diagnostic drug pool generation can be performed first, as shown in step S2 below.

[0029] S2. Named entity recognition is performed on the electronic medical record text to obtain TCM syndrome differentiation element information. Based on the TCM syndrome differentiation element information, knowledge retrieval is performed in the Chinese herbal medicine knowledge graph to obtain the Chinese herbal medicine names that match the TCM syndrome differentiation element information. The obtained Chinese herbal medicine names are then used to form a dynamic syndrome differentiation drug pool. In specific implementation, the TCM syndrome differentiation element information may include, but is not limited to, syndrome information (such as wind-cold binding the lungs), treatment principles and methods (such as dispelling wind and cold), and symptom information (such as cough and aversion to cold). Thus, after extracting the aforementioned TCM syndrome differentiation element information, the aforementioned element information can be used as query conditions to search in the preset Chinese herbal medicine knowledge graph (which contains multi-dimensional association information of Chinese herbal medicine-efficacy-syndrome-symptom), thereby obtaining the Chinese herbal medicine names that match the TCM syndrome differentiation element information.

[0030] Furthermore, during knowledge graph retrieval, the confidence score of the Chinese medicine names that match the TCM syndrome differentiation elements information will also be obtained. This confidence score can be, but is not limited to, the similarity between the vector corresponding to the TCM syndrome differentiation elements information and the multidimensional association information vectors of efficacy, syndromes and symptoms of each Chinese medicine in the Chinese medicine knowledge graph. Of course, knowledge graph retrieval and the generation of corresponding confidence scores are common knowledge retrieval techniques, and their principles will not be elaborated here.

[0031] After obtaining the names of Chinese medicines that match the information of TCM syndrome differentiation elements, and forming a dynamic syndrome differentiation drug pool based on this, acoustic decoding and multi-candidate generation can be performed, as shown in step S3 below.

[0032] S3. Perform speech recognition on the Chinese medicine speech input data to obtain an acoustic candidate word sequence, and expand the acoustic candidate word sequence with Chinese medicine confusion words to obtain a Chinese medicine candidate set; in specific implementation, for example, but not limited to, first extracting features from the Chinese medicine speech input data to obtain speech features; then, inputting the speech features into the speech recognition model to obtain the acoustic candidate word sequence; at the same time, when the speech recognition model outputs each acoustic candidate word, it also outputs the speech confidence of each acoustic candidate word so as to select candidate words based on the speech confidence.

[0033] Examples of speech features include, but are not limited to, MFCC (Mel-frequency cepstral coefficients) features, fundamental frequency, formants, etc., and examples of using the Whisper model (an open-source speech recognition model) as a speech recognition model include, but are not limited to, using the Whisper model.

[0034] Thus, after the speech recognition model generates several acoustic candidate words, this embodiment also performs confusion word expansion, that is, expansion of homophones and near-homophones, the process of which is shown in steps S31 to S33 below.

[0035] S31. Perform part-of-speech recognition on the acoustic candidate word sequence to obtain acoustic candidate words that belong to nouns in the acoustic candidate word sequence, and take the acoustic candidate words that belong to nouns as target words; In this embodiment, for the noun components in the recognition results, a Chinese medicine confusion set will be automatically triggered, that is, the noun components are usually Chinese medicine names. Therefore, expanding the confusion words for Chinese medicine names can generate a more comprehensive Chinese medicine candidate set.

[0036] The process of expanding the confusing terms in the names of Chinese medicines is shown in step S32 below.

[0037] S32. Retrieve similar Chinese medicines corresponding to the target word from the Chinese medicine pronunciation similarity database. In specific applications, the Chinese medicine pronunciation similarity database stores all Chinese medicine names with similar pronunciations corresponding to each Chinese medicine name. Thus, this database is equivalent to a huge "dictionary of similar-sounding words," recording which medicine names may have similar pronunciations for each medicine name. Therefore, in actual use, it is only necessary to match the target word in the database to obtain the corresponding Chinese medicine names with similar pronunciations, thereby identifying similar Chinese medicines. For example, if "fuling" is acoustically identified, all medicine names with similar pronunciations corresponding to "fuling" will be quickly found from this database, such as Zhu Ling (similar pronunciation) and Fu Ling (miswritten). Of course, the above examples are just examples, and this embodiment is not limited to this.

[0038] After obtaining similar Chinese medicines to the target word, the original acoustic candidate word sequence can be combined to form a candidate set of Chinese medicines, as shown in step S33 below.

[0039] S33. Using the acoustic candidate word sequence and the similar Chinese medicines corresponding to the target word, form the Chinese medicine candidate set.

[0040] After completing the expansion of Chinese medicine confusing terms and obtaining the Chinese medicine candidate set through the aforementioned steps S31 to S33, the dynamic syndrome differentiation drug pool obtained in the aforementioned step S2 can be combined with the Chinese medicine syndrome differentiation element information for semantic matching, so as to screen the Chinese medicine name based on the semantic matching score; wherein, the semantic matching process is as shown in step S4 below.

[0041] S4. The names of Chinese medicines in the dynamic syndrome differentiation drug pool and the Chinese medicine candidate set are used as candidate Chinese medicines, and the semantic matching score between each candidate Chinese medicine and the information of the Chinese medicine syndrome differentiation elements is calculated. In specific applications, the candidate Chinese medicines actually include three types of Chinese medicine names. The first type is each acoustic candidate word in the acoustic candidate word sequence; the second type is similar Chinese medicines corresponding to the acoustic candidate words; and the third type is syndrome differentiation Chinese medicines in the dynamic syndrome differentiation drug pool. Thus, this embodiment uses a pre-constructed heterogeneous graph network of syndrome differentiation and Chinese medicines to calculate the semantic matching score between each candidate Chinese medicine and the information of the Chinese medicine syndrome differentiation elements.

[0042] The specific calculation process of the semantic matching score can be, but is not limited to, the steps S41 to S44 below.

[0043] S41. Obtain a heterogeneous graph network based on syndrome differentiation and traditional Chinese medicine, wherein the heterogeneous graph network contains traditional Chinese medicine nodes, efficacy nodes, syndrome nodes and symptom nodes, and the edges between nodes represent the association weights between nodes.

[0044] In this embodiment, the heterogeneous graph network is pre-built, and its construction process can be, but is not limited to, as follows: Step 1: Identify "nodes," which involves collecting four types of node information. Data can be collected from three sources, but is not limited to: TCM classics (such as the *Shanghan Lun*), clinical guidelines and textbooks, and historical prescription data. Then, extract four types of key information from these three sources to serve as nodes in the diagram. These four types of key information are: TCM herb nodes (e.g., ephedra, cinnamon twig, poria, and polyporus umbellatus, each herb is a node), efficacy nodes (e.g., sweating to relieve exterior syndromes, warming and unblocking meridians, promoting diuresis and eliminating dampness, each efficacy is a node), syndrome nodes (e.g., wind-cold common cold, cold stagnation and blood stasis, spleen deficiency and dampness, each syndrome is a node), and symptom nodes (e.g., cough, fever, chills, and difficulty urinating, each symptom is a node).

[0045] Optionally, the following example illustrates the aforementioned four types of nodes: Traditional Chinese Medicine (TCM) components: {Ephedra, Cinnamon Twig, Poria, Polyporus, ...} Efficacy points: {Induces sweating to relieve exterior syndromes, warms and unblocks meridians, promotes diuresis and eliminates dampness, ...} Syndrome nodes: {Wind-cold binding the lungs, cold congealing blood stasis, spleen deficiency with dampness accumulation, ...} Symptom nodes: {cough, fever, chills, edema, ...}.

[0046] Of course, the examples mentioned above are merely illustrative, and this embodiment is not limited thereto.

[0047] After obtaining the four types of nodes, the associated edges between the nodes can be established, as shown in the second step below.

[0048] Step 2: Establish the edges that connect the nodes.

[0049] In this embodiment, three types of relationships can be configured, including but not limited to: Traditional Chinese Medicine-Efficacy Relationship: What is the efficacy of a certain herb, for example: Ephedra—inducing sweating and relieving exterior syndromes; Poria—promoting diuresis and eliminating dampness, strengthening the spleen; Efficacy-Syndrome Relationship: What syndrome does a certain efficacy mainly treat, for example: Inducing sweating and relieving exterior syndromes—wind-cold binding the lungs; warming and unblocking the meridians—cold stagnation and blood stasis; Syndrome-Symptom Relationship: What symptoms does a certain syndrome manifest, for example: wind-cold binding the lungs—cough, chills, fever; spleen deficiency and dampness accumulation—poor appetite, loose stools, edema.

[0050] Thus, by using the relationships between Chinese medicine and efficacy, efficacy and syndrome, and syndrome and symptom, the associated edges between each node can be determined. That is, for any two nodes, as long as the two nodes satisfy any one of the aforementioned three relationships, an associated edge can be used to connect the two nodes.

[0051] After establishing the connections between nodes, weights can be assigned to the connections, as shown in step three below.

[0052] Step 3: Assign association weights to the edges that connect nodes.

[0053] In practice, this association weight comes from statistical data. For example, the association weight between Chinese medicine nodes comes from the frequency of classical texts. For instance, in the "Treatise on Cold Damage", the combination of "Ephedra" and "Cinnamon Twig" to treat "wind-cold" appears 50 times. Therefore, the association weight of the Ephedra-Cinnamon Twig pairing is high. (The total number of pairings of Ephedra with different Chinese medicines can be counted. Then, the number of pairings of Ephedra with any Chinese medicine can be divided by the total number to obtain the association weight. For example, the number of times "Ephedra" is paired with "Cinnamon Twig" can be divided by the total number of pairings to obtain its corresponding association weight.)

[0054] For example, association weights can be derived from clinical guidelines and textbooks: in modern guidelines, "Poria cocos" is the first choice for treating "spleen deficiency edema," so the association weight of the Poria cocos-spleen deficiency and dampness path is set to 0.9. At the same time, association weights can also be derived from the co-occurrence frequency in historical prescriptions. For example, in 100,000 historical prescriptions, 80% of cases with "wind-cold binding the lungs" used "Ephedra," so the association weight of the Ephedra-wind-cold binding the lungs indirect path is high and can be set to 0.8.

[0055] Thus, based on the aforementioned method, after determining the weights of the edges connecting nodes, all nodes and weighted edges can be combined to obtain the aforementioned heterogeneous graph network.

[0056] After obtaining the heterogeneous graph network, the semantic matching score between the syndrome node set and symptom node set corresponding to the current medical record of each candidate Chinese medicine can be calculated based on it. The process is shown in steps S42 to S44 below.

[0057] S42. From the heterogeneous graph network, determine the syndrome node corresponding to the syndrome information and the symptom node corresponding to the symptom information, and use them as the target syndrome node and target symptom node, respectively. In this embodiment, the syndrome information and symptom information in the electronic pathology text of the current user have been identified. Therefore, in practical applications, it is necessary to determine the nodes corresponding to the syndrome information and symptom information in the heterogeneous graph network so that the semantic matching score can be calculated based on the association edge between the node where the candidate Chinese medicine is located and the node corresponding to the syndrome information and symptom information. The process is shown in steps S43 and S44 below.

[0058] S43. Each candidate Chinese medicine is taken as a candidate node, and the optimal association path between each candidate node and each target syndrome node, as well as the optimal association path between each candidate node and each target symptom node, is determined from the heterogeneous graph network. In specific applications, the process of determining the optimal association path between any candidate node and each target syndrome node is illustrated by taking any candidate node as an example, as shown in the following steps S43a to S43d.

[0059] S43a. For any candidate node, determine the shortest path from the heterogeneous graph network to any target symptom node; in this embodiment, the shortest path is the path with the fewest associated edges in the heterogeneous graph network from the candidate node to the target symptom node.

[0060] After obtaining the shortest path, it can be determined whether the number of shortest paths is greater than 1, as shown in step S43b below.

[0061] S43b. Determine whether the number of shortest paths is greater than 1; In this embodiment, if the number of shortest paths is greater than 1 (i.e., there are multiple shortest paths of the same length), then it is necessary to calculate the total weight of the paths so that the path selection can be performed based on the calculated total weight. The process is shown in step S43c below.

[0062] S43c. If so, calculate the total weight of each shortest path, where the total weight of any shortest path is the product of the weights of each node in that shortest path; in practice, the total weight reflects the association strength, so by multiplying the association weights of each node on each shortest path (i.e., the association weights corresponding to each edge), the total weight of each shortest path can be obtained.

[0063] If the syndrome node is "wind-cold binding the lungs" and the symptom node is "cough", and any candidate node is Poria cocos, then a shortest path is: Poria cocos → Spleen strengthening → Spleen deficiency and dampness → Cough (the association weights of the three edges are 0.9, 0.8, and 0.9 respectively). Then, the total weight of the shortest path is: 0.9 × 0.8 × 0.9 = 0.648. Of course, the above example is for illustration only, and this embodiment is not limited to this.

[0064] After calculating the total weight of each shortest path, the optimal association path between any candidate node and any target symptom node can be determined based on this, as shown in step S43d below.

[0065] S43d. The shortest path with the largest total weight is taken as the optimal association path between any candidate node and any target syndrome node. After all target syndrome nodes have been polled, the optimal association path between any candidate node and each target syndrome node is obtained. In this embodiment, if there is only one shortest path, the shortest path is directly taken as the optimal association path.

[0066] After calculating the optimal association path between any candidate node and each target symptom node through the aforementioned steps S43a to S43d, the optimal association path between any candidate node and each target symptom node can be calculated in the same way. Of course, the process of determining the optimal association path between each of the other candidate nodes and the target symptom nodes and target symptom nodes is also the same, and will not be repeated here.

[0067] After obtaining the optimal association path between each candidate node and each target syndrome node and each target symptom node, the semantic matching score can be calculated based on this, as shown in step S44 below.

[0068] S44. Using the optimal association paths between each candidate node and each target syndrome node, as well as the optimal association paths between each candidate node and each target symptom node, calculate the semantic matching scores between each candidate traditional Chinese medicine and the information of traditional Chinese medicine syndrome differentiation elements; in this embodiment, for any candidate node, for example, but not limited to, first calculate the first path weight of the optimal association path between the any candidate node and each target syndrome node, and the second path weight of the optimal association path between the any candidate node and each target symptom node; then, sum up each first path weight and each second path weight to obtain the initial semantic matching score between the any candidate node and the information of traditional Chinese medicine syndrome differentiation elements; finally, perform normalization processing on the initial semantic matching score, and then the semantic matching score between the any candidate node and the information of traditional Chinese medicine syndrome differentiation elements can be obtained.

[0069] It should be noted that: the calculation methods of the first path weight and the second path weight of the aforementioned optimal association path are the same as the calculation method of the total weight of the shortest path, which will not be elaborated here; at the same time, if there is no reachable path between the candidate node and the target syndrome node, at this time, the first path weight of the optimal association path between the candidate node and the target syndrome node is 0; of course, the second path weight is the same.

[0070] In this way, sum up each first path weight and each second path weight, and then the initial semantic matching score between the any candidate node and the information of traditional Chinese medicine syndrome differentiation elements can be obtained; if the any candidate node is: Ephedra, and the optimal association paths with the target symptom node and the target syndrome node are: Ephedra → inducing sweating and relieving exterior syndrome → wind-cold attacking the lung (0.98×0.95 = 0.931); Ephedra → dispersing lung qi and relieving cough → cough (0.9×0.92 = 0.828), then, the initial semantic matching score between the any candidate node and the information of traditional Chinese medicine syndrome differentiation elements is: 0.931 + 0.828 = 1.759.

[0071] The following gives an inference example of semantic matching based on the heterogeneous graph network: Even if "Polyporus" is closer to the pronunciation of "fuling" acoustically, but if the current medical record shows that the patient has no "retention of dampness in the interior" and has "cough", the graph network will find that the semantic distance between "Polyporus" and the medical record is extremely far, thus pulling down its score; on the contrary, "Poria" has a strong association with "spleen deficiency" (often accompanied by cough), and the score increases; therefore, based on this semantic matching, confusing words can be effectively distinguished.

[0072] After calculating the initial semantic matching scores between all candidate nodes and the information of traditional Chinese medicine syndrome differentiation elements, use the maximum-minimum normalization method to perform normalization processing on each initial semantic matching score, and then the semantic matching scores between each candidate node and the information of traditional Chinese medicine syndrome differentiation elements can be obtained.

[0073] Therefore, after calculating the semantic matching score between each candidate node and the TCM diagnostic element information through the aforementioned steps S41 to S44, the selection of Chinese medicine names can be based on this, as shown in step S5 below.

[0074] S5. Based on the semantic matching score of each candidate Chinese medicine, determine the real Chinese medicine name corresponding to the Chinese medicine voice input data from all candidate Chinese medicines; in specific applications, for example, but not limited to, the following steps S51 to S55 can be used to determine the real Chinese medicine name.

[0075] S51. Obtain the acoustic model score corresponding to each candidate Chinese medicine. If any candidate Chinese medicine is an acoustic candidate word, the acoustic model score of that candidate Chinese medicine is the speech confidence of the corresponding acoustic candidate word. If any candidate Chinese medicine is a syndrome differentiation Chinese medicine, the acoustic model score of that candidate Chinese medicine is the spectrum confidence of the corresponding syndrome differentiation Chinese medicine. If any candidate Chinese medicine is a similar Chinese medicine to the acoustic candidate word, the Viterbi forced alignment algorithm is used to determine the acoustic model score of that candidate Chinese medicine.

[0076] In this embodiment, when any candidate Chinese medicine is a similar Chinese medicine, the calculation process of its acoustic model score is as follows: First, obtain the standard phoneme sequence of the candidate Chinese medicine (e.g., Zhu Ling → zh ul ing); then, extract features from the Chinese medicine speech input data to obtain speech features; finally, use the Viterbi forced alignment algorithm to perform Viterbi forced alignment on the standard phoneme sequence and speech features, so as to obtain the acoustic likelihood between the standard phoneme sequence and speech features after Viterbi forced alignment; thus, the acoustic likelihood can be used as the acoustic model score of the candidate Chinese medicine.

[0077] It should be noted that the principle of using the Viterbi forced alignment algorithm to calculate the acoustic likelihood of speech feature sequences and specific phoneme sequences is as follows: the optimal state path is found through Viterbi dynamic programming, and the cumulative probability (log-likelihood) under this path is calculated as the matching score between the phoneme sequence and the speech signal. Of course, the Viterbi forced alignment algorithm is a commonly used technique for calculating the acoustic likelihood of speech feature sequences and phoneme sequences, and its process will not be elaborated here.

[0078] After obtaining the acoustic model score of each candidate Chinese medicine, the comprehensive confidence of each candidate Chinese medicine can be calculated by combining its corresponding semantic matching score, as shown in step S52 below.

[0079] S52. The acoustic model score and semantic matching score corresponding to each candidate Chinese medicine are weighted and summed to obtain the comprehensive confidence of each candidate Chinese medicine. In specific implementation, the weights of the acoustic model score and semantic matching score can be set to 0.6 and 0.4, respectively. Of course, the weights can be adaptively adjusted according to the signal-to-noise ratio environment. This embodiment is not limited to the above example.

[0080] Thus, after calculating the overall confidence level of each candidate Chinese medicine, different data entry strategies can be adopted based on the overall confidence level, as shown in steps S53 to S55 below.

[0081] S53. From all candidate traditional Chinese medicines, select the candidate traditional Chinese medicine with the highest overall confidence level as the pre-selected traditional Chinese medicine.

[0082] S54. Determine whether the overall confidence level of the pre-selected medicine is greater than or equal to the first threshold. In this embodiment, the first threshold can be, but is not limited to, set to 0.9. Therefore, when the overall confidence level of the pre-selected medicine is greater than or equal to 0.9, it is a high confidence level and can be directly entered into the system without the need for doctor intervention. The process is shown in step S55 below.

[0083] S55. If so, the name of the pre-selected Chinese medicine is used as the actual name of the Chinese medicine, and the Chinese medicine is entered into the system.

[0084] In this embodiment, if the overall confidence level of the pre-selected Chinese medicine is less than the first threshold, it is necessary to determine whether the overall confidence level is between the second threshold and the first threshold; wherein, the second threshold is less than the first threshold, and the second threshold is set to 0.6.

[0085] If the overall confidence level of the pre-selected Chinese medicine is between [0.6, 0.9), it is considered to have medium confidence and requires interactive confirmation. That is, the system outputs a confirmation prompt message for the Chinese medicine (such as: Is the Chinese medicine you mentioned xx? Based on the current diagnosis (wind-cold binding the lungs), we recommend xx Chinese medicine?). Then, in response to the interactive operation of confirming the Chinese medicine, the system can use the name of the pre-selected Chinese medicine as the actual name of the Chinese medicine and enter the Chinese medicine information.

[0086] Optionally, for example, the traditional Chinese medicine confirmation interaction can be, but is not limited to, responding to a voice confirmation interaction command or a confirmation button interaction. In this way, when responding to the traditional Chinese medicine confirmation interaction, the voice input data can be entered into the corresponding real name of the traditional Chinese medicine.

[0087] Furthermore, when the overall confidence level of the pre-selected Chinese medicine is less than the second threshold, a prompt message for re-entry (such as asking the doctor to repeat the name of the medicine) is output to prompt the doctor to re-enter the voice, or a candidate list is generated for visual display so that the user can manually select it; wherein, the candidate list contains all candidate Chinese medicines.

[0088] Thus, through the aforementioned steps S51 to S55, the actual Chinese medicine name corresponding to the Chinese medicine voice input data can be determined based on the semantic matching score, thereby achieving accurate input of Chinese medicine voice.

[0089] In addition, this embodiment also includes a reinforcement learning mechanism, namely: the system records the interaction data generated each time the traditional Chinese medicine voice is entered (the interaction data includes the voice features corresponding to the voice data of the traditional Chinese medicine and the determined real name of the traditional Chinese medicine); then, the interaction data is used to incrementally train the speech recognition model (incremental training can be performed using mini-batch gradient descent), thereby completing the feedback optimization of the speech recognition model, so that the model gradually adapts to the doctor's accent characteristics, in order to form a personalized closed-loop optimization.

[0090] Therefore, through the semantic perception and dynamic dialectical reasoning-based Chinese medicine voice input method described in detail in steps S1 to S5 above, this invention avoids mechanical recognition that is detached from syndromes and treatment principles, and can effectively distinguish Chinese medicines that are confused by homophones or near-homophones. In this way, the input error rate is reduced, the burden of manual verification by doctors is reduced, and the accuracy and intelligence level of Chinese medicine voice input in electronic medical record system are significantly improved.

[0091] like Figure 2 As shown, the second aspect of this embodiment provides a hardware system for implementing the traditional Chinese medicine voice input method based on semantic perception and dynamic dialectical reasoning described in the first aspect of the embodiment, comprising: The acquisition unit is used to acquire voice input data for traditional Chinese medicine and the electronic medical record text of the current user seeking medical advice.

[0092] The dynamic syndrome differentiation drug pool generation unit is used to perform named entity recognition on electronic medical record text to obtain TCM syndrome differentiation element information, and based on the TCM syndrome differentiation element information, to perform knowledge retrieval in the TCM knowledge graph to obtain TCM names that match the TCM syndrome differentiation element information, so as to use the obtained TCM names to form a dynamic syndrome differentiation drug pool.

[0093] An acoustic decoding unit is used to perform speech recognition on the Chinese medicine speech input data to obtain an acoustic candidate word sequence, and to expand the acoustic candidate word sequence with Chinese medicine confusion words to obtain a Chinese medicine candidate set.

[0094] The semantic matching unit is used to take the names of Chinese medicines in the dynamic syndrome differentiation drug pool and the Chinese medicine candidate set as candidate Chinese medicines, and calculate the semantic matching score between each candidate Chinese medicine and the information of the Chinese medicine syndrome differentiation elements.

[0095] The input unit is used to determine the real Chinese medicine name corresponding to the Chinese medicine voice input data from all candidate Chinese medicines based on the semantic matching score of each candidate Chinese medicine.

[0096] The working process, working details and technical effects of the system provided in this embodiment can be found in the first aspect of the embodiment, and will not be repeated here.

[0097] like Figure 3 As shown, the third aspect of this embodiment provides a traditional Chinese medicine voice input device based on semantic perception and dynamic dialectical reasoning. Taking the device as an electronic device as an example, it includes: a memory, a processor, and a transceiver connected in sequence. The memory is used to store computer programs, the transceiver is used to send and receive messages, and the processor is used to read the computer programs and execute the traditional Chinese medicine voice input method based on semantic perception and dynamic dialectical reasoning as described in the first aspect of the embodiment.

[0098] For specific examples, the memory may include, but is not limited to, random access memory (RAM), read-only memory (ROM), flash memory, first-in-first-out (FIFO) memory, and / or first-in-last-out (FILO) memory, etc.; specifically, the processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor may be implemented using at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), PLA (Programmable Logic Array). The processor may also include a main processor and a coprocessor. The main processor, also known as the CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state.

[0099] In some embodiments, the processor may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. For example, the processor may not be limited to microprocessors of the STM32F105 series, reduced instruction set computer (RISC) microprocessors, x86 architecture processors, or processors with integrated neural network processing units (NPUs). The transceiver may be, but is not limited to, a Wi-Fi transceiver, a Bluetooth transceiver, a General Packet Radio Service (GPRS) transceiver, a ZigBee (a low-power LAN protocol based on the IEEE 802.15.4 standard) transceiver, a 3G transceiver, a 4G transceiver, and / or a 5G transceiver. Furthermore, the device may also include, but is not limited to, a power module, a display screen, and other necessary components.

[0100] The working process, working details and technical effects of the electronic device provided in this embodiment can be found in the first aspect of the embodiment, and will not be repeated here.

[0101] The fourth aspect of this embodiment provides a storage medium that stores instructions containing the traditional Chinese medicine voice input method based on semantic perception and dynamic dialectical reasoning as described in the first aspect of the embodiment. That is, the storage medium stores instructions, and when the instructions are run on a computer, the traditional Chinese medicine voice input method based on semantic perception and dynamic dialectical reasoning as described in the first aspect of the embodiment is executed.

[0102] The storage medium refers to a carrier for storing data, which may include, but is not limited to, floppy disks, optical disks, hard disks, flash memory, USB flash drives, and / or memory sticks. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.

[0103] The working process, working details and technical effects of the storage medium provided in this embodiment can be found in the first aspect of the embodiment, and will not be repeated here.

[0104] The fifth aspect of this embodiment provides a computer program product containing instructions that, when the instructions are executed on a computer, cause the computer to perform the traditional Chinese medicine voice input method based on semantic perception and dynamic dialectical reasoning as described in the first aspect of the embodiment, wherein the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.

[0105] Finally, it should be noted that the above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for voice input of traditional Chinese medicine based on semantic perception and dynamic dialectical reasoning, characterized in that, include: Acquire data from voice input of traditional Chinese medicine prescriptions and the electronic medical record text of the current user seeking medical advice; Named entity recognition is performed on the electronic medical record text to obtain TCM syndrome differentiation element information. Based on the TCM syndrome differentiation element information, knowledge retrieval is performed in the Chinese herbal medicine knowledge graph to obtain the Chinese herbal medicine names that match the TCM syndrome differentiation element information. In order to use the obtained Chinese herbal medicine names to form a dynamic syndrome differentiation drug pool. The traditional Chinese medicine voice input data is subjected to speech recognition to obtain an acoustic candidate word sequence, and the acoustic candidate word sequence is expanded with traditional Chinese medicine confusion words to obtain a traditional Chinese medicine candidate set; The names of Chinese medicines in the dynamic syndrome differentiation drug pool and the Chinese medicine candidate set are used as candidate Chinese medicines, and the semantic matching score between each candidate Chinese medicine and the information of the Chinese medicine syndrome differentiation elements is calculated. Based on the semantic matching score of each candidate Chinese medicine, the real Chinese medicine name corresponding to the Chinese medicine voice input data is determined from all candidate Chinese medicines.

2. The method for voice input of traditional Chinese medicine based on semantic perception and dynamic dialectical reasoning according to claim 1, characterized in that, The TCM diagnostic elements information includes: syndrome information and symptom information, wherein the semantic matching score between each candidate Chinese herbal medicine and the TCM diagnostic elements information is calculated, including: Obtain a heterogeneous graph network based on syndrome differentiation and traditional Chinese medicine, wherein the heterogeneous graph network contains traditional Chinese medicine nodes, efficacy nodes, syndrome nodes and symptom nodes, and the edges between nodes represent the association weights between nodes. From the heterogeneous graph network, the syndrome nodes corresponding to the syndrome information and the symptom nodes corresponding to the symptom information are determined, and are respectively used as target syndrome nodes and target symptom nodes. Each candidate Chinese medicine is used as a candidate node, and the optimal association path between each candidate node and each target syndrome node, as well as the optimal association path between each candidate node and each target symptom node, is determined from the heterogeneous graph network. By utilizing the optimal association path between each candidate node and each target syndrome node, as well as the optimal association path between each candidate node and each target symptom node, the semantic matching score between each candidate Chinese medicine and the TCM syndrome differentiation element information is calculated.

3. The method for voice input of traditional Chinese medicine based on semantic perception and dynamic dialectical reasoning according to claim 2, characterized in that, From the heterogeneous graph network, the optimal association path between each candidate node and each target symptom node is determined, including: For any candidate node, determine the shortest path from the heterogeneous graph network to any target symptom node; Determine if the number of shortest paths is greater than 1; If so, calculate the total weight of each shortest path, where the total weight of any shortest path is the product of the association weights between the nodes in that shortest path. The shortest path with the largest total weight is taken as the optimal association path between any candidate node and any target syndrome node. After all target syndrome nodes have been queried, the optimal association path between any candidate node and each target syndrome node is obtained.

4. The method for voice input of traditional Chinese medicine based on semantic perception and dynamic dialectical reasoning according to claim 2, characterized in that, By utilizing the optimal association paths between each candidate node and each target syndrome node, as well as the optimal association paths between each candidate node and each target symptom node, the semantic matching score between each candidate Chinese medicine and the TCM syndrome differentiation elements is calculated, including: For any candidate node, calculate the first path weight of the optimal association path between the candidate node and each target symptom node, and the second path weight of the optimal association path between the candidate node and each target symptom node; Summing the weights of each first path and each second path yields the initial semantic matching score between any candidate node and the TCM syndrome differentiation element information. The initial semantic matching score is normalized to obtain the semantic matching score between any candidate node and the TCM syndrome differentiation element information.

5. The method for voice input of traditional Chinese medicine based on semantic perception and dynamic dialectical reasoning according to claim 1, characterized in that, The acoustic candidate word sequence is expanded with Chinese medicine (TCM) confusion words to obtain a TCM candidate set, including: Part-of-speech tagging is performed on the acoustic candidate word sequence to obtain acoustic candidate words that belong to nouns in the acoustic candidate word sequence, and the acoustic candidate words that belong to nouns are used as target words; Retrieve similar Chinese medicines corresponding to the target word from the Chinese medicine pronunciation similarity database; The candidate set of traditional Chinese medicines is formed by using the acoustic candidate word sequence and the similar traditional Chinese medicines corresponding to the target word.

6. The method for voice input of traditional Chinese medicine based on semantic perception and dynamic dialectical reasoning according to claim 1, characterized in that, When knowledge retrieval is performed in the Chinese herbal medicine knowledge graph based on the TCM syndrome differentiation elements information to obtain the Chinese herbal medicine names that match the TCM syndrome differentiation elements information, the graph confidence of the Chinese herbal medicine names that match the TCM syndrome differentiation elements information is also obtained at the same time. The process of performing voice recognition on the recorded Chinese medicine voice data includes: Feature extraction was performed on the voice input data of traditional Chinese medicine to obtain voice features; The speech features are input into the speech recognition model to obtain the acoustic candidate word sequence, and at the same time, the speech confidence of each acoustic candidate word in the acoustic candidate word sequence is obtained.

7. The method for voice input of traditional Chinese medicine based on semantic perception and dynamic dialectical reasoning according to claim 6, characterized in that, The candidate Chinese medicines include acoustic candidate words in the acoustic candidate word sequence, similar Chinese medicines corresponding to the acoustic candidate words, and syndrome differentiation Chinese medicines in the dynamic syndrome differentiation medicine pool. The similar Chinese medicines corresponding to each acoustic candidate word are obtained by expanding the acoustic candidate word sequence with Chinese medicine confusion words. Specifically, based on the semantic matching score of each candidate traditional Chinese medicine (TCM), the actual TCM name corresponding to the TCM voice input data is determined from all candidate TCMs, including: Obtain the acoustic model score corresponding to each candidate Chinese medicine. If any candidate Chinese medicine is an acoustic candidate word, the acoustic model score of that candidate Chinese medicine is the speech confidence of the corresponding acoustic candidate word. If any candidate Chinese medicine is a syndrome differentiation Chinese medicine, the acoustic model score of that candidate Chinese medicine is the spectrum confidence of the corresponding syndrome differentiation Chinese medicine. If any candidate Chinese medicine is a similar Chinese medicine to the acoustic candidate word, the Viterbi forced alignment algorithm is used to determine the acoustic model score of that candidate Chinese medicine. The acoustic model score and semantic matching score corresponding to each candidate Chinese medicine are weighted and summed to obtain the comprehensive confidence score of each candidate Chinese medicine. From all candidate traditional Chinese medicines, the candidate with the highest overall confidence level is selected as the pre-selected traditional Chinese medicine; Determine whether the overall confidence level of the pre-selected Chinese medicine is greater than or equal to the first threshold; If so, the name of the pre-selected Chinese medicine will be used as the actual name of the Chinese medicine and entered into the system.

8. The method for voice input of traditional Chinese medicine based on semantic perception and dynamic dialectical reasoning according to claim 7, characterized in that, Determining whether the overall confidence level of the pre-selected Chinese medicine is greater than or equal to a first threshold includes: If not, then determine whether the overall confidence level is between the second threshold and the first threshold, wherein the second threshold is less than the first threshold; If yes, a TCM confirmation prompt message is output, and in response to the TCM confirmation interactive operation, the name of the pre-selected TCM is used as the actual TCM name; otherwise, a re-entry prompt message is output or a candidate list is generated for visual display, wherein the candidate list contains all candidate TCMs.

9. A method for voice input of traditional Chinese medicine based on semantic perception and dynamic dialectical reasoning according to claim 6, characterized in that, The method further includes: Record the interactive data generated each time a traditional Chinese medicine voice input is made, wherein the interactive data includes the voice features corresponding to the traditional Chinese medicine voice input data and the determined real name of the traditional Chinese medicine; By utilizing interactive data, the speech recognition model is incrementally trained to achieve feedback optimization.

10. A voice input system for traditional Chinese medicine based on semantic perception and dynamic dialectical reasoning, characterized in that, include: The acquisition unit is used to acquire voice input data for traditional Chinese medicine and the electronic medical record text of the current patient. The dynamic syndrome differentiation drug pool generation unit is used to perform named entity recognition on electronic medical record text to obtain TCM syndrome differentiation element information, and based on the TCM syndrome differentiation element information, to perform knowledge retrieval in the TCM knowledge graph to obtain TCM names that match the TCM syndrome differentiation element information, so as to use the obtained TCM names to form a dynamic syndrome differentiation drug pool. An acoustic decoding unit is used to perform speech recognition on the Chinese medicine speech input data to obtain an acoustic candidate word sequence, and to expand the acoustic candidate word sequence with Chinese medicine confusion words to obtain a Chinese medicine candidate set; The semantic matching unit is used to take the names of Chinese medicines in the dynamic syndrome differentiation drug pool and the Chinese medicine candidate set as candidate Chinese medicines, and calculate the semantic matching score between each candidate Chinese medicine and the information of the Chinese medicine syndrome differentiation elements. The input unit is used to determine the real Chinese medicine name corresponding to the Chinese medicine voice input data from all candidate Chinese medicines based on the semantic matching score of each candidate Chinese medicine.