Knowledge graph construction method and system fusing node decay and edge similarity weight

By integrating node decay and edge similarity weights, and combining temporal and spatial factors to optimize the knowledge graph, this approach addresses the problem of neglecting spatial factors in existing technologies. It enables precise adjustment and efficient response of the graph, improving its adaptability in dynamic environments and the accuracy of analytical decision-making.

CN120687643BActive Publication Date: 2026-02-24ZHONGKE LANBA DIGITAL TECH (SUZHOU) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510779106.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-12
Publication Date
2026-02-24
Estimated Expiration
2045-06-12

AI Technical Summary

Technical Problem

Existing knowledge graph construction methods fail to effectively reflect the adjustment of spatial factors on the importance of knowledge in dynamic environments, resulting in untimely graph updates and inaccurate structural adjustments, which affect subsequent analysis and decision-making results.

Method used

The method that integrates node decay and edge similarity weights corrects the representation of nodes and edges by combining temporal decay and spatial correlation factors, introduces semantic similarity to adjust edge connection relationships, and adopts a spatiotemporal coupling decay mechanism to optimize the graph structure.

Benefits of technology

It enables precise adjustment of knowledge in the graph, improves the graph's adaptability in dynamic environments and the reliability of analysis and decision-making, enhances the graph's semantic expressiveness and structural compactness, and reduces computational overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120687643B_ABST
    Figure CN120687643B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of knowledge graph construction, in particular to a knowledge graph construction method and system fusing node attenuation and edge similarity weight, which comprises the following steps: collecting multi-source heterogeneous data and preprocessing the multi-source heterogeneous data; identifying entities in the preprocessed multi-source heterogeneous data and extracting the relationship between the entities; establishing an initial graph structure based on the entities and the relationship between the entities, and determining the representation mode of nodes and edges in the graph; fusing time attenuation and spatial correlation factors to correct the representation of nodes and edges in the constructed graph structure, and further adjusting the edge connection relationship by fusing semantic similarity on the basis of the weight correction of nodes and edges; organizing and generating a final knowledge graph data representation after the graph structure is corrected and optimized, and completing unified storage and graph computing structured packaging. The application can effectively solve the problem that the existing graph construction scheme only relies on time attenuation and ignores spatial factors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of knowledge graph construction technology, and in particular to a knowledge graph construction method and system that integrates node decay and edge similarity weights. Background Technology

[0002] With the widespread application of artificial intelligence (AI) technology in scenarios such as digital marketing, financial risk control, 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-making assistance. In recent years, to address the challenges of semantic uncertainty, data heterogeneity, and relational complexity, researchers have gradually evolved from static to dynamic knowledge graphs, attempting to enhance their real-time performance and scalability by introducing models such as graph neural networks. Against this backdrop, methods for constructing and updating dynamic knowledge graphs have gradually become an important research direction in the field of artificial intelligence.

[0003] Existing knowledge graph construction methods typically employ static construction or periodic updates. They first extract information from the original data, identifying entities and their relationships, and then organize this information into a graph structure for storage. During the graph structure update process, some methods introduce a time decay factor to reduce the weights of older nodes to simulate the time-sensitivity of knowledge; simultaneously, other 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 oriented towards dynamic environments, the effectiveness of knowledge is not only affected by time but also often closely related to its spatial location. Existing knowledge graph construction schemes generally adopt a time decay-based strategy to adjust node weights, but this approach fails to effectively reflect the moderating effect of spatial factors on the importance of knowledge. For example, the same knowledge may be outdated in some regions but still have high reference value in others. The lack of a spatiotemporal joint modeling mechanism can easily lead to untimely graph updates and inaccurate structural adjustments, thus affecting subsequent graph-based analysis and decision-making results. Therefore, existing technologies still have certain adaptive bottlenecks when dealing with the problem of the dynamic evolution of knowledge in knowledge graphs over time and space. Summary of the Invention

[0005] This application provides a method and system for constructing a knowledge graph that integrates node decay and edge similarity weights, effectively addressing the shortcomings of existing graph construction schemes that rely solely on time decay and neglect spatial factors. This application provides the following technical solution:

[0006] Firstly, this application provides a method for constructing a knowledge graph that integrates node decay and edge similarity weights, the method comprising:

[0007] Collect multi-source heterogeneous data and preprocess the multi-source heterogeneous data;

[0008] Identify entities in preprocessed multi-source heterogeneous data and extract the relationships between entities;

[0009] An initial graph structure is established based on entities and the relationships between entities, and the representation of nodes and edges in the graph is determined.

[0010] The representation of nodes and edges in the graph structure has been constructed by integrating time decay and spatial correlation factors, and the edge connection relationship is further adjusted by integrating semantic similarity on the basis of node and edge weight correction.

[0011] After correcting and optimizing the graph structure, the final knowledge graph data representation is generated, and unified storage and structured encapsulation of graph computation are completed.

[0012] In one specific implementation scheme, identifying entities in the preprocessed multi-source heterogeneous data and extracting relationships between entities includes:

[0013] A pre-trained language model combined with sequence labeling structure is used to perform named entity recognition on text data to extract key entity information involved in the data. During the recognition process, semantic enhancement is performed using context window, part-of-speech tagging results and dependency syntax structure.

[0014] For semi-structured and structured data, based on field semantic mapping and regular expression template rules, the field content is classified and standardized by entity type to identify multiple types of semantic entities;

[0015] For text data, a dependency parsing tool is used to extract the subject-verb-object structure, and a relation extraction model is used to identify the semantic relationship types between entity pairs.

[0016] For structured or semi-structured data, the structural relationships between entities corresponding to fields are determined through positional logic between fields 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 feasible implementation, the step of establishing an initial graph structure based on entities and the relationships between entities, and determining the representation of nodes and edges in the graph, includes:

[0019] Generate a corresponding node in the graph for each entity based on its type;

[0020] Based on the relation type in the triples, establish edge connections between nodes and label each edge with the relation type and its related attributes;

[0021] For connections between multiple relationships and multiple types of entities, a heterogeneous graph representation mechanism is adopted.

[0022] In a specific feasible implementation, the fusion of time decay and spatial correlation factor correction has already constructed the representation of nodes and edges in the graph structure, and further adjusts the edge connection relationship by fusing semantic similarity based on the node and edge weight correction, including:

[0023] Regarding node representation correction, a timestamp is assigned to each node, and a time decay factor is calculated based on the time interval between the node's last update time and the current processing time. This factor is modeled in exponential form, as shown in the following formula:

[0024]

[0025] Where, λ t Let be the time decay coefficient, and t be the time interval. The spatial decay function in the form of a sigmoid is constructed by calculating the distance d(s,s0) between the node position and the preset reference position, as follows:

[0026]

[0027] Where r is the radius of influence and k is the spatial attenuation slope; combining the temporal and spatial attenuation factors, 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 feasible implementation, the fusion of time decay and spatial correlation factor correction has already constructed the representation of nodes and edges in the graph structure, and further adjusts the edge connection relationship by fusing semantic similarity based on the node and edge weight correction, and also includes:

[0031] Regarding the edge representation correction, for each existing edge, a moving average strategy is used to update its weight, and the update formula is as follows:

[0032]

[0033] in, sim(e) represents the historical weight of the edge, β is a smoothing coefficient between 0 and 1, and sim(e) represents the historical weight of the edge. i ,e j The expression represents the semantic similarity between the entity nodes at both ends of an edge.

[0034] In a specific feasible implementation, the fusion of time decay and spatial correlation factor correction has already constructed the representation of nodes and edges in the graph structure, and further adjusts the edge connection relationship by fusing semantic similarity based on the node and edge weight correction, and also includes:

[0035] Based on the node and edge representation update, a semantically 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 associations and new edge connections are added to enhance semantic coverage. Edge connections with long-term low semantic similarity and significantly reduced spatiotemporal decay weights are removed or marked as inactive.

[0037] The correction and adjustment process utilizes a graph computing framework for unified modeling and automated batch processing, and works in conjunction with the graph database indexing mechanism.

[0038] In a specific feasible implementation, the step of organizing and generating the final knowledge graph data representation after correcting and optimizing the graph structure, and completing the unified storage and structured encapsulation of graph computation includes:

[0039] Based on the current state of all nodes and edges in the graph, construct an index dictionary;

[0040] In accordance with the requirements of the graph computing framework, the graph structure is transformed into a data object adapted to its native format;

