A method for visual text search based on hybrid data model

By constructing a hypergraph hybrid model and a visual semantic mapping engine, the problem of integrating structured knowledge graphs and semantic vector retrieval results in existing retrieval systems has been solved. This has enabled deep integration and interactive display of multi-source data, improving retrieval efficiency and accuracy, and meeting users' needs for multi-dimensional information retrieval.

CN122087102APending Publication Date: 2026-05-26YIMING UNIVERSAL TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
YIMING UNIVERSAL TECH (BEIJING) CO LTD
Filing Date
2026-03-03
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing retrieval systems struggle to effectively integrate structured knowledge graphs and semantic vector retrieval results, lack the ability to deeply integrate and interactively display multi-source data, fail to meet users' needs for factual queries and semantic exploration, and lack adaptive capabilities, resulting in insufficient retrieval efficiency and accuracy.

Method used

A visual text search method based on a hybrid data model is adopted. By constructing a hypergraph hybrid model, graph databases and vector databases are deeply integrated. Global identifiers are used for association to generate structured and semantic similarity retrieval instructions. Combined with a visual semantic mapping engine, a dynamic and interactive visual retrieval view is realized.

Benefits of technology

It achieves high-precision semantic similarity matching and complex relationship path query, has query intent awareness and adaptive capabilities, enhances the understandability and explorability of information, supports standardized processing and integration of multi-source heterogeneous data, and provides an efficient, intuitive and interactive text search solution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122087102A_ABST
    Figure CN122087102A_ABST
Patent Text Reader

Abstract

This invention relates to the field of information retrieval and data visualization technology, and discloses a visual text search method based on a hybrid data model. The method includes: constructing a hypergraph hybrid model by associating a graph database and a vector database using global identifiers; identifying the intent of user queries; generating structured search instructions for the graph database and semantic similarity search instructions for the vector database; fusing and expanding the two types of search results based on global identifiers to form a search result set containing an extended knowledge graph, a list of semantic vectors, and traceable links between them; and finally, converting the result set into a dynamic and interactive visual view according to predefined mapping rules and a hybrid mechanics layout algorithm. This invention effectively unifies semantic retrieval and relational retrieval, improves the comprehensiveness and accuracy of retrieval, and significantly enhances the depth of information understanding and user experience through intelligent visualization and interaction mechanisms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information retrieval and data visualization technology, and in particular to a visual text search method based on a hybrid data model. Background Technology

[0002] With the rapid development of information technology, the integration and retrieval of multi-source heterogeneous data (such as structured databases, unstructured documents, semi-structured logs, etc.) face challenges. Traditional keyword matching retrieval methods are difficult to understand the deep semantics and contextual relationships of text. Knowledge graph technology and vector retrieval technology have made progress in structured relation reasoning and semantic similarity matching, respectively, but the two lack effective integration and cannot simultaneously meet users' needs for factual queries and semantic exploration.

[0003] In existing retrieval systems, graph database-based retrieval methods can effectively express complex relationships between entities, but they have limitations in handling semantic ambiguity and similarity matching of unstructured text. On the other hand, while vector database-based semantic retrieval methods can capture the semantic information of text and achieve similar content recall, they are difficult to effectively utilize entity relationships and logical constraints in structured knowledge, resulting in retrieval results lacking support and interpretability from structured information.

[0004] Most current visualization retrieval systems focus on displaying a single data model and lack the ability to deeply integrate and interactively display structured knowledge graphs and semantic vector retrieval results. Users find it difficult to intuitively understand the semantic relationships between retrieval results, which limits the depth of information retrieval and user experience.

[0005] Furthermore, existing retrieval methods typically employ fixed retrieval strategies, failing to dynamically adjust retrieval modes and parameters based on user query intent. They also lack adaptability for different query types, such as those emphasizing factual relationship queries and those emphasizing semantic content exploration, resulting in suboptimal retrieval efficiency and accuracy. Therefore, there is an urgent need for a novel text search method that can integrate multi-source data, support joint semantic and relational retrieval, and possess intelligent visualization and interactive capabilities to improve the intelligence level of information retrieval and user satisfaction. Summary of the Invention

[0006] The purpose of this invention is to propose a visual text search method based on a hybrid data model to solve the problems in the prior art.

