Retrieval enhancement method and system based on structure entropy hierarchical knowledge tree
Through the retrieval enhancement method based on the structural entropy level knowledge tree, the problem that it is difficult to generate high -quality answers in across theme global issues in across themes, and realize the efficient inquiries and information extraction of large -scale data, enhance user experience and information Supporting accuracy.
Patent Information
- Application Number
- CN202411485330.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-10-23
AI Technical Summary
Traditional search-enhanced generation methods are difficult to effectively generate high-quality answers when facing global problems across topics, especially when leapfrog summary of multiple documents and different fields is required.
Adopt a retrieval enhancement method based on structural entropy hierarchy, constructing text and image data through large language models, using layered cluster algorithms to generate multi-level community structures, and build hierarchical intellectual trees. Local answers generate the final answer.
Effectively handle global and local queries in large -scale data sets, quickly locate related topics and extract key information, improve the organization and retrieval efficiency of information, improve user experience, and provide timely and accurate support for doctors and researchers.
Smart Images

Figure CN119381009A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of electrical data processing technology, and in particular to a retrieval enhancement method and system based on a structural entropy hierarchical knowledge tree. Background Art
[0002] In the field of modern medical technology, medical image processing technology can help doctors better understand the physiological state of patients, help to timely discover and diagnose various diseases, and has important clinical value and practical significance. This problem is particularly prominent in the early diagnosis of cancer and patient consultation. Doctors and patients often face the inability to accurately judge the stage of cancer development and condition, which may lead to missing the best time for treatment and seriously endanger the patient's life, health and safety. Therefore, it is particularly important to improve the quality of extraction and generation of medical information.
[0003] At present, the Retrieval-Augmented Generation (RAG) method can extract information and generate answers from large-scale document sets by combining information retrieval and natural language generation. It can quickly extract medical information related to the disease to help doctors and patients accurately judge the condition.
[0004] However, when faced with global problems across topics, traditional RAG methods have obvious limitations. Especially when it is necessary to summarize across multiple documents and different fields, existing methods are difficult to effectively generate high-quality answers, resulting in inefficient information integration and knowledge extraction. Summary of the invention
[0005] In order to overcome the above technical defects, the embodiments of the present application provide a retrieval enhancement method and system based on a structural entropy hierarchical knowledge tree.
[0006] In a first aspect, an embodiment of the present application provides a retrieval enhancement method based on a structural entropy hierarchical knowledge tree, comprising the following steps:
[0007] S1. Data collection and preprocessing:
[0008] Taking esophageal cancer as the data collection direction, we collected original text data and original medical imaging data related to esophageal cancer, and preprocessed the collected data to obtain text data sets and image data sets;
[0009] S2. Hierarchical knowledge tree construction:
[0010] The large language model (LLM) is used to construct graphs for text datasets and image datasets to obtain corresponding graph structures. The hierarchical clustering HCSE algorithm based on structural entropy is used to directly generate multi-level community structures from the obtained graph structures and construct a hierarchical knowledge tree.
[0011] S3. Community summary generation:
[0012] The large language model (LLM) is used to analyze the node degree and community density of each community in the hierarchical knowledge tree to generate the corresponding community summary and sort it according to information priority, so as to quickly obtain important data;
[0013] S4. Query processing and answer generation:
[0014] When a query request for esophageal cancer diagnosis is received, the community summary in the hierarchical knowledge tree is combined to perform hierarchical retrieval in the order of top-level community-middle-level community-bottom-level community to generate local answers, and all local answers are integrated through Map-Reduce to generate the final answer.
[0015] Optionally, in a possible implementation of the first aspect,
[0016] The graph structure constructed using the text dataset may be a document graph, in which the extracted entities are used as nodes, the relationships between the entities are used as edges, and the covariates related to the diagnosis of esophageal cancer are used as node information of the entities;
[0017] Entities include symptoms, patient characteristics, and clinical trial information; covariates include statements, attributes, and time spans. Statements are used to describe specific statements or opinions related to entities, attributes are used to represent specific characteristics of entities, and time spans are used to represent the time patients receive treatment or disease progression.
[0018] Optionally, in a possible implementation of the first aspect,
[0019] The graph structure constructed using image data can be an interaction graph, which is constructed by jointly maximizing the structural entropy and minimizing the relative entropy between the generated weights and the original weight distribution. The generated weights are the weights of the interaction graph generated from the complete graph of the image, and the original weights are the weights of the interaction graph used in practice.
[0020] Optionally, in a possible implementation of the first aspect,
[0021] The multi-layered community structure includes top-layer communities, middle-layer communities, and bottom-layer communities, and the middle-layer community has at least two layers;
[0022] The top-level community is the main topic in the field of esophageal cancer, which generates a community with document-level granularity; the middle-level community is a sub-community with entity-level granularity generated by recursively dividing the top-level community through the HCSE algorithm; the bottom-level community is a sub-community with feature-level granularity generated by the HCSE algorithm for the middle-level community.
[0023] Optionally, in a possible implementation of the first aspect,
[0024] The hierarchical knowledge tree includes root nodes, intermediate nodes and leaf nodes;
[0025] The root node represents the entire medical document collection, symbolizing the overall research field of esophageal cancer, and contains all relevant documents and information; the intermediate nodes subdivide the topics under the root node, dividing them into various important topics and subtopics; the leaf nodes correspond to specific documents, cases or related studies in the underlying community, providing detailed information and data.
[0026] Optionally, in a possible implementation of the first aspect,
[0027] The community summary is a general summary of the information related to esophageal cancer diagnosis contained in each community. The node degree is the number of edges connected to the node, and the community density is the strength of the relationship between entities. The information priority is positively correlated with the node degree and community density.
[0028] Optionally, in a possible implementation of the first aspect,
[0029] The Map-Reduce method includes two stages: Map and Reduce;
[0030] Integrate all local answers through Map-Reduce, including:
[0031] In the Map stage, each partial answer is scored for relevance and helpfulness, and finally a comprehensive score is obtained. The relevance score is used to evaluate the overlap between the keywords in the partial answer and the query keywords, and the helpfulness score is used to evaluate the effectiveness in solving user problems or providing useful information.
[0032] In the Reduce stage, the best local answer is selected as the final answer based on the comprehensive score.
[0033] Optionally, in a possible implementation of the first aspect,
[0034] The original text data include: electronic medical records (EMR), laboratory test results, medical literature, pathology reports, patients’ clinical symptoms and treatment records;
[0035] The original medical imaging data include CT images, MRI images and endoscopic images.
[0036] Optionally, in a possible implementation of the first aspect,
[0037] Data preprocessing includes processing of original text data and original image data;
[0038] The processing of the original text data specifically includes: cleaning the original text data, and standardizing and normalizing the cleaned data to obtain a standardized and normalized text data set;
[0039] The processing of the original image data specifically includes: adjusting the size, direction, brightness and contrast of the original image data and adding noise to enhance the diversity of the image data, and using the correlation coefficient to select features, and using the selected features to combine features to obtain new features, thereby forming an image data set;
[0040] The correlation coefficient is specifically a coefficient that characterizes the correlation between the patient's physiological characteristics and the incidence of esophageal cancer; the new feature obtained by the feature combination is a feature that can better reflect the patient's overall health status compared with the selected feature.
[0041] In the second aspect, an embodiment of the present application provides a retrieval enhancement system based on a structural entropy hierarchical knowledge tree, characterized in that the retrieval enhancement system is used to execute the retrieval enhancement method described in any one of the first aspect and its implementation methods above.
[0042] The above technical solution adopted in the embodiment of the present application can achieve the following technical effects: based on the large language model LLM combined with the hierarchical clustering HCSE algorithm and Map-Reduce answer generation, global and local queries in large-scale data sets can be effectively processed; through the hierarchical knowledge tree, relevant topics can be quickly located and key information can be extracted from them, and information can be clearly organized and displayed, so that users can quickly find the required answers in a complex information environment. At the same time, when querying, users can obtain high-quality natural language answers when querying information at different levels, whether it is a broad field overview or specific detailed data. The design of the hierarchical knowledge tree makes the organization and retrieval of information more efficient and improves the user experience. Through the effective integration of medical literature and clinical cases, the system can provide timely and accurate support for doctors and researchers. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0044] Figure 1 A schematic diagram of a flow chart of a retrieval enhancement method based on a structural entropy hierarchical knowledge tree in this application;
[0045] Figure 2 A schematic diagram of the system structure of a retrieval enhancement system based on a structural entropy hierarchical knowledge tree in this application;
[0046] Figure 3 A hardware structure diagram of a computer device in this application. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0048] It should be noted that the descriptions involving "first", "second", etc. in the embodiments of the present application are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0049] In the description of the present application, it should be understood that the numerical labels before the steps do not indicate the order in which the steps are executed, but are only used to facilitate the description of the present application and to distinguish each step, and therefore should not be understood as a limitation on the present application.
[0050] First, the following terms are explained:
[0051] 1. Retrieval Enhancement Generates RAG
[0052] RAG is a natural language processing technology that combines retrieval and generation. Its core idea is to first retrieve relevant information and then use the generative model to generate answers, thereby improving the quality and accuracy of text generation.
[0053] Specifically, RAG first retrieves information related to the input query from a large knowledge base or document collection. Given a query q, it obtains relevant documents D from the knowledge base K through the retrieval model R.
[0054] D=R(q,K)
[0055] Among them, D is the retrieved document set and R is the retrieval algorithm.
[0056] Using a search algorithm, the document fragment most relevant to the user's question is found. Next, the retrieved information will be combined with the user's input for use by a generation model (such as GPT, etc.), thus generating a richer and contextually relevant answer. The advantage of RAG is that it can dynamically retrieve the latest information and does not solely rely on the knowledge learned by the model during training. This method helps improve the accuracy and relevance of the generated content as it can utilize external information sources to supplement the model's knowledge. Additionally, RAG can generate diverse answers to adapt to different context requirements, so it performs well in areas such as question-and-answer systems, dialogue generation, and information summarization. This method effectively addresses the limitations that traditional generation models may encounter when dealing with specific knowledge.
[0057] 2. Structural Entropy
[0058] Structural entropy is a concept used to measure the complexity and information content of a system or structure, and is commonly applied in fields such as network science and information theory. Intuitively, the structural entropy method encodes a tree structure by characterizing the uncertainty of the hierarchical topology. The structural entropy of graph G is defined as the total minimum number of bits required to determine the encoding words of the nodes in G. Structural entropy has achieved success in areas such as information retrieval, traffic prediction, and reinforcement learning. By minimizing the structural entropy of a given graph G, the hierarchical clustering results of the vertices in G are retained by the associated encoding tree.
[0059] Encoding Tree: Let G = (V, E, W) be an undirected weighted graph, where V = {v1,..., v n} is the set of vertices, E is the set of edges, and W ∈ R n*n is the edge weight matrix.
[0060] The encoding tree T of graph G is defined as a hierarchical rooted tree as follows:
[0061] For each tree node α ∈ T, a subset of vertices T α ∈ V is associated with it.
[0062] 1. The root node λ of the tree is associated with the set of vertices V, i.e., T γ = V.
[0063] 2. For each α ∈ T, its direct successors are labeled as α^, increasing by i from left to right, and the direct predecessor is labeled as α - .
[0064] 3. For each α ∈ T with L direct successors, the subset of vertices T α^ are disjoint and
[0065] 4. For each leaf node v∈T, Y v Contains only one vertex in V.
[0066] K-dimensional structural entropy: Given any root coding tree T of a graph G, the structural entropy of G on T measures the remaining complexity in G after being reduced by T. For each non-root node α∈T, its assigned structural entropy is defined as:
[0067]
[0068] where g α is the tangent point, that is, at T α Neutralization is not in T α The weights of the edges between the nodes in V α and V C is the volume, i.e. T α and the sum of the degrees of the nodes in G.
[0069] The structural entropy of G given T is defined as:
[0070]
[0071] In order to meet the requirements of downstream applications, the K-dimensional structural entropy of G is defined as:
[0072]
[0073] Where T takes values in all coding trees whose height does not exceed K.
[0074] Structural entropy is introduced to quantify the internal information and organization of complex structures. It can be regarded as a measure of the relationship between the components in the system.
[0075] 3. Hierarchical Clustering Algorithm
[0076] Hierarchical clustering algorithm is a method to organize data into a hierarchical structure, which is often used to explore the relationship between data. It can be divided into two types: agglomerative (bottom-up) and divisive (top-down). Agglomerative clustering starts from each data point, treats each point as an independent cluster, calculates the distance between all clusters, and gradually merges the two closest clusters until all data points are merged into one cluster or the predetermined number of clusters is reached. The distance calculation during the merging process can be expressed as:
[0077]
[0078] Among them C i and C j Represents two clusters to be merged, a and b represent cluster C i and C j d(a, b) represents the distance between data points a and b, usually measured using metrics such as Euclidean distance or Manhattan distance.
[0079] The split type starts with an overall cluster and gradually splits it into smaller sub-clusters. The judgment of splitting can be based on the internal closeness or external separation of the clusters.
[0080] Assume that the internal distance of cluster C is D in (C) and the external distance is D out (C), the splitting criteria can be expressed by the following formula:
[0081]
[0082] The main steps of the algorithm include calculating the distance matrix, initializing clusters, merging clusters, and generating a dendrogram. The distance matrix uses an appropriate distance metric to calculate the distance between each pair of data points. In the merging process, common merging strategies include single linkage (shortest distance), full linkage (longest distance), and average distance. The advantage of hierarchical clustering lies in its visualization ability and flexibility, which enables users to select the appropriate number of clusters based on the dendrogram. Hierarchical clustering is widely used in fields such as bioinformatics and text clustering to help users deeply understand the structure and relationship of data.
[0083] This application aims to effectively construct a multi-level community structure by combining the hierarchical clustering HCSE algorithm with RAG. This method can refine information layer by layer from global to local, significantly improving the accuracy and generation efficiency of answers. The hierarchical clustering algorithm can not only identify potential associations between data, but also extract key information at different levels, thereby providing doctors with more accurate and comprehensive diagnostic support.
[0084] Through this innovative method, doctors can better understand the patient's condition, quickly obtain the latest research results and treatment plans related to cancer, and make more accurate judgments. This intelligent information processing method not only improves the efficiency of medical services, but also provides more reliable guarantees for early diagnosis and treatment of patients, ultimately helping to improve patients' prognosis and quality of life.
[0085] The following is a description of the search enhancement generation method based on the structural entropy hierarchical knowledge tree in the embodiment of the present application in conjunction with the accompanying drawings, as follows:
[0086] Embodiment 1
[0087] Taking the field of esophageal cancer medical research as an example, the retrieval enhancement generation method based on the structural entropy hierarchical knowledge tree in this application is described, specifically including:
[0088] S1. Data collection and preprocessing:
[0089] Taking esophageal cancer as the data collection direction, original text data and original medical imaging data related to esophageal cancer are collected, and the collected data are preprocessed to obtain text datasets and image datasets.
[0090] Specifically, the original text data includes: electronic medical records (EMR), laboratory test results, medical literature, pathology reports, patients' clinical symptoms and treatment records. The original medical imaging data includes CT images, MRI images, and endoscopic images.
[0091] The above data preprocessing includes the processing of original text data and original image data, specifically:
[0092] The processing of the original text data specifically includes: cleaning the original text data, and standardizing and normalizing the cleaned data to obtain a standardized and normalized text data set;
[0093] The processing of the original image data specifically includes: adjusting the size, direction, brightness and contrast of the original image data and adding noise to enhance the diversity of the image data, using correlation coefficients for feature selection, and using the selected features for feature combination to obtain new features, thereby forming an image data set.
[0094] Specifically, the above correlation coefficient may be a coefficient that characterizes the correlation between the patient's physiological characteristics and the incidence of esophageal cancer; the above new feature may be a feature that can better reflect the patient's overall health status compared with the selected feature.
[0095] S2. Hierarchical knowledge tree construction:
[0096] The large language model (LLM) is used to construct graphs for text datasets and image datasets to obtain the corresponding graph structures. The hierarchical clustering HCSE algorithm based on structural entropy is used to directly generate a multi-level community structure from the obtained graph structure and construct a hierarchical knowledge tree.
[0097] The graph structure constructed using the text dataset can be a document graph. In the document graph, the extracted entities are used as nodes, the relationships between entities are used as edges, and the covariates related to the diagnosis of esophageal cancer are used as the node information of the entities. Specifically, entities include symptoms, patient characteristics, and clinical trial information, etc.; covariates include statements, attributes, and time spans, where statements are used to describe specific statements or opinions related to entities, attributes are used to represent specific characteristics of entities, and time spans are used to represent the time when patients receive treatment or disease progression.
[0098] Similarly, the graph structure constructed using image data can be an interaction graph. The interaction graph is constructed by jointly maximizing the structural entropy and minimizing the relative entropy between the generated weights and the original weight distribution, where the generated weights are the weights of the interaction graph generated from the complete graph of the image, and the original weights are the weights of the interaction graph used in practice.
[0099] The above multi-level community structure includes top-level communities, middle-level communities and bottom-level communities. The middle-level communities have at least two levels. The top-level community is the main topic in the field of esophageal cancer, generating communities with document-level granularity, such as the cause, clinical symptoms, diagnostic methods and treatment strategies of esophageal cancer; the middle-level community is a sub-community with entity-level granularity generated by recursively dividing the top-level community through the HCSE algorithm; the bottom-level community is a sub-community with feature-level granularity generated by the HCSE algorithm for the middle-level community.
[0100] The above hierarchical knowledge tree includes root nodes, intermediate nodes and leaf nodes. The root node represents the entire medical document collection, symbolizing the overall research field of esophageal cancer, and contains all relevant documents and information; the intermediate nodes subdivide the topics under the root node, dividing various important topics and subtopics; the leaf nodes correspond to specific documents, cases or related studies in the underlying community, providing detailed information and data.
[0101] S3. Community summary generation:
[0102] The large language model (LLM) is used to analyze the node degree and community density of each community in the hierarchical knowledge tree to generate the corresponding community summary and sort it according to information priority so as to quickly obtain important data.
[0103] Specifically, the community summary is a general summary of the information related to esophageal cancer diagnosis contained in each community, the node degree is the number of edges connected to the node, the community density is the strength of the relationship between entities, and the information priority is positively correlated with the node degree and community density.
[0104] S4. Query processing and answer generation:
[0105] When a query request for esophageal cancer diagnosis is received, the community summary in the hierarchical knowledge tree is combined to perform hierarchical retrieval in the order of top-level community-middle-level community-bottom-level community to generate local answers, and all local answers are integrated through Map-Reduce to generate the final answer.
[0106] Specifically, the Map-Reduce method includes two stages, Map and Reduce. Furthermore, all local answers are integrated through the Map-Reduce method, including: 1) In the Map stage, each local answer is scored for relevance and helpfulness, and finally a comprehensive score is obtained, where the relevance score is used to evaluate the overlap between the keywords in the local answer and the query keywords, and the helpfulness score is used to evaluate the effectiveness in solving user problems or providing useful information; 2) In the Reduce stage, the best local answer is selected as the final answer based on the comprehensive score.
[0107] In the embodiment of the present application, based on the large language model LLM combined with the hierarchical clustering HCSE algorithm and Map-Reduce answer generation, global and local queries in large-scale data sets are effectively processed; through the hierarchical knowledge tree, relevant topics can be quickly located and key information can be extracted from them, and information can be clearly organized and displayed, so that users can quickly find the required answers in a complex information environment. At the same time, when querying, users can obtain high-quality natural language answers when querying information at different levels, whether it is a broad field overview or specific detailed data. The design of the hierarchical knowledge tree makes the organization and retrieval of information more efficient and improves the user experience. Through the effective integration of medical literature and clinical cases, the system can provide timely and accurate support for doctors and researchers.
[0108] Embodiment 2
[0109] The technical scheme for data collection and preprocessing in S1 is described in detail below:
[0110] S1.1 Data Collection
[0111] The data collection link is a crucial step. In the training of this model, esophageal cancer is used as the direction of data collection. Through manual review, we ensure that high-quality and diverse data are collected to support the learning and reasoning capabilities of the model. First, through relevant websites or cooperative hospitals, under the protection of patient privacy, information about esophageal cancer cases is collected. This process includes selecting cooperative hospitals and research institutions with rich medical data to ensure the authority and reliability of the data source. At the same time, existing medical databases and online platforms such as PubMed and ClinicalTrials.gov are used to obtain public case and research data. Secondly, during the collection process, ensure that data from multiple modalities are covered, including but not limited to medical images (such as CT, MRI, endoscopic images), electronic medical records (EMR), laboratory test results, pathology reports, and patients' clinical symptoms and treatment records. These different types of data will provide a comprehensive perspective for the model.
[0112] S1.2 Data Preprocessing
[0113] Data preprocessing is a key step to ensure model performance, covering several important aspects: 1. Text data cleaning, 2. Data annotation and normalization, 3. Medical image data preprocessing, 4. Feature engineering. The specific processing is as follows:
[0114] 1. Text data cleaning:
[0115] First, input the original text data set (such as electronic medical records and pathology reports). In the data set, duplicate records will cause model overfitting and deviation. By deduplicating the data, ensure that each sample is unique, thereby improving the training effect of the model. Spelling errors, inconsistent formats, or other inaccurate entries often appear in text data. At the same time, missing values have a significant impact on model training. Missing data can be processed by deleting missing records, filling missing values with the mean or median, or using more complex methods (such as interpolation or predictive models) to ensure the integrity of the data set. In addition, clean up special symbols, numbers, and extra spaces in the text to reduce data noise and improve text readability.
[0116] The cleaned data set as output has higher data quality and consistency. This output will serve as the input for subsequent standardization, normalization and feature engineering.
[0117] 2. Data annotation and normalization:
[0118] When dealing with data of different dimensions and distributions, standardization and normalization are essential steps. The system inputs the cleaned text dataset and performs standardization and normalization on it respectively.
[0119] Data standardization is to convert numerical data into a distribution with a mean of 0 and a standard deviation of 1. This process helps to eliminate scale differences between features, making the model more efficient and stable during training; normalization is to scale feature values to a specific range (such as 0 to 1). When data has different dimensions, normalization can make all features on the same scale to avoid some features having too much impact on the model.
[0120] By standardizing and normalizing the dataset, the scale differences between features are eliminated, which provides a consistent input basis for feature engineering.
[0121] 3. Preprocessing of medical image data:
[0122] For medical imaging data, the preprocessing step is particularly important to ensure the quality and consistency of the input images.
[0123] The input of this step is the original medical image data. The purpose is to remove irrelevant or redundant parts of the image and focus on key areas to improve the model's ability to recognize important features; adjust the image to a size suitable for the model input. Unifying the image size can avoid errors caused by inconsistent sizes; correct the image shooting angle to ensure that the model can adapt to images in different directions and improve its recognition ability; enhance the diversity of image data through technical means (such as adjusting brightness, contrast, adding noise, etc.) to improve the generalization ability of the model.
[0124] The preprocessed medical images have consistency and higher quality. These image data will be used for subsequent model training to improve the model's ability to recognize key features.
[0125] 4. Feature Engineering:
[0126] Feature engineering is an important step after data preprocessing, which aims to extract useful information from the cleaned data to improve the performance and predictive ability of the model. It is usually divided into two main parts: feature selection and feature combination.
[0127] In the feature selection stage, the cleaned and processed data sets (including text and medical images) need to be deeply analyzed to identify which features have a significant impact on the performance of the model. For example, in the esophageal cancer prediction model, correlation coefficient analysis can be used to select features. By calculating the correlation between each physiological feature and the incidence of cancer, it is found that frequent consumption of overheated food and smoking are significantly positively correlated with esophageal cancer (with a large correlation coefficient), so these two features are selected as model inputs.
[0128] This process involves removing redundant or irrelevant features so that the final set of features retained can maximize the training efficiency and effectiveness of the model. By marking the features that are useful for training, resources and computing power can be concentrated, training time can be reduced, and the accuracy of the model can be improved.
[0129] Feature combination is to combine existing features or create new features to enhance the expressiveness of data. In this model, the patient's age and BMI (body mass index) can be combined into a new feature "health risk index". This new feature may better reflect the patient's overall health status, thereby improving the model's ability to predict esophageal cancer risk. In this way, the model can more effectively capture the complex relationships related to esophageal cancer, which can not only improve the model's ability to capture complex patterns, but also enable the model to better adapt to diverse data distributions.
[0130] Finally, after these two steps, an enhanced feature set will be output to improve the expressiveness of the data and the predictive ability of the model. These processed data sets will be used for model training and evaluation, among which the text data set will be used to build the document graph, and the medical image data set will be used to generate the graph structure of medical images. These feature-engineered data sets will provide a solid foundation for the subsequent hierarchical knowledge tree generation, analysis, and decision-making.
[0131] Through the above steps, data preprocessing can significantly improve the training efficiency and final performance of the model, providing a solid foundation for subsequent analysis and decision-making.
[0132] Embodiment 3
[0133] Next, the technical solution for constructing the hierarchical knowledge tree in S2 is described in detail, including: document graph construction, medical image graph structure generation, hierarchical clustering and knowledge tree generation.
[0134] 2.1、Construction of document graph:
[0135] First, it is an important step to convert the preprocessed large-scale medical document collection into a graph structure for esophageal cancer diagnosis and information organization. The specific steps are as follows:
[0136] 2.1.1 Entity and Relation Extraction:
[0137] First, a large language model (LLM) is used to extract various entities, such as symptoms, patient characteristics, clinical trial information, etc., from documents such as medical literature, case reports, and clinical studies, and to construct their relationships.
[0138] Suppose we extract n entities from the text, these entities can be represented as a set:
[0139] E={e1,e2,......,e n }; where each entity e i May include information such as age, gender, medical history, etc.
[0140] The relationship between entities can be represented by a binary relation R:
[0141] R={(e i , e j ,r)|e i , e j ∈E, r∈R}; where R is a set of relations, such as diagnosis, treatment suitability, etc.
[0142] These entities will be used as nodes in the graph. In the graph G, nodes represent entities and edges represent relationships. It can be expressed in the following form:
[0143] G = (V, E); where V is a set of nodes, representing all extracted entities, and E is a set of edges, representing the relationship between entities.
[0144] The relationships between them are used as weighted edges to construct the graph structure. The weights can be set according to the strength of the relationship, which can be specifically expressed as:
[0145] w(e i , e i )=f(r); where f is a function representing the strength of relationship r.
[0146] 2.1.2. Covariates extraction:
[0147] In the process of building the graph structure, the system not only extracts entities and relationships, but also deeply mines covariates related to esophageal cancer diagnosis. These covariates provide richer and multidimensional information for the nodes in the graph, including:
[0148] Claims: Describes specific statements or opinions related to an entity. A claim can be represented as a function Claim(e) that describes a statement related to entity e:
[0149] Claim(e)={claim1, claim2,...};
[0150] By analyzing these statements, doctors can obtain the latest research findings and clinical trial data on treatments.
[0151] Attributes: used to represent the specific characteristics of an entity. Attributes can be represented by a vector, which contains the specific characteristics of the entity:
[0152] A(e)=[a1,a2,......,a k ];
[0153] where a k Represents the patient's characteristics, such as the patient's physical condition, cancer stage, histological type, etc. Detailed information on the attributes can help doctors consider more comprehensive factors when making diagnosis and treatment decisions.
[0154] Time span: represents the time when the patient receives treatment or the disease progresses. The time span can be represented by a pair of time points, defined as:
[0155] T(e)=(t start , t end );
[0156] where t start Indicates the treatment start time, t end Indicates the end time.
[0157] The effectiveness of treatment can be assessed by describing the change in efficacy over time:
[0158] ΔE=E(t end )-E(t start );
[0159] Where E(t) represents the efficacy at time t. For example, the efficacy of a treatment may be apparent within 3 months, and this time frame is crucial for doctors to evaluate the effectiveness of treatment.
[0160] 2.1.3 Data integration and analysis:
[0161] By extracting and integrating these covariates, the node information in the graph structure is enriched. This not only helps in the early diagnosis of esophageal cancer and the selection of treatment options, but also facilitates the organization and analysis of information. For example, researchers can use the graph structure to analyze the common characteristics of different esophageal cancer patients, identify potential therapeutic targets, or explore patterns of disease progression.
[0162] 2.2. Graph structure generation of medical images:
[0163] The input of this step is the preprocessed medical image data, which is used to construct the interaction graph G of the image. The construction of the graph structure is guided by maximizing the structural entropy. Structural entropy provides a quantitative measure of graph complexity, which has been verified in graph learning systems. This step uses structural entropy as a guide for constructing the structure of information processing systems, rather than using entropy to measure the complexity of network data. In this framework and other graph-based image segmentation methods, the algorithm is based on the graph generated by the image, so the entropy of the graph structure measures the maximum information capacity of the model. Therefore, the graph G is constructed by maximizing its structural entropy:
[0164] The system is constructed by jointly maximizing the structural entropy and minimizing the relative entropy between the generated weights and the original weight distribution. At the same time, the graph should also satisfy the constraints given by the computational system, such as the size of the edge set E:
[0165]
[0166] Where d represents the distance metric, λ is a preset coefficient, W is the weight of generating the interaction graph from the complete graph, and W′ is the weight of the interaction graph G = (V, E, W′) used in practice, satisfying:
[0167]
[0168] To construct the graph, create edges (u, v) for pixels u, v in the image whose horizontal and vertical distances are less than r. Then for each vertex, keep the top k edges with the smallest distance connected to it, and remove the others.
[0169] 2.3 Hierarchical clustering and knowledge tree generation:
[0170] In the present invention, HCSE (hierarchical clustering algorithm based on structural entropy) is used to directly generate a multi-level community structure, and based on this, a K-layer knowledge tree is constructed, which is specifically used for the diagnosis and information organization of medical esophageal cancer. Each layer of the knowledge tree represents the step-by-step refinement of the document set from the global theme to the local details, helping doctors and researchers to efficiently obtain relevant information.
[0171] The specific steps are as follows:
[0172] 2.3.1. Generation of K-layer clustering tree
[0173] The HCSE algorithm automatically divides medical document collections (including research papers, case reports, clinical guidelines, etc.) into multiple levels of community structures by minimizing the structural entropy of the graph.
[0174] For each vertex v, define the parameter d v is the degree of vertex v, that is, the number of edges directly connected to vertex v. is the total degree of the community where vertex v is located, that is, the sum of the degrees of all vertices in the community. m is the total number of edges in the graph.
[0175] if Then the structural entropy H of vertex v is v The calculation formula is:
[0176]
[0177] For each community C, define the parameter g c is the number of edges connecting community C to the outside; V C is the sum of the vertex degrees in community C; V total is the sum of degrees of all community vertices.
[0178] If V C > 0, then the structural entropy H of community C c The calculation formula is:
[0179]
[0180] These communities are generated through recursive clustering and directly construct a K-layer clustering tree structure, where K ranges from 3 to 10 layers.
[0181] Top-level communities (Layer 1): HCSE first performs global clustering on the entire medical data set to generate a layer of large communities containing global topics. Each community represents the main topics in the field of esophageal cancer, such as the etiology, clinical symptoms, diagnostic methods, and treatment strategies of esophageal cancer.
[0182] Intermediate-layer communities (2nd to K-1 layers): Then, the HCSE algorithm further refines each top-level community, recursively dividing it layer by layer to generate more fine-grained sub-communities. These intermediate-layer communities capture the transition from broad themes to specific sub-themes in the dataset, such as diagnostic methods, which can be subdivided into endoscopy, imaging examination, and pathological diagnosis.
[0183] Bottom layer community (Kth layer): Finally, at the K-layer level (not too many, no more than 10 layers in this model), the most fine-grained communities are generated through HCSE, each of which contains the most relevant documents or entities. The communities at this layer are the most local and suitable for processing extremely specific problems or queries.
[0184] HCSE generates communities of different granularities:
[0185] Document level: the coarsest granularity, aggregating related literature or case reports.
[0186] Entity level: medium granularity, aggregating related entities such as diseases, symptoms, treatments, etc.
[0187] Feature level: The finest granularity, aggregating specific data points or documents with similar features.
[0188] 2.3.2 Knowledge Tree Construction
[0189] After generating K layers of community structures, the system organizes these communities into a hierarchical knowledge tree. Assuming that the knowledge tree has K layers, we can define the hierarchical set L k:
[0190] L k ={n∈N|depth(n)=k};
[0191] Where depth(n) represents the depth of node n.
[0192] The root node of the knowledge tree represents the entire medical document collection, and the leaf nodes correspond to specific entities and documents in the underlying community. This structure provides a hierarchical semantic expression from global to local, which is suitable for information retrieval and generation tasks of different granularities.
[0193] Root node: The root node represents the overall research field of esophageal cancer and contains all relevant documents and information. This layer establishes a basic framework for users to clearly understand the broad background and development dynamics of this field.
[0194] Intermediate nodes: Intermediate nodes subdivide the topics under the root node and divide them into important topics and subtopics. These nodes help users quickly navigate to research areas of interest, for example, from the causes of esophageal cancer to clinical symptoms, diagnostic methods and treatment strategies. Through this hierarchical structure, users can easily find relevant information, saving time and effort in searching.
[0195] Leaf nodes: Leaf nodes correspond to specific documents, cases, or related studies in the underlying community, providing detailed information and data. These nodes carry the most specific content, where users can find specific research results, clinical case analysis, or the latest treatment methods. The richness and specificity of this layer of information can meet users' needs for details.
[0196] The K-layer knowledge tree has the ability to flexibly adapt to different types of query requirements. Users can get global answers to their queries at a high level, helping them understand the overall trends and important findings in esophageal cancer research. At the same time, users can also drill down to leaf nodes to obtain specific details, thereby supporting more in-depth research and clinical decision-making.
[0197] For example, when a doctor needs to learn about the latest research trends in esophageal cancer, he can get an overview of the global topic from the top-level community. If he needs to delve deeper into the effects of a specific treatment plan, he can drill down layer by layer to ultimately obtain specific clinical research and case data.
[0198] In this way, the system maintains the comprehensiveness of global information while ensuring the accuracy of local details when processing large-scale medical document collections. This hierarchical knowledge structure not only improves the efficiency of information retrieval, but also provides important support for the diagnosis and treatment of esophageal cancer, helping doctors make more accurate decisions.
[0199] The knowledge tree is constructed through a hierarchical clustering algorithm, effectively organizing the multi-level information in the data set. This structure can handle global themes and local details, allowing users to gradually drill down from broad topics to specific examples. Using the hierarchical clustering algorithm, the system can stratify documents according to the similarity of themes and content, thereby building a clear knowledge system.
[0200] In the medical field, the application of knowledge trees is particularly important. Doctors and researchers can quickly find studies and cases related to specific diseases, treatments, or research results, promoting academic exchanges and cooperation. This structure not only improves the efficiency of information retrieval, but also helps users find the specific information they need in complex medical knowledge, supporting clinical decision-making and research development.
[0201] Embodiment 4
[0202] Next, the technical solution for generating community summaries in S3 is described in detail as follows:
[0203] For each community, the system generates a community summary through a large language model (LLM) to provide key information for the diagnosis of medical esophageal cancer. These summaries contain key entities in the community and their relationships, helping doctors and researchers quickly obtain important data. The summary process is as follows:
[0204] S3.1. Information Priority Sorting:
[0205] The system first identifies the most important entities and relationships in the community through node degree, community density (the ratio of the number of edges within the community to the number of possible edges), etc. The specific steps include:
[0206] Node degree analysis: The degree d(v) of a node v is defined as the number of edges connected to the node, which can be expressed as:
[0207] d(v)=∑ u∈V A vu ;
[0208] Where A is the adjacency matrix, A vu Indicates the existence of an edge between node v and node u (1 if it exists, 0 otherwise).
[0209] The system calculates the degree of each entity (i.e., the number of connections to other nodes), and entities with higher node degrees generally represent the most critical patients, diseases, or treatments in that community. For example, in the context of esophageal cancer, key entities such as chemotherapy drugs or clinical trials may be prioritized.
[0210] Edge weight evaluation: The system also analyzes the relationship between entities. Edges with higher weights represent stronger associations. For an edge (u, v), its weight w(u, v) can be defined to represent the strength of the relationship between entities:
[0211] w(u,v)=f(relation);
[0212] Where f is a function that determines the weight based on the nature of the relationship (such as similarity, correlation, etc.). The weight calculation method is:
[0213]
[0214] Where C(x) is the number of occurrences of node x, and C(u, v) is the number of times nodes u and v appear at the same time.
[0215] For example, the strength of the relationship between a particular treatment and patient response might be given a higher weight.
[0216] This prioritization allows the system to focus on the core elements of the community that are most representative and influential.
[0217] S3.2. Generate community summary:
[0218] Based on the identified important entities, relationships and their covariates information, the system integrates this data to form a comprehensive context.
[0219] For example, in a community for esophageal cancer, information such as the main biomarkers, common clinical symptoms, and the latest treatments for esophageal cancer may be integrated. These summaries provide a brief summary of important information within the community and can be generated across levels, gradually refining from higher-level community summaries to lower-level specific information, ensuring that users can quickly obtain key information.
[0220] The community summary combines entity, relationship and covariates information to significantly improve the accuracy and comprehensiveness of the answers. The key point is to use a large language model (LLM) to integrate important information within the community to form a comprehensive context. This context not only reflects the interrelationships between information, but also provides a more detailed context by utilizing covariates, enabling users to better understand the clinical significance and research value of the information.
[0221] In this way, users can gain deeper insights, such as the effectiveness of a biomarker in a specific population and the results of related clinical trials. This integration of information helps doctors make more informed choices in actual diagnosis and treatment, while promoting the development of related research.
[0222] Embodiment 5
[0223] Next, the technical solutions for query processing and answer generation in S5 are described in detail as follows:
[0224] When a user asks a query about medical esophageal cancer diagnosis, the system combines the community summary in the knowledge tree to gradually generate answers. This process is completed through the following steps:
[0225] S5.1. Preliminary search
[0226] The system first performs a preliminary search in the high-level communities of the knowledge tree to identify the global topics that are most relevant to the user's query. For example, if the user asks, "What are the diagnostic methods for esophageal cancer?" the system will automatically find the top-level topics related to esophageal cancer, including the diagnosis and clinical evaluation of esophageal cancer. The goal of this stage is to quickly locate relevant areas and lay the foundation for subsequent in-depth searches.
[0227] S5.2. Hierarchical retrieval
[0228] Next, the system gradually goes deeper into each level of the knowledge tree, performs hierarchical retrieval, and further refines the information acquisition. The system first enters the middle-level community from the top-level community, such as imaging examinations and endoscopy, and gradually narrows the scope. In this process, the system will focus on different examination types and methods to ensure comprehensive coverage of all possible diagnostic techniques.
[0229] The system will then further refine the search and enter the underlying community to find specific examination methods, clinical guidelines or case studies. For example, the system may retrieve information about the use of CT scans in the diagnosis of esophageal cancer, the indications and steps of endoscopic examinations, and the latest biomarker detection technologies. This refinement process is designed to ensure that the system obtains the latest clinical research results and practical experience, so as to provide users with detailed and reliable answers.
[0230] S5.3. Local Answer Generation
[0231] In relevant communities, the system automatically generates multiple local answers. These local answers are generated based on the summary information of each community and the generative power of the large language model (LLM), aiming to comprehensively cover the different aspects involved in the query.
[0232] Imaging examinations: Generate a summary of the application of CT scans and MRI in the diagnosis of esophageal cancer. This section will discuss in detail the basic principles and applicable scenarios of these two imaging technologies, as well as their effectiveness and limitations in identifying esophageal cancer, to help users understand the advantages and disadvantages of different imaging examinations.
[0233] Endoscopy: Provides information about the steps, indications, and related cases of esophagoscopy. This section will describe in detail the specific operation process of esophagoscopy, including preparation, examination process, possible complications, and under what circumstances this examination is recommended. At the same time, some successful clinical cases will be introduced to enhance the user's confidence in this examination.
[0234] Through these partial answers, users can obtain comprehensive information in multiple dimensions to help them make more informed decisions in the diagnosis and treatment of esophageal cancer.
[0235] S5.4. Map-Reduce Integration
[0236] The system integrates local answers through Map-Reduce. The first step is the Map phase. In the Map phase, the system generates a k Generate a partial answer A k Each local answer is based on the summary information S of the community k Generate and score each answer, each partial answer A k Will be marked with a relevance score of R k (Calculate the overlap between the keywords in the local answer and the query keywords) and the helpfulness score H k (Effectiveness in solving user questions or providing useful information, e.g. by scoring the structure, language, and readability of the answer):
[0237] R k =f r (A k )H k =f h (A k );
[0238] where f h and f r is the scoring function used to calculate relevance and helpfulness.
[0239] Next is the Reduce phase. In the Reduce phase, the system calculates the sum of the scores based on the comprehensive score M. k :
[0240] M k =R k +H k ;
[0241] Filter out the best local answer:
[0242] A * =Select(A1,A2,...,A K );
[0243] Ultimately, these local answers are integrated into a global comprehensive answer. For example, the most important information is extracted from the local answers of imaging examinations, endoscopy and biomarkers to form a comprehensive answer.
[0244] The Map-Reduce strategy effectively handles complex queries in answer generation, ensuring that the system can respond to user needs quickly and accurately. This strategy ensures that all aspects of the query are covered by generating local answers from different communities in parallel. This parallel processing not only improves efficiency, but also enhances the diversity and comprehensiveness of answers.
[0245] During the generation process, the system will score and filter each partial answer, compare its relevance and quality, and finally integrate a high-quality natural language answer. This integration process ensures the accuracy and clarity of the answer, allowing users to easily understand the information provided and support their decision-making process.
[0246] Map-Reduce process example:
[0247] Suppose the user asks what are the early diagnosis methods for esophageal cancer? The system's processing flow is as follows:
[0248] 1. Preliminary search: First, the system searches for topics related to the diagnosis of esophageal cancer in the top-level community of the knowledge tree. The goal of this stage is to obtain extensive background information and current research trends in the field to help the system understand the basic needs of users.
[0249] 2. Hierarchical search: Next, the system enters the middle-level community related to early diagnosis and further breaks it down into specific examination methods. In this process, the system will identify a variety of possible early diagnosis methods, including imaging examinations, endoscopic examinations, and biomarker testing, ensuring that all areas related to early diagnosis are covered.
[0250] 3. Local answer generation: In the segmented community, the system will generate multiple local answers, which will be discussed in detail for different inspection methods. For example:
[0251] Describe its importance in the early detection of esophageal cancer, discuss the application of CT and endoscopic ultrasound, and its potential for early diagnosis.
[0252] 4. Map-Reduce integration: The system integrates all local answers, filters out the most relevant information, and generates a comprehensive and specific answer, such as: Early diagnosis methods for esophageal cancer include endoscopy, endoscopic ultrasound, and CT scans.
[0253] In this way, the system can not only respond quickly to user queries, but also ensure that the information provided is accurate and comprehensive, greatly supporting medical esophageal cancer diagnosis and treatment decisions.
[0254] Embodiment 6
[0255] like Figure 2 As shown, the retrieval enhancement system 20 based on the structure entropy hierarchical knowledge tree in the present application includes:
[0256] Data collection and processing module 201, hierarchical knowledge tree construction module 202, community summary generation module 203 and query processing and answer generation module 204;
[0257] The data collection and processing module 201 is used to: collect original text data and original medical image data related to esophageal cancer, and pre-process the collected data to obtain a text data set and an image data set;
[0258] The hierarchical knowledge tree construction module 202 is used to: use the large language model LLM to construct graphs for the text data set and the image data set to obtain corresponding graph structures respectively, and use the hierarchical clustering HCSE algorithm based on structural entropy to directly generate a multi-level community structure from the obtained graph structure and construct a hierarchical knowledge tree;
[0259] The community summary generation module 203 is used to: use the large language model LLM to analyze the node degree and community density of each community in the hierarchical knowledge tree to generate a corresponding community summary and sort it according to information priority, so as to quickly obtain important data;
[0260] The query processing and answer generation module 204 is used to: when a query request related to the diagnosis of esophageal cancer is received, it combines the community summary in the hierarchical knowledge tree, performs hierarchical retrieval in the order of top-level community-middle-level community-bottom-level community to generate local answers, and integrates all local answers through Map-Reduce to generate the final answer.
[0261] Optionally, the above-mentioned retrieval enhancement system is also used to execute all the steps of the retrieval enhancement method based on the structural entropy hierarchical knowledge tree described in any one of the above-mentioned embodiments 1 to 5. The detailed description thereof can be found in the description of the relevant parts of the above embodiments, and this application will not repeat it.
[0262] Embodiment 7
[0263] Figure 3 The schematic diagram of the hardware architecture of a computer device 10000 suitable for implementing the retrieval enhancement method according to an embodiment of the present application is shown schematically. In some embodiments, the computer device 10000 may be a terminal device such as a smart phone, a wearable device, a tablet computer, a personal computer, a vehicle-mounted terminal, a game console, a virtual device, a workbench, a digital assistant, a set-top box, a robot, etc. In other embodiments, the computer device 10000 may be a rack server, a blade server, a tower server, or a cabinet server (including an independent server, or a server cluster composed of multiple servers), etc. Figure 3 As shown, the computer device 10000 includes but is not limited to: a memory 10010, a processor 10020, and a network interface 10030 that can communicate with each other through a system bus. Among them:
[0264] The memory 10010 includes at least one type of computer-readable storage medium, and the readable storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (such as an SD or DX memory), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 10010 may be an internal storage module of the computer device 10000, such as a hard disk or a memory of the computer device 10000. In other embodiments, the memory 10010 may also be an external storage device of the computer device 10000, such as a plug-in hard disk equipped on the computer device 10000, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 10010 may also include both the internal storage module of the computer device 10000 and its external storage device. In this embodiment, the memory 10010 is generally used to store the operating system and various application software installed in the computer device 10000, such as the program code of the search enhancement method, etc. In addition, the memory 10010 can also be used to temporarily store various data that have been output or will be output.
[0265] In some embodiments, the processor 10020 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other chips. The processor 10020 is generally used to control the overall operation of the computer device 10000, such as performing control and processing related to data interaction or communication with the computer device 10000. In this embodiment, the processor 10020 is used to run the program code stored in the memory 10010 or process data.
[0266] The network interface 10030 may include a wireless network interface or a wired network interface, and the network interface 10030 is generally used to establish a communication link between the computer device 10000 and other computer devices. For example, the network interface 10030 is used to connect the computer device 10000 to an external terminal through a network, and to establish a data transmission channel and a communication link between the computer device 10000 and the external terminal. The network may be a wireless or wired network such as an intranet, the Internet, the Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, etc.
[0267] It should be pointed out that Figure 3 Only a computer device having components 10010 - 10030 is shown, but it should be understood that implementation of all of the components shown is not a requirement, and more or fewer components may alternatively be implemented.
[0268] In this embodiment, the retrieval enhancement method stored in the memory 10010 can also be divided into one or more program modules and executed by one or more processors (such as processor 10020) to complete the embodiment of the present application.
[0269] Embodiment 8
[0270] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the retrieval enhancement method in the embodiment are implemented.
[0271] In this embodiment, the computer-readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the computer-readable storage medium can be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the computer-readable storage medium can also be an external storage device of a computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the computer-readable storage medium can also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the computer-readable storage medium is generally used to store an operating system and various application software installed on the computer device, such as the program code of the retrieval enhancement method in the embodiment. In addition, the computer-readable storage medium can also be used to temporarily store various types of data that have been output or are to be output.
[0272] Embodiment 9
[0273] An embodiment of the present application also provides a computer program product, including a computer program, which implements the method in the above embodiment when executed by a processor.
[0274] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of the present application can be implemented by general-purpose computer devices, they can be concentrated on a single computer device, or distributed on a network composed of multiple computer devices, optionally, they can be implemented by executable program codes of computer devices, so that they can be stored in a storage device and executed by the computer device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.
[0275] It should be noted that the above are only preferred embodiments of the present application, and the patent protection scope of the present application is not limited thereto. Any equivalent structure or equivalent process transformation made using the contents of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A retrieval enhancement method based on a structural entropy hierarchical knowledge tree, characterized in that: The following steps are involved: S1. Data collection and preprocessing: Taking esophageal cancer as the data collection direction, we collected original text data and original medical imaging data related to esophageal cancer, and preprocessed the collected data to obtain text data sets and image data sets; S2. Hierarchical knowledge tree construction: The large language model (LLM) is used to construct graphs for text datasets and image datasets to obtain corresponding graph structures. The hierarchical clustering HCSE algorithm based on structural entropy is used to directly generate multi-level community structures from the obtained graph structures and construct a hierarchical knowledge tree. S3. Community summary generation: The large language model (LLM) is used to analyze the node degree and community density of each community in the hierarchical knowledge tree to generate the corresponding community summary and sort it according to information priority, so as to quickly obtain important data; S4. Query processing and answer generation: When a query request for esophageal cancer diagnosis is received, the community summary in the hierarchical knowledge tree is combined to perform hierarchical retrieval in the order of top-level community-middle-level community-bottom-level community to generate local answers, and all local answers are integrated through Map-Reduce to generate the final answer.
2. The search enhancement method according to claim 1, characterized in that: The graph structure constructed using the text dataset is a document graph, in which the extracted entities are used as nodes, the relationships between entities are used as edges, and the covariates related to esophageal cancer diagnosis are used as the node information of the entities; Entities include symptoms, patient characteristics, and clinical trial information; covariates include statements, attributes, and time spans. Statements are used to describe specific statements or opinions related to entities, attributes are used to represent specific characteristics of entities, and time spans are used to represent the time patients receive treatment or disease progression.
3. The search enhancement method according to claim 1 or 2, characterized in that: The graph structure constructed using image data is an interaction graph. The interaction graph is constructed by jointly maximizing the structural entropy and minimizing the relative entropy between the generated weights and the original weight distribution. The generated weights are the weights of the interaction graph generated from the complete graph of the image, and the original weights are the weights of the interaction graph used in practice.
4. The search enhancement method according to claim 1, characterized in that: The multi-layered community structure includes top-layer communities, middle-layer communities, and bottom-layer communities, and the middle-layer community has at least two layers; The top-level community is the main topic in the field of esophageal cancer, which generates a community with document-level granularity; the middle-level community is a sub-community with entity-level granularity generated by recursively dividing the top-level community through the HCSE algorithm; the bottom-level community is a sub-community with feature-level granularity generated by the HCSE algorithm for the middle-level community.
5. The search enhancement method according to claim 1 or 4, characterized in that: The hierarchical knowledge tree includes root nodes, intermediate nodes and leaf nodes; The root node represents the entire medical document collection, symbolizing the overall research field of esophageal cancer, and contains all relevant documents and information; the intermediate nodes subdivide the topics under the root node, dividing them into various important topics and subtopics; the leaf nodes correspond to specific documents, cases or related studies in the underlying community, providing detailed information and data.
6. The search enhancement method according to claim 2, characterized in that: The community summary is a general summary of the information related to esophageal cancer diagnosis contained in each community. The node degree is the number of edges connected to the node, and the community density is the strength of the relationship between entities. The information priority is positively correlated with the node degree and community density.
7. The search enhancement method according to claim 1, characterized in that: The Map-Reduce method includes two stages: Map and Reduce; Integrate all local answers through Map-Reduce, including: In the Map stage, each partial answer is scored for relevance and helpfulness, and finally a comprehensive score is obtained. The relevance score is used to evaluate the overlap between the keywords in the partial answer and the query keywords, and the helpfulness score is used to evaluate the effectiveness in solving user problems or providing useful information. In the Reduce stage, the best local answer is selected as the final answer based on the comprehensive score.
8. The search enhancement method according to claim 1, characterized in that: The original text data include: electronic medical records (EMR), laboratory test results, medical literature, pathology reports, patients’ clinical symptoms and treatment records; The original medical imaging data include CT images, MRI images and endoscopic images.
9. The search enhancement method according to claim 1 or 8, characterized in that: Data preprocessing includes processing of original text data and original image data; The processing of the original text data specifically includes: cleaning the original text data, and standardizing and normalizing the cleaned data to obtain a standardized and normalized text data set; The processing of the original image data specifically includes: adjusting the size, direction, brightness and contrast of the original image data and adding noise to enhance the diversity of the image data, and using the correlation coefficient to select features, and using the selected features to combine features to obtain new features, thereby forming an image data set; The correlation coefficient is specifically a coefficient that characterizes the correlation between the patient's physiological characteristics and the incidence of esophageal cancer; the new feature obtained by the feature combination is a feature that can better reflect the patient's overall health status compared with the selected feature.
10. A retrieval enhancement system based on a structural entropy hierarchical knowledge tree, characterized in that: The search enhancement system is used to execute the search enhancement method as described in any one of claims 1 to 9 above.
Citation Information
Patent Citations
Retrieval enhancement generation system and method based on knowledge graph
CN117973540A
Intelligent document retrieval generation method and system based on RAG technology
CN118332072A
RAG question and answer method and system based on knowledge graph and medium
CN118673126A
Power standard question and answer model training method and system based on retrieval enhancement
CN118733706A
Knowledge retrieval enhancement-based characteristic agricultural product standardized file content generation method
CN118779407A
Cited By
Consultation shunting dialogue system based on small expert model
CN120296135A
Model defect knowledge detection method, control device and storage medium
CN120493099A
Knowledge graph-oriented large model retrieval enhancement method and device and medium
CN120562568A
Medical drug knowledge RAG optimization method based on Trie tree
CN121331497A
Power distribution network fault prediction method and system based on electric power big data
CN121350576A