Multivariate relationship data processing method, system, medium, device and program product

CN122885248APending Publication Date: 2026-10-09BIOMAP (BEIJING) INTELLIGENCE TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610965484.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-30
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

[0004]综上所述,多元关系数据在传统三元组存储中存在语义割裂和查询复杂度高的问题

Benefits of technology

[0012]本申请实施例通过获取由同一关联关系所关联的至少三个实体构成的目标多元关系组,以及描述关联关系的向量表征;在目标多元关系组中每两个实体之间建立二元边,并为属于同一目标多元关系组的所有二元边分配相同的副标识,将副标识及向量表征作为边属性与对应的二元边关联存储于图数据库中;响应于自然语言查询请求,根据自然语言查询请求提取目标实体,并从图数据库中获取与目标实体直接连接的二元边作为初始关联边;获取初始关联边的边属性中存储的副标识,以副标识为查询键在图数据库中进行属性过滤查询,召回具有相同副标识的全部关联边;根据全部关联边的边属性中的向量表征和全部关联边所连接的实体,得到目标多元关系组的完整关联信息。本申请实施例通过副标识机制将同一多元关系组内的全部二元边进行统一标识并作为边属性存储于图数据库中,查询时仅获取与目标实体直接连接的二元边,再以该边的副标识为查询键进行属性过滤查询,一次性召回具有相同副标识的全部关联边,从而将传统多跳拓扑遍历的指数级查询复杂度降维为单跳查询与属性过滤的组合复杂度,从根本上避免了稠密图谱中的节点爆炸问题;同时,由于副标识机制仅在边属性层面操作,无需改造图数据库底层架构即可在标准属性图上无损表达多元超图关系,且向量表征作为边属性随同存储,使得得到的完整关联信息能够同时包含拓扑结构与语义信息,实现了多元关系的高保真还原与高效查询。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122885248A_ABST
    Figure CN122885248A_ABST
Patent Text Reader

Abstract

The application discloses a kind of multi-element relationship data processing method, system, medium, equipment and program product, the method includes: obtaining the target multi-element relationship group formed by at least three entities associated by the same association relationship, and the vector representation describing the association relationship;Between each two entities in group, binary edge is established, and the same secondary identification is assigned to all binary edges in the same group, and the secondary identification and the vector representation are stored in the graph database as edge attributes and the corresponding binary edge is associated;In response to the extraction of target entity and the initial association edge as the binary edge directly connected with it in response to natural language query request;The secondary identification stored in the edge attribute of initial association edge is obtained, and the attribute filtering query is carried out with the secondary identification as the query key, and all association edges with the same secondary identification are recalled;According to the vector representation of all association edges and the connected entity, complete association information is obtained, query complexity is reduced, lossless expression and efficient query of multi-element relationship are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of knowledge graph and data processing technology, specifically to a method, system, medium, device and program product for processing multi-relationship data. Background Technology

[0002] With the rapid development of artificial intelligence and big data technologies, knowledge graphs have become an important tool for organizing and utilizing massive amounts of structured information, and are widely used in fields such as biomedicine and intelligent retrieval. Traditional knowledge graphs typically store knowledge in the form of "entity-relationship-entity" triples. However, complex knowledge in the real world often involves multiple relationships between three or more entities, such as the combined effect of "drug-gene-disease-side effects" in the biomedical field. This presents numerous challenges to the construction, storage, querying, and reasoning of knowledge graphs.

[0003] In terms of construction, traditional solutions rely on predefined ontology structures (Schemas), predefining entity types and relation sets through a top-down approach. This approach struggles to cover the diverse relational scenarios in rapidly evolving academic disciplines, and the discrete relation type annotations cannot preserve rich semantic details. Regarding storage, mainstream graph databases (such as Neo4j and Nebula) use attribute graph models, supporting only binary relation storage. Diverse relations are forced to be split into multiple triples, leading to the loss of relational context. Restoring complete relations requires multi-hop traversal, resulting in a surge in computational overhead in large-scale graphs. In terms of querying, when converting natural language to multi-hop graph queries, the complexity of multi-hop topological traversal in dense graphs increases exponentially with the number of hops, easily triggering "node explosion" and causing query timeouts or memory overflows. In terms of reasoning, graph neural networks and other models assume that all knowledge sources can be propagated indiscriminately during message passing, ignoring the independence of sources. Blindly cross-referencing across sources can easily produce "reasoning illusions" that do not conform to domain rigor.

[0004] In summary, multivariate relational data suffers from semantic fragmentation and high query complexity in traditional triple storage. Summary of the Invention

[0005] This application provides a method, system, medium, device, and program product for processing multivariate relation data. It can uniformly identify binary edges within the same multivariate relation group through a secondary identifier mechanism, and replace multi-hop topological traversal with single-hop query plus secondary identifier attribute recall, thereby reducing query complexity and achieving lossless expression and efficient querying of multivariate relations.

[0006] On one hand, embodiments of this application provide a method for processing multivariate relational data, the method comprising: Obtain a target multi-dimensional relation group consisting of at least three entities associated with the same relation, and a vector representation describing the relation; In the target multi-dimensional relation group, a binary edge is established between every two entities, and all binary edges belonging to the same target multi-dimensional relation group are assigned the same sub-identifier. The sub-identifier and the vector representation are stored in the graph database as edge attributes associated with the corresponding binary edges. In response to a natural language query request, the target entity is extracted according to the natural language query request, and the binary edge directly connected to the target entity is obtained from the graph database as the initial association edge. Obtain the secondary identifier stored in the edge attributes of the initial associated edge, and use the secondary identifier as the query key to perform attribute filtering query in the graph database to recall all associated edges with the same secondary identifier; Based on the vector representations in the edge attributes of all associated edges and the entities connected by all associated edges, the complete association information of the target multivariate relation group is obtained.

[0007] On the other hand, embodiments of this application provide a multi-relationship data processing system, the system comprising: A construction layer module is used to obtain a target multi-dimensional relation group consisting of at least three entities associated with the same relation, and a vector representation describing the relation; The storage layer module is used to establish a binary edge between every two entities in the target multivariate relation group, and to assign the same sub-identifier to all binary edges belonging to the same target multivariate relation group. The sub-identifier and the vector representation are stored in the graph database as edge attributes associated with the corresponding binary edges. The query layer module is used to respond to natural language query requests, extract target entities according to the natural language query requests, and obtain binary edges directly connected to the target entities from the graph database as initial association edges; The inference layer module is used to obtain the secondary identifier stored in the edge attributes of the initial associated edge, and use the secondary identifier as the query key to perform attribute filtering query in the graph database to recall all associated edges with the same secondary identifier. The generation layer module is used to obtain the complete association information of the target multivariate relation group based on the vector representation in the edge attributes of all associated edges and the entities connected by all associated edges.

[0008] On the other hand, this application provides a knowledge question-answering assistant device, which includes a processor and a memory. The memory stores a graph database and a computer program. The graph database stores binary edges and their corresponding edge attributes. The binary edges are established between every two entities in at least three entities within a target multi-entity relation group associated by the same association relationship. All binary edges belonging to the same target multi-entity relation group have the same sub-identifier. The edge attributes of the binary edges include the sub-identifier and a vector representation describing the association relationship. The processor performs the following operations by invoking the computer program: receiving a natural language query request input by the user; extracting the target entity based on the natural language query request; obtaining a binary edge directly connected to the target entity from the graph database as an initial association edge; obtaining the secondary identifier stored in the edge attributes of the initial association edge; performing an attribute filtering query in the graph database using the secondary identifier as the query key; recalling all association edges with the same secondary identifier; obtaining the complete association information of the target multivariate relation group based on the vector representation in the edge attributes of all association edges and the entities connected to all association edges; and outputting the natural language answer information generated based on the complete association information to the user interface.

[0009] On the other hand, an embodiment of this application provides a computer-readable storage medium storing a computer program adapted for loading by a processor to execute the multivariate relational data processing method as described in any of the above embodiments.

[0010] On the other hand, an embodiment of this application provides a computer device, which includes a processor and a memory. The memory stores a computer program, and the processor executes the multivariate relation data processing method as described in any of the above embodiments by calling the computer program stored in the memory.

[0011] On the other hand, an embodiment of this application provides a computer program product, including computer instructions, which, when executed by a processor, implement the multi-relationship data processing method as described in any of the above embodiments.

