Data architecture and visual analysis method based on multi-level medical text
By constructing a multi-layered medical text data architecture and a multi-force-guided star map visual analysis method, the structural semantic distortion and performance bottleneck problems in medical text analysis are solved, achieving efficient and accurate medical knowledge acquisition and visual analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-04
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies suffer from structural semantic distortion, data architecture performance bottlenecks, and chaotic large-scale data analysis when processing medical texts, resulting in insufficient accuracy, efficiency, and real-time performance in medical knowledge acquisition.
We adopt a multi-layered medical text data architecture, combining pre-trained language models and embedding models to construct a multi-layered medical text dataset. We then use graph databases and vector databases for efficient storage and retrieval, and combine a multi-force-oriented star map visualization analysis method to provide a guided visualization analysis path.
It significantly improves the accuracy and computational efficiency of medical text analysis, provides a clear visual analysis path, helps users quickly understand and explore large-scale medical text data, reduces cognitive load, and improves the accuracy and efficiency of knowledge acquisition.
Smart Images

Figure CN121786202A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of natural language processing and information visualization analysis, specifically a data architecture and visualization analysis method based on multi-level medical text. Background Technology
[0002] In recent years, with the development of medical education and the continuous growth in the number of medical students, the demand for acquiring medical professional knowledge has been increasing. Medical professional knowledge refers to the systematic knowledge structure, professional skills, and perceptual abilities formed through long-term practice in the field, enabling professionals to efficiently complete complex tasks. The formation of medical professional knowledge typically requires extensive case study learning and knowledge abstraction.
[0003] Medical texts (such as electronic medical records), as important carriers of medical knowledge, contain rich real clinical cases and treatment experiences. However, their unstructured nature, semantic complexity, and massive data volume pose significant challenges to knowledge extraction and learning. Although large language models have demonstrated strong capabilities in knowledge acquisition in recent years, their direct application in the medical field carries significant risks. Because the medical field demands extremely high factual accuracy, large language models are prone to generating "false professionalism," producing information that appears reasonable but is factually incorrect. To address these issues, data analysis and visual analysis methods centered on "human-computer collaboration" can help learners actively explore data and understand knowledge structures, thereby improving the accuracy, efficiency, and depth of knowledge acquisition. When processing medical texts, existing methods typically divide medical documents into medical paragraphs, extract core medical entities, and form medical texts of varying densities to help learners read and analyze quickly. However, these methods generally suffer from the following technical shortcomings:
[0004] Multi-layered text data suffers from structural semantic distortion. While medical entities are extracted from documents as the source of analysis, they are only displayed using keywords and other formats without constructing an effective multi-layered structure. This results in a loss of structural context, causing semantic distortion and failing to meet the needs of professional analysis. Furthermore, the generated text vectors are often of insufficient quality, leading to inaccurate results in downstream analysis such as topic clustering and similarity calculations.
[0005] Data processing relies on lengthy and extensive upfront computations and lacks a persistent, high-performance data architecture. Analyzing multi-layered text data requires numerous similarity calculations, topic clustering, and multi-hop queries of graph structures. These calculations often need to be performed entirely upfront; otherwise, real-time interactive analysis cannot be completed. This leads to significant performance bottlenecks at data volumes in the tens of thousands, consuming substantial computational resources and time, and severely limiting the scale of analyzable data and the smoothness of analysis.
[0006] In terms of visual analytics methods, existing methods lack guidance, making it difficult to construct a clear analytical process, and are prone to visual confusion and undirected analysis problems in large-scale data.
[0007] Therefore, there is an urgent need for a new technical solution that can overcome the above-mentioned barriers, maintain the structural semantics of medical texts, build a high-performance and scalable data architecture, and provide a guided visualization analysis method to improve the accuracy, real-time performance, and intuitiveness of medical knowledge exploration. Summary of the Invention
[0008] To address the aforementioned problems, this invention provides a data architecture and visual analysis method based on multi-level medical text. This solves the problems of structural semantic distortion, data architecture performance bottlenecks, and chaotic large-scale data analysis in existing technologies for multi-level medical text processing, thereby significantly improving the accuracy, real-time performance, and cognitive efficiency of users' analysis of multi-level medical text data. The technical solution is as follows:
[0009] A data architecture and visual analytics method based on multi-level medical text includes the following steps:
[0010] S1: Construction of a multi-layered medical text dataset:
[0011] Based on the segmented structure of medical documents, medical paragraphs are divided. Medical entities are extracted using a pre-trained language model fine-tuned from a public medical corpus. The medical entity set is formed by combining paragraph inclusion relationships. A multi-layered medical text dataset including medical documents, medical paragraphs, medical entity sets, and medical entities is constructed.
[0012] S2: Text Embedding and Vectorized Storage:
[0013] The multi-layered medical text dataset is input into an embedding model trained under the supervision of a publicly available natural language inference dataset to generate text vector embedding results, which are then stored in a vector database to support topic clustering and semantic retrieval.
[0014] S3: Topic Clustering and Semantic Organization
[0015] The BERTopic framework is used to reduce the dimensionality and cluster the text vector embedding results in S2, determine topic clusters, document topic attributes and topic keywords, and form topic-document and topic-keyword correspondences.
[0016] S4: Graph Structure Construction and Storage:
[0017] Using medical documents, medical paragraphs, medical entity sets, and medical entities as nodes in a graph structure, directed edges based on hierarchical relationships and undirected edges based on entity co-occurrence relationships are established. The node and edge data are stored in a graph database to construct a multi-level medical knowledge graph.
[0018] S5: Multi-force Guiding Star Chart Visual Analysis:
[0019] A multi-force-oriented layout is used to map paragraph nodes to celestial bodies. The celestial bodies in the medical document are connected to form constellations. The node layout is combined with spring force, gravity and collision force to achieve semantic clustering and structural visualization.
[0020] S6: Constellation Focus Visual Analysis:
[0021] The system stores a graph-structured snapshot based on the constellation selected by the user. The stars are numbered according to the document paragraph order, corresponding to the paragraph numbers in the original text. Core entities are highlighted in the original text, and interactive comparison with the original text analysis is supported.
[0022] Compared with the prior art, the beneficial effects of the present invention are:
[0023] 1. Improved the accuracy and reliability of multi-layered medical text analysis: By employing an entity recognition model fine-tuned on a professional corpus and an embedding model trained under contrastive learning supervision, the accuracy of medical entity extraction and the quality of text semantic representation were significantly improved. This provides a reliable data foundation for subsequent analyses such as topic clustering and similarity calculation, ensuring the accuracy of analytical conclusions and avoiding misleading results due to inaccurate data sources.
[0024] 2. Improved computational efficiency and scalability of medical text data analysis: By adopting a data architecture of "vector database + graph database", it supports efficient semantic similarity retrieval, multi-hop queries, and association analysis on hundreds of millions of data points, solving the performance bottleneck of traditional methods when processing large-scale data, and making data analysis and visual analysis of large-scale medical text possible.
[0025] 3. Provides a progressive guided visual analysis path: Through a multi-level visual analysis method using a "star map-constellation" approach, complex document relationship networks are presented with an intuitive "star map" metaphor, helping users quickly grasp the overall structure and thematic distribution of the dataset. Through drill-down interaction, users can smoothly transition from a macro overview to comparative analysis of paragraph structure and text content, forming a cognitive path of "overview first, explore details as needed." This guided design significantly reduces the cognitive load on users in the visual analysis of large-scale data, systematically constructs a knowledge framework, and improves the efficiency and depth of analysis. Attached Figure Description
[0026] Figure 1 This is a schematic diagram of the data architecture of the present invention.
[0027] Figure 2 This is a schematic diagram of the multi-force guiding star map visual analysis method of the present invention.
[0028] Figure 3 This is a schematic diagram of the constellation focusing visual analysis method of the present invention. Detailed Implementation
[0029] The invention will be further described below with reference to the accompanying drawings and specific implementation examples. This system aims to help users efficiently interpret and analyze large-scale, multi-level medical text data through precise data deconstruction, embedding technology, and advanced visualization layout.
[0030] I. Data Architecture and Processing Flow (e.g.) Figure 1 (As shown)
[0031] 1. Construction and preprocessing of multi-level medical text datasets:
[0032] Based on the segmented structure of medical documents, they are divided into multiple medical paragraphs. A pre-trained language model fine-tuned using a publicly available medical corpus is used to extract medical entities. Medical entity sets are then formed based on paragraph inclusion relationships, constructing a multi-layered medical text dataset consisting of medical documents, medical paragraphs, medical entity sets, and medical entities.
[0033] Step (1): Collect original medical documents, such as outpatient electronic medical records, inpatient medical records, medical textbooks, etc. Each document or chapter constitutes an original medical document. Divide it into natural paragraphs to obtain medical paragraphs. ;
[0034] Step (2): Download publicly available medical annotation datasets, such as the Chinese Medical Information Processing Evaluation Benchmark CBLUE. Use the entity recognition annotation dataset in it to fine-tune BERT-based pre-trained models, such as MacBERT, to enhance their entity recognition accuracy.
[0035] Step (3): Each medical paragraph from step (1) Using the model fine-tuned in step (2), medical entity recognition was performed, extracting nine standard types of medical entities: disease (dis), clinical symptom (sym), drug (dru), medical device (equ), medical procedure (pro), body part (bod), medical examination item (ite), microorganism (mic), and department (dep). ;
[0036] Step (4): Translate each medical paragraph All entities extracted Constructed as a collection of medical entities .
[0037] 2. High-quality text embedding and vectorized storage:
[0038] The embedding model ESimCSE-BERT, which takes multi-layered text input and trains under the supervision of a natural language inference dataset, generates high-quality text vector embedding results and stores them in a vector database for subsequent accurate topic clustering and semantic retrieval.
[0039] Step (1): Download publicly available natural language inference datasets, such as Chinese-SNLI, and use the contrastive learning framework ESimCSE to supervise the training of BERT-based pre-trained models, such as ESimCSE-BERT, to further improve their embedding representation accuracy in Chinese contexts.
[0040] Step (2): Input the multi-level medical text into the model obtained in step (1). Each text at different levels will be converted into a corresponding high-dimensional semantic embedding vector.
[0041] Step (3): Store all texts and their corresponding embedding vectors into a vector database (such as Milvus) to enable subsequent fast keyword retrieval and similarity calculation in large-scale datasets, giving it efficient vector indexing and query capabilities.
[0042] 3. Topic clustering and semantic organization based on high-quality embedding:
[0043] Based on the BERTopic framework, semantic topic clustering is performed on the embedded results to achieve topic classification of medical documents.
[0044] Step (1): Input all the medical document embedding vectors transformed by the ESImCSE-BERT model as input. The basic form is an N*D matrix, where N is the total number of medical documents and D is the dimension of the embedding vectors generated by the ESImCSE-BERT model (e.g., D=768). Each row represents the semantic vector of a document. At the same time, set the necessary parameters of BERTopic, such as the phrase length range to be considered when extracting keywords, and define the number of keywords to be extracted from each topic.
[0045] Step (2): Use the UMAP (Uniform Manifold Approximation and Projection) algorithm to reduce the dimensionality of high-dimensional vectors, mapping the original high-dimensional space to a low-dimensional space. First, a local neighborhood graph is constructed for each document vector in the high-dimensional space. By identifying nearest neighbors, calculating local distance scales and similarity weights, a weighted graph of the global topological structure of the data is constructed. Then, the positions of points are initialized in the low-dimensional space, and the similarity between vectors is calculated. The positions of these low-dimensional points are continuously adjusted through optimization algorithms so that the similarity relationships in the low-dimensional space reproduce the connection structure of the high-dimensional graph as much as possible. Finally, a low-dimensional embedding matrix that preserves semantic proximity relationships is output. In the dimensionality-reduced space, the HDBSCAN (Hierarchical Density-Based Spatial Clustering of Applications with Noise) algorithm is used for density clustering. This algorithm constructs a minimum spanning tree based on the distance between points in the space, and then gradually cuts the tree edges according to the distance to form a hierarchical clustering tree. The optimal clustering result is then selected by evaluating the stability of each cluster throughout the hierarchical structure, and the topic tags for each document are finally output.
[0046] Step (3): Based on the document results (document topic tags) in Step (2), merge all documents under the same topic into one topic document to represent the content of that topic. Then, count the frequency of each word in different topic documents and calculate its representative score by combining the distribution of the word across all topics. Words with high scores appear frequently in the topic but less frequently in other topics, thus effectively representing the core semantics of the topic.
[0047] Step (4): Store the analysis results in the form of a topic-document correspondence table and a topic-keyword table for subsequent querying and analysis.
[0048] 4. Graph structure construction and graph database storage:
[0049] Multi-level medical texts, including medical documents, medical paragraphs, sets of medical entities, and medical entities themselves, are used as nodes in a graph structure. Based on their inclusion relationships (directed edges) and co-occurrence relationships (undirected edges), a graph structure is constructed to form a multi-level medical knowledge graph that can be queried at multiple levels.
[0050] Step (1): The basic structure of the graph includes nodes and edges. First, we define four types of nodes: document nodes, paragraph nodes, entity set nodes, and entity nodes. Each type of node represents a different level of information unit, allowing information to be accessed and processed in a fine-grained manner.
[0051] Step (2): Establish containment edges in the medical document based on the hierarchical relationship of the text. With its contained medical paragraphs Between, medical paragraphs The corresponding set of medical entities Between, medical entity set With the medical entities it contains Directed edges are established between these elements. By establishing containment relationships, the organization and logical structure of information can be clearly defined, preserving the complete context. For example, when a user wants to know all treatment methods for a specific disease, they can quickly retrieve paragraphs, entity sets, and documents containing that disease through containment relationships.
[0052] Step (3): Establish co-occurrence relationship edges: Co-occurrence relationship refers to the relationship generated by the simultaneous appearance of the same entity in texts at the same level (such as paragraphs or entity sets). Establish undirected co-occurrence relationship edges between these paragraph nodes and entity sets with co-occurrence relationships, with the weight of the edge representing the number of co-occurring entities. Co-occurrence relationships can reflect the implicit connections between paragraphs, documents, or entities. For example, if the entity "drug X" and the entity "symptom Y" frequently co-occur in a large number of different patients' medical record paragraphs, this indicates that these medical records are related, and there is a connection between "drug X" and "symptom Y". This relationship may never be explicitly stated in any single document, but this pattern can be discovered through graph analysis of the full dataset. At the same time, the number of co-occurring entities provides an interpretable similarity measure. For example, similarity calculations in vector space only yield cosine similarity results, lacking interpretability. However, the more co-occurring entities there are, the more similar their core semantic content is, and the more specific co-occurring entity texts support this, greatly enhancing interpretability. The weighted co-occurrence networks established also form the basis for many advanced graph algorithms, such as community discovery for finding more granular topics, centrality analysis for finding the core components of a network, and pathfinding for exploring indirect connections between entities.
[0053] Step (4): The topic to which the document belongs is used as the document node attribute. All nodes, edges, and their attributes are imported into a graph database (such as Neo4j). This graph database is specifically designed for storing and querying graph structure data. For queries that require traversing multiple levels of relationships, the performance of the graph database far surpasses that of traditional relational databases. Relational databases implement join queries through JOIN operations, and their performance drops sharply as the join level deepens. In contrast, the native graph storage structure of the graph database makes it extremely efficient in finding neighboring nodes. Furthermore, the graph database has higher scalability. If new entity types or relationship types need to be added in the future, relational databases require complex table structure changes, while graph databases can be directly extended on the existing graph.
[0054] II. Multi-force-oriented star map visualization analysis methods (e.g.) Figure 2 (As shown)
[0055] Using medical paragraph nodes as units, a multi-force-oriented layout is used to achieve a visual mapping of semantics and structure.
[0056] 1. After the user enters the query keywords, the relevant documents are obtained by searching the vector database using the approximate nearest neighbor algorithm. This algorithm can significantly improve the search efficiency and accuracy when indexing and retrieving large-scale vectors.
[0057] 2. After obtaining the relevant document nodes, a multi-hop query is further performed in the graph database to obtain the paragraphs, entity sets, and multi-level relationship network of the entities. Each paragraph node is rendered as a star. All stars belonging to the same document are connected by edges to form a constellation, and the membership relationship is mapped to the constellation connection. The node color of the constellation is mapped to the number of nodes it contains. The border and link colors of the same star indicate the topic to which the document belongs. The topic color and corresponding keywords are displayed in the graph. Figure 2 The right side is provided for user viewing to aid analysis. The colors of celestial bodies are coded using the standard color gradient of the stellar spectrum in the MK classification system, representing the number of celestial bodies in the same constellation. The more celestial bodies there are, the higher the color temperature and the more spectral density they represent. Figure 2 Left side.
[0058] Figure 2 It includes nine entity types: disease (dis), clinical symptoms (sym), drug (dru), medical device (equ), medical procedure (pro), body part (bod), medical examination item (ite), microorganism (mic), and department (dep).
[0059] 3. Combining the gravitational pull generated by the medical document, the semantic similarity pull between nodes, the spring force corresponding to the proportion of entity types, and the collision force to avoid overlap, the layout of the star positions is iteratively optimized. Nodes are distributed in a ring-shaped graphic composed of type vertices. Each node is subjected to a spring force proportional to its entity type composition, a gravitational pull proportional to its similarity to other nodes, and a collision force to prevent overlap with other nodes. The combined effect of these forces forms a stable layout, achieving the visual effect of clustering semantically similar nodes and separating semantically different stars, resulting in a clear multi-layered text layout.
[0060] The layout of the star nodes is driven by a multi-force guidance system, including the following three forces:
[0061] 1) The total gravitational force currently acting on the celestial body The relational attraction generated by the related edges of medical documents Similarity attraction generated by the semantic similarity of vectors to other celestial bodies The composition and calculation formula are as follows:
[0062] ;
[0063] In the formula, celestial bodies Subject to the combined gravitational pull of other celestial bodies, To be with celestial bodies The gravitational pull between adjacent celestial bodies belonging to the same constellation; For the current star Affected by other elements in the image The sum of the gravitational forces of similar celestial bodies is calculated using the following formula:
[0064] ;
[0065] in, The magnitude of the unit force From celestial bodies Pointing to celestial bodies The unit direction vector, celestial bodies With stars Similarity between corresponding texts.
[0066] 2) Spring force : From nine medical entity type poles evenly distributed on the circumference of the star map ( Each celestial body is subjected to a spring force based on the proportion of different medical entity types contained in its corresponding entity set, causing the celestial body to move closer to its corresponding pole, thus achieving semantic clustering. The calculation formula is as follows:
[0067] ;
[0068] in celestial bodies The corresponding entity set The number of medical-like entities, celestial bodies The total number of entities in the corresponding entity set; The magnitude of the unit force From celestial bodies Pointing to the extreme point of the entity type The unit direction vector; celestial bodies It is subject to the total elasticity of all medical entity types at their extremes.
[0069] 3) Collision force Used to avoid overlapping and obscuring between stars, ensuring a clear distribution of stars in the star map. It is applied only when stars overlap with each other. The more they overlap, the greater the repulsive force. When two stars are only adjacent and do not overlap, the collision force is zero.
[0070] Ultimately, the net force acting on each celestial body is:
[0071] ;
[0072] Through these three forces, the positions of celestial bodies are continuously adjusted iteratively until equilibrium is reached, forming a semantically meaningful, clustered, and visually clear layout. Suitable for large-scale data analysis, it can effectively organize and display complex relationship networks, helping users quickly understand key information and patterns within large amounts of data.
[0073] III. Visual Analysis Methods for Focusing on Constellations (e.g.) Figure 3 (As shown)
[0074] The structure of medical documents is analyzed in detail by comparison with the original text, forming an analysis cycle and guiding the analysis path.
[0075] When a user selects a constellation, a snapshot of the constellation diagram's structure is stored. Each celestial body is labeled with its paragraph number in the original text according to its order of appearance in the document, with the number corresponding to the original paragraph mark. The darkness of the celestial body's border color represents the number of entities it contains; the darker the color, the more entities it contains. The width of the lines connecting celestial bodies is proportional to the number of coexisting entities between them. Different types of core medical entities in medical paragraphs are highlighted with different colors to help quickly obtain key information. An interactive menu is provided, allowing users to use the current constellation as the basic unit of analysis to perform relational queries between diagrams and further analyze the relationships between entity knowledge.
[0076] When a user discovers one or more constellations of interest in the star map visual analysis, they can click to select them. Based on the pre-built node and edge records in the graph database, the system can quickly query the corresponding documents, paragraphs, entities, and their categories, calculate the number of entities contained in each constellation, and the number of co-existing entities of adjacent constellations, and draw a constellation-focused analysis view. This view is divided into two parts:
[0077] 1. The "Constellation" graphic, based on a snapshot of constellations in a star chart, allows users to quickly index their positions within the chart. Each star is marked with a number in the center, representing its paragraph number in the original text, allowing users to quickly compare and analyze it with the original text below. The darkness of the star's border color indicates the number of entities it contains; the darker the color, the more entities, providing a visual understanding of the information density. The width of the lines connecting stars is proportional to the number of entities they share, reflecting the tightness of semantic relationships between paragraphs. A hover-style interactive menu is provided in the upper right corner, allowing users to use the current constellation as the basic unit for analysis and to search for related documents. For large-scale data analysis, the independent focus view allows users to quickly separate elements requiring independent analysis from massive data graphics, greatly improving analysis efficiency.
[0078] 2. The original text is the original text corresponding to the constellation above. Through the graph database, all related entities can be quickly retrieved and highlighted in the text. This allows users to seamlessly switch to the original text for detailed reading and comparison after understanding the macro relationships and various indicators, forming an analytical loop of "macro exploration - micro verification" and effectively guiding the analysis path.
[0079] The method of this invention realizes the construction of multi-level medical text datasets and their high-quality semantic embedding, supports real-time semantic retrieval and multi-hop queries of hundreds of millions of data, and realizes a hierarchical medical knowledge exploration process from macro to micro through progressive star map-constellation guided visual analysis, which significantly improves the ability to analyze large-scale multi-level medical text data and the efficiency of exploration and learning.
Claims
1. A data architecture and visual analysis method based on multi-level medical text, characterized in that, Includes the following steps: S1: Construction of a multi-layered medical text dataset: Based on the segmented structure of medical documents, medical paragraphs are divided. Medical entities are extracted using a pre-trained language model fine-tuned from a public medical corpus. The medical entity set is formed by combining paragraph inclusion relationships. A multi-layered medical text dataset including medical documents, medical paragraphs, medical entity sets, and medical entities is constructed. S2: Text Embedding and Vectorized Storage: The multi-layered medical text dataset is input into an embedding model trained under the supervision of a publicly available natural language inference dataset to generate text vector embedding results, which are then stored in a vector database to support topic clustering and semantic retrieval. S3: Topic Clustering and Semantic Organization The BERTopic framework is used to reduce the dimensionality and cluster the text vector embedding results in S2, determine topic clusters, document topic attributes and topic keywords, and form topic-document and topic-keyword correspondences. S4: Graph Structure Construction and Storage: Using medical documents, medical paragraphs, medical entity sets, and medical entities as nodes in a graph structure, directed edges based on hierarchical relationships and undirected edges based on entity co-occurrence relationships are established. The node and edge data are stored in a graph database to construct a multi-level medical knowledge graph. S5: Multi-force Guiding Star Chart Visual Analysis: A multi-force-oriented layout is used to map paragraph nodes to celestial bodies. The celestial bodies in the medical document are connected to form constellations. The node layout is combined with spring force, gravity and collision force to achieve semantic clustering and structural visualization. S6: Constellation Focus Visual Analysis: The system stores a graph-structured snapshot based on the constellation selected by the user. The stars are numbered according to the document paragraph order, corresponding to the paragraph numbers in the original text. Core entities are highlighted in the original text, and interactive comparison with the original text analysis is supported.
2. The data architecture and visual analysis method based on multi-level medical text according to claim 1, characterized in that, In step S1, the medical entity extraction specifically involves: S1a: Collect medical documents including outpatient electronic medical records, inpatient medical records, and medical textbooks. Medical paragraphs are then divided according to natural paragraphs. ; S1b: Fine-tuning the BERT-based pre-trained model using publicly available medical annotation datasets to improve entity recognition accuracy; S1c: Applying the finely tuned pre-trained model to each medical segment Perform medical entity recognition to extract nine categories of medical entities: diseases, clinical symptoms, drugs, medical equipment, medical procedures, body parts, medical examinations, microorganisms, and departments. ; S1d: This will combine each medical paragraph. Medical entities within Constructed as a collection of medical entities .
3. The data architecture and visual analysis method based on multi-level medical text according to claim 1, characterized in that, In step S2, the text embedding specifically involves: S2a: The publicly available natural language inference dataset is used as the input labeled data, and the pre-trained model ESimCSE-BERT is trained under supervision based on the contrastive learning framework; S2b: Input the multi-layered medical text into the trained ESImCSE-BERT model sequentially to calculate the high-dimensional semantic embedding vector; S2c: Store all texts and their corresponding embedding vectors into a vector database to enable keyword retrieval and similarity calculation.
4. The data architecture and visual analysis method based on multi-level medical text according to claim 3, characterized in that, In step S3, topic clustering specifically involves: S3a: Take the embedding vectors of all medical documents transformed by the ESimCSE-BERT model as input. The basic form is an N*D matrix, where N is the total number of medical documents and D is the dimension of the embedding vectors generated by the ESimCSE-BERT model; each row represents the semantic vector of a document; and set the necessary parameters of BERTopic. S3b: A unified manifold approximation and projection algorithm is used to reduce the dimensionality of high-dimensional semantic embedding vectors, mapping the original high-dimensional space to a low-dimensional space; the details are as follows: First, a local neighborhood graph is constructed for each document vector in a high-dimensional space. By identifying nearest neighbors, calculating local distance scales and similarity weights, a weighted graph of the global topology of the data is constructed. Then, the positions of the points are initialized in the low-dimensional space, and the similarity between each vector is calculated. The positions of the low-dimensional points are continuously adjusted through the optimization algorithm so that the similarity relationship in the low-dimensional space reproduces the connection structure of the high-dimensional graph. Finally, a low-dimensional embedding matrix that preserves semantic proximity is output. S3c: Input the number of topic clusters, and use the HDBSCAN algorithm to perform density clustering in the dimensionality-reduced space to automatically identify document clusters with different topics; the HDBSCAN algorithm constructs a minimum spanning tree based on the distance between points in the space, and then gradually cuts the tree edges according to the distance to form a hierarchical clustering tree; then the optimal clustering result is selected by evaluating the stability of each cluster in the entire hierarchical structure, and finally the topic tags of each document are output. S3d: Based on the topic tags of the documents obtained in step S3c, merge all documents under the same topic into one topic document to represent the content of the current topic; then count the frequency of each word in different topic documents, and combine the distribution of the word in all topics to calculate its representative score to determine the keywords; S3e: Stores analysis results in the form of topic-document correspondence tables and topic-keyword tables for subsequent queries and analysis.
5. The data architecture and visual analysis method based on multi-level medical text according to claim 1, characterized in that, In step S4, the graph structure construction is specifically as follows: S4a: Defines four node types: document node, paragraph node, entity collection node, and entity node; S4b: Based on medical documents, medical paragraphs, sets of medical entities, and the hierarchical relationships between medical entities, in the medical document... Its contained medical paragraphs Between, medical paragraphs Its corresponding set of medical entities Between, medical entity set Its included medical entities Establish directed edges between them; S4c: Establish undirected co-occurrence relationship edges between paragraph nodes and entity sets that have a co-occurrence relationship. The weight of the edge is the number of co-occurring entities. S4d: Uses the topic of a medical document as a document node attribute, and imports all nodes, edges, and their attributes into a graph database.
6. The data architecture and visual analysis method based on multi-level medical text according to claim 1, characterized in that, In step S5, the multi-force guide star map layout is specifically as follows: S5a: Map each paragraph node to a star. Stars belonging to the same medical document are connected by edges to form a constellation. The links between stars represent that the stars belong to the same category. The color temperature of a star represents the number of stars in the constellation to which that star belongs. The border and link colors of a star represent the theme of the medical document to which it belongs. S5b: Nodes are distributed in a ring-shaped graphic composed of type vertices. Each node is subjected to a spring force proportional to its entity type, an attraction force proportional to its similarity to other nodes, and a collision force to prevent it from overlapping with other nodes. A stable layout is formed based on the combined effect of these forces, achieving the visual effect of clustering semantically similar nodes and separating semantically different celestial bodies. S5c: Star color coding indicates the number of stars in the same constellation. The constellation border color and link color indicate the theme of the document.
7. The data architecture and visual analysis method based on multi-level medical text according to claim 1, characterized in that, In S5b, the gravitational force, spring force, and collision force, which are proportional to the similarity with other nodes, are as follows: 1) The total gravitational force currently acting on the celestial body The relational attraction generated by the related edges of medical documents Similarity attraction generated by the semantic similarity of vectors to other celestial bodies The composition and calculation formula are as follows: ; in, celestial bodies Subject to the combined gravitational pull of other celestial bodies, To be with celestial bodies The gravitational pull between adjacent celestial bodies belonging to the same constellation; For the current star Affected by other things in the picture The sum of the gravitational forces of similar celestial bodies is calculated using the following formula: ; in, The magnitude of the unit force From celestial bodies Pointing to celestial bodies The unit direction vector, celestial bodies With celestial bodies Similarity between corresponding texts; 2) Spring force C medical entity type poles are uniformly distributed on the circumference of the star map. Each celestial body is subjected to a spring force based on the proportion of different medical entity types contained in its corresponding entity set, causing the celestial body to move closer to its corresponding pole, thus achieving semantic clustering; the calculation formula is: ; in, celestial bodies The corresponding entity set The number of medical-like entities, celestial bodies The total number of entities in the corresponding entity set. The magnitude of the unit force From celestial bodies Pointing to the extreme point of the entity type The unit direction vector, celestial bodies Subject to the total elasticity of all medical entity types at their poles; 3) Collision force Used to avoid overlapping and obscuring between stars, ensuring a clear distribution of stars in the star map. It is applied only when stars overlap with each other. The more they overlap, the greater the repulsive force. When two stars are only adjacent and do not overlap, the collision force is zero. Ultimately, the net force acting on each celestial body for: 。 8. The data architecture and visual analysis method based on multi-level medical text according to claim 1, characterized in that, In step S6, the constellation focusing visual analysis specifically includes: S6a: When a user selects a constellation, a snapshot of the constellation diagram structure layout is stored; S6b: For each celestial body, mark its paragraph number in the original text according to the order in which it appears in the document, with the number corresponding to the paragraph mark in the original text; S6c: The shade of the border color of a star represents the number of entities it contains. The darker the color, the more entities it contains. The width of the line connecting stars is proportional to the number of entities that coexist between them. S6d: Different types of core medical entities in medical paragraphs are highlighted with different colors to help quickly obtain key information; S6e: Provides an interactive menu that uses the current constellation as the basic unit of analysis to perform relational queries between graphs and further analyze the relationships between entity knowledge.