[0041] Store the graph structure in an efficient graph database or graph data warehouse, and generate reusable persistent storage files for it, retaining the historical evolution versions and update operation logs of the graph structure, thus building a graph version control system.

[0042] Secondly, this application provides a knowledge graph construction system that integrates node decay and edge similarity weights, employing the following technical solution:

[0043] A knowledge graph construction system that integrates node decay and edge similarity weights includes:

[0044] The data acquisition module is used to acquire multi-source heterogeneous data and preprocess the multi-source heterogeneous data;

[0045] The entity recognition module is used to identify entities in preprocessed multi-source heterogeneous data and extract the relationships between entities;

[0046] The graph structure building module is used to build an initial graph structure based on entities and the relationships between entities, and to determine the representation of nodes and edges in the graph.

[0047] The node and edge correction module is used to correct the representation of nodes and edges in the constructed graph structure by integrating time decay and spatial correlation factors, and further adjust the edge connection relationship by integrating semantic similarity on the basis of 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 to complete the unified storage and structured encapsulation of graph computation.

[0049] Thirdly, this application provides an electronic device, the device including a processor and a memory; the memory stores a program, the program being loaded and executed by the processor to implement a knowledge graph construction method that integrates node decay and edge similarity weights as described in the first aspect.

[0050] Fourthly, this application provides a computer-readable storage medium storing a program that, when executed by a processor, is used to implement a knowledge graph construction method that integrates node decay and edge similarity weights as described in the first aspect.

[0051] In summary, the beneficial effects of this application include at least the following:

[0052] (1) The proposed spatiotemporal coupling attenuation mechanism organically combines temporal and spatial attenuation to achieve dynamic and precise adjustment of node weights in the graph. Specifically, this mechanism not only performs exponential attenuation based on the update time of node information, but also adjusts node weights through a distance function between spatial location and reference location, thereby distinguishing the effectiveness differences of the same knowledge in different geographical regions. This spatiotemporal joint modeling significantly improves the graph's responsiveness to the dynamic evolution of knowledge in the spatiotemporal context, 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 changing trends of 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 that rely solely on historical weights and smooth updates. This mechanism selectively adds potentially highly relevant edge connections by evaluating the semantic similarity between nodes in the graph in real time, combined with spatiotemporal decay factors, while removing edges that have been inactive for a long time or have low similarity, thereby improving the semantic expressiveness 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, enhancing the adaptability and stability of the overall system in dynamic and complex scenarios.

[0054] By introducing a spatiotemporal coupling attenuation mechanism and jointly considering the temporal validity and spatial distribution characteristics of nodes and edges, precise adjustments to the knowledge representation in the graph are achieved. Simultaneously, semantic similarity indices are used to dynamically optimize edge connections, enhancing the graph's responsiveness 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 temporal attenuation and neglect spatial factors. It avoids the problem of not reflecting differences in knowledge invalidation and validity across different spatial regions, improves the timeliness of graph updates and the accuracy of structural adjustments, and significantly enhances the graph's adaptability 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 this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, the preferred embodiments of this application are described in detail below with reference to the accompanying drawings. Attached Figure Description

[0056] Figure 1 This is a flowchart illustrating the knowledge graph construction method that integrates node decay and edge similarity weights in this embodiment of the application.

[0057] Figure 2 This is a structural block diagram of the knowledge graph construction system that integrates node decay and edge similarity weights in the embodiments of this application.

[0058] Figure 3 This is a block diagram of an electronic device constructed from a knowledge graph that integrates node decay and edge similarity weights in an embodiment of this application. Detailed Implementation

[0059] The specific embodiments of this application will be described in further detail below with reference to the accompanying drawings and examples. The following examples are used to illustrate this application, but are not intended to limit the scope of this application.

[0060] Optionally, this application uses the knowledge graph construction method of fusion node decay and edge similarity weight provided in various embodiments in an electronic device as an example for illustration. The electronic device is a terminal or server. The terminal can be a mobile phone, computer, tablet computer, etc. This embodiment does not limit the type of electronic device.

[0061] Reference Figure 1 This is a flowchart illustrating a knowledge graph construction method that integrates node decay and edge similarity weights according to an embodiment of this application. The method includes at least the following steps:

[0062] Step S101: Collect multi-source heterogeneous data and preprocess 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 originate from structured databases (such as business logs and metadata tables), semi-structured resources (such as XML and JSON format documents), and unstructured data sources (such as web page content, social media platform text, and news corpora). During the data collection process, for each data record, its generation time and spatial location information are simultaneously acquired. The time information can be based on the data generation time, reception time, or reporting time record, while the spatial location information can be obtained based on GPS positioning, geographic tags, or network address resolution. All collected data is divided into different data caching modules according to the source type and data structure for subsequent classification and processing.

[0064] After data collection, a unified preprocessing operation is performed on the acquired heterogeneous data. For structured and semi-structured data, key content is extracted through field filtering and pattern parsing. For unstructured text data, natural language preprocessing processes such as Chinese word segmentation, part-of-speech tagging, and entity boundary annotation are implemented to standardize semantic structure and enhance entity recognition accuracy. During this process, preprocessing steps such as standardizing encoding formats, filtering noise information (such as invalid punctuation and garbled characters), and normalizing field representations are completed simultaneously. Furthermore, for all data entries, contextual feature information, such as upstream and downstream related keywords and their syntactic structures, is extracted for use as input to the subsequent representation learning model. After preprocessing, all standardized data is organized into a uniformly structured intermediate dataset, with fields including data content, time, spatial location, and contextual features, laying the foundation for entity recognition and relation extraction in the next step.

[0065] Step S102: Identify entities in the preprocessed multi-source heterogeneous data and extract the relationships between entities.

[0066] In step S102, entity recognition and relation extraction are performed on the multi-source heterogeneous data preprocessed in step S101. First, a unified named entity recognition process is performed on all text-based data, using a pre-trained language model combined with sequence labeling structures (e.g., BERT-Bi LSTM-CRF) to extract key entity information from the data. During recognition, semantic enhancement is performed using context windows, part-of-speech tagging results, and dependency syntax structures to improve the accuracy of recognizing cross-phrase and nested entities. For semi-structured and structured data, entity type classification and standardization are performed on field content based on field semantic mapping and regular expression template rules, thereby recognizing various types of semantic entities such as geographical locations, event names, organizational structures, and equipment identifiers. All identified entities are assigned unique identifiers, and their corresponding time information, spatial location, and context fragments in the original data are retained.

[0067] Building upon entity recognition, semantic relationships between entities are extracted from text and structured data. For text data, dependency parsing tools are used to extract subject-verb-object structures, and a relation extraction model is used to identify the types of semantic relationships between entity pairs, such as "contains," "located in," "belongs to," and "influences." For structured or semi-structured data, structural connections between entities corresponding to fields are determined through positional logic between fields and data pattern reasoning. All extracted relations are organized in the form of triples (entity 1, relation, entity 2), and the source, corresponding timestamp, spatial location, and contextual information of the triples in the original data are recorded for use in the subsequent graph structure construction stage.

[0068] Step S103: Establish an initial graph structure based on entities and the relationships between entities, and determine the representation of nodes and edges in the graph.

[0069] In step S103, an initial graph structure is established based on the entities and their relationship triples identified in step S102. First, according to the entity type, unique identifier, and associated attribute information (e.g., time, space, origin), a corresponding node is generated for each entity in the graph, and a multi-dimensional attribute vector is assigned to each node. The attribute vectors can be constructed using static encoding methods, such as using word embedding models (e.g., Word2Vec, GloVe) to perform low-dimensional mapping between entity categories and semantic labels, while combining the contextual statistical features of the nodes to form a comprehensive representation describing the semantic and structural attributes of the nodes.

[0070] After node generation, edge connections between nodes are established based on the relation types in the triples, and each edge is labeled with its relation type and related attributes (e.g., relation confidence, occurrence time, context summary, etc.). Edge representation is modeled using relation embedding vectors. Relation embeddings can be generated through pre-trained models, knowledge graph embedding methods (such as TransE, RotatE, etc.), or custom semantic projection functions, ensuring that the semantic relations expressed by the edges have a vectorized and learnable feature structure. For connections between multiple relations 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 needs based on graph neural networks.

