A traditional Chinese medicine ancient book knowledge representation method based on disease pulse syndrome treatment chain and an implementation scheme thereof

CN123033770APending Publication Date: 2026-11-03BEIJING UNIV OF CHINESE MEDICINE
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611519700.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-29
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

In existing technologies for organizing knowledge from ancient Chinese medicine texts, the completeness rate of the four elements of the disease, pulse, syndrome, and treatment chain and the accuracy rate of identifying the main pulse are low. There is a lack of structured models and process-based verification. The repeatability of manual indexing is insufficient, and the completeness rate of retrieval paths is low. Existing large language model-assisted indexing methods lack hierarchical relationships and embedding of diagnostic and treatment logic.

Method used

We adopt a chain structure model based on the pathogenesis and treatment chain, introduce a four-round sequential calling strategy of the large language model, establish a unified output format specification through example prompts, introduce a triple integrity verification mechanism to ensure the efficiency and consistency of indexing, and introduce a Kappa coefficient quality control mechanism to achieve repeatability.

Benefits of technology

It improved the completeness rate of the four elements of the pathogenesis chain and the accuracy of main path identification, enhanced the completeness rate of the retrieval path, ensured the repeatability and quality verifiability of the indexing results, and realized the efficient and accurate representation and retrieval of knowledge from ancient Chinese medicine books.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123033770A_ABST
    Figure CN123033770A_ABST
Patent Text Reader

Abstract

The application discloses a traditional Chinese medicine ancient book knowledge representation method based on a disease, pulse, syndrome and treatment chain and an implementation scheme thereof. The application takes a fixed order chain structure as the core of knowledge representation, instead of a traditional graph structure or a semantic network, so that the diagnosis and treatment logic of "disease differentiation, pulse regulation, syndrome analysis and treatment determination" can be completely expressed. Meanwhile, a hierarchical attribute is embedded in the node of the chain structure, so that the flattening of primary and secondary relationships and the context rupture in the fine-grained disassembly process can be avoided. A four-wheel sequential calling strategy and an example prompt of a large language model are introduced, so that the efficiency and consistency of marking and indexing can be ensured. A three-fold integrity checking mechanism is introduced, so that the integrity and sequence correctness of four elements of disease, pulse, syndrome and treatment in knowledge representation can be ensured. A Kappa coefficient quality control mechanism is introduced, so that the repeatability of results can be ensured. Therefore, the application constructs a knowledge representation method which can completely, accurately and dynamically express the diagnosis and treatment path logic of traditional Chinese medicine "disease, pulse, syndrome and treatment".
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital processing technology for ancient Chinese medicine books, specifically to a method for representing knowledge in ancient Chinese medicine books based on the disease, pulse, syndrome, and treatment chain, and its implementation scheme. Background Technology

[0002] Ancient Chinese medical texts are a precious treasure of the Chinese nation, containing rich clinical experience and theoretical wisdom from physicians throughout history. According to the *General Catalogue of Ancient Chinese Medical Texts*, there are 13,455 extant ancient Chinese medical texts, among which classic clinical works such as *Shanghan Lun* and *Jinkui Yaolue* are particularly valuable. However, these ancient texts are mostly written in classical Chinese, with concise expressions and ambiguous meanings. Furthermore, the same concept may be expressed differently in different works, posing a significant obstacle to modern clinicians and researchers in quickly and accurately accessing and utilizing the knowledge from these ancient texts. With the rapid development of information technology, the digital organization and representation of knowledge from ancient Chinese medical texts has become a crucial foundational task for promoting the modernization, inheritance, and innovation of traditional Chinese medicine.

[0003] Zhang Zhongjing's *Treatise on Febrile and Miscellaneous Diseases* established the diagnostic and treatment system of "treating disease, pulse, and symptoms together," which became the paradigm for later generations of TCM clinical practice. "Treating disease, pulse, and symptoms together" means that in clinical practice, the physician first identifies the disease (disease), then examines changes in the pulse (pulse), comprehensively analyzes the symptoms (symptoms), and finally determines the treatment method (treatment). Disease identification, pulse diagnosis, symptom analysis, and treatment determination are four interconnected and indispensable steps, forming a complete clinical decision-making path. Disease identification, as the primary classification, establishes the basic category of the disease; pulse diagnosis and symptom analysis conduct multi-level and refined analysis within the framework of the disease; and treatment determination is a targeted measure taken based on the comprehensive judgment of the first three steps. This diagnostic and treatment logic embodies the core essence of TCM's syndrome differentiation and treatment philosophy and has been the fundamental guideline for the clinical practice of physicians throughout history.

[0004] Currently, the collation and research of knowledge from ancient Chinese medicine texts mainly presents the following technical approaches:

[0005] (1) Knowledge storage based on traditional databases

[0006] Early work focused on digitizing ancient texts, performing character recognition, and storing them in a simple structured manner to establish full-text search databases. While these methods made ancient texts searchable, the search results were fragmented, with each chapter as the smallest unit. The knowledge lacked deep semantic connections and organization, and users still had to manually filter and extract the information they needed from a large amount of original text. This approach failed to present a complete diagnostic and treatment chain of symptoms and treatments.

[0007] (2) Knowledge representation based on knowledge element theory

[0008] In recent years, fine-grained knowledge representation methods, represented by knowledge element theory, have gradually become mainstream. This method aims to decompose the knowledge in ancient books into the smallest, independent knowledge units (such as disease names, prescriptions, drugs, symptoms, etc.), and to achieve multi-granular deconstruction of ancient texts by constructing a multi-level model of knowledge body-knowledge element-semantics.

[0009] Based on the National Key Research and Development Program project, our team systematically conducted research on the indexing template of "disease, pulse, syndrome and treatment" based on knowledge element theory, and constructed an indexing template system containing 10 types of knowledge entities and 158 types of knowledge elements, which laid an important foundation for the technological development in this field (see references [1]-[5]). However, references [1]-[5] use a triplet structure for knowledge representation, and nodes can be arbitrarily associated without fixed order constraints. Therefore, their paths may not contain the four nodes of disease, pulse, syndrome and treatment at the same time, resulting in path breaks such as "prescription without syndrome" or "syndrome without pulse". In the end, what is presented is a set of isolated knowledge point associations, rather than a complete and logically ordered diagnosis and treatment path. Therefore, the completeness rate (FCR) and main pulse identification accuracy (MPA) of the four elements of the disease, pulse, syndrome and treatment chain are likely to be less than 80%.

[0010] (3) Knowledge extraction method based on large language model

[0011] In recent years, large language models, such as ChatGPT and Deepseek, have made breakthrough progress in the field of natural language processing. In the patent application No. 202511093495.1 entitled "A Method for Annotating Ancient Chinese Medicine Texts by Integrating Multi-Dimensional Context for Model Adaptive Optimization", the team from Chengdu University of Traditional Chinese Medicine proposed a model adaptive optimization annotation method that integrates multi-dimensional context. This method uses large language models to achieve automatic annotation of ancient texts, providing a new technical path for the large-scale extraction of knowledge from ancient texts. However, in terms of technical positioning, this method belongs to the category of ancient text annotation methods. It focuses on improving the efficiency of term recognition and extraction through the injection of multi-dimensional external context. The output is still a discrete triple label and does not construct a structured model of knowledge from ancient Chinese medicine texts with complete hierarchical relationships and integrity constraints. In terms of indexing strategy, it adopts single-round model calling or LoRA adaptive fine-tuning, and fails to formally embed the diagnosis and treatment logic into the entire process of knowledge representation and extraction. Although this patent achieves automated indexing, it mainly focuses on improving indexing efficiency. Its path may not simultaneously include the four nodes of disease, pulse, syndrome, and treatment. The completeness and consistency of the indexing results still need to be verified.

[0012] In summary, there is an urgent need for a method to represent knowledge from ancient Chinese medical texts that has a completeness rate (FCR) of the four elements of the pathogenesis chain (Pathogenesis, Pulse Diagnosis, and Treatment) and a main pulse identification accuracy (MPA) of over 80%; good precision and recall; strong repeatability; and does not rely on the manual experience of indexers.

[0013] References

[0014] [1] Li Yiran, Zhong Xianggen, Yang Feng, et al. Construction of indexing template for “disease, pulse, syndrome and treatment” based on knowledge meta-indexing [J]. China Medical Herald, 2021, 18(28):133-138.

[0015] [2] Li Qianqian, Fu Xing, Yang Feng, et al. Construction and application of knowledge graph of Shanghan Lun based on the diagnostic thinking of “treating diseases, pulse and symptoms together” [J]. World Science and Technology - Modernization of Traditional Chinese Medicine, 2022, 24(9):3613-3621.

[0016] [3] Yang Feng, Zhong Xianggen, Zhou Ranran, et al. Research on indexing scheme and knowledge representation of Treatise on Febrile Diseases based on knowledge meta-theory [J]. China Medical Herald, 2022, 19(30):12-16+40.

[0017] [4] Yang Feng, Hou Jianchen, Xing Chenlin, et al. Research on knowledge representation, acquisition and discovery of ancient Chinese medicine books based on knowledge meta-indexing and knowledge graph [J]. Journal of Basic Chinese Medicine, 2023, 29(6):954-959.

[0018] [5] Zhou Ranran, Xing Chenlin, Li Qianqian, et al. Exploring the “Disease, Pulse, Syndrome and Treatment” Thinking in “Experimental Record of Classical Formulas” Based on Knowledge Meta-indexing and Knowledge Graph [J]. Journal of Basic Chinese Medicine, 2024, 30(7):1210-1215. Summary of the Invention

[0019] To address the shortcomings and deficiencies in existing technologies for organizing knowledge from ancient Chinese medicine texts, we aim to provide a knowledge representation method based on the disease-pulse-syndrome-treatment chain. This method innovates the knowledge representation model itself by: using a fixed-sequence chain structure as the core of knowledge representation, rather than traditional graph structures or semantic networks, thus fully expressing the diagnostic and treatment logic of "disease identification → pulse diagnosis → syndrome analysis → treatment determination"; embedding hierarchical attributes within the nodes of the chain structure (such as pulse node distinguishing between primary and secondary pulses); introducing a four-round sequential invocation strategy using a large language model, and establishing a unified output format standard through example prompts, allowing the model to gradually solidify hierarchical relationships and diagnostic and treatment sequences during progressive extraction, ensuring indexing efficiency and consistency; introducing a triple integrity verification mechanism to ensure the integrity and correct order of the four elements of disease, pulse, syndrome, and treatment in the knowledge representation; and introducing a Kappa coefficient quality control mechanism to ensure the repeatability of the results. To address the challenge of constructing a knowledge representation model that can completely, accurately, and dynamically express the diagnostic and treatment path logic of Traditional Chinese Medicine (TCM) based on "disease, pulse, syndrome, and treatment" while maintaining the manageability and computability of fine-grained knowledge, and to ensure the repeatability of the method and the verifiability of the indexing quality, the specific technical solution is as follows:

[0020] Firstly, methods for representing and indexing knowledge in ancient Chinese medical texts based on the disease, pulse, syndrome, and treatment chain.

[0021] A method for representing and indexing knowledge of ancient Chinese medicine texts based on the disease pulse diagnosis and treatment chain was established. This method constructs an ordered chain data model as the core of the knowledge representation of ancient Chinese medicine texts. The disease pulse diagnosis and treatment chain data model consists of an ordered node sequence, a metadata set, a verification result set, and a semantic relationship set, and is verified by a modeling verification set containing 20 articles.

