Traditional Chinese medicine prescription learning method and device based on large language model, equipment and medium

Through the learning method of traditional Chinese medicine based on the large language model, the problem that existing technology is difficult to capture the deep meaning of classical Chinese is solved, the seamless connection between vernacular and classical Chinese is achieved, and the learning ability and diagnostic skills of traditional Chinese doctors are improved.

CN119416782AInactive Publication Date: 2025-02-11CHENGDU ZIJIELIU TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510019236.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-07
Publication Date
2025-02-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing technology is difficult to accurately capture the deep meaning expressed in classical Chinese, resulting in the inability to effectively complete the matching task of classical Chinese.

Method used

Using the TCM prescription learning method based on the large language model, we use the doctor's current vernacular medical case article, segment and vectorize the term set, and match the pre-constructed vector database to obtain the target TCM medical case.

Benefits of technology

It realizes seamless connection between modern vernacular and ancient classical Chinese, allowing doctors to easily convert daily language into classical Chinese prescriptions for famous ancient doctors, expands the source of learning materials for traditional Chinese doctors and improves the quality of learning materials.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119416782A_ABST
    Figure CN119416782A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of traditional Chinese medicine prescription recognition, and discloses a traditional Chinese medicine prescription learning method, device and equipment based on a large language model, and a medium, and the method comprises the steps: obtaining a current white word medical case text of a doctor; segmenting the current white word medical case text of the doctor based on a word segmentation tool to obtain a medical case term set; vectorizing the medical case term set based on a vectorization tool to obtain a semantic vector expression of the medical case; based on the semantic vector expression of the medical case, matching a target traditional Chinese medicine medical case from a pre-constructed vector database; wherein the vector database is constructed based on classical Chinese traditional Chinese medicine texts and a large language model; and visually displaying the target traditional Chinese medicine case. According to the method, powerful support can be provided for inheritance and development of traditional Chinese medicine, and continuity and innovativeness of traditional Chinese medicine knowledge are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of traditional Chinese medicine prescription recognition, and specifically relates to a traditional Chinese medicine prescription learning method, device, equipment and medium based on a large language model. Background Art

[0002] The prescriptions of famous old Chinese medicine practitioners not only cover rich clinical experience and unique treatment methods, but also contain profound philosophical thoughts and humanistic care, reflecting the profound heritage of traditional Chinese medicine, and providing valuable experience and reference for modern medicine.

[0003] By intelligently learning the prescriptions of famous traditional Chinese medicine practitioners, we can improve our medical skills and better serve patients, while promoting the modernization and internationalization of traditional Chinese medicine. This kind of learning can also help protect and make good use of traditional medical resources and contribute to the cause of human health.

[0004] The current learning algorithms for famous traditional Chinese medicine prescriptions mainly include text character-based search technology and text semantic-based matching technology. However, the existing algorithms have at least the following problems in practical application: 1. Text character-based search technology can match classical Chinese texts, but it cannot identify semantic information and needs to rely on the currently input classical Chinese texts; 2. Matching technology based on text semantics. However, due to the low frequency of appearance of classical Chinese in the corpus, it is difficult to accurately capture the deep meaning expressed by the classical Chinese, and it is impossible to effectively complete the matching task of classical Chinese. Summary of the invention

[0005] The purpose of the present invention is to provide a method, device, equipment and medium for learning Chinese medicine prescriptions based on a large language model, so as to solve the problem that the prior art is difficult to accurately capture the deep meaning expressed by classical Chinese and cannot effectively complete the task of matching classical Chinese.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions: In a first aspect, the present invention provides a method for learning a traditional Chinese medicine prescription based on a large language model, the method comprising: Obtain the doctor's current medical records in vernacular Chinese; Using the word segmentation tool, the doctor's current vernacular medical case text is segmented to obtain a set of medical case terms; Vectorize the medical case terminology set based on vectorization tools to obtain the semantic vector expression of the medical case; Based on the semantic vector expression of medical records, target TCM medical records are matched from a pre-built vector database; wherein the vector database is built based on classical Chinese TCM texts and a large language model; Visualize the target TCM medical records.