[0007] To achieve the above objectives, the present invention adopts the following technical solution: a visual text search method based on a hybrid data model, comprising the following steps: S1 receives multi-source data and extracts text semantic vectors, metadata fields, knowledge entities and semantic relationships between entities. It uses a graph database to store knowledge entities and semantic relationships between entities, and a vector database to store text semantic vectors and metadata fields. It also uses a global identifier to associate data objects in the two types of databases to build a hypergraph hybrid model. S2 receives and parses the query statement input by the user, and generates structured retrieval instructions for graph databases and semantic similarity retrieval instructions for vector databases; S3. Based on the structured retrieval instructions and semantic similarity retrieval instructions, retrieve retrieval results from the graph database and vector database respectively, and fuse the retrieval results according to the global identifier to obtain a retrieval result set. The retrieval result set includes related knowledge entities, semantic relationships between entities, and semantic similarity information. S4. Input the search result set into the visual semantic mapping engine, and convert the search result set into a dynamic and interactive visual search view in real time according to the predefined mapping rules.

[0008] The beneficial effects of the technical solution provided by this invention include at least the following: This invention achieves deep integration and bidirectional association between graph databases and vector databases by constructing a hypergraph hybrid model. This method not only supports complex relational path queries but also achieves high-precision semantic similarity matching, overcoming the limitations of single data model retrieval and meeting users' needs for multi-dimensional information retrieval.

[0009] This invention possesses query intent perception and adaptive retrieval capabilities. It can dynamically adjust the strategies and parameters of structured retrieval and semantic retrieval based on the semantic tendency of the user's query. Through intelligent identification and quantitative scoring of query intent, it automatically optimizes retrieval depth, similarity threshold, and number of returned results, thereby achieving efficient and accurate retrieval in different scenarios such as factual queries and semantic exploration.

[0010] This invention constructs a visual retrieval view by combining a hybrid mechanics layout algorithm with a two-way interactive linkage mechanism, realizing the deep integration and dynamic exploration of retrieval results. Users can not only intuitively understand the semantic relationships and topological structures between knowledge entities, but also achieve cross-view linkage interaction by clicking on nodes or vector entries, enhancing the comprehensibility and explorability of information.

[0011] In summary, this invention supports the standardized processing and integration of multi-source heterogeneous data, is applicable to various practical business scenarios, has good engineering feasibility and scalability, and provides an efficient, intuitive, and interactive text search solution with broad application prospects and promotional value. Attached Figure Description

[0012] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is a flowchart of a method provided in an embodiment of the present invention. Detailed Implementation

[0014] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a visual text search method based on a hybrid data model proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0015] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0016] The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.

[0017] The following description, in conjunction with the accompanying drawings, details a specific scheme for a visual text search method based on a hybrid data model provided by this invention.

[0018] Please see Figure 1 The diagram illustrates a flowchart of a visual text search method based on a hybrid data model, according to an embodiment of the present invention. The method includes the following steps: S1 receives multi-source data and extracts text semantic vectors, metadata fields, knowledge entities and semantic relationships between entities. It uses a graph database to store knowledge entities and semantic relationships between entities, and a vector database to store text semantic vectors and metadata fields. It also uses a global identifier to associate data objects in the two types of databases to build a hypergraph hybrid model. S2 receives and parses the query statement input by the user, and generates structured retrieval instructions for graph databases and semantic similarity retrieval instructions for vector databases; S3: Based on the structured search instructions and semantic similarity search instructions, retrieve search results from the graph database and vector database respectively, and fuse the search results according to the global identifier to obtain a search result set. The search result set contains related knowledge entities, semantic relationships between entities and semantic similarity information. S4 inputs the search result set into the visual semantic mapping engine, and converts the search result set into a dynamic and interactive visual search view in real time according to the predefined mapping rules.

[0019] In one embodiment of the present invention, the steps of receiving multi-source data and extracting text semantic vectors, metadata fields, knowledge entities, and semantic relationships between entities, storing knowledge entities and semantic relationships between entities in a graph database, storing text semantic vectors in a vector database, and associating data objects in the two types of databases through global identifiers to construct a hypergraph hybrid model include: Standardize multi-source data to extract text semantic vectors, metadata fields, knowledge entities, and semantic relationships between entities; Assign a first global identifier to each knowledge entity, construct a knowledge graph with knowledge entities as nodes, semantic relationships between entities as edges, and the first global identifier as an index, and store it in a graph database; Assign a second global identifier to the text semantic vector, and store the text semantic vector, metadata field, and second global identifier in the vector database; Establish a mapping relationship between the second global identifier and the first global identifier, associate the graph database with the vector database, and construct a hypergraph hybrid model.

[0020] It should be noted that, in this embodiment, multi-source data includes structured data (such as database tables, CSV files), semi-structured data (such as JSON, XML, log files), and unstructured text data (such as PDF, Word documents, web page content). Standardization processing includes data cleaning, format unification, text preprocessing, and dependency parsing using syntactic analysis tools such as spaCy or StanfordCoreNLP to provide structural support for subsequent entity relation extraction.

