AI-based traditional Chinese medicine prescription screening method and system, electronic equipment and storage medium
By constructing the knowledge base of traditional Chinese medicine prescriptions and using AI technology for prescription screening, the problem of low efficiency and lack of scientific screening efficiency and lack of science of traditional Chinese medicine prescriptions have been solved, and more efficient and scientific traditional Chinese medicine prescription screening has been achieved.
Patent Information
- Application Number
- CN202411962537.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-01-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prescription and screening process of traditional Chinese medicine prescriptions depends on the doctor's personal experience and manual review, resulting in low efficiency and incompleteness, and the scientificity and applicability of the prescription are difficult to guarantee.
Adopt AI -based traditional Chinese medicine prescription screening methods to obtain knowledge extraction of traditional Chinese medicine prescription literature data, build a Chinese medicine prescription knowledge base, and use the patient's diagnostic information for characteristic word extraction, semantic matching and reasoning Reference prescription for patient's condition.
It improves the efficiency and accuracy of traditional Chinese medicine prescription screening, reduce the subjectivity and one -sidedness of doctors in the prescription and screening process, and enhance the scientific and security of the prescription.
Smart Images

Figure CN119377286A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of AI-based Chinese medicine prescription screening, and in particular to an AI-based Chinese medicine prescription screening method, system, electronic device and storage medium. Background Art
[0002] Traditional Chinese medicine is a treasure of traditional Chinese medicine and plays an irreplaceable role in disease prevention and treatment. As the core carrier of TCM diagnosis and treatment, TCM prescriptions contain rich clinical medication experience and compatibility rules. In clinical practice, doctors make a dialectical diagnosis based on the patient's specific condition, and then prescribe corresponding TCM prescriptions based on the diagnosis results to achieve the purpose of treating the disease. However, for a long time, the prescription and screening process of TCM prescriptions mainly relied on the doctor's personal experience and manual review, and the prescription screening efficiency was low and incomplete. Summary of the invention
[0003] The present application provides an AI-based Chinese medicine prescription screening method, system, electronic device and storage medium to improve the efficiency of AI-based Chinese medicine prescription screening.
[0004] In the first aspect, the present application provides an AI-based Chinese medicine prescription screening method, comprising: Acquire traditional Chinese medicine prescription literature data, and perform knowledge extraction on the traditional Chinese medicine prescription literature data to obtain structured knowledge data; Construct a knowledge base of traditional Chinese medicine prescriptions based on structured knowledge data; Acquire patient diagnosis information, and extract feature words from the patient diagnosis information to obtain standard diagnosis feature words; The standard diagnostic feature words are input into the traditional Chinese medicine prescription knowledge base for prescription screening to obtain multiple reference prescriptions.
[0005] In the above technical solution, by acquiring the TCM prescription literature data and performing knowledge extraction on the TCM prescription literature data, structured knowledge data is obtained, which lays a solid data foundation for the subsequent construction of a high-quality, information-rich TCM prescription knowledge base. Using natural language processing and data mining technology, this method can automatically, efficiently and accurately extract key elements such as drugs, dosages, efficacy, and main indications from massive unstructured texts, and express them in a structured form, so that traditional TCM knowledge can be converted into a form that computers can understand and process. This not only provides a more standardized and accurate theoretical reference for clinical diagnosis and treatment, but also opens up a new path for the inheritance and innovative application of TCM knowledge.
[0006] On the basis of obtaining structured knowledge data, the present invention further constructs a Chinese medicine prescription knowledge base. Different from traditional relational databases, the knowledge base adopts semantic network technology, takes key concepts such as drugs, prescriptions, symptoms, and treatment principles as nodes in the form of a map, and uses the internal connections between them as edges, forming a knowledge network with rich semantics and clear logic. This knowledge organization method is more in line with the systematic and holistic view of traditional Chinese medicine theory, and can more comprehensively and accurately portray the drug compatibility rules and the idea of syndrome differentiation and treatment. Doctors and patients can easily retrieve the efficacy, formulation principles, and contraindications of drugs through the knowledge base to assist clinical decision-making and medication guidance. At the same time, the knowledge base can also support applications such as intelligent question and answer and associated recommendations, expanding the depth and breadth of traditional Chinese medicine knowledge acquisition and utilization.
[0007] When a patient visits a doctor, the present invention first extracts feature words from the diagnostic text information, and uses medical natural language processing technology to identify key feature descriptions such as symptoms, signs, tongue coating, and pulse in texts such as medical records and doctor's orders, and then converts them into standard diagnostic feature words. By structured representation of diagnostic information, the differences in expression between doctors are eliminated, and the consistency and comparability of diagnostic results are improved. At the same time, this standard vocabulary representing the characteristics of the patient's disease and syndrome also lays the foundation for subsequent syndrome differentiation and prescription matching. With the help of domain ontology and dictionary, standard diagnostic feature words can accurately and normatively describe the patient's condition, reduce the differences in expression between doctors, and facilitate quality control and experience inheritance in the diagnosis and treatment process.
[0008] Finally, the extracted standard diagnostic feature words are input into the Chinese medicine prescription knowledge base for semantic matching and reasoning, and multiple reference prescriptions suitable for the patient's condition can be quickly and accurately screened out. Since the diagnostic feature words and prescription knowledge establish semantic mapping at the ontology level, the system can find candidate drugs with corresponding efficacy and indications according to the characteristics of the patient's symptoms, and then combine prescriptions with better efficacy. At the same time, this method fully considers the scientificity and rationality of prescription compatibility, integrates the principle of monarch, minister, assistant and envoy in traditional Chinese medicine and drug contraindications, and comprehensively evaluates and dynamically adjusts the prescriptions retrieved from the knowledge base, thereby improving the safety and effectiveness of the medication plan. With the help of this intelligent tool, doctors can prescribe and screen prescriptions more quickly, comprehensively and objectively, saving a lot of time for literature retrieval and analysis, making up for the lack of personal experience, and providing patients with better diagnosis and treatment services.
[0009] In a second aspect of the present application, a Chinese medicine prescription screening system based on AI is provided, the system comprising: The data acquisition module is used to acquire the TCM prescription literature data and perform knowledge extraction on the TCM prescription literature data to obtain structured knowledge data; Knowledge base construction module, used to build a traditional Chinese medicine prescription knowledge base based on structured knowledge data; A standard diagnostic feature word acquisition module is used to acquire patient diagnostic information and extract feature words from the patient diagnostic information to obtain standard diagnostic feature words; The reference prescription acquisition module is used to input standard diagnostic feature words into the traditional Chinese medicine prescription knowledge base for prescription screening to obtain multiple reference prescriptions.
[0010] In a third aspect of the present application, a computer storage medium is provided, wherein the computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the above method steps.
[0011] In the fourth aspect of the present application, an electronic device is provided, including a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes the above method.
[0012] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. The present invention can efficiently extract the key features of the text image by inputting the text image to be identified into the image encoder in the preset target image recognition model, and obtain a compact and information-rich text feature representation. This feature extraction method makes full use of the powerful learning ability of the deep learning model, and can automatically learn the significant patterns and distinguishing information in the text image, laying a good foundation for the subsequent AI-based Chinese medicine prescription screening. After obtaining the text features, the present invention further inputs them into the prompt encoder, and generates prompt features through operations such as feature selection and fusion. The prompt feature plays a role in guiding the AI-based Chinese medicine prescription screening. It selects the most relevant information for the current recognition task from the entire text feature and encodes it into a compact vector representation. This prompt mechanism enables the model to adaptively adjust the focus on the text features according to different recognition requirements, thereby improving the accuracy and flexibility of recognition. Finally, the present invention inputs the text features and the prompt features into the predictive encoder together, and obtains the final AI-based Chinese medicine prescription screening results through attention processing and multi-layer perception processing. Among them, the attention mechanism enables the model to comprehensively consider the text features and the prompt features when recognizing each character, and dynamically adjust the degree of attention to different features. This adaptive feature fusion method enables the model to fully utilize the contextual and semantic information of the text, further improving the recognition accuracy.
[0013] 2. This application obtains Chinese medicine prescription literature data and performs knowledge extraction on the Chinese medicine prescription literature data to obtain structured knowledge data, and then builds a Chinese medicine prescription knowledge base based on the structured knowledge data, obtains patient diagnosis information, and extracts feature words from the patient diagnosis information to obtain standard diagnosis feature words, and finally inputs the standard diagnosis feature words into the Chinese medicine prescription knowledge base for prescription screening to obtain multiple reference prescriptions. This series of processes are closely linked and progressive, reflecting systematic thinking and engineering methods, and highlighting the contemporary value of inheritance and innovation of traditional Chinese medicine.
[0014] 3. After identifying the core entity in the Chinese medicine prescription literature data, the present application further extracts the attributes of the core entity based on the core entity and the Chinese medicine prescription literature data to obtain entity attributes. This process first determines the dependency relationship between the vocabulary and the core entity in the Chinese medicine prescription literature data based on the core entity and the Chinese medicine prescription literature data, and then extracts the attributes of the core entity based on the dependency relationship and the preset attribute vocabulary, and finally obtains the entity attributes. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A schematic diagram of a process flow of a method for screening Chinese medicine prescriptions based on AI provided in an embodiment of the present application; Figure 2 An architecture diagram of an AI-based Chinese medicine prescription screening system provided in an embodiment of the present application; Figure 3 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION
[0016] In order to enable technicians in this field to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.
[0017] In the description of the embodiments of the present application, words such as "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "for example" or "for example" is intended to present related concepts in a specific way.
[0018] In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0019] In order to facilitate understanding of the method and system provided by the embodiments of the present application, before introducing the embodiments of the present application, the background of the embodiments of the present application is first introduced.
[0020] With the rapid development of artificial intelligence technology, AI-based Chinese medicine prescription screening technology has become an indispensable key technology and has been widely used in many fields such as industrial production, financial services, transportation, medical education, etc. AI-based Chinese medicine prescription screening is a technology that uses computer vision and pattern recognition algorithms to automatically detect and recognize text information in images or videos. It can help us quickly and accurately extract and digitize text content on various carriers, greatly improving the efficiency and accuracy of information processing.
[0021] The core carrier of TCM diagnosis and treatment embodies the clinical wisdom and medication experience of famous doctors of all dynasties, and contains profound rules in drug compatibility, monarch, minister, assistant and envoy, etc. In clinical practice, TCM doctors will make syndrome differentiation and treatment according to the specific condition of the patient through the four examinations of observation, auscultation, inquiry and palpation, and prescribe corresponding TCM prescriptions after clarifying the symptoms, so as to achieve the treatment purpose of treating both the symptoms and the root cause, and strengthening the body and eliminating evil.
[0022] However, for a long time, the process of prescribing and screening Chinese medicine has mainly relied on the personal experience and manual review of doctors. On the one hand, senior Chinese medicine practitioners, relying on their years of medical experience and understanding of ancient books, can prescribe the right medicine for the right disease and prescribe a relatively ideal prescription; but on the other hand, young doctors with little experience are inevitably restricted when prescribing medicine and find it difficult to do it with ease. At the same time, due to the vast amount of Chinese medicine literature, it is difficult for doctors to quickly search and compare the best drug combination within a limited time, and the efficiency of prescription screening is not high.
[0023] In addition, the traditional prescription and screening process is often subjective and one-sided, and it is difficult to take into account the multi-dimensional properties of drugs and the systematic balance of prescriptions. Doctors tend to select drugs based on the patient's main symptoms and their own clinical preferences, while ignoring factors such as the drug's nature, taste, meridians, efficacy, and compatibility contraindications. The scientificity and applicability of the prescription are difficult to guarantee. At the same time, different doctors often have very different syndrome differentiation and treatment for the same condition, and the prescription and medication lack standardization and consistency, which is not conducive to the stable improvement of efficacy and the promotion and replication of experience.
[0024] After the background introduction of the above content, those skilled in the art can understand the problems existing in the prior art. The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments.
[0025] Based on the above background technology, please refer to Figure 1 , Figure 1 A flowchart of a method for screening Chinese medicine prescriptions based on AI provided in an embodiment of the present application. The system can be implemented by a computer program or can be run as an independent tool application. Specifically, in an embodiment of the present application, the method can be applied on a server, but can also be applied to electronic devices such as servers. A method for screening Chinese medicine prescriptions based on AI comprises the following steps: S101, obtaining traditional Chinese medicine prescription literature data, and performing knowledge extraction on the traditional Chinese medicine prescription literature data to obtain structured knowledge data; Specifically, the present invention adopts natural language processing technology to perform pre-processing steps such as word segmentation, part-of-speech tagging, and named entity recognition on the Chinese medicine prescription literature data, so as to identify key information such as drugs, dosages, effects, and main indications. For example, for a prescription record of "5 qian of Astragalus, 3 qian of Codonopsis, 1 qian of Zhigancao, replenishing qi and tonifying the middle, treating asthenia and cough", the system can extract the three drugs of "Astragalus", "Codonopsis", and "Zhigancao", the dosages of "5 qian", "3 qian", and "1 qian", the effect of "replenishing qi and tonifying the middle", and the main indications of "asthenia and cough".
[0026] Next, the present invention uses medical ontology and semantic rules to perform structured representation and semantic description of the extracted key information to form knowledge triples containing concepts, attributes, and relationships. For example, the above prescription can be expressed as triples such as (Huangqi, dosage, 5 qian), (Huangqi, efficacy, tonifying qi), (Dangshen, dosage, 3 qian), (Dangshen, meridian, spleen and stomach), etc. Each triple clearly defines the subject, object, and predicate of the knowledge.
[0027] Based on the above embodiment, as an optional embodiment, knowledge extraction is performed on the traditional Chinese medicine prescription literature data to obtain structured knowledge data, including: S201, performing entity recognition processing on the traditional Chinese medicine prescription literature data to obtain the core entities in the traditional Chinese medicine prescription literature; Specifically, the present invention adopts the named entity recognition method based on rule and machine learning combination to process Chinese medicine prescription literature sentence by sentence.First, according to the characteristics of the field of traditional Chinese medicine, an entity dictionary and synonym table of the categories of medicine, disease, symptom, etc. with wide coverage are constructed for vocabulary matching and normalization.Then, machine learning models such as conditional random fields and recurrent neural networks are used to train entity identifiers to automatically mark the entity words in the sentence.For the identified entity, it is also necessary to carry out disambiguation and reference resolution in conjunction with context semantics to determine the specific concept of entity reference.For example, in the sentence "Huangqi 5 qian, Codonopsis pilosula 3 qian, Zhigancao 1 qian, Yiqi Buzhong, Zhisui cough", "Huangqi", "Dangsui", "Zhigancao" belong to drug entities, "5 qian", "3 qian", "1 qian" belong to dosage entities, "Yiqi", "Buzhong" belong to efficacy entities, "Zuiguo" and "Cough" belong to disease entities.
[0028] By performing entity recognition processing on Chinese medicine prescription literature data, the present invention accurately locates the key components of drug compatibility knowledge from massive texts, and reveals the hidden conceptual connotations in ancient medical case prescriptions, which lays the foundation for subsequent relationship extraction, knowledge reasoning and other links. At the same time, entity recognition converts unstructured text into semi-structured entity sequences, making subsequent computational processing more efficient and convenient. In addition, statistical analysis of the distribution patterns of various entities in prescription documents can also discover the focus and evolution trend of clinical medication, providing a new perspective for the modernization of traditional Chinese medicine research.
[0029] Based on the above embodiment, as an optional embodiment, entity recognition processing is performed on the traditional Chinese medicine prescription literature data to obtain the core entities in the traditional Chinese medicine prescription literature, including: S301, performing text cleaning on the traditional Chinese medicine prescription literature data to obtain first literature data; Specifically, the present invention adopts a text cleaning method based on the combination of rules and dictionaries to filter and convert Chinese medicine prescription literature data line by line. First, various noise characters in the text are matched using regular expressions, such as punctuation marks, special symbols, numbers, letters, etc., which are deleted or replaced with unified placeholders. For some symbols with specific meanings, such as "《》" in the prescription name, Arabic numerals in the drug dosage, etc., they are retained. At the same time, it is also necessary to deal with the problems of traditional Chinese characters, variant characters, and uncommon characters in the text, and convert them into standardized simplified Chinese characters to ensure the uniformity of the text format. On this basis, the Chinese stop word dictionary is introduced to filter out the vocabulary that has no actual contribution to entity recognition, such as function words, auxiliary words, modal particles, etc. in the text, and further simplify the text content. For Chinese medicine professional terms such as drug names, prescription names, viscera and meridians, necessary standardization processing is also required to convert them into standard expressions, such as "Danggui" and "Danggui", "Rehmannia glutinosa" and "Rehmannia glutinosa", etc.
[0030] In the process of text cleaning, the present invention fully draws on the language characteristics of ancient Chinese and the knowledge in the field of traditional Chinese medicine, and protects some special words and phrases, such as "Sini Tang", "Ma Huang Lian Qiao Chi Xiao Dou Tang", etc., to prevent them from being incorrectly segmented or filtered. For the problems of different texts, homophones, and erroneous characters between different document versions, the present invention also performs necessary proofreading and correction to restore the original appearance of the text as much as possible. In addition, since there are a large number of dialect slang, classical Chinese grammar, transliterated words, etc. in ancient Chinese medicine documents, the present invention also introduces dialect dictionaries and ancient Chinese dictionaries to convert them into universal modern Chinese expressions.
[0031] By cleaning the text of the Chinese medicine prescription literature data, the first literature data is obtained. On the one hand, the present invention eliminates various noise interferences in the original text, improves the data quality, and lays the foundation for subsequent word segmentation and entity recognition; on the other hand, the standardized text format also facilitates the integration and utilization of literature data from different sources and different versions, and improves the consistency and repeatability of data processing. At the same time, pre-processing measures such as stop word filtering and term standardization reduce the calculation scale of subsequent links and improve the operating efficiency of the entire process.
[0032] S302, performing phrase segmentation processing on the first document data to obtain second document data; Specifically, the present invention adopts a phrase segmentation method based on a combination of dictionaries and rules to perform bottom-up layer-by-layer segmentation on the first document data. First, a predefined TCM professional dictionary, such as a TCM name dictionary, a prescription name dictionary, a viscera and meridian dictionary, etc., is used to perform a preliminary match on the text to identify TCM specific concept words therein, such as "Huangqi", "Zhi Gancao", "Wu Qian", "San Qian", etc. Then, a series of segmentation rules, such as "TCM name + dosage", "Prescription name + composition", "Zangfu + symptoms", etc., are used to combine adjacent concept words into larger phrases, such as "Huangqi Wu Qian", "Zhi Gancao San Qian", etc. In the segmentation process, the nesting and overlapping phenomena of phrases also need to be considered, such as "Ginseng Wu Qian, Huangqi San Qian, Baizhu San Qian, Zhi Gancao San Qian", which includes both phrases such as "Ginseng Wu Qian" and "Zhi Gancao San Qian". In this regard, the present invention adopts the maximum matching principle to give priority to segmenting phrases with longer lengths and greater coverage.
[0033] When performing phrase segmentation, the present invention makes full use of the word formation rules and expression habits in the field of traditional Chinese medicine, summarizes a batch of high-frequency, high-quality phrase templates, and continuously expands and optimizes them according to new corpus data. For the problem of segmenting ambiguous and unregistered words, the present invention also introduces a method based on statistics and transfer learning, and dynamically adjusts the segmentation strategy through information such as word co-occurrence and part of speech transfer. In addition, for different entity types, such as drugs, prescriptions, symptoms, internal organs, etc., the present invention also designs different segmentation parameters and priorities to balance recall and accuracy.
[0034] S303, comparing the second document data with the corpus in a preset corpus to obtain the core entities in the traditional Chinese medicine prescription document.
[0035] Specifically, the present invention adopts a comparison method based on a combination of string matching and semantic similarity calculation to determine and link each phrase in the second document data one by one. First, the phrase is string matched with the standard entity name in the preset corpus. If it is completely matched, the phrase is directly marked as the corresponding entity type; if it is partially matched, the similarity indicators such as the edit distance and overlap between the phrase and the entity are calculated, and whether to link it as the same entity is determined according to the similarity threshold. For completely unmatched phrases, the present invention can also find the entity with the closest semantics in the corpus through semantic similarity calculation, such as semantic similarity based on distributed word representation, semantic distance based on knowledge graph, etc., and link the phrase to the entity. In the matching and linking process, it is also necessary to use features such as context information and part-of-speech sequence to distinguish and disambiguate ambiguous entities. For some new entities that are segmented incorrectly or not covered by the dictionary, the present invention can also dynamically learn new entity patterns by constructing named entity recognition models, such as conditional random fields, recurrent neural networks, etc., to expand the corpus while improving the adaptability of entity recognition.
[0036] In the process of entity comparison, the present invention adopts a multi-granularity and multi-angle corpus construction method, which includes both a TCM encyclopedia knowledge base for general concepts and a corpus in the fields of prescriptions, medicinal materials, etc. for specialist-specific terms, thereby ensuring the breadth and depth of the corpus. For corpora from different sources and styles, the present invention also performs necessary cleaning, unification, and fusion to improve the quality and consistency of the corpus. In terms of comparison algorithms, the present invention comprehensively utilizes a variety of technologies such as literal matching, edit distance, and semantic similarity, and optimizes the combination for different entity types and recognition tasks, thereby ensuring the accuracy of matching while improving matching efficiency.
[0037] S202, extracting relationships based on core entities and traditional Chinese medicine prescription literature data to obtain semantic relationships between core entities; Specifically, the present invention adopts the relation extraction method based on pattern matching and deep learning combination to analyze Chinese medicine prescription literature sentence by sentence.First, according to the theoretical knowledge of traditional Chinese medicine, a group of language patterns reflecting the relationship between entities are summarized, such as "A matches B" represents the drug compatibility relationship, "A mainly treats B" represents the main treatment relationship, "A taboo B" represents the taboo relationship, etc., to form a relational pattern library.Then, these patterns are applied to the entity recognition results to match the semantic relationship that may exist in the sentence.For the matched relationship, it is also necessary to utilize technologies such as dependency syntactic analysis and word vector representation to verify the rationality of the relationship and determine the direction of the relationship.For example, in the sentence "Huangqi matches Codonopsis pilosula, replenishes qi and replenishes the middle, and treats asthenia cough", through pattern matching, it can be found that (Huangqi, compatibility, Codonopsis pilosula), (Huangqi, efficacy, replenishes qi and replenishes the middle), (Codonopsis pilosula, efficacy, replenishes qi and replenishes the middle), (Huangqi, mainly treats, asthenia cough), (Codonopsis pilosula, mainly treats, asthenia cough) and other relationships.
[0038] In addition to the pattern matching-based method, the present invention also introduces a relationship extraction model based on deep learning, such as convolutional neural networks, attention mechanisms, etc., to directly learn the semantic relationship between entities from the text in an end-to-end manner. Compared with manually defined patterns, deep learning models can automatically mine complex relationship patterns implicit in the corpus, improving the generalization ability and adaptability of relationship extraction. At the same time, combining the two methods of pattern matching and deep learning, taking into account the accuracy and efficiency of relationship extraction.
[0039] Based on the above embodiment, as an optional embodiment, relationship extraction is performed based on core entities and traditional Chinese medicine prescription literature data to obtain semantic relationships between core entities, including: S401, annotating the core entities in the traditional Chinese medicine prescription literature data according to the core entities to obtain the annotated traditional Chinese medicine prescription literature data; Specifically, the present invention adopts a rule-based and dictionary-based entity annotation method, and constructs a multi-category entity dictionary library including drugs, diseases, symptoms, treatment methods, taboos, etc., targeting the language characteristics of traditional Chinese medicine prescription documents, and summarizes a series of entity recognition rules based on word formation rules and context features, which are used to discover new entities not included in the dictionary, resolve ambiguities, etc. The annotation process is as follows: first, the prescription document is lexical analyzed using a Chinese word segmentation tool to divide the text into several words; then, each word in the word segmentation result is traversed and matched in the entity dictionary library, and for the words that can be matched, the corresponding entity category is marked to form labels such as "drugs" and "diseases"; for new words that are not matched, predefined recognition rules are used for inference, such as judging the possible entity category through word formation clues such as part of speech, radicals, etc., or combining context, word co-occurrence frequency and other features for analogy, and if the rule conditions are met, the inferred entity label is marked. It should be noted that due to the complexity of prescription terms and the diversity of literature corpus, a single feature rule is often difficult to fully cover all types of named entities. Therefore, the present invention follows the principles of openness, hierarchy, and complementarity when designing rules, including shallow rules based on literal patterns, such as X in the template "X treats Y" must be a drug or prescription, and Y must be a disease or symptom; it also includes deep rules with certain semantic information, such as X and Y in "monarch X minister Y" are usually drugs classified with the same efficacy. For difficult cases that cannot be directly determined based on rules, such as "Sanyu three qian, Huangqin three qian" is whether it is a drug name or a dosage description, the present invention can also use machine learning models such as word vector semantic space and conditional random sequence labeling to reveal its semantic category through the distributed representation of words, and further improve the accuracy and completeness of entity labeling.
[0040] S402, performing dependency syntax analysis on the annotated traditional Chinese medicine prescription literature data to obtain the semantic relationship between core entities.
[0041] Specifically, the present invention adopts a transfer-based dependency syntax analysis model based on entity annotation, takes into account the particularity of traditional Chinese medicine language, and introduces domain rules and knowledge base to improve the accuracy and coverage of relationship extraction. The analysis process is as follows: first, the annotated prescription text is divided into several sentence units, each sentence forms a dependency syntax analysis tree; then, each node on the syntax tree is traversed, and whether there is a specific semantic relationship between the nodes is determined according to the predefined relationship template. The template includes: drug <treat>Diseases, medicines <contain>Drugs, diseases <cause>Symptoms and medicinal properties <restrict>Drugs, such as "Scutellaria baicalensis clears heat and dries dampness" can be extracted from "Scutellaria baicalensis <function>Heat-clearing" and "Scutellaria baicalensis <function>At the same time, the word slots in the relationship template are standardized by using the dictionary of traditional Chinese medicine, and synonyms such as "fever" and "fire syndrome" are mapped to standardized disease concepts, and synonyms such as "assistant" and "used in combination" are mapped to standardized compatibility relationships; for implicit relationships that cannot be directly derived from syntactic analysis, predefined domain rules can also be used for reasoning, such as judging the primary and secondary status of different drugs according to the theory of "monarch, minister, assistant and messenger", and inferring the causal relationship between emotional factors and diseases according to the theory of "seven emotions causing disease". In addition, for multiple relationship triplets obtained by dependency analysis, the present invention also designs a graph-based post-processing algorithm, which filters noise relationships and clusters synonymous relationships by constructing a relationship co-occurrence network, calculating relationship confidence, etc., thereby improving the simplicity and consistency of relationship extraction.
[0042] S203, extracting the attributes of the core entity based on the core entity and the traditional Chinese medicine prescription literature data to obtain entity attributes; Specifically, the present invention adopts an attribute extraction method based on dictionary matching and conditional random combination to parse Chinese medicine prescription documents sentence by sentence. First, for different types of core entities, corresponding attribute dictionaries are constructed, such as the attribute dictionary of drug entities includes "warm", "hot", "cold", "cool", "sour", "bitter", "sweet", "spicy", "salty", "toxic", "non-toxic", "return to the lungs", "return to the liver", etc., and the attribute dictionary of disease entities includes "cough", "sputum", "asthma", "lung heat", "lung deficiency", etc. Then, the vocabulary in the attribute dictionary is matched with the identified core entity to find the candidate attribute set of the entity. Then, the conditional random field model is used to combine the contextual information of the entity and the attribute in the sentence to determine whether there is a real modification relationship between the candidate attribute and the entity, and the final entity attribute is obtained. For example, in the sentence "Astragalus, sweet in taste, slightly warm in nature, enters the spleen and lung meridians, replenishes Qi and raises Yang, benefits the Wei and consolidates the exterior, promotes diuresis and reduces swelling, promotes fluid production and quenches thirst", "sweet in taste", "slightly warm in nature", "enters the spleen and lung meridians", etc. are attributes of the drug entity "Astragalus".
[0043] In addition to the methods based on dictionary matching and conditional randomness, the present invention also explores attribute extraction technology based on dependency syntactic analysis and semantic role labeling. By analyzing the dependency relationship and semantic role of the entity in the syntactic tree, the attributive, adverbial, appositive and other components of the entity are identified, and then the attributes of the entity are extracted. Compared with dictionary matching, this method can discover novel attributes outside the dictionary; compared with conditional random fields, this method can mine long-distance dependent attributes. In addition, the present invention also introduces a knowledge base-based attribute completion method, which uses the existing traditional Chinese medicine knowledge base to complete the attributes that do not appear in the text but are highly associated with the entity, thereby improving the recall rate of attribute extraction.
[0044] Based on the above embodiment, as an optional embodiment, the attributes of the core entity are extracted based on the core entity and the Chinese medicine prescription literature data to obtain entity attributes, including: S501, determining the dependency relationship between the vocabulary and the core entity in the Chinese medicine prescription literature data according to the core entity and the Chinese medicine prescription literature data; Specifically, the present invention takes the pre-annotated core entity as the center, establishes a dependency syntactic analysis tree with other words in the sentence, and reveals the association between the words and the core entity in terms of syntactic function and semantic role. The analysis process is as follows: first, the prescription text is segmented to form several sentences containing the core entity; then, the sentence is segmented and part-of-speech tagged, that is, the continuous string is segmented into a meaningful word sequence, and the part of speech of each word is determined, such as noun, verb, adjective, etc.; then, the words in each sentence are traversed to determine the syntactic dependency relationship between it and the annotated core entity, mainly including: subject-predicate relationship, verb-object relationship, modification relationship, etc. For example, in the sentence "Huangqin clears heat and removes dampness", "Huangqin" and the predicates "clearing heat" and "removing dampness" are subject-predicate relationships respectively; "heat" and "clearing" constitute verb-object relationships; "Huangqin" and "heat" and "wet" are modification relationships, characterizing the efficacy of the drug. On this basis, the present invention also introduces a dictionary in the field of traditional Chinese medicine to refine the parts of speech and dependency relationships in syntactic analysis, such as subdividing "heat" into "real heat" and "virtual heat", etc., highlighting the semantic characteristics of medicine; subdividing "treatment" into "clearing heat" and "dispelling the symptoms", etc., reflecting clearer treatment methods. For the analysis results, the present invention forms a standardized dependency syntactic tree representation, with nodes as words and their part-of-speech labels, and edges as syntactic dependency relationships between words.
[0045] S502: extract the attributes of the core entity according to the dependency relationship and the preset attribute vocabulary to obtain entity attributes.
[0046] Specifically, the present invention first pre-processes the corpus of Chinese medicine prescription literature, uses Chinese word segmentation, part-of-speech tagging and other tools to perform lexical analysis, and combines the entity tagging information of the previous step to formalize each sentence into a dependency syntactic tree containing part-of-speech and entity tags. Then, traverse each node in the syntactic tree, and judge its grammatical role in the sentence according to its part-of-speech tagging and entity category, such as verbs are usually used as predicates, nouns are used as subjects and objects, and adjectives are mostly used as attributes; at the same time, judge the dependency relationship type between the node and its parent node and child node, such as subject-predicate, verb-object, attributive, etc. For the identified entity nodes, the present invention focuses on the following four types of dependency features: First, the grammatical role of the entity, such as "Scutellaria baicalensis" as the object in "Junyao Huangqin", corresponding to the compatibility position of Junyao; second, the modifier of the entity, such as "bitter" modifies "Coptis chinensis" in "bitter coptis chinensis", corresponding to the nature and taste of the medicine; third, the relationship words between entities, such as "Scutellaria baicalensis clears heat and dries dampness" in "clearing heat" and "drying dampness" are the relationship words connecting "Scutellaria baicalensis" and diseases, corresponding to the efficacy and effect; fourth, the parallel words between entities, such as "Scutellaria baicalensis three coins, Gardenia jasminoides three coins" in "Scutellaria baicalensis" and "Gardenia jasminoides" constitute a parallel structure, corresponding to the compatibility combination relationship. In addition, due to the particularity of TCM terminology, some specific sentence patterns need to be considered, such as "Junchen Zuoshi" and "Seven emotions cause disease", etc., which requires the use of TCM knowledge base for concept mapping and sentence matching. Through the above analysis, the present invention can obtain entity dependency feature triples covering grammatical and semantic levels, such as <Scutellaria baicalensis, Dingzhong, bitter taste>, <Scutellaria baicalensis, parallel, Gardenia jasminoides>, etc.
[0047] S204, taking entity attributes, semantic relations between core entities and entity attributes as structured knowledge data.
[0048] Concretely, the present invention adopts the knowledge representation method based on ontology, and the extracted entity, attribute, relationship are mapped to the basic elements such as class (Class), attribute (Property), relationship (Relation) in ontology, and formal description is carried out with the form of RDF (ResourceDescription Framework) triples.For example, the drug entity "Huangqi" can be expressed as a class, and its attributes "sweet taste", "slightly warm in nature" etc. can be expressed as the data attribute (Datatype Property) of this class, and the "main treatment" relationship between it and the disease entity "asthenia" can be expressed as an object attribute (Object Property).Like this, a complete knowledge fragment can be expressed with multiple triples, such as (Huangqi, taste, sweet), (Huangqi, nature, slightly warm), (Huangqi, main treatment, asthenia) etc.
[0049] When performing knowledge representation, the present invention makes full use of existing semantic resources in the field of traditional Chinese medicine, such as traditional Chinese medicine knowledge ontology, vocabulary, etc., and maps the extracted entities, attributes, and relationships to the existing conceptual system, thereby ensuring the standardization and consistency of knowledge representation. For some newly discovered entities and relationships, the present invention also supports the dynamic expansion and updating of the ontology to adapt to the emerging new knowledge. In addition, in the process of building a knowledge base, it is also necessary to perform post-processing such as disambiguation, merging, and filtering on the extracted knowledge to remove redundancy and noise and improve the quality of knowledge.
[0050] By integrating entity attributes, semantic relationships between core entities, and entity attributes into structured knowledge data, the present invention realizes the transformation of unstructured TCM literature into a structured knowledge base on the one hand, making subsequent knowledge storage, retrieval, reasoning, and other tasks more efficient and convenient; on the other hand, this structured and semantic form of knowledge organization is also conducive to the cross-language, cross-system sharing and interoperability of TCM knowledge, laying the foundation for the external dissemination and international development of TCM. At the same time, the TCM knowledge graph constructed based on ontology can provide powerful knowledge support for applications such as intelligent question and answer, clinical decision support, and drug development, and also provides new paths and methods for theoretical research on TCM.
[0051] S102, constructing a traditional Chinese medicine prescription knowledge base based on structured knowledge data; Specifically, the present invention adopts a knowledge base construction method based on the combination of ontology engineering methodology and graph database technology to model, abstract, organize and store structured knowledge data. First, according to the theoretical system of traditional Chinese medicine and the clinical diagnosis and treatment process, an ontology model covering core concepts such as drugs, prescriptions, syndromes, treatment principles, and effects is designed to clarify the semantic types, hierarchical relationships and constraint rules between concepts to form the top-level framework of the knowledge base. Then, the entities, attributes, relationships, etc. in the structured data are mapped to the corresponding classes, attributes, and relationships in the ontology model to achieve the standardized representation of knowledge under the premise of ensuring semantic consistency. In the mapping process, it is also necessary to perform quality control such as redundant disambiguation and error correction, as well as adaptive optimization such as new concept detection and ontology evolution. Based on a unified ontology model, the present invention further adopts graph database technology, such as Neo4j, JanusGraph, etc., to abstract entities such as drugs, prescriptions, diseases, etc. into nodes in the graph, and to abstract relationships such as drug composition, main efficacy, and incompatibility into edges in the graph, and to achieve efficient retrieval, reasoning and mining of knowledge through flexible graph query language and graph algorithm. At the same time, according to different application scenarios and user needs, the present invention can also construct multi-view, dynamic sub-graphs, focus on core concepts and key relationships of different granularities, and improve the usability and interpretability of the knowledge base.
[0052] S103, obtaining patient diagnosis information, and extracting feature words from the patient diagnosis information to obtain standard diagnosis feature words; Specifically, the present invention first performs grammatical analysis and semantic parsing of patient diagnostic information through natural language processing tools, including word segmentation, part-of-speech tagging, named entity recognition, dependency syntax analysis, etc., to identify core diagnostic elements such as symptoms, signs, tongue image, pulse image, and syndrome type in the diagnostic text. Then, based on the TCM diagnostic knowledge ontology, these initially identified diagnostic elements are further normalized and mapped to the predefined standard concepts in the ontology, eliminating the differences between synonyms and near-synonyms, and improving the standardization and interoperability of diagnostic features. For example, words such as "cough", "sputum", and "excessive sputum" are normalized into two standard symptom features of "cough" and "excessive sputum"; words such as "shortness of breath", "shortness of breath", and "shortness of breath" are normalized into one standard symptom feature of "shortness of breath". On the basis of normalization, technologies such as word vectors and semantic networks can also be used to semantically expand standard diagnostic feature words, discover implicit symptom and syndrome type associations, and further enrich the diagnostic feature set. At the same time, for different types of diagnostic elements, such as symptoms, signs, tongue and pulse, syndrome types, etc., the present invention also designs feature extraction templates and rules of different granularities, which not only ensures the completeness of feature extraction, but also takes into account the simplicity of feature representation.
[0053] Based on the above embodiment, as an optional embodiment, feature words are extracted from the patient's diagnosis information to obtain standard diagnosis feature words; including: S601, performing data cleaning on patient diagnosis information to obtain standard patient diagnosis information; Specifically, the present invention constructs a medical vocabulary for TCM four diagnostic information, including multiple medical concept categories such as symptoms, signs, tongue images, and pulse images, and each category is further subdivided into multiple standard entries. After obtaining the original diagnostic information of the patient, firstly, regular expressions, string matching and other methods are used to preliminarily filter the text, remove punctuation marks, special characters, redundant information, etc., and perform traditional and simplified conversion, full-width and half-width conversion, and unify the text format; then, the Chinese word segmentation tool is used to segment the diagnostic text, obtain the vocabulary sequence, and match it with the preset medical vocabulary to identify the standard medical terms and realize medical named entity recognition; then, natural language processing technologies such as part-of-speech tagging and dependency syntax analysis are used to judge the grammatical attributes and semantic roles of the vocabulary, screen out the core vocabulary related to the patient's condition description, and remove invalid information; further, the present invention also refers to the standard system of Chinese herbal medicine standard names, TCM disease classification and codes issued by the State Food and Drug Administration, standardizes the names of drugs and diseases, and unifies the representation of named entities. For new words not included in the vocabulary, the present invention uses machine learning methods such as conditional randomization to perform named entity recognition, and combines medical dictionaries, co-occurrence statistics and other methods to expand the vocabulary. Through the above process, the present invention ultimately converts the patient's non-standardized original diagnosis information into a series of standardized medical phrases to form structured and computable standard patient diagnosis information.
[0054] S602, extracting characteristic words from standard patient diagnosis information to obtain diagnosis characteristic words; Specifically, the present invention adopts a variety of feature extraction algorithms such as TF-IDF and TextRank to extract feature words from standardized patient diagnostic information from the perspectives of word frequency statistics, co-occurrence relationships, and semantic importance. Taking the TF-IDF algorithm as an example, the frequency of occurrence TF of each word in the diagnostic information and the document frequency IDF of the word in the entire diagnostic corpus are first counted, and then the importance of the word is measured by the product of TF and IDF. The higher the TF-IDF value, the stronger the word's ability to represent diagnostic information. The TextRank algorithm uses the co-occurrence relationship between words to construct a vocabulary network diagram, and iteratively calculates the centrality and authority of each vocabulary node to obtain the keywords with the highest semantic importance. Taking into account the characteristics of TCM diagnosis information, the present invention has made necessary improvements and optimizations on this basis: first, the TCM field vocabulary is introduced to improve the fit between feature words and TCM terminology; second, machine learning models such as logistic regression and support vector machine are integrated to improve the dialectical differentiation of feature words through supervised learning; third, the grammatical and semantic information of vocabulary is obtained by using methods such as part-of-speech tagging and dependency syntax analysis to highlight the characteristics of the patient's condition; fourth, new word discovery, outlier detection and other technologies are added to improve the robustness and adaptability of the algorithm. By comprehensively applying the above strategies, the present invention finally extracts a series of diagnostic feature words that have both text statistical characteristics and medical professional characteristics from the patient's diagnosis information.
[0055] S603, matching the diagnostic feature words with the standard disease word list to obtain standard diagnostic feature words.
[0056] Specifically, the present invention is based on the International Classification of Diseases in Traditional Chinese Medicine Code ICD-11-MMS issued by the WHO Western Pacific Regional Office, and constructs a standard vocabulary of TCM diseases with wide coverage and detailed entries. After obtaining diagnostic feature words, string matching, edit distance and other methods are used to calculate the similarity between each feature word and the standard entry in the disease vocabulary, and the entry with the highest similarity and exceeding the threshold is selected as the matching result to achieve the mapping of feature words to standard diseases. Considering the diversity of TCM disease naming, such as "same disease with different names" and "different diseases with the same name", the present invention introduces semantic analysis technology on the basis of vocabulary matching, and reveals the semantic association between diseases through methods such as knowledge graphs and semantic vectors, so as to improve the matching recall rate. For example, it can be known from the knowledge graph that "stomachache" and "epigastric pain" belong to the same disease spectrum, and the semantic similarity of "vertigo" and "dizziness" can be calculated through semantic vectors, and then supplemented by comprehensive judgment of etiology and pathogenesis, diseases with different expressions but the same essence can be identified. In addition, in order to handle new diseases not included in the vocabulary, the present invention also uses machine learning methods such as conditional random fields and support vector machines. By training the annotated disease corpus, the composition rules of disease names are automatically learned, and new words are automatically annotated and the disease vocabulary is dynamically updated. By integrating multiple strategies such as vocabulary matching, semantic analysis, and machine learning, the present invention ultimately converts diagnostic feature words into standard disease vocabulary that matches ICD-11-MMS.
[0057] S104, inputting the standard diagnostic feature words into the traditional Chinese medicine prescription knowledge base to screen the prescriptions and obtain a plurality of reference prescriptions.
[0058] Specifically, the present invention is based on the graph database query technology to efficiently and accurately match and retrieve standard diagnostic feature words in the traditional Chinese medicine prescription knowledge base. First, the patient's standard diagnostic feature words are represented as a query subgraph, in which the diagnostic feature words are used as nodes of the graph, and the associations between different feature words are used as edges of the graph. Then, the query subgraph is matched with the prescription graph in the knowledge base using the query language of the graph database, such as Cypher, Gremlin, etc., to find all prescription fragments containing the query subgraph. In the matching process, both the semantic similarity of the nodes is considered, such as considering "cough" and "sputum" as similar symptom features; and the structural similarity of the edges is also considered, such as considering "cough with thick yellow sputum" and "thick yellow sputum with cough" as similar symptom combinations. For each node and edge of the query subgraph, the prescription subgraph with the highest similarity is searched in the knowledge base as a candidate reference prescription. In order to control the scale of candidate prescriptions, the present invention can also set thresholds for node similarity and edge similarity, or limit the size of the maximum matching subgraph to balance the recommendation coverage and efficiency. In addition, the present invention can also dynamically adjust the matching strategy according to the severity of the patient's condition, such as the combination of single-flavor medicines for mild cases and the selection of repeated prescriptions for severe cases. Through the flexible query and reasoning mechanism of the graph database, the most relevant prescription knowledge can be quickly locked in the massive literature knowledge, greatly improving the efficiency and accuracy of prescription screening.
[0059] Based on the above embodiment, as an optional embodiment, the standard diagnostic feature words are input into the traditional Chinese medicine prescription knowledge base for prescription screening to obtain multiple reference prescriptions, including: S701, semantically analyzing the standard diagnostic feature words to obtain semantic key information; Specifically, the present invention integrates a variety of semantic analysis technologies based on rules, statistics, and deep learning to conduct a comprehensive analysis of standard diagnostic feature words. First, a predefined semantic role annotation set, such as "symptoms", "signs", "cause", "pathogenesis", etc., is used to explicitly annotate each feature word to clarify its semantic type in the description of the condition; at the same time, the business attributes of the feature words are further refined using dictionaries in the field of traditional Chinese medicine, such as traditional Chinese medicine, prescriptions, and internal organs. On this basis, through statistical learning models such as conditional random fields, the implicit semantic relationship between adjacent feature words is judged to form a semantic dependency tree, revealing the logical connection between the cause and symptoms, and the main symptoms and the concomitant symptoms. Furthermore, deep learning algorithms such as long short-term memory networks are used, with large-scale traditional Chinese medicine literature and electronic medical records as training corpus, to automatically learn semantic analysis rules, and dynamically optimize according to new and variable syndrome cases, and continuously improve the accuracy and adaptability of semantic understanding. Through the collaboration of multiple technologies, the present invention depicts the semantic connotation of standard diagnostic feature words from words to sentences, from the outside to the inside, and finally summarizes several semantic key information that is most valuable for syndrome differentiation and treatment, such as "wind-heat invading the lungs" and "liver depression and qi stagnation".
[0060] S702, matching the key information with the traditional Chinese medicine prescription knowledge base to obtain relevant prescription entries; Specifically, the present invention uses the Chinese medicine classics and Chinese medicine prescription manuals compiled by the State Administration of Traditional Chinese Medicine as the knowledge base framework, integrates the syndrome differentiation and treatment cases accumulated by the hospital information system and the Internet medical platform, and forms a set of Chinese medicine prescription knowledge bases with classification, detailed items and convenient query through natural language processing, knowledge engineering and other technologies. For the key diagnostic information to be matched, such as "heat toxicity" and "deficiency of both qi and yin", firstly, the prescription knowledge base is classified and organized by applying data mining algorithms such as topic models and clustering, and a tree topological structure between diseases, syndromes and prescriptions is constructed to narrow the matching search scope. On this basis, pre-processing such as entity linking and semantic disambiguation is carried out on the key diagnostic information, and the core words closely related to syndrome differentiation and treatment, such as "heat toxicity" and "deficiency of qi", are extracted as keywords for matching queries. Furthermore, information retrieval technologies such as inverted index and query expansion are used to quickly find several prescription items related to keywords and their confidences under the guidance of the disease and syndrome theme tree. Considering that there may be a complex mapping between syndromes and prescriptions, such as one-to-many or many-to-one, the present invention also introduces collaborative filtering, content-based recommendation and other algorithms, calculates the correlation between prescriptions from multiple dimensions such as drug composition, incompatibility, efficacy and indications, optimizes and adjusts the preliminary matching results, and finally obtains a set of recommended prescriptions that cover the overall situation of syndrome differentiation and are hierarchical. In addition, in order to dynamically absorb the experience and wisdom of famous old Chinese medicine practitioners from all over the country and continuously update the prescription knowledge base, the present invention has designed a collaborative knowledge collection and verification mechanism, in which clinicians, pharmaceutical experts, etc. regularly enter excellent medical records through online questionnaires, interactive dialogues, etc., and cross-review them, which not only ensures the continuous expansion of the knowledge base, but also takes into account the strict control of prescription quality.
[0061] S703, based on the incompatibility taboos of traditional Chinese medicine and the medication habits, the prescriptions in the relevant prescription items are screened to obtain a plurality of reference prescriptions.
[0062] Specifically, the present invention uses the Chinese medicine incompatibility taboos and the Chinese medicine prescription application guide issued by the National Pharmacopoeia Committee as the judgment criteria, and conducts rationality review on the relevant prescriptions generated by knowledge base matching one by one. First, the association rule mining, frequent item set analysis and other algorithms are used to extract the usage rules of each medicinal taste and drug pair from the prescription composition, and establish an empirical medication model with "monarch, minister, assistant and messenger" as the basic framework as a reference scale for prescription screening. For the prescriptions to be screened, natural language processing technologies such as attribute annotation and relationship extraction are first used to structure the information such as the dosage, usage, and function of the drug, and convert it into a computable mathematical model. On this basis, the prescription model is compared with the empirical medication rules using methods such as pattern matching and similarity calculation, and the combination of ingredients that violate the taboos such as nature and taste, meridians, mutual hatred and fear are identified, and the "eighteen anti-" and "nineteen fear" theoretical principles are combined to prune and improve. At the same time, for the commonly used and effective finished medicine compound prescriptions, fuzzy clustering and latent semantic analysis are carried out to explore their prescription rules and compatibility characteristics, and use them as ideal prescription templates to appropriately adjust prescriptions with missing medicinal flavors and imbalanced dosages. On the basis of the verification of incompatibility taboos, clinical medication habit factors such as regional differences and physical characteristics are further introduced, and the personalized prescription that best fits the patient's condition characteristics is found through principal component analysis and similarity matching. Taking into account the diverse interpretations of traditional Chinese medicine theory, an expert feedback link is also set up in the prescription screening and adjustment process. Senior Chinese medicine practitioners judge and correct the system screening results, integrate clinical experience and wisdom, and conduct evidence-based medical research on controversial prescriptions to continuously optimize the screening model. Finally, the present invention selects a number of preferred reference prescriptions that take into account empirical rules and adapt to patient characteristics from the matched related prescriptions, which is convenient for subsequent prescription weight analysis, clinical decision support, etc.
[0063] On the other hand, the present invention also provides a Chinese medicine prescription screening system based on AI, such as Figure 2 The system comprises: The data acquisition module 1 is used to acquire the traditional Chinese medicine prescription literature data and perform knowledge extraction on the traditional Chinese medicine prescription literature data to obtain structured knowledge data; Knowledge base construction module 2, used to construct a traditional Chinese medicine prescription knowledge base based on structured knowledge data; The standard diagnosis feature word acquisition module 3 is used to acquire patient diagnosis information and extract feature words from the patient diagnosis information to obtain standard diagnosis feature words; The reference prescription acquisition module 4 is used to input the standard diagnostic feature words into the traditional Chinese medicine prescription knowledge base for prescription screening to obtain multiple reference prescriptions.
[0064] Please refer to Figure 3 The application also discloses an electronic device. Figure 3 The electronic device 300 may include: at least one processor 301 , at least one network interface 304 , a user interface 303 , a memory 305 , and at least one communication bus 302 .
[0065] The communication bus 302 is used to realize the connection and communication between these components.
[0066] The user interface 303 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 303 may also include a standard wired interface and a wireless interface.
[0067] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0068] Among them, the processor 301 may include one or more processing cores. The processor 301 uses various interfaces and lines to connect various parts in the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 305, and calling data stored in the memory 305. Optionally, the processor 301 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field~Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 301 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 301, and it can be implemented separately through a chip.
[0069] Among them, the memory 305 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read~Only Memory). Optionally, the memory 305 includes a non-transitory computer-readable medium. The memory 305 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 305 may optionally be at least one storage system located away from the aforementioned processor 301. Refer to Figure 3 The memory 305 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application program for a flocculant addition analysis method.
[0070] exist Figure 3 In the electronic device 300 shown, the user interface 303 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 301 can be used to call the application program storing the road assessment method in the memory 305. When executed by one or more processors 301, the electronic device 300 executes one or more methods in the above-mentioned embodiments. It should be noted that for the aforementioned method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited to the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application. In the above embodiments, the description of each embodiment has its own emphasis. For the parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0071] In the several implementations provided in this application, it should be understood that the disclosed system can be implemented in other ways. For example, the system embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of the system or unit can be electrical or other forms.
[0072] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0073] The present application also provides a computer storage medium that can store multiple instructions, which are suitable for being loaded and executed by a processor as described above. Figure 1 The road assessment method of the embodiment shown in the figure can be found in the specific implementation process. Figure 1 The specific description of the illustrated embodiment will not be repeated here.
[0074] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0075] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, 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. The computer software product is stored in a memory, including a number of instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: various media that can store program codes, such as USB flash drives, mobile hard drives, magnetic disks or optical disks.
[0076] The above are only exemplary embodiments of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, those skilled in the art will easily think of other embodiments of the present disclosure.
[0077] This application is intended to cover any variation, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art not described in the present disclosure. The description and examples are to be regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.< / function> < / function> < / restrict> < / cause> < / contain> < / treat>
Claims
1. A method for screening Chinese medicine prescriptions based on AI, characterized in that: The method comprises: Acquiring traditional Chinese medicine prescription literature data, and performing knowledge extraction on the traditional Chinese medicine prescription literature data to obtain structured knowledge data; Building a traditional Chinese medicine prescription knowledge base based on the structured knowledge data; Acquire patient diagnosis information, and extract feature words from the patient diagnosis information to obtain standard diagnosis feature words; The standard diagnostic feature words are input into the traditional Chinese medicine prescription knowledge base for prescription screening to obtain a plurality of reference prescriptions.
2. The method according to claim 1, characterized in that The method of extracting knowledge from the traditional Chinese medicine prescription literature data to obtain structured knowledge data includes: Performing entity recognition processing on the traditional Chinese medicine prescription literature data to obtain core entities in the traditional Chinese medicine prescription literature; Performing relationship extraction based on the core entities and the traditional Chinese medicine prescription literature data to obtain semantic relationships between the core entities; Extracting the attributes of the core entity based on the core entity and the traditional Chinese medicine prescription literature data to obtain entity attributes; The entity attributes, the semantic relations between the core entities and the entity attributes are used as the structured knowledge data.
3. The method according to claim 2, characterized in that The entity recognition process is performed on the traditional Chinese medicine prescription document data to obtain the core entities in the traditional Chinese medicine prescription document, including: Performing text cleaning on the traditional Chinese medicine prescription literature data to obtain first literature data; Segmenting the first document data into phrases to obtain second document data; The second document data is compared with the corpus in a preset corpus to obtain the core entities in the traditional Chinese medicine prescription document.
4. The method according to claim 2, characterized in that: The extracting of relations based on the core entities and the TCM prescription literature data to obtain semantic relations between the core entities includes: Annotating the core entities in the traditional Chinese medicine prescription literature data according to the core entities to obtain annotated traditional Chinese medicine prescription literature data; Dependency syntactic analysis is performed on the annotated traditional Chinese medicine prescription literature data to obtain the semantic relationship between the core entities.
5. The method according to claim 2, characterized in that: The extracting of the attributes of the core entity based on the core entity and the traditional Chinese medicine prescription literature data to obtain entity attributes includes: Determining the dependency relationship between the vocabulary in the Chinese medicine prescription document data and the core entity according to the core entity and the Chinese medicine prescription document data; The attributes of the core entity are extracted according to the dependency relationship and a preset attribute vocabulary to obtain entity attributes.
6. The method according to claim 1, characterized in that The extracting of characteristic words from the patient's diagnosis information to obtain standard diagnosis characteristic words includes: Performing data cleaning on the patient diagnosis information to obtain standard patient diagnosis information; Extracting characteristic words from the standard patient diagnosis information to obtain diagnosis characteristic words; The diagnostic feature words are matched with a standard disease word list to obtain standard diagnostic feature words.
7. The method according to claim 1, characterized in that The standard diagnostic feature words are input into the traditional Chinese medicine prescription knowledge base for prescription screening to obtain multiple reference prescriptions, including: Performing semantic analysis on the standard diagnostic feature words to obtain semantic key information; Matching the key information with a traditional Chinese medicine prescription knowledge base to obtain relevant prescription entries; According to the incompatibility taboos and medication habits of traditional Chinese medicine, the prescriptions in the relevant prescription items are screened to obtain a plurality of reference prescriptions.
8. An AI-based Chinese medicine prescription screening system, characterized in that: include: A data acquisition module is used to acquire traditional Chinese medicine prescription literature data and perform knowledge extraction on the traditional Chinese medicine prescription literature data to obtain structured knowledge data; A knowledge base construction module, used to construct a traditional Chinese medicine prescription knowledge base based on the structured knowledge data; A standard diagnosis feature word acquisition module is used to acquire patient diagnosis information and extract feature words from the patient diagnosis information to obtain standard diagnosis feature words; The reference prescription acquisition module is used to input the standard diagnostic feature words into the traditional Chinese medicine prescription knowledge base for prescription screening to obtain multiple reference prescriptions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method according to any one of claims 1 to 7.
10. An electronic device, characterized in that: It includes a processor, a memory and a transceiver, the memory is used to store instructions, the transceiver is used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Traditional Chinese medicine classic famous prescription intelligent recommendation method based on knowledge graph technology
CN112614565A
Knowledge graph generation method, device and equipment
CN115982389A
Interrogation method and system based on knowledge graph and generative large model
CN117854748A
Knowledge graph-based method for recommending traditional chinese medicine prescriptions
US20240412838A1
Cited By
Traditional Chinese medicine prescription data analysis method and device based on OCR (Optical Character Recognition) and large model
CN119811698A
Traditional Chinese medicine classical famous prescription intelligent recommendation method based on knowledge graph technology
CN120690391A
Document big data processing method and system based on artificial intelligence
CN121212156A
A document big data processing method and system based on artificial intelligence
CN121212156B
Herbal medicine multi-mode knowledge enhanced disease reasoning system and method
CN121662388A