[0012] This application embodiment obtains a target multi-dimensional relation group consisting of at least three entities associated with the same relationship, and a vector representation describing the relationship; establishes a binary edge between every two entities in the target multi-dimensional relation group, and assigns the same sub-identifier to all binary edges belonging to the same target multi-dimensional relation group, storing the sub-identifier and vector representation as edge attributes associated with the corresponding binary edges in a graph database; responds to a natural language query request, extracts the target entity according to the natural language query request, and obtains the binary edge directly connected to the target entity from the graph database as the initial association edge; obtains the sub-identifier stored in the edge attributes of the initial association edge, performs attribute filtering query in the graph database using the sub-identifier as the query key, and recalls all association edges with the same sub-identifier; obtains the complete association information of the target multi-dimensional relation group based on the vector representation in the edge attributes of all association edges and the entities connected to all association edges. This application embodiment uses a secondary identifier mechanism to uniformly identify all binary edges within the same multivariate relation group and store them as edge attributes in the graph database. During querying, only binary edges directly connected to the target entity are retrieved, and then the secondary identifier of that edge is used as the query key for attribute filtering. This retrieves all associated edges with the same secondary identifier at once, thereby reducing the exponential query complexity of traditional multi-hop topology traversal to a combination of single-hop query and attribute filtering complexity, fundamentally avoiding the node explosion problem in dense graphs. At the same time, since the secondary identifier mechanism only operates at the edge attribute level, it can losslessly express multivariate hypergraph relations on standard attribute graphs without modifying the underlying architecture of the graph database. Furthermore, the vector representation is stored along with the edge attributes, so that the obtained complete association information can simultaneously contain topological structure and semantic information, achieving high-fidelity restoration and efficient querying of multivariate relations. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 This is a schematic diagram of the system architecture of the multi-relationship data processing system provided in the embodiments of this application.

[0015] Figure 2 This is a flowchart illustrating the multivariate relational data processing method provided in an embodiment of this application.

[0016] Figure 3 This is a schematic diagram of a first application scenario of the multivariate relation data processing method provided in the embodiments of this application.

[0017] Figure 4This is a schematic diagram of a second application scenario for the multivariate relational data processing method provided in the embodiments of this application.

[0018] Figure 5 This is a schematic diagram of a third application scenario for the multivariate relation data processing method provided in the embodiments of this application.

[0019] Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0020] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0021] This application provides a method, system, medium, device, and program product for processing multi-variable relational data. Exemplarily, the multi-variable relational data processing method of this application can be executed by a computer device, which can be a terminal or a server. The terminal can be a smartphone, tablet, laptop, personal computer, desktop computer, smart TV, wearable smart device, smart vehicle terminal, etc. The terminal may also include a client, which can be a browser client, instant messaging client, or mini-program, etc. The server can be an independent physical server, a server cluster composed of multiple physical servers, or a distributed system. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0022] The embodiments of this application can be applied to multi-relationship data processing scenarios in fields such as biomedicine, materials science, financial analysis, social network analysis, and supply chain management.

[0023] First, the following explanations are given for some of the nouns or terms that appear in the embodiments of this application: Entities: refer to things or concepts that exist in the objective world and can be independently identified, such as drugs, genes, diseases, side effects, gene mutations, and biomarkers in the biomedical field. In knowledge graphs, they are usually represented in the form of nodes.

[0024] Association: refers to a semantic connection between two or more entities. In this application, the association is a weakly typed association, meaning that a predefined relationship type is not mandatory; only co-occurrence or semantic association between entities is determined.

[0025] A quaternary relation group refers to a set of at least three entities that are associated by the same relation. For example, in the biomedical field, "drug C-gene B-disease D-side effect E" constitutes a quaternary relation group, indicating that these four entities are involved in the same biological fact.

[0026] Binary edges: In graph databases, an edge connects two entities, representing the association between them. In attribute graph databases, each edge can have one or more attributes. This application reduces the dimensionality of multivariate hypergraph relationships by establishing binary edges between every two entities within a multivariate relationship group, representing them as a set of multiple binary edges.

[0027] Secondary identifier: This refers to an identifier stored as an edge attribute, used to identify multiple binary edges belonging to the same multivariate relation group. All binary edges within the same multivariate relation group share the same secondary identifier, while binary edges in different multivariate relation groups have different secondary identifiers. The secondary identifier serves as the hypergraph grouping key, enabling lossless representation of multivariate hypergraph relations on standard attribute graphs.

[0028] Attribute graph: refers to a graph data model in which nodes and edges can have several attributes (i.e., key-value pairs) to store descriptive information related to the nodes or edges. Mainstream graph databases such as Neo4j and Nebula all use the attribute graph model.

[0029] Vector representation: refers to the high-dimensional vector representation obtained by encoding natural language relational description text through a large language model or embedding model. This vector representation serves as a digital carrier of relational semantics, can be stored in the edge attributes of binary edges, and can be restored to natural language description text through a large language model when needed.

[0030] Single-hop graph query statement: refers to a graph query statement with a query depth of 1, that is, only querying binary edges that are directly connected to the target entity node, without performing multi-hop topology traversal.

[0031] Attribute filtering query: This refers to a query method that uses a specific field (such as a secondary identifier) ​​in the edge attributes as the query key to filter and retrieve data in a graph database based on attribute conditions. Unlike topological traversal, attribute filtering query does not depend on the graph's topological structure and can be completed using only indexes or hash lookups.

[0032] Large language model: refers to an artificial intelligence model based on deep learning technology, possessing a large number of parameters and powerful natural language understanding and generation capabilities. The large language model in this application is used for entity recognition, relation determination, vector representation generation, semantic restoration, and natural language question answering generation.

[0033] Intelligent Agent: Refers to an artificial intelligence program module built on a large language model, capable of receiving user instructions and autonomously executing specific tasks. The intelligent agent in this application is used to receive natural language query requests, perform entity extraction, synonym expansion, single-hop graph query statement generation, and the generation and output of natural language answers. The relationship between the intelligent agent and the large language model is as follows: the large language model provides the intelligent agent with underlying natural language understanding and generation capabilities, while the intelligent agent encapsulates the logical arrangement and tool invocation capabilities for specific tasks (such as query understanding, graph query, and answer generation), thereby enabling it to autonomously complete multi-step task processes.

[0034] Graph reasoning refers to the process of information propagation and logical inference based on graph structures on knowledge graphs, including but not limited to message passing in graph neural networks, graph attention networks, and graph convolutional networks. In this application, graph reasoning uses secondary identifier consistency as a constraint condition for information propagation.

[0035] Graph database: refers to attribute graph database that does not natively support hypergraph storage structure. This application uses a secondary identifier edge attribute grouping mechanism to express multi-dimensional hypergraph relationships on it without loss.

[0036] Initial associated edges: These are binary edges that are directly connected to the target entity and retrieved from the graph database when responding to a natural language query. They serve as the entry point for recalling complete multi-dimensional relation groups.

[0037] Homologous inference confidence: refers to the homologous propagation weight calculated based on the influence factor of binary edges within the same sub-label during the information propagation process in graph reasoning. It is used to quantify the reliability of inference results within the same multivariate relation group.

[0038] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the priority of the embodiments.

[0039] Please see Figure 1 , Figure 1 A schematic diagram of the system architecture of the multivariate relation data processing system provided in this application embodiment. The multivariate relation data processing system 100 includes: The construction layer module 110 is used to obtain a target multi-dimensional relation group consisting of at least three entities associated with the same relation, and a vector representation describing the relation. Storage layer module 120 is used to establish a binary edge between every two entities in the target multivariate relation group, and assign the same sub-identifier to all binary edges belonging to the same target multivariate relation group, and store the sub-identifier and the vector representation as edge attributes associated with the corresponding binary edge in the graph database; The query layer module 130 is used to respond to a natural language query request, extract the target entity according to the natural language query request, and obtain the binary edge directly connected to the target entity from the graph database as the initial association edge; The inference layer module 140 is used to obtain the secondary identifier stored in the edge attributes of the initial associated edge, and use the secondary identifier as the query key to perform attribute filtering query in the graph database to recall all associated edges with the same secondary identifier. The generation layer module 150 is used to obtain the complete association information of the target multivariate relation group based on the vector representation in the edge attributes of all associated edges and the entities connected by all associated edges.

[0040] In some embodiments, the construction layer module 110 is configured to: acquire text data to be processed; extract at least three entities and the relationships between the at least three entities from the text data to be processed using a large language model; encode the natural language description text describing the relationships into the vector representation; and take all entities associated with the same relationship as the target multivariate relation group.