[0021] The Sentence-BERT language model is used to extract semantic vectors from text, including: segmenting each document or text paragraph into sentences, generating vectors for each sentence using Sentence-BERT, and using sliding window or pooling strategies to generate overall vectors for long texts. Finally, all generated vectors are normalized.

[0022] Metadata fields refer to descriptive information related to text content, including but not limited to: basic metadata: document ID, creation time, modification time, author and source; content metadata: keywords, topic category, language type and sentiment tags; system metadata: file size, format and storage path; Methods for extracting metadata fields include: reading directly from document attributes, extracting from document headers and footers using regular expressions or template matching methods, and extracting from document content based on general machine learning models such as TextRazor and GATE.

[0023] The methods for extracting knowledge entities and relationships include: using spaCy's NER model to identify entity types, extracting relationships between entities based on dependency syntax and rule templates, predefining a relationship system according to business scenarios (such as "belongs to", "cooperates", "manufactures", "influences", etc.), and storing entities as nodes and relationships as typed edges.

[0024] The identifier allocation rules are as follows: The first global identifier (GID_G, the same below): adopts the form of "type prefix + UUIDv4"; The second global identifier (GID_V, the same below) adopts the form of "vector prefix + timestamp + MD5 (first 100 characters of text)"; Mapping table: A mapping table between GID_G and GID_V is maintained in a relational database that supports bidirectional queries. In this embodiment, PostgreSQL is used as the relational database, Neo4j is used as the graph database, and Milvus 2.0 is used as the vector database.

[0025] In one embodiment of the present invention, the steps of establishing a mapping relationship between a second global identifier and a first global identifier, associating a graph database with a vector database, and constructing a hypergraph hybrid model include: Extract key information items for entity association from the metadata fields stored in the vector database; Perform a retrieval in the knowledge graph of the graph database to obtain knowledge entity nodes that match the key information items. Use the key information items as the query key and the knowledge entity nodes as the values ​​to generate key-value pairs. Create a mapping record for each key-value pair and store it in an associated mapping table. Each mapping record is associated with a first global identifier and a second global identifier. Based on the association mapping table, in the knowledge entity node attributes of the graph database, the set of all associated second global identifiers is extended to form a graph-to-vector reference list. Based on the association mapping table, the metadata of the stored entries in the vector database is expanded to include a set of all first global identifiers associated with each entry, forming a vector-to-graph reference list. A hypergraph hybrid model is constructed using an association mapping table and a bidirectional extended storage reference list.

[0026] It should be noted that each text semantic vector entry stored in the vector database is accompanied by a metadata field. In this embodiment, key information items used to associate with knowledge entities are parsed from the metadata field, including entity name, entity unique code, time-entity combination key, etc. The parsing process is implemented through metadata matching template or regular expression matching to ensure that the extracted information items are unique and associative. Using the extracted key information items as query conditions, a Cypher query is executed in the graph database to find matching knowledge entity nodes. Each matching result forms a key-value pair, where the key is the key information item and the value is the corresponding knowledge entity node and its GID_G. For each key-value pair, a mapping record is created in the relational database and stored in the association mapping table. Each mapping record explicitly associates a GID_G and a GID_V. The structure of the association mapping table is shown in Table 1. Table 1: Example of an association mapping table structure

[0027] In the vector database, a key is added to the metadata field of each vector entry to store all GID_G sets associated with that vector, forming a vector-to-graph reference list. This supports locating related entity nodes from the vector retrieval results. Through the above association mapping table and reference list, a hypergraph hybrid model is constructed. This model is essentially a logical hypergraph structure, where hypernodes include knowledge entity nodes and text vector nodes. Hyperedges are implemented through GID mapping to represent semantic relationships and support compound queries and visual linkage.

[0028] In one embodiment of the present invention, the steps of receiving and parsing a user-input query statement and generating a structured retrieval instruction for a graph database and a semantic similarity retrieval instruction for a vector database include: The query input by the user is preprocessed to obtain a word segmentation sequence, and the named entities, relational keywords and overall intent of the query are identified. The overall intent is quantified into a score that represents the degree of emphasis on structured facts. Based on the identified named entities and relational keywords, structured retrieval instructions are constructed according to the query language specifications of graph databases; The original query statement is encoded into a query semantic vector, and a semantic similarity retrieval instruction is constructed based on the query semantic vector.