[0071] Throughout the entire graph structure establishment process, a unified index mapping relationship is generated for nodes and edges, and the graph is 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: The representation of nodes and edges in the constructed graph structure is corrected by integrating time decay and spatial correlation factors, and the edge connection relationship is further adjusted by integrating semantic similarity based on the node and edge weight correction.

[0073] In step S104, for the completed graph structure, the temporal and spatial distribution factors are further integrated to dynamically modify the representation of nodes and edges in the graph. 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 in time, space and semantics, and improve the overall expression accuracy and structural stability.

[0074] Regarding node representation correction, a timestamp is first assigned to each node, and a time decay factor is calculated based on the time interval between the node's last update and the current processing time. This factor is modeled exponentially, as shown in the following formula:

[0075]

[0076] Where, λ t Let be the time decay coefficient, and t be the time interval. Subsequently, a spatial decay factor is introduced to reflect the changing importance of nodes in their spatial distribution. The spatial decay function in the form of a sigmoid function is constructed by calculating the distance d(s,s0) between the node position and the preset reference position:

[0077]

[0078] Where r is the radius of influence and k is the spatial attenuation slope. Combining the temporal and spatial attenuation factors, the complete spatiotemporal coupling attenuation weight is obtained as follows:

[0079] α(t,s)=α s (s)·α t (t)

[0080] This decay weight is used to decay and update the representation vectors of nodes during graph evolution, reducing the activity of nodes that have not been updated for a long time and are far from the core event region, thereby dynamically weakening their influence in the graph. Regarding edge representation correction, a moving average strategy is used to update the weight of each existing edge. The update formula is:

[0081]

[0082] in, sim(e) represents the historical weight of the edge, β is a smoothing coefficient between 0 and 1, and sim(e) represents the historical weight of the edge. i ,e jThe edge weight represents the semantic similarity between the entity nodes at both ends. This similarity can be estimated by calculating the cosine distance from the entity's embedding vector, contextual feature matching, or graph structure adjacency patterns. This update method allows the edge weight to maintain its original semantic coherence while responding to real-time changes in the strength of relationships between entities.

[0083] Building upon the node and edge representation updates, a semantically driven edge connection adjustment mechanism is further introduced to expand and clean up potential relationships in the graph structure. On one hand, it traverses non-directly connected node pairs in the graph. If their semantic similarity exceeds a preset threshold and they are both temporally and spatially close, they are considered potential associations, and new edge connections are added to enhance semantic coverage. On the other hand, edge connections with consistently low semantic similarity and significantly reduced spatiotemporal decay weights are removed or marked as inactive to control graph redundancy and improve graph computation efficiency.

[0084] The entire correction and adjustment process can be modeled and automated in batches using graph computing frameworks (such as DGL), and work in conjunction with graph database indexing mechanisms to achieve efficient data consistency management and traceability maintenance, providing a spatiotemporally sensitive and semantically adaptive structural foundation for subsequent graph neural network modeling and intelligent reasoning tasks.

[0085] Furthermore, as a preferred embodiment, in another feasible embodiment, the formula for calculating the spatiotemporal coupling attenuation weight can 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, representing the time interval; d(s,s0) is the distance between the spatial location s of the node and the reference point s0; sim(e i ,e j ) is node e i and e j semantic similarity, λ tThe time decay parameter, greater than 0, controls the influence of time intervals, and the decay is smoother due to the quadratic increase of time. `k` is a fundamental spatial scale parameter greater than 0, ensuring the spatial distance denominator is not zero. `γ` is a semantic similarity adjustment factor greater than 0, amplifying the impact of semantic similarity on spatial decay. This formula alleviates the problem of excessively rapid decay in traditional exponential decay over short time intervals by using a reciprocal square function instead of an exponential function in the time decay part, achieving a gentler decrease in time weights. The spatial decay part innovatively introduces semantic similarity as a spatial decay adjustment factor into the denominator. When semantic similarity is high, decay is reduced at the same spatial distance, allowing nodes with strong semantic connections to maintain high weights even if they are spatially distant, thus effectively integrating spatiotemporal and semantic information. For the constructed graph structure, a novel spatiotemporally coupled weight function is designed to dynamically correct the representations of nodes and edges. This weighting function comprehensively considers the effects of time interval, spatial distance, and semantic similarity. The time decay adopts the inverse square form to ensure a smoother decay curve and avoid the loss of effective information due to the excessively rapid decay of traditional exponential decay. The spatial decay incorporates semantic similarity as an adjustment factor, so that nodes with strong semantic relevance still maintain a high weight when the spatial distance is far, thereby enhancing the consistency of the graph in terms of semantic and spatiotemporal dimensions.