[0007] Preferably, the method further comprises: constructing a vector database, comprising: Create training corpus; Load the large language model, train the large language model using the training corpus, and obtain a trained model; Constructing a set of TCM terms expressed in vernacular Chinese, wherein the set of TCM terms expressed in vernacular Chinese includes a plurality of TCM terms expressed in vernacular Chinese; Acquire TCM medical records expressed in classical Chinese, segment the TCM medical records expressed in classical Chinese based on a word segmentation tool, and obtain a set of TCM terms expressed in classical Chinese, wherein the set of TCM terms expressed in classical Chinese includes a plurality of TCM terms expressed in classical Chinese; Call the trained model to find the TCM term expressed in vernacular Chinese that matches each TCM term expressed in classical Chinese from the set of TCM terms expressed in vernacular Chinese; Based on the vectorization tool, the vernacular Chinese TCM terms that match each classical Chinese TCM term are respectively vectorized to obtain the vernacular Chinese semantic vector expression corresponding to each classical Chinese TCM term; Create an ID for each TCM term expressed in classical Chinese, and construct a vector database based on the ID of each TCM term expressed in classical Chinese and the vernacular semantic vector expression corresponding to each TCM term expressed in classical Chinese.

[0008] Preferably, creating a training corpus includes: Acquire a number of classical Chinese samples and a number of vernacular Chinese samples, wherein the classical Chinese samples are classical Chinese TCM texts, and the vernacular Chinese samples are vernacular Chinese TCM texts; Mark the correspondence between several classical Chinese samples and several vernacular Chinese samples; The training corpus is created based on the correspondence between several annotated classical Chinese samples and several vernacular Chinese samples.

[0009] Preferably, the large language model is a QWen2-7B model.

[0010] Preferably, obtaining TCM medical records expressed in classical Chinese includes: selecting a preset number of TCM medical records expressed in classical Chinese from a pre-constructed database of famous veteran TCM practitioners.

[0011] Preferably, the vectorization tool is a BoW algorithm, a TF-IDF algorithm, a Word2Vec model, a BERT model or a Doc2Vec model; the word segmentation tool is an nltk tool, a spaCy tool or a TextBlob tool.

[0012] Preferably, searching the set of TCM terms expressed in vernacular Chinese that matches each TCM term expressed in classical Chinese includes: Based on the similarity function, respectively calculating the similarity between each TCM term expressed in classical Chinese and multiple TCM terms expressed in vernacular Chinese in the set of TCM terms expressed in vernacular Chinese, and obtaining a similarity set of each TCM term expressed in classical Chinese; The highest similarity value is extracted from the similarity set of each TCM term expressed in classical Chinese, and the TCM term expressed in vernacular Chinese corresponding to the highest similarity value is used as the TCM term expressed in vernacular Chinese that matches the TCM term expressed in classical Chinese.

[0013] In a second aspect, the present invention provides a TCM prescription learning device based on a large language model, the device is used to implement the TCM prescription learning method based on a large language model, and the device comprises: The text acquisition module is used to obtain the doctor's current vernacular medical case text; The text segmentation module is used to segment the current vernacular medical case text of the doctor based on the word segmentation tool to obtain a set of medical case terms; The vector conversion module is used to vectorize the medical case term set based on the vectorization tool to obtain the semantic vector expression of the medical case; A medical case matching module is used to match the target TCM medical case from a pre-built vector database based on the semantic vector expression of the medical case; wherein the vector database is built based on classical Chinese TCM texts and a large language model; The medical case display module is used to visualize the target TCM medical cases.

[0014] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned large language model-based TCM prescription learning when executing the computer program.

[0015] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned large language model-based TCM prescription learning.