[0022] The ordered node sequence includes: disease nodes, pulse nodes, syndrome manifestation nodes, and treatment nodes.

[0023] Indexing execution steps:

[0024] Step S1: Knowledge body construction and classification;

[0025] Step S2: Progressive Large Language Model (LLM) Auxiliary Indexing

[0026] This includes a progressive four-round call to the large language model: the first round call is for knowledge body verification; the second round call is for knowledge element extraction; the third round call is for semantic extraction; and the fourth round call is for generating the pathogenesis chain.

[0027] Each call prompt is accompanied by three or more indexing examples, which cover three levels of annotation methods: primary pulse and secondary pulse, primary symptom and secondary symptom, as well as a fixed sequence structure of the disease pulse diagnosis and treatment chain.

[0028] Step S3: Integrity Verification

[0029] The generated pathogenesis and treatment chain data is subjected to triple verification: node type verification, node order verification, and node content verification.

[0030] Step S4: Quality Control and Data Output

[0031] Step S5: Structured storage and application.

[0032] The second aspect is the hierarchical indexing process of the main vein and secondary veins.

[0033] Based on the ordered chain data model, the hierarchical judgment rules include: pulse level judgment rules and syndrome level judgment rules. In the disease pulse syndrome treatment chain data, the pulse node distinguishes the main pulse object and the secondary pulse object array in a structured form. Each element in the secondary pulse object array retains the examination site information. The syndrome manifestation node distinguishes the main symptom object array and the secondary symptom object array in a structured form and stores them in groups respectively.

[0034] The indexing steps are the same as in the first aspect.

[0035] Thirdly, the verification of the progressive invocation and example prompts of the large language model.

[0036] To verify the technical contributions of the "example prompt" and "four-round sequential call" strategies in this invention, an ablation experiment was conducted on 100 random articles of the Treatise on Febrile Diseases (excluding 20 articles in the modeling validation set).

[0037] The evaluation metrics were F1 score, precision, recall, four-factor completeness (FCR), and main vein identification accuracy (MPA). Precision and recall were calculated based on the "gold standard" dataset manually annotated by three experts. This gold standard dataset covers all 398 articles of Zhang Zhongjing's "Treatise on Febrile Diseases" from the Han Dynasty.

[0038] Nine scenarios were run: Scenario A: Single call, no indexed example prompts (baseline); Scenario B: Single call, 3 indexed example prompts; Scenario C: Four rounds of sequential call, no indexed example prompts; Scenario D: Complete scenario of this invention (four rounds of sequential call, 3 indexed example prompts); Scenario E: Three rounds of sequential call, 3 indexed example prompts; Scenario F: Five rounds of sequential call, 3 indexed example prompts; Scenario G: Four rounds of sequential call, 3 indexed example prompts excluding composite pulses; Scenario H: Four rounds of sequential call, 8 indexed example prompts; Scenario I: Four rounds of out-of-order call, 3 indexed example prompts. Each configuration was run 3 times and the average value was taken.

[0039] Among them, A and B, C and D are used to isolate the contribution of example hints, A and C, B and D are used to isolate the contribution of four rounds of calls, E and F constitute the call round gradient, G and H constitute the example hint gradient, and I and D are only different in call order and are used to verify the contribution of fixed progressive order.

[0040] Results: The F1 score, precision, recall, FCR, and MPA of Option A were 48.6%, 51.2%, 46.3%, 36.0%, and 42.0%, respectively.

[0041] The F1 score, precision, recall, FCR, and MPA for Option B were 67.5%, 70.2%, 64.9%, 56.0%, and 63.0%, respectively.

[0042] The F1 score, precision, recall, FCR, and MPA for Option C were 61.1%, 63.8%, 58.7%, 52.0%, and 58.0%, respectively.

[0043] The F1 score, precision, recall, FCR, and MPA for Option D were 80.3%, 82.6%, 78.3%, 80.0%, and 82.0%, respectively.

[0044] The F1 score, precision, recall, FCR, and MPA for Option E were 75.2%, 77.0%, 73.5%, 70.0%, and 73.0%, respectively.

[0045] The F1 score, precision, recall, FCR, and MPA for Option F were 80.9%, 83.0%, 78.9%, 81.0%, and 82.0%, respectively.

[0046] The F1 score, precision, recall, FCR, and MPA of option G were 74.8%, 76.9%, 72.8%, 72.0%, and 74.0%, respectively.

[0047] The F1 score, precision, recall, FCR, and MPA for Option H were 81.0%, 83.1%, 79.0%, 80.0%, and 82.5%, respectively.

[0048] The F1 score, precision, recall, FCR, and MPA for Option I were 70.5%, 73.0%, 68.2%, 60.0%, and 64.0%, respectively.

[0049] Schemes D, F, and H showed good F1 scores, precision, and recall. However, scheme D achieved the optimal balance between indexing quality and invocation cost, indicating that the example suggestion strategy and the four-round sequential invocation strategy are complementary. The combination of the two yielded the best automated indexing quality, with an F1 score improvement of 31.7 percentage points compared to the baseline. Further experiments on the gradient of invocation rounds and the number of examples showed that four-round sequential invocation and three example suggestions (including composite pulses) are the optimal parameters for balancing indexing quality and invocation cost, and that the fixed progressive invocation order itself has a substantial contribution to indexing quality.

[0050] Fourthly, verification of the reproducibility of indexing results.

[0051] To verify the reproducibility of this method, three indexers with different experience levels (3 years, 5 years, and 2 years of experience) independently indexed the same batch of 398 articles from the *Shanghan Lun*. The indexing process strictly followed steps S1 to S5 as described in this invention, including four rounds of sequential indexing, example prompts, and triple integrity checks. Cohen's Kappa coefficient was used to calculate the consistency between each pair of rounds. The review content included not only knowledge body boundaries, knowledge element types, and semantic boundaries, but also pulse diagnosis level attributes and syndrome manifestation level attributes.

[0052] Results: Indexers with different experience levels all achieved Kappa values ​​above 0.85, where Kappa > 0.85 indicates "nearly perfect consistency".

[0053] Fifthly, knowledge storage and retrieval methods based on the pathogenesis and treatment chain.

[0054] The structured storage includes: the pathogenesis and treatment chain uses an ordered list to store the above ordered node sequence, and uses a fixed-order position index to replace graph traversal; in the physical storage layer, the chained data object contains a unique chain identifier, an ordered node reference sequence, a node data pool, and auxiliary indexes.

[0055] The auxiliary index includes: an inverted index established by disease / syndrome name, an inverted index established by main pulse name, and an inverted index established by prescription name; the hierarchical markers include main pulse markers, secondary pulse markers, main symptom markers, and secondary symptom markers.

[0056] In retrieval applications, when executing a query that starts from the disease node, passes through the pulse node, and arrives at the treatment node, the system directly locates the node position by the location index, avoiding graph structure traversal, and performs structured filtering by combining hierarchical marker bits, thereby ensuring the completeness of the retrieval path and shortening the query response time.

[0057] Sixth aspect: Comparative experiments between this application and prior art

[0058] The structural integrity, hierarchical expression, and automated indexing quality of this application, along with five other schemes, were examined on 50 random entries of the *Shanghan Lun* (excluding 20 entries in the modeling validation set and 100 entries in the experimental set of Example 4). These schemes included Li Yiran et al.'s "Construction of an Indexing Template for 'Disease, Pulse, Syndrome, and Treatment' Based on Knowledge Element Indexing" [1], Li Qianqian et al.'s "Construction and Application of a Knowledge Graph of *Shanghan Lun* Based on the Diagnostic Thinking of 'Disease, Pulse, Syndrome, and Treatment'" [2], Yang Feng et al.'s "Research on Indexing Scheme and Knowledge Representation of *Shanghan Zabing Lun* Based on Knowledge Element Theory" [3], and the patent application number 202511093495.1's "A Method for Annotating Ancient Chinese Medicine Books by Integrating Multi-Dimensional Context for Model Adaptive Optimization". The evaluation indicators were FCR, MPA, F1 score, precision, and recall.

[0059] Results: The technical solution of this application has significantly higher FCR, MPA, F1 score, precision and recall than the other four solutions.

[0060] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0061] 1. This invention solves the problems of low completeness of the four elements, low accuracy of main vein identification, and low completeness of retrieval path in existing indexing technologies. The completeness of the four elements is increased to a maximum of 82.0%, the accuracy of main vein identification is increased to a maximum of 85.0%, and the completeness of retrieval path is increased to a maximum of 100.0%.

[0062] 2. It solves the problem of existing large language model-assisted indexing methods lacking structured models and procedural verification, with the highest entity-level F1 score reaching 80.3%.

[0063] 3. The problem of insufficient repeatability of manual indexing was solved, with a Kappa coefficient of 0.94 achieved in two independent runs. The Kappa coefficient among indexers with different experience levels was above 0.85, reaching a maximum of 0.91. Attached Figure Description

[0064] Figure 1 A flowchart of the overall process for representing knowledge in ancient Chinese medical texts based on the chain of disease, pulse, syndrome, and treatment.

[0065] Figure 2 A schematic diagram of the pathogenesis and treatment chain;

[0066] Figure 3 , Four The large language model workflow diagram is invoked sequentially in each round;

[0067] Figure 4 , three Detailed logic diagram of the re-verification mechanism;

[0068] Figure 5 1. Schematic diagram of quality control process;

[0069] Figure 6 A schematic diagram comparing the knowledge representation structure of this invention with that of existing technologies. Detailed Implementation

[0070] The present application will now be described in further detail with reference to specific embodiments. The embodiments given are merely illustrative of the present application and are not intended to limit its scope. The embodiments provided below can serve as a guide for further improvements by those skilled in the art and do not constitute a limitation on the present application in any way.

[0071] Unless otherwise specified, the experimental methods in the following embodiments are conventional methods, performed in accordance with the techniques or conditions described in the literature in this field or in accordance with the product instructions.

[0072] Unless otherwise specified, all materials and reagents used in the following examples are commercially available.

[0073] Example 1: A Method for Representing and Indexing Knowledge from Ancient Chinese Medicine Texts Based on the Disease-Pulse-Symptom-Treatment Chain

[0074] This embodiment includes two stages: the first stage is the construction of the disease pathogenesis chain data model, which establishes the preset structural constraints for indexing execution by formally defining the ordered node sequence, metadata set, verification rule set and semantic relationship set; the second stage is the indexing steps based on the disease pathogenesis chain data model, which applies the abstract model rules to specific ancient texts through steps S1-S5 to generate instantiated disease pathogenesis chain data.

[0075] Large Language Models (LLMs) are a well-known class of natural language processing algorithms. Those skilled in the art can directly access and call them through commercial APIs or open-source model weights without needing to train them themselves. In this invention, the LLM serves as an indexing execution tool and does not perform knowledge modeling functions: the field structure, terminology constraints, and judgment rules upon which indexing is based are all defined by the disease pathogenesis chain data model and indexing prompts. The LLM only performs information extraction and structured output on the medical case text according to this defined structure. Therefore, any LLM with instruction-following and structured output capabilities can implement this step, including but not limited to the GPT series, Tongyi Qianwen, Wenxin Yiyan, DeepSeek, ChatGLM, etc.; the specific model DeepSeek-R1 used in the embodiments is merely an example and does not constitute a limitation on the scope of protection.

[0076] 1. Construction of the data model for the pathogenesis and treatment chain (ontology layer)

[0077] The Disease Pulse Diagnosis and Treatment Chain Data Model is a knowledge organization model, which can be understood as the premise rules for indexing. It specifies which information to extract from ancient texts, what labels to give to the extracted information, and what relationships to establish between the information. It is an abstract rule model at the ontology level and has a static structure.