[0088] Regarding edge representation correction, for each existing edge, a moving average strategy is used to update its weight. The update formula can also be:

[0089]

[0090] Wherein d(s) i ,s j ) is node s i and node s j The spatial distance is η, which is a semantic weight adjustment factor that balances the influence of semantics and spatial distance.

[0091] This formula innovatively combines semantic similarity and spatial distance to form the instantaneous update of edge weights. Compared to traditional methods that only use semantic similarity, this scheme considers the impact of spatial proximity on edge weights, preventing erroneous connections between semantically similar nodes that are too far apart in space. By smoothly fusing historical weights, the edge weight update process is ensured to be stable, avoiding drastic fluctuations in weights due to single data anomalies. During the node and edge weight correction process, the edge weight update introduces a moving average model that combines semantic similarity and spatial distance. The instantaneous update of edge weights is formed by linearly weighting semantic weights and spatial weights, making full use of the multidimensional information between nodes, preventing erroneous connections caused by spatial heterogeneity, and smoothing 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 the unified storage and structured encapsulation of graph computation.

[0093] In step S105, after completing operations such as dynamic correction of nodes and edges and adjustment of semantic associations, the graph data is uniformly structured and formatted for encapsulation, taking into account the stability, scalability, and task adaptability of the graph structure, to generate the final knowledge graph representation for deployment, invocation, and updating. This step not only marks the end of the knowledge graph construction process but also provides consistency assurance for subsequent graph neural network modeling, multimodal fusion inference, 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, relation type, weighting information, spatiotemporal annotations, and semantic annotations. During the index construction process, a hash mapping and spatial partitioning strategy are combined to improve the access efficiency and local cache hit rate of the graph structure in a distributed environment.

[0095] Subsequently, in accordance with the requirements of graph computing frameworks (such as DGL, PyG, etc.), the graph structure is transformed into a data object adapted to its native format. For example, in the DGL framework, node and edge attributes are encapsulated into the ndata and edata fields of the graph structure, respectively, while the node / edge type is labeled to support heterogeneous graph modeling. In the attribute fields, multi-dimensional features related to learning, such as embedding vectors, decay coefficients, semantic labels, and relation confidence, are retained to ensure that the graph neural network can fully mine the semantic structural information of the graph.

[0096] Finally, the graph structure is stored in a high-performance graph database (such as Neo4j or TigerGraph) or a graph data warehouse, and reusable persistent storage files (such as JSON, GraphML, and Pickle formats) are generated for it, facilitating rapid loading and migration deployment across different tasks. Simultaneously, to support subsequent online updates and evolutionary learning, historical evolution versions and update operation logs of the graph structure are preserved, constructing a graph version control system that ensures the graph possesses both structural completeness and controllable evolution, along with flexible invocation capabilities.

[0097] Through the above processing, the entire process of constructing a structured, spatiotemporally semantically consistent, and interactive knowledge graph from raw, multi-source heterogeneous data 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 attenuation mechanism and jointly considering the temporal validity and spatial distribution characteristics of nodes and edges, precise adjustments to the knowledge representation in the graph can be achieved. Simultaneously, by dynamically optimizing edge connections using semantic similarity metrics, the graph's responsiveness to the spatiotemporal evolution characteristics of multi-source heterogeneous data is enhanced. This technique effectively addresses the shortcomings of existing graph construction schemes that rely solely on temporal attenuation and neglect spatial factors. It avoids the problem of not reflecting differences in knowledge invalidation and validity across different spatial regions, improves the timeliness of graph updates and the accuracy of structural adjustments, and significantly enhances the graph's adaptability 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 decay and edge similarity weights according to an embodiment of this application. The system includes at least the following modules:

[0100] The data acquisition module is used to collect multi-source heterogeneous data and preprocess the multi-source heterogeneous data;

[0101] The entity recognition module is used to identify entities in preprocessed multi-source heterogeneous data and extract the relationships between entities;

