A method for completing a groundwater level and building risk knowledge graph
By identifying long-tail entities, acquiring public opinion information and multimodal data, and utilizing graph neural networks and global consistency regularization, the semantic representation of long-tail entities and the global consistency problem in the knowledge graph of groundwater level and building risk are solved, generating a more complete knowledge graph.
Patent Information
- Application Number
- CN202510869932.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2045-06-26
AI Technical Summary
Existing methods for completing knowledge graphs of groundwater levels and building risks suffer from insufficient semantic representation of long-tail entities, missing local representations, and insufficient global consistency, resulting in poor quality of the completed graphs.
By identifying long-tail entities, we obtain related public opinion information and multimodal data, enhance local representations using graph neural networks, and introduce global consistency regularization terms to complete the knowledge graph.
It achieves richer semantic representation of long-tail entities, enhanced local information, and maintenance of global consistency, generating a more comprehensive and accurate knowledge graph.
Smart Images

Figure CN120764644B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of computer software and large language models, and relates to a knowledge graph completion method, in particular to a method for completing a groundwater level and building risk knowledge graph. BACKGROUND
[0002] The geological risks caused by the rise of groundwater level have a huge impact on buildings and large-scale foundation projects, such as anti-floating and foundation stability.
[0003] By constructing a cross-domain knowledge graph (groundwater level and building risk), the entity relationship extraction can be efficiently realized through a large language model. The public opinion information such as news reports and weather forecasts can be converted into knowledge through a large language model, and a dynamic graph is constructed. Based on the constructed dynamic graph, the cross-domain knowledge graph is updated and completed to ensure the comprehensiveness of the knowledge graph.
[0004] However, the existing groundwater level and building risk knowledge graph completion method may still have the following problems in the completed graph:
[0005] 1. Insufficient semantic expression of long-tail entities: In the completed graph, long-tail entities (i.e. entities with low frequency in data) may still lack sufficient semantic expression. This is because existing methods usually rely on data-driven learning strategies, which tend to favor high-frequency entities, resulting in insufficient semantic information for long-tail entities.
[0006] 2. Lack of local expression: Knowledge graph completion methods usually rely on existing relationships and features of neighboring nodes, but in the case of long-tail entities, their local expression may still be incomplete due to lack of sufficient connection information. This leads to problems such as insufficient semantic information and limited reasoning ability in the completed graph.
[0007] 3. Lack of global consistency: During the completion process, long-tail entities may lead to inconsistency with the global graph due to lack of sufficient context, affecting the overall quality and application effect of the knowledge graph. SUMMARY
[0008] In view of the problems in the prior art, the purpose of the present application is to provide a method for completing a groundwater level and building risk knowledge graph.
[0009] The technical solution of the present application is:
[0010] A method for completing a groundwater level and building risk knowledge graph, comprising the following steps:
[0011] 1) Frequency analysis of entities in the groundwater level and building risk knowledge graph, and entities with a frequency lower than a set threshold are regarded as long-tail entities;
[0012] 2) For each long tail entity a, obtain public opinion information related to groundwater level or building risk, extract entities in the public opinion information as one of the semantic backgrounds of the long tail entity a; collect information related to the long tail entity a from selected external data sources as one of the semantic backgrounds of the long tail entity a;
[0013] 3) Fuse the obtained semantic backgrounds of the long tail entity a as the semantic background of the long tail entity a;
[0014] 4) Extract features associated with the long tail entity a from multi-modal data related to groundwater level or building risk as features of the long tail entity a;
[0015] 5) Input the features and semantic backgrounds of the long tail entity a into a large language model to obtain a feature vector of the long tail entity a;
[0016] 6) Based on the feature vector of the long tail entity a, use a graph neural network to obtain the relationship between the long tail entity a and its adjacent entities in the groundwater level and building risk knowledge graph, and complete the groundwater level and building risk knowledge graph based on the relationship.
[0017] Further, the multi-modal data includes weather-related text data, image data, and weather time series data.
[0018] Further, the graph neural network propagates information through iteration, uses the local structure containing the long tail entity a in the groundwater level and building risk knowledge graph, and obtains the relationship between the long tail entity a and each adjacent entity in the groundwater level and building risk knowledge graph.
[0019] Further, the graph neural network is a graph convolutional network or a graph attention network.
[0020] Further, the selected external data sources include a weather forecast literature library and a knowledge base about geological disasters.
[0021] Further, the long tail entity a is constrained by a global consistency regularization term to maintain consistency with the global structure of the groundwater level and building risk knowledge graph.
[0022] Further, a regularization term is introduced to penalize inconsistent relationships or edges in the completed groundwater level and building risk knowledge graph.
[0023] Further, the groundwater level and building risk knowledge graph is completed using a knowledge graph completion algorithm.
[0024] A server, comprising a memory and a processor, the memory storing a computer program configured to be executed by the processor, the computer program comprising instructions for performing the above method.
[0025] A computer readable storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the above method.
[0026] The advantages of the present application are as follows: the knowledge graph completion method of the present application identifies long-tail entities, fuses external public opinion information, strengthens local information expression, and introduces global consistency regularization, and finally realizes more comprehensive and accurate knowledge graph completion through a completion algorithm. The entire process of the present application not only solves the problem of insufficient semantic expression of long-tail entities, but also improves the global consistency and reasoning ability of the knowledge graph. BRIEF DESCRIPTION OF DRAWINGS
[0027] Figure 1 is a method flowchart of the present application. DETAILED DESCRIPTION
[0028] The present application will be further described in detail below in conjunction with the accompanying drawings, and the examples are only used to explain the present application and are not used to limit the scope of the present application.
[0029] The present application designs a new knowledge graph completion method, that is, the graph is completed by combining the semantic enhancement of long-tail entities and the rich expression of local information, as shown in Figure 1 The specific process of the present application is as follows:
[0030] 1. Data preprocessing and long-tail entity identification:
[0031] Purpose: To provide more rich semantic background for long-tail entities to make up for the lack of information in the graph.
[0032] Specific implementation steps:
[0033] 1) Frequency analysis is performed on the entities in the groundwater level and building risk knowledge graph, and the long-tail entity a is identified;
[0034] Among them, the entity with a frequency lower than the set threshold is regarded as a long-tail entity;
[0035] 2) Obtain public opinion information related to groundwater level or building risk, and then extract entities in the public opinion information;
[0036] 3) Collect additional information related to the long-tail entity through external data sources (such as field literature, database). The additional information refers to the common sense library or other related knowledge base of the field, such as the literature library about weather forecast, the knowledge base about geological disasters.
[0037] 4) Use the information obtained in steps 2) to 3) as the semantic context of the long-tail entity a.
[0038] 2. Multi-modal information fusion
[0039] Objective: To enhance the semantic information of long-tail entities using multi-modal data, and solve the problem of information loss caused by single mode data.
[0040] Specific implementation steps:
[0041] 1) Extract features related to long-tail entities from various modalities such as weather-related text, images (weather cloud maps), time series (weather time series data), etc., as features of long-tail entities.
[0042] 2) Construct an enhanced feature vector, which can generate text descriptions using large language models (LLM) and combine entity images or other related data to enrich the expression of long-tail entities.
[0043] 3. Local information reinforcement based on graph neural networks
[0044] Objective: To enhance the local information expression of long-tail entities and improve their semantic expressiveness in the knowledge graph.
[0045] Specific implementation steps:
[0046] 1) Apply graph neural networks (GNN), such as graph convolutional networks (GCN) or graph attention networks (GAT), to better capture the relationship between long-tail entities and their neighboring entities.
[0047] 2) GNN can effectively utilize the information of local structure in the graph by iteratively propagating information.
[0048] 4. Global consistency regularization
[0049] Objective: To ensure that the completed knowledge graph is not only effective locally, but also consistent globally, avoiding semantic drift.
[0050] Specific implementation steps:
[0051] 1) Introduce global consistency regularization terms in the completion process to ensure that the completed long-tail entities are consistent with the global structure of the entire graph.
[0052] 2) Punish inconsistent relationships or edges by introducing regularization terms. Punishing inconsistent relationships or edges in the graph by introducing regularization terms is a technical means to ensure the rationality and consistency of the structure in the process of knowledge graph completion. The introduction of regularization terms can effectively avoid the generation of edges or relationships that do not conform to the actual semantics or logic. This method adds a penalty term to the loss function to constrain the relationship between entities, making the model more consistent with the global structure and logic of the knowledge graph.
[0053] 3) Further maintain consistency on the global structure.
[0054] 5. Iterative completion of knowledge graph
[0055] Objective: To generate a more complete and accurate knowledge graph, while ensuring the effective completion of the semantic expression of long-tail entities; ensure the continuous evolution of the knowledge graph and the continuous improvement of the expression of long-tail entities with the arrival of new information.
[0056] Specific implementation steps:
[0057] 1) After the above 4 steps, use knowledge graph completion algorithms (such as TransE, RotatE, ConvE, etc.) to complete the graph.
[0058] 2) After completion, compare with real data and expert verification to evaluate the completeness and accuracy of the graph.
[0059] 3) Regularly update the knowledge graph and use new data and model to improve the completion method.
[0060] 4) Dynamically update the expression of long-tail entities according to new data.
[0061] Although specific embodiments of the present application are disclosed for the purpose of illustration and to help understand the present application and to enable its implementation, those skilled in the art can understand that various substitutions, changes and modifications are possible without departing from the spirit and scope of the present application and the appended claims. Therefore, the present application should not be limited to the disclosed content of the best mode, and the scope of the present application is defined by the scope of the claims.
Claims
1. A method for completing a groundwater level and building risk knowledge graph, comprising the steps of: 1) performing frequency analysis on entities in the groundwater level and building risk knowledge graph, and taking entities with a frequency below a set threshold as long-tail entities; 2) for each long-tail entity a, obtaining public opinion information related to groundwater level or building risk, extracting entities in the public opinion information as one of the semantic backgrounds of the long-tail entity a, and collecting information related to the long-tail entity a from selected external data sources as one of the semantic backgrounds of the long-tail entity a; 3) fusing the obtained semantic backgrounds of the long-tail entity a as the semantic backgrounds of the long-tail entity a; 4) extracting features associated with the long-tail entity a from multi-modal data related to groundwater level or building risk as the features of the long-tail entity a; 5) inputting the features and semantic backgrounds of the long-tail entity a into a large language model to obtain a feature vector of the long-tail entity a; 6) based on the feature vector of the long-tail entity a, obtaining relationships between the long-tail entity a and its neighboring entities in the groundwater level and building risk knowledge graph using a graph neural network, and completing the groundwater level and building risk knowledge graph based on the relationships.
2. The method of claim 1, wherein, The multi-modal data includes text data, image data, and weather time series data related to weather.
3. The method of claim 1, wherein, The graph neural network obtains relationships between the long-tail entity a and each neighboring entity in the groundwater level and building risk knowledge graph by iteratively propagating information and using a local structure containing the long-tail entity a in the groundwater level and building risk knowledge graph.
4. The method according to claim 1 or 2 or 3, characterized in that, The graph neural network is a graph convolutional network or a graph attention network.
5. The method according to claim 1 or 2 or 3, characterized in that, The selected external data sources include a weather forecast literature database and a knowledge base about geological disasters.
6. The method according to claim 1 or 2 or 3, characterized in that, A global consistency regularization term is used to constrain the long-tail entity a to be consistent with the global structure of the groundwater level and building risk knowledge graph.
7. The method of claim 1, wherein, A regularization term is introduced to penalize inconsistent relationships or edges in the completed groundwater level and building risk knowledge graph.
8. The method of claim 1, wherein, The groundwater level and building risk knowledge graph is completed using a knowledge graph completion algorithm.
9. A server, characterized by A computer program is stored in a memory and executed by a processor, and the computer program includes instructions for executing the method of any one of claims 1 to 8.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the method of any one of claims 1 to 8.
Citation Information
Patent Citations
Knowledge graph long-tail relation completion method based on attention mechanism
CN111291139A
Open knowledge graph completion method and device based on pre-training language model prompt fine tuning
CN117892807A