A traditional chinese medicine radical acquisition method using concept lattice
Patent Information
- Application Number
- CN202611222341.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-12
- Publication Date
- 2026-10-13
AI Technical Summary
然而,现有中医义原获取方法存在明显缺陷:传统方法多依赖词频统计,仅根据语义片段出现频次筛选,易产生大量假性义原,无法识别跨场景稳定共现的有效语义单元;无法对复合概念进行自动拆分,导致义原不满足“最小语义单位”要求;直接丢弃低频语义片段,如丢失太阳经、臖核、跖跗等稀有病位与关键专业概念;未与通用义原知识库HowNet对齐,难以实现中医语义与通用语义体系互通;义原集合冗余度高、规范性差,无法支撑大规模中医义原知识库自动化构建
Smart Images

Figure CN122904910A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of information technology in traditional Chinese medicine, natural language processing, and knowledge engineering. Specifically, it relates to a method for automatically acquiring, standardizing, optimizing, and preserving low-frequency semantics in the field of traditional Chinese medicine using concept lattices. Background Technology
[0002] Traditional Chinese medicine (TCM), a treasure of Chinese medical culture spanning thousands of years, relies heavily on its informatization and intelligentization for in-depth knowledge mining, intelligent retrieval, and assisted diagnosis. Current mainstream TCM knowledge bases, represented by knowledge graphs and ontology databases, primarily employ entity-relation-entity tripartite structures for knowledge representation. These lack the ability to fine-grainedly decompose the internal semantics of TCM concepts, making it difficult to support high-precision tasks such as accurate semantic computation and intelligent diagnostics. Semantic primitives, as the smallest indivisible semantic units in linguistics, can decompose complex TCM concepts into computable and reasonable basic semantic units. They are the core foundation for resolving the semantic ambiguity of TCM knowledge and achieving fine-grained knowledge representation. However, existing methods for acquiring TCM semantic origins have significant drawbacks: traditional methods often rely on word frequency statistics, filtering semantic origins solely based on the frequency of semantic fragment occurrences, which easily generates a large number of false semantic origins and fails to identify effective semantic units that co-occur stably across different scenarios; they cannot automatically decompose complex concepts, causing semantic origins to fail to meet the "smallest semantic unit" requirement; they directly discard low-frequency semantic fragments, such as missing rare disease locations and key professional concepts like Taiyang meridian, shin nucleus, and plantar dorsum; they are not aligned with the general semantic origin knowledge base HowNet, making it difficult to achieve interoperability between TCM semantics and the general semantic system; and the semantic origin sets have high redundancy and poor standardization, making it impossible to support the automated construction of large-scale TCM semantic origin knowledge bases. Therefore, existing technologies cannot simultaneously satisfy the requirements of atomicity, stability, domain adaptability, and semantic integrity of semantic origins, which is precisely the technical problem that this invention aims to solve. Summary of the Invention
[0003] To address the shortcomings of existing technologies, this invention provides a method for acquiring TCM semantic primitives using concept lattices. This method mines stable co-occurring semantic units through formal concept analysis, and combines three-level optimization (compound decomposition, semantic merging, and general alignment) with low-frequency differentiation processing to achieve automatic, accurate, standardized, and comprehensive acquisition of TCM semantic primitives, ultimately obtaining a standardized set of semantic primitives that meets the minimum semantic unit requirement. To achieve the above objectives, this invention adopts the following technical solutions, mainly including: (S1) Data source and preprocessing: Using authoritative TCM disease terminology standards as the data source, the disease text is cleaned, domain-adapted word segmentation and deduplication are performed, and high-quality semantic fragments are extracted; (S2) Formal background construction and candidate semantic primitive mining: A formal background of disease-semantic fragments is constructed, and the In-close4 algorithm is used to calculate formal concepts. Based on the extension and intension scale, stable co-occurring core candidate semantic primitives and ordinary candidate semantic primitives are selected, filtering out false semantic primitives from the source; (S3) Core candidate semantic primitive optimization: The candidate semantic primitives are optimized sequentially... Automatic splitting of compound concepts, synonym merging based on ZY-BERT semantic similarity, and automatic alignment with HowNet general semantic primitives are performed to ensure the atomicity, standardization and universality of semantic primitives; (S4) Differentiation of ordinary candidate semantic primitives: In accordance with the principle of "full semantic coverage + composability", rare low-frequency semantic primitives of body parts are retained, and core semantic primitives are used to represent composable low-frequency concepts, so as to simplify the semantic primitive library without losing professional semantics; (S5) Output of semantic primitive set: The optimized core semantic primitives and the processed ordinary candidate semantic primitives are integrated to form the final standardized set of TCM disease semantic primitives.
[0004] In S1, TCM disease information is formalized as a knowledge triple NAME=(ID,W,C), where ID, W, and C represent the disease classifier, disease name, and clinical manifestation, respectively. Data preprocessing requires the following steps: Text cleaning: removing function words, punctuation marks, numbers, and special characters while retaining core TCM semantic content; Domain-adaptive word segmentation: optimizing word segmentation rules based on TCM expertise to avoid incorrect segmentation of complex concepts such as "spleen deficiency" and "qi stagnation and blood stasis"; Manual verification and deduplication: removing meaningless words, correcting segmentation errors, removing duplicate semantic fragments, and forming a candidate attribute set.
[0005] In S2, based on the data processed in S1, a formal context is constructed using concept lattice theory to automatically mine candidate semantic primitives that co-occur stably. First, a formal context K=(G,M,I) is constructed, where G is the set of disease text objects, M is the set of semantic fragment attributes, and I is the binary relation between objects and attributes, denoted as 1 for inclusion and 0 for exclusion. Then, the In-close4 batch processing algorithm is used to iteratively calculate all formal concepts based on the formal context. Each concept includes extension (set of objects) and intension (set of attributes). The key steps of the In-close4 algorithm for formal concept calculation are as follows:
[0006] Step 1: Initialization: 1) Create a matrix. First, create a matrix to represent the relationship between objects and their properties. The formula is: Where I(g,m) is the relational value between object g and attribute m, 1 indicates inclusion, 0 indicates non-inclusion; g is any object in the formal context; m is any attribute in the formal context. 2) Initialize the concept. Starting with the most general initial concept, the extension includes all attributes, and the intension is empty, the formula is: Where A0 is the extension of the initial concept, which is the set of all objects G; B0 is the intension of the initial concept, which is an empty set. 3) Set the iteration parameters. Iterate from the last attribute down to the first attribute, i.e., the formula: , where j is the index of the attribute being traversed; |M| is the total number of attributes in the attribute set.
[0007] Step 2: Iterative Calculation: 1) Traverse the attributes. Start from the most general initial concept and traverse downwards to the most specific final concept. For each attribute, perform the following operations: (1) Skip the already processed attributes. If the attribute is already in the connotation of the current concept, skip the attribute, i.e., the formula is: , where m j B is the semantic fragment corresponding to the j-th attribute; B is the intension set of the current formal concept. (2) Forming a new extension. By performing an intersection operation between the extension of the current concept and the set of objects corresponding to the attribute, a new conceptual extension is formed, and the formula is: Where C is the extension of the newly generated concept; A is the extension of the current concept; m j It is the j-th attribute. 2) Processing the new extension (1) If it is equal to the extension of the current concept, it means that all objects have the attribute, so the attribute is added to the intension of the current concept, that is, the formula is: Where C is the new extension; A is the current extension; B new B is the updated meaning; B is the original meaning; m j It is the j-th attribute to be added to the connotation. (2) If C is not equal to the extension of the current concept, check if C is canonical. If it is canonical, add C and j to the global queue for subsequent processing.
[0008] Step 3: Process the global queue: 1) When the global queue is not empty, retrieve the sum from the queue, update it to the union of the intension and extension of the current concept, and update the extension of the current concept, i.e., the formula is: , Where D is the updated set of connotations; B is the original set of connotations; m j It is the j-th attribute; A new It is a new extension; B new1) The new connotation; C is the extension taken from the queue. 2) Using and as the new initial concept, j-1 as the new attribute index, and the connotation of the current concept as the new parent concept attribute set, the formula is: , where j new `j` is the attribute index for the next iteration; `j` is the current attribute index.
[0009] Step 4: Recursive Construction: 1) Recursively Subdivide Concepts. Through recursive calls, the algorithm continuously subdivides concepts until all attributes have been processed. 2) Output Results. Output all results that satisfy the formal concept definition.
[0010] Finally, in the formal concepts extracted using the In-close4 algorithm, the extensional size reflects co-occurrence stability; the larger the size, the stronger the co-occurrence stability. Based on this, a rigorous screening method is formulated according to the extensional and intensional sizes of the concepts: ,in, It represents the number of objects within the extension; It refers to the number of attributes within the connotation.
[0011] In S3, the core candidate semantic primitives obtained in S2 need to be decomposed, semantically merged, and generally aligned to ensure the atomicity and standardization of the semantic primitives. Decomposition of composite semantic primitives: Based on authoritative interpretations of TCM terminology, composite concepts are decomposed into the smallest indivisible semantic units. Merging of semantically similar semantic primitives: When merging candidate semantic primitives, it is first necessary to convert each candidate semantic primitive into a numerical form that can be processed by a computer. This section uses the ZY-BERT model to extract the semantic vector representation of the candidate semantic primitives. The average hidden state value of the tokens corresponding to the words in the last hidden state layer of the model is taken as the vector representation of the candidate semantic primitive. Compared with directly using vectors, this method focuses more on the semantics of the words themselves, and is especially suitable for fine-grained semantic representation of single-character or multi-character words. The formula for calculating the semantic vector of candidate semantic primitives is as follows: ,in, It is the semantic vector of the semantic primitive w, with a dimension of 768. It is the number of sub-words corresponding to the semantic primitive w; Let be the hidden state vector of the i-th subword token of semantic primitive w in the last layer of the model. Based on the extracted semantic primitive vectors, cosine similarity is used to measure the semantic association between pairs of semantic primitives. The cosine similarity value is between [0,1], and the larger the value, the higher the semantic similarity between semantic primitives. Cosine similarity calculation between semantic primitives: ,in, It is the origin of meaning Yoshihara Cosine similarity; It is the origin of meaning semantic vector; It is the origin of meaning semantic vector; It is the origin of meaning The magnitude of the semantic vector; It is the origin of meaning The magnitude of the semantic vector. Cosine similarity is calculated pairwise for all identifiable semantic primitives to obtain the semantic similarity matrix. , where n is the number of identifiable semantic primitives, and the matrix elements are the similarity values of corresponding semantic primitive pairs. Based on the similarity matrix, a threshold-based unsupervised grouping method is used to merge highly similar semantic primitives, avoiding subjective bias introduced by manually specifying core words. Only semantically highly similar semantic primitives are clustered into the same group, ensuring that each semantic primitive belongs to only one group. After automatic grouping and manual verification, the final core semantic primitive combination set is obtained. HowNet semantic primitive alignment: To measure the semantic similarity between the TCM semantic primitive group and HowNet semantic primitives, they need to be mapped to a unified semantic vector space. This study uses the ZY-BERT model to extract the semantic vectors of both, inputting the HowNet semantic primitives into the ZY-BERT model to extract their semantic vectors; for each TCM semantic primitive group, the average of the semantic vectors of all semantic primitives in the group is taken as the overall semantic vector of the semantic primitive group, as shown in the following formula, to ensure that the overall semantic features of the semantic primitive group are fully captured. , where V group It is the overall semantic vector of the TCM Yiyuan group, with a dimension of 768. It is the number of semantic primitives within the TCM semantic primitive group that can successfully extract semantic vectors; This is the semantic vector of the j-th semantic primitive within the TCM semantic primitive group. The semantic similarity between the TCM semantic primitive group and HowNet semantic primitives is measured using cosine similarity, with similarity values ranging from [0,1], and larger values indicating closer semantic similarity. This study employs a threshold-based filtering and descending-order sorting matching strategy. The specific process is as follows: traverse all HowNet semantic primitives and extract their semantic vectors; filter out semantic primitives from which vectors cannot be extracted to establish a "HowNet semantic primitive and semantic vector" mapping dictionary; then calculate the overall semantic vector for each TCM semantic primitive group, and calculate the cosine similarity with each HowNet semantic primitive vector; select HowNet semantic primitives with similarity not lower than a preset threshold as a matching candidate set; sort the candidate sets in descending order of similarity and take the top-ranked one as the initial alignment result; groups without a threshold are marked as unmatched. After alignment, a matching result in the form of "TCM semantic primitive group to HowNet semantic primitive list" is obtained.
[0012] In S4, low-frequency common candidate semantic primitives are classified and processed to balance the simplicity of the knowledge base with full semantic coverage. Rare semantic primitives for body parts are directly retained to ensure that key pathological information is not lost; for low-frequency concepts that can be combined to express meaning, they are not retained independently, but are represented by a combination of core semantic primitives.
[0013] In S5, the core semantic elements after integration and optimization and the ordinary semantic elements after processing are combined to output the final standardized set of TCM disease semantic elements. Attached Figure Description
[0014] Figure 1 This is a flowchart of the construction method of the present invention; Figure 2 This is an example of the representation of TCM disease knowledge after processing according to the present invention; Figure 3 This is an example of a semantic fragment of a traditional Chinese medicine concept after processing according to the present invention; Figure 4 This is an example of the semantic combination of words in this invention. Detailed Implementation
[0015] To enhance understanding of the present invention, the technical solution is further described below with reference to the accompanying drawings and embodiments. These embodiments are merely illustrative and do not constitute a limitation on the scope of protection of the present invention. Figure 1 This paper presents a method for obtaining TCM semantic primitives using concept lattices, comprising the following steps: Inputting raw TCM text, the method involves text preprocessing, text segmentation, formal background construction, formal concept calculation, candidate semantic primitive screening, core candidate semantic primitive optimization, and ordinary candidate semantic primitive processing to obtain the final set of semantic primitives. For text preprocessing, the authoritative data source is the "TCM Clinical Diagnosis and Treatment Terminology Part 1: Diseases" published by the State Administration of Traditional Chinese Medicine, containing 1369 standardized disease samples. Disease information is formalized into knowledge triples NAME=(ID,W,C), where ID, W, and C represent the disease classifier, disease name, and clinical manifestation, respectively. Figure 2 As shown. For data preprocessing, the following operations are required: Text cleaning: Remove function words, punctuation marks, numbers, and special characters, retaining the core TCM semantic content; Domain-adaptive word segmentation: Optimize word segmentation rules based on "Terminology of Traditional Chinese Medicine" and "Basic Theoretical Terminology of Traditional Chinese Medicine" to avoid incorrect segmentation of complex concepts such as "spleen deficiency" and "qi stagnation and blood stasis"; Manual verification and deduplication: Remove meaningless words, correct word segmentation errors, remove duplicate semantic fragments, and form a candidate attribute set. Examples of some semantic fragments after preprocessing are shown below. Figure 3 As shown. Formal background construction: Based on the processed data, formal backgrounds are constructed using concept lattice theory to automatically mine stable co-occurring candidate semantic primitives. First, a formal background K=(G,M,I) is constructed, where G is the set of disease text objects, M is the set of semantic fragment attributes, and I is the binary relation between objects and attributes, denoted as 1 for inclusion and 0 for exclusion. Some examples of formal backgrounds are shown in the table below.
[0016] G1 1 1 1 1 1 1 0 0 0 0 0 0 0 G2 1 1 1 0 0 0 0 0 0 0 0 0 0 G3 0 1 1 1 0 1 0 0 0 0 0 0 0 G4 0 0 0 0 0 0 0 0 1 1 1 0 0 G5 0 0 0 0 0 0 0 0 0 1 0 1 0 G6 0 0 0 0 0 0 0 0 0 1 0 0 1 G7 0 0 0 1 0 0 1 1 0 0 0 0 1
[0017] Then, the In-close4 batch processing algorithm is used to iteratively calculate all formal concepts based on the formal context. Each concept contains extension (a set of objects) and intension (a set of attributes). The key steps of the In-close4 algorithm for calculating formal concepts are as follows:
[0018] Step 1: Initialization
[0019] 1) Create a matrix. First, create a matrix to represent the relationships between objects and their properties, with the following formula: Where I(g,m) is the relational value between object g and attribute m, where 1 indicates inclusion and 0 indicates non-inclusion; g is any object in the formal context; and m is any attribute in the formal context.
[0020] 2) Initialize the concept. Start with the most general initial concept, with an extension that includes all attributes and an intension that is empty. The formula is: Where A0 is the extension of the initial concept, which is the set of all objects G; and B0 is the intension of the initial concept, which is an empty set.
[0021] 3) Set the iteration parameters. Iterate from the last attribute down to the first attribute, i.e., the formula: , where j is the index of the attribute being traversed; |M| is the total number of attributes in the attribute set.
[0022] Step 2: Iterative Calculation
[0023] 1) Traverse attributes. Start from the most general initial concept and traverse downwards to the most specific final concept. For each attribute, perform the following operations: (1) Skip already processed attributes. If an attribute is already included in the connotation of the current concept, skip that attribute, i.e., the formula is: , where m j B is the semantic fragment corresponding to the j-th attribute; B is the intension set of the current formal concept. (2) Forming a new extension. By performing an intersection operation between the extension of the current concept and the set of objects corresponding to the attribute, a new conceptual extension is formed, and the formula is: Where C is the extension of the newly generated concept; A is the extension of the current concept; m j It is the j-th attribute.
[0024] 2) Handling new extensions
[0025] (1) If it equals the extension of the current concept, it means that all objects have attributes. Therefore, the attributes are added to the intension of the current concept, i.e., the formula is: Where C is the new extension; A is the current extension; B new B is the updated meaning; B is the original meaning; m j It is the j-th attribute to be added with connotation.
[0026] (2) If C is not equal to the extension of the current concept, check if C is canonical (i.e., no other attributes can be merged with C to form a larger concept). If it is canonical, add C and j to the global queue for later processing.
[0027] Step 3: Process the global queue
[0028] 1) When the global queue is not empty, retrieve the sum from the queue, update it as the union of the intension and extension of the current concept, and update the extension of the current concept, i.e., the formula is: , Where D is the updated set of connotations; B is the original set of connotations; m j It is the j-th attribute; A new It is a new extension; B new This is a new connotation; C is the extension of what is taken out of the queue.
[0029] 2) Using `j` and `j-1` as the new initial concepts, `j-1` as the new attribute index, and the connotation of the current concept as the new parent concept attribute set, the formula is: Among them, j new `j` is the attribute index for the next iteration; `j` is the current attribute index.
[0030] Step 4: Recursive Construction
[0031] 1) Recursive subdivision of concepts. Through recursive calls, the algorithm continuously subdivides concepts until all attributes have been processed.
[0032] 2) Output Results. Output all results that satisfy the formal concept definition.
[0033] Based on the above steps and the output of the table above, the formal concepts are shown in the following table, where the object set is identified by numbers I1~I7, and O1~O2. 13 Identifier attribute set.
[0034] <![CDATA[C0]]> empty set <![CDATA[O1~O 13 ]]> <![CDATA[C7]]> <![CDATA[I1,I3,I7]]> <![CDATA[O4]]> <![CDATA[C1]]> <![CDATA[I1]]> <![CDATA[O1,O2,O3,O4,O5,O6]]> <![CDATA[C8]]> <![CDATA[I1,I2,I3]]> <![CDATA[O2,O3]]> <![CDATA[C2]]> <![CDATA[I4]]> <![CDATA[O9,O 10 ,THE 11 ]]> <![CDATA[C9]]> <![CDATA[I4,I5,I6]]> <![CDATA[O 10 ]]> <![CDATA[C3]]> <![CDATA[I5]]> <![CDATA[O 10 ,THE 12 ]]> <![CDATA[C 10 ]]> <![CDATA[I1,I3]]> <![CDATA[O2,O3,O4,O6]]> <![CDATA[C4]]> <![CDATA[I6]]> <![CDATA[O 10 ,THE 13 ]]> <![CDATA[C 11 ]]> <![CDATA[I6,I7]]> <![CDATA[O 13 ]]> <![CDATA[C5]]> <![CDATA[I7]]> <![CDATA[O4,O7,O8,O 13 ]]> <![CDATA[C 12 ]]> <![CDATA[I1~I7]]> empty set <![CDATA[C6]]> <![CDATA[I1,I2]]> <![CDATA[O1,O2,O3]]> — — —
[0035] Finally, in the formal concepts extracted using the In-close4 algorithm, the extensional size reflects co-occurrence stability; the larger the size, the stronger the co-occurrence stability. Based on this, a rigorous screening method is formulated according to the extensional and intensional sizes of the concepts: ,in, It represents the number of objects within the extension; This refers to the number of attributes within the connotation. Based on the above screening method formula, a preliminary classification of core candidate semantic primitives and common candidate semantic primitives is obtained. Some results are as follows: Core candidate semantic primitives: chills, whole body, low-grade fever, mental state, high fever, coma; Common candidate semantic primitives: laryngeal nucleus, Shaoyin, Taiyin, pancreas, lumbosacral region, breast.
[0036] Optimization of core candidate semantic units requires compound decomposition, semantic merging, and general alignment to ensure the atomicity and standardization of semantic units. Compound semantic unit decomposition: First, definitions of compound candidate semantic units are obtained based on the "Terminology of Traditional Chinese Medicine" and "Basic Theoretical Terminology of Traditional Chinese Medicine." Then, word segmentation tools are used to segment the definitions, extracting the most core meaning as candidate semantic units. Manual verification ensures that the decomposition results meet the "smallest semantic unit" requirement. Examples of compound semantic unit decomposition are shown in the table below.
[0037] Chills Feeling cold and taking measures to keep warm, even with extra clothing and blankets, the feeling of coldness cannot be relieved. Fear, cold mind The spirit residing in the heart. Heart, Zang, Shen Confusion The person is confused, unconscious, or even in a coma and unresponsive. Consciousness, confusion Yin Jin Yin fluids. Yin, body fluids Night sweats Sweating occurs after falling asleep and disappears upon waking. Sleep, sweat, wake up, disappear high fever Fever, high temperature. Fever, temperature, high
[0038] Semantic Similarity Primitive Merging: When merging candidate primitives based on similarity, it is first necessary to convert each candidate primitive into a numerical form that can be processed by a computer. This section utilizes the ZY-BERT model to extract the semantic vector representation of the candidate primitives. The average hidden state value of the tokens corresponding to the words in the last hidden state layer of the model is taken as the vector representation of the candidate primitive. Compared to directly using vectors, this method focuses more on the semantics of the words themselves, and is especially suitable for fine-grained semantic representation of single-character or multi-character words. The formula for calculating the semantic vector of candidate primitives is as follows: ,in, It is the semantic vector of the semantic primitive w, with a dimension of 768. It is the number of sub-words corresponding to the semantic primitive w; Let be the hidden state vector of the i-th subword token of semantic primitive w in the last layer of the model. Based on the extracted semantic primitive vectors, cosine similarity is used to measure the semantic association between pairs of semantic primitives. The cosine similarity value is between [0,1], and the larger the value, the higher the semantic similarity between semantic primitives. Cosine similarity calculation between semantic primitives: ,in, It is the origin of meaning Yoshihara Cosine similarity; It is the origin of meaning semantic vector; It is the origin of meaning semantic vector; It is the origin of meaning The magnitude of the semantic vector; It is the origin of meaning The magnitude of the semantic vector.
[0039] For each pair of identifiable semantic primitives, cosine similarity is calculated to obtain the semantic similarity matrix of the semantic primitives. , where n is the number of identifiable sememes, and the matrix elements are the similarity values of the corresponding sememe pairs. Based on the similarity matrix, a threshold-based unsupervised grouping method is adopted to merge highly similar sememes, which avoids the subjective bias introduced by manually specifying core words, and only clusters sememes with high semantic similarity into the same group, ensuring that each sememe belongs to only one group. After automatic grouping and manual verification, the final core sememe combination set is obtained, as follows: body / human body / body; like / preference; suddenly / abruptly / sudden; damage / damaged / injury / injure / consume and injure;
[0040] HowNet Sememe Alignment: To measure the semantic similarity between traditional Chinese medicine sememe groups and HowNet sememes, it is necessary to map the two to a unified semantic vector space. In this study, the ZY-BERT model is used to extract the semantic vectors of the two respectively, and the extraction of HowNet sememe vectors refers to the formula for the calculation method: input the HowNet sememes into the ZY-BERT model to extract their semantic vectors; for each traditional Chinese medicine sememe group, the average value of the semantic vectors of all sememes in the group is taken as the overall semantic vector of the sememe group, as shown in the following formula, to ensure that the overall semantic features of the sememe group are fully captured. , where V group is the overall semantic vector of the traditional Chinese medicine sememe group, with a dimension of 768; is the number of sememes in the traditional Chinese medicine sememe group that can successfully extract semantic vectors. The semantic similarity between the traditional Chinese medicine sememe group and the HowNet sememe is measured by cosine similarity, and the similarity value ranges between [0,1], with a larger value indicating closer semantics; this study adopts a matching strategy of threshold filtering + descending sorting, and the specific process is: traverse all HowNet sememes and extract their semantic vectors, filter out the sememes that cannot extract vectors to establish a mapping dictionary of "HowNet sememes and semantic vectors", then calculate the overall semantic vector for each traditional Chinese medicine sememe group, calculate the cosine similarity with all HowNet sememe vectors one by one, screen out the HowNet sememes with similarity not lower than the preset threshold as the matching candidate set, sort the sememes in the candidate set in descending order of similarity and take the first-ranked one as the preliminary alignment result, and mark those with no similarity reaching the threshold as unmatched groups. After the alignment is completed, a matching result in the form of "traditional Chinese medicine sememe group to HowNet sememe list" is obtained, as shown in the following table.
[0041] fatigue / weakness / weariness fatigue Reasonable matching body / human body body Reasonable matching Pain / ache / ache pain Reasonable matching Limbs / limbs / limbs limb Reasonable matching Intrusion / Invasion / Entry Enter Reasonable matching wet damp Artificial completion (marked as dampness). cold Cold and heat Artificial completion (marked as cold evil) spasm No match Specific meanings of traditional Chinese medicine
[0042] Classify and process low-frequency common candidate sememes to balance the simplicity of the knowledge base and full semantic coverage. For rare sememes of body part type, they are directly retained to ensure that key disease location information is not lost; for low-frequency concepts that can be expressed in combination, they are not retained independently, and are represented by core sememe combinations, specific examples are shown in Figure 4As shown. Finally, the core semantic primitives and the processed ordinary semantic primitives are integrated and optimized to output the final standardized set of TCM disease semantic primitives, which consists of 671 minimum semantic units, of which 311 are aligned with HowNet and 350 are unique to TCM.
Claims
1. A method for obtaining the original meaning of traditional Chinese medicine using concept lattice, characterized in that, Includes the following steps: (S1) Data source and preprocessing: Using authoritative TCM disease terminology standards as the data source, the disease text is cleaned, adapted to the domain, segmented and deduplicated to extract high-quality semantic fragments; (S2) Formal context construction and candidate semantic primitive mining: construct the formal context of diseases and semantic fragments, use the In-close4 algorithm to calculate formal concepts, and select stable co-occurring core candidate semantic primitives and ordinary candidate semantic primitives based on the extension and intension scale to filter out false semantic primitives from the source; (S3) Core candidate semantic primitive optimization: The candidate semantic primitives are sequentially subjected to automatic splitting of compound concepts, synonym merging based on ZY-BERT semantic similarity, and automatic alignment with HowNet general semantic primitives to ensure the atomicity, standardization and generality of the semantic primitives. (S4) Differentiation of common candidate semantic primitives: In accordance with the principle of "full semantic coverage + composability", rare low-frequency semantic primitives of body parts are retained, and composable low-frequency concepts are represented by core semantic primitives. This simplifies the semantic primitive library without losing professional semantics. (S5) Output of the set of semantic origins: The core semantic origins after integration and optimization and the ordinary candidate semantic origins after processing are combined to form the final standardized set of TCM semantic origins.
2. The method for obtaining the original meaning of traditional Chinese medicine using concept lattice as described in claim 1, characterized in that: In S1, TCM disease information is formalized as a knowledge triple NAME=(ID,W,C), where ID, W, and C represent the disease classifier, disease name, and clinical manifestation, respectively. Data preprocessing requires the following operations: Text cleaning: This requires removing function words, punctuation marks, numbers, and special characters while retaining the core semantic content of traditional Chinese medicine. Domain-adaptive word segmentation: Optimize word segmentation rules based on TCM expertise to avoid incorrect segmentation of complex concepts such as "spleen deficiency" and "qi stagnation and blood stasis"; Manual verification and deduplication: Remove meaningless words, correct word segmentation errors, remove duplicate semantic fragments, and form a candidate attribute set.
3. The method for obtaining the original meaning of traditional Chinese medicine using concept lattice as described in claim 1, characterized in that: In S2, based on the data processed in S1, a formal context is constructed using concept lattice theory to automatically mine candidate semantic primitives that co-occur stably. First, a formal context K=(G,M,I) is constructed, where G is the set of disease text objects, M is the set of semantic fragment attributes, and I is the binary relation between objects and attributes, denoted as 1 for inclusion and 0 for exclusion. Then, the In-close4 batch processing algorithm is used to iteratively calculate all formal concepts based on the formal context. Each concept includes extension (set of objects) and intension (set of attributes). The key steps of the In-close4 algorithm for formal concept calculation are as follows: Step 1: Initialization 1) Create a matrix First, create a matrix to represent the relationships between objects and properties, with the following formula: , Where I(g,m) is the relational value between object g and attribute m, where 1 indicates inclusion and 0 indicates non-inclusion; g is any object in the formal context; and m is any attribute in the formal context. 2) Initialize the concept. Start with the most general initial concept, with an extension that includes all attributes and an intension that is empty. The formula is: , Where A0 is the extension of the initial concept, which is the set of all objects G; B0 is the intension of the initial concept, which is an empty set. 3) Set the iteration parameters. Iterate from the last attribute down to the first attribute, i.e., the formula: , Where j is the index of the attribute being traversed; |M| is the total number of attributes in the attribute set; Step 2: Iterative Calculation 1) Traverse the properties. Start with the most general initial concept and traverse downwards to the most specific final concept. For each property, perform the following operations: (1) Skip already processed attributes. If an attribute is already included in the current concept, skip that attribute, i.e., the formula is: , Where, m j B is the semantic fragment corresponding to the j-th attribute; B is the set of connotations of the current formal concept. (2) Forming a new extension. A new conceptual extension is formed by intersecting the extension of the current concept with the set of objects corresponding to the attribute. The formula is as follows: , Where C is the extension of the newly generated concept; A is the extension of the current concept; m j It is the j-th attribute; 2) Handling new extensions (1) If it equals the extension of the current concept, it means that all objects have attributes. Therefore, the attributes are added to the intension of the current concept, i.e., the formula is: , Where C is the new extension; A is the current extension; B new B is the updated meaning; B is the original meaning; m j It is the j-th attribute to be added with connotation; (2) If C is not equal to the extension of the current concept, check if C is canonical. If it is canonical, add C and j to the global queue for later processing; Step 3: Process the global queue 1) When the global queue is not empty, retrieve the sum from the queue, update it as the union of the intension and extension of the current concept, and update the extension of the current concept, i.e., the formula is: , , Where D is the updated set of connotations; B is the original set of connotations; m j It is the j-th attribute; A new It is a new extension; B new It's a new connotation; C is the extension of what is taken from the queue; 2) Using `j` and `j-1` as the new initial concepts, `j-1` as the new attribute index, and the connotation of the current concept as the new set of attributes for the parent concept, the formula is: , Where, j new `j` is the attribute index for the next iteration; `j` is the current attribute index. Step 4: Recursive Construction 1) Recursive concept subdivision. Through recursive calls, the algorithm continuously subdivides concepts until all attributes have been processed; 2) Output Results. Output all results that satisfy the formal definition; Finally, in the formal concepts extracted using the In-close4 algorithm, the extensional size reflects co-occurrence stability; the larger the size, the stronger the co-occurrence stability. Based on this, a rigorous screening method is formulated according to the extensional and intensional sizes of the concepts: , in, It represents the number of objects within the extension; It refers to the number of attributes within the connotation.
4. The method for obtaining the original meaning of traditional Chinese medicine using concept lattice as described in claim 1, characterized in that: In S3, the core candidate semantic primitives obtained in S2 need to be compounded, semantically merged, and generally aligned to ensure the atomicity and standardization of semantic primitives. Compound semantic decomposition: Based on the authoritative interpretation of TCM terminology, compound concepts are decomposed into the smallest indivisible semantic units; Semantic Similarity Primitive Merging: When merging candidate primitives based on similarity, it is first necessary to convert each candidate primitive into a numerical form that can be processed by a computer. This section utilizes the ZY-BERT model to extract the semantic vector representation of the candidate primitives. The average hidden state value of the tokens corresponding to the words in the last hidden state layer of the model is taken as the vector representation of the candidate primitive. Compared to directly using vectors, this method focuses more on the semantics of the words themselves, and is especially suitable for fine-grained semantic representation of single-character or multi-character words. The formula for calculating the semantic vector of candidate primitives is as follows: , in, It is the semantic vector of the semantic primitive w, with a dimension of 768. It is the number of sub-words corresponding to the semantic primitive w; It is the hidden state vector of the i-th sub-word token of the semantic primitive w in the last layer of the model; Based on the extracted semantic primitives, cosine similarity is used to measure the semantic association between pairs of primitives. The cosine similarity value ranges from [0,1], with a higher value indicating a higher semantic similarity between primitives. Cosine similarity calculation between primitives: , in, It is the origin of meaning Yoshihara Cosine similarity; It is the origin of meaning semantic vector; It is the origin of meaning semantic vector; It is the origin of meaning The magnitude of the semantic vector; It is the origin of meaning The magnitude of the semantic vector; For each pair of identifiable semantic primitives, cosine similarity is calculated to obtain the semantic similarity matrix of the semantic primitives. , where n is the number of identifiable semantic primitives, and the matrix elements are the similarity values of corresponding semantic primitive pairs; Based on the similarity matrix, a threshold-based unsupervised grouping method is used to merge highly similar semantic primitives. This avoids subjective bias introduced by manually specifying core words, and only semantically highly similar semantic primitives are clustered into the same group, ensuring that each semantic primitive belongs to only one group. After automatic grouping and manual verification, the final set of core semantic primitive combinations is obtained. HowNet semantic primitive alignment: To measure the semantic similarity between the TCM semantic primitive group and the HowNet semantic primitives, it is necessary to map them to a unified semantic vector space. This study uses the ZY-BERT model to extract the semantic vectors of the two respectively. The HowNet semantic primitives are input into the ZY-BERT model to extract their semantic vectors. For each TCM semantic primitive group, the average value of the semantic vectors of all semantic primitives in the group is taken as the overall semantic vector of the semantic primitive group, as shown in the following formula, to ensure that the overall semantic features of the semantic primitive group are fully captured. , Among them, V group It is the overall semantic vector of the TCM Yiyuan group, with a dimension of 768. It is the number of semantic primitives within the TCM semantic primitive group that can successfully extract semantic vectors; It is the semantic vector of the j-th semantic primitive within the TCM semantic primitive group; The semantic similarity between TCM semantic primitives and HowNet semantic primitives is measured using cosine similarity, with similarity values ranging from [0,1], and higher values indicating closer semantic similarity. This study employs a threshold-based filtering and descending-order sorting matching strategy. The specific process is as follows: all HowNet semantic primitives are traversed and their semantic vectors are extracted. Semantic primitives from which no vectors can be extracted are filtered to establish a mapping dictionary of "HowNet semantic primitives and semantic vectors". Then, the overall semantic vector of each TCM semantic primitive group is calculated, and its cosine similarity is calculated with each HowNet semantic primitive vector. HowNet semantic primitives with similarity values not lower than a preset threshold are selected as matching candidate sets. The semantic primitives in the candidate set are sorted in descending order of similarity, and the top-ranked one is taken as the initial alignment result. Groups that do not meet the threshold are marked as unmatched. After alignment, a matching result in the form of "TCM semantic primitive group to HowNet semantic primitive list" is obtained.
5. The method for obtaining the original meaning of traditional Chinese medicine using concept lattice as described in claim 1, characterized in that: In S4, low-frequency common candidate semantic primitives are classified and processed to balance the simplicity of the knowledge base with full semantic coverage. Rare semantic primitives in the category of body parts are directly retained to ensure that key pathological information is not lost; for low-frequency concepts that can be combined to express meaning, they are not retained independently, but are represented by a combination of core semantic primitives.
6. The method for obtaining the original meaning of traditional Chinese medicine using concept lattice as described in claim 1, characterized in that: In S5, the core semantic primitives after integration and optimization and the ordinary semantic primitives after processing are combined to output the final standardized set of TCM disease semantic primitives, which consists of 671 minimum semantic units, of which 311 are aligned with HowNet and 350 are unique to TCM.