[0016] Beneficial effects: The present invention realizes a seamless connection between modern vernacular and ancient classical Chinese, allowing doctors to easily convert everyday language into classical Chinese prescriptions of ancient famous doctors. The present invention not only greatly expands the source of learning materials for Chinese medicine doctors, but also significantly improves the quality of learning materials. Through the learning method of the present invention, doctors can have a deeper understanding of ancient medical literature, thereby improving their diagnostic skills. In addition, the invention can also provide strong support for the inheritance and development of traditional Chinese medicine, ensuring the continuity and innovation of Chinese medicine knowledge. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings: Figure 1 It is a flow chart of a method for learning a traditional Chinese medicine prescription based on a large language model provided by one embodiment of the present invention; Figure 2 It is a block diagram of a TCM prescription learning device based on a large language model provided by one embodiment of the present invention. DETAILED DESCRIPTION

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in combination with the drawings and the description of the embodiments or the prior art. Obviously, the following description of the structure of the drawings is only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention.

[0019] Embodiment 1 Figure 1 The flowchart of a method for learning a TCM prescription based on a large language model provided by an embodiment of the present invention includes: a server and a client, the server and the client are connected in communication, the client can be a mobile phone, a tablet, a laptop or a PC, and the doctor can access the server through the client to execute the method in the server. Based on the application scenario, this embodiment provides a method for learning a TCM prescription based on a large language model, such as Figure 1 As shown, the method includes: Step S10: Obtain the current vernacular medical case text of the doctor; in this embodiment, the doctor can input the current vernacular medical case text of the doctor by typing text on the client, and the client directly uploads the typed current vernacular medical case text of the doctor to the server; Alternatively, you can input a voice on the client and upload it to the server, which will then convert the voice into text (you can also convert the voice into text on the client) to get the doctor's current medical case in vernacular Chinese. Alternatively, the doctor can write Chinese characters in vernacular Chinese, take a picture with a camera (can be a mobile phone), and transmit the picture to the client. The client then uploads the picture to the server. The server uses OCR (Optical Character Recognition) algorithm to recognize the handwritten Chinese characters in the picture to obtain the doctor's current medical case text in vernacular Chinese.

[0020] In this embodiment, vernacular is an article written in vernacular, also known as colloquial language, that is, daily language. Vernacular is relative to classical Chinese.

[0021] Step S20: segment the doctor's current vernacular medical case text based on a word segmentation tool to obtain a medical case term set; in this embodiment, the word segmentation tool can be an nltk tool, a spaCy tool, or a TextBlob tool.

[0022] Among them, the nltk tool (Natural Language Toolkit, referred to as nltk) is a powerful natural language processing library that provides text segmentation functions in multiple languages; the spaCy tool is a high-performance natural language processing library that provides a simple and easy-to-use interface for text segmentation and other NLP (Natural Language Processing) tasks; the TextBlob tool is a simple and easy-to-use NLP library that encapsulates the functions of nltk and other libraries and provides basic functions such as text segmentation.

[0023] Step S30: vectorizing the medical case term set based on a vectorization tool to obtain a semantic vector expression of the medical case; in this embodiment, the vectorization tool is a BoW algorithm, a TF-IDF algorithm, a Word2Vec model, a BERT model or a Doc2Vec model; The BoW (Bag of Words) algorithm is a simple text representation method that treats text as a collection of words without considering the order of the words. It vectorizes the text by counting the number of times each word appears in the document. Among them, the TF-IDF (Term Frequency-Inverse Document Frequency) algorithm is a weight calculation method that takes into account the frequency of words in the document and their distribution in the entire corpus; Among them, the Word2Vec model is a prediction model that maps words to vectors in a high-dimensional space, where the distance between vectors represents semantic similarity; Among them, the BERT model is a Transformer-based pre-trained language representation model that captures the contextual information of the text through bidirectional training; Among them, Doc2Vec is an extension of Word2Vec, which creates vectors not only for words but also for the entire document.

[0024] In this embodiment, different types of word segmentation tools can be flexibly selected according to actual needs.

[0025] Step S40: Based on the semantic vector expression of the medical case, match the target TCM medical case from a pre-constructed vector database; wherein the vector database is constructed based on classical Chinese TCM texts and a large language model, and the vector database stores a large number of TCM terms expressed in classical Chinese and in vernacular Chinese that have the same meaning.