[0041] In some embodiments, the construction layer module 110 is used to extract at least three entities and the relationships between the at least three entities from the text data to be processed through a large language model, including: introducing positive example samples with relationships and negative example samples without relationships in the prompt words, and using a few-shot learning method to make the large language model output a binary classification result indicating whether there is a relationship between the entities.

[0042] In some embodiments, the query layer module 130 is used to extract target entities according to the natural language query request, including: constructing an intelligent agent, receiving the natural language query request through the intelligent agent, performing entity extraction and synonym expansion, and calling a standardization service to align the extracted candidate entities to the standard entity names in the graph database to obtain the target entity.

[0043] In some embodiments, the query layer module 130 is configured to obtain binary edges directly connected to the target entity from the graph database as initial associated edges, including: generating a single-hop graph query statement based on the target entity through the agent; executing the single-hop graph query statement in the graph database to obtain binary edges directly connected to the target entity as the initial associated edges.

[0044] In some embodiments, the edge attribute further includes: a source identifier and an influence factor for the association, wherein the source identifier is used to uniquely identify the source of the association, and the influence factor is an indicator that quantifies the credibility of the source of the association.

[0045] In some embodiments, the inference layer module 140 is further configured to: use the consistency of the sub-identifier as a constraint condition for information propagation during the information propagation process of graph inference; perform information propagation redundancy removal processing on binary edges belonging to the same sub-identifier, and calculate the same-source propagation weight according to the influence factor, and use the same-source propagation weight as the quantification value of the confidence of same-source inference; and determine the hetero-source propagation weight according to the influence factor for binary edges belonging to different sub-identifiers.

[0046] In some embodiments, the generation layer module 150 is configured to: extract vector representations stored in the edge attributes of all associated edges; restore the vector representations to natural language relation description text describing the association relationship using a large language model; concatenate the natural language relation description text with the entities connected to all associated edges, the source identifiers, influence factors in the edge attributes, and the confidence level of the co-origin inference to construct global contextual prompts; and generate and output natural language response information containing literature tracing evidence and the confidence level of the co-origin inference based on the global contextual prompts and the natural language query request by an agent.

[0047] In some embodiments, the target multivariate relation group is a target multivariate relation group in the biomedical field, and the entity includes at least one of the following: drug, gene, disease, side effect, gene mutation, biomarker; the association relationship is a multivariate association relationship in the biomedical field, including at least one of the following: efficacy relationship between drug-gene-disease, safety relationship between drug-gene-adverse drug reaction, drug resistance relationship between gene-gene mutation-disease, combination drug relationship between drug-disease, companion diagnostic relationship between biomarker-disease-drug, early warning relationship between biomarker-drug-side effect, early warning relationship between biomarker-drug-adverse drug reaction, variant pathogenesis relationship between gene mutation-gene-disease, and complication and contraindication relationship between drug-disease-disease.

[0048] It should be noted that the functions of each module in the multi-relationship data processing system 100 in this application embodiment can be referred to the specific implementation of any embodiment in the following method embodiments, which will not be repeated here.

[0049] Each unit in the above system can be implemented entirely or partially through software, hardware, or a combination thereof. These units can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each unit.

[0050] For example, the multivariate relation data processing system 100 can be integrated into a terminal or server that has storage and a processor and thus computing power, or the multivariate relation data processing system 100 can be the terminal or server.

[0051] The embodiments of this application will be described in further detail below with reference to specific examples.

[0052] Please see Figures 2 to 5 , Figure 2 This is a flowchart illustrating the multivariate relation data processing method provided in an embodiment of this application. Figures 3 to 5 These are schematic diagrams illustrating application scenarios of the multi-relationship data processing method provided in the embodiments of this application. The method may include the following steps: Step 210: Obtain a target multi-relationship group consisting of at least three entities associated with the same relationship, and a vector representation describing the relationship.

[0053] This step corresponds to the system's construction layer module. It uses a large language model to perform semantic understanding on the input text data, automatically identifying and extracting entities and their relationships. These relationships are weakly typed; the large language model does not force a classification of the relationship type, but only determines whether entities co-occur or are related. Specifically, a small number of example samples (including positive examples with relationships and negative examples without relationships) are introduced into the prompt words. A few-shot learning method is used to enable the large language model to output a binary classification result indicating whether a relationship exists between entities. This weakly typed relationship determination method breaks the limitations of traditional knowledge graphs that rely on predefined ontology structures (schemas), allowing the system to cover the constantly emerging new and diverse relationship types in the text data being processed (such as biomedical literature) without the need for frequent maintenance and updates to the ontology structure.

[0054] For entity groups that are determined to have a relationship, the system further treats all entities associated with the same relationship as a target multi-relationship group, and uses a large language model or embedding model to encode the specific natural language text describing the relationship in the text data to be processed into a high-dimensional vector representation, which is stored in the edge attribute as a digital carrier of relational semantics.

[0055] In some embodiments, obtaining a target multivariate relation group consisting of at least three entities associated with the same relation, and a vector representation describing the relation, includes: obtaining text data to be processed; extracting at least three entities and the relation between the at least three entities from the text data to be processed using a large language model; encoding the natural language description text describing the relation into the vector representation; and taking all entities associated with the same relation as the target multivariate relation group.

[0056] In this embodiment, the source of the text data to be processed is not specifically limited. The text data can be academic literature (such as journal articles, reviews, and clinical trial reports in the biomedical field), patent literature (such as drug compound patents, medical device patents, and treatment method patents), drug review documents (such as the FDA Orange Book, Purple Book, drug instructions, and pharmacovigilance reports), as well as authoritative medical knowledge bases, professional databases, clinical guidelines, online information, and any other text data containing entities and relationships between entities. Although text data from different sources may vary in format and style, they all contain a large amount of entity and multi-faceted relationship information that can be used to construct knowledge graphs. The method provided in this application is compatible with processing text data from any source, and users can flexibly select text data from different sources based on their actual application scenarios and data acquisition channels.

[0057] Specifically, the process of extracting entities and relationships using a large language model is as follows: The model is input with text data to be processed, and prompts explicitly instruct it to identify named entities (such as drug names, gene names, and disease names in the biomedical field) and the semantic relationships between entities. Based on its semantic understanding capabilities gained through pre-training on large-scale corpora, the large language model can automatically identify entity boundaries and semantic relationships between entities in the text, without relying on predefined ontology structures or relation type templates. For entity recognition, the large language model locates and extracts all entity names with independent semantic meanings by understanding the semantic information in the text context. For relationship determination, the large language model comprehensively judges whether there are semantic relationships between entities based on multi-dimensional information such as co-occurrence patterns, syntactic dependencies, and semantic similarity.

[0058] After entity recognition and relation determination, a pre-trained large language model is used for representation reasoning, encoding the natural language descriptive text describing the relations into vector representations. These vector representations are high-dimensional vectors, representing the mathematical representation of the natural language descriptive text, where the value of each dimension reflects the text's features in the corresponding semantic dimension. The encoding process converts the natural language text from a human-readable symbolic form into a computer-computable numerical form while preserving the rich semantic information of the original text. This vector representation, as the semantic carrier of the relations, is stored in the edge attributes of binary edges. In subsequent querying and semantic reconstruction stages, the large language model can decode and reconstruct the natural language relation descriptive text.

[0059] By automatically extracting entities and relationships from text data to be processed using a large language model, and encoding natural language descriptions into vector representations, the automatic and intelligent extraction of multi-relationships can be achieved without manually predefining relationship types or maintaining complex ontology structures. This significantly improves the efficiency and scalability of knowledge graph construction. At the same time, the vector representations retain the rich semantic information of the original text, providing a high-quality data foundation for subsequent semantic restoration and accurate querying.

[0060] In some embodiments, the step of extracting at least three entities and the relationships between the at least three entities from the text data to be processed using a large language model includes: introducing positive examples with relationships and negative examples without relationships into the prompt words, and using a few-shot learning method to make the large language model output a binary classification result indicating whether there is a relationship between the entities.

[0061] Specifically, a small number of labeled samples are introduced into the prompts used to construct the large language model. Positive samples describe scenarios where entities co-occur or are associated (e.g., "Drug A and gene B are mentioned together in the literature, and they have a combined effect with disease C"). Negative samples describe scenarios where entities are not associated (e.g., "Drug A and gene D are not mentioned together in the literature, and they are not directly associated"). A few-shot learning approach is employed, enabling the large language model to perform binary classification to determine whether any two entities are associated, without requiring large-scale labeled data. This approach reduces the cost of model training and deployment, avoids error propagation caused by forced relation classification, and enhances the model's generalization ability across different domains and corpus scenarios.