[0102] The graph structure building module is used to build an initial graph structure based on entities and the relationships between entities, and to determine the representation of nodes and edges in the graph.

[0103] The node and edge correction module is used to correct the representation of nodes and edges in the constructed graph structure by integrating time decay and spatial correlation factors, and further adjust the edge connection relationship by integrating semantic similarity on the basis of 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 to complete the unified storage and structured encapsulation of graph computation.

[0105] For relevant details, please refer to the above method implementation examples.

[0106] Figure 3 This is a block diagram of an electronic device provided in one embodiment of this application. The device includes at least a processor 401 and a memory 402.

[0107] Processor 401 may include one or more processing cores, such as a quad-core processor or an octa-core processor. Processor 401 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 401 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 401 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 401 may also include an AI (Artificial Intelligence) processor, which is used to handle computational 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 or flash memory devices. In some embodiments, the non-transitory computer-readable storage media 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 decay and edge similarity weights provided in the method embodiments of this application.

[0109] In some embodiments, the electronic device may also optionally include: a peripheral device interface and at least one peripheral device. The processor 401, memory 402, and peripheral device interface can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface via a bus, signal line, or circuit board. Indicatively, peripheral devices include, but are not limited to: radio frequency circuitry, a touch display screen, audio circuitry, and a power supply.

[0110] Of course, electronic devices may also include fewer or more components, and this embodiment does not limit this.

[0111] Optionally, this application also provides a computer-readable storage medium storing a program that is loaded and executed by a processor to implement the knowledge graph construction method for fusing node decay and edge similarity weights in the above method embodiments.

[0112] Optionally, this application also provides a computer product including a computer-readable storage medium storing a program, which is loaded and executed by a processor to implement the knowledge graph construction method of fusing node decay and edge similarity weights in the above method embodiments.

[0113] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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 illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for constructing a knowledge graph that integrates node decay and edge similarity weights, characterized in that, The method includes: Collect multi-source heterogeneous data and preprocess the multi-source heterogeneous data; Identify entities in preprocessed multi-source heterogeneous data and extract the relationships between entities; An initial graph structure is established based on entities and the relationships between entities, and the representation of nodes and edges in the graph is determined. The graph structure has been modified by integrating time decay and spatial correlation factors to represent nodes and edges. Furthermore, based on the node and edge weight correction, semantic similarity is integrated to further adjust edge connections. This process includes: Regarding node representation correction, a timestamp is assigned to each node, and a time decay factor is calculated based on the time interval between the node's last update time and the current processing time. This factor is modeled in exponential form, as shown in the following formula: ; in, The time decay coefficient, The time interval is calculated by measuring the distance between the node position and the preset reference position. The spatial decay function in the form of Sigmoid is constructed as follows: ; in, To affect the radius, The spatial attenuation slope is used as an example. Combining the temporal and spatial attenuation factors yields the complete spatiotemporal coupling attenuation weight as follows: ; Decay weights are used to decay the representation vector of updated nodes; The fusion of time decay and spatial correlation factor correction has constructed the representation of nodes and edges in the graph structure, and further adjusts the edge connection relationship by fusing semantic similarity based on the node and edge weight correction. Regarding the edge representation correction, for each existing edge, a moving average strategy is used to update its weight, and the update formula is as follows: ; in, For the historical weight of the edge, The smoothing coefficient is between 0 and 1. This represents the semantic similarity between the entity nodes at both ends of an edge. After correcting and optimizing the graph structure, the final knowledge graph data representation is generated, and unified storage and structured encapsulation of graph computation are completed.

2. The knowledge graph construction method that integrates node decay and edge similarity weights according to claim 1, characterized in that, The process of identifying entities in preprocessed multi-source heterogeneous data and extracting relationships between entities includes: A pre-trained language model combined with sequence labeling structure is used to perform named entity recognition on text data to extract key entity information involved in the data. During the recognition process, semantic enhancement is performed using context window, part-of-speech tagging results and dependency syntax structure. For semi-structured and structured data, based on field semantic mapping and regular expression template rules, the field content is classified and standardized by entity type to identify multiple types of semantic entities; For text data, a dependency parsing tool is used to extract the subject-verb-object structure, and a relation extraction model is used to identify the semantic relationship types between entity pairs. For structured or semi-structured data, the structural relationships between entities corresponding to fields are determined through positional logic between fields 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 knowledge graph construction method that integrates node decay and edge similarity weights according to claim 2, characterized in that, The process of establishing an initial graph structure based on entities and the relationships between entities, and determining the representation of nodes and edges in the graph, includes: Generate a corresponding node in the graph for each entity based on its type; Based on the relation type in the triples, establish edge connections between nodes and label each edge with the relation type and its related attributes; For connections between multiple relationships and multiple types of entities, a heterogeneous graph representation mechanism is adopted.