[0026] As a further optimization of this embodiment, the method further includes: constructing a vector database, including: Step a10: Create training corpus. The specific method of creating training corpus is: obtain a number of classical Chinese samples and a number of vernacular Chinese samples, wherein the classical Chinese samples are classical Chinese TCM texts, and the vernacular Chinese samples are vernacular Chinese TCM texts; annotate the correspondence between the number of classical Chinese samples and the number of vernacular Chinese samples; and create training corpus according to the correspondence between the annotated number of classical Chinese samples and the number of vernacular Chinese samples.

[0027] For example, "lao yan" and "lung tuberculosis" have the same meaning, and "chang yan" and "dysentery" also have the same meaning. The former is a vernacular sample, and the latter is a classical Chinese sample. For example, the formats of the vernacular sample and classical Chinese sample are as follows: Input ['intestinal diarrhea', 'dysentery'], output ['yes']; Input ['lao yan', 'dysentery'], output ['no']; First, we need to mark the correspondence between a large number of classical Chinese samples and vernacular Chinese samples. The format is as follows: Case1: ['intestinal diarrhea', 'dysentery'], ['yes']; Case2: ['lao yan', 'dysentery'], ['no']; ... CaseN: ['hiccup', 'hiccup'], ['yes'].

[0028] Step a20: Load the large language model, and train the large language model using the training corpus to obtain a trained model; wherein the large language model adopts the QWen2-7B model, which is a pre-training and instruction fine-tuning model of the Qwen2 large model.

[0029] In this embodiment, a model is trained based on an open source training framework (deepspeed), the basic model QWen2-7B is loaded, and training is performed using the prepared corpus. A new model can be obtained that has the ability to determine whether a TCM term expressed in classical Chinese and a TCM term expressed in vernacular Chinese have the same meaning.

[0030] Step a30: constructing a set of TCM terms expressed in vernacular Chinese, wherein the set of TCM terms expressed in vernacular Chinese includes a plurality of TCM terms expressed in vernacular Chinese.

[0031] Step 40: Obtain TCM medical records expressed in classical Chinese, segment the TCM medical records expressed in classical Chinese based on a word segmentation tool, and obtain a set of TCM terms expressed in classical Chinese, wherein the set of TCM terms expressed in classical Chinese includes a plurality of TCM terms expressed in classical Chinese; wherein the word segmentation tool is an nltk tool, a spaCy tool, or a TextBlob tool.

[0032] In this embodiment, a database of famous veteran Chinese medicine practitioners is pre-constructed on the server, and a large number of medical records of famous veteran Chinese medicine practitioners are stored in the database in the form of classical Chinese. When it is necessary to obtain Chinese medicine records expressed in classical Chinese, a preset number of Chinese medicine records expressed in classical Chinese are directly selected from the database of famous veteran Chinese medicine practitioners.

[0033] Step a50: calling the trained model to search for a TCM term expressed in vernacular Chinese that matches each TCM term expressed in classical Chinese from the set of TCM terms expressed in vernacular Chinese.

[0034] Specifically, a Chinese medicine term expressed in vernacular Chinese that matches each Chinese medicine term expressed in classical Chinese is searched from the set of Chinese medicine terms expressed in vernacular Chinese, including: Step a501: Based on a similarity function, respectively calculate the similarity between each TCM term expressed in classical Chinese and a plurality of TCM terms expressed in vernacular Chinese in the TCM term set expressed in vernacular Chinese, and obtain a similarity set of each TCM term expressed in classical Chinese; wherein the similarity function may be a cosine similarity function; Step a502: extract the highest similarity value from the similarity set of each TCM term expressed in classical Chinese, and use the TCM term expressed in vernacular Chinese corresponding to the highest similarity value as the TCM term expressed in vernacular Chinese that matches the TCM term expressed in classical Chinese.

[0035] Step a60: vectorizing the TCM terms expressed in vernacular Chinese that match each TCM term expressed in classical Chinese based on a vectorization tool to obtain a vernacular Chinese semantic vector expression corresponding to each TCM term expressed in classical Chinese; wherein the vectorization tool is a BoW algorithm, a TF-IDF algorithm, a Word2Vec model, a BERT model, or a Doc2Vec model; Step a70: Create an ID for each TCM term expressed in classical Chinese, and construct a vector database based on the ID of each TCM term expressed in classical Chinese and the vernacular semantic vector expression corresponding to each TCM term expressed in classical Chinese.