[0062] In this embodiment, the binary classification result is the direct output of the large language model. Specifically, for any two entities appearing in the text data to be processed, the large language model outputs a binary classification result indicating whether there is a semantic relationship between the two entities (i.e., "relationship exists" or "no relationship exists"), and determines which entities constitute the same multivariate relation group based on this result. After obtaining the binary classification result, it can be further parsed or converted into other output formats. Specifically, for entity pairs judged as "relationship exists," the system can map the result to a corresponding output format according to actual application requirements. For example, outputting entity names (such as "drug C," "gene B," "disease D," "side effect E") and corresponding relational descriptions (such as "drug C is effective against disease D in the context of gene B mutation, but is accompanied by side effect E"), or outputting entity identifiers and relation codes. The difference between the above output formats lies only in the form of information representation (natural language form or machine-readable encoded form); their technical essence is derived from the binary classification result of the large language model. Regardless of the output format used, the large language model must first complete the binary classification judgment to determine whether there is a relationship between entities, and then convert the judgment result into the corresponding output format according to the preset output template.

[0063] In some embodiments, the target multivariate relation group is a target multivariate relation group in the biomedical field, and the entity includes at least one of the following: drug, gene, disease, side effect, gene mutation, biomarker; the association relationship is a multivariate association relationship in the biomedical field, including at least one of the following: efficacy relationship between drug-gene-disease, safety relationship between drug-gene-adverse drug reaction, drug resistance relationship between gene-gene mutation-disease, combination drug relationship between drug-disease, companion diagnostic relationship between biomarker-disease-drug, early warning relationship between biomarker-drug-side effect, early warning relationship between biomarker-drug-adverse drug reaction, variant pathogenesis relationship between gene mutation-gene-disease, and complication and contraindication relationship between drug-disease-disease.

[0064] In the biomedical field, entities can include at least one of the following: drugs, genes, diseases, side effects, gene mutations (SNPs, Indels), biomarkers, proteins, non-coding RNAs (miRNAs, lncRNAs, etc.), enzymes, epigenetic modifications (such as DNA methylation), small chemical molecules, endogenous metabolites, cofactors / coenzymes, phenotypes, adverse drug reactions, biological pathways, biochemical events, biological processes, molecular functions, cellular components, anatomical sites, cell types, cell lines, pathogens, microorganisms, environmental exposures, clinical trials, etc. The above entity types are merely exemplary examples in the biomedical field, and this application does not specifically limit them. Any entity type that can exist as a node in a biomedical knowledge graph can be applied to the methods described in this application.

[0065] The relationships are multi-faceted relationships in the biomedical field, including at least one of the following: The therapeutic relationship between drugs, genes, and diseases is used to describe the efficacy of drugs in a specific gene context. The safety relationship between drugs, genes, and adverse drug reactions is used to describe the risk of adverse drug reactions in a specific genetic background; The drug resistance relationship between genes, gene mutations, and diseases is used to describe the drug resistance mechanisms of diseases caused by gene mutations. Drug-drug-disease combination therapy is used to describe the synergistic or antagonistic effects of multiple drugs used in combination for the treatment of a disease. Companion diagnostic relationships between biomarkers, diseases, and drugs are used to describe how the detection of specific biomarkers can guide drug selection and predict efficacy. The early warning relationship between biomarkers, drugs, and adverse drug reactions describes how the detection of specific biomarkers can provide early warning of potential adverse drug reactions. The targeted regulatory relationship between drugs or small chemical molecules, genes or proteins or non-coding RNAs and biological pathways is used to describe the mechanism by which drugs or small molecules activate or inhibit downstream biological pathways by acting directly on specific target molecules. Epigenetic modification-gene-disease or phenotype epigenetic regulatory pathogenicity relationship is used to describe the mechanism by which epigenetic modifications lead to the occurrence of specific diseases or phenotypes by regulating gene expression. The physical binding and functional involvement between proteins and their molecular functions or biological processes are used to describe the formation of protein complexes and their synergistic effects in specific molecular functions and biological processes. Catalytic metabolic relationships between enzymes or cofactors, biochemical reaction events, and endogenous metabolites are used to describe the biochemical metabolic processes in which enzymes catalyze the conversion of substrates into products with the assistance of cofactors. The pathogenic and clinical manifestation relationship between pathogens or environmental exposures, diseases, and phenotypes is used to describe the causal chain in which external pathogenic factors cause specific diseases and their external clinical symptoms. The pathogenic relationship between gene mutation, gene, and disease is used to describe the molecular genetic mechanism by which a mutation in a specific gene leads to impaired normal physiological function and causes disease. Drug-disease-disease complication and contraindication relationship, used to describe the risk of contraindication to use a drug in the presence of a specific comorbidity or complication; The prevention and symptom relief relationship between drug or environmental exposure-disease-phenotype is used to describe the role of specific interventions in preventing the onset of disease or reducing the clinical symptoms of an existing disease. Spatial expression of genes or proteins in anatomical locations or cell types and their association with disease sites are used to describe the spatial distribution characteristics of molecules in specific tissues or cells and their association with local lesions in those locations. Subcellular localization and structural composition relationships between proteins or endogenous metabolites, cellular components, and anatomical sites are used to describe the localization and distribution of molecules at the subcellular level and their associated macroscopic physical structures. The sample source and molecular expression relationship between cell line, anatomical site or disease, and gene or protein is used to describe the tissue or pathological origin and unique molecular expression characteristics of in vitro cultured cell models. Clinical research relationships between clinical trials, drugs, and diseases are used to describe the research and development progress and evaluation of a specific drug for a specific indication at different stages of clinical trials.

[0066] The multivariate relation data processing method provided in this application is not limited to the biomedical field, but can be applied to any technical field containing multivariate relationships, including but not limited to materials science, financial analysis, social networks, and knowledge graph construction. Biomedical literature is merely one exemplary application scenario of this application; those skilled in the art, after reading this application, will be able to apply the same methodological principles to multivariate relation data processing in other fields.

[0067] In other fields, the entities include entity types from any of the following fields: materials, preparation methods, performance parameters, application scenarios, etc. in the field of materials science; institutions, products, risk factors, regulatory policies, etc. in the field of financial analysis; users, content, behavior, dissemination paths, etc. in the field of social network analysis; suppliers, logistics nodes, products, market demand, etc. in the field of supply chain management.

