Cervical screening intelligent question and answer method and system based on large language model
By adopting intelligent question-and-answer methods based on large language models in cervical screening, combined with RAG technology and professional knowledge base, the problems of low efficiency and insufficient data security in the existing technology are solved, and fast and accurate knowledge retrieval and personalized consulting services are achieved, ensuring the security of user data.
Patent Information
- Application Number
- CN202411655136.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-07
AI Technical Summary
The existing technology is inefficient in cervical screening and has many information errors. Artificial intelligence Q&A systems perform poorly when providing accurate answers, and traditional methods pose a risk of data leakage.
The intelligent cervical screening method based on large language models is adopted, combined with RAG technology and professional cervical medical knowledge base, and an intelligent question and answer system is built to achieve fast and accurate knowledge retrieval and personalized consultation, while protecting the security and privacy of user data.
It has achieved rapid and accurate retrieval and personalized consulting services for cervical screening related knowledge, improved the accuracy and security of information, and avoided the risk of data leakage.
Smart Images

Figure CN119578548A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of medical information technology, and in particular relates to an intelligent question-answering method and system for cervical screening based on a large language model. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] Cervical cancer is a major threat to women's health worldwide. Its incidence rate ranks fourth among female malignant tumors, posing a serious threat to women's life and health. Regular cervical screening is a key measure to prevent cervical cancer and achieve early detection and treatment. However, the current implementation of cervical screening often relies on manual data query or consultation with professional doctors, which is not only inefficient but also susceptible to information errors. In addition, although current artificial intelligence question-answering systems have developed rapidly and they perform well in providing cross-domain information, they often fail to provide sufficiently accurate answers in specific areas, such as cervical screening. This general answering method makes it difficult to meet patients' needs for accurate screening results. At the same time, traditional methods that rely on external models or services may expose sensitive private data, increasing the risk of information leakage. Summary of the invention
[0004] In order to overcome the shortcomings of the above-mentioned prior art, the present invention provides a cervical screening intelligent question and answer method and system based on a large language model. By integrating advanced RAG (retrieval augmented generation) technology and combining with a professional cervical medical knowledge base, it can realize fast and accurate retrieval of cervical screening related knowledge and personalized consulting services, while protecting the security and privacy of user data and avoiding the risk of data leakage in traditional methods.
[0005] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:
[0006] The first aspect of the present invention provides an intelligent question-answering method for cervical screening based on a large language model;
[0007] An intelligent question-answering method for cervical screening based on a large language model, comprising:
[0008] Acquire professional data related to cervical screening and pre-process the professional data;
[0009] Build a professional corpus based on cervical screening based on the pre-processed professional data, input the professional corpus into the trained large language model, and build an intelligent question-answering system;
[0010] Retrieving the information most relevant to the question input by the user from the professional corpus according to the intelligent question answering system;
[0011] The most relevant information extracted is combined with the question entered by the user to obtain enhanced contextual information; the final answer is generated by combining the enhanced contextual information with the trained large language model.
[0012] As a further technical solution, the professional data related to cervical screening include: routine screening data, colposcopy biopsy evaluation data, examination result management data, post-treatment follow-up data and special population screening data.
[0013] As a further technical solution, the process of constructing a professional corpus based on cervical screening according to the pre-processed professional data is:
[0014] Based on the regularized constraint segmentation method of logical rules, the document set and data set in the original dialogue corpus are divided into coarse-grained segments;
[0015] A BERT-based adaptive sliding window sequence model is used to accurately segment the cervical screening expertise in coarse-grained segments that has a strong dependency on long text paragraph information, using sufficient contextual information to ensure the complete retention of concepts such as cervical screening professional descriptions, nouns, and terms with strong semantic associations.
[0016] As a further technical solution, the trained large language model includes a local language model and a local vector model.
[0017] As a further technical solution, the professional corpus is mounted into the trained large language model, and the process of building an intelligent question-answering system is as follows:
[0018] Based on the vector retrieval path of the cervical screening knowledge base, the input question and the mounted cervical screening knowledge base are converted into vectors in a high-dimensional space through word embedding in the vector encoder, and then the relevance between the input question and the corresponding content in the cervical screening knowledge base is calculated through cosine similarity calculation, thereby retrieving multiple candidate contents.
[0019] As a further technical solution, the process of retrieving the information most relevant to the question input by the user from the professional corpus according to the intelligent question answering system is:
[0020] The user input question is converted into a vector representation through a trained large language model, and the most relevant information to the user question in the professional corpus is retrieved and sorted according to similarity;
[0021] As a further technical solution, in the process of generating the final answer, the final answer is also optimized through the RAG principle.
[0022] The second aspect of the present invention provides an intelligent question-answering system for cervical screening based on a large language model.
[0023] An intelligent question-answering system for cervical screening based on a large language model, comprising:
[0024] The professional data acquisition module is configured to: acquire professional data related to cervical screening and pre-process the professional data;
[0025] The professional corpus and intelligent question-answering system building module is configured to: build a professional corpus based on cervical screening according to the preprocessed professional data, input the professional corpus into the trained large language model, and build an intelligent question-answering system;
[0026] A retrieval module is configured to: retrieve the information most relevant to the question input by the user from the professional corpus according to the intelligent question-answering system;
[0027] The data enhancement and answer generation module is configured to: combine the extracted most relevant information with the question input by the user to obtain enhanced context information; and generate the final answer by combining the enhanced context information with the trained large language model.
[0028] The third aspect of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps of an intelligent question-and-answer method for cervical screening based on a large language model as described in the first aspect of the present invention.
[0029] The fourth aspect of the present invention provides an electronic device, including a memory, a processor, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the intelligent question-and-answer method for cervical screening based on a large language model as described in the first aspect of the present invention are implemented.
[0030] One or more of the above technical solutions have the following beneficial effects:
[0031] The professional corpus for cervical screening constructed by the present invention covers a wealth of data related to cervical screening, which is stored in the professional corpus in a structured form, making it easy for the system to quickly retrieve and extract.
[0032] In the process of retrieving questions raised by users, multiple local language models are used for hybrid retrieval to improve the accuracy of retrieval. By calculating similarity through the local vector model, data of different modalities (such as images, audio, text, etc.) can be converted into a unified vector representation. This enables the model to learn and transfer knowledge between multiple modalities, thereby further improving the intelligence and adaptability of the system. At the same time, by integrating advanced RAG (retrieval enhanced generation) technology and combining with a professional cervical medical knowledge base, fast and accurate retrieval of cervical screening-related knowledge and personalized consulting services are achieved, while protecting the security and privacy of user data and avoiding the risk of data leakage in traditional methods.
[0033] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0035] Figure 1 This is a flow chart of the method of the first embodiment.
[0036] Figure 2 It is a system structure diagram of the second embodiment. DETAILED DESCRIPTION
[0037] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0038] It should be noted that the terms used herein are for describing specific embodiments only and are not intended to be limiting of exemplary embodiments according to the present invention.
[0039] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0040] Embodiment 1
[0041] This embodiment discloses an intelligent question-answering method for cervical screening based on a large language model;
[0042] like Figure 1 As shown, a cervical screening intelligent question-answering method based on a large language model includes:
[0043] Step S1, obtaining professional data related to cervical screening and preprocessing the professional data.
[0044] Among them, professional data related to cervical screening include routine screening data, colposcopy biopsy evaluation data, examination result management data, post-treatment follow-up data, and screening data for special populations (such as pregnant women). The acquired professional data is preprocessed, including text cleaning, removal of irrelevant characters and labels, denoising, and removal of interfering content.
[0045] Step S2, construct a professional corpus based on cervical screening according to the preprocessed professional data, input the professional corpus into the trained large language model, and build an intelligent question-answering system.
[0046] In the process of constructing a professional corpus based on cervical screening, a regularized constrained segmentation method based on logical rules is used to divide the document set and data set in the original dialogue corpus into coarse-grained segments. Then, an adaptive sliding window sequence model based on BERT is used to accurately segment the cervical screening professional knowledge with strong dependence on long text chapter information in the coarse-grained segments using sufficient contextual information, ensuring the complete retention of concepts such as cervical screening professional descriptions, nouns, and terms with strong semantic associations, thereby constructing a high-quality cervical screening professional corpus.
[0047] In the above process, the original dialogue data is first segmented using predefined logical rules and regular expressions. These rules are usually based on language features such as sentence structure, punctuation, paragraph separation, etc. The original dialogue data refers to the unprocessed basic data, including routine screening data, colposcopy biopsy evaluation data, examination result management data, post-treatment follow-up data, and screening data for special populations (such as pregnant women). By applying these rules, the dialogue data is divided into relatively large coarse-grained segments containing a certain amount of information. Suppose the original dialogue data is D, and the set of logical rules and regular expressions is R, then the coarse-grained segment set C can be obtained in the following way:
[0048] C = SegmentByRules(D,R);
[0049] Where SegmentByRules is a function that segments D according to the rules in R.
[0050] Secondly, after obtaining the coarse-grained text segment, we use the BERT-based adaptive sliding window sequence model for fine segmentation. This model uses BERT's contextual understanding ability and combines the adaptive sliding window technology to accurately segment the cervical screening expertise with strong dependence on long text chapter information in the coarse-grained text segment. Specifically, during the segmentation process, the BERT-based adaptive sliding window sequence model is trained using the sorted cervical screening corpus. The training goal is to enable the model to accurately identify and segment cervical screening expertise with strong semantic associations. For each coarse-grained text segment, a sliding window is initialized. The size of the window can be adaptively adjusted according to the length and complexity of the text segment. Then, the trained model is used to segment and judge the text in the window. If the model believes that the text in the window can be further segmented (that is, there is a segmentation point with strong semantic association), the window is slid to the right by a certain distance and the new window content is continued to be judged. Repeat this process until the entire coarse-grained text segment is completely segmented. The finely segmented text segment set F is used as the input for constructing a high-quality cervical screening expertise corpus.
[0051] In this way, the professional descriptions, nouns, terms and other concepts of cervical screening with strong semantic associations are completely preserved. Let the coarse-grained text set be C, and the BERT-based adaptive sliding window sequence model be M. Then the finely segmented text set F can be obtained in the following way:
[0052] F=FineSegmentByModel(C,M);
[0053] Where FineSegmentByModel is a function that uses the model M to perform fine segmentation on each coarse-grained segment in C.
[0054] In this embodiment, after constructing a high-quality professional corpus for cervical screening, an expansion process is performed as a preferred method. Each paragraph in the professional corpus for cervical screening is split into sentence fragments and fine-grained word fragments as a whole; a word pair encoding algorithm is used to perform statistics and analysis on the fine-grained word fragments obtained by splitting based on word frequency and part of speech, and a large vocabulary containing a large number of fine-grained word fragments is initialized. This vocabulary is the basis for the model to recognize words. The large vocabulary is then evaluated by the Unigram model. The Unigram model is a simple language model that assumes that each word in the text is independent and does not consider the correlation between words. But here, it is mainly used to evaluate the frequency of each word in the corpus, thereby helping to optimize and reduce the number of words. During the optimization process, according to the evaluation results of the Unigram model, low-frequency words and redundant words are gradually eliminated until the number of words is reduced to the preset target number of words. This process not only ensures the recognition efficiency of the model, but also reduces the complexity of the model. Finally, after optimization and adjustment of the above steps, a Tokenizer model for the field of cervical screening (cervical screening word segmenter model) was obtained. The Tokenizer model can be used to accurately identify professional terms and keywords in the field of cervical screening, improve the efficiency and accuracy of text processing, and provide strong technical support for the prevention and early detection of cervical diseases.
[0055] Step S3, retrieving the information most relevant to the question input by the user from the professional corpus according to the intelligent question answering system.
[0056] In this embodiment, the trained large language model includes a local language model and a local vector model. The local language model adopts GLM4, llama3.1, etc., which can realize multi-model mixed retrieval of professional corpora and improve the retrieval accuracy; the local vector model adopts dmeta-embedding-zh, and the dmeta-embedding-zh model has cross-modal learning ability, which can convert data of different modalities (such as images, audio, text, etc.) into a unified vector representation, which is convenient for learning and transferring knowledge between multiple modalities. In cervical screening, multiple data forms such as images and texts can be integrated to provide users with more comprehensive information.
[0057] In terms of hardware and software support, the large language model uses Intel's OneAPI as a cross-platform software development kit. OneAPI provides a unified programming interface that allows developers to use the same programming language to write applications that can run on different types of processors. This not only reduces duplication of work, but also improves application performance because OneAPI supports the parallel processing capabilities of CPUs, GPUs, and other accelerators. At the same time, the compilers and libraries provided by OneAPI can automatically optimize the code to adapt to different hardware architectures.
[0058] In terms of data storage, the Postgresql database is used to store the vector data processed by the vector model to facilitate subsequent data retrieval, while the Mongodb database is used to store file data and system cache data to meet the system's diverse needs for data storage and retrieval.
[0059] Furthermore, in step S3, the process of retrieving the information most relevant to the question input by the user from the professional corpus according to the intelligent question answering system includes:
[0060] Step S3.1, using the local language model to accurately understand the semantics of the user's question and convert the user's input question into a vector form for subsequent processing;
[0061] Step S3.2, input the vector representation of the user input question into the vector search engine; use the local vector model to perform similarity calculation to find the most similar professional corpus segment.
[0062] In step S3.3, the retrieved document fragments are sorted according to their similarity with the question vector so that the most relevant information can be selected for subsequent processing.
[0063] Step S4, combining the extracted most relevant information with the question input by the user to obtain enhanced context information; and generating a final answer by combining the trained large language model with the enhanced context information.
[0064] Specifically, in order to obtain more detailed context information, the retrieved professional corpus fragments are also combined with the user input questions to form richer context information, thereby enhancing the local language model's ability to understand and answer specific questions. The large language model combines preset background knowledge and prompt words to generate answers based on enhanced context information, and is optimized through the RAG (Retrieval-Augmented Generation) principle. The RAG principle helps to alleviate the hallucinations of large models (i.e., generating answers that are inconsistent with the facts) and improve the accuracy of large model responses. Unlike fine-tuning, RAG provides a certain degree of observability and inspectability, is low-cost and easy to implement.
[0065] Embodiment 2
[0066] This embodiment discloses an intelligent question-answering system for cervical screening based on a large language model;
[0067] like Figure 2 As shown, a cervical screening intelligent question-answering system based on a large language model includes:
[0068] The professional data acquisition module is configured to: acquire professional data related to cervical screening and pre-process the professional data;
[0069] The professional corpus and intelligent question-answering system building module is configured to: build a professional corpus based on cervical screening according to the preprocessed professional data, input the professional corpus into the trained large language model, and build an intelligent question-answering system;
[0070] The retrieval module is configured to retrieve the information most relevant to the user input question from the professional corpus according to the intelligent question-answering system. The retrieval module adopts a vector retrieval path based on the cervical screening knowledge base, converts the input question and the mounted cervical screening knowledge base into vectors in a high-dimensional space through word embedding in the vector encoder, and then calculates the relevance between the input question and the corresponding content in the cervical screening knowledge base through cosine similarity calculation, thereby retrieving multiple candidate contents, presetting the number of candidate contents to be screened K, and sorting the multiple candidate contents according to the relevance.
[0071] The data enhancement and answer generation module is configured to: combine the extracted most relevant information with the question input by the user to obtain enhanced context information; generate the final answer by combining the enhanced context information with the trained large language model. Among them, the top K candidate contents in the sorting queue in the retrieval module are concatenated with the input question respectively and mapped to the same vector space to form a concatenated answer; then the matching degree of each concatenated answer is calculated, and the concatenated answer with the highest matching degree is used as the matching result and described by the large language model as the output answer.
[0072] Embodiment 3
[0073] The purpose of this embodiment is to provide a computer-readable storage medium.
[0074] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in an intelligent question-and-answer method for cervical screening based on a large language model as described in Example 1 of the present disclosure.
[0075] Embodiment 4
[0076] The purpose of this embodiment is to provide an electronic device.
[0077] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps in the intelligent question-answering method for cervical screening based on a large language model as described in Example 1 of the present disclosure are implemented.
[0078] The steps involved in the apparatuses of the above embodiments 2, 3 and 4 correspond to the method embodiment 1, and the specific implementation methods can refer to the relevant description part of embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.
[0079] Those skilled in the art should understand that the modules or steps of the present invention described above can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.
[0080] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.
Claims
1. An intelligent question-answering method for cervical screening based on a large language model, characterized in that: include: Acquire professional data related to cervical screening and pre-process the professional data; Build a professional corpus based on cervical screening based on the pre-processed professional data, input the professional corpus into the trained large language model, and build an intelligent question-answering system; Retrieving the information most relevant to the question input by the user from the professional corpus according to the intelligent question answering system; The most relevant information extracted is combined with the question entered by the user to obtain enhanced contextual information; the final answer is generated by combining the enhanced contextual information with the trained large language model.
2. The intelligent question-answering method for cervical screening based on a large language model as claimed in claim 1, characterized in that: The professional data related to cervical screening include: routine screening data, colposcopy biopsy evaluation data, examination result management data, post-treatment follow-up data and special population screening data.
3. The intelligent question-answering method for cervical screening based on a large language model as claimed in claim 1, characterized in that: The process of constructing a professional corpus based on cervical screening according to the pre-processed professional data is as follows: Based on the regularized constraint segmentation method of logical rules, the document set and data set in the original dialogue corpus are divided into coarse-grained segments; A BERT-based adaptive sliding window sequence model is used to accurately segment the cervical screening expertise in coarse-grained segments that has a strong dependency on long text paragraph information, using sufficient contextual information to ensure the complete retention of cervical screening expertise descriptions, nouns, and terminology concepts with strong semantic associations.
4. The intelligent question-answering method for cervical screening based on a large language model as claimed in claim 1, characterized in that: The trained large language model includes a local language model and a local vector model.
5. The intelligent question-answering method for cervical screening based on a large language model as claimed in claim 1, characterized in that: The process of attaching the professional corpus to the trained large language model and building an intelligent question-answering system is as follows: Based on the vector retrieval path of the cervical screening knowledge base, the input question and the mounted cervical screening knowledge base are converted into vectors in a high-dimensional space through word embedding in the vector encoder, and then the relevance between the input question and the corresponding content in the cervical screening knowledge base is calculated through cosine similarity calculation, thereby retrieving multiple candidate contents.
6. The intelligent question-answering method for cervical screening based on a large language model as claimed in claim 1, characterized in that: The process of retrieving the information most relevant to the question input by the user from the professional corpus according to the intelligent question answering system is as follows: The user input question is converted into a vector representation through a trained large language model, and the most relevant information to the user question in the professional corpus is retrieved and sorted according to similarity.
7. The intelligent question-answering method for cervical screening based on a large language model as claimed in claim 1, characterized in that: In the process of generating the final answer, the final answer is also optimized through the RAG principle.
8. An intelligent question-answering system for cervical screening based on a large language model, characterized in that: include: The professional data acquisition module is configured to: acquire professional data related to cervical screening and pre-process the professional data; The professional corpus and intelligent question-answering system building module is configured to: build a professional corpus based on cervical screening according to the preprocessed professional data, input the professional corpus into the trained large language model, and build an intelligent question-answering system; A retrieval module is configured to: retrieve the information most relevant to the question input by the user from the professional corpus according to the intelligent question-answering system; The data enhancement and answer generation module is configured to: combine the extracted most relevant information with the question input by the user to obtain enhanced context information; and generate the final answer by combining the enhanced context information with the trained large language model.
9. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the steps in the intelligent question-answering method for cervical screening based on a large language model as described in any one of claims 1 to 7 are implemented.
10. An electronic device comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the intelligent question-answering method for cervical screening based on a large language model are implemented as described in any one of claims 1-7.
Citation Information
Cited By
Organ transplantation clinical aid decision-making method, device and equipment based on AI large model, medium and product
CN121096601A