[0036] In this embodiment, the vernacular semantic vector closest to the semantic vector expression of the current medical case can be searched in the vector database. Since the correspondence between each TCM term expressed in classical Chinese and the corresponding vernacular semantic vector is established in the vector library, the ID of each TCM term expressed in classical Chinese corresponding to the closest vernacular semantic vector can be matched at this time, and then the corresponding medical case of a famous TCM doctor can be found according to the ID of the TCM term, and the corresponding medical case of a famous TCM doctor found can be used as the target TCM case.

[0037] Step S50: Visually display the target TCM medical case. In this embodiment, the server sends the target TCM medical case to the client, and the client displays the target TCM medical case to the doctor.

[0038] The present invention realizes a seamless connection between modern vernacular and ancient classical Chinese, allowing doctors to easily convert everyday language into classical Chinese prescriptions of ancient famous doctors. The present invention not only greatly expands the source of learning materials for Chinese medicine doctors, but also significantly improves the quality of learning materials. Through the learning method of the present invention, doctors can have a deeper understanding of ancient medical literature, thereby improving their diagnostic skills. In addition, the invention can also provide strong support for the inheritance and development of traditional Chinese medicine, ensuring the continuity and innovation of Chinese medicine knowledge.

[0039] Embodiment 2 Figure 2 FIG. 1 is a block diagram of a TCM prescription learning device based on a large language model provided by an embodiment of the present invention. Figure 2 As shown, this embodiment provides a TCM prescription learning device based on a large language model, the device is used to implement the TCM prescription learning method based on a large language model in embodiment 1, and the device includes: The text acquisition module is used to obtain the doctor's current vernacular medical case text; The text segmentation module is used to segment the current vernacular medical case text of the doctor based on the word segmentation tool to obtain a set of medical case terms; The vector conversion module is used to vectorize the medical case term set based on the vectorization tool to obtain the semantic vector expression of the medical case; A medical case matching module is used to match the target TCM medical case from a pre-built vector database based on the semantic vector expression of the medical case; wherein the vector database is built based on classical Chinese TCM texts and a large language model; The medical case display module is used to visualize the target TCM medical cases.

[0040] This embodiment also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the learning of traditional Chinese medicine prescriptions based on a large language model in the first embodiment when executing the computer program.

[0041] This embodiment also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the learning of traditional Chinese medicine prescriptions based on a large language model in the first embodiment is implemented.

[0042] The present invention realizes a seamless connection between modern vernacular and ancient classical Chinese, allowing doctors to easily convert everyday language into classical Chinese prescriptions of ancient famous doctors. The present invention not only greatly expands the source of learning materials for Chinese medicine doctors, but also significantly improves the quality of learning materials. Through the learning method of the present invention, doctors can have a deeper understanding of ancient medical literature, thereby improving their diagnostic skills. In addition, the invention can also provide strong support for the inheritance and development of traditional Chinese medicine, ensuring the continuity and innovation of Chinese medicine knowledge.

[0043] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0044] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0045] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A method for learning Chinese medicine prescriptions based on a large language model, characterized in that: The method comprises: Obtain the doctor's current medical records in vernacular Chinese; Using the word segmentation tool, the doctor's current vernacular medical case text is segmented to obtain a set of medical case terms; Vectorize the medical case terminology set based on vectorization tools to obtain the semantic vector expression of the medical case; Based on the semantic vector expression of medical records, target TCM medical records are matched from a pre-built vector database; wherein the vector database is built based on classical Chinese TCM texts and a large language model; Visualize the target TCM medical records.