[0068] This correlation can be a multi-dimensional correlation in any of the following fields: In materials science, the correlation between materials, preparation methods, properties, and application scenarios (used to describe the impact of different preparation methods on material properties and their compatibility with final application scenarios); in financial analysis, the correlation between institutions, products, risks, and regulatory policies (used to describe the risk-return characteristics of products launched by institutions under different regulatory policy environments); in social network analysis, the correlation between users, content, behavior, and dissemination paths (used to describe the dissemination and diffusion patterns and behavioral drivers of user-posted content on social networks); and in supply chain management, the correlation between suppliers, logistics, products, and markets (used to describe the connection and efficiency influencing factors of each logistics link in the process of a product's journey from raw material supply to final market delivery).

[0069] Step 220: Establish a binary edge between every two entities in the target multivariate relation group, and assign the same sub-identifier to all binary edges belonging to the same target multivariate relation group. Store the sub-identifier and the vector representation as edge attributes associated with the corresponding binary edges in the graph database.

[0070] In this step, corresponding to the system's storage layer module, for a target multivariate relation group containing n entities, a binary edge is established between every two entities, ensuring that all entities in the target multivariate relation group are connected by a binary edge, and that all established binary edges share the same identifier. Specifically, C... n 2 The permutation and combination formula determines the number of edges to be built. For a target multi-dimensional relation group containing n entities, n×(n-1) / 2 binary edges are built, ensuring that every pair of entities within the group is connected by a binary edge. Each binary edge is assigned a globally unique "edge primary ID" in the graph database for unique identification. Simultaneously, all binary edges belonging to the same target multi-dimensional relation group are assigned the same "sub-ID" as an edge attribute. This sub-ID logically aggregates multiple binary edges originally belonging to the same hypergraph relation into a single group at the edge attribute level, without requiring modifications to the underlying graph database architecture. Furthermore, vector representations are also stored as edge attributes associated with the corresponding binary edges, enabling each edge to carry both topological connectivity information and relational semantic information.

[0071] Among them, the graph database is an attribute graph database that does not natively support hypergraph storage structure. It uses the edge attribute grouping mechanism of secondary identifier to express multi-dimensional hypergraph relationships on the attribute graph database without loss.

[0072] Taking the biomedical field as an example, a quaternary synergistic relationship involving four entities (drug C, gene B, disease D, and side effects E) can be analyzed according to C. n 2The permutation and combination formula establishes a total of 6 binary edges: drug C-disease D, drug C-gene B, drug C-side effect E, gene B-disease D, gene B-side effect E, and disease D-side effect E. All 6 binary edges are assigned the same sub-label (e.g., X001), thus representing the quaternary hypergraph relationship losslessly in the standard attribute graph.

[0073] In some embodiments, the edge attribute further includes: a source identifier and an influence factor for the association, wherein the source identifier is used to uniquely identify the source of the association, and the influence factor is an indicator that quantifies the credibility of the source of the association.

[0074] The source identifier is used to uniquely identify the origin of the association, and its specific form depends on the source type of the text data to be processed. For example, when the source is academic literature, the source identifier can be the unique identifier of the document; when the source is patent literature, the source identifier can be the patent publication number or application number; when the source is drug review documents, the source identifier can be the drug application number in the FDA Orange Book or Purple Book; when the source is online information, the source identifier can be the Uniform Resource Locator (URL) of the information publishing page or the unique code of the information publishing organization. These source identifiers ensure that each piece of related knowledge can be traced back to its original source, providing a fundamental guarantee for the credibility and traceability of the knowledge graph. It is understood that the specific form of the source identifier can be determined according to the different source types, as long as it can uniquely identify the source of the association; this application does not impose specific limitations on this.

[0075] The impact factor is a quantitative indicator of the credibility of a source of association, and its specific value depends on the type of source. This impact factor includes, but is not limited to: academic journal impact factor, patent citation count, the authority level of the online information publishing institution, and the credibility score of the information source.

[0076] For example, when the source is academic literature, the impact factor can be the impact factor of the journal in which the literature is published, or the number of times the literature has been cited in academic databases; when the source is patent literature, the impact factor can be the number of times the patent has been cited, the size of the patent family, the legal status (such as granted / pending / expired), or the patent strength score; when the source is drug review documents, the impact factor can be the review rating or therapeutic equivalence evaluation code of the drug in the FDA Orange Book or Purple Book; when the source is online information, the impact factor can be the authority rating of the information publishing organization, the historical credibility rating of the information publishing organization, or the rating result of the source by a third-party credibility evaluation organization (such as a news rating website or fact-checking platform).

[0077] It should be noted that the above-mentioned source types and their corresponding impact factor forms are merely illustrative examples, and this application does not impose any specific limitations on them. Those skilled in the art should understand that the impact factor, as a quantitative indicator of the credibility of a source, can be determined in a specific form depending on the source type. Any indicator that can objectively quantify the credibility of an information source can be used as the impact factor described in this application, and all fall within the scope of protection covered by the embodiments of this application.

[0078] For example, when the text data to be processed is a document, the source identifier can be a source document identifier (Source-ID), used to record the source document of the association, realizing the traceability of knowledge; the impact factor can be the impact factor (IF) of the journal in which the document is published, as an objective indicator to quantify the authority of the document and the confidence of the knowledge. When each edge is stored in the graph database, the system obtains the current impact factor value of the source document from the preset document impact factor library, and stores it as an edge attribute associated with the corresponding binary edge.

[0079] By recording the source identifier and influence factor of the association in the edge attributes, each piece of related knowledge is given a clear source attribute and authoritative quantitative indicator. This not only enhances the traceability and credibility of the knowledge graph, but also provides a reliable data foundation for the dynamic calculation of propagation weight in subsequent homologous reasoning, realizing the refined management of knowledge sources and the objective quantification of confidence.

[0080] It is understandable that when the source of the text data to be processed is other than academic literature, the specific forms of source identifier and impact factor can be replaced with the corresponding forms mentioned above (such as patent publication number, URL, number of patent citations, website authority level, etc.). Their recording and storage methods are the same as those for literature sources. They are stored in the graph database as edge attributes associated with the corresponding binary edges, providing a data foundation for knowledge tracing and confidence measurement for subsequent queries and reasoning.

[0081] In some embodiments, the method further includes: when the influence factor is updated, synchronously updating the influence factor in the corresponding edge attribute of the graph database.

[0082] Impact factor, as a quantitative indicator of source credibility, can change over time. For example, the impact factor of academic journals is typically updated annually, the number of patent citations may gradually accumulate over time, and website credibility scores may vary depending on the assessment results of institutions or independent evaluation agencies. To ensure the timeliness and accuracy of the confidence information stored in the knowledge graph, the system dynamically tracks and updates changes in the impact factor.

[0083] Specifically, the system maintains an impact factor database, which periodically (e.g., quarterly) retrieves the latest journal impact factors from authoritative databases. For example, for academic literature sources, the impact factor database periodically (e.g., annually or quarterly) retrieves the latest journal impact factors from authoritative databases and updates the impact factor values ​​of the corresponding journals in the database. When the impact factor of the journal in which a source article is published is updated, the system automatically triggers a synchronization mechanism to update the impact factor field in the edge attributes of all edges in the graph database that cite that article to the latest value. This ensures the timeliness and accuracy of information in the knowledge graph and avoids distortion of inference confidence due to outdated data.

[0084] Step 230: In response to the natural language query request, extract the target entity according to the natural language query request, and obtain the binary edge directly connected to the target entity from the graph database as the initial association edge.

[0085] This step corresponds to the system's query layer module. The system constructs an agent to receive natural language query requests input by the user, performs entity extraction and synonym expansion, and calls a unified standardization service to align the extracted candidate entities to standard entity names in the graph database, thus obtaining the target entity. Subsequently, the agent generates a single-hop graph query statement (such as a Cypher statement) based on the standardized target entity, executes the query statement in the graph database, and obtains the binary edges directly connected to the target entity as initial association edges.

[0086] By strictly limiting the query depth to 1 hop, the system avoids the exponentially increasing query complexity of traditional multi-hop topology traversal. It reduces multi-hop topology traversal to a combination of single-hop topology query and subsequent secondary attribute filtering query, thereby reducing the query complexity from the order of magnitude of the number of nodes multiplied by the number of traversal hops to the order of magnitude of the number of nodes and a constant term. This eliminates the risk of node explosion in dense graphs from the root of the process design.

[0087] In some embodiments, extracting the target entity according to the natural language query request includes: constructing an agent, receiving the natural language query request through the agent, performing entity extraction and synonym expansion, and calling a standardization service to align the extracted candidate entities to standard entity names in the graph database to obtain the target entity.

[0088] Specifically, a large language model (LLM Agent) is constructed as the unified processing unit at the query entry point. Upon receiving a user's natural language query request, the Agent first extracts entities, identifying key entities involved in the query. Next, it performs synonym expansion, mapping non-standard entity expressions (e.g., expanding "aspirin" to "acetylsalicylic acid") to a candidate entity set. Finally, it invokes a unified standardization service (e.g., a biomedical standard terminology library) to align the candidate entities with predefined standard entity names in the graph database, obtaining the final target entity. This process completes the conversion from natural language to structured entities at the query entry point, reducing the query's dependence on the accuracy of user input, improving the accuracy and recall of entity recognition, and providing a reliable query starting point for subsequent single-hop graph queries.

[0089] In some embodiments, obtaining binary edges directly connected to the target entity from the graph database as initial associated edges includes: generating a single-hop graph query statement based on the target entity through the agent; executing the single-hop graph query statement in the graph database to obtain binary edges directly connected to the target entity as the initial associated edges.

[0090] Specifically, the agent automatically generates a graph database query language statement (such as a Cypher statement) based on the standardized target entity. This statement strictly limits the query depth to one hop, retrieving only edges directly connected to the target entity. After execution in the graph database, it returns the initial set of associated edges. Because it is limited to a single-hop query, the performance risks of multi-hop topology traversal are avoided. The query result serves as the entry data for subsequent secondary identifier attribute retrieval.

[0091] By automatically generating single-hop graph query statements based on standardized target entities using intelligent agents and executing them in the graph database, the technical threshold for query operations is reduced, eliminating the need for manual query writing. At the same time, the query depth is strictly limited to 1 hop, avoiding the performance risks associated with multi-hop topology traversal, and laying an efficient data foundation for subsequent attribute filtering queries based on secondary identifiers.

[0092] Step 240: Obtain the secondary identifier stored in the edge attributes of the initial associated edge, and use the secondary identifier as the query key to perform attribute filtering query in the graph database to recall all associated edges with the same secondary identifier.

[0093] This step corresponds to the inference layer module of the system. The system reads the secondary identifier from the edge attributes of the initial associated edges, and then uses this secondary identifier as the query key to perform an attribute filtering query in the graph database. This retrieves all associated edges with the same secondary identifier at once, thus restoring the complete multivariate relation group to which the initial associated edges belong. This step transforms the high-complexity multi-hop topology traversal in traditional schemes into low-complexity attribute filtering queries. Its query efficiency does not depend on the graph size, but only on the hash index performance of the secondary identifier attribute, fundamentally avoiding the node explosion problem.

[0094] Taking the quaternary relation in step 220 as an example, when a user queries "What diseases is drug C effective for? What are the prerequisites and side effects for its use?", as follows: Figure 3 As shown in the left figure, traditional multi-way relations are forced to be split into discrete triples, resulting in the loss of relation context, semantic fragmentation, and the need for multi-hop traversal to restore the complete relation, which easily leads to "node explosion." However, as... Figure 3 As shown in the right figure, the embodiments of this application adopt a multi-element association group with shared sub-IDs. For example, the system first finds the initial association edge of [Drug C]-association-[Disease D] through a single-hop query, extracts its sub-identifier X001, and then performs attribute filtering query with X001 as the query key to recall the association edges belonging to X001 at once, such as: [Gene B]-association-[Disease D], [Drug C]-association-[Side Effect E].

[0095] Sub-identifiers can be generated by the system in the storage layer module. Specifically, in the construction layer module or storage layer module, the system first establishes multiple binary edges for multiple entities belonging to the same target multivariate relation group, and then assigns the same sub-identifier to these binary edges. Within the same multivariate relation group, the entity nodes connected by different binary edges can be different, but all binary edges share the same sub-identifier. Through this sub-identifier, all entity nodes and their corresponding multivariate relation information within the group can be associated. Taking a target multivariate relation group consisting of four entities—drug C, gene B, disease D, and side effect E—as an example, after establishing multiple binary edges, the system uniformly assigns a sub-identifier X001 to these multiple binary edges. When performing attribute queries through the sub-identifier X001, the four nodes—drug C, gene B, disease D, and side effect E—and all their interrelationships can be simultaneously associated, completely restoring the four-element joint interaction relationship.

[0096] In some embodiments, the method further includes: using the consistency of the sub-identifiers as a constraint condition for information propagation during the information propagation process of graph reasoning; performing information propagation redundancy removal processing on binary edges belonging to the same sub-identifier, and calculating the same-source propagation weight according to the influence factor, using the same-source propagation weight as the quantified value of the confidence of the same-source reasoning; and determining the hetero-source propagation weight according to the influence factor for binary edges belonging to different sub-identifiers.

[0097] Specifically, during message passing in the graph neural network, the system first verifies whether the secondary labels of the edges involved in information propagation are consistent. For binary edges with the same secondary label, they are determined to be homologous information (from the same multivariate relation group / same source of evidence). The system performs redundancy removal on homologous information to avoid the repeated accumulation of evidence from the same source during propagation, which could cause a weight amplification effect. Simultaneously, the system dynamically calculates the homologous propagation weight based on the influence factors stored in the edge attributes. This weight serves as a quantitative value of the confidence level of homologous inference, reflecting the credibility of reasoning based on evidence from that source. For binary edges with different secondary labels, they are determined to be heterologous information (from different multivariate relation groups / different sources of evidence). The system determines the heterologous propagation weight based on the influence factors, allowing heterologous information to propagate with weights based on the influence factors, but no redundancy removal and fusion operation is performed between different source information. This reasoning mechanism, with secondary label consistency as the core constraint, ensures that the reasoning process has interpretable boundaries at the source of evidence level, effectively suppressing erroneous generalization caused by blind cross-document reasoning and significantly reducing the risk of illusions in AI reasoning.

[0098] like Figure 4 As shown, the partial information of the edge attribute record between entity A and entity C is [Edge Primary ID: 1; Secondary ID: X001; IF: 10], the partial information of the edge attribute record between entity A and entity B is [Edge Primary ID: 2; Secondary ID: X001; IF: 10], the partial information of the edge attribute record between entity B and entity C is [Edge Primary ID: 3; Secondary ID: X001; IF: 10], the partial information of the edge attribute record between entity B and entity D is [Edge Primary ID: 4; Secondary ID: X002; IF: 20], and the partial information of the edge attribute record between entity D and entity C is [Edge Primary ID: 5; Secondary ID: X003; IF: 5]. In the traditional scheme, without secondary IDs and influence factors, the propagation weight of the binary edge between entity A and entity C is 1 / 3, the propagation weight of the binary edge between entity B and entity C is 1 / 3, and the propagation weight of the binary edge between entity D and entity C is 1 / 3. In this embodiment, binary edges with the same sub-identifier X001 are determined to be homologous information. This includes binary edges between entities A and C, between entities A and B, and between entities B and C. The system performs redundancy removal processing on homologous information, such as blocking the information propagation path of the binary edge between entities B and C, and only retaining the information propagation path of the binary edge between entities A and C, which is homologous information. This avoids the repeated accumulation of evidence from the same source during propagation, which could cause a weight amplification effect. Binary edges with different sub-identifiers are determined to be heterologous information, such as binary edges between entities B and D, and between entities D and C. This allows information propagation.

[0099] like Figure 5As shown, after performing redundancy removal on the same source information, the relevant propagation weights are calculated based on the influence factor IF corresponding to each edge. For example, after blocking the information propagation path of the binary edge between entity B and entity C, the propagation weight (same source propagation weight) of the binary edge between entity A and entity C, recalculated based on the influence factor, is 2 / 3, and the propagation weight (different source propagation weight) of the binary edge between entity D and entity C is 1 / 3.

[0100] Using the consistency of secondary identifiers as a constraint on information dissemination, redundancy removal is performed on information dissemination, and the weights of homologous and heterologous dissemination are calculated based on the influence factor. This effectively suppresses erroneous reasoning and knowledge illusions, and improves the accuracy and reliability of reasoning.

[0101] Step 250: Based on the vector representations in the edge attributes of all associated edges and the entities connected by all associated edges, obtain the complete association information of the target multivariate relation group.

[0102] In some embodiments, obtaining the complete association information of the target multivariate relation group based on the vector representations in the edge attributes of all associated edges and the entities connected to all associated edges includes: extracting the vector representations stored in the edge attributes of all associated edges; restoring the vector representations into natural language relation description text describing the association relationship using a large language model; concatenating the natural language relation description text with the entities connected to all associated edges, the source identifiers in the edge attributes, the influence factors, and the confidence scores of the same-origin inference to construct global contextual prompts; and obtaining complete association information including literature tracing evidence and the confidence scores of the same-origin inference by an agent based on the global contextual prompts and the natural language query request.

[0103] In some embodiments, the method further includes: outputting the complete association information as natural language answer information corresponding to the natural language query request.

[0104] This step corresponds to the system's generation layer module. The first step (semantic restoration) involves extracting the vector representations stored in the edge attributes of all recalled associated edges. Using the decoding capabilities of the large language model, these high-dimensional vectors are restored / reconstructed into natural language relation description text describing the relationships. This process is the reverse of vector encoding in step 210, achieving the restoration from continuous semantic space to discrete natural language. The second step (context assembly) involves heterogeneously aligning and structurally concatenating the restored natural language relation description text with the multivariate graph topology structure restored based on secondary identifiers (i.e., the entities connected by all associated edges), source identifiers in the edge attributes, influence factors, and homologous inference confidence, constructing a high-information-density global context prompt. This prompt integrates three types of heterogeneous information: graph topology structure (secondary identifier aggregation), continuous semantics (vector-restored text), and discrete attributes (source identifiers and influence factors). The third step (Agent summary generation): The global contextual prompts are input into the upper-layer agent. This agent, combined with the user's original natural language query request, performs final logical synthesis and knowledge summarization, generating complete association information containing clear literature citation evidence (source identifiers and impact factors) and confidence levels for co-origin inference. This complete association information is a structured knowledge representation, containing all factual content, evidence sources, and confidence levels required to answer the user's query. Furthermore, the system outputs this complete association information as the natural language answer to the natural language query request, presenting it to the user in human-readable natural language, thus achieving interpretable output of the query results.

[0105] As one or more application forms of the technical solution of this application, the multi-relationship data processing method provided by this application can be deployed or integrated into various product forms, including but not limited to the following scenarios: (1) An intelligent question-answering system or intelligent knowledge assistant terminal for end users. This system receives natural language questions input by users, uses the method described in this application to query and recall target multivariate relation groups in a graph database, and generates a natural language answer containing literature tracing evidence and confidence evaluation, providing users with convenient knowledge acquisition services. This product form is directly aimed at individual users and corresponds to the knowledge question-answering assistant device described in the embodiments of this application.

[0106] (2) A Software-as-a-Service (SaaS) knowledge retrieval and analysis platform based on cloud architecture provided to enterprise customers or third-party organizations. This platform provides knowledge graph query and reasoning capabilities in the form of cloud services. Enterprise customers or third-party organizations do not need to build and maintain their own knowledge graph system. They can call all or part of the functions of the methods described in this application through application programming interfaces (APIs) or visual interfaces for professional scenarios such as drug development, patent analysis, and competitive intelligence.

[0107] (3) A research and development decision support system and underlying data support platform deployed privately within an enterprise. This product is designed for large enterprises or research institutions. All system modules described in this application are deployed within the enterprise's internal network. It supports the construction and intelligent querying of knowledge graphs of the enterprise's internal knowledge assets (such as research and development reports, clinical trial data, patent documents, internal technical documents, etc.) to provide decision support for R&D personnel.

[0108] (4) The method described in this application can also be used as a bottom-level data interface or knowledge engine module, and integrated into professional applications such as clinical decision support system (CDSS), new drug development target discovery platform, drug repositioning system, adverse reaction monitoring system or medical and health information retrieval, to provide them with the ability to quickly query and reason about multi-relational data.

[0109] Taking a specific application scenario in the biomedical field as an example, when a user inputs the query: "What diseases is drug C effective for? What are the prerequisites and side effects for its use?" the system first converts the query into a single-hop query, finds [Drug C]-association-[Disease D] as the initial association edge, and extracts its secondary identifier X001. Through attribute retrieval, other association edges belonging to X001 are instantly recalled: [Gene B]-association-[Disease D], [Drug C]-association-[Side Effects E]. The system extracts the vector representations of these related edges and reconstructs the specific text semantics using a large language model: "When gene B undergoes the T790M mutation, drug C can target and inhibit the progression of disease D, but clinical observations have shown that it is accompanied by mild side effects E." Subsequently, the system concatenates the reconstructed text with entity nodes (drug C, gene B, disease D, side effects E) and edge attributes (source literature: Nature 2025, impact factor IF=64.8, homology inference confidence: high) to construct global contextual prompts. The agent obtains the complete association information and outputs this complete association information as a natural language response: "According to the high-confidence literature (Nature 2025, impact factor IF=64.8), drug C is effective for disease D. Prerequisite for use: The patient must have a specific mutation (T790M) in gene B. Potential risk: Side effects E may occur during treatment." This natural language response organically integrates the graph topology and semantic information, enabling users to intuitively understand the source and reliability of the association information.

[0110] By decoding vector representations into natural language relation descriptions through a large language model, and concatenating entities, document identifiers, impact factors, and inference confidence to construct global contextual prompts, complete association information containing document tracing basis and confidence level is obtained. Furthermore, the complete association information is output as natural language answer information, realizing interpretable output of query results, enabling users to intuitively understand the source and reliability of association information.

[0111] This application embodiment uses a secondary identifier mechanism to uniformly identify all binary edges within the same multivariate relation group and store them as edge attributes. Without modifying the underlying architecture of existing attribute graph databases (such as Neo4j and Nebula), it can achieve lossless expression of multivariate hypergraph relations on graph databases that do not natively support hypergraph storage structures. It can obtain native storage capabilities for multivariate relations at a low implementation cost and has good architectural compatibility and versatility.

[0112] This application's embodiments transform the query path that requires multi-hop topology traversal in traditional schemes into a combination of single-hop topology query and secondary identifier attribute filtering query. This reduces the query complexity from the order of magnitude of the number of nodes multiplied by the number of traversal hops to the sum of the order of magnitude of the number of nodes and a constant term. In dense graph scenarios, this can effectively avoid the node explosion problem caused by the exponential growth of the size of intermediate nodes with the number of hops, and significantly improve the query response speed and stability of the system.

[0113] This application's embodiments encode natural language relation description text into vector representations for storage as edge attributes. This achieves digital storage of relation descriptions while preserving the rich semantic information of the original text, avoiding information loss caused by discrete relation type labeling in traditional schemes. Simultaneously, during the reasoning process, secondary identifier consistency is used as a constraint condition for information propagation. Redundancy is removed from homologous information and propagated weighted according to the impact factor. Propagation weights are independently determined for heterologous information. This effectively suppresses erroneous generalization caused by blind cross-document reasoning and can meet the strict requirements of evidence chain tracing and reasoning confidence in fields such as biomedicine.

[0114] This application embodiment restores the vector representation stored in the edge attributes into natural language relation description text, and performs heterogeneous data fusion with the multivariate graph topology structure, source identifier, impact factor, and confidence of homologous inference based on the secondary identifier to construct global contextual prompt words. Finally, an intelligent agent generates a natural language answer containing literature tracing basis and confidence evaluation. The graph topology structure, continuous semantics, and discrete attributes are fused and presented to the user, enabling the user to intuitively understand the source and reliability of the related information, and improving the usability and interpretability of knowledge graph query results.

[0115] All of the above technical solutions can be combined in any way to form optional embodiments of this application, and will not be described in detail here.

[0116] This application embodiment uses a secondary identifier mechanism to uniformly identify all binary edges within the same multi-dimensional relation group and store them as edge attributes in the graph database. During querying, only binary edges directly connected to the target entity are retrieved, and then the secondary identifier of that edge is used as the query key for attribute filtering. This retrieves all associated edges with the same secondary identifier at once, thereby reducing the exponential query complexity of traditional multi-hop topology traversal to a combination of single-hop query and attribute filtering complexity, fundamentally avoiding the node explosion problem in dense graphs. At the same time, since the secondary identifier mechanism only operates at the edge attribute level, it can losslessly express multi-dimensional hypergraph relations on standard attribute graphs without modifying the underlying architecture of the graph database. Furthermore, the vector representation is stored along with the edge attributes, so that the obtained complete association information can simultaneously contain topological structure and semantic information, achieving high-fidelity restoration and efficient querying of multi-dimensional relations.

[0117] In some embodiments, this application also provides a knowledge question-answering assistant device, the device including a processor and a memory, the memory storing a graph database and a computer program, the graph database storing binary edges and their corresponding edge attributes, the binary edges being established between every two entities in at least three entities within a target multi-entity relation group associated by the same association relationship, all binary edges belonging to the same target multi-entity relation group having the same sub-identifier, the edge attributes of the binary edges including the sub-identifier and a vector representation describing the association relationship; the processor performing the following operations by calling the computer program: receiving a natural language query request input by a user, extracting target entities according to the natural language query request; obtaining binary edges directly connected to the target entities from the graph database as initial association edges; obtaining the sub-identifier stored in the edge attributes of the initial association edges, performing attribute filtering queries in the graph database using the sub-identifier as the query key, recalling all association edges with the same sub-identifier; obtaining complete association information of the target multi-entity relation group according to the vector representation in the edge attributes of all association edges and the entities connected to all association edges, and outputting natural language answer information generated based on the complete association information to the user interface.

[0118] In some embodiments, this application also provides a computer device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0119] Figure 6 A schematic diagram of the structure of the computer device provided in the embodiments of this application, such as... Figure 6As shown, the computer device 300 may include: a communication interface 301, a memory 302, a processor 303, and a communication bus 304. The communication interface 301, memory 302, and processor 303 communicate with each other via the communication bus 304. The communication interface 301 is used for data communication between the system 300 and external devices. The memory 302 can be used to store software programs and modules, and the processor 303 runs the software programs and modules stored in the memory 302, such as the software programs for the corresponding operations in the foregoing method embodiments.

