An intelligent acupuncture diagnosis agent system and method based on a large language model
The intelligent acupuncture diagnostic system, which combines a large language model with knowledge graphs and an interactive agent mechanism, solves the black box effect of AI acupuncture systems, realizes transparency and personalization of acupuncture treatment plans, and improves the accuracy and efficiency of treatment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HENAN UNIVERSITY OF TECHNOLOGY
- Filing Date
- 2025-11-06
- Publication Date
- 2026-05-29
AI Technical Summary
Existing AI acupuncture systems suffer from a black box effect, failing to proactively uncover potential related symptoms. This results in opaque treatment plans that lack personalization and precision, hindering timely detection and early intervention of diseases.
By combining a large language model with knowledge graphs, semantic retrieval enhancement generation technology, symptom-acupoint knowledge base, and interactive agent mechanism, an intelligent acupuncture diagnosis system is constructed. Through problem classification and scenario-based processing, the system automatically adjusts acupuncture treatment plans, outputs the basis for the treatment plans, and proactively inquires into and mines related symptoms.
This has enabled transparency and personalization of acupuncture treatment plans, improved the accuracy and reliability of treatment plans, allowed for early detection and intervention of potential diseases, and enhanced the efficiency and effectiveness of treatment.
Smart Images

Figure CN122117314A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent diagnosis, and more particularly to an intelligent acupuncture diagnostic method. Background Technology
[0002] In recent years, with the rapid development of artificial intelligence technology, large-scale models (such as GPT and BERT) and agent systems have gradually become the core driving force for technological innovation in various fields. These technologies, by simulating and enhancing human cognitive abilities, have demonstrated enormous application potential in industries such as healthcare, education, and finance. In the field of traditional medicine, especially acupuncture, although acupuncture has a history of thousands of years and is widely used to treat various diseases, the diagnostic and treatment process of traditional acupuncture still faces some challenges with the continuous development of modern medicine and technology. First, traditional acupuncture relies on the physician's rich clinical experience and manual skills, which leads to certain individual differences in its effectiveness and the controllability of treatment. Second, the personalization and precision of acupuncture treatment are limited, especially when facing patients of different ages and with different conditions; how to flexibly adjust the treatment plan according to the specific situation has always been a challenge.
[0003] To address this, many researchers have attempted to use digital and intelligent methods to assist traditional acupuncture, aiming to improve the stability and accuracy of acupuncture efficacy. Some studies have focused on using AI to automatically locate acupoints, others on using machine learning to analyze the patterns of acupuncture treatment for brain diseases, and still others on using AI to generate simple acupuncture plans. However, significant shortcomings remain. First, traditional AI diagnostic systems are black boxes, lacking transparency. Many AI-assisted acupuncture systems can provide treatment plans, but users (such as doctors or patients) do not know how these plans were derived. Some have tried using large models (such as GPT) to answer acupuncture questions, but the limitations of large models are obvious; they can only answer based on their learned knowledge, resulting in inaccurate and unsatisfactory answers. Traditional AI or large models can only answer what the user asks, failing to proactively detect problems early and miss opportunities for intervention. For example, the invention patent with announcement number CN113035350B discloses a medical decision support method and system based on knowledge extraction. By constructing an acupuncture ontology and optimizing the ranking algorithm, it solves the problem of intelligent automatic acupuncture diagnosis, realizing personalized treatment plans and diagnostic results for acupuncture. However, this method lacks the ability to perform flexible problem classification and interactive diagnosis driven by a large language model, cannot actively explore related symptoms, has a single knowledge base type, and its application scenarios are limited to ischemic stroke.
[0004] In summary, existing technologies suffer from a lack of transparency in the diagnosis and treatment process. The "black box effect" may make it difficult for users to ascertain the source and basis of a treatment plan, thereby reducing their trust in the treatment plan. Furthermore, most existing AI systems lack the ability to proactively ask questions and cannot actively uncover potential related symptoms, making it difficult to detect and intervene in diseases in a timely manner. Summary of the Invention
[0005] To address the shortcomings of the aforementioned background technologies, this invention proposes an intelligent acupuncture diagnosis agent system and diagnostic method based on a large language model, which solves the problem of the black box effect in existing technologies, making it impossible to actively discover potential related symptoms.
[0006] The beneficial effects of this invention are as follows:
[0007] Unlike traditional AI-powered diagnostic systems, this invention categorizes and processes cases according to different scenarios. It automatically adjusts and optimizes acupuncture treatment plans based on patients' varying needs, providing professional treatment options and more efficient treatment suggestions tailored to different symptoms. Simultaneously, it outputs the supporting documentation for the treatment plan, allowing for knowledge base retrieval based on user questions, thus overcoming the black-box effect of traditional AI treatment. Based on the user-input symptoms, through follow-up questions and symptom association reasoning, it can infer other possible symptoms, enabling early intervention and achieving early detection and treatment. Classification and error correction processes ensure the accuracy of the output plan. Attached Figure Description
[0008] 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 some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0009] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0010] 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.
[0011] This invention provides an intelligent acupuncture diagnosis agent system and method based on a large language model. By combining a large language model, knowledge graph, semantic retrieval enhancement generation technology, symptom-acupoint knowledge base, acupoint information knowledge base, and interactive agent mechanism, it achieves intelligent assistance for the entire acupuncture diagnosis and treatment process, including functions such as problem identification, symptom extraction, proactive consultation, intelligent reasoning, personalized acupuncture plan generation, and information error correction.
[0012] Example 1
[0013] An intelligent acupuncture diagnosis method based on a large language model, such as Figure 1 As shown, the steps include:
[0014] S1: Construct the core model, which includes the embedded model, the reordering model, and the large language model;
[0015] In this embodiment, the embedded model uses the Qwen3-Embedding-0.6B model to convert text into vector representation. For example, the input / output format is as follows: assuming the input sentence is "Acupuncture treatment can relieve headaches," the embedded model can output a vector in the following format: [0.23, 0.12, -0.75, 0.48, 0.10, ..., -0.36].
[0016] In this embodiment, the re-ranking model uses the Qwen3-Reranker-0.6B model to rank the retrieved documents by relevance. Specifically, the retrieved candidate answers and the user's input question are input into the re-ranking model. The model analyzes the semantic similarity and contextual information between the user's input question and the candidate answers. The re-ranking model assigns a score to each candidate answer and rearranges them according to the scores, outputting the ranked answers: candidate answers are ranked from highest to lowest score, and finally, the most relevant answer is output.
[0017] In this embodiment, the large language model uses Qwen2.5-7B-Instruct to generate answers to user-input questions, determine question types, and evaluate the relevance of search results.
[0018] S2: A knowledge base is constructed based on embedded models and a large language model. This knowledge base includes a general acupuncture knowledge base, an acupoint information knowledge base, a symptom-acupoint knowledge base, and an acupuncture domain knowledge graph. The design purpose of these knowledge bases is to reduce reliance on the model's own generation, thereby effectively reducing the hallucination rate and improving the accuracy and reliability of diagnostic solutions.
[0019] In this embodiment, the general acupuncture knowledge base primarily includes classic literature and authoritative materials in the field of acupuncture. By integrating classic acupuncture books such as the *Huangdi Neijing*, *Zhenjiu Jiayi Jing*, and *Zhenjiu Dacheng*, it provides the knowledge base with basic theories and treatment methods. By providing authoritative theoretical support, the general acupuncture knowledge base can address the problem of inaccurate answers to general knowledge questions using simple large language models.
[0020] The method for constructing the general acupuncture knowledge base is as follows:
[0021] First, classic acupuncture books are digitized using high-precision optical character recognition (OCR) technology. Then, some difficult-to-convert content is manually selected and proofread to ensure the integrity and accuracy of the data, resulting in an index block of classic acupuncture books.
[0022] Furthermore, prompt words are designed to enable the large language model Qwen2.5-7B-Instruct to act as both an acupuncture questioning expert and an acupuncture answering expert. The acupuncture questioning expert, based on the Qwen2.5-7B-Instruct model, simulates the thinking of a professional physician, generating clinically relevant and theoretically sound questions from index blocks in classic acupuncture books. The acupuncture answering expert, also based on the Qwen2.5-7B-Instruct model, provides precise answers to the questions, generating responses that conform to medical logic and the semantic system of acupuncture. A general acupuncture knowledge question-and-answer pair is constructed based on the questions posed by the acupuncture questioning expert and the answers from the acupuncture answering expert. This pair is then converted into vectors using the Qwen3-Embedding-0.6B embedded model, and a general acupuncture knowledge base vector index is constructed (in this embodiment, the FAISS vector index is used).
[0023] In this embodiment, the acupoint information knowledge base compiles detailed information on each acupoint, including its name, location, therapeutic functions, needling techniques, contraindications, and other medical information. This provides accurate data for acupoint knowledge-based questions (such as "Where is Hegu acupoint?"), avoiding errors in acupoint information provided by traditional AI.
[0024] The method for constructing the acupoint information knowledge base is as follows:
[0025] First, we extract publicly available acupuncture clinical research papers, case reports, academic reviews, and guidelines from domestic and international medical databases (such as PubMed, Wanfang Medical Network, and CNKI) to provide reliable and authoritative clinical data for the acupoint information database.
[0026] Furthermore, using Natural Language Processing (NLP) technology, keyword filtering, automatic summarization, entity recognition, and topic clustering methods are employed to screen research content related to acupuncture points from the clinical data. This content is then systematically organized and categorized to obtain acupuncture point information, including acupuncture point name, location, therapeutic function, needling method, contraindications, and other medical information. The acupuncture point information is then converted into vectors using the Qwen3-Embedding-0.6B embedded model, and an acupuncture point information knowledge base vector index is constructed.
[0027] Furthermore, by combining information correction with professional doctors, an authoritative acupoint information knowledge base will be built.
[0028] In this embodiment, the data sourced for the symptom-acupoint knowledge base mainly includes modern medical literature and classical Chinese medicine literature. It compiles detailed information on each acupoint, including acupoint name, location, therapeutic functions, needling methods, contraindications, and other medical information. This is primarily used to provide the relationship between symptoms and corresponding therapeutic acupoints. It provides direct acupoint compatibility data for treatment-related problems, avoiding the problem of unfounded symptom-acupoint pairings generated by large language models.
[0029] The method for constructing the symptom-acupoint knowledge base is as follows:
[0030] First, the system integrates acupuncture-related clinical research, case reports, and systematic reviews from domestic and international medical databases (such as PubMed, Wanfang Medical Network, CNKI, etc.) to ensure the scientific validity and authority of the data in the database.
[0031] Furthermore, by combining classic Chinese medicine literature, such as the Yellow Emperor's Inner Classic, the Classic of Acupuncture and Moxibustion, and the Great Compendium of Acupuncture and Moxibustion, we can extract classic treatment methods and experiences corresponding to symptoms and acupoints in traditional Chinese medicine theory, thereby further enriching the data source.
[0032] Furthermore, using the Qwen2.5-7B-Instruct large language model, we conducted in-depth analysis of domestic and international medical databases and classic TCM literature to identify and extract the pairing relationships between symptoms and treatment acupoints.
[0033] Furthermore, after each symptom-acupoint pair is generated, the Qwen3-Embedding-0.6B embedded model is used to convert the new symptom-acupoint pair into a vector and construct a symptom-acupoint knowledge base vector index. This index is then compared with existing pairs in the symptom-acupoint knowledge base to ensure that the generated pairs are not duplicated, conflict-free, and consistent with existing clinical and theoretical evidence. If duplicate or inconsistent pairs exist, the system will call a large language model to supplement and deduplicate the pairs using the provided data, ensuring that the final generated symptom-acupoint pairing data is both complete and accurate. Through this multi-level verification and optimization process, the system can continuously improve the reliability and practicality of the symptom-acupoint correspondence database.
[0034] Furthermore, after examination by professional doctors, an accurate symptom-acupoint relationship database was obtained.
[0035] The following is an example of the specific content format of the Symptom-Acupoint Knowledge Base:
[0036] Symptoms: Headache;
[0037] Main acupoints: Baihui, Fengchi, Hegu, Taichong, Shuaigu;
[0038] Acupoints: Taiyang, Yintang, Waiguan, Zulinqi, Kunlun, Houxi.
[0039] In this embodiment, the acupuncture knowledge graph constructs a multi-dimensional knowledge network in the field of acupuncture, involving various entities and their relationships (e.g., indications, compatibility) such as acupoints, symptoms, meridians, combinations, contraindications, and functions. Through the knowledge graph approach, the system can achieve multi-level and multi-dimensional association analysis, helping to further improve the accuracy of diagnosis.
[0040] The method for constructing the knowledge graph in the field of acupuncture is as follows:
[0041] First, text segmentation is performed: acupuncture knowledge materials are collected, integrating multi-source knowledge from ancient acupuncture books and modern textbooks. The collected acupuncture knowledge materials are then segmented into blocks, each approximately 1500 characters long, with a 200-character overlap limit between blocks. This segmentation strategy ensures that key sentences and entities are not cut off, effectively preserving semantic integrity and providing an accurate foundation for subsequent knowledge extraction.
[0042] Furthermore, entity and relationship extraction is performed: By designing a structured prompt template for the acupuncture field, the Qwen2.5-7B-Instruct large language model is called to extract core entities (such as acupoints, symptoms, etc.) and relationships between entities (such as the indications between acupoints and symptoms, and the compatibility between acupoints) from each text block. At the same time, specific attribute values (such as acupoint location, acupoint selection method, etc.) are reserved for each acupoint and other entities. In this way, the key information of acupoints can be obtained when knowledge graphs are used later.
[0043] Entity types include, but are not limited to: acupoints, symptoms, meridians, diseases, and treatment methods.
[0044] Relationship types include, but are not limited to: Indications of symptoms: (Acupoint → Symptom); Compatibility: (Acupoint → Acupoint); Subordinate meridian: (Acupoint → Meridian); Treatment of diseases: (Acupuncture method → Disease).
[0045] For acupoints, please extract the following attributes as much as possible: Location: the body part or location where the acupoint is located; Indications: the main indications for the acupoint; Location method: the posture and location method for locating the acupoint; Needling techniques: the depth, angle, and key points of the needling technique; Contraindications: contraindications or precautions for needling.
[0046] Furthermore, a file is used to store the main symptoms of acupoints, the compatible acupoints, etc., for calculating the main treatment weight and compatibility of acupoints in the knowledge graph.
[0047] Specifically, in the knowledge graph, each acupoint-indication-symptom relationship is associated with a weight value, which quantifies the importance of that acupoint in treating a specific symptom, providing a basis for subsequent acupoint selection. The formula for calculating the indication weight is:
[0048]
[0049] in, Indicates symptoms acupoints The final weight of the relationship between them. As the basic weighting factor, the primary treatment condition is assigned a value of 1.0, and the secondary treatment condition is assigned a value of 0.6. As a symptom-specific factor, , It indicates that it can treat the symptoms. The total number of acupoints indicates the prevalence of the symptom; a higher number indicates a more widespread symptom, and the weight of a single acupoint decreases relatively. This is a compatibility enhancement factor, used to quantify the degree of synergistic effect when this acupoint is combined with other acupoints. , Indicates acupoints The collection of all acupoints that have compatibility relationships. Indicates acupoints acupoints Frequency of compatibility refers to the number of times that the two ingredients are jointly recommended for treatment in clinical practice or literature. The higher the frequency, the stronger the practicality and acceptance of the compatibility.
[0050] To avoid an excessively wide distribution of weight values due to the superposition of different calculation factors, this invention normalizes the calculated weight values, limiting them to the interval [0.3, 1.5]. The lower bound of 0.3 in this interval is used to prevent weak relations from being completely ignored, while the upper bound of 1.5 is used to suppress the excessive amplification of dominant relations, thereby ensuring a reasonable distribution and computational stability of weight values in the knowledge graph.
[0051] Specifically, the formula for calculating the suitability of acupoint combinations in a knowledge graph is as follows:
[0052] First, let the sets of symptoms treated by acupoint A and acupoint B be respectively... and Calculate the Jaccard similarity of the main symptoms treated by acupoints A and B:
[0053]
[0054] in, This is a collection of symptoms that are treated by both acupoints. This represents the union of the symptoms treated by two acupoints. When neither acupoint has recorded any symptoms (i.e., the union is empty), a default value of 0.5 is assigned to avoid undefined cases.
[0055] Furthermore, the suitability of acupoint combinations is calculated based on the Jaccard similarity of the main symptoms treated by acupoints, the meridian compatibility rules, and the anatomical location compatibility principles. This is used to quantify the rationality of the combination of two acupoints and provide a basis for acupoint selection.
[0056]
[0057] in, , and These are weighted by symptom similarity, meridian compatibility, and location compatibility. For the meridian compatibility score, , The two acupoints belong to the same meridian; The two acupoints belong to the exterior and interior meridians respectively (such as the Lung Meridian and the Large Intestine Meridian); Other meridian combinations. Scoring is based on the matching of body parts. : Top and bottom pairing (such as head and feet); Front and back pairing (e.g., chest and back, abdomen and waist); : Compatible with products from the same location (e.g., both on the upper limbs); No specific compatibility relationship.
[0058] Furthermore, to avoid duplicate and redundant knowledge graph data and to maintain the update and consistency of knowledge graph data, the Qwen3-Embedding-0.6B text embedding model is used to convert the entities, relationships between entities, and acupoint attributes of acupuncture information in each knowledge graph into vector representations, and to construct an efficient vector index for acupuncture domain knowledge graphs.
[0059] Furthermore, when constructing new knowledge blocks, similar content is retrieved from existing knowledge graph data and compared. If similar acupoint information is detected but missing, the missing parts are added; if there are no unnecessary duplicates, redundant parts are removed, thereby ensuring the accuracy and efficiency of the knowledge graph data.
[0060] S3: Utilizes a large language model to categorize user input questions, outputting categorization information including general knowledge questions and treatment questions. Different types of questions have different core requirements (e.g., treatment questions require acupoint compatibility, while general knowledge questions require explanations of knowledge points). After categorization, dedicated modules can be called, avoiding the low accuracy caused by using the same process to handle all questions. This also reduces redundant calculations in subsequent processing, improves system response efficiency, and ensures that each question receives a targeted solution.
[0061] In this embodiment, the Qwen2.5-7B-Instruct large language model is invoked to obtain classification information based on prompt words. The classification information includes three categories:
[0062] General knowledge questions: These mainly revolve around the basic theories, concepts, or common acupuncture knowledge, such as the principles and history of acupuncture. For example: Where is Hegu (LI4) located?
[0063] Targeted treatment questions: These questions involve treatment plans for specific body parts and symptoms, asking which specific areas to treat a certain symptom with acupuncture. For example: Which acupoints on the hand can treat stomach problems?
[0064] Non-specific treatment questions: These involve treatment options for symptoms or diseases, typically asking how to relieve or treat a certain symptom through acupuncture. For example: How to treat a cold, and which acupoints can be used?
[0065] Examples of prompt words are as follows:
[0066] In this embodiment of the application, the prompt for a general knowledge question is: "You are an expert in Traditional Chinese Medicine acupuncture knowledge. Please determine whether the following question belongs to the general knowledge category."
[0067] Definition: General knowledge questions: These questions mainly revolve around the basic theories, concepts, or common knowledge of acupuncture. For example, the principles, history, meridian distribution, acupoint locations, and methods of acupoint selection in acupuncture. These questions do not involve specific diseases or treatment plans.
[0068] Example: What is acupuncture? Where is Hegu (LI4) located? How do you find Zusanli (ST36)? What are the different schools of acupuncture?
[0069] Instructions: If the question is a general knowledge question, please answer in the general knowledge category; otherwise, please answer in the non-general knowledge category. Only output "general knowledge" or "non-general knowledge" category; do not provide explanations.
[0070] In this embodiment of the application, the prompt for targeted treatment questions is: You are a professional TCM acupuncture diagnostic assistant. Please determine whether the following questions belong to the targeted treatment category.
[0071] Definition: Targeted treatment questions: These questions involve both specific body parts and symptoms or diseases, asking which specific body parts should be treated with acupuncture for a certain symptom. The question contains both elements: body part and symptom or disease.
[0072] Examples: Which hand acupoints can treat stomach problems? Which foot acupoints can relieve headaches? Which arm acupoints can treat insomnia?
[0073] Judgment rules: If the question includes both body parts and symptoms, please answer with a targeted treatment category; otherwise, answer with a non-targeted treatment category. Output either targeted treatment or non-targeted treatment, without explanation.
[0074] In this embodiment, the prompt for non-targeted treatment-related questions is: "You are a professional TCM acupuncture treatment assistant. Please determine whether the following questions belong to the category of non-targeted treatment questions."
[0075] Definition: Non-targeted treatment questions: These questions only involve acupuncture treatment options for symptoms or diseases. They typically ask how to relieve or treat symptoms through acupuncture therapy, but are not limited to specific body parts.
[0076] Examples: How to treat a cold, which acupoints to use for headaches, can insomnia be improved with acupuncture, how to treat lower back pain with acupuncture.
[0077] Judgment rules: If the question only mentions the disease or symptoms and does not specify the body part, please answer with a non-specific treatment.
[0078] If both body parts and symptoms are mentioned, please answer with a targeted treatment category, and output either a non-targeted treatment category or a targeted treatment category. Do not provide an explanation.
[0079] S4: Based on the core model and knowledge base, match and process general knowledge questions or treatment questions, and output preliminary knowledge point answers for general knowledge questions or preliminary treatment plans for treatment questions.
[0080] Once the questions are categorized, this invention selects the most suitable processing mechanism based on the question type. For example, for treatment-related questions, the system further extracts symptom information and matches corresponding treatment plans using a knowledge base and knowledge graph; for general knowledge-related questions, it calls upon relevant knowledge bases to provide precise explanations of acupuncture theories or concepts; and for targeted treatment-related questions, it uses a knowledge graph combined with symptom and location information to provide users with customized treatment suggestions. Through this categorization mechanism, the system can more accurately understand user needs and generate answers that best meet user expectations through appropriate processing flows.
[0081] In this embodiment of the application, the method for matching general knowledge questions is as follows:
[0082] First, using the Qwen2.5-7B-Instruct large language model, general knowledge questions are divided into acupoint knowledge and other acupuncture knowledge categories based on prompt words.
[0083] Furthermore, for acupoint knowledge categories, regular expressions are first used to match fixed phrases (e.g., "XX is located where," "XX is located how to locate the acupoint") to extract candidate acupoints. When the regular expression fails to match, the Qwen2.5-7B-Instruct large language model is invoked. Prompt words are used to enable the Qwen2.5-7B-Instruct large language model to act as a language analysis expert, recognizing and returning the requested acupoint name. The candidate acupoints obtained through regular expressions and the Qwen2.5-7B-Instruct large language model are then converted into text using the Qwen3-Embedding-0.6B text embedding model, and finally matched and checked for existence using a vector indexing and reordering model based on the acupoint information knowledge base. Even if the user mistypes, such as asking for the Zusanli acupoint, while the acupoint information knowledge base lists Zusanli, the model can still find the most likely correct name through the similarity of the embedding vectors and filter using a similarity score (>0.95). This ensures that the final returned acupoint name is a real and valid acupoint. Based on the corresponding acupoints matched in the acupoint information knowledge base, the answer information corresponding to acupoint knowledge questions is extracted, such as questions about location, function, and needling techniques. After being polished by the Qwen2.5-7B-Instruct large language model, the output yields preliminary answers to acupoint knowledge points and supporting information.
[0084] Furthermore, for other acupuncture knowledge categories, the RAG system is invoked to retrieve relevant documents from the general acupuncture knowledge base. Then, the required information from the relevant documents is passed to the Qwen2.5-7B-Instruct large language model for polishing and output, providing preliminary answers to theoretical knowledge points.
[0085] For other acupuncture knowledge categories, this invention employs a three-stage hybrid retrieval strategy of coarse recall, fine ranking, and relevance assessment to improve retrieval accuracy and efficiency. The specific implementation steps are as follows:
[0086] (1) Convert other acupuncture knowledge questions into vectors using the Qwen3-Embedding-0.6B text embedding model, call the FAISS retrieval interface, and find the top 15 most semantically similar document fragments in the vector space of the general acupuncture knowledge base using maximum inner product search (MIPS) based on the vector index of the general acupuncture knowledge base.
[0087] (2) Form question-answer pairs with other acupuncture knowledge questions and each document that is most semantically similar to them, and input them into the Qwen3-Reranker-0.6B re-ranking model to perform fine-grained relevance scoring. The higher the score, the stronger the relevance. This model can capture deep semantic interactions, thereby re-ranking the top 15 most semantically similar document fragments, and finally retaining the top 3 most relevant documents with the highest scores.
[0088] (3) To further ensure the quality of the search, the Qwen2.5-7B-Instruct large language model is called to make a comprehensive judgment on the relevance of the overall content of the top 3 most relevant documents to the original question (i.e. the other acupuncture knowledge questions), and an evaluation score is given. If the evaluation result is lower than the set threshold, it is determined that there is no reliable basis, and the search results are actively abandoned to avoid introducing noise or misleading information, and to ensure the reliability of the subsequent generated answers. The remaining relevant document fragments are passed to the large language model for polishing and then the preliminary theoretical knowledge points answers and information basis materials are output.
[0089] In this embodiment of the application, the method for matching problems related to targeted treatment is as follows:
[0090] (a) Targeted treatment questions contain both body part and symptom information. These two elements are extracted using the Qwen2.5-7B-Instruct large language model, such as: body part: hand; symptom: stomach disease.
[0091] (b) After converting the body part and symptom information into text using the Qwen3-Embedding-0.6B text embedding model, matching is performed using a knowledge graph vector indexing and reordering model. First, all acupoints that can treat the symptom are selected from the knowledge graph, such as Zusanli, Neiguan, and Hegu. Then, acupoints located on the stated body part, such as Hegu, are selected from all acupoints that can treat the symptom. After polishing using the Qwen2.5-7B-Instruct large language model, a preliminary treatment plan and supporting information for targeted treatment problems are output, such as extracting the location / needling method of Hegu from the acupoint database.
[0092] In this embodiment of the application, the method for matching non-targeted treatment problems is as follows:
[0093] ST1: Based on preset prompts, the Qwen2.5-7B-Instruct large language model is used to extract symptom information from non-targeted treatment questions and enable interactive diagnosis and treatment.
[0094] The interactive diagnosis and treatment method is as follows: When a user asks a non-targeted treatment question, the extracted symptom information is transformed into text using the Qwen3-Embedding-0.6B text embedding model, and then matched using a knowledge graph vector index and re-ranking model to query the treatment acupoints for the relevant symptoms. The system also provides feedback to the user on what other diseases these acupoints can treat, and asks the user if they have any other diseases, allowing them to output any other possible symptoms. This process involves up to three rounds of follow-up questions to collect more comprehensive symptom information.
[0095] ST2: Based on preset prompts, the Qwen2.5-7B-Instruct large language model is used to extract comprehensive symptom information from follow-up questions, and the non-targeted treatment questions raised by users are divided into single-symptom treatment questions and multi-symptom treatment questions.
[0096] ST3: For single-symptom treatment problems, after text conversion using the Qwen3-Embedding-0.6B text embedding model, matching is performed using the symptom-acupoint knowledge base vector index and reordering model to obtain acupoint information that can treat the symptom, resulting in an acupoint combination scheme for treating the symptom. After polishing using the Qwen2.5-7B-Instruct large language model, the output yields a preliminary treatment plan for single-symptom treatment problems.
[0097] ST4: For multi-symptom treatment problems, after text transformation using the Qwen3-Embedding-0.6B text embedding model, matching is performed using knowledge graph vector indexing and re-ranking models to find acupoint combinations that can treat multiple symptoms simultaneously. The scores of the main acupoint and the auxiliary acupoints are calculated based on the acupoint's therapeutic weight and compatibility. The acupoint with the highest score is selected as the main acupoint. Then, based on the compatibility relationships in the knowledge graph, the acupoint with the highest score is selected as the auxiliary acupoint. Treatment information is retrieved from the knowledge graph based on the selected main and auxiliary acupoints. After refinement using the Qwen2.5-7B-Instruct large language model, a preliminary treatment plan and supporting information for multi-symptom treatment problems are formed. For example, main acupoints: Shenmen, Baihui; auxiliary acupoint: Neiguan; needling method: Shenmen, perpendicular insertion 0.3-0.5 cun.
[0098] The method for calculating the score of the main acupoint is as follows:
[0099] ,
[0100] in, The score is based on the main acupoint. This represents the symptom coverage, with a synergy coefficient of 0.3, indicating a 30% bonus for each additional symptom treated.
[0101] The method for calculating the acupoint selection score is as follows:
[0102]
[0103]
[0104] in, For the score of acupoint combination, C is the number of recommendations, i.e., how many main acupoints recommend it; T is the total compatibility score, i.e., the sum of the compatibility scores of all the main acupoints that recommend this combination; and R is the set of main acupoints that recommend this combination. It refers to the compatibility between the main acupoint i and the auxiliary acupoints.
[0105] S5: Correct the preliminary theoretical answer or preliminary treatment plan based on the multi-strategy extraction method to obtain the final theoretical answer or treatment plan.
[0106] S51: Process preliminary theoretical answers or preliminary treatment plans into segments according to sentences or semantic units to avoid information loss due to context truncation; use regular expressions to match fixed sentence patterns and large language models for parallel extraction. For example, regular expressions include fixed structures such as "XX acupoint treats XX" and "located in XX". The large language model guides it to identify acupoint names in non-standardized expressions through prompt words to improve recall.
[0107] S52: Use the Qwen3-Embedding-0.6B text embedding model to convert the acupoints extracted in step S51 into vectors. Through FAISS vector indexing, perform similarity matching with the acupoint information knowledge base and knowledge graph respectively to confirm the existence of acupoints. Filter out erroneous words that are misidentified by the model or generated by illusion, and output a list of valid acupoints.
[0108] S53: For each valid acupoint, independently verify whether its location, therapeutic function, and acupuncture method described in the answer are consistent with the acupoint information knowledge base.
[0109] Upon detecting an error, the system employs two error correction modes:
[0110] For answers related to treatment plans, a direct replacement mode is adopted: the standard indications or location information in the acupoint information knowledge base is used to completely cover the incorrect content to ensure medical accuracy.
[0111] For general knowledge answers, a partial correction mode is adopted: that is, the original language style and structure are preserved, and only the incorrect parts are replaced (for example, indigestion is corrected to stomach pain, bloating, etc.) and the indications marked in the acupoint information knowledge base.
[0112] S54: The large language model is invoked to organize the final solution into clear natural language (such as symptom classification, main acupoints, auxiliary acupoints, location, needling method, and precautions), and output to the user. An example of the overall solution is as follows:
[0113]
[0114] Example 2
[0115] A smart acupuncture diagnosis agent system based on a large language model includes:
[0116] Core Model Building Module: Used to build core models, which include embedded models, reordering models, and large language models.
[0117] Knowledge base construction module: used to build a knowledge base based on embedded models and large language models. The knowledge base includes a general acupuncture knowledge base, an acupoint information knowledge base, a symptom-acupoint knowledge base, and an acupuncture domain knowledge graph.
[0118] User input module: Used for users to input questions.
[0119] Symptom Recognition and Intent Classification Module: This module uses a large language model to classify and analyze user-input questions and outputs classification information, including general knowledge questions and treatment questions.
[0120] The question classification and processing module is used to match and process general knowledge questions or treatment questions based on the core model and knowledge base, and output preliminary theoretical answers for general knowledge questions or preliminary treatment plans for treatment questions.
[0121] The scheme correction module is used to correct the preliminary theoretical answer or preliminary treatment plan based on the multi-strategy extraction method, so as to obtain the final theoretical answer or treatment plan.
[0122] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An intelligent acupuncture diagnostic method based on a large language model, characterized in that, The steps are as follows: S1: Construct the core model, which includes the embedded model, the reordering model, and the large language model; S2: A knowledge base is constructed based on embedded models and large language models. The knowledge base includes a general acupuncture knowledge base, an acupoint information knowledge base, a symptom-acupoint knowledge base, and an acupuncture domain knowledge graph. S3: Use a large language model to classify user input questions and output classification information including general knowledge questions and treatment questions; S4: Based on the core model and knowledge base, match and process general knowledge questions or treatment questions, and output preliminary knowledge point answers for general knowledge questions or preliminary treatment plans for treatment questions; S5: Correct the preliminary theoretical answer or preliminary treatment plan based on the multi-strategy extraction method to obtain the final theoretical answer or treatment plan.
2. The intelligent acupuncture diagnosis method based on a large language model according to claim 1, characterized in that: The method for constructing the general acupuncture knowledge base is as follows: classic acupuncture books are digitized through OCR optical character recognition, and fuzzy content is manually proofread to obtain knowledge blocks from classic acupuncture books; Prompt words are designed to enable the large language model to act as an acupuncture question expert and an acupuncture answer expert, obtain general acupuncture knowledge question-answer pairs, and use an embedded model to convert the general acupuncture knowledge question-answer pairs into vectors, and then construct an acupuncture knowledge base vector index through FAISS vector index; The method for constructing the acupoint information knowledge base is as follows: extracting acupuncture-related medical literature from domestic and foreign medical databases, extracting acupoint information from the acupuncture-related medical literature through NLP natural language processing technology, and after error correction by the patent holder, converting the acupoint information into vectors using an embedded model and then constructing an acupoint information knowledge base vector index through FAISS vector index. The method for constructing the symptom-acupoint knowledge base is as follows: extract acupuncture-related medical literature from domestic and foreign medical databases, extract the correspondence information between symptoms and acupoints from classic Chinese medicine literature, analyze and extract the pairing relationship between symptoms and treatment acupoints through a large language model, and use an embedded model to convert the pairing relationship between symptoms and treatment acupoints into vectors, and then construct the symptom-acupoint knowledge base vector index through FAISS vector index.
3. The intelligent acupuncture diagnosis method based on a large language model according to claim 2, characterized in that, The method for constructing the knowledge graph in the acupuncture field is as follows: Acupuncture knowledge data is collected and processed into blocks using an inter-block overlap strategy. A large language model is used to extract entities and relationships related to acupuncture information from the blocks. Entities include, but are not limited to, acupoints and symptoms. Relationships between entities include, but are not limited to, the indications between acupoints and symptoms, and the compatibility between acupoints. Specific attribute values are reserved for each acupoint entity, including, but not limited to, acupoint location, acupoint selection method, and contraindications. Indication weights are calculated based on the indication relationships between acupoints and symptoms, and compatibility suitability is calculated based on the compatibility between acupoints. The entities, relationships between entities, and acupoint attributes of the acupuncture information are converted into vectors using an embedded model, and then a knowledge graph vector index is constructed using the FAISS vector index. The general knowledge questions include questions about acupoints and other acupuncture knowledge, while the treatment questions include questions about targeted treatment and questions about non-targeted treatment.
4. The intelligent acupuncture diagnosis method based on a large language model according to claim 3, characterized in that, The method for calculating the weight of the main treatment is as follows: ; in, Indicates symptoms acupoints The final weight of the relationship between them. Based on the weighting factor, As a symptom-specific factor, , It indicates that it can treat the symptoms. The total number of acupoints, As a compatibility addition factor, , Indicates acupoints The collection of all acupoints that have compatibility relationships. Indicates acupoints acupoints Frequency of compatibility; The method for calculating compatibility is as follows: ; in, , and These are weighted by symptom similarity, meridian compatibility, and location compatibility. The Jaccard similarity is used to measure the main symptoms of acupoints A and B. The score is based on the compatibility of meridians. Part matching score.
5. The intelligent acupuncture diagnosis method based on a large language model according to claim 3, characterized in that: The method for matching acupoint knowledge questions is as follows: First, use regular expressions to match fixed sentence patterns to extract candidate acupoints. When the regular expression fails to match, extract candidate acupoints through a large language model. Then, convert the candidate acupoints obtained from the regular expression matching and the large language model into text through a text embedding model, and match them through a vector index and reordering model of the acupoint information knowledge base. Obtain the answer information corresponding to the acupoint knowledge questions from the acupoint information knowledge base. After polishing through the large language model, output the preliminary acupoint knowledge point answers and supporting information. The method for matching other acupuncture knowledge questions is as follows: Other acupuncture knowledge questions are converted into vectors using a text embedding model. Based on the vector index of the general acupuncture knowledge base, a maximum inner product search is performed in the vector space of the general acupuncture knowledge base to find the top few document fragments with the most semantic similarity. Each of the other acupuncture knowledge questions and the most semantically similar document fragments is paired to form a question-answer pair. The pair is then ranked and scored using the re-ranking model. A preset set of L most relevant document fragments is retained. A large language model is used to determine the relevance between the L most relevant document fragments and the other acupuncture knowledge questions. Document fragments with relevance scores below a set threshold are discarded. The remaining relevant document fragments are passed to the large language model for refinement before outputting preliminary theoretical knowledge point answers.
6. The intelligent acupuncture diagnosis method based on a large language model according to any one of claims 3-5, characterized in that: For targeted treatment-related questions, the matching process is as follows: (a) Using a large language model to extract information on body parts and symptoms; (b) After converting the body part and symptom information into text using a text embedding model, it is matched using a knowledge graph vector indexing and reordering model. First, all acupoints that can treat the symptoms are selected from the knowledge graph. Then, acupoints located on the body parts are selected from all acupoints that can treat the symptoms. After refining the information using a large language model, a preliminary treatment plan and supporting information for targeted treatment questions are output. For non-targeted treatment-related questions, the matching process is as follows: ST1: Based on preset prompts, a large language model is used to extract symptom information from non-targeted treatment questions, and interactive diagnosis and treatment are enabled to ask follow-up questions; ST2: Based on preset prompts, a large language model is used to extract comprehensive symptom information from follow-up questions, and the non-targeted treatment questions raised by users are divided into single-symptom treatment questions and multi-symptom treatment questions; ST3: For single-symptom treatment issues, a preliminary treatment plan and information basis are obtained by matching the symptom-acupoint knowledge base; ST4: For multi-symptom treatment issues, a knowledge graph is used for matching to obtain preliminary treatment plans and supporting information.
7. The intelligent acupuncture diagnosis method based on a large language model according to claim 6, characterized in that, Step ST4 involves text transformation using a text embedding model, followed by matching using a knowledge graph vector indexing and reordering model to find acupoint combinations that can treat multiple symptoms simultaneously. The scores for primary acupoints and secondary acupoints are calculated based on the acupoint's therapeutic weight and compatibility. The acupoint with the highest score is selected as the primary acupoint, and then, based on the compatibility relationships in the knowledge graph, the acupoint with the highest score is selected as the secondary acupoint. Treatment information is retrieved from the knowledge graph based on the selected primary and secondary acupoints, and refined using a large language model to form a preliminary treatment plan and supporting information for multi-symptom treatment problems.
8. The intelligent acupuncture diagnosis method based on a large language model according to claim 7, characterized in that: The method for calculating the score of the main acupoint is as follows: , in, The score is based on the main acupoint. Symptom coverage The coefficient of coordination; The method for calculating the acupoint selection score is as follows: in, In the acupoint selection score, C represents the number of recommendations, T represents the total suitability of the acupoint combination, and R represents the set of main acupoints for the recommended combination. It refers to the compatibility between the main acupoint i and the auxiliary acupoints.
9. The intelligent acupuncture diagnosis method based on a large language model according to claim 7, characterized in that: Step S5 includes: S51: Process preliminary theoretical answers or preliminary treatment plans by sentence or semantic unit; use regular expressions to match fixed sentence patterns and large language models for parallel acupoint extraction; S52: Use a text embedding model to convert the acupoints extracted in step S51 into vectors, and perform similarity matching with the acupoint information knowledge base and knowledge graph respectively to confirm that the acupoints really exist, filter out the wrong words generated by the model misidentification or illusion, and output a list of valid acupoints. S53: For each valid acupoint, independently check whether its attributes in the answer are consistent with the acupoint information knowledge base; if an error is found, for answers related to treatment plans, use direct replacement to correct the error, and for answers related to general knowledge, use local correction. S54: Call the large language model to organize the theoretical answers or treatment plans into clear natural language and output them to the user.
10. The intelligent acupuncture agent system based on a large language model according to any one of claims 1-9, characterized in that, Core model building module: used to build the core model, which includes the embedded model, the reordering model, and the large language model; Knowledge base construction module: used to build a knowledge base based on embedded models and large language models. The knowledge base includes a general acupuncture knowledge base, an acupoint information knowledge base, a symptom-acupoint knowledge base, and an acupuncture domain knowledge graph. User input module: used to input user questions; Symptom recognition and intent classification module: Uses a large language model to classify user input questions and outputs classification information including general knowledge questions and treatment questions; The question classification and processing module is used to match and process general knowledge questions or treatment questions based on the core model and knowledge base, and output preliminary theoretical answers to general knowledge questions or preliminary treatment plans for treatment questions. The scheme correction module is used to correct the preliminary theoretical answer or preliminary treatment plan based on the multi-strategy extraction method, so as to obtain the final theoretical answer or treatment plan.