4. The knowledge graph construction method that integrates node decay and edge similarity weights according to claim 1, characterized in that, The fusion of time decay and spatial correlation factor correction has constructed the representation of nodes and edges in the graph structure, and further adjusts the edge connection relationship by fusing semantic similarity based on the node and edge weight correction. Based on the node and edge representation update, a semantically driven edge connection adjustment mechanism is introduced to expand and clean up the potential relationships in the graph structure; Traverse the graph and find pairs of nodes that are not directly connected. If their semantic similarity exceeds a preset threshold and they are close in both time and space, they are considered potential associations and new edges are added to enhance semantic coverage. Edges with long-term low semantic similarity and significantly reduced spatiotemporal decay weights are removed or marked as inactive. The correction and adjustment process utilizes a graph computing framework for unified modeling and automated batch processing, and works in conjunction with the graph database indexing mechanism.

5. The knowledge graph construction method that integrates node decay and edge similarity weights according to claim 1, characterized in that, The process of organizing and generating the final knowledge graph data representation after correcting and optimizing the graph structure, and completing the unified storage and structured encapsulation of graph computation includes: Based on the current state of all nodes and edges in the graph, construct an index dictionary; In accordance with the requirements of the graph computing framework, the graph structure is transformed into a data object adapted to its native format; Store the graph structure in an efficient graph database or graph data warehouse, and generate reusable persistent storage files for it, retaining the historical evolution versions and update operation logs of the graph structure, thus building a graph version control system.

6. A knowledge graph construction system that integrates node decay and edge similarity weights, characterized in that, include: The data acquisition module is used to acquire multi-source heterogeneous data and preprocess the multi-source heterogeneous data; The entity recognition module is used to identify entities in preprocessed multi-source heterogeneous data and extract the relationships between entities; The graph structure building module is used to build an initial graph structure based on entities and the relationships between entities, and to determine the representation of nodes and edges in the graph. The node and edge correction module is used to correct the representation of nodes and edges in the constructed graph structure by integrating time decay and spatial correlation factors, and to further adjust the edge connection relationships by integrating semantic similarity based on the node and edge weight correction. The steps of integrating time decay and spatial correlation factors to correct the representation of nodes and edges in the constructed graph structure, and further adjusting the edge connection relationships by integrating semantic similarity based on the node and edge weight correction, include: Regarding node representation correction, a timestamp is assigned to each node, and a time decay factor is calculated based on the time interval between the node's last update time and the current processing time. This factor is modeled in exponential form, as shown in the following formula: ; in, The time decay coefficient, The time interval is calculated by measuring the distance between the node position and the preset reference position. The spatial decay function in the form of Sigmoid is constructed as follows: ; in, To affect the radius, The spatial attenuation slope is used as an example. Combining the temporal and spatial attenuation factors yields the complete spatiotemporal coupling attenuation weight as follows: ; Decay weights are used to decay the representation vector of updated nodes; The fusion of time decay and spatial correlation factor correction has constructed the representation of nodes and edges in the graph structure, and further adjusts the edge connection relationship by fusing semantic similarity based on the node and edge weight correction. Regarding the edge representation correction, for each existing edge, a moving average strategy is used to update its weight, and the update formula is as follows: ; in, For the historical weight of the edge, The smoothing coefficient is between 0 and 1. This represents the semantic similarity between the entity nodes at both ends of an edge. 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 to complete the unified storage and structured encapsulation of graph computation.

7. An electronic device, characterized in that, The device includes 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 decay and edge similarity weights as described in any one of claims 1 to 5.

8. 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 decay and edge similarity weights as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Ningxia rice knowledge graph construction method

    CN111538847A

  • Electric intelligent question and answer multi-mode retrieval method and system

    CN119513271A