[0120] In some embodiments, the processor 303 may invoke software programs and modules stored in the memory 302 to perform the following operations: obtain a target multi-relationship group consisting of at least three entities associated with the same relationship, and a vector representation describing the relationship; establish a binary edge between every two entities in the target multi-relationship group, and assign the same sub-identifier to all binary edges belonging to the same target multi-relationship group, and store the sub-identifier and the vector representation as edge attributes associated with the corresponding binary edges in a graph database; in response to a natural language query request, extract the target entity according to the natural language query request, and obtain the binary edge directly connected to the target entity from the graph database as the initial association edge; obtain the sub-identifier stored in the edge attributes of the initial association edge, perform attribute filtering query in the graph database using the sub-identifier as the query key, and recall all association edges with the same sub-identifier; obtain the complete association information of the target multi-relationship group according to the vector representation in the edge attributes of all association edges and the entities connected to all association edges.

[0121] In some embodiments, the computer device 300 may be integrated into a terminal or server that has storage and a processor and thus computing power, or the computer device 300 may be the terminal or server.

[0122] This application also provides a computer-readable storage medium for storing a computer program. This computer-readable storage medium can be applied to a computer device, and the computer program causes the computer device to execute the corresponding processes in the methods described above in the embodiments of this application; for brevity, further details are omitted here.