[0029] The specific query patterns and depths of structured search commands, as well as the similarity thresholds and maximum number of returned results for semantic similarity search commands, are dynamically configured based on the overall intent score. The dynamic configuration steps include: When the score is greater than or equal to the first preset threshold, it is determined that the query statement focuses on structured facts. At this time, the structured search instruction is configured to include a multi-hop relationship path query mode, and the similarity threshold of the semantic similarity search instruction is configured to a first configuration value that is greater than the corresponding default configuration value. When the score is less than or equal to the second preset threshold, it is determined that the query statement focuses on semantic content. At this time, the structured search command is simplified to a mode of verifying the existence of the identified named entities, and the maximum number of returned results of the semantic similarity search command is configured to a second configuration value that is greater than the corresponding default configuration value. When the score is less than the first preset threshold but greater than the second preset threshold, the above two search instructions are generated using the default mode and the default configuration value.

[0030] It should be noted that in this embodiment, the user-input query (such as "What are Tsinghua University's partner institutions in the field of artificial intelligence?") first undergoes the following preprocessing: (1) Word segmentation: Use open-source word segmentation tools such as jieba and HanLP to obtain the word segmentation sequence from the query statement; (2) Named entity recognition: Use spaCy or BERT-CRF models to identify named entities in the segmented sequence; (3) Relational keyword extraction: Based on dependency parsing and keyword database matching, relational keywords are extracted; (4) Intent score calculation: A lightweight intent classification model based on FastText or fine-tuned BERT outputs an intent score between 0 and 1, which represents the degree of emphasis of the query on structured facts. The higher the intent score, the more the query is biased towards structured facts (such as factual and relational questions), and the lower the intent score, the more the query is biased towards semantic content (such as conceptual and descriptive questions).

[0031] Based on the identified named entities and relational keywords, graph database query instructions are generated, such as: identifying entities ["Tsinghua University", "Artificial Intelligence"]; identifying relational keywords ["Cooperation", "Field"]; Using the same semantic encoding model as the vector database, the original query statement is encoded into a query semantic vector to construct a semantic similarity retrieval instruction; Dynamically configure retrieval parameters based on the intent score value. In this embodiment, set the first preset threshold T1 = 0.7 and the second preset threshold T2 = 0.3; Case A: The intent score value ≥ T1 (emphasis on structured facts). Expand the structured retrieval instruction into a multi-hop relationship path query mode, and increase the threshold of the semantic similarity retrieval instruction to 0.85 (0.7 under the default configuration) to obtain more relevant texts; Case B: The intent score value ≤ T2 (emphasis on semantic content). Simplify the structured retrieval instruction into an entity existence verification mode, that is, only verify whether the entity exists in the graph, and increase the maximum number of returned results of the semantic similarity retrieval instruction to 50 (10 under the default configuration) to expand the semantic retrieval coverage; Case C: T2 < intent score value < T1 (balanced intent). Adopt the following default configuration: The structured retrieval instruction is a single-hop relationship query mode, the threshold of the semantic similarity retrieval instruction is 0.7, and the maximum number of returned results is 10.

[0032] As an implementation manner of the present invention, the steps of obtaining retrieval results from the graph database and the vector database respectively according to the structured retrieval instruction and the semantic similarity retrieval instruction, and fusing the retrieval results based on the global identifier to obtain a retrieval result set, where the retrieval result set includes associated knowledge entities, semantic relationships between entities, and semantic similarity information are as follows: Obtain an initial graph result set from the graph database according to the structured retrieval instruction. The initial graph result set includes the retrieved knowledge entities and the semantic relationships between entities; Obtain an initial vector result set from the vector database according to the semantic similarity retrieval instruction. The initial vector result set contains text semantic vectors sorted by similarity, their corresponding metadata fields, and the second global identifier; Extract the corresponding first global identifier from the knowledge entities in the initial graph result set to form a first identifier set; Extract the first global identifier corresponding to the associated knowledge entity from the metadata of the initial vector result set to form a second identifier set; Perform a set intersection operation on the first identifier set and the second identifier set to obtain a basic core identifier set; Filter and sort the identifiers in the basic core identifier set according to the preset entity importance weight, and select the top N identifiers as the optimized core association identifier set; Construct an extended query statement according to each identifier in the optimized core association identifier set. The query statement is used to retrieve all adjacent entities directly connected to the knowledge entity corresponding to the identifier and their connection relationships; Submit all constructed extended query statements to the graph database to obtain multiple sets of first-degree relation subgraphs; After merging multiple sets of one-degree relation subgraphs, the duplicates are removed from the initial graph result set to generate an extended graph.

[0033] Based on the mapping relationship of global identifiers, a traceable link relationship is established between each knowledge entity in the extended graph and its associated initial vector result set; The extended graph, initial vector result set, and traceable link relationships are encapsulated into a retrieval result set.

