Clinical medical examination knowledge base construction and application method, device, equipment and medium
By converting clinical medical data into dense vectors and implementing a conversational retrieval mode, the limitations of traditional retrieval modes are overcome, enabling efficient and convenient multi-person retrieval services.
Patent Information
- Application Number
- CN202310670816.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-07
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2043-06-07
AI Technical Summary
Traditional tag-based or keyword-based search methods have limitations in clinical medical testing, failing to meet the personalized needs of users in different roles and resulting in low search efficiency.
A pre-defined large language model is used to convert clinical medical data into dense vectors, construct a target clinical medical laboratory knowledge base, and execute a conversational retrieval mode to generate natural language responses through cosine similarity calculation.
It improves search efficiency and convenience, meets the personalized needs of users with different roles, and realizes a conversational search service for multiple groups.
Smart Images

Figure CN117009541B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer technology, and in particular to a clinical medical examination knowledge base construction and application method, device, equipment and medium. BACKGROUND
[0002] Currently, the traditional label or keyword retrieval mode can help users quickly find related information to a certain extent, but also has certain limitations. For example, the setting of labels or keywords cannot cover all possible query requirements, and users need to accurately input the corresponding keywords or select the correct labels to find the related examination item information. In addition, the label or keyword retrieval mode often cannot provide multi-person conversation retrieval services, which cannot meet the personalized needs of users with different roles such as medical students, intern doctors, attending doctors and senior chief physicians in the use of knowledge base, and there is a common problem of low retrieval efficiency. SUMMARY
[0003] Therefore, the purpose of the present application is to provide a clinical medical examination knowledge base construction and application method, device, equipment and medium, which can effectively improve the retrieval efficiency and further improve the convenience of retrieval. The specific scheme is as follows:
[0004] In a first aspect, the present application provides a clinical medical examination knowledge base construction and application method, comprising:
[0005] Converting the collected clinical medical data into corresponding dense vectors based on a preset large language model to obtain a target clinical medical examination knowledge base;
[0006] Performing a configuration operation of a conversation retrieval mode on the target clinical medical examination knowledge base, and after the configuration is completed, performing vector conversion on the received natural language sentence to be replied based on the preset large language model to obtain a corresponding question vector;
[0007] By calculating the cosine similarity between the question vector and each dense vector in the target clinical medical examination knowledge base, the most relevant target vector is determined.
[0008] Generating a corresponding target natural language reply sentence based on the preset large language model and the target vector to reply to the natural language sentence to be replied.
[0009] Optionally, the conversion of the collected clinical medical data into corresponding dense vectors based on a preset large language model to obtain a target clinical medical examination knowledge base comprises
[0010] The clinical medical data collected is converted into corresponding dense vectors based on a preset large language model and using embedding technology to obtain a target clinical medical test knowledge base.
[0011] Optionally, the conversion of the collected clinical medical data into corresponding dense vectors based on the preset large language model and using embedding technology comprises:
[0012] The clinical medical test item data and test knowledge text collected are converted into corresponding dense vectors based on the preset large language model and using embedding technology.
[0013] Optionally, the method for constructing and applying the clinical medical test knowledge base comprises:
[0014] The clinical medical test item data collected is converted into corresponding dense vectors satisfying a preset dimension based on the preset large language model and using embedding technology.
[0015] Optionally, the method for constructing and applying the clinical medical test knowledge base further comprises:
[0016] The preset large language model and model fine-tuning technology are used for analysis and summary to obtain a fixed academic knowledge base answer mode of the target clinical medical test knowledge base, so as to provide knowledge retrieval services for external systems based on the fixed academic knowledge base answer mode and through a preset external service data interface.
[0017] Optionally, the determination of the target vector most relevant to the problem vector by calculating the cosine similarity between the problem vector and each dense vector in the target clinical medical test knowledge base comprises:
[0018] The cosine similarity between the problem vector and each dense vector in the target clinical medical test knowledge base is calculated based on a preset formula to obtain corresponding semantic similarity information according to the calculation result;
[0019] The semantic similarity information is analyzed to determine a plurality of target vectors most relevant to the problem vector.
[0020] In a second aspect, the application provides a device for constructing and applying a clinical medical test knowledge base, comprising:
[0021] A knowledge base construction module is configured to convert collected clinical medical data into corresponding dense vectors based on a preset large language model to obtain a target clinical medical test knowledge base.
[0022] The question vector conversion module is used to configure the conversational retrieval mode for the target clinical medical laboratory knowledge base. After the configuration is completed, it performs vector conversion on the received natural language statements to be answered based on the preset large language model to obtain the corresponding question vectors.
[0023] The similarity calculation module is used to determine the target vector most relevant to the question vector by calculating the cosine similarity between the question vector and each of the dense vectors in the target clinical medical testing knowledge base.
[0024] The response statement generation module is used to generate corresponding target natural language response statements based on the preset large language model and the target vector, so as to respond to the natural language statement to be responded to.
[0025] Optionally, the knowledge base construction module includes:
[0026] The dense vector transformation unit is used to convert the collected clinical medical data into corresponding dense vectors based on a preset large language model and using embedding technology, so as to obtain the target clinical medical laboratory knowledge base.
[0027] Thirdly, this application provides an electronic device, comprising:
[0028] Memory, used to store computer programs;
[0029] A processor is used to execute the computer program to implement the steps of the aforementioned method for constructing and applying a clinical medical laboratory knowledge base.
[0030] Fourthly, this application provides a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the steps of the aforementioned method for constructing and applying a clinical medical laboratory knowledge base.
[0031] As can be seen, in this application, the collected clinical medical data is first converted into corresponding dense vectors based on a preset large language model to obtain a target clinical medical laboratory knowledge base. Then, a conversational retrieval mode is configured for the target clinical medical laboratory knowledge base. After configuration, the received natural language statements to be answered are vectorized based on the preset large language model to obtain corresponding question vectors. Then, the cosine similarity between the question vector and each dense vector in the target clinical medical laboratory knowledge base is calculated to determine the target vector most relevant to the question vector. Finally, a corresponding target natural language response statement is generated based on the preset large language model and the target vector to respond to the natural language statements to be answered. This application constructs a target clinical medical laboratory knowledge base using a preset large language model and executes a conversational retrieval mode configuration, allowing users to conduct searches in a conversational manner, effectively improving retrieval efficiency and convenience. Attached Figure Description
[0032] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0033] Figure 1 A flowchart illustrating the construction and application method of a clinical medical laboratory knowledge base provided for this application;
[0034] Figure 2 A schematic diagram illustrating the construction and application method of a clinical medical laboratory knowledge base provided for this application;
[0035] Figure 3 A schematic diagram of a Python code segment for vector transformation provided in this application;
[0036] Figure 4 A schematic diagram of a Python code segment for similarity calculation provided in this application;
[0037] Figure 5 A schematic diagram of a Python code segment for model fine-tuning provided in this application;
[0038] Figure 6 A schematic diagram of a Python code segment for external system retrieval provided in this application;
[0039] Figure 7 A flowchart illustrating the construction and application method of a specific clinical medical laboratory knowledge base provided for this application;
[0040] Figure 8 A schematic diagram of the structure of a device for constructing and applying a clinical medical laboratory knowledge base provided in this application;
[0041] Figure 9 This application provides a structural diagram of an electronic device. Detailed Implementation
[0042] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0043] Currently, while traditional tag-based or keyword-based search methods can help users quickly find relevant information to some extent, they also have certain limitations. For example, tag or keyword settings cannot cover all possible query needs; users need to accurately enter the corresponding keywords or select the correct tags to find relevant test item information. Furthermore, tag or keyword-based search methods often fail to provide interactive search services for different user groups. This cannot meet the personalized needs of users with different roles, such as medical students, interns, attending physicians, and senior chief physicians, resulting in generally low search efficiency. Therefore, this application provides a scheme for constructing and applying a clinical medical laboratory knowledge base, which can effectively improve search efficiency and thus enhance search convenience.
[0044] See Figure 1 As shown in the figure, this invention discloses a method for constructing and applying a clinical medical laboratory knowledge base, including:
[0045] Step S11: Based on the preset large language model, the collected clinical medical data is converted into corresponding dense vectors to obtain the target clinical medical laboratory knowledge base.
[0046] Specifically, in this application, in conjunction with Figure 2As shown, firstly, based on a pre-defined large language model and using embedding technology, the collected clinical medical data is converted into corresponding dense vectors to obtain the target clinical medical laboratory knowledge base. Further, the conversion of the collected clinical medical data into corresponding dense vectors based on the pre-defined large language model and using embedding technology includes: converting the collected clinical medical laboratory test data and test knowledge text into corresponding dense vectors based on the pre-defined large language model and using embedding technology. The clinical medical laboratory test data includes, but is not limited to, routine blood test (blood routine) data, including but not limited to red blood cell count, white blood cell count, and platelet count. The pre-defined large language model includes, but is not limited to, GPT-4 (Generative Pre-trained Transformer 4, a language model released by OpenAI for the chatbot ChatGPT), where OpenAI is an artificial intelligence research company, and ChatGPT, or Chat Generative Pre-trained Transformer, is a chatbot model released by OpenAI.
[0047] It is important to understand that when performing vector transformation on the clinical medical test data, the resulting dense vector should meet a preset dimension based on actual needs. For example, when performing vector transformation on the blood routine test data, the white blood cell count included in the blood routine test data can be converted into a dense vector that meets the preset dimension. The transformed vector can capture the semantic information of the test items, thereby facilitating subsequent retrieval and comparison. Specifically, it can be used as follows: Figure 3 The Python code snippet shown illustrates this. An example of the resulting vector data is: array([0.01798287,-0.03457677,0.0128045,...,0.00358112,-0.02577634,0.01090625]).
[0048] Understandably, when performing vector transformation on the test knowledge text, each smaller portion of the test knowledge text is converted into a dense vector using an embedding model (including but not limited to Dense Retriever models and sentence-transformers models). For example, the text "The normal range of white blood cell count is 4-10×10^9 / L" is converted into a vector.
[0049] In this embodiment, after vector transformation, the resulting dense vector is stored for comparison during searching, thereby establishing the retrieval index and obtaining the target clinical medical laboratory knowledge base. In one specific implementation, the obtained dense vector can be stored in a Key-Value database, where the Key is the name of the clinical medical laboratory item, and the Value is the corresponding dense vector.
[0050] Step S12: Configure the conversational retrieval mode for the target clinical medical laboratory knowledge base. After configuration, perform vector conversion on the received natural language statements to be answered based on the preset large language model to obtain the corresponding question vectors.
[0051] In this embodiment, after obtaining the target clinical medical laboratory knowledge base, a conversational retrieval mode is configured for the target clinical medical laboratory knowledge base. This modifies the previous tag-based and keyword-based retrieval model to a conversational retrieval mode, allowing users to find relevant test items simply by asking questions in natural language after configuration, without needing to accurately input keywords or select tags. This lowers the barrier to entry for the knowledge base and can meet the personalized needs of users in different roles, such as medical students, interns, attending physicians, and senior chief physicians.
[0052] Understandably, after configuration, when a natural language statement to be answered is received through a preset interface, it is necessary to perform vector transformation on the received natural language statement based on the preset large language model to obtain the corresponding question vector. For example, for a user's question, "Is a white blood cell count of 11 × 10^9 / L normal?", the question is vector-transformed based on the preset large language model and embedding technology.
[0053] Step S13: Calculate the cosine similarity between the question vector and each of the dense vectors in the target clinical medical testing knowledge base to determine the target vector most relevant to the question vector.
[0054] In this embodiment, determining the target vector most relevant to the question vector by calculating the cosine similarity between the question vector and each dense vector in the target clinical medical testing knowledge base can specifically include: calculating the cosine similarity between the question vector and each dense vector in the target clinical medical testing knowledge base based on a preset formula, and determining the corresponding semantic similarity information based on the calculation results; and determining several target vectors most relevant to the question vector by analyzing the semantic similarity information. The preset formula is shown below.
[0055] cosine_similarity=dot(A,B) / (norm(A)*norm(B));
[0056] Here, A and B represent two vectors, dot(A, B) denotes the dot product of A and B, and norm(A) denotes the norm of vector A. This formula can be used to calculate the angle between two vectors, thus obtaining their similarity. The specific calculation process can be achieved using... Figure 4 The Python code snippet shown is used to implement this. Finally, based on the calculation results, several target vectors most relevant to the problem vector are selected.
[0057] Step S14: Generate a corresponding target natural language response statement based on the preset large language model and the target vector to respond to the natural language statement to be responded to.
[0058] In this embodiment, after obtaining several target vectors, a corresponding target natural language response statement is generated using the preset large language model and the target vectors to respond to the natural language statement to be responded to. For example, the generated target natural language response statement might be: "White blood cell count 11×10^9 / L is slightly higher than the normal range. Please observe carefully, and seek medical attention promptly if you experience any discomfort."
[0059] It is further important to understand that in this embodiment, a fixed academic knowledge base answer pattern for the target clinical medical laboratory knowledge base can be obtained through analysis and summarization using the preset large language model and model fine-tuning technology. Based on this fixed academic knowledge base answer pattern, knowledge retrieval services can be provided to external systems through a preset external service data interface. The fine-tuning process requires a large amount of labeled data, including questions and corresponding answers. The goal of fine-tuning is to enable the model to generate professional answers that conform to industry standards. For example, if there are currently a large number of medical question-answer pairs (question + correct answer), it can be achieved through methods such as... Figure 5 The Python code snippet shown is used for model fine-tuning.
[0060] Understandably, in combination Figure 6The Python code snippet shown may include, but is not limited to, the following functions of the corresponding preset external service data interface: receiving laboratory knowledge query requests from external systems, such as "Is a white blood cell count of 11 × 10^9 / L normal?"; querying the target clinical medical laboratory knowledge base to find the most relevant laboratory knowledge; generating a professional answer using the preset large language model, such as "A white blood cell count of 11 × 10^9 / L is slightly higher than the normal range. Please observe carefully, and seek medical attention promptly if you experience any discomfort."; and returning the generated answer to the corresponding external system. This facilitates integration with external systems and enables rapid data exchange and sharing.
[0061] Therefore, in this embodiment, the collected clinical medical data is first converted into corresponding dense vectors based on a preset large language model to obtain a target clinical medical laboratory knowledge base. Then, a conversational retrieval mode is configured for the target clinical medical laboratory knowledge base. After configuration, the received natural language statements to be answered are vectorized based on the preset large language model to obtain corresponding question vectors. Then, the cosine similarity between the question vector and each dense vector in the target clinical medical laboratory knowledge base is calculated to determine the target vector most relevant to the question vector. Finally, a corresponding target natural language response statement is generated based on the preset large language model and the target vector to respond to the natural language statements to be answered. This application constructs a target clinical medical laboratory knowledge base using a preset large language model and executes a conversational retrieval mode configuration, allowing users to conduct searches in a conversational manner, effectively improving retrieval efficiency and convenience.
[0062] See Figure 7 As shown in the figure, this invention discloses a method for constructing and applying a clinical medical laboratory knowledge base, including:
[0063] Step S21: Based on the preset large language model, the collected clinical medical data is converted into corresponding dense vectors to obtain the target clinical medical laboratory knowledge base.
[0064] Step S22: Configure the conversational retrieval mode for the target clinical medical laboratory knowledge base, and after the configuration is completed, perform vector conversion on the received natural language statements to be answered based on the preset large language model to obtain the corresponding question vectors.
[0065] Step S23: Calculate the cosine similarity between the question vector and each of the dense vectors in the target clinical medical testing knowledge base to determine the target vector most relevant to the question vector.
[0066] Step S24: Generate a corresponding target natural language response statement based on the preset large language model and the target vector to respond to the natural language statement to be responded to.
[0067] The specific processes of steps S21 to S24 can be found in the relevant content disclosed in the foregoing embodiments, and will not be repeated here.
[0068] Therefore, in this embodiment of the application, upon receiving a natural language statement to be answered, a corresponding question vector is obtained, and the corresponding target natural language response statement is determined by calculating the cosine similarity between the question vector and each dense vector in the target clinical medical laboratory knowledge base. This ensures the accuracy of the retrieval.
[0069] See Figure 8 As shown in the embodiments, this application also discloses a device for constructing and applying a clinical medical laboratory knowledge base, including:
[0070] The knowledge base construction module 11 is used to convert the collected clinical medical data into corresponding dense vectors based on a preset large language model in order to obtain the target clinical medical testing knowledge base.
[0071] The question vector conversion module 12 is used to perform a dialogic retrieval mode configuration operation for the target clinical medical laboratory knowledge base, and after the configuration is completed, it performs vector conversion on the received natural language statement to be answered based on the preset large language model to obtain the corresponding question vector.
[0072] Similarity calculation module 13 is used to determine the target vector most relevant to the question vector by calculating the cosine similarity between the question vector and each of the dense vectors in the target clinical medical testing knowledge base;
[0073] The response statement generation module 14 is used to generate corresponding target natural language response statements based on the preset large language model and the target vector, so as to respond to the natural language statement to be responded to. For more specific details regarding the operation of each of the above modules, please refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.
[0074] Therefore, in this application, the collected clinical medical data is first converted into corresponding dense vectors based on a preset large language model to obtain a target clinical medical laboratory knowledge base. Then, a conversational retrieval mode is configured for the target clinical medical laboratory knowledge base. After configuration, the received natural language statements to be answered are vectorized based on the preset large language model to obtain corresponding question vectors. Then, the cosine similarity between the question vector and each dense vector in the target clinical medical laboratory knowledge base is calculated to determine the target vector most relevant to the question vector. Finally, a corresponding target natural language response statement is generated based on the preset large language model and the target vector to respond to the natural language statements to be answered. This application constructs a target clinical medical laboratory knowledge base using a preset large language model and executes a conversational retrieval mode configuration, allowing users to conduct searches in a conversational manner, effectively improving retrieval efficiency and convenience.
[0075] In some specific embodiments, the knowledge base construction module 11 may specifically include:
[0076] The dense vector transformation submodule is used to convert the collected clinical medical data into corresponding dense vectors based on a preset large language model and using embedding technology, so as to obtain the target clinical medical laboratory knowledge base.
[0077] In some specific embodiments, the dense vector transformation submodule may specifically include:
[0078] The dense vector conversion unit is used to convert the collected clinical medical test data and test knowledge text into corresponding dense vectors based on the preset large language model and using embedding technology.
[0079] In some specific embodiments, the apparatus for constructing and applying the clinical medical laboratory knowledge base may specifically include:
[0080] The project data conversion unit is used to convert the collected clinical medical test project data into corresponding dense vectors that meet the preset dimensions based on the preset large language model and using embedding technology.
[0081] In some specific embodiments, the apparatus for constructing and applying the clinical medical laboratory knowledge base may further include:
[0082] The external service unit is used to analyze and summarize the preset large language model and model fine-tuning technology to obtain the fixed academic knowledge base answer pattern of the target clinical medical laboratory knowledge base, and to provide knowledge retrieval services to external systems based on the fixed academic knowledge base answer pattern and through the preset external service data interface.
[0083] In some specific embodiments, the similarity calculation module 13 may specifically include:
[0084] The cosine similarity calculation unit is used to calculate the cosine similarity between the question vector and each of the dense vectors in the target clinical medical testing knowledge base based on a preset formula, so as to determine the corresponding semantic similarity information based on the calculation results.
[0085] The target vector determination unit is used to determine several target vectors that are most relevant to the question vector by analyzing the semantic similarity information.
[0086] Furthermore, embodiments of this application also disclose an electronic device, Figure 9 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0087] Figure 9 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the method for constructing and applying the clinical medical laboratory knowledge base disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0088] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0089] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0090] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including computer programs capable of performing the construction and application method of the clinical medical testing knowledge base executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.
[0091] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned method for constructing and applying a clinical medical laboratory knowledge base. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0092] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0093] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0094] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0095] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0096] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for constructing and applying a clinical medical laboratory knowledge base, characterized in that, include: Based on a pre-defined large language model, the collected clinical medical data is converted into corresponding dense vectors to obtain the target clinical medical laboratory knowledge base. Configure the conversational retrieval mode for the target clinical medical laboratory knowledge base, and after the configuration is completed, perform vector transformation on the received natural language statements to be answered based on the preset large language model to obtain the corresponding question vectors; The target vector most relevant to the question vector is determined by calculating the cosine similarity between the question vector and each dense vector in the target clinical medical testing knowledge base. Based on the preset large language model and the target vector, a corresponding target natural language response statement is generated to respond to the natural language statement to be responded to; Specifically, the process of converting collected clinical medical data into corresponding dense vectors based on a preset large language model to obtain a target clinical medical laboratory knowledge base includes... Based on a pre-defined large language model and using embedding technology, the collected clinical medical data is converted into corresponding dense vectors to obtain the target clinical medical laboratory knowledge base. The process of converting collected clinical medical data into corresponding dense vectors based on a pre-defined large language model and using embedding technology includes: Based on the preset large language model and using embedding technology, the collected clinical medical test data and test knowledge text are converted into corresponding dense vectors. Based on a pre-defined large language model and using embedding technology, the collected clinical medical test data are converted into corresponding dense vectors, including: Based on the preset large language model and using embedding technology, the collected clinical medical test data are converted into corresponding dense vectors that meet the preset dimensions.
2. The method for constructing and applying a clinical medical laboratory knowledge base according to claim 1, characterized in that, Also includes: The preset large language model and model fine-tuning technology are used to analyze and summarize in order to obtain the fixed academic knowledge base answer pattern of the target clinical medical laboratory knowledge base. Based on the fixed academic knowledge base answer pattern, knowledge retrieval services are provided to external systems through a preset external service data interface.
3. The method for constructing and applying a clinical medical laboratory knowledge base according to claim 1 or 2, characterized in that, The step of determining the target vector most relevant to the question vector by calculating the cosine similarity between the question vector and each dense vector in the target clinical medical testing knowledge base includes: The cosine similarity between the question vector and each of the dense vectors in the target clinical medical testing knowledge base is calculated based on a preset formula, so as to determine the corresponding semantic similarity information based on the calculation results. By analyzing the semantic similarity information, several target vectors that are most relevant to the question vector are determined.
4. A device for constructing and applying a clinical medical laboratory knowledge base, characterized in that, include: The knowledge base construction module is used to convert the collected clinical medical data into corresponding dense vectors based on a preset large language model in order to obtain the target clinical medical testing knowledge base. The question vector conversion module is used to configure the conversational retrieval mode for the target clinical medical laboratory knowledge base. After the configuration is completed, it performs vector conversion on the received natural language statements to be answered based on the preset large language model to obtain the corresponding question vectors. The similarity calculation module is used to determine the target vector most relevant to the question vector by calculating the cosine similarity between the question vector and each of the dense vectors in the target clinical medical testing knowledge base. The response statement generation module is used to generate corresponding target natural language response statements based on the preset large language model and the target vector, so as to respond to the natural language statement to be responded to; The knowledge base construction module includes: The dense vector transformation submodule is used to convert the collected clinical medical data into corresponding dense vectors based on a preset large language model and using embedding technology, so as to obtain the target clinical medical laboratory knowledge base. The dense vector transformation submodule includes: The dense vector conversion unit is used to convert the collected clinical medical test data and test knowledge text into corresponding dense vectors based on the preset large language model and using embedding technology. The device for constructing and applying the clinical medical laboratory knowledge base includes: The project data conversion unit is used to convert the collected clinical medical test project data into corresponding dense vectors that meet the preset dimensions based on the preset large language model and using embedding technology.
5. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the method for constructing and applying a clinical medical laboratory knowledge base as described in any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that, Used to store computer programs, which, when executed by a processor, implement the method for constructing and applying a clinical medical laboratory knowledge base as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Medical material collecting and processing system and method
CN111696638A
Natural language processing using ontology-based concept embedding model
CN114341862A