Information service platform oriented to traditional Chinese medicine researchers and construction and application method thereof
By constructing a TCM research intelligence platform and utilizing BERT, BiLSTM-CRF, and graph neural networks for entity recognition and relationship extraction, the problem of time-consuming and untargeted TCM research literature retrieval has been solved, enabling efficient and personalized acquisition of TCM research knowledge.
Patent Information
- Application Number
- CN202411035302.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-22
AI Technical Summary
Traditional methods of searching for TCM research literature are time-consuming and lack specificity. Existing knowledge graph question-answering systems have not been substantially applied in the field of TCM research and cannot meet the needs of TCM researchers for efficient and personalized knowledge acquisition.
A research intelligence platform for traditional Chinese medicine (TCM) is constructed. By acquiring TCM research literature, extracting entity types and relationships, building a knowledge model, receiving natural language queries from users, and using BERT, BiLSTM-CRF, and graph neural networks for entity recognition and relationship extraction, the query statements are optimized to improve retrieval efficiency.
It enables personalized and customized services for TCM research information, improves retrieval accuracy and efficiency, can handle complex queries, and provides relevant concept hints.
Smart Images

Figure CN119003555A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of traditional Chinese medicine data processing under big data processing, and specifically relates to an intelligence service platform for traditional Chinese medicine researchers and a construction and application method thereof. Background Art
[0002] TCM researchers are an important group of TCM research knowledge services. The most critical service demand is to classify, search and obtain various types of TCM research literature. The knowledge needs of TCM researchers are characterized by high timeliness, broad knowledge system and strong personalization. The traditional TCM research knowledge retrieval method relies on general keyword retrieval, such as entering words in the search box of the literature retrieval system, and the system retrieves the relevant fields of the literature included in the entire system database according to the words entered by the user. This retrieval process is long, time-consuming and lacks pertinence, and it is difficult to meet the current TCM researchers' needs for accuracy and convenience in obtaining TCM research knowledge. At the same time, although the knowledge graph question-answering system has become one of the hot research directions in the field of artificial intelligence in recent years, aiming to use the rich information contained in the knowledge graph to answer users' questions in natural language, there is no specific application in the field of TCM research, and the existing technology still faces severe challenges in processing complex queries, unseen entities and relationships, and improving the accuracy and efficiency of answers. Summary of the invention
[0003] The present invention provides a method for constructing and applying a traditional Chinese medicine scientific research intelligence platform, which is characterized by comprising the following steps:
[0004] Acquire TCM research intelligence information, and extract corresponding entity types and entity relationships therein according to the TCM research intelligence information;
[0005] According to the entity types and entity relationships, a knowledge model of scientific research intelligence information of traditional Chinese medicine is constructed, and the knowledge model of scientific research intelligence information of traditional Chinese medicine is stored in a database;
[0006] Receive text information input by users for querying scientific research information of traditional Chinese medicine;
[0007] According to the text information, query and return the scientific research intelligence knowledge of traditional Chinese medicine from the database;
[0008] The scientific research intelligence knowledge of traditional Chinese medicine is displayed on the user terminal.
[0009] The step of "obtaining TCM research intelligence information, and extracting corresponding entity types and entity relationships therein according to the TCM research intelligence information" further includes the following steps:
[0010] Obtaining scientific research literature on traditional Chinese medicine, which includes one or more of papers, journals, books, medical records, prescriptions, web pages, and patents;
[0011] Extracting conceptual entities from the TCM research literature, wherein the conceptual entities may include content-related entities and non-content-related entities, or literature-related entities and non-literature-related entities;
[0012] The step of "building a knowledge model of scientific research intelligence information of traditional Chinese medicine according to the entity types and entity relationships, and storing the knowledge model of scientific research intelligence information of traditional Chinese medicine in a database" further includes the following steps:
[0013] Summarizing entity types according to the extracted conceptual entities; each entity type is represented as a specific entity;
[0014] According to the entity types, extracting the relationship between entities as entity relationships, wherein the entity relationships refer to semantic relationships between entity types;
[0015] Constructing triples according to the entity types and entity relationships;
[0016] A knowledge model of scientific research intelligence information of traditional Chinese medicine is further constructed based on the constructed multiple triples, and the knowledge model of scientific research intelligence information of traditional Chinese medicine is stored in the database.
[0017] The step of "receiving text information input by a user for querying Chinese medicine research information" further includes the following steps:
[0018] Receiving a search entry selected by a user through a terminal interface, wherein the search entry is a different search field;
[0019] Receive the search term to be queried input by the user;
[0020] The step of "querying and returning TCM research intelligence knowledge from the database according to the text information" further includes the following steps:
[0021] According to the search entry selected by the user and the search term to be searched inputted, the scientific research intelligence knowledge of traditional Chinese medicine is searched and returned from the database;
[0022] The TCM research intelligence platform gives relevant concept prompts for the search terms to be queried, and users can search again based on the relevant concepts to query and return the TCM research intelligence knowledge from the database.
[0023] The step of "receiving text information input by a user for querying Chinese medicine research information" further includes the following steps:
[0024] Receive natural language to be queried input by a user;
[0025] The step of "querying and returning TCM research intelligence knowledge from the database according to the text information" further includes the following steps:
[0026] Converting the natural language to be queried input by the user into a query language recognizable by the database;
[0027] According to the query language that can be recognized by the database, the scientific research intelligence knowledge of traditional Chinese medicine is queried and returned from the database.
[0028] The step of "receiving text information input by a user for querying Chinese medicine research information" further includes the following steps:
[0029] Inputting the natural language to be queried input by the user into a query intention parsing module to obtain a graph representation of the question corresponding to the natural language to be queried, wherein the graph representation is a subgraph to be queried;
[0030] Inputting the graph representation of the problem into a graph representation-based reasoning module to obtain an optimized subgraph to be queried;
[0031] The database recognizable query language is generated according to the optimized subgraph to be queried.
[0032] The input layer in the query intent parsing module converts the received natural language query question into a vector form through pre-trained word embedding;
[0033] The embedding layer in the query intent parsing module uses the embedding layer of BERT to further enhance the contextual relevance of word vectors and generate word embeddings with rich semantic information;
[0034] The self-attention mechanism layer in the query intent parsing module uses the self-attention mechanism in the Transformer structure to capture the dependencies between different words in a sentence and strengthen the representation of key information;
[0035] The autoencoder layer in the query intent parsing module uses a Transformer encoder to encode sequence data, capture long-distance dependencies, and provide a global perspective for entity recognition and relationship extraction;
[0036] The entity recognition layer in the query intent parsing module uses the BiLSTM-CRF model to perform entity recognition based on the output of the encoding layer and mark the entities in the question;
[0037] The relationship extraction layer in the query intent parsing module predicts the potential relationship between entities based on the encoded sequence data using a point-to-point relationship classification network;
[0038] The graph construction layer in the query intent parsing module dynamically constructs a graph representation based on entity recognition and relationship extraction results, wherein the graph representation represents entities with nodes and represents relationships between entities with edges;
[0039] The output layer in the query intent parsing module further outputs the graph representation.
[0040] The received natural language query question Q is converted into a vector form through pre-trained word embedding, and the data enhancement method is used to generate the potential noise variant Q′;
[0041] Normalize and vectorize Q and Q′ respectively;
[0042] The traditional Chinese medicine graph search model M is used to extract features from Q and Q′, and feature vectors F(Q) and F(Q′) are obtained;
[0043] By comparing the differences between F(Q) and F(Q′), potential noise features are identified;
[0044] Apply an attention mechanism to the feature vector F(Q), focusing on features with high signal-to-noise ratio and suppressing noisy features;
[0045] Perform entity recognition on the processed feature vector F(Q) and mark the key entity E in the question;
[0046] At the same time, an auxiliary network is used to evaluate the signal-to-noise ratio of each entity and relationship label and filter out labels with low signal-to-noise ratio;
[0047] Perform relationship extraction on the identified key entity E to obtain the potential relationship R, and apply the verification mechanism to ensure that the potential relationship R is not misidentified due to noise;
[0048] The graph optimization method is used to further refine the graph G(Q) and generate the final graph representation G′(Q) and output it.
[0049] The step of "inputting the graph representation of the problem into the graph representation-based reasoning module to obtain an optimized subgraph to be queried" further includes the following steps:
[0050] Using a graph neural network to extract and optimize features of the input query problem graph, and utilizing the node and edge aggregation function of the graph neural network to further refine and strengthen the feature representation of nodes and edges in the graph, wherein nodes represent entities and edges represent relationships between entities;
[0051] Searching for the knowledge graph entity that best matches the entity node in the query problem graph G′(Q) in the knowledge graph of the database, and using cosine similarity to determine the best matching entity;
[0052] Determine the corresponding relationship of the edges in the query problem graph in the knowledge graph, and infer the corresponding relationship of each edge in the knowledge graph based on the matching results of the entity nodes and the characteristics of the edges;
[0053] According to the results of entity matching and relationship reasoning, an optimized subgraph to be queried corresponding to the query problem graph is retrieved in the knowledge graph;
[0054] A query question graph is generated based on the retrieved optimized subgraph to be queried, ensuring that the query question graph is highly consistent with the original query question graph in terms of structure and content.
[0055] The step of "querying and returning the Chinese medicine research intelligence knowledge from the database according to the query language recognizable by the database" further includes the following steps:
[0056] Recording the waiting time after the database receives the query statement;
[0057] When the waiting time is greater than a preset threshold, the query statement structure is optimized, and a preset proportion of data is selected from the database for trial retrieval;
[0058] When the trial search result shows that the optimized query statement is more efficient than the unoptimized query statement, and the database has not yet returned the query result, interrupt the previous query and send the optimized query statement to the database to obtain the scientific research intelligence knowledge of traditional Chinese medicine;
[0059] The "optimizing query statement structure" further includes the following steps:
[0060] The sub-matching statement used to match the query document content is adjusted before the sub-matching statement used to query other non-document related entities.
[0061] The present invention also provides a computer program product, comprising a computer program, characterized in that:
[0062] When the computer program is executed by the processor, the steps of the method for constructing and applying the TCM scientific research information platform described above are implemented.
[0063] The main contributions of the present invention are as follows:
[0064] First of all, the present invention starts from the needs of TCM researchers and studies the construction and application of the intelligence knowledge base in the field of TCM research. Through the study of the knowledge model in the field of TCM research, the main entities and their relationships in the TCM research intelligence knowledge base are clarified; based on the knowledge model, intelligence resources are used as an example to provide personalized and customized intelligence services with multiple exploration models for TCM researchers in need.
[0065] Secondly, the present invention can actively identify users' natural language questions in a user-friendly manner and provide corresponding TCM research intelligence knowledge. Compared with the prior art method that relies solely on keyword search, it greatly improves the accuracy and efficiency of retrieval.
[0066] Finally, the present invention focuses on the order of sorting matching statements in the query statement, and makes corresponding adjustments based on the experimental query results to further improve the retrieval efficiency of TCM scientific research intelligence knowledge. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 Steps for constructing and applying methods for the research intelligence platform of traditional Chinese medicine.
[0068] Figure 2 A knowledge model of scientific research intelligence information for traditional Chinese medicine that provides scientific research knowledge services for traditional Chinese medicine.
[0069] Figure 3 The module function flow chart is used to recognize the natural language input by the user and perform corresponding queries. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention more clearly understood, the spirit of the contents presented in the present invention will be described in detail and completely in the form of drawings and narratives below; any changes, modifications and substitutions made by any ordinary technician in the field after understanding the embodiments of the present invention, based on the technology taught by the present invention, without paying any creative labor, and all other embodiments obtained do not depart from the spirit of the contents of the present invention, that is, fall within the scope of the disclosure of the present invention.
[0071] like Figure 1 As shown, the embodiment of the present invention provides a method for constructing and applying a traditional Chinese medicine research intelligence platform, which is characterized by comprising the following steps:
[0072] S1: Acquire scientific research intelligence information of traditional Chinese medicine, and extract corresponding entity types and entity relationships therein according to the scientific research intelligence information of traditional Chinese medicine.
[0073] S2: Construct a knowledge model of scientific research intelligence information of traditional Chinese medicine according to the entity types and entity relationships, and store the knowledge model of scientific research intelligence information of traditional Chinese medicine in a database.
[0074] S3: Receive text information input by the user for querying scientific research information of traditional Chinese medicine.
[0075] S4: According to the text information, search and return the scientific research intelligence knowledge of traditional Chinese medicine from the database.
[0076] S5: Display the TCM research intelligence knowledge on the user terminal.
[0077] In one embodiment, step S1 "obtaining TCM research intelligence information, and extracting corresponding entity types and entity relationships therein according to the TCM research intelligence information" further includes the following steps:
[0078] S101: Access to research literature on traditional Chinese medicine.
[0079] The TCM research literature can be retrieved, screened, and sorted in advance by relevant personnel in the TCM research field manually or using tools. It contains research content in the field of TCM research, which may be about disease analysis conclusions, diagnosis and treatment methods and steps, drug principle preparation, etc. It can specifically include papers, journals, books, medical records, prescriptions, web pages, patents, etc.
[0080] S102: Extracting conceptual entities from the TCM research literature, wherein the conceptual entities may include content-related entities and non-content-related entities, or literature-related entities and non-literature-related entities.
[0081] Step S2 "constructing a knowledge model of TCM research intelligence information based on the entity types and entity relationships, and storing the knowledge model of TCM research intelligence information in a database" further includes the following steps:
[0082] S201: Summarize entity types according to the extracted conceptual entities; each entity type is represented as a specific entity.
[0083] An entity is a specific and independent thing in the TCM scientific research intelligence information knowledge model, and similar entities can be classified into the same entity type.
[0084] Specifically, based on the TCM language system, the knowledge extraction module generates TCM research intelligence information, extracts the corresponding entity types and entity relationships, and forms a knowledge graph for effective storage and management. Knowledge extraction realizes the extraction and integration of entity information such as knowledge concepts, attributes, relationships, and classifications of TCM research intelligence information, which is used to provide data support for the construction of the knowledge graph.
[0085] In some embodiments, one type of conceptual entity is content-related, which may include document titles, keywords, subject terms, characteristic terms, and subject classifications; another type of conceptual entity is non-content-related entities, i.e., external information unrelated to the document content, which may include authors, author units, funding funds, journal names, etc. As shown in the following table, each entity type can be represented as a specific entity, such as "Xiaoke" is a specific manifestation of the entity type "Keywords", and "China Academy of Chinese Medical Sciences" is a specific manifestation of the entity type "Institutions".
[0086]
[0087] In other embodiments, the conceptual entities may also include document-related entities and non-document-related entities; document-related entities may include document titles, authors, author units, journal names, websites, publishing organizations, ISBNs, DOIs, and other information entities used to identify various types of documents, and non-document-related entities may include symptoms, prescriptions, drugs, and other information entities given in the document that are not closely related to the document itself.
[0088] S202: Extracting relationships between entities as entity relationships according to the entity types.
[0089] The entity relationship refers to the semantic relationship between entity types, which is the basis for the connection between various entities in the knowledge model of TCM research intelligence information, and is also an important support for users to conduct corresponding knowledge retrieval. Through the study of entity type attributes, the relationship between entities can be established. Each entity type has its corresponding entity relationship and points to one or more fixed entity types, forming a triple in the form of "entity type-entity relationship-entity type" as shown in the following table, such as "author-affiliation-institution", "institution-located-geographical concept", etc.; specifically, the entity relationships that can be extracted and the triples formed are "Mai Min-affiliation-Dongguan Traditional Chinese Medicine Hospital, Guangdong Province" and "China Academy of Chinese Medical Sciences-located-Beijing".
[0090]
[0091]
[0092] In another embodiment, taking keywords as an example, the conceptual entities at the subordinate level may include symptoms, prescriptions, drugs, acupoints, main functions, symptom manifestations, tasks, works, diagnosis and treatment methods, etc. These conceptual entities have a semantic relationship of inclusion and being included with the keywords at the upper level, and are therefore determined to be an "inclusion" entity relationship.
[0093] In addition to the semantic relationship between entities, each entity type also has its own data attribute relationship. For example, the attributes of "author" include "email" and "telephone", the attributes of "fund" include "name" and "number", the attributes of "paper" include "abstract" and "language", and the attributes of "journal" include "ISBN", "publication year", "volume", "issue", etc.
[0094] S203: Constructing triples according to the entity types and entity relationships.
[0095] After extracting the entity types and entity relationships and before constructing specific triples, a knowledge fusion process is required. Since the extracted data may contain a large amount of redundant and erroneous information, the relationship between data is seriously flattened, lacking hierarchy and logic, the entities are connected and merged through the process of knowledge fusion, thereby eliminating conceptual ambiguity, eliminating redundant and erroneous information, and ensuring the quality of TCM research intelligence knowledge.
[0096] Specifically, the triples may be saved in the form of a resource description framework (RDF), such as <document, including, keywords>, <prescription, including, traditional Chinese medicine>.
[0097] S204: Further construct a knowledge model of scientific research intelligence information of traditional Chinese medicine according to the constructed multiple triples, and store the knowledge model of scientific research intelligence information of traditional Chinese medicine in the database.
[0098] In a specific embodiment, the database may be a graph database, and the graph database may specifically be a graph database such as Neo4j or JanusGraph.
[0099] Based on the above entity types and entity relationships, combined with the needs of TCM research knowledge services, the TCM research intelligence information knowledge sources are analyzed and sorted out, and further refined on the basis of entity types, a specific entity type subclass structure is established, and a TCM research intelligence information knowledge model for TCM research knowledge services is constructed, such as Figure 2 shown.
[0100] The extracted entity types can specifically include the first-level concept entity type: literature; the second-level concept entity type: people, funds, subject allocation, keywords, sources; the third-level concept entity type: serial number, title, abstract, language, date, reference, issue, volume, author unit, region, country, province, city and county, etc. The elliptical nodes of the knowledge model of TCM research intelligence information represent entity types; the rectangular nodes represent numerical types; the dotted lines between nodes represent relationship attributes and data attributes; the solid lines between nodes represent "is a" relationships, that is, the relationship from the child class to the parent class. If the starting node and the ending node of the connection are both entity types, then this attribute is a relationship attribute, the starting node is the definition domain of this relationship attribute, and the ending node is the value range of this relationship attribute; if the starting node of the connection is an entity type and the ending node is a numerical type, then this attribute is a data attribute, the starting node is the definition domain of this data attribute, and the ending node is the value range of this data attribute.
[0101] In one embodiment, step S3 "receiving text information input by a user for querying Chinese medicine research intelligence" further includes the following steps:
[0102] S301: receiving a search entry selected by a user through a terminal interface, wherein the search entry is a different search field.
[0103] S302: receiving a search term to be queried input by a user.
[0104] Step S4 "searching and returning TCM research intelligence knowledge from the database according to the text information" further includes the following steps:
[0105] S401: According to the search entry selected by the user and the search term to be queried inputted by the user, the scientific research intelligence knowledge of traditional Chinese medicine is searched and returned from the database.
[0106] S402: The TCM research intelligence platform gives relevant concept prompts for the search term to be queried, and the user can search again based on the relevant concepts to query and return the TCM research intelligence knowledge from the database.
[0107] In this embodiment, the user performs a field search of TCM scientific research intelligence knowledge by inputting the search terms to be queried. Keywords are the condensation of the main idea of a document and are also the search fields commonly used by users when performing searches. The subject terms are mapped to the Medical Subject Headings (MeSH) and the Traditional Chinese Medicine Subject Headings (TCMesh), and the subject classification numbers are mapped to the Chinese Library Classification.
[0108] The advantage of this embodiment is that the backend of the TCM research intelligence platform is connected to the TCM research knowledge organization system, including the TCM language system and the TCM clinical terminology system. Each keyword input by the user can be mapped to the standard concepts and the relationship between the concepts through the TCM research knowledge organization system, and the corresponding knowledge will be prompted to the user. For example, when the user searches for the keyword "diabetes", the TCM research intelligence platform can give the name of the TCM disease "Xiao Ke" related to "diabetes", and then provide the relevant symptoms of "Xiao Ke" "Qi Yin Deficiency Syndrome" "Liver and Kidney Yin Deficiency Syndrome", related diseases "Lung Xiao" "Xiao Ke Jue", related Chinese patent medicines "Shenqi Jiangtang Tablets" "Liuwei Dihuang Pills", etc. Users can click on these concepts to search again according to the relevant concept prompts of "diabetes"; when the user does not know that "Liuwei Dihuang Pills" can treat "diabetes", the TCM research intelligence platform can provide new knowledge prompts for the user.
[0109] Since the subject terms are mapped to the Medical Subject Headings (MeSH) and Traditional Chinese Medicine Subject Headings (TCMesh), the documents in the system have been subject-indexed. Therefore, when using the subject terms for searching, the existing knowledge of Mesh and TCMeSH will also be included. For example, in MeSH, diabetes contains multiple subordinate concepts. Therefore, when using "diabetes" as a subject term for searching, the knowledge documents with its subordinate concepts such as "prediabetes", "gestational diabetes", "type 1 diabetes", "latent autoimmune diabetes in adults" as subject term indexing will also be searched; similarly, when using "Xiao Ke" as a subject term for searching, the results will also include all knowledge documents with the subject terms "Xiao Qian", "Shang Xiao", "Zhong Xiao", and "Xia Xiao".
[0110] In one embodiment, step S3 "receiving text information input by a user for querying Chinese medicine research intelligence" further includes the following steps:
[0111] S311: Receive natural language to be queried input by the user.
[0112] Step S4 "searching and returning TCM research intelligence knowledge from the database according to the text information" further includes the following steps:
[0113] S411: Convert the natural language to be queried input by the user into a query language recognizable by the database.
[0114] S412: According to the query language recognizable by the database, query and return the TCM research intelligence knowledge from the database.
[0115] In this embodiment, the user can directly input the natural language to be queried to retrieve the knowledge of TCM research intelligence. For example, the user inputs "how to treat diabetes with TCM", and the system processes the corresponding natural language into a query language that the database can recognize, and then queries and returns the relevant TCM research intelligence knowledge.
[0116] Furthermore, the present invention provides a TCM research intelligence platform based on a question-answering system by integrating deep learning and graph theory to identify questions from TCM researchers and return TCM research intelligence knowledge. Users can enter more complex natural sentences than the general case, such as "Among the TCM medicines and methods for treating diabetes, are there any drugs and methods that play an auxiliary role in cancer treatment?"
[0117] In one embodiment, step S3 "receiving text information input by a user for querying Chinese medicine research intelligence" further includes the following steps:
[0118] S312: Input the natural language to be queried input by the user into a query intention parsing module to obtain a graph representation of the question corresponding to the natural language to be queried, and the graph representation is a subgraph to be queried.
[0119] In the present invention, the query intent parsing module includes two steps: question intent parsing and generating a graph representation. Among them, the question intent parsing includes an entity recognition step and a relationship extraction step, and a pre-trained neural network model (BERT) is used to parse the user's natural language questions, identify the key intent of the questions, and convert them into a graph representation in the subsequent steps. The query intent parsing module deeply captures the semantic features of the questions, extracts key entities and concepts, identifies the potential relationships between them, and uses negative log-likelihood loss as the loss function for entity recognition.
[0120] Specifically, the BERT model is used to encode the natural language to be queried input by the user to obtain deep semantic features; the semantic features are further processed through multiple layers in the bidirectional long short-term memory network (BiLSTM) to capture the sequence information in the question; the CRF layer is then applied to the sequence labeling task to identify and label the key entities in the question.
[0121] BiLSTM formula:
[0122] h t =BiLSTM(x t ,h t-1 )
[0123] CRF decoding formula:
[0124]
[0125] Loss function for entity recognition:
[0126] For entity recognition using BiLSTM-CRF, negative log-likelihood loss is used as the loss function for entity recognition, considering the overall optimal path for sequence labeling:
[0127]
[0128] Where N is the sequence length, y i is the true value of the i-th label, x i is the i-th input feature and θ is the model parameter.
[0129] The loss function of cross entropy is:
[0130] Graph Neural Network (GNN) is used to analyze and extract the relationship between entities in the question. Based on the output of BERT and BiLSTM, GNN can capture the complex interaction between entities and predict the possible relationship types between them. In the relationship extraction part, the relationship prediction of each entity pair is regarded as a multi-class classification problem, and the cross-entropy loss (Cross-Entropy Loss) training model is used to evaluate the difference between the predicted probability distribution and the true distribution.
[0131]
[0132] Where M is the number of samples, C is the number of categories, and y ic is the true label of category c in the i-th sample, is the corresponding probability predicted by the model.
[0133] In one embodiment, entities in the natural language to be queried input by the user are first identified and annotated; then, a graph neural network is used to analyze and extract the relationships between the entities in the natural language to be queried; finally, the extracted entity types and entity relationships are constructed into a graph representation of the user query, further comprising the following steps:
[0134] (1) The input layer in the query intent parsing module converts the received natural language query questions into vector form through pre-trained word embedding.
[0135] (2) The embedding layer in the query intent parsing module uses the BERT embedding layer to further enhance the contextual relevance of word vectors and generate word embeddings with rich semantic information.
[0136] (3) The self-attention mechanism layer in the query intent parsing module applies the self-attention mechanism in the Transformer structure to capture the dependencies between different words in a sentence and strengthen the representation of key information.
[0137] (4) The autoencoder layer in the query intent parsing module uses the Transformer encoder to encode sequence data, capture long-distance dependencies, and provide a global perspective for entity recognition and relationship extraction.
[0138] (5) The entity recognition layer in the query intent parsing module uses the BiLSTM-CRF model to perform entity recognition based on the output of the encoding layer and annotate the entities in the question.
[0139] (6) The relationship extraction layer in the query intent parsing module predicts the potential relationship between entities based on the encoded sequence data using a point-to-point relationship classification network.
[0140] (7) The graph construction layer in the query intent parsing module dynamically constructs a graph representation based on the entity recognition and relationship extraction results. The graph representation represents entities with nodes and represents the relationships between entities with edges.
[0141] (8) The output layer in the query intent parsing module further outputs the graph representation.
[0142] Since there may be various words in natural language that are irrelevant or meaningless to the query data, the above steps can be improved to improve the robustness of the query intent parsing module in the face of noisy data, identify and correct potential errors in the parsing process, and enhance the fault tolerance of the system. The specific steps include the following:
[0143] (1) The received natural language query question Q is converted into a vector through pre-trained word embedding, and the data augmentation method is used to generate the potential noise variant Q′.
[0144] (2) Perform normalization and vectorization operations on Q and Q′ respectively.
[0145] (3) The Traditional Chinese Medicine Graph Explorer (TCM) model is used to extract features of Q and Q′ to obtain feature vectors F(Q) and F(Q′).
[0146] (4) By comparing the differences between F(Q) and F(Q′), potential noise features are identified.
[0147] (5) Apply the attention mechanism to the feature vector F(Q), focusing on features with high signal-to-noise ratio and suppressing noisy features.
[0148] (6) Perform entity recognition on the processed feature vector F(Q) and label the key entities E in the question.
[0149] (7) At the same time, an auxiliary network is used to evaluate the signal-to-noise ratio of each entity and relation label and filter out labels with low signal-to-noise ratio.
[0150] (8) Perform relationship extraction on the identified key entity E to obtain the potential relationship R, and apply a verification mechanism to ensure that the potential relationship R is not a misidentification caused by noise.
[0151] (9) The graph G(Q) is further refined using graph optimization methods, and the final graph representation G′(Q) is generated and output.
[0152] In one embodiment, step S3 "receiving text information input by a user for querying Chinese medicine research intelligence" further includes the following steps:
[0153] S313: Input the graph representation of the problem into a graph representation-based reasoning module to obtain an optimized subgraph to be queried.
[0154] In this embodiment, the graph representation generated by the query intent parsing module is received by the graph representation reasoning module, and the graph neural network is used to perform deep reasoning in the knowledge graph to optimize the graph representation to accurately locate and retrieve the answer. Through the graph neural network, each entity node can integrate the information of its adjacent entity nodes to obtain an entity node representation that comprehensively considers the local network structure; this optimization process makes the entity representation richer and more accurate, which is helpful for subsequent entity matching and relationship reasoning steps.
[0155] The entity matching step is achieved by comparing the entity representation in the query problem graph with all entity representations in the knowledge graph; specifically, the similarity between the vector representation of each entity node in the database knowledge graph and the vector representation of each entity node in the query problem graph is calculated, and the knowledge graph entity with the highest similarity is selected as the matching entity. The relationship reasoning step is based on the optimized entity representation and the edge information in the original query problem graph: the system analyzes the edges connecting the two entities and predicts the types of knowledge graph relationships that may exist between these entities. The query intent parsing module retrieves the subgraph corresponding to the query problem graph in the knowledge graph based on the results of entity matching and relationship reasoning; the subgraph contains all the relevant information needed to answer the user's question and is used to construct the query statement to retrieve the final answer.
[0156] The above embodiment specifically includes the following steps:
[0157] (1) Using a graph neural network to extract and optimize the input query graph, and using the node and edge aggregation function of the graph neural network to further refine and strengthen the feature representation of the nodes and edges in the graph, where nodes represent entities and edges represent the relationship between entities; the aggregation function is completed using the following aggregation formula:
[0158]
[0159] Where A is the adjacency matrix, is the normalized adjacency matrix, D is the degree matrix of A, is the normalized degree matrix, H l is the node representation of the lth layer, W l is the weight of the layer and σ is the activation function.
[0160] (2) Searching for the knowledge graph entity that best matches the entity node in the query problem graph G′(Q) in the knowledge graph of the database, and using cosine similarity to determine the best matching entity.
[0161] (3) Determine the corresponding relationship between the edges in the query problem graph in the knowledge graph, and infer the corresponding relationship of each edge in the knowledge graph based on the matching results of the entity nodes and the characteristics of the edges.
[0162] (4) Based on the results of entity matching and relationship reasoning, retrieve the optimized subgraph to be queried SG corresponding to the query question graph G′(Q) in the knowledge graph.
[0163] (5) Generate a query problem graph G″(Q) based on the retrieved optimized subgraph SG to be queried, and ensure that the query problem graph G″(Q) is highly consistent with the original query problem graph G′(Q) in terms of structure and content.
[0164] The above optimization is implemented using the objective function of graph optimization. By minimizing the cost functions of nodes and edges in the graph, the structure of the query problem graph is optimized to better reflect the semantic logic of the problem. The objective function of graph optimization is as follows:
[0165]
[0166] Among them, V is the node set of graph G, E is the edge set of graph G, and C node (v) is the cost function of node v, C edge (u,v) is the cost function of the edge connecting nodes u and v.
[0167] In one embodiment, step S3 "receiving text information input by a user for querying Chinese medicine research intelligence" further includes the following steps:
[0168] S314: Generate a query language recognizable by the database according to the optimized subgraph to be queried.
[0169] In a specific embodiment, the generated database-recognizable query language may be a SPARQL query statement, which is used to query relevant information in a previously constructed knowledge base of scientific research intelligence on traditional Chinese medicine.
[0170] In one embodiment, step S4 "searching and returning TCM research intelligence knowledge from the database according to the text information" further includes the following steps:
[0171] The returned scientific research intelligence knowledge of traditional Chinese medicine includes one or more scientific research literature materials corresponding to the user's search content.
[0172] In this embodiment, since the number of keyword search tags allowed for users to select is large under the traditional Chinese medicine research knowledge retrieval method, and a large amount of data may also be generated in the process of users entering the natural language to be queried for querying, it is considered to optimize the database-recognizable query language that is finally generated to improve query efficiency.
[0173] Step S412 "searching and returning the TCM research intelligence knowledge from the database according to the query language recognizable by the database" further includes the following steps:
[0174] S4121: Record the waiting time after the database receives the query statement.
[0175] S4122: When the waiting time is greater than a preset threshold, the query statement structure is optimized, and a preset proportion of data is selected from the database for trial retrieval.
[0176] S4123: When the trial search result shows that the optimized query statement is more efficient than the unoptimized query statement, and the database has not yet returned the query result, the previous query is interrupted and the optimized query statement is sent to the database to obtain scientific research intelligence knowledge of traditional Chinese medicine.
[0177] Step S4123 "Optimize query statement structure" further includes the following steps:
[0178] S4124: Adjust the sub-matching statement used for matching the query document content to be before the sub-matching statement used for querying other non-document related entities.
[0179] The query statement may be SPARQL; the sub-matching statement is a sub-query statement in an overall query statement, used to match one or more groups of specific triples, and is a basic unit statement of a query.
[0180] In a specific embodiment, the TCM research intelligence platform can extract relevant concept entities and entity relationships based on the natural language input by the user. For example, when a user queries the medicinal materials contained in the prescription "Ma Huang Tang", the symptoms used for treatment, the efficacy and usage of the prescription, and the name of the paper containing "Ma Huang Tang", the author, the author's unit and other information, the SPARQL query statement constructed thereby is as follows:
[0181]
[0182] When optimizing a query statement, the order of executing different sub-matching statements will have a significant impact on the efficiency, so it is necessary to adjust the order of sub-matching statements in the SPARQL statement.
[0183] Specifically for the application scenario of the present invention, the sub-matching statement used for matching and querying document-related entities is adjusted to the front of the sub-matching statement used for querying non-document-related entities, and better execution efficiency is achieved in multiple experiments. This may be because the present invention is based on the Medical Subject Thesaurus (MeSH) and the Traditional Chinese Medicine Thesaurus (TCMesh), and its knowledge model organization structure is based on its own document information. Compared with non-document information related to traditional Chinese medicine such as medicinal materials, the document information has a higher model level. Retrieving entities such as medicinal material information requires going deep into the bottom of the model organization structure, and it is more efficient to prioritize the retrieval of document information. The sub-matching statement used for matching and querying document-related entities includes matching statements for querying document titles, authors, author units, journal names, websites, publishing organizations, ISBNs, DOIs and other document-related entity contents.
[0184] In the above embodiment, the optimized SPARQL query statement is as follows:
[0185]
[0186] In one embodiment, step S5 "displaying the TCM research intelligence knowledge on the user terminal" further includes the following steps:
[0187] Based on the entity types and entity relationships of the TCM research intelligence knowledge base, combined with the Medical Subject Headings (MeSH) and Traditional Chinese Medicine Subject Headings (TCMesh), multi-dimensional and multi-level filtering conditions are dynamically generated, and users can refine the filtering search results step by step according to the filtering conditions.
[0188] The display may also include: automatically identifying other entity names in the TCM research intelligence knowledge base where the concept entity is located, as well as the concept names involved in the Medical Subject Thesaurus (MeSH) and the TCM Subject Thesaurus (TCMesh); on the search result page and entity details page, if other entity names or concept names are identified, a dynamic link is automatically generated; the user clicks on the dynamic link to view the detailed information of the corresponding concept entity. For example, the user clicks on the author name "Wang Zhidan" on the search result page. Since the author is a concept entity in the background knowledge base, the information box on the right will switch to display the entity information of the author; similarly, if the concept entity displayed in the information box on the right is other entities in the knowledge base, it will also be displayed in the form of a link, and clicking again will switch to display the corresponding entity information.
[0189] The display may also include: if the TCM research intelligence platform can identify the entity names in the TCM research intelligence knowledge base or the concept names involved in the Medical Subject Thesaurus (MeSH) and the Traditional Chinese Medicine and Pharmacy Subject Thesaurus (TCMesh) based on the query statement input by the user, the system can use a visual entity relationship network to display all relevant concept entities; the user can click on the relevant concept entities in the visual entity relationship network to continue searching for relevant literature.
[0190] The display may also include: sorting the retrieved TCM scientific research intelligence knowledge according to a sorting algorithm, and displaying the sorted TCM scientific research intelligence knowledge on a user terminal; the TCM scientific research intelligence knowledge may include the document as a whole, or document-related information such as the document title, author, etc., or non-document-related information such as drugs, prescriptions, etc. in the document.
[0191] An embodiment of the present invention also provides a computer program product, including a computer program, which is stored in a non-volatile computer-readable storage medium and executed by a processor to complete the method for constructing and applying a traditional Chinese medicine scientific research intelligence platform as described in any embodiment of the present invention.
[0192] The non-volatile computer-readable storage medium may be a computer-readable signal medium or a computer-readable storage medium.
[0193] Computer-readable information media may be: electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or components, or any suitable combination of the above media; computer-readable storage media may specifically include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above media.
[0194] In this embodiment, a computer-readable storage medium may be any tangible medium that contains or stores a computer program, which may be used by, or in combination with, an instruction execution system, apparatus, or device.
[0195] The methods in the above embodiments of the present invention may be implemented in various hardware, software coding or a combination of the two. For example, the embodiments of the present invention may also represent program codes for executing the above methods in a data signal processor, and may also involve multiple functions performed by a computer processor, a digital signal processor, a microprocessor or a field programmable gate array. The above processor may be configured according to the present invention to perform specific tasks, which may be completed by executing machine-readable software code or firmware code that defines the specific methods disclosed by the present invention. The software code or firmware code may be represented as different program languages and different formats or forms, and may also represent different target platform compiled software codes. However, different code styles, types and languages of software codes, firmware codes and other types of configuration codes for performing related tasks according to the present invention will not deviate from the spirit and scope of the present invention.
[0196] It is known to those skilled in the art that the above disclosure is a preferred embodiment of the present invention; any obvious changes, readjustments and substitutions made by any ordinary technician in the field without creative work will not deviate from the protection scope of the present invention.
Claims
1. A method for constructing and applying a traditional Chinese medicine research intelligence platform, characterized in that: The steps include: Acquire TCM research intelligence information, and extract corresponding entity types and entity relationships therein according to the TCM research intelligence information; According to the entity types and entity relationships, a knowledge model of scientific research intelligence information of traditional Chinese medicine is constructed, and the knowledge model of scientific research intelligence information of traditional Chinese medicine is stored in a database; Receive text information input by users for querying scientific research information of traditional Chinese medicine; According to the text information, query and return the scientific research intelligence knowledge of traditional Chinese medicine from the database; The scientific research intelligence knowledge of traditional Chinese medicine is displayed on the user terminal.
2. The method for constructing and applying a TCM research information platform according to claim 1, characterized in that: The step of "obtaining TCM research intelligence information, and extracting corresponding entity types and entity relationships therein according to the TCM research intelligence information" further includes the following steps: Obtaining scientific research literature on traditional Chinese medicine, which includes one or more of papers, journals, books, medical records, prescriptions, web pages, and patents; Extracting conceptual entities from the TCM research literature, wherein the conceptual entities may include content-related entities and non-content-related entities, or literature-related entities and non-literature-related entities; The step of "building a knowledge model of scientific research intelligence information of traditional Chinese medicine according to the entity types and entity relationships, and storing the knowledge model of scientific research intelligence information of traditional Chinese medicine in a database" further includes the following steps: Summarizing entity types according to the extracted conceptual entities; each entity type is represented as a specific entity; According to the entity types, extracting the relationship between entities as entity relationships, wherein the entity relationships refer to semantic relationships between entity types; Constructing triples according to the entity types and entity relationships; A knowledge model of scientific research intelligence information of traditional Chinese medicine is further constructed based on the constructed multiple triples, and the knowledge model of scientific research intelligence information of traditional Chinese medicine is stored in the database.
3. The method for constructing and applying a TCM research information platform according to claim 1, characterized in that: The step of "receiving text information input by a user for querying Chinese medicine research information" further includes the following steps: Receiving a search entry selected by a user through a terminal interface, wherein the search entry is a different search field; Receive the search term to be queried input by the user; The step of "querying and returning TCM research intelligence knowledge from the database according to the text information" further includes the following steps: According to the search entry selected by the user and the search term to be searched inputted, the scientific research intelligence knowledge of traditional Chinese medicine is searched and returned from the database; The TCM research intelligence platform gives relevant concept prompts for the search terms to be queried, and users can search again based on the relevant concepts to query and return the TCM research intelligence knowledge from the database.
4. The method for constructing and applying a TCM research information platform according to claim 1, characterized in that: The step of "receiving text information input by a user for querying Chinese medicine research information" further includes the following steps: Receive natural language to be queried input by a user; The step of "querying and returning TCM research intelligence knowledge from the database according to the text information" further includes the following steps: Converting the natural language to be queried input by the user into a query language recognizable by the database; According to the query language that can be recognized by the database, the scientific research intelligence knowledge of traditional Chinese medicine is queried and returned from the database.
5. The method for constructing and applying a TCM research information platform according to claim 4, characterized in that: The step of "receiving text information input by a user for querying Chinese medicine research information" further includes the following steps: Inputting the natural language to be queried input by the user into a query intention parsing module to obtain a graph representation of the question corresponding to the natural language to be queried, wherein the graph representation is a subgraph to be queried; Inputting the graph representation of the problem into a graph representation-based reasoning module to obtain an optimized subgraph to be queried; The database recognizable query language is generated according to the optimized subgraph to be queried.
6. The method for constructing and applying a TCM research information platform according to claim 5, characterized in that: The input layer in the query intent parsing module converts the received natural language query question into a vector form through pre-trained word embedding; The embedding layer in the query intent parsing module uses the embedding layer of BERT to further enhance the contextual relevance of word vectors and generate word embeddings with rich semantic information; The self-attention mechanism layer in the query intent parsing module uses the self-attention mechanism in the Transformer structure to capture the dependencies between different words in a sentence and strengthen the representation of key information; The autoencoder layer in the query intent parsing module uses a Transformer encoder to encode sequence data, capture long-distance dependencies, and provide a global perspective for entity recognition and relationship extraction; The entity recognition layer in the query intent parsing module uses the BiLSTM-CRF model to perform entity recognition based on the output of the encoding layer and mark the entities in the question; The relationship extraction layer in the query intent parsing module predicts the potential relationship between entities based on the encoded sequence data using a point-to-point relationship classification network; The graph construction layer in the query intent parsing module dynamically constructs a graph representation based on entity recognition and relationship extraction results, wherein the graph representation represents entities with nodes and represents relationships between entities with edges; The output layer in the query intent parsing module further outputs the graph representation.
7. The method for constructing and applying a TCM research information platform according to claim 6, characterized in that: The received natural language query question Q is converted into a vector form through pre-trained word embedding, and the data enhancement method is used to generate the potential noise variant Q′; Normalize and vectorize Q and Q′ respectively; The traditional Chinese medicine graph search model M is used to extract features from Q and Q′, and feature vectors F(Q) and F(Q′) are obtained; By comparing the differences between F(Q) and F(Q′), potential noise features are identified; Apply an attention mechanism to the feature vector F(Q), focusing on features with high signal-to-noise ratio and suppressing noisy features; Perform entity recognition on the processed feature vector F(Q) and mark the key entity E in the question; At the same time, an auxiliary network is used to evaluate the signal-to-noise ratio of each entity and relationship label and filter out labels with low signal-to-noise ratio; Perform relationship extraction on the identified key entity E to obtain the potential relationship R, and apply the verification mechanism to ensure that the potential relationship R is not misidentified due to noise; The graph optimization method is used to further refine the graph G(Q) and generate the final graph representation G′(Q) and output it.
8. The method for constructing and applying a TCM research information platform according to any one of claims 5 to 7, characterized in that: The step of "inputting the graph representation of the problem into the graph representation-based reasoning module to obtain an optimized subgraph to be queried" further includes the following steps: Using a graph neural network to extract and optimize features of the input query problem graph, and utilizing the node and edge aggregation function of the graph neural network to further refine and strengthen the feature representation of nodes and edges in the graph, wherein nodes represent entities and edges represent relationships between entities; Searching for the knowledge graph entity that best matches the entity node in the query problem graph G′(Q) in the knowledge graph of the database, and using cosine similarity to determine the best matching entity; Determine the corresponding relationship of the edges in the query problem graph in the knowledge graph, and infer the corresponding relationship of each edge in the knowledge graph based on the matching results of the entity nodes and the characteristics of the edges; According to the results of entity matching and relationship reasoning, an optimized subgraph to be queried corresponding to the query problem graph is retrieved in the knowledge graph; A query question graph is generated based on the retrieved optimized subgraph to be queried, ensuring that the query question graph is highly consistent with the original query question graph in terms of structure and content.
9. The method for constructing and applying a TCM research information platform according to claim 4, characterized in that: The step of "querying and returning the Chinese medicine research intelligence knowledge from the database according to the query language recognizable by the database" further includes the following steps: Recording the waiting time after the database receives the query statement; When the waiting time is greater than a preset threshold, the query statement structure is optimized, and a preset proportion of data is selected from the database for trial retrieval; When the trial search result shows that the optimized query statement is more efficient than the unoptimized query statement, and the database has not yet returned the query result, interrupt the previous query and send the optimized query statement to the database to obtain the scientific research intelligence knowledge of traditional Chinese medicine; The "optimizing query statement structure" further includes the following steps: The sub-matching statement used to match the query document content is adjusted before the sub-matching statement used to query other non-document related entities.
10. A computer program product, comprising a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for constructing and applying a traditional Chinese medicine scientific research information platform as described in any one of claims 1 to 9 are implemented.