[0034] It should be noted that, in this embodiment, a query is submitted to the graph database according to the generated structured retrieval instructions, and an initial graph result set is returned in JSON format, including a list of knowledge entities and a list of semantic relationships between entities; Based on the generated semantic similarity retrieval instructions, a query is submitted to the vector database, and an initial vector result set is returned, including: text semantic vectors sorted in descending order of similarity, corresponding metadata fields, and a second global identifier; Extract the GID_G of each knowledge entity from the initial graph result set to form the first identifier set (Set_G). Extract all GID_G from the linked_entity_ids field of each vector entry in the initial vector result set to form a second identifier set (Set_V). Calculate the intersection of Set_G and Set_V to obtain the basic core identifier set (Core_Set).

[0035] In this embodiment, the importance weight of an entity is calculated based on the priority preset in the business logic (e.g., "person" > "organization" > "location"). The weight score is calculated for each GID_G in the Core_Set, and the entities are sorted in descending order of the scores. The top N (e.g., N=10) identifiers are selected as the optimized core association identifier set (Optimized_Core_Set). An extended query statement is constructed for each GID_G in the Optimized_Core_Set. The extended query statement is submitted to the graph database to obtain the first-degree relationship subgraph of the entity. All first-degree relationship subgraphs are merged and then deduplicated in terms of nodes and relationships with the initial graph result set to generate an extended graph. Based on the global identifier mapping table, a link relationship is established between the vector entries associated with each entity in the initial vector result set for each entity in the extended graph. This link relationship is stored in the form of a dictionary or graph attributes. The final retrieval result set is a structured data object containing the extended graph, the initial vector result set, and traceable link relationships.

[0036] In one embodiment of the present invention, the step of inputting the retrieval result set into a visual semantic mapping engine and converting the retrieval result set into a dynamic and interactive visual retrieval view in real time according to predefined mapping rules includes: Extract the extended graph, initial vector result set, and traceable link relationships from the search result set; Load the predefined visual encoding rule library and perform the following mappings: map each knowledge entity in the extended graph to a visual node according to its type, and map the semantic relationship between entities to a visual edge connecting the corresponding visual node according to the type of semantic relationship between entities in the extended graph. Based on the text semantic vectors in the initial vector result set, the semantic similarity matrix between knowledge entities is calculated. Based on the semantic similarity matrix and the topological structure of the extended graph, the coordinates of each visual node are calculated through a preset force-guided layout algorithm. The visual nodes and visual edges that have completed visual encoding and spatial layout are rendered to generate the main knowledge graph view. The initial vector result set is rendered as a list view of associated vectors, and the interaction logic between the main knowledge graph view and the list view of associated vectors is established based on traceable links, outputting a dynamic and interactive visual retrieval view.

[0037] It should be noted that in this embodiment, visualization rendering libraries such as D3.js, ECharts, or G6 are used to draw visual nodes and visual edges on the canvas to generate the main knowledge graph view. The view supports: zooming, panning, dragging, displaying node attributes (such as name, type, and number of associated vectors) on hover, and displaying relationship type and weight on edge hover. The initial vector result set is rendered as a list view of associated vectors, located in the sidebar of the main view, displaying: text summary (from metadata), similarity score (in the form of a progress bar), and associated entity labels (looked up in reverse via Traceable_Links). Based on traceable links, a two-way interaction between the main knowledge graph and the list of associated vectors is achieved, including: Graph → List Linkage: When a user clicks on a node in the main knowledge graph, all vector entries associated with that node are highlighted and filtered in the related vector list view. List → Knowledge Graph Linkage: When a user clicks on a vector entry in the associated vector list, all entity nodes and connection paths associated with that vector are highlighted in the main knowledge graph view.

[0038] In one embodiment of the present invention, the step of calculating the coordinates of each visual node based on the semantic similarity matrix and the topological structure of the extended graph, using a preset force-guided layout algorithm, includes: Construct a hybrid mechanics model, which consists of the following components: (a) Layout forces generated by the topology based on the extended graph; (b) Semantic attractiveness, which is positively correlated with semantic similarity values, generated based on the semantic similarity matrix; (c) Repulsive forces between nodes generated based on the charge model; By using a hybrid mechanics model, the motion of each node under the action of the hybrid mechanics model is iteratively calculated until the system reaches an equilibrium state, thereby determining the coordinates of each visual node.

[0039] It should be noted that the hybrid mechanics model consists of the following three component forces, the resultant of which acts on each visual node: (a) Layout force (based on topology), which simulates the "spring force" of an edge on the nodes at both ends of the graph, and follows Hooke's Law:

[0040] In the formula, For layout power, , For two visual nodes that have an edge, , For nodes , The position vector, The ideal length of the edge (usually proportional to the relation weight, configurable). The spring constant; (b) Semantic attraction (based on the similarity matrix), which makes nodes with high semantic similarity appear visually close, even if they are not connected by edges in the graph:

[0041] In the formula, For semantic appeal, For nodes , semantic similarity, This is the semantic attraction coefficient (used to control the degree of influence of semantic similarity); (c) Internode repulsive force (based on charge model), which simulates electrostatic repulsion between nodes to prevent node overlap:

[0042] In the formula, It is the repulsive force between nodes. This is the repulsion coefficient (used to control the repulsion strength between nodes). In this embodiment, the initial position of the visual node can be randomly generated or uniformly distributed within a circular / rectangular region. The maximum number of iterations is set to 500, and the energy convergence threshold is set to... The node displacement threshold is set to 0.01, and the configuration is as follows. , , .

[0043] In each iteration, perform the following operation on each node to calculate its net force:

[0044] In the formula, The net force acting on node u. Let u represent the set of nodes connected to u, and V be the set of all nodes. Update the node velocity and position according to Newton's second law, and apply velocity decay to avoid system oscillation:

[0045]

[0046] In the formula, For node quality, The iteration time step, and These are the updated node speed and position, respectively. and These represent the node's velocity and position at the current time step; In this embodiment, the configuration =1, The value is 0.1, and the damping coefficient for velocity decay is 0.95.

[0047] Iteration stops when any of the following conditions are met: All nodal displacements are less than the nodal displacement threshold. ); The total kinetic energy of the system is less than the energy convergence threshold ( ); Reaching the maximum number of iterations; The final node position is output as two-dimensional plane coordinates for visualization rendering.

[0048] As one embodiment of the present invention, the step of establishing the interaction logic between the main knowledge graph view and the associated vector list view based on traceable link relationships includes: Listen for node selection events by users in the main knowledge graph view, generate and send the first control command to the associated vector list view based on traceable link relationships, so that it only displays and highlights the vector result items associated with the selected node; Listen for user item selection events in the associated vector list view, generate and send a second control command to the main knowledge graph view based on traceable link relationships, so that it highlights the entity nodes and connection paths associated with the selected item; A threshold control is provided to receive a link strength threshold set by the user and to filter the traceable link relationships used to generate the first control command and the second control command based on the threshold.

[0049] It should be noted that in this embodiment, the event of a user clicking on a visual node in the main knowledge graph view is captured using addEventListener or the front-end event listening mechanism built into the visualization library. The GID_G of the selected node is obtained, and the GID_V list of all vector entries associated with the node is searched according to the traceable link relationship dictionary. A first control instruction is generated, and the first control instruction is sent to the associated vector list view through the message bus or by directly calling the view update function. After receiving the first control instruction, the vector list view performs the following actions: Highlight matching vector entries in the associated vector list view (e.g., change background color, thicken border), scroll to the first matching vector entry to ensure its visibility, and hide or gray out other non-associated vector entries.

[0050] Simultaneously, the system listens for events where a user clicks on a vector entry in the associated vector list view, retrieves the GID_V of the selected entry, searches for the GID_G list of all entity nodes associated with that vector based on the reverse mapping of the traceable link relationship dictionary, generates a second control command, and sends the second control command to the main knowledge graph view. Upon receiving the second control command, the main knowledge graph view performs the following actions: Highlight the corresponding visual nodes in the main knowledge graph view (e.g., zoom in, change color, add pulsating animation). If there is a connection between the highlighted visual nodes, highlight the connection path between these nodes (even if the path passes through unselected nodes). Automatically pan and zoom the view to center all highlighted nodes in the field of view and reduce the transparency of other nodes and edges.

[0051] In addition, a threshold control (such as a slider) is provided in the user interface, allowing users to set a link strength threshold (ranging from 0.0 to 1.0). The link strength is calculated based on the semantic similarity score. When the user adjusts the threshold, the system dynamically filters traceable link relationships, retaining only links with a strength ≥ the link strength threshold, updates the link data used to generate the first and second control instructions, and refreshes the filtering and highlighting status of the current view in real time. For example, if the user sets the link strength threshold to 0.8, only the association of knowledge entity-vector entries with a semantic similarity score ≥ 0.8 will be displayed. In addition, a "Reset" button is provided in the user interface to clear all filters and highlights and restore the initial view. Anti-shake technology is used during the interaction to maintain the smoothness of the view.