[0123] This application also provides a computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding processes in the methods described above in the embodiments of this application. For brevity, these details will not be elaborated further here.

[0124] This application also provides a computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding processes in the methods described above in the embodiments of this application. For brevity, these details will not be elaborated further here.

[0125] It should be understood that the processor in the embodiments of this application may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0126] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0127] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0128] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, units, and processes described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0129] In the embodiments provided in this application, it should be understood that the disclosed systems, methods, and approaches can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between systems or units may be electrical, mechanical, or other forms.

[0130] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0131] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0132] In addition, the functional units in the embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0133] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer or a server) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0134] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for processing multivariate relational data, characterized in that, The method includes: Obtain a target multi-dimensional relation group consisting of at least three entities associated with the same relation, and a vector representation describing the relation; In the target multi-dimensional relation group, a binary edge is established between every two entities, and all binary edges belonging to the same target multi-dimensional relation group are assigned the same sub-identifier. The sub-identifier and the vector representation are stored in the graph database as edge attributes associated with the corresponding binary edges. In response to a natural language query request, the target entity is extracted according to the natural language query request, and the binary edge directly connected to the target entity is obtained from the graph database as the initial association edge. Obtain the secondary identifier stored in the edge attributes of the initial associated edge, and use the secondary identifier as the query key to perform attribute filtering query in the graph database to recall all associated edges with the same secondary identifier; Based on the vector representations in the edge attributes of all associated edges and the entities connected by all associated edges, the complete association information of the target multivariate relation group is obtained.

