Knowledge graph construction method and system fusing node attenuation and edge similarity weight
By fusing the node attenuation and edge similarity weight methods and combining time and space factors to correct the node and edge representation of the knowledge graph, the problem of ignoring spatial factors in existing technologies is solved, and the graph can be accurately responded and efficiently updated in a dynamic environment.
Patent Information
- Application Number
- CN202510779106.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-06-12
AI Technical Summary
Existing knowledge graph construction methods fail to effectively reflect the regulation of spatial factors on the importance of knowledge when facing dynamic environments, resulting in untimely graph updates and inaccurate structural adjustments, affecting subsequent analysis and decision-making results.
The method of fusing node attenuation and edge similarity weight introduces a spatiotemporal coupling attenuation mechanism, combines time and space factors to correct the representation of nodes and edges, uses semantic similarity to adjust edge connection relationships, and optimizes the graph structure.
It achieves precise adjustment of the knowledge in the graph, improves the adaptability of the graph in dynamic environments and the reliability of analytical decision-making, enhances the semantic expression ability and structural compactness of the graph, and reduces computational overhead.
Smart Images

Figure CN120687643A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of knowledge graph construction, and in particular to a method and system for constructing a knowledge graph that integrates node attenuation and edge similarity weights. Background Art
[0002] With the widespread application of artificial intelligence (AI) in scenarios such as digital marketing, financial risk management, and intelligent question-answering, knowledge graphs, as a core form of structured knowledge representation and reasoning, are playing an increasingly important role in supporting complex semantic understanding and decision support. In recent years, to address the challenges of semantic uncertainty, data heterogeneity, and relational complexity, researchers have gradually evolved from static graphs to dynamic graphs, attempting to enhance the real-time and scalability of graphs by introducing models such as graph neural networks. Against this backdrop, methods for constructing and updating dynamic knowledge graphs have gradually become a key research direction in the field of AI.
[0003] Existing knowledge graph construction methods typically employ static construction or periodic updates, first extracting information from raw data to identify entities and their relationships, and then organizing them into a graph structure for storage. During graph updates, some methods introduce a time decay factor to reduce the weight of older nodes to simulate the timeliness of knowledge. Meanwhile, some methods dynamically adjust edge weights through entity similarity calculations, thereby maintaining the usability and a certain degree of dynamism of the graph structure.
[0004] However, in application scenarios facing dynamic environments, the effectiveness of knowledge is not only affected by time, but is often closely related to its spatial location. Existing graph construction solutions generally adopt a time-attenuation-based strategy to adjust the weights of nodes, but this approach fails to effectively reflect the regulatory effect of spatial factors on the importance of knowledge. For example, the same knowledge may have become invalid in some areas, but still have a high reference value in other areas. The lack of a joint spatiotemporal modeling mechanism can easily lead to untimely responses to graph updates and inaccurate structural adjustments, thereby affecting subsequent graph-based analysis and decision-making results. Therefore, existing technologies still have certain adaptability bottlenecks when dealing with the problem of dynamic evolution of knowledge in graphs over time and space. Summary of the Invention
[0005] This application provides a knowledge graph construction method and system that integrates node decay and edge similarity weights, effectively solving the shortcomings of existing graph construction solutions that only rely on time decay and ignore spatial factors. This application provides the following technical solutions:
[0006] In a first aspect, the present application provides a method for constructing a knowledge graph that integrates node attenuation and edge similarity weights, the method comprising:
[0007] Collecting multi-source heterogeneous data and preprocessing the multi-source heterogeneous data;
[0008] Identify entities in pre-processed multi-source heterogeneous data and extract relationships between entities;
[0009] Establish an initial graph structure based on entities and the relationships between them, and determine how to represent nodes and edges in the graph;
[0010] The representation of nodes and edges in the constructed graph structure is modified by integrating time decay and spatial correlation factors, and the edge connection relationship is further adjusted by integrating semantic similarity based on the modification of node and edge weights.
[0011] After correcting and optimizing the graph structure, the final knowledge graph data representation is generated and unified storage and graph computing structured encapsulation are completed.
[0012] In a specific implementation scheme, identifying entities in pre-processed multi-source heterogeneous data and extracting relationships between entities includes:
[0013] A pre-trained language model combined with a sequence annotation structure is used to perform named entity recognition on text data, extracting key entity information involved in the data. During the recognition process, context windows, part-of-speech tagging results, and dependency syntactic structures are used for semantic enhancement.
[0014] For semi-structured and structured data, based on field semantic mapping and regular template rules, the field content is classified and standardized into entity types, and multiple types of semantic entities are identified;
[0015] For text data, we use dependency parsing tools to extract subject-verb-object structures, and combine them with relation extraction models to identify the semantic relationship types between entity pairs.
[0016] For structured or semi-structured data, the structural connections between entities corresponding to the fields are determined through inter-field position logic and data pattern reasoning;
[0017] All extracted relations are organized in the form of triples, and the source, corresponding timestamp, spatial location and context information of the triples in the original data are recorded.
[0018] In a specific implementation scheme, establishing an initial graph structure based on entities and relationships between entities and determining how to represent nodes and edges in the graph includes:
[0019] Generate a corresponding node in the graph for each entity based on the entity type;
[0020] According to the relationship type in the triple, establish edge connections between nodes and label each edge with the relationship type and its related attributes;
[0021] For connections between multiple relationships and multi-type entities, a heterogeneous graph representation mechanism is adopted.
[0022] In a specific possible implementation scheme, the fusing of time decay and spatial correlation factors to modify the representation of nodes and edges in the constructed graph structure, and fusing semantic similarity on the basis of node and edge weight modification to further adjust edge connection relationships include:
[0023] In terms of node representation correction, a timestamp is assigned to each node, and a time decay factor is calculated based on the time interval between the last update time and the current processing time of the node. The factor is modeled in exponential form, and the formula is as follows:
[0024]
[0025] Among them, λ t is the time attenuation coefficient, t is the time interval; by calculating the distance d(s, s0) between the node position and the preset reference position, and constructing the Sigmoid form of spatial attenuation function as follows:
[0026]
[0027] Where r is the influence radius and k is the spatial attenuation slope. Combining the two attenuation factors of time and space, the complete spatiotemporal coupling attenuation weight is obtained as follows:
[0028] α(t,s)=α s (s)·α t (t)
[0029] The decay weight is used to decay the representation vector of the updated node.
[0030] In a specific possible implementation scheme, the fusing of time decay and spatial correlation factors to modify the representation of nodes and edges in the constructed graph structure, and fusing semantic similarity on the basis of node and edge weight modification to further adjust edge connection relationships also includes:
[0031] In terms of edge representation correction, for each existing edge, a sliding average strategy is used to update its weight. The update formula is:
[0032]
[0033] in, is the historical weight of the edge, β is the smoothing coefficient between 0 and 1, sim(e i ,e j ) represents the semantic similarity between the entity nodes at both ends of the edge.
[0034] In a specific possible implementation scheme, the fusing of time decay and spatial correlation factors to modify the representation of nodes and edges in the constructed graph structure, and fusing semantic similarity on the basis of node and edge weight modification to further adjust edge connection relationships also includes:
[0035] Based on the update of node and edge representation, a semantic-driven edge connection adjustment mechanism is introduced to expand and clean up the potential relationships in the graph structure;
[0036] When traversing pairs of nodes that are not directly connected in the graph, if their semantic similarity exceeds a preset threshold and they are close in both time and space, they are considered potential connections and new edge connections are added to enhance semantic coverage. Edge connections with long-term low semantic similarity and significantly reduced spatiotemporal attenuation weights are removed or marked as inactive.
[0037] The correction and adjustment process uses the graph computing framework for unified modeling and automated batch processing, and collaborates with the graph database indexing mechanism.
[0038] In a specific implementation scheme, the steps of organizing and generating the final knowledge graph data representation after correcting and optimizing the graph structure and completing unified storage and graph computing structured encapsulation include:
[0039] Build an index dictionary based on the current state of all nodes and edges in the graph;
[0040] According to the requirements of the graph computing framework, the graph structure is converted into data objects that adapt to its native format;
[0041] Store the graph structure in an efficient graph database or graph data warehouse, generate reusable persistent storage files for it, retain the historical evolution version and update operation log of the graph structure, and build a graph version control system.
[0042] In the second aspect, the present application provides a knowledge graph construction system that integrates node decay and edge similarity weights, using the following technical solutions:
[0043] A knowledge graph construction system integrating node decay and edge similarity weights, comprising:
[0044] A data acquisition module, configured to acquire multi-source heterogeneous data and pre-process the multi-source heterogeneous data;
[0045] Entity recognition module, used to identify entities in pre-processed multi-source heterogeneous data and extract the relationships between entities;
[0046] The graph structure building module is used to build the initial graph structure based on entities and the relationships between entities, and determine the representation of nodes and edges in the graph;
[0047] The node and edge correction module is used to integrate time decay and spatial correlation factors to correct the representation of nodes and edges in the constructed graph structure, and further adjust the edge connection relationship by integrating semantic similarity based on the node and edge weight correction;
[0048] The knowledge graph construction module is used to organize and generate the final knowledge graph data representation after correcting and optimizing the graph structure, and complete the unified storage and graph computing structured encapsulation.
[0049] In a third aspect, the present application provides an electronic device comprising a processor and a memory; the memory stores a program, which is loaded and executed by the processor to implement a knowledge graph construction method that integrates node attenuation and edge similarity weights as described in the first aspect.
[0050] In a fourth aspect, the present application provides a computer-readable storage medium, in which a program is stored. When the program is executed by a processor, it is used to implement a knowledge graph construction method that integrates node attenuation and edge similarity weights as described in the first aspect.
[0051] In summary, the beneficial effects of this application include at least:
[0052] (1) The proposed spatiotemporal coupling attenuation mechanism achieves dynamic and precise adjustment of node weights in the graph by organically combining time attenuation with space attenuation. Specifically, the mechanism not only performs exponential attenuation based on the update time of node information, but also adjusts node weights through the distance function between the spatial position and the reference position, thereby distinguishing the effectiveness differences of the same knowledge in different geographical regions. This spatiotemporal joint modeling significantly improves the graph's ability to respond to the spatiotemporal dynamic evolution of knowledge, effectively avoiding the problems of knowledge misjudgment and information loss caused by relying solely on time attenuation, and ensuring that the graph structure can more accurately reflect the knowledge distribution and change trends in the real world when facing complex dynamic environments.
[0053] (2) A dynamic edge connection adjustment mechanism based on semantic similarity is introduced during the edge weight update process, breaking through the limitations of traditional methods in which edge weights only rely on historical weights and smooth updates. This mechanism evaluates the semantic similarity between nodes in the graph in real time, combines spatiotemporal decay factors, and selectively adds edges with potential high correlation, while removing edges with long-term low activity or low similarity, thereby improving the semantic expression ability and structural compactness of the graph. This not only enhances the semantic coherence of the graph and reduces the computational overhead caused by redundant connections, but also improves the efficiency and accuracy of subsequent graph-based machine learning and intelligent reasoning algorithms, and enhances the adaptability and stability of the overall system in dynamic and complex scenarios.
[0054] By introducing a spatiotemporal coupling decay mechanism, the temporal validity and spatial distribution characteristics of nodes and edges are jointly considered to achieve precise adjustment of knowledge representation in the graph. At the same time, the connection relationship of the edges is dynamically optimized in combination with the semantic similarity index, enhancing the graph's ability to respond to the spatiotemporal evolution characteristics of multi-source heterogeneous data. This technology effectively solves the shortcomings of existing graph construction solutions that rely solely on time decay and ignore spatial factors. It avoids the problem of the inability to reflect the invalidation and validity differences of knowledge in different spatial regions, improves the timeliness of graph updates and the accuracy of structural adjustments, and significantly enhances the adaptability of the graph in dynamic environments and the reliability of subsequent analysis and decision-making.
[0055] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application and to implement it in accordance with the contents of the specification, the following is a detailed description of the preferred embodiments of the present application in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 It is a flow chart of the knowledge graph construction method of fusing node attenuation and edge similarity weights in an embodiment of the present application.
[0057] Figure 2 This is a structural block diagram of a knowledge graph construction system that integrates node attenuation and edge similarity weights in an embodiment of the present application.
[0058] Figure 3 It is a block diagram of an electronic device constructed by fusing the knowledge graph of node attenuation and edge similarity weights in an embodiment of the present application. DETAILED DESCRIPTION
[0059] The following embodiments are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0060] Optionally, the present application uses the knowledge graph construction method of the fusion node attenuation and edge similarity weights provided in each embodiment as an example for explanation in an electronic device, where the electronic device is a terminal or a server. The terminal can be a mobile phone, a computer, a tablet computer, etc. This embodiment does not limit the type of electronic device.
[0061] Reference Figure 1 , is a flow chart of a method for constructing a knowledge graph that integrates node attenuation and edge similarity weights, provided in one embodiment of the present application. The method includes at least the following steps:
[0062] Step S101: Collect multi-source heterogeneous data and pre-process the multi-source heterogeneous data.
[0063] In step S101, heterogeneous data resources are collected by constructing a multi-source data access channel. Specifically, the collected data can come from structured databases (such as business logs, metadata tables), semi-structured resources (such as XML, JSON format documents) and unstructured data sources (such as web page content, social platform text, news corpus, etc.). During the data collection process, for each data record, its generation time and spatial location information are synchronously obtained. Among them, the time information can be recorded according to the data generation time, reception time or reporting time, and the spatial location information can be obtained based on GPS positioning, geo-tags or network address resolution. All collected data are divided into different data cache modules according to the source type and data structure for subsequent classification processing.
[0064] After completing the data collection, a unified preprocessing operation is performed on the heterogeneous data obtained. For structured and semi-structured data, the key content is extracted through field screening and pattern analysis. For text-type unstructured data, natural language preprocessing processes such as Chinese word segmentation, part-of-speech tagging, and entity boundary tagging are implemented to standardize the semantic structure and enhance the accuracy of entity recognition. In this process, preprocessing steps such as unified encoding format, filtering noise information (such as invalid punctuation, garbled characters), and normalizing field expressions will be completed together. In addition, for all data entries, their contextual feature information is extracted, such as upstream and downstream related keywords, syntactic structure, etc., for subsequent representation learning model input. After the preprocessing is completed, all standardized data are organized into an intermediate data set with a unified structure. The fields contain data content, time, spatial location, and contextual features, etc., laying the foundation for entity recognition and relationship extraction in the next step.
[0065] Step S102: Identify entities in the pre-processed multi-source heterogeneous data and extract relationships between entities.
[0066] In step S102, entity recognition and relationship extraction operations are performed on the multi-source heterogeneous data that has been preprocessed in step S101. First, a unified named entity recognition process is performed on all text data, and a pre-trained language model is combined with a sequence annotation structure (such as BERT-Bi LSTM-CRF) to extract the key entity information involved in the data. During the recognition process, semantic enhancement is performed using context windows, part-of-speech tagging results, and dependency syntactic structures to improve the recognition accuracy of cross-phrase and nested entities. For semi-structured and structured data, the field content is classified and standardized based on field semantic mapping and regular template rules to identify various types of semantic entities such as geographic location, event name, organization, and device identification. All identified entities are given unique identifiers, and their corresponding time information, spatial location, and context fragments in the original data are retained.
[0067] After completing entity recognition, continue to extract semantic relationships between entities from text and structured data. For text data, use dependency syntax analysis tools to extract subject-verb-object structures, and combine them with relationship extraction models to identify the types of semantic relationships between entity pairs, such as "contains", "is located in", "belongs to", "affects", etc. For structured or semi-structured data, determine the structural connections between entities corresponding to the fields through inter-field positional logic and data pattern reasoning. All extracted relationships are organized in the form of triples (entity 1, relationship, entity 2), and the source of the triples in the original data, the corresponding timestamp, spatial location and contextual information are recorded for use in the subsequent graph structure construction stage.
[0068] Step S103: Establish an initial graph structure based on the entities and the relationships between the entities, and determine the representation method of the nodes and edges in the graph.
[0069] In step S103, an initial graph structure is established based on the entities identified in step S102 and the relationship triples between them. First, a corresponding node is generated for each entity in the graph according to the entity type, unique identifier and its accompanying attribute information (such as time, space, source, etc.), and a multi-dimensional attribute vector is assigned to each node. The construction of the attribute vector can adopt a static encoding method, for example, through a word embedding model (such as Word2Vec, GloVe) to perform low-dimensional mapping of entity categories and semantic labels, and at the same time combine the contextual statistical features of the node to form a comprehensive representation describing the semantic and structural attributes of the node.
[0070] After completing the node generation, further edge connections are established between the nodes based on the relationship type in the triple, and the relationship type and its related attributes (such as relationship confidence, occurrence time, context summary, etc.) are labeled for each edge. The representation of the edge is modeled using a relationship embedding vector. The relationship embedding can be generated through a pre-trained model, a knowledge graph embedding method (such as TransE, RotatE, etc.), or a custom semantic projection function, thereby ensuring that the semantic relationship expressed by the edge has a vectorized and learnable feature structure. For the connection between multiple relationships and multiple types of entities, a heterogeneous graph representation mechanism is adopted to ensure that different types of nodes and edges can coexist in a unified graph structure and support subsequent modeling requirements based on graph neural networks.
[0071] During the entire graph structure establishment process, a unified index mapping relationship is generated for nodes and edges, and they are organized and stored in the native graph representation format in the graph database or graph computing framework (such as DGL or PyG), thereby ensuring that the graph structure has good scalability and consistency in subsequent graph computing and dynamic updates.
[0072] Step S104: fusing time decay and spatial correlation factors to correct the representation of nodes and edges in the constructed graph structure, and fusing semantic similarity on the basis of node and edge weight correction to further adjust edge connection relationships.
[0073] In step S104, the constructed graph structure is further integrated with time change and spatial distribution factors, and the representation of nodes and edges in the graph is dynamically modified. On this basis, a semantic similarity index is introduced to adjust the connection relationship of the edges, so that the graph structure can better respond to the evolution characteristics of knowledge entities at the temporal, spatial and semantic levels, and improve the overall expression accuracy and structural stability.
[0074] In terms of node representation correction, each node is first assigned a timestamp and a time decay factor is calculated based on the time interval between the last update time and the current processing time of the node. This factor is modeled in exponential form and is given by the following formula:
[0075]
[0076] Among them, λ t is the time attenuation coefficient, and t is the time interval. Subsequently, the spatial attenuation factor is introduced to reflect the change in the importance of the node in the spatial distribution. By calculating the distance d(s, s0) between the node position and the preset reference position, a sigmoid-shaped spatial attenuation function is constructed as follows:
[0077]
[0078] Where r is the influence radius and k is the spatial attenuation slope. Combining the two attenuation factors of time and space, the complete spatiotemporal coupling attenuation weight is obtained as follows:
[0079] α(t,s)=α s (s)·α t (t)
[0080] Through this decay weight, during graph evolution, this coupling weight is used to attenuate the representation vector of updated nodes, reducing the activity of nodes that have not been updated for a long time and are far away from the core area of the event, thereby dynamically weakening their influence in the graph. In terms of edge representation correction, for each existing edge, a sliding average strategy is used to update its weight. The update formula is:
[0081]
[0082] in, is the historical weight of the edge, β is the smoothing coefficient between 0 and 1, sim(e i ,e j) represents the semantic similarity between the entity nodes at both ends of an edge. This similarity can be estimated by calculating the cosine distance between the entity embedding vectors, matching contextual features, or adjacency patterns in the graph structure. This update method allows edge weights to respond to real-time changes in the strength of the relationship between entities while maintaining the original semantic coherence.
[0083] Based on the updated node and edge representations, a semantically driven edge connection adjustment mechanism is introduced to expand and clean up potential relationships in the graph structure. Firstly, when traversing pairs of nodes that are not directly connected in the graph, if their semantic similarity exceeds a preset threshold and they have a certain degree of proximity in both time and space, they are considered potential relationships and new edge connections are added to enhance semantic coverage. Secondly, if the semantic similarity remains low for a long time and the spatiotemporal decay weight has significantly decreased, the edge connections are removed or marked as inactive to control graph redundancy and improve graph computation efficiency.
[0084] The entire correction and adjustment process can be unified modeled and automatically batch processed with the help of a graph computing framework (such as DGL), and coordinated with the graph database indexing mechanism to achieve efficient data consistency management and traceability maintenance, providing a time-space sensitive, semantically adaptive structural foundation for subsequent graph neural network modeling and intelligent reasoning tasks.
[0085] In addition, as a preference, in another feasible embodiment, the calculation formula of the spatiotemporal coupling attenuation weight may also be as follows:
[0086]
[0087] Where t is the difference between the current time and the last update time of the node or edge, reflecting the time interval; d(s, s0) is the distance between the node spatial position s and the reference point s0; sim(e i ,e j ) is node e i and e j The semantic similarity of tis a time decay adjustment parameter greater than 0, controlling the influence of time intervals. Due to the quadratic growth of time, the decay is smoother. k is a basic spatial scale parameter greater than 0, ensuring that the spatial distance denominator is non-zero. γ is a semantic similarity adjustment factor greater than 0, amplifying the effect of semantic similarity on spatial decay. This formula uses an inverse square function instead of an exponential function in the time decay component, alleviating the problem of traditional exponential decay being too rapid at small time intervals and achieving a softer temporal weight reduction. In the spatial decay component, semantic similarity is innovatively introduced into the denominator as a spatial decay adjustment factor. When semantic similarity is high, the decay is reduced at the same spatial distance, allowing nodes with strong semantic connections to maintain higher weights even if they are slightly farther apart, effectively integrating spatiotemporal and semantic information. For the constructed graph structure, a novel spatiotemporal coupling weight function is designed to dynamically modify the representation of nodes and edges. This weight function comprehensively considers the influence of time interval, spatial distance and semantic similarity. The time decay adopts the inverse square form to ensure that the decay curve is smoother and avoid the traditional exponential decay from losing effective information too quickly. The spatial decay integrates semantic similarity as a regulating factor, so that nodes with strong semantic relevance still maintain higher weights when the spatial distance is far, enhancing the expression consistency of the graph in the semantic and spatiotemporal dimensions.
[0088] In terms of edge representation correction, for each existing edge, a sliding average strategy is used to update its weight. The update formula can also be:
[0089]
[0090] Among them, d(s i ,s j ) is node s i and node s j , η is the semantic weight adjustment factor, which balances the influence of semantics and spatial distance.
[0091] This formula innovatively combines semantic similarity and spatial distance to form the instant update of edge weights. Compared with the traditional method that only uses semantic similarity, this solution considers the impact of spatial proximity on edge weights to prevent nodes with similar semantics but too far spatial distance from each other from being misconnected. By smoothly fusing historical weights, the edge weight update process is guaranteed to be smooth, avoiding drastic fluctuations in weights due to single data anomalies. During the weight correction process of nodes and edges, the edge weight update introduces a sliding average model that combines semantic similarity and spatial distance. The instant update of edge weights is formed by linearly weighting the semantic weights and spatial weights, making full use of the multi-dimensional information between nodes to prevent misconnections caused by spatial heterogeneity. At the same time, it smoothes historical weight updates to ensure the stable evolution of the graph structure.
[0092] Step S105: After correcting and optimizing the graph structure, organize and generate the final knowledge graph data representation, and complete unified storage and graph computing structured encapsulation.
[0093] In step S105, after completing operations such as dynamic modification of nodes and edges and adjustment of semantic associations, the graph data is uniformly structured and formatted, focusing on the stability, scalability, and task adaptability of the graph structure, to generate a knowledge graph representation for deployment, invocation, and updating. This step not only concludes the knowledge graph construction process but also ensures consistency for subsequent graph neural network modeling, multimodal fusion reasoning, and online updates.
[0094] Specifically, a unified index dictionary is first constructed based on the current state of all nodes and edges in the graph. The node index includes node ID, type, embedding vector, historical attributes, and evolution information; the edge index includes edge start and end point identifiers, relationship type, weighting information, spatiotemporal labels, and semantic annotations. During the indexing process, hash mapping and spatial partitioning strategies are combined to improve graph access efficiency and local cache hit rates in distributed environments.
[0095] Subsequently, according to the requirements of graph computing frameworks (such as DGL and PyG), the graph structure is converted into data objects that adapt to their native formats. For example, in the DGL framework, node and edge attributes are respectively encapsulated into the ndata and edata fields of the graph structure, and node / edge types are annotated to support heterogeneous graph modeling. In the attribute field, multi-dimensional features related to learning, such as embedding vectors, decay coefficients, semantic labels, and relationship confidence, are retained to ensure that the graph neural network can fully explore the semantic structure information of the graph.
[0096] Ultimately, the graph structure is stored in an efficient graph database (such as Neo4j or TigerGraph) or a graph data warehouse, and a reusable persistent storage file (such as JSON, GraphML, or Pickle) is generated for it, facilitating rapid loading and migration deployment across different tasks. Furthermore, to support subsequent online updates and evolutionary learning, the historical evolution of the graph structure and update operation logs are retained, and a graph version control system is established, ensuring that the graph has both structural integrity and evolutionary controllability and call flexibility.
[0097] Through the above processing, the whole process of building from original multi-source heterogeneous data to structured, spatiotemporal semantically consistent, and interactive knowledge graph is completed, laying a solid foundation for advanced tasks such as intelligent reasoning, planning and decision-making, and dynamic response.
[0098] In summary, by introducing a spatiotemporal coupling decay mechanism and jointly considering the temporal validity and spatial distribution characteristics of nodes and edges, precise adjustment of knowledge representation in the graph is achieved. At the same time, the connection relationship of edges is dynamically optimized in combination with semantic similarity indicators, enhancing the graph's ability to respond to the spatiotemporal evolution characteristics of multi-source heterogeneous data. This technology effectively addresses the shortcomings of existing graph construction schemes that rely solely on time decay and ignore spatial factors. It avoids the problem of knowledge failure and effectiveness differences in different spatial regions that cannot be reflected, improves the timeliness of graph updates and the accuracy of structural adjustments, and significantly enhances the adaptability of the graph in dynamic environments and the reliability of subsequent analysis and decision-making.
[0099] Figure 2 This is a structural block diagram of a knowledge graph construction system that integrates node attenuation and edge similarity weights, provided by an embodiment of the present application. The system includes at least the following modules:
[0100] Data acquisition module, used to collect multi-source heterogeneous data and pre-process the multi-source heterogeneous data;
[0101] Entity recognition module, used to identify entities in pre-processed multi-source heterogeneous data and extract the relationships between entities;
[0102] The graph structure building module is used to build the initial graph structure based on entities and the relationships between entities, and determine the representation of nodes and edges in the graph;
[0103] The node and edge correction module is used to integrate time decay and spatial correlation factors to correct the representation of nodes and edges in the constructed graph structure, and further adjust the edge connection relationship by integrating semantic similarity based on the node and edge weight correction;
[0104] The knowledge graph construction module is used to organize and generate the final knowledge graph data representation after correcting and optimizing the graph structure, and complete the unified storage and graph computing structured encapsulation.
[0105] For relevant details, please refer to the above method embodiment.
[0106] Figure 3 4 is a block diagram of an electronic device provided in one embodiment of the present application. The device includes at least a processor 401 and a memory 402.
[0107] The processor 401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 401 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 401 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 401 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0108] The memory 402 may include one or more computer-readable storage media, which may be non-transitory. The memory 402 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 402 is used to store at least one instruction, which is executed by the processor 401 to implement the knowledge graph construction method for fusing node attenuation and edge similarity weights provided in the method embodiment of the present application.
[0109] In some embodiments, the electronic device may optionally include a peripheral device interface and at least one peripheral device. The processor 401, memory 402, and peripheral device interface may be connected via a bus or signal lines. Each peripheral device may be connected to the peripheral device interface via a bus, signal lines, or circuit boards. Illustratively, the peripheral devices include, but are not limited to, a radio frequency circuit, a touchscreen display, an audio circuit, and a power supply.
[0110] Of course, the electronic device may also include fewer or more components, which is not limited in this embodiment.
[0111] Optionally, the present application also provides a computer-readable storage medium, in which a program is stored, and the program is loaded and executed by a processor to implement the knowledge graph construction method of the above-mentioned method embodiment that integrates node attenuation and edge similarity weights.
[0112] Optionally, the present application also provides a computer product, which includes a computer-readable storage medium, in which a program is stored, and the program is loaded and executed by a processor to implement the knowledge graph construction method of the above-mentioned method embodiment that integrates node attenuation and edge similarity weights.
[0113] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0114] The above embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A knowledge graph construction method integrating node attenuation and edge similarity weight, characterized in that: The method comprises: Collecting multi-source heterogeneous data and preprocessing the multi-source heterogeneous data; Identify entities in pre-processed multi-source heterogeneous data and extract relationships between entities; Establish an initial graph structure based on entities and the relationships between them, and determine how to represent nodes and edges in the graph; The representation of nodes and edges in the constructed graph structure is modified by integrating time decay and spatial correlation factors, and the edge connection relationship is further adjusted by integrating semantic similarity based on the modification of node and edge weights. After correcting and optimizing the graph structure, the final knowledge graph data representation is generated and unified storage and graph computing structured encapsulation are completed.
2. The method for constructing a knowledge graph by fusing node attenuation and edge similarity weights according to claim 1, characterized in that: The identifying of entities in the pre-processed multi-source heterogeneous data and extracting relationships between entities includes: A pre-trained language model combined with a sequence annotation structure is used to perform named entity recognition on text data, extracting key entity information involved in the data. During the recognition process, context windows, part-of-speech tagging results, and dependency syntactic structures are used for semantic enhancement. For semi-structured and structured data, based on field semantic mapping and regular template rules, the field content is classified and standardized into entity types, and multiple types of semantic entities are identified; For text data, we use dependency parsing tools to extract subject-verb-object structures, and combine them with relation extraction models to identify the semantic relationship types between entity pairs. For structured or semi-structured data, the structural connections between entities corresponding to the fields are determined through inter-field position logic and data pattern reasoning; All extracted relations are organized in the form of triples, and the source, corresponding timestamp, spatial location and context information of the triples in the original data are recorded.
3. The method for constructing a knowledge graph by fusing node attenuation and edge similarity weights according to claim 2, characterized in that: The steps of establishing an initial graph structure based on entities and relationships between entities and determining how to represent nodes and edges in the graph include: Generate a corresponding node in the graph for each entity based on the entity type; According to the relationship type in the triple, establish edge connections between nodes and label each edge with the relationship type and its related attributes; For connections between multiple relationships and multi-type entities, a heterogeneous graph representation mechanism is adopted.
4. The method for constructing a knowledge graph by fusing node attenuation and edge similarity weights according to claim 1, characterized in that: The fusing of time decay and spatial correlation factors to modify the representation of nodes and edges in the constructed graph structure, and fusing semantic similarity on the basis of node and edge weight modification to further adjust edge connection relationships include: In terms of node representation correction, a timestamp is assigned to each node, and a time decay factor is calculated based on the time interval between the last update time and the current processing time of the node. The factor is modeled in exponential form, and the formula is as follows: Among them, λ t is the time attenuation coefficient, t is the time interval; by calculating the distance d(s, s0) between the node position and the preset reference position, and constructing the Sigmoid form of spatial attenuation function as follows: Where r is the influence radius and k is the spatial attenuation slope. Combining the two attenuation factors of time and space, the complete spatiotemporal coupling attenuation weight is obtained as follows: α(t,s)=α s (s)·a t (t) The decay weight is used to decay the representation vector of the updated node.
5. The method for constructing a knowledge graph by fusing node attenuation and edge similarity weights according to claim 4, characterized in that: The fusing of time decay and spatial correlation factors to modify the representation of nodes and edges in the constructed graph structure, and fusing semantic similarity on the basis of node and edge weight modification to further adjust edge connection relationships also includes: In terms of edge representation correction, for each existing edge, a sliding average strategy is used to update its weight. The update formula is: in, is the historical weight of the edge, β is the smoothing coefficient between 0 and 1, sim(e i ,e j ) represents the semantic similarity between the entity nodes at both ends of the edge.
6. The method for constructing a knowledge graph by fusing node attenuation and edge similarity weights according to claim 5, characterized in that: The fusing of time decay and spatial correlation factors to modify the representation of nodes and edges in the constructed graph structure, and fusing semantic similarity on the basis of node and edge weight modification to further adjust edge connection relationships also includes: Based on the update of node and edge representation, a semantic-driven edge connection adjustment mechanism is introduced to expand and clean up the potential relationships in the graph structure; When traversing pairs of nodes that are not directly connected in the graph, if their semantic similarity exceeds a preset threshold and they are close in both time and space, they are considered potential connections and new edge connections are added to enhance semantic coverage. Edge connections with long-term low semantic similarity and significantly reduced spatiotemporal attenuation weights are removed or marked as inactive. The correction and adjustment process uses the graph computing framework for unified modeling and automated batch processing, and collaborates with the graph database indexing mechanism.
7. The method for constructing a knowledge graph by fusing node attenuation and edge similarity weights according to claim 1, characterized in that: After correcting and optimizing the graph structure, the final knowledge graph data representation is generated and unified storage and graph computing structured encapsulation are completed, including: Build an index dictionary based on the current state of all nodes and edges in the graph; According to the requirements of the graph computing framework, the graph structure is converted into data objects that adapt to its native format; Store the graph structure in an efficient graph database or graph data warehouse, generate reusable persistent storage files for it, retain the historical evolution version and update operation log of the graph structure, and build a graph version control system.
8. A knowledge graph construction system integrating node attenuation and edge similarity weights, characterized in that: include: A data acquisition module, configured to acquire multi-source heterogeneous data and pre-process the multi-source heterogeneous data; Entity recognition module, used to identify entities in pre-processed multi-source heterogeneous data and extract the relationships between entities; The graph structure building module is used to build the initial graph structure based on entities and the relationships between entities, and determine the representation of nodes and edges in the graph; The node and edge correction module is used to integrate time decay and spatial correlation factors to correct the representation of nodes and edges in the constructed graph structure, and further adjust the edge connection relationship by integrating semantic similarity based on the node and edge weight correction; The knowledge graph construction module is used to organize and generate the final knowledge graph data representation after correcting and optimizing the graph structure, and complete the unified storage and graph computing structured encapsulation.
9. An electronic device, characterized in that: The device includes a processor and a memory; the memory stores a program, and the program is loaded and executed by the processor to implement a knowledge graph construction method that integrates node attenuation and edge similarity weights as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The storage medium stores a program, which, when executed by a processor, is used to implement a knowledge graph construction method that integrates node attenuation and edge similarity weights as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Ningxia rice knowledge graph construction method
CN111538847A
Electric intelligent question and answer multi-mode retrieval method and system
CN119513271A
Knotarization intelligent question and answer customer service method and system based on knowledge graph
CN119938816A
Bank financing product recommendation method and system
CN119963296A
Data Fusion Method and Apparatus Based on Knowledge Graph, and Electronic Device
US20230315703A1
Cited By
Component risk prediction method and system fused with time decay factor, and storage medium
CN121304309A
Component risk prediction method, system and storage medium with fusion time decay factor
CN121304309B
Financial risk early warning method and device based on knowledge graph, equipment and medium
CN121391509A
Financial risk early warning method and device based on knowledge graph, equipment and medium
CN121391509B
Data organization and time sequence prediction method and device based on space-time mapping knowledge domain
CN121524558A