[0052] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A visual text search method based on a hybrid data model, characterized in that, The method includes: S1 receives multi-source data and extracts text semantic vectors, metadata fields, knowledge entities and semantic relationships between entities. It uses a graph database to store knowledge entities and semantic relationships between entities, and a vector database to store text semantic vectors and metadata fields. It also uses a global identifier to associate data objects in the two types of databases to build a hypergraph hybrid model. S2 receives and parses the query statement input by the user, and generates structured retrieval instructions for graph databases and semantic similarity retrieval instructions for vector databases; S3. Based on the structured retrieval instructions and semantic similarity retrieval instructions, retrieve retrieval results from the graph database and vector database respectively, and fuse the retrieval results according to the global identifier to obtain a retrieval result set. The retrieval result set includes related knowledge entities, semantic relationships between entities, and semantic similarity information. S4. Input the search result set into the visual semantic mapping engine, and convert the search result set into a dynamic and interactive visual search view in real time according to the predefined mapping rules.

2. The visual text search method based on a hybrid data model according to claim 1, characterized in that: The steps involved in constructing a hypergraph hybrid model include: receiving multi-source data and extracting text semantic vectors, metadata fields, knowledge entities, and semantic relationships between entities; storing knowledge entities and semantic relationships between entities in a graph database; storing text semantic vectors in a vector database; and associating data objects between the two databases using global identifiers. The multi-source data is standardized to extract text semantic vectors, metadata fields, knowledge entities, and semantic relationships between entities; Assign a first global identifier to each knowledge entity, construct a knowledge graph with the knowledge entity as a node, the semantic relationship between the entities as an edge, and the first global identifier as an index, and store it in a graph database; A second global identifier is assigned to the text semantic vector, and the text semantic vector, metadata field, and second global identifier are stored in the vector database; Establish a mapping relationship between the second global identifier and the first global identifier, associate the graph database with the vector database, and construct a hypergraph hybrid model.

3. The visual text search method based on a hybrid data model according to claim 2, characterized in that: The steps of establishing a mapping relationship between the second global identifier and the first global identifier, associating the graph database with the vector database, and constructing a hypergraph hybrid model include: Key information items for entity association are parsed from the metadata fields stored in the vector database; A retrieval is performed in the knowledge graph of the graph database to obtain knowledge entity nodes that match the key information item. Key-value pairs are generated using the key information item as the query key and the knowledge entity node as the value. For each key-value pair, a mapping record is created and stored in an associated mapping table. Each mapping record is associated with a first global identifier and a second global identifier. Based on the association mapping table, the knowledge entity node attributes in the graph database are expanded to store a set of all associated second global identifiers, forming a graph-to-vector reference list; Based on the association mapping table, the metadata of the stored entries in the vector database is expanded to include a set of all first global identifiers associated with each entry, forming a vector-to-graph reference list. The hypergraph hybrid model is constructed using the associated mapping table and the bidirectional extended storage reference list.

4. The visual text search method based on a hybrid data model according to claim 1, characterized in that: The steps of receiving and parsing user-input query statements to generate structured retrieval instructions for graph databases and semantic similarity retrieval instructions for vector databases include: The query statement input by the user is preprocessed to obtain a word segmentation sequence, and the named entities, relational keywords and overall intent of the query statement are identified. The overall intent is quantified into a score that represents the degree of emphasis on structured facts. Based on the identified named entities and relational keywords, a structured retrieval instruction is constructed according to the query language specification of the graph database; The query statement is encoded into a query semantic vector, and a semantic similarity retrieval instruction is constructed based on the query semantic vector.

5. The visual text search method based on a hybrid data model according to claim 4, characterized in that: The specific query mode and depth of the structured search command, as well as the similarity threshold and maximum number of returned results of the semantic similarity search command, are dynamically configured based on the overall intent score. The dynamic configuration steps include: When the score value is greater than or equal to the first preset threshold, it is determined that the query statement focuses on structured facts. At this time, the structured retrieval instruction is configured to include a multi-hop relationship path query mode, and the similarity threshold of the semantic similarity retrieval instruction is configured to a first configuration value that is greater than the corresponding default configuration value. When the score is less than or equal to the second preset threshold, it is determined that the query statement focuses on semantic content. At this time, the structured search instruction is simplified to a mode of verifying the existence of the identified named entities, and the maximum number of returned results of the semantic similarity search instruction is configured to a second configuration value that is greater than the corresponding default configuration value. When the score value is less than the first preset threshold and greater than the second preset threshold, the above two search instructions are generated using the default mode and the default configuration value.