2. The method for learning Chinese medicine prescriptions based on a large language model according to claim 1, characterized in that: The method further comprises: constructing a vector database, comprising: Create training corpus; Load the large language model, train it using the training corpus, and obtain a trained model; Constructing a set of TCM terms expressed in vernacular Chinese, wherein the set of TCM terms expressed in vernacular Chinese includes a plurality of TCM terms expressed in vernacular Chinese; Acquire TCM medical records expressed in classical Chinese, segment the TCM medical records expressed in classical Chinese based on a word segmentation tool, and obtain a set of TCM terms expressed in classical Chinese, wherein the set of TCM terms expressed in classical Chinese includes a plurality of TCM terms expressed in classical Chinese; Call the trained model to find the TCM term expressed in vernacular Chinese that matches each TCM term expressed in classical Chinese from the set of TCM terms expressed in vernacular Chinese; Based on the vectorization tool, the vernacular Chinese TCM terms that match each classical Chinese TCM term are respectively vectorized to obtain the vernacular Chinese semantic vector expression corresponding to each classical Chinese TCM term; Create an ID for each TCM term expressed in classical Chinese, and construct a vector database based on the ID of each TCM term expressed in classical Chinese and the vernacular semantic vector expression corresponding to each TCM term expressed in classical Chinese.

3. The method for learning Chinese medicine prescriptions based on a large language model according to claim 2, characterized in that: Create training corpus, including: Acquire a number of classical Chinese samples and a number of vernacular Chinese samples, wherein the classical Chinese samples are classical Chinese TCM texts, and the vernacular Chinese samples are vernacular Chinese TCM texts; Mark the correspondence between several classical Chinese samples and several vernacular Chinese samples; The training corpus is created based on the correspondence between several annotated classical Chinese samples and several vernacular Chinese samples.

4. The method for learning Chinese medicine prescriptions based on a large language model according to claim 2, characterized in that: The large language model is the QWen2-7B model.

5. The method for learning Chinese medicine prescriptions based on a large language model according to claim 2, characterized in that: The method of obtaining the TCM medical records expressed in classical Chinese is as follows: a preset number of TCM medical records expressed in classical Chinese are selected from a pre-built database of famous veteran TCM practitioners.

6. The method for learning Chinese medicine prescriptions based on a large language model according to claim 2, characterized in that: The vectorization tool is a BoW algorithm, a TF-IDF algorithm, a Word2Vec model, a BERT model or a Doc2Vec model; the word segmentation tool is an nltk tool, a spaCy tool or a TextBlob tool.

7. The method for learning Chinese medicine prescriptions based on a large language model according to claim 2, characterized in that: From the set of TCM terms expressed in vernacular Chinese, find TCM terms expressed in vernacular Chinese that match each TCM term expressed in classical Chinese, including: Based on the similarity function, respectively calculating the similarity between each TCM term expressed in classical Chinese and multiple TCM terms expressed in vernacular Chinese in the set of TCM terms expressed in vernacular Chinese, and obtaining a similarity set of each TCM term expressed in classical Chinese; The highest similarity value is extracted from the similarity set of each TCM term expressed in classical Chinese, and the TCM term expressed in vernacular Chinese corresponding to the highest similarity value is used as the TCM term expressed in vernacular Chinese that matches the TCM term expressed in classical Chinese.

8. A device for learning a traditional Chinese medicine prescription based on a large language model, the device being used to implement the method for learning a traditional Chinese medicine prescription based on a large language model as claimed in any one of claims 1 to 7, characterized in that: The device comprises: The text acquisition module is used to obtain the doctor's current vernacular medical case text; The text segmentation module is used to segment the current vernacular medical case text of the doctor based on the word segmentation tool to obtain a set of medical case terms; The vector conversion module is used to vectorize the medical case term set based on the vectorization tool to obtain the semantic vector expression of the medical case; A medical case matching module is used to match the target TCM medical case from a pre-built vector database based on the semantic vector expression of the medical case; wherein the vector database is built based on classical Chinese TCM texts and a large language model; The medical case display module is used to visualize the target TCM medical cases.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for learning traditional Chinese medicine prescriptions based on a large language model according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for learning a traditional Chinese medicine prescription based on a large language model described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Traditional Chinese medicine prescription recommendation method and system based on ancient books and ancient prescriptions

    CN113268511A

  • Traditional Chinese medicine symptom intelligent identification method and device

    CN115391494A

  • Statement recommendation method and device, equipment and storage medium

    CN116089597A

  • Clinical information text standardization method and device, equipment and medium

    CN117422074A

  • Vectorization knowledge base construction method and device

    CN117422135A