[0078] 1.1 Ordered Node Sequence

[0079] An ordered node sequence consists of four nodes in a strictly fixed order: disease node, pulse node, syndrome manifestation node, and treatment node. The number of nodes cannot be increased or decreased. Each node inherits the attributes of the base class node, including a unique node identifier, node type, position index, original text fragment, and index confidence.

[0080] (1) Disease nodes

[0081] It includes the standard disease name, an array of aliases, the location of the disease, the nature of the disease, and the stage of the disease course; the standard disease name is not empty, and the array of aliases records alternative names or historical names.

[0082] (2) Pulse nodes

[0083] It includes a main pulse object, an array of secondary pulse objects, pulse rhythm description, and pulse momentum description attributes; there is one and only one main pulse object, and the array of secondary pulse objects is arranged in descending order of clinical weight and can be empty; both the main pulse object and the secondary pulse object include pulse name, hierarchical marker, array of examination sites, and pulse feature decomposition attributes, and the hierarchical marker is taken from the main pulse or the secondary pulse.

[0084] (3) Symptom manifestation nodes

[0085] It includes an array of primary symptom objects, an array of secondary symptom objects, and an array of possible symptom objects; wherein the array of primary symptom objects contains at least one item, and the arrays of secondary symptom objects and possible symptom objects can be empty; each of the primary symptom objects, secondary symptom objects, and possible symptom objects contains attributes such as symptom name, hierarchy marker, symptom location array, symptom nature, degree description, and modifier array, and the hierarchy marker takes values ​​from the primary symptom, secondary symptom, and possible symptom.

[0086] (4) Treatment of nodes

[0087] It includes the treatment method, the main prescription object, the array of drug composition, the array of additions and subtractions, and the dosage notes attribute; the main prescription object is not empty and contains the prescription name, source and prescription type; the array of drug composition contains at least one item and each item records the drug name, the roles of the principal, assistant and adjuvant, dosage, unit and processing method.

[0088] 1.2 Metadata Collection

[0089] Metadata collection records: indexing source, indexing specification version number, indexing timestamp, version of the large language model called, version of the prompt word template, reviewer identifier, and mapping of various Kappa values.

[0090] 1.3 Verification Result Set

[0091] The verification result set records: node type verification status, node order verification status, node content verification status, and overall pass status, and stores the specific error description when it fails.

[0092] 1.4 Semantic Relation Set

[0093] The semantic relation set consists of several relation triples. Each relation includes a source node, relation type, target node, and association strength. Relation types include the correspondence between the main pulse and the disease location, the correspondence between the main symptom and the treatment method, the correspondence between the secondary pulse and the addition or subtraction, the correspondence between the secondary symptom and the addition or subtraction, and the correspondence between the drug and the symptom target.

[0094] Once the above data model is constructed, it is fixed in the system in the form of a structured configuration file, serving as the node type, hierarchical attributes, and sequence constraint rules that the large language model must follow when executing subsequent steps S1-S5.

[0095] 2. Prompt word template

[0096] To standardize the input for the four rounds of calls and ensure the consistency and repeatability of indexing, indexing prompt templates are constructed simultaneously after the data model of the pathogenesis chain is built. These templates, along with the data model, are embedded in the system in a structured configuration file, and the version number of the prompt template is recorded in the metadata set. The prompts for each round of calls are composed of the following five parts concatenated in a fixed order:

[0097] (1) Role and task definition section: declare that the large language model undertakes the task of indexing ancient Chinese medicine books and its role positioning, and give the task objectives of this round of calls, namely, knowledge body verification, knowledge element extraction, semantic extraction, and generation of disease pulse diagnosis and treatment chain.

[0098] (2) Constraint rules section: embeds the structural constraints on which this round of calls is based, including the knowledge body type judgment result, pulse level judgment rules and syndrome level judgment rules, and the fixed order of ordered node sequence, so that the large language model is subject to structural constraints during the extraction process, rather than being corrected afterward;

[0099] (3) Indexing example section: Three additional indexing examples are added to show three levels of annotation: single pulse pattern + main symptom, main pulse and combined pulse (compound pulse pattern) + main symptom, and main pulse + main symptom and combined symptom. Each example fully presents the fixed sequence structure of the disease pulse diagnosis and treatment chain: "disease → pulse pattern → symptom manifestation → treatment". The hierarchical annotation method of the examples is consistent with the output format, which establishes a unified format specification for the model.

[0100] (4) Input data section: Dynamic input for this round of calls, including the original text of the ancient book to be processed (first round, second round) or the output results of the previous round of calls (third round, fourth round).

[0101] (5) Output format constraints: The output should be clearly defined by structured fields, including field names, value ranges, and placeholder rules for unrecognized information. Free text output is prohibited.

[0102] The four rounds of indexing share the same template framework, with only the specific content of the task objectives, constraint rules, and input data being replaced progressively with each round: the first round uses the knowledge type and name as constraints and the original text as input; the second round uses hierarchical judgment rules as constraints and the original text as input; the third round uses semantic type definitions and hierarchical inheritance requirements as constraints and the knowledge elements output from the second round as input; the fourth round uses a fixed order of ordered node sequences as constraints and the semantics output from the third round as input. This achieves an indexing process of "rule pre-positioning and progressive refinement."

[0103] 3. Model pre-validation

[0104] To verify the adaptability and structural integrity of the disease-pulse-symptom-treatment chain data model to ancient Chinese medical texts, before the model was solidified, Articles 1 to 20 of *Shanghan Lun* (Treatise on Cold Damage) were selected as the model validation set. Two indexers with backgrounds in traditional Chinese medicine literature independently performed manual indexing based on the data model. After indexing, the four-factor completeness rate (FCR), main pulse identification accuracy (MPA), precision, recall, and F1 score were calculated. Cohen's Kappa coefficient was used to evaluate indexing consistency, with the formula Kappa = (P0 - P...). e ) / (1-Pe ), where P0 is the observational consistency rate, P e The expected consistency rate is defined as follows: when the Kappa value is greater than the preset threshold of 0.85, the indexing quality is considered to be qualified. This threshold is set according to the Landis & Koch classification standard and corresponds to the "almost perfect agreement" level.

[0105] Pre-validation results show an FCR of 85.0%, MPA of 83.3%, precision of 80.2%, recall of 76.5%, F1 score of 78.3%, and Kappa coefficient of 0.88, indicating that the model structure can effectively meet the requirements for representing knowledge from ancient Chinese medical texts, and the terminology coverage meets the indexing requirements. These 20 modeling validation criteria are only used for model structure calibration and will not be used in subsequent implementation experiments.

[0106] 4. Indexing steps based on the disease pulse diagnosis and treatment chain data model

[0107] Based on the disease pathogenesis and treatment chain data model, the following indexing steps are performed, and the overall flowchart is as follows: Figure 1 As shown, the steps are as follows:

[0108] Step S1: Knowledge Body Construction and Classification

[0109] The system reads the chapter titles of the ancient Chinese medicine texts to be processed, and determines the knowledge body type and name according to the preset knowledge body type determination rules. The knowledge body type determination rules include: when the chapter title contains the field "differentiation of ×× disease pulse syndrome and treatment", the knowledge body type is determined as "disease pulse syndrome and treatment", and the specific knowledge body is named according to the core content.

[0110] Step S2: Progressive Large Language Model (LLM) Auxiliary Indexing

[0111] Based on the established knowledge type and name, DeepSeek-R1 is progressively called in four rounds via its model interface (API) to complete knowledge indexing. Each call adds at least three indexing examples to the prompt words. These examples demonstrate three levels of annotation: single pulse pattern + main symptom, main pulse and concurrent pulse pattern + main symptom, and main pulse + main symptom and concurrent symptom (i.e., the indexing examples cover the three levels of annotation: main pulse and concurrent pulse, main symptom and concurrent symptom), and a fixed sequential structure of the disease pulse diagnosis and treatment chain. The four progressive calls include:

[0112] First round of invocation: Knowledge body verification

[0113] Input the known knowledge type and name into DeepSeek-R1, ask it to verify whether the text to be processed belongs to that knowledge type, and output the verification result;

[0114] Second round of invocation: Knowledge element extraction

[0115] Hierarchical judgment rules are embedded in the prompt words, requiring DeepSeek-R1 to extract structured knowledge elements containing type, content, and hierarchical attributes from the original text. The hierarchical attributes are inherited and mapped to the hierarchical tags in the disease pathogenesis chain data model.

[0116] Third round of invocation: semantic extraction

[0117] DeepSeek-R1 is required to extract semantic components from knowledge elements and label their types, while inheriting the hierarchical attributes; for composite pulse knowledge elements, they should be split into multiple semantic components and labeled with hierarchical tags respectively; for prescription knowledge elements, their constituent drugs should be decomposed and mapped to a drug composition array.

[0118] Fourth round of application: Generation of the pathogenesis and treatment chain

[0119] The DeepSeek-R1 is required to generate disease pulse diagnosis and treatment chain data by concatenating semantics in a fixed order according to the ordered node sequence, and to retain hierarchical labels in a structured form within each node, so that the pulse node distinguishes between the main pulse and the secondary pulse, the syndrome manifestation node distinguishes between the main symptom and the secondary symptom, and the treatment node includes the main prescription and drug composition.

[0120] Figure 2 This is a schematic diagram of the disease-pulse-symptom-treatment chain in this invention, showing the chain structure of disease nodes, pulse nodes, symptom manifestation nodes, and treatment nodes connected in a fixed order of "disease → pulse → symptom manifestation → treatment", as well as the hierarchical attributes of the main pulse / concurrent pulse layering within the pulse node and the main symptom / concurrent symptom grouping within the symptom manifestation node.

[0121] Step S3: Integrity Verification

[0122] The generated pathogenesis and treatment chain data undergoes triple verification of node type, node order, and node content. The triple verification is based on the following preset rules in the verification result set:

[0123] Node type verification: Check whether the ordered node sequence contains four types in sequence: disease nodes, pulse nodes, syndrome manifestation nodes, and treatment nodes.

[0124] Node order verification: Check whether the node order is disease node → pulse node → syndrome manifestation node → treatment node, and the position index is strictly increasing;

[0125] Node content validation: Check that the content of each node is not empty, and that the main pulse object of the pulse node is not empty, the array length of the main symptom object of the syndrome manifestation node is not less than 1, and the main prescription object of the treatment node is not empty and the array length of the drug composition is not less than 1.

[0126] If any check fails, the system generates an error description and stops subsequent processing, waiting for manual correction. Error descriptions include missing node type, incorrect node order, invalid node content, or missing hierarchy marker.

[0127] Step S4: Quality Control and Data Output

[0128] At least two indexers with backgrounds in Traditional Chinese Medicine (TCM) literature independently review the indexing results. A predetermined proportion of entries are randomly selected from all indexing results as review samples. Review items include knowledge body boundaries, knowledge element types, semantic boundaries, pulse diagnosis level markers, and syndrome manifestation level markers. Cohen's Kappa coefficient is used to calculate the consistency between the two indexers, and the result is recorded in the Kappa value mapping of the metadata set. If the Kappa coefficient is greater than 0.85, the indexing result and Kappa value are recorded in the metadata set and output. Otherwise, a third expert arbitrates the disagreements, and the process returns to step S2 for re-indexing based on the arbitration result.

[0129] Step S5: Structured Storage and Application