2. The multi-relationship data processing method as described in claim 1, characterized in that, The step of obtaining a target multi-dimensional relation group consisting of at least three entities associated with the same relation, and a vector representation describing the relation, includes: Obtain the text data to be processed, and extract at least three entities and the relationships between the at least three entities from the text data to be processed using a large language model; The natural language description text describing the association is encoded into the vector representation; All entities associated with the same relationship are considered as the target multi-relationship group.

3. The multi-relationship data processing method as described in claim 2, characterized in that, The step of extracting at least three entities and the relationships between the at least three entities from the text data to be processed using a large language model includes: Positive examples with relationships and negative examples without relationships are introduced into the prompt words. The large language model outputs a binary classification result indicating whether there is a relationship between entities through a few-shot learning method.

4. The multi-relationship data processing method as described in claim 1, characterized in that, The step of extracting the target entity based on the natural language query request includes: An intelligent agent is constructed to receive the natural language query request, perform entity extraction and synonym expansion, and call a standardization service to align the extracted candidate entities with the standard entity names in the graph database to obtain the target entity.

5. The multi-relationship data processing method as described in claim 4, characterized in that, The step of obtaining binary edges directly connected to the target entity from the graph database as initial association edges includes: The intelligent agent generates a single-hop graph query statement based on the target entity. Execute the single-hop graph query statement in the graph database to obtain the binary edge directly connected to the target entity as the initial associated edge.

6. The multi-relationship data processing method as described in claim 1, characterized in that, The edge attributes also include: the source identifier and the influence factor of the association, wherein the source identifier is used to uniquely identify the source of the association, and the influence factor is an indicator that quantifies the credibility of the source of the association.

7. The multi-relationship data processing method as described in claim 6, characterized in that, The method further includes: In the process of information propagation during graph reasoning, the consistency of the secondary identifier is used as a constraint condition for information propagation; For binary edges belonging to the same sub-identifier, perform information propagation redundancy removal processing, and calculate the same-source propagation weight according to the influence factor, and use the same-source propagation weight as the quantitative value of the same-source inference confidence. For binary edges belonging to different sub-identifiers, the heterogeneous propagation weight is determined based on the aforementioned influence factor.

8. The multi-relationship data processing method as described in claim 7, characterized in that, The step of obtaining the complete association information of the target multivariate relation group based on the vector representations in the edge attributes of all associated edges and the entities connected by all associated edges includes: Extract the vector representations stored in the edge attributes of all the associated edges, and use a large language model to restore the vector representations into natural language relation description text describing the association relationship; The natural language relation description text is concatenated with the entities connected to all the associated edges, the source identifiers and influence factors in the edge attributes, and the confidence of the homology inference to construct a global contextual prompt word. The agent obtains complete association information, including the basis for tracing literature sources and the confidence level of the co-origin inference, based on the global context prompts and the natural language query request.

9. The multi-relationship data processing method as described in claim 8, characterized in that, The method further includes: The complete association information is output as the natural language answer information corresponding to the natural language query request.

10. The multivariate relational data processing method according to any one of claims 1-9, characterized in that, The target multivariate relation group is a target multivariate relation group in the biomedical field, and the entity includes at least one of the following: drug, gene, disease, side effect, gene mutation, biomarker; The aforementioned relationships are multi-faceted relationships in the biomedical field, including at least one of the following: efficacy relationship between drug-gene-disease, safety relationship between drug-gene-adverse drug reactions, drug resistance relationship between gene-gene mutation-disease, combination drug relationship between drug-disease, companion diagnostic relationship between biomarker-disease-drug, early warning relationship between biomarker-drug-side effects, early warning relationship between biomarker-drug-adverse drug reactions, pathogenic relationship between gene mutation-gene-disease, and complication and contraindication relationship between drug-disease.

11. A multi-relational data processing system, characterized in that, include: A construction layer module is used to obtain a target multi-dimensional relation group consisting of at least three entities associated with the same relation, and a vector representation describing the relation; The storage layer module is used to establish a binary edge between every two entities in the target multivariate relation group, and to assign the same sub-identifier to all binary edges belonging to the same target multivariate relation group. The sub-identifier and the vector representation are stored in the graph database as edge attributes associated with the corresponding binary edges. The query layer module is used to respond to natural language query requests, extract target entities according to the natural language query requests, and obtain binary edges directly connected to the target entities from the graph database as initial association edges; The inference layer module is used to obtain the secondary identifier stored in the edge attributes of the initial associated edge, and use the secondary identifier as the query key to perform attribute filtering query in the graph database to recall all associated edges with the same secondary identifier. The generation layer module is used to obtain the complete association information of the target multivariate relation group based on the vector representation in the edge attributes of all associated edges and the entities connected by all associated edges.

12. A knowledge question-and-answer assistant device, characterized in that, The device includes a processor and a memory. The memory stores a graph database and a computer program. The graph database stores binary edges and their corresponding edge attributes. The binary edges are established between every two entities in at least three entities within a target multi-entity relation group associated by the same association relationship. All binary edges belonging to the same target multi-entity relation group have the same sub-identifier. The edge attributes of the binary edges include the sub-identifier and a vector representation describing the association relationship. The processor performs the following operations by invoking the computer program: Receive a natural language query request input by the user, and extract the target entity based on the natural language query request; Obtain binary edges directly connected to the target entity from the graph database as initial association edges; Obtain the secondary identifier stored in the edge attributes of the initial associated edge, and use the secondary identifier as the query key to perform attribute filtering query in the graph database to recall all associated edges with the same secondary identifier; Based on the vector representations in the edge attributes of all associated edges and the entities connected by all associated edges, the complete association information of the target multivariate relation group is obtained, and the natural language response information generated based on the complete association information is output to the user interface.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted for loading by a processor to perform the multivariate relational data processing method as described in any one of claims 1-10.

14. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program, and the processor executing the multivariate relation data processing method as described in any one of claims 1-10 by calling the computer program stored in the memory.

15. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the multivariate relation data processing method according to any one of claims 1-10.