6. The visual text search method based on a hybrid data model according to claim 1, characterized in that: The steps of obtaining search results from graph databases and vector databases according to the structured search instructions and semantic similarity search instructions, and fusing the search results according to the global identifier to obtain a search result set, wherein the search result set includes related knowledge entities, semantic relationships between entities, and semantic similarity information, include: According to the structured retrieval instructions, an initial graph result set is obtained from the graph database. The initial graph result set includes the retrieved knowledge entities and semantic relationships between entities. According to the semantic similarity retrieval instruction, an initial vector result set is obtained from the vector database. The initial vector result set contains text semantic vectors sorted by similarity, and their corresponding metadata fields and a second global identifier. Extract the corresponding first global identifiers from the knowledge entities in the initial graph result set to form a first identifier set; From the metadata of the initial vector result set, extract the first global identifier corresponding to the knowledge entity it is associated with, and form the second identifier set; Calculate the intersection of the first identifier set and the second identifier set as the core associated identifier set. Using the core associated identifier set as the anchor point, perform one-degree relation expansion in the graph database to generate an extended graph. Based on the mapping relationship of the global identifier, a traceable link relationship is established between each knowledge entity in the extended graph and the initial vector result set associated with it. The extended graph, the initial vector result set, and the traceable link relationships are encapsulated into the retrieval result set.

7. The visual text search method based on a hybrid data model according to claim 6, characterized in that: The steps of calculating the intersection of the first identifier set and the second identifier set as the core association identifier set, and using the core association identifier set as the anchor point to perform one-degree relation expansion in the graph database to generate an extended graph include: Perform a set intersection operation on the first identifier set and the second identifier set to obtain the basic core identifier set; Based on the preset entity importance weights, the identifiers in the basic core identifier set are filtered and sorted, and the top N identifiers are selected as the optimized core association identifier set. An extended query statement is constructed based on each identifier in the optimized core association identifier set. The query statement is used to retrieve all adjacent entities directly connected to the knowledge entity corresponding to the identifier and their connection relationships. Submit all constructed extended query statements to the graph database to obtain multiple sets of first-degree relation subgraphs; After merging multiple sets of one-degree relation subgraphs, the duplicates are removed from the initial graph result set to generate an extended graph.

8. The visual text search method based on a hybrid data model according to claim 1, characterized in that: The step of inputting the search result set into the visual semantic mapping engine and converting the search result set into a dynamic and interactive visual search view in real time according to predefined mapping rules includes: Extract the extended graph, initial vector result set, and traceable link relationships from the search result set; Load a predefined visual encoding rule library and perform the following mapping: map each knowledge entity in the extended graph to a visual node according to its type, and map the semantic relationship between entities to a visual edge connecting the corresponding visual node according to the type of semantic relationship between entities in the extended graph. Based on the text semantic vectors in the initial vector result set, the semantic similarity matrix between the knowledge entities is calculated. Based on the semantic similarity matrix and the topology of the extended graph, the coordinates of each visual node are calculated using a preset force-guided layout algorithm. The visual nodes and visual edges that have completed visual encoding and spatial layout are rendered to generate the main knowledge graph view. The initial vector result set is rendered as a list view of associated vectors, and based on the traceable link relationship, the interaction logic between the main knowledge graph view and the list view of associated vectors is established to output a dynamic and interactive visual retrieval view.

9. The visual text search method based on a hybrid data model according to claim 8, characterized in that: The steps for calculating the coordinates of each visual node based on the semantic similarity matrix and the topology of the extended graph, using a preset force-guided layout algorithm, include: Construct a hybrid mechanics model, which consists of the following components: (a) Layout forces generated based on the topology of the extended map; (b) Semantic attractiveness, which is positively correlated with the semantic similarity value, generated based on the semantic similarity matrix; (c) Repulsive forces between nodes generated based on the charge model; The motion of each node under the action of the hybrid mechanics model is iteratively calculated until the system reaches equilibrium, thereby determining the coordinates of each visual node.

10. The visual text search method based on a hybrid data model according to claim 8, characterized in that: The step of establishing the interaction logic between the main knowledge graph view and the associated vector list view based on the traceable link relationship includes: Listen for node selection events by the user in the main knowledge graph view, generate and send a first control command to the associated vector list view based on the traceable link relationship, so that it only displays and highlights the vector result items associated with the selected node; Listen for user item selection events in the associated vector list view, and generate and send a second control command to the main knowledge graph view based on the traceable link relationship, so as to highlight the entity node and connection path associated with the selected item; A threshold control is provided to receive a link strength threshold set by the user, and to filter the traceable link relationships used to generate the first control command and the second control command based on the threshold.