[0130] The approved indexing results are stored in a structured format of disease, pulse, syndrome, and treatment chains to form a knowledge base of ancient Chinese medicine texts. The indexing result of each entry is saved as a chain-like data object containing the ordered node sequence, metadata set, verification result set, and semantic relationship set. Pulse nodes are stored hierarchically by primary and secondary pulses; syndrome manifestation nodes are grouped by primary and secondary symptoms; and treatment nodes are stored by primary prescription and medication. The knowledge base uses ordered list storage with a positional index, and also establishes auxiliary inverted indexes by disease / syndrome name, primary pulse name, and prescription name. Hierarchical markers are established for primary and secondary pulses, and primary and secondary symptoms, to support intelligent retrieval, knowledge discovery, and clinical decision support through hierarchical filtering.

[0131] Example 2: Complete Indexing Process

[0132] This embodiment uses Article 38 of the chapter "Differentiation of Pulse and Symptoms of Taiyang Disease and Treatment" in the Treatise on Febrile Diseases as the text to be processed, which reads: "In Taiyang wind-stroke, the pulse is floating and tight, with fever and chills, body aches, no sweating and restlessness, the Major Blue Dragon Decoction is the main treatment." This fully demonstrates the entire process of indexing completed by the present invention through four rounds of sequential calls to the large language model.

[0133] Step S1: Knowledge Body Construction and Classification

[0134] Based on the original text, this passage comes from the chapter "Differentiation and Treatment of Taiyang Disease Pulse and Symptoms" in the *Shanghan Lun*. The chapter title contains the field "Differentiation and Treatment of ×× Disease Pulse and Symptoms," therefore the knowledge type is determined to be "Disease, Pulse, Symptoms, and Treatment." Based on its core content, this knowledge type is named "Taiyang Disease Pulse and Symptoms and Treatment."

[0135] This output will be used as the input for step S2.

[0136] Step S2: Knowledge Meta-indexing Based on Large Language Model

[0137] This step, based on the knowledge type and name determined in step S1, completes knowledge indexing by sequentially calling the large language model. The workflow diagram for the four rounds of sequential calls to the large language model is shown below. Figure 3 It shows the progressive calling process from knowledge body verification, knowledge element extraction, semantic extraction to chain generation, as well as the embedding method of example prompts in each call.

[0138] First round of calls: Verify the knowledge body type and name

[0139] Enter a prompt into DeepSeek-R1, informing it of the knowledge body information identified in step S1, and request DeepSeek-R1 to confirm. The prompt is: "You are an expert in indexing ancient Chinese medical texts. It is known that the knowledge body type of this text is 'Disease, Pulse, Syndrome and Treatment', and the knowledge body name is 'Taiyang Disease, Pulse, Syndrome and Treatment'. Please verify whether the following text belongs to this knowledge body: 'Taiyang stroke, floating and tight pulse, fever and chills, body aches, no sweating and restlessness, Da Qinglong Decoction is the main treatment'."

[0140] The DeepSeek-R1 output verification results are as follows, confirming that the text belongs to the "Disease, Pulse, Syndrome, and Treatment" knowledge category:

[0141] {"Knowledge Type": "Disease, Pulse, Syndrome, and Treatment"}

[0142] "Knowledge Entity Name": "Taiyang Disease Pulse Syndrome and Treatment"

[0143] "Confirmation Result": "Correct"

[0144] Second round of invocation: Knowledge element extraction

[0145] Enter the prompt word into DeepSeek-R1. In the knowledge element type description, the prior level judgment rule is: "Extract knowledge elements from the following original texts. Knowledge element types include: disease name, pulse (including level: main pulse / concurrent pulse / dead pulse), syndrome manifestation (including level: main symptom / concurrent symptom / possible symptom), and prescription."

[0146] Pulse pattern classification rules: If only one pulse pattern appears in the original text, that pulse pattern is the 'main pulse', and the secondary pulse pattern is left blank; if multiple pulse patterns appear, it is necessary to determine which one summarizes the main disease (marked as 'main pulse') and which one is a secondary pulse pattern (marked as 'secondary pulse') based on the location and nature of the disease.

[0147] The rules for judging the syndrome level are as follows: the syndrome that directly corresponds to the disease and syndrome in the outline and determines the treatment method is the 'primary syndrome'; the syndrome that accompanies the disease and syndrome and does not affect the choice of the primary prescription is the 'concurrent syndrome'; the syndrome that is not explicitly mentioned in the original text but can be inferred from the pathogenesis is the 'probable syndrome'.

[0148] Original text: "For those suffering from Taiyang stroke, with a floating and tight pulse, fever and chills, body aches, no sweating but restlessness, Da Qinglong Decoction is the main treatment."

[0149] The following 7 knowledge elements are output:

[0150] {

[0151] "Knowledge Entity Name": "Taiyang Disease Pulse Syndrome and Treatment"

[0152] "Knowledge Element Output": [

[0153] {"Type": "Disease Name", "Content": "Solar Stroke"},

[0154] {"Type": "Pulse Characteristics", "Content": "Floating and Tight Pulse", "Level": "Main Pulse", "Concurrent Pulse": ""},

[0155] {"Type": "Syndrome Manifestation", "Content": "Fever and Chills", "Level": "Main Symptom"},

[0156] {"Type": "Symptoms", "Content": "Body pain", "Level": "Main symptom"},

[0157] {"Type": "Syndrome Manifestation", "Content": "Aversion to Sweating", "Level": "Main Symptom"},

[0158] {"Type": "Symptoms", "Content": "Irritability", "Level": "Concurrent Symptoms"},

[0159] {"Type": "Formula", "Content": "Da Qinglong Decoction"} ]

[0161] }

[0162] These knowledge elements will serve as input for the third round of invocation.

[0163] Third round of invocation: semantic extraction

[0164] Input the third call prompt word into DeepSeek-R1, requesting that semantic components be extracted from knowledge elements and their types be labeled, while inheriting the hierarchical attributes in the knowledge elements.

[0165] The prompt is: "Extract semantic components from the following knowledge elements and label their types. Knowledge elements include: disease name 'Taiyang Zhongfeng', pulse condition 'floating and tight pulse' (level: main pulse), symptom manifestation 'fever and chills' (level: main symptom), symptom manifestation 'body pain' (level: main symptom), symptom manifestation 'no sweating' (level: main symptom), symptom manifestation 'irritability' (level: secondary symptom), and prescription 'Da Qinglong Tang'. For prescriptions, you need to analyze their constituent drugs."

[0166] DeepSeek-R1 outputs 14 semantic entities, as follows:

[0167] {

[0168] Semantic output: [

[0169] {"Type": "Disease", "Content": "Sunstroke"},

[0170] {"Type": "Pulse Characteristics", "Content": "Floating and Tight", "Level": "Main Pulse"},

[0171] {"Type": "Syndrome Manifestation", "Content": "Fever and Chills", "Level": "Main Symptom"},

[0172] {"Type": "Symptoms", "Content": "Body pain", "Level": "Main symptom"},

[0173] {"Type": "Syndrome Manifestation", "Content": "Aversion to Sweating", "Level": "Main Symptom"},

[0174] {"Type": "Symptoms", "Content": "Irritability", "Level": "Concurrent Symptoms"},

[0175] {"Type": "Formula", "Content": "Da Qinglong Decoction"},

[0176] {"Type": "Drug", "Content": "Ephedra"},

[0177] {"Type": "Medicine", "Content": "Cinnamon Twig"},

[0178] {"Type": "Drug", "Content": "Almond"},

[0179] {"Type": "Drug", "Content": "Licorice"},

[0180] {"Type": "Drug", "Content": "Plaster"},

[0181] {"Type": "Medicine", "Content": "Ginger"},

[0182] {"Type": "Drug", "Content": "Jujube"} ]

[0184] }

[0185] These semantic entities all retain the hierarchical attributes inherited from the knowledge elements and will serve as input for the fourth round of invocation.

[0186] Fourth round of invocation: Generating disease pathogenesis and treatment chain data

[0187] Input the fourth call prompt into DeepSeek-R1, requesting that the semantics be linked in a fixed order: "Disease → Pulse → Symptom Manifestation → Treatment," and that the hierarchical relationship between the main pulse / concurrent pulse and the main symptom / concurrent symptom be preserved in a structured form within each node, generating disease-pulse-symptom-treatment chain data (see...). Figure 2 ).

[0188] The prompt is: "Generate a disease-pulse-treatment chain by connecting the following semantics in a fixed order: 'disease → pulse → syndrome manifestation → treatment'".

[0189] The semantics of pulse diagnosis need to distinguish between the primary pulse and the secondary pulse; the semantics of syndrome manifestations need to distinguish between the primary symptom and the secondary symptom. The semantics include: disease syndrome 'Taiyang wind-stroke', pulse syndrome 'floating and tight' (level: primary pulse), syndrome manifestation 'fever and chills' (level: primary symptom), syndrome manifestation 'body pain' (level: primary symptom), syndrome manifestation 'no sweating' (level: primary symptom), syndrome manifestation 'irritability' (level: secondary symptom), formula 'Da Qinglong Tang', drugs 'ephedra', 'cinnamon twig', 'apricot kernel', 'licorice', 'gypsum', 'ginger', and 'jujube'.

[0190] Regarding the semantics of pulse diagnosis, it is necessary to distinguish between the primary pulse and the secondary pulse; regarding the semantics of syndrome manifestation, it is necessary to distinguish between the primary symptom and the secondary symptom; regarding the semantics of prescription, it is necessary to analyze its constituent drugs.

[0191] The output is as follows:

[0192] {

[0193] "Pathogenesis and Treatment Chain": {

[0194] Fixed order: Disease → Pulse diagnosis → Symptom manifestations → Treatment

[0195] "Node": [

[0196] {

[0197] Type: Disease / Syndrome

[0198] Content: "Solar Stroke"

[0199] },

[0200] {

[0201] "Type": "Pulse Condition",

[0202] "Main Pulse": "Floating and Tense",

[0203] "Associated Pulse": ""

[0204] },

[0205] {

[0206] "Type": "Syndrome Manifestation",

[0207] "Main Symptoms": ["Fever with Aversion to Cold", "General Body Pain", "No Perspiration"],

[0208] "Associated Symptoms": ["Irritability"]

[0209] },

[0210] {

[0211] "Type": "Treatment",

[0212] "Content": "Daqinglong Tang",

[0213] "Medicinals": ["Ephedra", "Cinnamon Twig", "Apricot Kernel", "Licorice", "Gypsum", "Fresh Ginger", "Jujube"]

[0214] }

[0216] }

[0217] }

[0218] This complete disease-pulse-syndrome-treatment chain fully presents the complete clinical decision-making process from "disease differentiation" (Taiyang Wind Stroke) to "pulse assessment" (floating and tense as the main pulse), to "syndrome analysis" (stratification of main symptoms and associated symptoms), and then to "treatment determination" (Daqinglong Tang).

[0219] Step S3: Completeness Check

[0220] The input of this step inherits the data of the disease-pulse-syndrome-treatment chain generated in step S2, whose node array contains 4 nodes, which are sequentially a disease-syndrome node, a pulse condition node, a syndrome manifestation node, and a treatment node.

[0221] The system sequentially checks the data according to three preset check rules, and the detailed logic schematic diagram of the triple check mechanism is shown in Figure 4 ​As shown, the judgment rules and error interception logic for node type verification, node order verification, and node content verification are displayed. The verification results are shown in Table 1. In this embodiment, the node types are complete (including four types: disease, pulse, syndrome, and treatment), the node order is correct (disease → pulse → syndrome → treatment), and the node content is valid and the hierarchical attributes are complete (the disease "Taiyang stroke", the main pulse "floating and tight", the syndrome grouping of main symptoms and concurrent symptoms is clear, and the treatment "Da Qinglong Decoction" are all not empty).

[0222] If all three checks pass, the system outputs the check results and continues to the next step.

[0223] If any verification fails, the system will generate a corresponding prompt message, such as "Node type missing: missing pulse node" or "Node order error: should be disease → pulse → syndrome manifestation → treatment" or "Node content invalid: pulse node lacks main pulse attribute" or "Node content invalid: syndrome manifestation node does not distinguish between main symptoms and concurrent symptoms level", and will stop subsequent processing, waiting for manual correction.

[0224] Table 1. Integrity Verification Results

[0225]

[0226] Step S4: Quality Control and Data Output

[0227] The indexing results were independently reviewed by two researchers with backgrounds in traditional Chinese medicine literature, and the quality control process was as follows: Figure 5 As shown, the double review, Cohen's Kappa coefficient calculation, threshold determination, arbitration, and re-indexing mechanism are displayed. The review content is the pathogenesis chain data generated in step S2, which specifically includes five review items: whether the knowledge body boundary is correctly divided, whether the knowledge element type label is accurate, whether the semantic boundary is reasonable, whether the pulse level attribute (main pulse / concurrent pulse) label is accurate, and whether the syndrome manifestation level attribute (main symptom / concurrent symptom) label is accurate.

[0228] Cohen's Kappa coefficient was used to calculate the agreement between the two reviewers. The formula for calculating the Kappa coefficient is:

[0229] Kappa=(P0-P e ) / (1-P e )

[0230] Where P0 is the observational agreement rate, which is the proportion of data items whose results are consistent between two auditors out of the total number of items; P e Expected consensus rate, which is the probability that two reviewers expect to reach a consensus under random circumstances.

[0231] According to the Kappa coefficient evaluation standard proposed by Landis and Koch, a Kappa greater than 0.85 indicates "nearly perfect agreement". If the Kappa coefficient is less than or equal to 0.85, the process returns to step S2 for reindexing, and a third expert arbitrates the disagreements.

[0232] This embodiment serves as a demonstration of the indexing process, and its indexing results have passed the aforementioned quality control process. For quantitative verification of the repeatability of this method in large-scale indexing, please refer to Embodiment 5.

[0233] The approved indexing results serve as the final output for subsequent knowledge base construction and application.

[0234] Step S5: Data Storage and Application

[0235] The structured storage includes: the pathogenesis and treatment chain uses an ordered list to store the above ordered node sequence, and uses a fixed-order position index to replace graph traversal; in the physical storage layer, the chained data object contains a unique chain identifier, an ordered node reference sequence, a node data pool, and auxiliary indexes.

[0236] The auxiliary indexes include: an inverted index built by disease / syndrome name, an inverted index built by main pulse name, and an inverted index built by formula name;

[0237] The hierarchical markers include: main pulse marker, secondary pulse marker, main symptom marker, and secondary symptom marker.

[0238] In retrieval applications, when executing a query that starts from the disease node, passes through the pulse node, and arrives at the treatment node, the system directly locates the node position by the location index, avoiding graph structure traversal, and performs structured filtering by combining hierarchical marker bits, thereby ensuring the completeness of the retrieval path and shortening the query response time.

[0239] Finally, all indexing results from this embodiment are stored in a "structured form of disease, pulse, syndrome, and treatment chain" to form a knowledge base of ancient Chinese medicine texts. In this knowledge base, the indexing results of each entry are saved as a chain-like data object containing nodes in a fixed order and hierarchical attributes. The pulse nodes are stored hierarchically according to the main pulse / concurrent pulse, and the syndrome manifestation nodes are grouped according to the main symptom / concurrent symptom, ensuring that the hierarchical context and diagnostic connections of the original text are completely preserved at the storage level.

[0240] This knowledge base can be further used to construct a knowledge graph of ancient Chinese medicine texts, supporting various upper-level applications such as intelligent retrieval, knowledge discovery, and clinical decision support. For example, in clinical decision support scenarios, reasoning can be performed based on the "correspondence between the main pulse and the location of the disease" and the "correspondence between the main symptom and the treatment method" in the chain structure. The core prescriptions pointed to by the main pulse and the main symptom can be matched first, and then modified according to the concurrent pulses and concurrent symptoms, thereby simulating the diagnostic and treatment thinking of "grasping the main symptom and taking into account the concurrent symptoms" in clinical practice of traditional Chinese medicine.

[0241] Example 3: A Case Study of the Hierarchical Indexing Process for Main and Secondary Vessels

[0242] 1. Hierarchical judgment rules

[0243] Based on the ordered chain data model, the hierarchical judgment rules include:

[0244] Pulse pattern classification rules: If only one pulse pattern appears in the original text, the pulse pattern is marked as the main pulse and the secondary pulse is left blank; if multiple pulse patterns appear, the main disease is identified based on the location and nature of the disease and marked as the main pulse, and the secondary pulse is marked as the secondary pulse; when the secondary pulse has a clear diagnostic location, the pulse location information is recorded in the diagnostic location array of the pulse pattern object.

[0245] The rules for judging the syndrome level are as follows: those that directly correspond to the disease and syndrome in the outline and determine the treatment method are marked as the main syndrome; those that appear in conjunction with the main prescription and do not affect the choice of the main prescription are marked as the secondary syndrome; those that are not explicitly mentioned in the original text but can be inferred from the pathogenesis are marked as the possible syndrome.

[0246] In the disease pulse diagnosis and treatment chain data, the pulse node distinguishes between the main pulse object and the secondary pulse object array in a structured form, and each element in the secondary pulse object array retains the examination site information; the syndrome manifestation node distinguishes between the main symptom object array and the secondary symptom object array in a structured form, and stores them in separate groups.

[0247] 2. Example of hierarchical indexing process for main and secondary veins

[0248] The same steps S1 to S5 in Example 1 are performed.

[0249] Using the passage from *Synopsis of Prescriptions of the Golden Chamber* (Chapter 6, "Blood Stasis and Deficiency Diseases: Pulse Patterns and Treatments") as the text to be processed, this invention demonstrates its structured processing capabilities for pulse hierarchy (primary pulse / secondary pulse) and pulse location information. The passage contains one primary pulse (both yin and yang are weak), and two secondary pulses (weak at the cun and guan positions, and slightly tight at the chi position). The secondary pulses also carry clear location information, comprehensively showcasing the advantages of this invention in pulse hierarchy indexing.

[0250] Step S1: Knowledge Body Construction and Classification

[0251] Based on the original text, this passage comes from the chapter "Blood Stasis and Constipation Diseases: Pulse, Symptoms, and Treatment" in the *Synopsis of Prescriptions of the Golden Chamber*. Therefore, its knowledge type is identified as "Diseases, Pulse, Symptoms, and Treatment" (see...). Figure 2 This was named "Blood Stasis Disease Pulse Symptoms and Treatment".

[0252] Step S2: Knowledge Meta-indexing Based on Large Language Model

[0253] This step is completed by sequentially calling the large language model in four rounds (see...). Figure 4 ).

[0254] First round of invocation: Knowledge body verification

[0255] Since step S1 has determined that the text belongs to the "Disease, Pulse, Syndrome, and Treatment" knowledge category, this step informs the DeepSeek-R1 of this information for verification. Input the prompt "The text belongs to the 'Disease, Pulse, Syndrome, and Treatment' knowledge category, with the knowledge category name 'Blood Stasis, Disease, Pulse, Syndrome, and Treatment'" into DeepSeek-R1. Please verify whether the following text belongs to this knowledge category: "Blood stasis, both Yin and Yang are weak, the Cun and Guan positions are weak, the Chi position is slightly tight, external symptoms include numbness of the body, resembling wind-dampness, treated with Huangqi Guizhi Wuwu Decoction." The model output is as follows:

[0256] {

[0257] "Knowledge Type": "Disease, Pulse, Syndrome, and Treatment"

[0258] "Knowledge Entity Name": "Blood Stasis Disease: Pulse Symptoms and Treatment"

[0259] Verification result: "Correct"

[0260] }

[0261] Second round of invocation: Extracting knowledge elements

[0262] Enter the prompt word into DeepSeek-R1, and in the knowledge element type description, the preceding level judgment rule and pulse position labeling rule are: "Extract knowledge elements from the following original texts of knowledge entities".

[0263] Knowledge element types include: disease name, pulse characteristics (including hierarchy: main pulse / concurrent pulse, including pulse location: if present), syndrome manifestations (including hierarchy: main symptom / concurrent symptom / possible symptom), and prescription.

[0264] Pulse pattern classification rules: If only one pulse pattern appears in the original text, that pulse pattern is the main pulse, and the secondary pulse pattern is left blank; if multiple pulse patterns appear, it is necessary to determine which one summarizes the main disease (marked as the main pulse) and which one is a secondary pulse (marked as a secondary pulse) based on the location and nature of the disease.

[0265] The rules for judging the syndrome level are as follows: the main symptom is the one that directly corresponds to the disease and syndrome outline and determines the treatment method; the accompanying symptoms that do not affect the choice of the main prescription are the secondary symptoms.

[0266] Original text: "Blood stasis, with both Yin and Yang deficient, weak at the Cun and Guan positions, and slightly tight at the Chi position, with external symptoms of numbness in the body, resembling wind-dampness, is treated with Huangqi Guizhi Wuwu Decoction." Output as follows:

[0267] {

[0268] Knowledge Entity Name: "Blood Stasis Knowledge Entity"

[0269] "Knowledge Element Output": [

[0270] {"Type": "Disease Name", "Content": "Blood Stasis"},

[0271] {"Type": "Pulse Characteristics", "Content": "Weak in both Yin and Yang", "Level": "Main Pulse", "Pulse Location": "", "Concurrent Pulse": "Weak at the Cun and Guan positions, slightly tight at the Chi position"}

[0272] {"Type": "Pulse Pattern", "Content": "Slight pulse at Cun-Kou and Guan-Shang", "Level": "Combined Pulse", "Pulse Location": "Cun-Kou, Guan-Shang"}

[0273] {"Type": "Pulse Pattern", "Content": "Slightly Tight in the Chi Position", "Level": "Combined Pulse", "Pulse Location": "Chi Position"},

[0274] {"Type": "Syndrome Manifestation", "Content": "Numbness", "Level": "Main Symptom"},

[0275] {"Type": "Syndrome Manifestation", "Content": "Symptoms like wind-dampness", "Level": "Concurrent Symptoms"},

[0276] {"Type": "Formula", "Content": "Huangqi Guizhi Wuwu Decoction"} ]

[0278] }

[0279] Compared to Example 2, this example includes multiple entries for secondary pulses and pulse location attributes in its knowledge element. For example, the pulse location of the secondary pulse "slight at the cun-kou and guan-shang" is "cun-kou, guan-shang," and the pulse location of the secondary pulse "small and tight at the chi-zhong" is "chi-zhong." This result indicates that the present invention can distinguish between primary and secondary pulses, record the specific examination location of the pulse, and that the hierarchical attributes are embedded in the knowledge element structure, rather than merely serving as classification tags.

[0280] Third round of invocation: semantic extraction

