Medical conference content identification model and identification method
By combining large language model and RAG fusion technology, the medical industry knowledge graph and fine-tuning model is solved, and the challenges of existing UIE models in medical conference content recognition are achieved, achieving higher recognition accuracy and generalization capabilities.
Patent Information
- Application Number
- CN202411220432.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2025-02-07
AI Technical Summary
The existing UIE models have challenges in the precise identification and integration of medical conference content, including the model's focus on a single field, weak generalization ability, lack of inference ability for complex and long texts, and high update and iteration costs.
Using large language model and RAG fusion technology, the identification model of medical conference content is obtained by building a knowledge graph of the medical industry, pre-training a large language model, producing a Fine-tune corpus dataset, building a Prompt template and fine-tuning it, combined with incremental weight optimization, and obtaining the identification model of medical conference content .
It improves the generalization ability of the model, can more accurately identify and integrate medical conference content, has high accuracy and adaptability, and reduces iteration costs.
Smart Images

Figure CN119396948A_ABST
Abstract
Description
Technical Field
[0001] The present invention mainly relates to technical fields such as natural language processing, medical information technology, artificial intelligence and content recognition. Background Art
[0002] With the rapid development of the medical industry, medical conferences have become an important platform for the exchange of medical information. However, the recording and organization of conference content still relies heavily on manual work, which is inefficient. In recent years, with the development of large language model technology, automatic processing and understanding of natural language texts have become possible, but there are still challenges in the accurate recognition and integration of medical conference content.
[0003] Named entity recognition (NER) is an important task in the field of natural language processing (NLP). Accurately identifying the required core entities from the input unstructured natural language text and performing structured extraction helps to efficiently grasp the key information of the document to serve downstream tasks. Its recognition accuracy and recall rate directly affect the quality of downstream dependent tasks.
[0004] UIE (Universal Information Extraction) is a unified framework for universal information extraction UIE proposed by Yaojie Lu and others in ACL-2022. This framework realizes unified modeling of tasks such as entity extraction, relationship extraction, event extraction, sentiment analysis, and enables good migration and generalization capabilities between different tasks. In order to facilitate everyone to use the powerful capabilities of UIE, PaddleNLP draws on the methods of this paper, and based on the ERNIE 3.0 knowledge enhancement pre-training model, trains and open-sources the first Chinese universal information extraction model UIE. This model can support the extraction of key information without restrictions on industry fields and extraction targets, achieve zero-sample fast cold start, and has excellent small sample fine-tuning capabilities, and can quickly adapt to specific extraction targets.
[0005] However, traditional UIE models are limited by their lack of semantic cognition of the real world. Most of them rely on a large amount of labeled data for repeated training in vertical fields, which leads to the following shortcomings of such methods:
[0006] (1) The model focuses on a single field and has weak generalization capabilities. Due to the limited semantic space, the model has weak recognition capabilities for untrained scenarios and requires continuous addition of labeled data to adapt to new business scenarios.
[0007] (2) Lack of reasoning ability for complex and long texts; can only understand the current sentence, lacking the ability to understand contextual content and spoken expressions that deviate from the training data.
[0008] (3) Slow updates and high iteration costs. Improving the performance of the model depends on retraining with a large amount of manually annotated data. Each update of the entity type requires retraining with a large amount of scene data. Summary of the invention
[0009] The technical problem to be solved by the present invention is to provide a recognition model and method for medical conference content, and to perform natural language processing on the medical conference content using a large language model and RAG fusion technology to solve the problems existing in the prior art.
[0010] In a first aspect, the present invention provides a recognition model for medical conference content, which is obtained by the following process:
[0011] S11. Build a knowledge graph for the medical industry, extract the required SPO triples from it to generate dialogue corpus, and generate a medical industry corpus dataset;
[0012] S12, using the medical industry corpus dataset to pre-train the large language model, so that the large language model can integrate the required medical industry knowledge;
[0013] S13. Create a Fine-tune corpus dataset, including:
[0014] The ability to construct structured output question-answer data pairs and output JSON structured text under specified prompt words through a specific instruction specification model; the specific instruction specification model is the prompt words returned in JSON format;
[0015] Construct key information identification and annotation data according to vertical field business requirements; the vertical field business requirements include conference announcement documents in the conference notification scenario; the key information identification and annotation data includes dictionary pairs of meeting time, meeting location and participants;
[0016] The structured output question-answer data pairs and the key information identification and annotation data constitute the Fine-tune corpus data set;
[0017] S14, constructing a Prompt template, wherein the Prompt template includes three parts: instruction, question information and auxiliary information;
[0018] S15. Based on the Fine-tune corpus dataset and the Prompt template, fine-tune the pre-trained large language model on the downstream task to make it effectively adapt to the new task;
[0019] S16. Add an incremental weight to optimize the fine-tuned large language model to obtain a recognition model for medical conference content.
[0020] In a second aspect, the present invention provides a method for identifying medical conference content, characterized in that the following process is performed using the recognition model for medical conference content described in the first aspect:
[0021] S21, constructing a document knowledge base according to the content documents to be identified input by the user; the content documents to be identified include a medical conference invitation document and a medical conference notification document;
[0022] S22. By interacting with the user, the entity recognition structured data of the model response is returned in the form of questions and answers.
[0023] The method provided by the present invention uses a large language model and RAG fusion technology to identify the content of medical conferences, and has at least the following technical effects or advantages:
[0024] (1) The present invention uses rich corpus to pre-train a large language model with complex structure and large number of parameters, so that the large language model can learn sufficient industry knowledge and language structure, can process complex semantic information, and can be migrated to various vertical fields with only a small amount of fine-tuning of annotated data, thereby having better generalization ability.
[0025] (2) The present invention constructs a document knowledge base in the field of medical conferences for retrieval, provides a knowledge source for the large language model, and combines RAG fusion technology to improve the performance of text generation and retrieval, improve the accuracy and relevance of answers, and enable the large language model to focus on the highly relevant parts of medical conference documents, thereby having higher accuracy.
[0026] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The present invention will be further described below in conjunction with embodiments with reference to the accompanying drawings.
[0028] Figure 1 This is a flow chart of a method according to Embodiment 1 of the present invention;
[0029] Figure 2 This is a flow chart of the method of Embodiment 2 of the present invention;
[0030] Figure 3 This is a flow chart of the interaction process between the user and the recognition model of medical conference content in the second embodiment of the present invention. DETAILED DESCRIPTION
[0031] The embodiment of the present application provides a recognition model and recognition method for medical conference content, and uses a large language model and RAG fusion technology to perform natural language processing on the medical conference content, so that the large language model has better generalization ability and the recognition has higher accuracy.
[0032] The technical solution in the embodiment of the present application has the following general idea: using a large language model and RAG fusion technology to identify the content of medical conferences, using rich corpus to pre-train a large language model with complex structure and large number of parameters, so that the large language model can learn sufficient industry knowledge and language structure, can handle complex semantic information, and can be migrated to various vertical fields with only a small amount of fine-tuning of annotated data, thus having better generalization ability. By constructing a document knowledge base in the field of medical conferences for retrieval, providing a knowledge source for the large language model, combined with RAG fusion technology, the performance of text generation and retrieval is improved, the accuracy and relevance of answers are improved, and the large language model is focused on the highly relevant parts of medical conference documents, thus having higher precision.
[0033] Embodiment 1
[0034] like Figure 1 As shown, this embodiment provides a recognition model for medical conference content, including the following steps:
[0035] S11. Build a knowledge graph for the medical industry, extract the required SPO triples from it to generate dialogue corpus, and generate a medical industry corpus dataset.
[0036] The medical industry knowledge graph is based on the International Medical Classification ICD-11 and Peking University CMeKG Chinese Medical Knowledge Graph, combined with internal data, and contains multiple entity types and 33 abstract relationships such as disease names, symptoms, examination methods, drugs, and treatment methods. During the training process, triple relationships such as <gout, drug treatment, colchicine> are randomly extracted from the graph as basic knowledge, and sent to the pre-trained dialogue generation model to generate question-answering dialogues, which are manually verified and revised to generate industry corpus datasets.
[0037] S12. Pre-train the large language model using the medical industry corpus dataset, so that the large language model can integrate the required medical industry knowledge.
[0038] S13. Create a Fine-tune corpus dataset, including:
[0039] The ability to construct structured output question-answer data pairs and output JSON structured text under specified prompt words through a specific instruction specification model; the specific instruction specification model is the prompt words returned in JSON format;
[0040] Construct key information identification and annotation data according to vertical business needs; the vertical business needs include conference announcement documents in various conference notification scenarios; the key information identification and annotation data include dictionary pairs of conference time, conference location, and participants; the vertical data set is described as follows: the source includes open source data sets, data produced through dialogues generated by other large language models, and self-produced data. The purpose is to train the model to output JSON structured text under specified prompt words through a specific instruction specification model, for example:
[0041] Prompt command: Please identify the required entity based on the input and return it in JSON format
[0042] {
[0043] Input: "The meeting was held in Tongliao City, Inner Mongolia Autonomous Region",
[0044] "Entity Type": "Meeting Place"
[0045] Output: {"address": "Tongliao City, Inner Mongolia Autonomous Region"}
[0046] }.
[0047] The structured output question-answer data pair and the key information identification and annotation data constitute the Fin e -tun e Corpus dataset.
[0048] The structure of the key information identification annotation data is a four-tuple structure, where the four-tuple includes natural text, entity type, question and structured entity answer, and each entity type c i The questions constitute the question set Query = (q1, q2, ...q n ) and the corresponding annotated entity list Response = (r1, r2, ... r n ), if a natural text contains multiple entity types, a plural quadruple will be generated corresponding to the categories contained.
[0049] S14. Construct a Prompt template, wherein the Prompt template includes three parts: instruction, question information and auxiliary information.
[0050] S15. Based on the Fine-tune corpus dataset and the Prompt template, fine-tune the pre-trained large language model on the downstream task to make it effectively adapt to the new task;
[0051] S16. Add an incremental weight to optimize the fine-tuned large language model, realize the weight fusion of the large language model, and obtain the recognition model of the medical conference content.
[0052] Since directly updating the weights of the large language model may cause the generalization performance of the model to deteriorate, it is necessary to optimize the fine-tuned large language model by adding an incremental weight. The optimization is based on supervised learning based on a low-rank adaptive algorithm; the training data is in the form of dialogue pairs:
[0053] P={(x i , r i )}, i=1,…,N;
[0054] Among them, P is the training question and answer corpus, x i For the Prompt that combines the triples, r i is the corresponding structured response, N is the total number of training samples;
[0055] The initial weight of the model is fixed to W0, the parameter increment ΔW is optimized, and the maximized objective function is:
[0056]
[0057] Among them, N is the total number of training samples, x t For the input problem, r t For corresponding recovery; For the input x t Answer r under the condition t The conditional probability of
[0058] The LoRA model achieves the same effect as ΔW by updating two low-dimensional matrices;
[0059] h=W0x+ΔWx=W0x+BAx;
[0060] Among them, h is the final feature matrix of the hidden layer; x∈R m×n is the input feature of the hidden layer, m is the feature dimension, and n is the number of samples input to the model in batches; B∈R m×r , A∈R r×m They are two low-rank matrices, whose rank r is much smaller than the rank m of the original weight matrix W, thereby greatly reducing the computational complexity of the model.
[0061] Embodiment 2
[0062] like Figure 2 As shown, this embodiment provides a method for identifying medical conference content, using the medical conference content identification model as described in the first embodiment to perform the following process:
[0063] S21. Building a document knowledge base based on the content documents to be identified input by the user; the content documents to be identified include a medical conference invitation document and a medical conference notification document; specifically including:
[0064] like Figure 3 As shown, OCR and XML are used to read the document content extractor to recognize the content document to be recognized input by the user to obtain the recognized text;
[0065] Segmenting the recognized text according to special semantic characters to obtain initial paragraph groups, wherein the special semantic characters are punctuation marks;
[0066] Greedy merge the text segments that do not reach the target length to obtain text segments of the specified length. Multiple text segments of the specified length N i (i=1,2,…n) form a text paragraph group (N1,N2,…N n ); The length depends on the physical memory size and accuracy requirements. Generally, it is set to 100-250 to ensure the content relevance of the word vector;
[0067] For the text paragraph group (N1, N2, ... N n ) is segmented and vectorized by the Bert or BAAI pre-trained language model to obtain the word vector C corresponding to each text segment. i ∈R m ; Multiple word vectors C i Composed word vector group (C1, C2, ...C n );
[0068] The word vector group (C1, C2, ...C n ) is stored in the FAISS vector database, and the corresponding text segment is stored in the Document serialization storage as the document knowledge base.
[0069] S22. By interacting with the user, the entity recognition structured data of the model response is returned in the form of questions and answers. Specifically, it includes:
[0070] Deploy a recognition model for medical conference content and fix a prompt template for conference content recognition questions. The prompt template consists of three parts: instructions, question information, and auxiliary information.
[0071] After the user inputs the document to be identified, the text content of the document to be identified is extracted, and the text is sliced and vectorized, and stored to generate a document knowledge base; at the same time, the entity type keywords to be identified are segmented and vectorized using the Bert or BAAI pre-trained language model, and similarity matching is performed in the document knowledge base according to the Euclidean distance or cosine similarity. The matching results are arranged in descending order, and the top K text splicing is taken as auxiliary information and added to the Prompt template; in the process of similarity matching in the document knowledge base, the HNSW or IVFFLAT search algorithm is also used to improve the retrieval efficiency.
[0072] The preset question set Query and the reference knowledge in the matching result are replaced with the question information and auxiliary information part of the Prompt template, and the final Prompt is provided as input to the large language model, and the model result is returned in the form of question and answer, and formatted JSON data is output.
[0073] In summary, the present invention uses a large language model and RAG fusion technology to identify the content of medical conferences, which has at least the following technical effects or advantages:
[0074] (1) The present invention uses rich corpus to pre-train a large language model with complex structure and large number of parameters, so that the large language model can learn sufficient industry knowledge and language structure, can process complex semantic information, and can be migrated to various vertical fields with only a small amount of fine-tuning of annotated data, thereby having better generalization ability.
[0075] (2) The present invention constructs a document knowledge base in the field of medical conferences for retrieval, provides a knowledge source for the large language model, and combines RAG fusion technology to improve the performance of text generation and retrieval, improve the accuracy and relevance of answers, and enable the large language model to focus on the highly relevant parts of medical conference documents, thereby having higher accuracy.
[0076] Although the specific implementation modes of the present invention are described above, those skilled in the art should understand that the specific implementation modes described are only illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included in the scope of protection of the claims of the present invention.
Claims
1. A recognition model for medical conference content, characterized by: Obtained through the following process: S11. Build a knowledge graph for the medical industry, extract the required SPO triples from it to generate dialogue corpus, and generate a medical industry corpus dataset; S12, using the medical industry corpus dataset to pre-train the large language model, so that the large language model can integrate the required medical industry knowledge; S13. Create a Fine-tune corpus dataset, including: The ability to construct structured output question-answer data pairs and output JSON structured text under specified prompt words through a specific instruction specification model; the specific instruction specification model is the prompt words returned in JSON format; Construct key information identification and annotation data according to vertical field business requirements; the vertical field business requirements include conference announcement documents in the conference notification scenario; the key information identification and annotation data includes dictionary pairs of meeting time, meeting location and participants; The structured output question-answer data pairs and the key information identification and annotation data constitute the Fine-tune corpus data set; S14, constructing a Prompt template, wherein the Prompt template includes three parts: instruction, question information and auxiliary information; S15. Based on the Fine-tune corpus dataset and the Prompt template, fine-tune the pre-trained large language model on the downstream task to make it effectively adapt to the new task; S16. Add an incremental weight to optimize the fine-tuned large language model, realize the weight fusion of the large language model, and obtain the recognition model of the medical conference content.
2. A recognition model for medical conference content according to claim 1, characterized in that: The structure of the key information identification and annotation data in S13 is a four-tuple structure, wherein the four-tuple includes natural text, entity type, question and structured entity answer, and each entity type c i The questions constitute the question set Query = (q1, q2, ...q n ) and the corresponding annotated entity list Response = (r1, r2, ... r n ), if a natural text contains multiple entity types, a plural quadruple will be generated corresponding to the categories contained.
3. The recognition model of medical conference content according to claim 1, characterized in that: S16 is specifically based on supervised learning based on a low-rank adaptive algorithm; the training data is in the form of dialogue pairs: P={(x i ,r i )},i=1,…,N; Among them, P is the training question and answer corpus, x i For the Prompt that combines the triples, r i is the corresponding structured response, N is the total number of training samples; The initial weight of the model is fixed to W0, the parameter increment ΔW is optimized, and the maximized objective function is: Among them, N is the total number of training samples, x t For the input problem, r t For corresponding recovery; For the input x t Answer r under the condition t The conditional probability of The LoRA model achieves the same effect as ΔW by updating two low-dimensional matrices; h=W0x+ΔWx=W0x+BAx; Among them, h is the final feature matrix of the hidden layer; x∈R m×n is the input feature of the hidden layer, m is the feature dimension, and n is the number of samples input to the model in batches; B∈R m×r , A∈R r×m They are two low-rank matrices, whose rank r is much smaller than the rank m of the original weight matrix W, thereby greatly reducing the computational complexity of the model.
4. A method for identifying the content of a medical conference, characterized in that: The following process is performed using the recognition model of medical conference content as described in any one of claims 1 to 3: S21, constructing a document knowledge base according to the content documents to be identified input by the user; the content documents to be identified include a medical conference invitation document and a medical conference notification document; S22. By interacting with the user, the entity recognition structured data of the model response is returned in the form of questions and answers.
5. A method for identifying medical conference content according to claim 4, characterized in that: The S21 specifically includes: Use OCR and XML to read the document content extractor to recognize the content document to be recognized input by the user and obtain the recognized text; Segmenting the recognized text according to special semantic characters to obtain initial paragraph groups, wherein the special semantic characters are punctuation marks; Greedy merge the text segments that do not reach the target length to obtain text segments of the specified length. Multiple text segments of the specified length N i (i=1,2,…n) form a text paragraph group (N1,N2,…N n ); For the text paragraph group (N1, N2, ... N n ) is segmented and vectorized by the Bert or BAAI pre-trained language model to obtain the word vector C corresponding to each text segment. i ∈R m ; Multiple word vectors C i Composed word vector group (C1, C2, ...C n ); The word vector group (C1, C2, ...C n ) is stored in the FAISS vector database, and the corresponding text segment is stored in the Document serialization storage as the document knowledge base.
6. A medical conference content recognition model according to claim 4, characterized in that: The S22 specifically includes: A Prompt template for identifying questions in fixed conference content, wherein the Prompt template consists of three parts: instructions, question information, and auxiliary information; After the user inputs the document to be identified, the text content of the document to be identified is extracted and the text is sliced and vectorized, and stored to generate a document knowledge base; at the same time, the entity type keywords to be identified are segmented and vectorized using the Bert or BAAI pre-trained language model, and similarity matching is performed in the document knowledge base. The matching results are arranged in descending order, and the top K text items are concatenated as auxiliary information and added to the Prompt template; The preset question set Query and the reference knowledge in the matching result are replaced with the question information and auxiliary information part of the Prompt template, and the final Prompt is provided as input to the large language model, and the model result is returned in the form of question and answer, and formatted JSON data is output.
7. A medical conference content recognition model according to claim 6, characterized in that: In the process of similarity matching in the document knowledge base, HNSW or IVFFLAT search algorithm is also used to improve retrieval efficiency.
Citation Information
Cited By
Self-improvement method, device and equipment for end-to-end information content classification and medium
CN121959220A