[0281] Input the prompt "Extract semantic components and label their types from the following knowledge elements, while inheriting the hierarchical attributes and pulse location information within the knowledge elements. Knowledge elements include: disease name: Blood stasis; pulse characteristics: weak in both Yin and Yang (hierarchy: main pulse); pulse characteristics: weak at the Cun and Guan positions (hierarchy: secondary pulse, pulse location: Cun and Guan positions); pulse characteristics: small and tight at the Chi position (hierarchy: secondary pulse, pulse location: Chi position); symptom: numbness (hierarchy: main symptom); symptom characteristics: wind-dampness (hierarchy: secondary symptom); prescription: Huangqi Guizhi Wuwu Tang (Astragalus and Cinnamon Twig Five-Ingredient Decoction). For prescriptions, their constituent drugs need to be extracted. Output as follows:"

[0282] {

[0283] Semantic output: [

[0284] {"Type": "Disease-Syndrome", "Content": "Blood Obstruction"},

[0285] {"Type": "Pulse Condition", "Content": "Both Yin and Yang are Faint", "Level": "Main Pulse", "Pulse Position": ""},

[0286] {"Type": "Pulse Condition", "Content": "Faint at the Wrist and Guan Positions", "Level": "Associated Pulse", "Pulse Position": "Wrist, Guan Position"},

[0287] {"Type": "Pulse Condition", "Content": "Slightly Tight at the Cubit Position", "Level": "Associated Pulse", "Pulse Position": "Cubit Position"},

[0288] {"Type": "Syndrome Manifestation", "Content": "Numbness of the Body", "Level": "Main Symptom"},

[0289] {"Type": "Syndrome Manifestation", "Content": "Symptom Similarity to Wind Obstruction", "Level": "Associated Symptom"},

[0290] {"Type": "Prescription", "Content": "Huangqi Guizhi Wuwu Tang"}

[0292] }

[0293] This result shows that the pulse condition nodes in the semantic output clearly mark the level (main pulse / associated pulse) and pulse position information. Faint appears both as a main pulse and as an associated pulse with marked pulse position; Tight appears as an associated pulse with marked pulse position. In the semantic extraction stage, the present invention completely retains the primary and secondary hierarchical relationship of pulse conditions, pulse position information and the hierarchical relationship of syndromes in the original text, and solves the hierarchy flattening problem in the prior art caused by uniformly indexing all pulse conditions as the pulse condition type and all syndromes as the syndrome manifestation type.

[0294] Fourth round of invocation: Generate disease-pulse-syndrome-treatment chain data

[0295] Input a prompt to DeepSeek-R1, requiring to connect the semantics in a fixed order of disease-syndrome → pulse condition → syndrome manifestation → treatment, retain the main pulse, associated pulse and pulse position information in a structured form within the pulse condition nodes, distinguish main symptoms and associated symptoms within the syndrome manifestation nodes, and generate disease-pulse-syndrome-treatment chain data (see Figure 2 ​). The prompt is: "Extract semantic components from the following semantics and concatenate them in a fixed order to generate a disease-pulse-syndrome-treatment chain. The semantics include: disease and pattern Xuebi, pulse condition yin and yang both faint (level: main pulse), pulse condition faint at the cunkou and guan positions (level: associated pulse, pulse positions: cunkou, guan), pulse condition slight tightness at the chi position (level: associated pulse, pulse position: chi), syndrome manifestation generalized numbness (level: main symptom), syndrome manifestation wind impediment-like presentation (level: associated symptom), and Huangqi Guizhi Wuwu decoction as the formula. For pulse condition semantics, distinguish between the main pulse and associated pulses, and retain the pulse position information; for syndrome manifestation semantics, distinguish between main symptoms and associated symptoms." The output is as follows:

[0296] {

[0297] "disease-pulse-syndrome-treatment chain": {

[0298] "fixed order": "disease and pattern → pulse condition → syndrome manifestation → treatment",

[0299] "node":

[0300] {"type": "disease and pattern", "content": "Xuebi"},

[0301] {

[0302] "type": "pulse condition",

[0303] "main pulse": "yin and yang both faint",

[0304] "associated pulse":

[0305] {"content": "faint at the cunkou and guan positions", "pulse position": "cunkou, guan"},

[0306] {"content": "slight tightness at the chi position", "pulse position": "chi"}

[0308] },

[0309] {"type": "syndrome manifestation", "main symptom": ["generalized numbness"], "associated symptom": ["wind impediment-like presentation"]},

[0310] {"type": "treatment", "content": "Huangqi Guizhi Wuwu decoction"}

[0312] }

[0313] }

[0314] ​​In this pulse diagnosis and treatment chain, the pulse nodes clearly distinguish between primary and secondary pulses in a structured form, and completely preserve pulse location information. Compared with existing technologies, this chain structure, through hierarchical attribute encoding within the nodes, transforms the clinical weight difference between primary pulses (as the framework) and secondary pulses (as the objective) into computable structured metadata, rather than flat, parallel labels. This solves the problem of lost primary and secondary relationships caused by the lack of hierarchical encoding in existing technologies.

[0315] Furthermore, the aforementioned hierarchical encoding is transformed into computable hierarchical constraints during the data storage and application phase: In the graph database, a "primary-secondary association" edge (edge ​​attribute relation_type=primary) is established between the primary pulse node and the disease / symptom node, and a "secondary association" edge (edge ​​attribute relation_type=secondary) is established between the secondary pulse node and the disease / symptom node. The secondary pulse node records pulse position information such as Cun-Kou, Guan-Shang, and Chi-Zhong through the pulse_position attribute. During querying and retrieval, the system can perform primary and secondary filtering of pulse patterns based on the relation_type attribute, prioritizing the return of syndromes and prescriptions associated with the primary pulse, or assigning a higher weight coefficient to the primary pulse when combining multiple pulse patterns for diagnosis. During knowledge reasoning, the primary pulse "both Yin and Yang are weak" participates in syndrome differentiation as the core pulse pattern of blood stasis pathogenesis, while the secondary pulses "weak at Cun-Kou and Guan-Shang" and "small and tight at Chi-Zhong" participate in disease location as local disease location information. The two form an outline calculation structure through hierarchical attributes, supporting the differentiated processing of the primary and secondary contributions of pulse patterns in downstream intelligent diagnosis.

[0316] Step S3: Integrity Verification

[0317] This step uses the same triple verification rules as in Example 2. Input the pathological diagnosis and treatment chain data generated in step S2. The system checks the data sequentially according to the three preset verification rules (see 4), and all verification results pass.

[0318] Step S4: Quality Control and Data Output

[0319] Quality control was performed using the same method as in Example 2. The indexing results were independently reviewed by two researchers with backgrounds in Traditional Chinese Medicine literature, and consistency was calculated using Cohen's Kappa coefficient.

[0320] This embodiment serves as a demonstration of the indexing process, and its indexing results have passed the aforementioned quality control process. For quantitative verification of the repeatability of this method in large-scale indexing, please refer to Embodiment 5.

[0321] The approved indexing results serve as the final output for subsequent knowledge base construction and application.

[0322] Step S5: Data Storage and Application

[0323] The indexing results in this embodiment are stored in a structured manner according to the aforementioned data storage and application method (same as in Embodiment 2).

[0324] Example 4: Verification of the progressive invocation and example prompting effects of the large language model

[0325] To verify the technical contributions of the "example prompt" and "four-round sequential call" strategies in this invention, ablation experiments were conducted on 100 random articles of the "Treatise on Febrile Diseases" (randomly selected from the remaining 378 articles after excluding the 20 articles in the modeling validation set).

[0326] The F1 score (F1 = 2 × precision × recall / (precision + recall)) was used as the evaluation metric. Precision and recall were calculated based on a "gold standard" dataset manually annotated by three experts. This gold standard dataset covers all 398 articles of the *Shanghan Lun*, including articles with single and complex pulse patterns. Experts independently annotated the data according to the disease-pulse-syndrome-treatment chain structure described in this invention (including four types of nodes: disease, pulse, syndrome manifestation, and treatment, as well as hierarchical attributes of nodes such as pulse and syndrome manifestation). The final standard was formed after arbitration.

[0327] Nine different schemes (the nine AI schemes) were run, with each scheme run three times and the average value taken.

[0328] Option A: Single call, no indexed example hints (baseline)

[0329] The DeepSeek-R1 algorithm is invoked once to extract four types of entities from the original text: disease name, pulse pattern, syndrome manifestation, and prescription, for indexing. No indexing examples are attached, and the output format is not specified. The model freely outputs a flat set of labels, without distinguishing between pulse pattern levels (main pulse / concurrent pulse) and syndrome levels (main symptom / concurrent symptom), without guaranteeing that all four elements are present, and without restricting the order of diagnosis and treatment.

[0330] Option B: Single call, 3 indexed example hints

[0331] Building upon Solution A, three indexing examples are added to the prompts. These examples cover three levels of annotation: single pulse pattern + main symptom, main pulse and concurrent pulse (compound pulse pattern) + main symptom, and main pulse + main symptom and concurrent symptom. The output format of the disease-pulse-treatment chain is clearly demonstrated (including node type, the hierarchical attribute annotation method for main pulse and concurrent pulse, and main symptom and concurrent symptom, and the fixed order of the disease-pulse-treatment chain). The model uses DeepSeek-R1 to extract four types of entities—disease name, pulse pattern, syndrome manifestation, and prescription—to complete the indexing in a single call, adhering to the format specifications established in the examples and outputting a structured result containing hierarchical attributes.

[0332] Solution C: Four rounds of sequential calls, with no indexing example hints.

[0333] The four-round sequential calling strategy of Example 1 (knowledge body verification → knowledge element extraction → semantic extraction → chain generation) is adopted, but no indexing examples are attached to the prompt words. The model completes the indexing by progressively refining the extraction of four types of entities: disease name, pulse, syndrome manifestation, and prescription, but it lacks the format constraints and hierarchical judgment references provided by the examples.

[0334] Solution D: The complete solution of this invention (four rounds of sequential calls, 3 indexing examples)

[0335] Simultaneously, a strategy of providing three indexed example prompts and a four-round sequential invocation is employed. Each invocation prompt includes three indexed examples, demonstrating three levels of annotation scenarios: single pulse pattern + main symptom, main pulse and concurrent pulse (compound pulse pattern) + main symptom, and main pulse + main symptom and concurrent symptom, respectively, along with the fixed sequential structure of the disease-pulse-treatment chain. In other words, the example prompts cover three levels of annotation: main pulse and concurrent pulse, and main symptom and concurrent symptom. Through a progressive four-round sequential invocation, the model gradually generates chain-structured data that conforms to hierarchical specifications and sequential constraints, under the constraints of the examples.

[0336] Option E: Three rounds of sequential calls, with 3 indexed example prompts.

[0337] A three-round sequential calling strategy is adopted (knowledge body verification → knowledge element extraction and semantic extraction → chain generation), that is, the second round of "knowledge element extraction" and the third round of "semantic extraction" in Example 1 are combined into one call. The rest of the settings are the same as those in Scheme D. Each call prompt includes three indexing examples.

[0338] Option F: Five rounds of sequential calls, with 3 indexing examples.

[0339] The five-round sequential calling strategy (knowledge body verification → knowledge element extraction → semantic extraction → hierarchical attribute determination → chain generation) is adopted. That is, the third round of "semantic extraction" in this invention is split into two independent calls: semantic extraction and hierarchical attribute determination. The rest of the settings are the same as the D scheme. Each call prompt word includes 3 indexed examples.

[0340] Option G: Four rounds are called sequentially, with 3 indexing examples excluding complex pulse patterns.

[0341] The same four-round sequential invocation strategy as scheme D is adopted, but three indexed examples are added to the prompt words for each invocation (only covering single pulse pattern texts, excluding composite pulse pattern texts of main pulse and secondary pulse), and the rest of the settings are the same as scheme D.

[0342] H scheme: Four rounds of sequential calls, with 8 indexed example prompts.

[0343] The same four-round sequential invocation strategy as Scheme D is adopted. Each invocation prompt includes 8 indexing examples (covering three levels of annotation: main pulse and secondary pulse, main symptom and secondary symptom). The rest of the settings are the same as Scheme D.

[0344] Solution I: Out-of-order four-round calls, with 3 indexing example hints

[0345] The four-round call strategy with disordered order (knowledge element extraction → knowledge body verification → chain generation → semantic extraction) is adopted, that is, the fixed progressive order of "knowledge body verification → knowledge element extraction → semantic extraction → chain generation" in this invention is disrupted, and the number of calls, prompt words and number of examples are the same as those of scheme D.

[0346] The verification results of the nine AI schemes are shown in Table 2.

[0347] Table 2. Validation of Nine AI Solutions

[0348]

[0349] As shown in Table 2, comparing schemes A and B, the F1 score improved by 18.9 percentage points after adding example hints. This indicates that example hints established a unified output format specification, enabling the model to recognize and output hierarchical attributes such as main vein / secondary vein.

[0350] Comparing schemes A and C, the F1 score improved by 12.5 percentage points after adding four rounds of sequential calls, indicating that the progressive four-round sequential calls achieve progressive extraction with layer-by-layer refinement, and can still reduce error accumulation through step-by-step verification even without examples.

[0351] Comparing schemes C and D, adding example hints after four sequential calls improved the F1 score by 19.2 percentage points, indicating that example hints provided format constraints and hierarchical judgment references for progressive extraction, significantly improving the recognition accuracy of complex pulse patterns and syndromes.

[0352] Comparing schemes B and D, adding four sequential calls based on the example prompts improved the F1 score by 12.8 percentage points, indicating that progressive extraction provides more granular knowledge decomposition and process verification for standardized output, reducing information omissions and format deviations in a single call.

[0353] From the perspective of structural indicators, the FCR of scheme D is 44.0 percentage points higher than that of the baseline scheme A, and the MPA is 40.0 percentage points higher. This indicates that the integrity check in the four rounds of sequential calls and the hierarchical annotation examples in the example prompts have significant benefits for the structural integrity of the pathogenesis chain and the accuracy of the main path identification.

[0354] Furthermore, examining the gradient of the call rounds, comparing schemes E, D, and F reveals that increasing the number of call rounds from three to four significantly improves F1 by 5.1 percentage points, FCR by 10.0 percentage points, and MPA by 9.0 percentage points. However, increasing from four to five rounds only improves F1 by 0.6 percentage points, FCR by 1.0 percentage point, and MPA remains unchanged, indicating that marginal returns tend to saturate, while call costs and time increase accordingly. This demonstrates that the four-round sequential call achieves the optimal balance between indexing quality and call cost, validating the technical rationale behind this invention's design of a four-round progressive call process: "knowledge body verification → knowledge element extraction → semantic extraction → chain generation."

[0355] From the gradient of example quantity, comparing schemes G, D, and H, it can be seen that the 3 examples containing composite pulses improve F1 by 5.5 percentage points, FCR by 8.0 percentage points, and MPA by 8.0 percentage points compared to the 3 examples without composite pulses. This indicates that composite pulse examples play a crucial reference role in hierarchical annotation. After increasing the number of examples from 3 to 8, F1 only improves by 0.7 percentage points, FCR remains unchanged, and the improvement tends to plateau, while the prompt word length increases significantly. This suggests that 3 indexing examples are sufficient to establish a unified output format specification, representing the optimal number of examples that balances indexing quality and prompt word overhead.

[0356] From the perspective of the call order, comparing schemes I and D, it can be seen that under the condition that the number of calls, the composition of prompt words, and the number of examples are exactly the same, after shuffling the fixed progressive order of the four rounds of calls, F1 decreases by 9.8 percentage points, FCR decreases by 20.0 percentage points, and MPA decreases by 18.0 percentage points. This indicates that the technical effect of this invention depends not only on the multiple rounds of calls themselves, but also on the fixed progressive order of "knowledge body verification → knowledge element extraction → semantic extraction → chain generation".

[0357] The above suggests that the example suggestion strategy and the four-round sequential call strategy are complementary, and the combination of the two is the most effective, improving the F1 score by 31.7 percentage points compared to the baseline. The gradient experiment on the number of call rounds and the number of examples further shows that the four-round sequential call and 3 example suggestions are the optimal parameters that balance indexing quality and call cost.

[0358] Example 5: Verification of the reproducibility of indexing results

[0359] To verify the reproducibility of this method, three indexers with different experience levels (3 years, 5 years, and 2 years of experience) independently indexed the same batch of 398 articles from the *Shanghan Lun*. The indexing process strictly followed steps S1 to S5 as described in this invention, including four rounds of sequential indexing, example prompts, and triple integrity checks.

[0360] Cohen's Kappa coefficient was used to calculate the consistency between each two rounds. The Kappa calculation formula is shown in step S4 of Example 1. The review content includes not only knowledge body boundaries, knowledge element types, and semantic boundaries, but also pulse level attributes and syndrome manifestation level attributes, to verify that the present invention can maintain a high degree of consistency in the level differentiation stage where subjective judgment is strong. The results are shown in Table 3.

[0361] Table 3. Results of Repeatability Verification

[0362]

[0363] As shown in Table 3, all Kappa values ​​are greater than 0.85. According to the Kappa coefficient evaluation standard proposed by Landis and Koch, Kappa > 0.85 indicates "near-perfect consistency". Even in stages where subjective judgment is strong, such as node hierarchy attributes, indexers with different experience levels can still achieve Kappa values ​​above 0.87. This is due to the fact that in step S2, the present invention transforms clinical experience into format constraints that the model must follow through example prompts and hierarchy judgment rules, and in step S5, it automatically intercepts inconsistent hierarchy annotation results through integrity checks, thereby significantly reducing subjective differences. This embodiment demonstrates that even if indexers have different experience (3 years, 5 years, 2 years), the method of the present invention can obtain highly consistent indexing results, solving the problems of existing technologies that rely on human experience and have insufficient reproducibility.

[0364] Example 6: Knowledge Storage and Retrieval Method Based on the Disease Pulse Syndrome Treatment Chain

[0365] The disease pulse diagnosis and treatment chain uses an ordered list to store the ordered node sequence, replacing graph traversal with a fixed-order position index. In the physical storage layer, the chained data object contains a unique chain identifier, an ordered sequence of node references, a node data pool, and auxiliary indexes.

[0366] The auxiliary indexes include: inverted indexes built by disease / syndrome name, inverted indexes built by main pulse name, and inverted indexes built by prescription name.

[0367] The hierarchical markers include: main pulse marker, secondary pulse marker, main symptom marker, and secondary symptom marker.

[0368] In retrieval applications, when executing a query that starts from the disease / symptom node, passes through the pulse node, and arrives at the treatment node, the system directly locates the node position by the location index, avoiding graph structure traversal, and performs structured filtering by combining hierarchical marker bits, thereby ensuring the retrieval path completeness rate (RPR) (referring to the percentage of candidate paths returned by the system that simultaneously contain the four nodes of disease, pulse, symptom, and treatment under the given retrieval conditions) and shortening the query response time.

[0369] The specific search process is as follows:

[0370] 1. Parse the query conditions and extract the node identifier of the target disease / symptom node;

[0371] 2. Locate the chain identifier and offset of the disease node using the location index;

[0372] 3. Under the same chain identifier, the target node is read directly by offset in a fixed order;

[0373] 4. Combine hierarchical markers to filter for main pulse / concurrent pulse or main symptom / concurrent symptom, and return structured results.

[0374] Taking Article 26 of the *Shanghan Lun* (Treatise on Cold Damage) as an example, which states, "After taking Guizhi Tang (Cinnamon Twig Decoction), if there is profuse sweating, but the patient still experiences intense thirst and a rapid, forceful pulse, Baihu Jia Renshen Tang (White Tiger Decoction with Ginseng) should be administered," the data structure of the disease, pulse, syndrome, and treatment chain generated after indexing is shown in Table 4.

[0375] Table 4. Results of the retrieval of data on the pathogenesis and treatment chain.

[0376]

[0377] When a user enters the search criteria "Taiyang disease → Baihu Jia Renshen Tang", the traditional graph structure traversal needs to start from the "Taiyang disease" node and traverse layer by layer along the three edges "disease → pulse", "pulse → syndrome" and "syndrome → treatment", with a traversal depth of 3.

[0378] When using the method described in this embodiment, the system executes:

[0379] 1. Locate the chain identifier for "Sun Disease" in the location index as C026, with an offset of 0;

[0380] 2. Search for entries in the associated direct index with the starting node "Taiyangbing" and the target node "Baihujia Renshentang", directly hitting the chain identifier C026;

[0381] 3. The complete node sequence of the return chain identifier C026.

[0382] The retrieval path depth is compressed from 3 levels of traversal to 2 index lookups, and the time complexity is reduced from O(n) to O(1).

[0383] Table 5 shows the performance comparison between the retrieval method in this application and the traditional Neo4j graph traversal query, covering all 398 test knowledge bases.

[0384] Table 5. Performance comparison between the retrieval method of this application and traditional Neo4j graph traversal query

[0385]

[0386] ★: The path completeness rate in multi-condition composite queries is 98.2%, and the 1.8% missing data is due to unidentified nodes in the indexing stage, which is not a defect in the retrieval mechanism.

[0387] As can be seen from Table 5, the average time taken by the retrieval method in this application is much shorter than the average time taken by graph traversal, and the path integrity rate is close to 100%.

[0388] The above results show that this embodiment transforms the retrieval operation from graph structure traversal to direct index location through the pre-computation mechanism of position index and hierarchical marker bits, which significantly improves the query response speed of large-scale ancient book knowledge base while ensuring the integrity of the path of diagnosis and treatment.

[0389] Example 7: Comparative Experiment Between This Application and Prior Art

[0390] To facilitate comparison between this application and existing technologies, the following is a list of the code names for the solutions in this application and existing technologies:

[0391]

[0392] Note: Codes J, K, and L represent the previous research results of the inventor's team, and the references are respectively from the background art references [1], [2], and [3].

[0393] To examine the structural integrity, hierarchical expression, and automated indexing quality of the five schemes D, J, K, L, and M, a comparative experiment was conducted on 50 test articles of the *Shanghan Lun* (selected from the remaining 278 articles after excluding 20 articles from the modeling validation set and 100 articles from Example 4, covering the chapters on Taiyang, Yangming, Shaoyang, Taiyin, Shaoyin, Jueyin, cholera, and labor recovery, including 22 articles with complex pulse patterns).

[0394] The evaluation metrics were FCR (Four-Element Completeness Rate), MPA (Master Pulse Identification Accuracy), F1 score, precision, and recall. FCR refers to the percentage of entries that simultaneously include the four elements of disease, pulse, syndrome, and treatment; MPA refers to the percentage of entries containing complex pulse patterns that correctly identify the master pulse (the core pulse pattern directly corresponding to the location and nature of the disease). Both metrics were determined through arbitration based on a gold standard dataset manually annotated by three experts.

[0395] Five schemes, D, J, K, L, and M, were run separately. Schemes J, K, and L were each independently indexed by two trained indexers according to their corresponding templates, and the consistent results were obtained (a total of six indexers in three groups). Scheme M was a Prompt-level simulation scheme based on the patent technology concept of application number 202511093495.1, which was automatically extracted using a single call to the large language model. Scheme D was the complete scheme of this invention, which was automatically executed by the large language model in four rounds of sequential calls. Schemes D and M did not require manual indexing, and each configuration was run three times and the average value was taken.

[0396] 1. Data Preprocessing

[0397] The 50 test passages from the *Shanghan Lun* were cleaned and segmented to ensure that the five experimental groups used the same input data. Simultaneously, the gold standard dataset was manually annotated by three experts to verify the entity extraction accuracy of each scheme.

[0398] In addition, to compare retrieval performance, a retrieval query was performed on all 398 results, which was "starting from the Taiyangbing node, passing through the Maifu association, and reaching the Guizhitang node". The path completeness rate and query response time were recorded.

[0399] 2. Control group operation

[0400] Option J: Two indexers manually index the data according to the 31 knowledge element template of "Disease, Pulse, Syndrome, and Treatment". Although the template distinguishes knowledge elements such as "main pulse" and "concurrent pulse", the indexing results are presented in the same hierarchical form without mandatory order constraints.

[0401] Option K: Import the indexing results into Neo4j according to 12 semantic types and 13 relational specifications, and connect the disease, pulse, syndrome and treatment nodes through the "diagnosis and treatment" virtual node.

[0402] Solution L: The test set is indexed according to a four-layer structure of "knowledge body → knowledge element → semantics → semantic relation". Although this solution achieves large-scale fine-grained decomposition, the underlying layer is still a triple semantic network, and the creation of semantic relations depends on the subjective judgment of the indexer.

[0403] Solution M: Under the same large language model base, inject multi-dimensional context such as the background of the Eastern Han Dynasty, the tags of the Zhongjing School, Cheng Wuji's annotations and modern translations into the model, and perform a single round of extraction on 50 test sets to output a flat JSON tag set.

[0404] 3. Experimental group operation

[0405] Solution D (This Invention): Utilizing the "Disease Pulse Syndrome Treatment Chain" ontology, a four-round sequential call is performed (knowledge body verification → knowledge element extraction → semantic extraction → chain generation). Each call includes three indexed examples, explicitly displaying the main pulse / concurrent pulse, main symptom / concurrent symptom, and a fixed sequential structure. Triple integrity checks are performed, outputting chain-structured data.

[0406] 4. Result Comparison

[0407] As shown in Table 6, the four-element completeness rate of schemes E, F, G and H in the control group was less than 50%, and the main vein recognition accuracy was also significantly lower than that of the present invention; the four-element completeness rate of the experimental group (scheme D) reached 82.0%, and the main vein recognition accuracy reached 85.0%.

[0408] Table 6. Results of the Comparison Experiment on Technical Effects

[0409]

[0410] As shown in Table 6, comparing schemes D and J, scheme D's indexing template scheme improved the FCR by 44.0 percentage points and MPA by 10.0 percentage points compared to scheme J. This indicates that although scheme J distinguishes between primary and secondary knowledge elements, it lacks mandatory chain structure constraints and integrity verification mechanisms, leading to a low completeness rate of the four elements due to subjective omissions by indexers. Scheme D, through a mandatory chain structure of "disease → pulse → syndrome → treatment," improved the completeness rate of the four elements to 82.0%.

[0411] Comparing schemes D and K, scheme D improved FCR by 47.0 percentage points and MPA by 40.0 percentage points compared to scheme K. This indicates that scheme K uses a Neo4j graph structure for storage. Although it sets up virtual nodes for "diagnosis and treatment" to link disease, pulse, syndrome, and treatment nodes, these virtual nodes only represent a weak association of "belonging to the same diagnosis and treatment event" and do not carry the semantics of diagnosis and treatment sequence. Furthermore, the graph pattern layer flattens the main pulse and secondary pulse into "pulse image" nodes, resulting in the complete loss of information at the main pulse level. Scheme D, on the other hand, explicitly solidifies the hierarchy and order through its directed chain structure.

[0412] Comparing schemes D and L, scheme D improves the FCR by 42.0 percentage points and MPA by 35.0 percentage points compared to scheme L's four-layer knowledge element structure. This indicates that although scheme L's four-layer structure achieves large-scale fine-grained decomposition (923 knowledge entities, 6204 knowledge elements), its underlying layer is still a triple semantic network. The creation of semantic relations relies on the indexer's subjective judgment and lacks automatic integrity verification, which corroborates the statistical result in the L scheme study that "only 32% of retrieval paths simultaneously contain four nodes." Scheme D's chain-like closed-loop verification mechanism fundamentally solves the path breakage problem.

[0413] Comparing schemes D and M, scheme D improves the FCR by 40.0 percentage points and MPA by 45.0 percentage points compared to scheme M's large language model adaptive annotation. This indicates that although scheme M improves entity recognition efficiency through multi-dimensional context injection, its output is a discrete set of labels. It does not define a structured model oriented towards the "disease, syndrome, and treatment" diagnostic logic, cannot distinguish the hierarchical relationship between primary and secondary diseases, and cannot guarantee the coexistence and order of the four elements. Under the same large language model foundation, scheme D significantly improves structural correctness through chained ontology constraints and four rounds of progressive verification.

[0414] In addition, to compare retrieval performance, a retrieval query was performed on all 398 results, which was "starting from the Taiyangbing node, passing through the Maifu association, and reaching the Guizhitang node". The path completeness rate and query response time were recorded.

[0415] To further reveal the differences between the various solutions from the perspective of underlying technical architecture, a systematic comparison was made between Solution D and existing technical solutions in terms of association structure, sequence constraints, node hierarchy, integrity guarantee, indexing method, quality control, storage method and retrieval performance. The results are shown in Table 7.

[0416] Table 7. Comparison Results of Technical Features and Search Performance

[0417]

[0418] As shown in Table 7, in the retrieval performance comparison, the semantic network of scheme F retrieved 31 matching paths, of which only 10 contained all four nodes: disease, pulse, syndrome, and treatment, with a path completeness rate of 32% and an average query response time of 1.2 seconds. In scheme M, because the single-round output is a discrete set of labels and no inter-node association structure is established, the path retrieval of "Taiyang disease → floating pulse → Guizhi decoction" cannot be directly executed; after manual post-processing to map the labels to nodes, only 7 out of 31 queries can form a complete ternary path, with a path completeness rate of 22.6%, and due to the lack of an indexing mechanism, the entire label set needs to be scanned, resulting in an average query response time of 2.8 seconds. In scheme D, all 31 matching chains contain four nodes, with a path completeness rate of 100.0%; at the same time, it uses ordered list storage and position indexing, and the query is directly located by index, avoiding graph traversal, and the average query response time is shortened to 0.3 seconds.

[0419] A comparative diagram of the knowledge representation structure of this invention and existing technologies is shown below. Figure 6 As shown, the left side displays the graph structure / flat tag set of the prior art, while the right side displays the fixed-order chain-like hierarchical structure of the present invention, presenting the differences in structural integrity in a visual manner.

[0420] From the perspective of entity-level metrics, Solution D achieved an average improvement of approximately 30 percentage points in F1 (79.3%), approximately 29 percentage points in precision, and approximately 31 percentage points in recall compared to Solution JM. This indicates that the pathogenesis chain ontology and the four-round progressive verification mechanism significantly improved the precision and recall of entity extraction while enhancing structural integrity.

[0421] In summary, the "Disease Pulse Syndrome Treatment Chain" knowledge representation method of this invention significantly outperforms the three previously disclosed technical solutions (Solutions J, K, and L) and the existing large language model annotation scheme (Solution M) in terms of structural integrity (FCR) and hierarchical accuracy (MPA) of knowledge representation. The chain structure particularly improves the flattening defect of the knowledge graph, with the main vein identification accuracy (MPA) increasing by 40.0 percentage points compared to the F scheme (based on Neo4j knowledge graph). The integrity verification mechanism most significantly improves the path breakage, with the four-element integrity rate (FCR) increasing by 42.0 percentage points compared to the G scheme (based on a four-layer knowledge element structure).

[0422] Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.

Claims

1. A method for indexing knowledge from ancient Chinese medical texts based on the chain of disease, pulse, syndrome, and treatment, characterized in that: Including the following steps: S1. Knowledge Body Construction and Classification: Determine the knowledge body type and name based on the chapter titles of the ancient Chinese medicine texts to be processed; S2. Progressive Large Language Model-Assisted Indexing: Based on the knowledge body types and names described in S1, knowledge indexing is completed by sequentially calling the large language model in four progressive rounds. Each call prompt word is accompanied by 3 or more indexing examples. The 3 or more indexing examples cover three levels of annotation methods: main pulse and secondary pulse, main symptom and secondary symptom, as well as the fixed sequential structure of the disease pulse diagnosis and treatment chain. The progressive four-round sequential invocation includes: the first round invocation and knowledge body verification; the second round invocation and knowledge element extraction; Third round of invocation and semantic extraction; fourth round of invocation and generation of pathological diagnosis and treatment chain; S3. Integrity Verification: Perform triple verification on the generated pathogenesis and treatment chain data, checking the node type, node order, and node content; S4. Quality control and data output; S5. Structured Storage and Applications.

2. The method for indexing knowledge of ancient Chinese medicine texts based on the pathogenesis and treatment chain as described in claim 1, characterized in that, The method is based on the disease pulse diagnosis and treatment chain data model, which consists of an ordered node sequence, a metadata set, a verification result set, and a semantic relationship set.

3. The method for indexing ancient Chinese medicine knowledge based on the pathogenesis and treatment chain as described in claim 2, characterized in that, The ordered node sequence consists of four nodes in a strictly fixed order: disease node, pulse node, syndrome manifestation node, and treatment node.

4. The method for indexing knowledge of ancient Chinese medicine texts based on the pathogenesis and treatment chain as described in any one of claims 1-3, characterized in that, The first round of invocation and knowledge body verification includes: inputting the determined knowledge body type and name into the large language model, requesting the large language model to verify whether the text to be processed belongs to the knowledge body of that type, and outputting the verification result.

5. The method for indexing knowledge of ancient Chinese medicine texts based on the pathogenesis and treatment chain as described in any one of claims 1-3, characterized in that, The second round of invocation and knowledge element extraction includes: embedding hierarchical judgment rules in prompt words, requiring the large language model to extract structured knowledge elements containing type, content, and hierarchical attributes from the original text, and the hierarchical attributes are inherited and mapped to hierarchical markers in the disease pathogenesis chain data model.

6. The method for indexing knowledge of ancient Chinese medicine texts based on the pathogenesis and treatment chain as described in any one of claims 1-3, characterized in that, The third round of invocation and semantic extraction includes: requiring the large language model to extract semantic components from knowledge elements and label their types, while inheriting the hierarchical attributes.

7. The method for indexing knowledge of ancient Chinese medicine texts based on the chain of disease pulse diagnosis and treatment as described in any one of claims 1-3, characterized in that, The fourth round of invocation and the generation of the disease pulse diagnosis and treatment chain include: requiring the large language model to concatenate semantics in a fixed order according to the ordered node sequence to generate disease pulse diagnosis and treatment chain data, and retaining hierarchical labels in a structured form within each node, so that the pulse node distinguishes between the main pulse and the secondary pulse, the syndrome manifestation node distinguishes between the main symptom and the secondary symptom, and the treatment node includes the main prescription and drug composition.

Citation Information

Patent Citations

  • Ancient chinese medical book labeling method based on multi-dimensional context fusion for model self-adaptive optimization

    CN120579557B