A maritime document knowledge graph construction method and system
By collecting, preprocessing, segmenting, extracting key information, and classifying communities from maritime data, and constructing a knowledge graph using a large language model, the problem of building a high-quality knowledge graph from maritime data has been solved, enabling efficient retrieval and intelligent analysis.
Patent Information
- Application Number
- CN202510025104.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2045-01-07
AI Technical Summary
Existing technologies struggle to accurately extract information from complex maritime data and construct high-quality knowledge graphs, facing challenges such as inconsistent data quality, difficulty in information extraction, and the need for real-time updates.
A large language model is used to collect and preprocess maritime data, perform text segmentation, extract key information, classify and vectorize it into communities, and finally construct a knowledge graph.
It improves the accuracy and comprehensiveness of knowledge graphs, supports real-time updates and efficient retrieval, and provides a foundation for intelligent analysis and strategic decision-making.
Smart Images

Figure CN119938916B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data analysis technology, and in particular to a method and system for constructing a maritime document knowledge graph. Background Technology
[0002] The shipping industry is a vital pillar of the global economy, responsible for approximately 80% of global cargo transportation demand, encompassing a wide range of sectors from energy supply to commodity trade. With the rapid development of data and information technology, the maritime industry has accumulated a vast amount of unstructured data resources, including ship operation records, technical documents, laws and regulations, and news reports. These data resources contain rich information that can support decision-making in various areas, such as ship management, fuel consumption optimization, and carbon emission monitoring. To better address carbon reduction and environmental protection policy requirements, shipping companies need more comprehensive and timely information support to make informed decisions in ship management, fuel optimization, and risk control. The emergence of Large Language Models (LLM) has provided a novel solution for constructing knowledge graphs from unstructured maritime data. These technologies can automatically identify and structure key entities and their relationships based on processing large volumes of documents, enabling efficient retrieval and correlation analysis of massive amounts of information. However, constructing high-quality knowledge graphs from documents still faces many challenges, including:
[0003] 1. Data quality: Maritime data often comes from complex sources and suffers from inconsistencies, duplication, and missing data, which affect the accuracy of knowledge extraction;
[0004] 2. Difficulty of information extraction: Unstructured document data are diverse and involve complex technical terms. Extracting accurate entities and relationships requires a high level of natural language processing skills.
[0005] 3. Real-time update requirement: Maritime information is updated frequently, and the knowledge graph needs to have the ability to update and maintain it in real time to ensure the timeliness and accuracy of the information.
[0006] Against this backdrop, how to accurately extract information from complex maritime data and construct a high-quality knowledge graph has become an urgent problem to be solved. Summary of the Invention
[0007] To address the technical challenge of accurately extracting information from complex maritime data and constructing a high-quality knowledge graph, this invention proposes a method and system for constructing a maritime document knowledge graph. This method enables the accurate extraction of information from complex maritime data and the construction of a high-quality knowledge graph.
[0008] The present invention provides the following specific solution:
[0009] Firstly, a method for constructing a maritime document knowledge graph includes:
[0010] S1. Data Acquisition and Preprocessing: Collect maritime data, including ship operation records, technical documents, laws and regulations, and news reports;
[0011] S2. Text segmentation: Set the segmentation length, and segment the maritime domain data into new text units according to the segmentation length to obtain a list of text units;
[0012] S3. Key Information Extraction: Using a large language model, entity information, relation information, and event information are extracted from each text unit in the text unit list described in S2. The extracted information is then structured and stored to obtain entity data, relation data, and event data. The entity information includes name, type, and entity description; the relation information includes source entity, target entity, relation weight, and relation description; and the event information includes event initiator, event type, status, start date, end date, and reason description. The name serves as node data in the graph, the entity description as node attributes, directed or undirected connections from the source entity to the target entity as edges in the graph, the relation weight as edge weights, the relation description as edge attributes, and the event information is used to enrich node attributes or as additional edges.
[0013] S4. Generate key information summary based on a large language model: Based on the entity data and the relation data, store different entity descriptions of the same entity information in different text units in a first description list, and store different relation descriptions of the same relation information in a second description list; use a large language model to summarize the descriptions of the same entity in the first description list and generate an entity description summary, and summarize the descriptions of the same relation in the second description list and generate a relation description summary; use the entity description summary and relation description summary to optimize the attributes of the node data and edges respectively;
[0014] S5. Community Classification: Cluster the entity data, relationship data and event data, assign the entity data to a specific community, complete the grouping of node data, and obtain the community classification result;
[0015] S6. Generate Community Report: Based on the community classification results, generate a community report for each community, and generate community description information for the community using a large language model, and enrich the node attributes using the community description information; the community report includes the entity information, relationship information and event information of the community;
[0016] S7. Vectorization Processing: Vectorize entity data, relation data, and community description information within the same community to generate vector representations that can represent their semantic content, thus forming semantic embedding;
[0017] S8. Construct a knowledge graph: Construct a knowledge graph based on the node data, node attributes, edges, edge weights, edge attributes, and the vector representation described in S7.
[0018] Preferably, the construction method S8 further includes: using a preset large language model to convert each text unit into a vector representation, wherein the vector representation is used to capture the semantic information of the text unit, generate a semantic embedding, and provide basic vectorization support for graph retrieval.
[0019] Preferably, if the maritime data in S1 is unstructured data, it is preprocessed before being input into S2; the preprocessing of the unstructured data includes: removing irrelevant content, formatting, and cleaning the data.
[0020] Preferably, the information integration step in S4 further includes: using a large language model, and based on a synonym matching method, uniformly processing the names of the same entity information in different text units.
[0021] Preferably, the communities in the community classification results described in S5 are set with different levels.
[0022] Secondly, a maritime document knowledge graph construction system includes: a data acquisition and processing module, a text segmentation module, an information extraction module, an information integration and summarization module, a community classification module, a community summary generation module, a vectorization processing module, and a graph generation module;
[0023] The data acquisition and processing module includes: a data acquisition submodule for collecting maritime data, and a data preprocessing submodule for preprocessing the maritime data, removing irrelevant content, formatting and cleaning the data to obtain the data to be processed; the maritime data includes ship operation records, technical documents, laws and regulations and news reports;
[0024] The text segmentation module is used to set the segmentation length and segment the data to be processed into new text units according to the segmentation length to obtain a list of text units;
[0025] The information extraction module includes: an information extraction module that extracts entity information, relation information, and event information from each text unit based on a large language model, and a structured storage module that stores the information from the information extraction module in a structured manner to obtain structured storage modules for entity data, relation data, and event data; the entity information includes name, type, and entity description; the relation information includes source entity, target entity, and relation description; and the event information includes event initiator, event type, status, start date, end date, and cause description; wherein, the name serves as node data of the graph, the entity description serves as node attribute, the directed or undirected connection from the source entity to the target entity serves as edge of the graph, the relation weight serves as edge weight, the relation description serves as edge attribute, and the event information is used to enrich node attributes or as additional edges;
[0026] The information integration and summarization module includes: an information integration submodule that stores different entity descriptions of the same entity information in different text units in a first description list and different relation descriptions of the same relation information in a second description list, based on the entity data and the relation data; a large language model that summarizes all descriptions of the same entity in the first description list and generates an entity description summary, summarizes all descriptions of the same relation in the second description list and generates a relation description summary, and uses the entity description summary and relation description summary to optimize the description summary of node data and edge attributes, respectively;
[0027] The community classification module is used to cluster the entity data, relationship data and event data, assign the entity data to a specific community, complete the grouping of node data, and generate community classification results.
[0028] The community summary generation module generates a community summary for each community based on the community classification results, and generates community description information for the community using a large language model, enriching the node attributes using the community description information; the community report includes the entity information, relationship information and event information of the community;
[0029] The vectorization processing module vectorizes entity data, relation data, and community description information within the same community to generate a vector representation that can represent its semantic content, thus forming a semantic embedding.
[0030] The graph generation module constructs a knowledge graph based on the node data, node attributes, edges, edge weights, edge attributes, and the vector representation described in S7.
[0031] Beneficial effects of this invention:
[0032] This invention provides a method and system for constructing a maritime document knowledge graph. By collecting and preprocessing maritime documents, performing text segmentation, and using a large language model to extract key information, integrate and summarize information, the node data, edges, and attributes of the graph are obtained. Through community classification, generating community summaries, and vectorization, the above data are grouped and optimized, and finally integrated to construct a structured knowledge graph. Maritime data from diverse sources is collected and preprocessed into a standardized format, providing a high-quality data foundation for subsequent data processing. A large language model is used to automatically identify and extract key entities and their relationships, reducing redundant information and improving the accuracy and refinement of knowledge. Community classification helps reveal the potential structure and relationship networks between entities, providing a foundation for efficient retrieval. Vectorization generates vector representations that can represent semantic content, providing strong support for subsequent queries, reasoning, analysis, and visualization. Through these steps, the problem of intelligent information extraction from real-time updated maritime data is solved, significantly improving the accuracy and comprehensiveness of knowledge graph construction. This effectively overcomes the limitations of traditional manual processing methods, constructing an efficient knowledge graph for retrieval, providing strong support for shipping companies' information retrieval, intelligent analysis, and strategic decision-making. Attached Figure Description
[0033] Figure 1 The flowchart illustrates a method for constructing a maritime document knowledge graph, as provided by this invention.
[0034] Figure 2 This is a schematic diagram of the graph structure in a maritime document knowledge graph construction method provided by the present invention.
[0035] Figure 3 This invention provides a framework diagram for a maritime document knowledge graph construction system. Detailed Implementation
[0036] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0037] Figure 1 This invention provides a flowchart of a method for constructing a maritime document knowledge graph. (See flowchart for example.) Figure 1 As shown, a method for constructing a maritime document knowledge graph includes:
[0038] S1. Data Acquisition and Preprocessing: Collect maritime data, including ship operation records, technical documents, laws and regulations, and news reports.
[0039] Specifically, if the maritime data mentioned in S1 is unstructured data, it is preprocessed and then input into S2; the preprocessing of the unstructured data includes: removing irrelevant content, formatting, and cleaning the data.
[0040] For example, firstly, a collection of International Maritime Organization (IMO) resolutions and guidelines on ship carbon intensity is collected. This file is in PDF format and is converted into a CII-related file in TXT format, named "CII.txt". During the conversion process, the document content is preprocessed to remove irrelevant content, delete duplicate records, correct erroneous data, and standardize the format. The file is then stored in the directory of the input file for later use.
[0041] S2. Text Segmentation: Set the segmentation length, and segment the maritime data into new text units according to the segmentation length to obtain a list of text units.
[0042] For example, the segmentation length is set to 300 tokens. The content of the file "CII.txt" is divided into several text units of 300 tokens each, resulting in a list of text units for later use. In this embodiment, the Python-based GraphRAG toolkit is used to segment the text and store it in the form of a Parquet file, with the following structure:
[0043] text unit list create_base_text_units
[0044] id: a unique identifier;
[0045] chunk: The content of a text block;
[0046] chunk_id: A unique identifier for a text block;
[0047] document_ids: A list of document IDs associated with the text block;
[0048] n_tokens: The number of tokens in the text block.
[0049] Associate documents with text cells using `create_base_documents`
[0050] id: A unique identifier for the document.
[0051] text_unit_ids: A list of text unit IDs.
[0052] raw_content: The original document content.
[0053] title: Document title.
[0054] S3. Key Information Extraction: Using a large language model, entity information, relation information, and event information are extracted from each text unit in the text unit list described in S2. The extracted information is then structured and stored to obtain entity data, relation data, and event data. The entity information includes name, type, and entity description; the relation information includes source entity, target entity, relation weight, and relation description; and the event information includes event initiator, event type, status, start date, end date, and reason description. Specifically, the name serves as node data in the graph, the entity description as node attributes, directed or undirected connections from the source entity to the target entity as edges in the graph, the relation weight as edge weights, the relation description as edge attributes, and the event information is used to enrich node attributes or as additional edges.
[0055] For example, a large language model is used to extract entity information (such as CII guidelines, regulation names), relational information (such as "contains", "definition"), and event information (such as regulation publication, voyage adjustment) from each text unit. The extracted information is then structured and stored to obtain entity data, relational data, and event data. Entity information includes name, type, and entity description; relational information includes source entity, target entity, and relational description; and event information includes event initiator, event type, status, start date, end date, and reason description. The association between entity data, relational data, and text units is then established. Similarly, the above data is stored in the form of a Parquet file, with the following structure:
[0056] Entity data create_final_entities
[0057] id: A unique identifier for an entity.
[0058] name: Entity name;
[0059] type: Entity type;
[0060] description: Entity description;
[0061] human_readable_id: Human-readable entity ID;
[0062] graph_embedding: Graph embedding information;
[0063] text_unit_ids: A list of text unit IDs associated with an entity;
[0064] description_embedding: Describes the embedded information.
[0065] Relationship between entities and text units: join_text_units_to_entity_ids
[0066] text_unit_ids: Text unit IDs;
[0067] entity_ids: Entity IDs.
[0068] relational data create_final_relationships
[0069] source: the source entity of the relation;
[0070] target: the target entity of the relationship;
[0071] weight: Relationship weight;
[0072] description: Relationship description;
[0073] text_unit_ids: A list of text unit IDs associated with the relation;
[0074] id: A unique identifier for the relationship;
[0075] human_readable_id: Human-readable relationship ID;
[0076] source_degree: The degree of the source entity;
[0077] target_degree: The degree of the target entity;
[0078] rank: ranking in relation to others.
[0079] Relationships are associated with text units using the join_text_units_to_relationship_ids
[0080] id: Text unit ID;
[0081] relationship_ids: Relationship ID.
[0082] create_final_text_units
[0083] id: A unique identifier for a text unit.
[0084] text: The content of the text cell.
[0085] n_tokens: The number of tokens in the text unit.
[0086] document_ids: A list of document IDs associated with text units.
[0087] entity_ids: A list of entity IDs associated with each text cell.
[0088] relationship_ids: A list of relationship IDs associated with each text cell.
[0089] In the above data, entity names are used as node data of the graph, entity descriptions are used as node attributes, directed or undirected connections from the source entity to the target entity are used as edges of the graph, relation weights are used as edge weights, and relation descriptions are used as edge attributes.
[0090] S4. Information Integration and Description Summary: Based on the entity data and the relationship data, different entity descriptions of the same entity information in different text units are stored in a first description list, and different relationship descriptions of the same relationship information are stored in a second description list; and a large language model is used to summarize the descriptions of the same entity in the first description list and generate an entity description summary, and to summarize the descriptions of the same relationship in the second description list and generate a relationship description summary.
[0091] Specifically, a large language model is adopted, and the names of the same entity information in different text units are uniformly processed based on the synonym matching method.
[0092] For example, in the aforementioned entity data and relational data, different text units provide different descriptions for the same entity. These descriptions are stored as an entity description list, i.e., the first description list, to ensure the integrity of the descriptive information. Different relational descriptions of different text units are all stored in the second description table to support a multi-dimensional understanding of the relations. During the information integration process, a large language model is also employed. Based on a synonym matching method, the names of the same entity information in different text units are unified. For example, "International Maritime Organization" and "IMO" are unified as "International Maritime Organization," simplifying the unification and maintenance of subsequent relations.
[0093] Then, the large language model is used to summarize the descriptions of the same entity in the first description list and generate an entity description summary. The descriptions of the same relation in the second description list are summarized to generate a relation description summary. The entity description summary and relation description summary are used to optimize the attributes of the node data and the edge, respectively.
[0094] S5. Community Classification: Cluster the entity data, relationship data, and event data, assign the entity data to a specific community, complete the grouping of node data, and obtain the community classification result.
[0095] Specifically, the community classification results described in S5 have different levels of community settings.
[0096] For example, clustering algorithms are used to cluster the entity data, relationship data, and event data obtained above, assigning corresponding entities to the same community, ultimately yielding the community classification results. For instance, grouping entities related to CII computing into a single community can reveal the inherent structure and relationships within CII document content, and these can be stored in Parquet file format, specifically including:
[0097] Community data create_final_communities
[0098] id: Community ID;
[0099] title: Community title;
[0100] level: community level;
[0101] raw_community: The original community ID;
[0102] relationship_ids: A list of relationship IDs associated with the community;
[0103] text_unit_ids: A list of text unit IDs associated with the community.
[0104] Community tiered data create_final_nodes
[0105] level: node level;
[0106] title: Node title;
[0107] type: Node type;
[0108] description: Node description;
[0109] source_id: Node source ID;
[0110] community: The community to which the node belongs;
[0111] degree: node degree;
[0112] human_readable_id: The node ID that is readable by humans;
[0113] id: A unique identifier for a node;
[0114] size: Node size;
[0115] graph_embedding: Graph embedding information;
[0116] top_level_node_id: The ID of the top-level node;
[0117] x: The x-coordinate of the node in the graph;
[0118] y: The y-coordinate of the node in the graph.
[0119] S6. Generate Community Report: Based on the community classification results, generate a community summary for each community, and generate community description information for the community using a large language model, and enrich the node attributes using the community description information; the community report includes the entity information, relationship information and event information of the community.
[0120] For example, using a large language model, a community summary containing entity information, relationship information, and event information is generated for each community in the above community classification results. Simultaneously, a community description is generated for that community; and this is stored in the form of a Parquet file, specifically including:
[0121] Community report data create_final_community_reports
[0122] community: Community ID;
[0123] full_content: The complete content of the community;
[0124] level: community level;
[0125] rank: Community ranking;
[0126] title: Community title;
[0127] rank_explanation: Explanation of community ranking;
[0128] Summary: Community summary;
[0129] findings: Community discovery;
[0130] full_content_json: The complete JSON representation of the community's content;
[0131] id: A unique identifier for the community.
[0132] S7. Vectorization Processing: Vectorize entity data, relation data, and community description information within the same community to generate vector representations that can represent their semantic content, thus forming semantic embedding.
[0133] For example, a pre-trained large language model is used to convert the generated entity data, relation data, and community description information into word vectors for vectorization. Graph embedding techniques are then used to convert the relation data between entities into relation vectors, which can represent the social interactions and connection strength between entities. Different weights can be assigned according to different relation types to capture the relationships between entities more precisely. The data is then stored in the form of a Parquet file, specifically including:
[0134] create_base_extracted_entities
[0135] entity_graph: The XML representation of the entity graph.
[0136] create_summarized_entities
[0137] entity_graph: An XML representation of a summary entity graph.
[0138] create_base_entity_graph
[0139] level: clustering level.
[0140] clustered_graph: The XML representation of the clustering graph.
[0141] S8. Construct a knowledge graph: Construct a knowledge graph based on the node data, node attributes, edges, edge weights, edge attributes, and the vector representation described in S7.
[0142] Specifically, after S8 above, it also includes: using a preset large language model to convert each text unit into a vector representation, the vector representation being used to capture the semantic information of the text unit, generating a semantic embedding, and providing basic vectorization support for graph retrieval.
[0143] For example, such as Figure 2As shown, the process iterates through all Parquet files in the specified directory, i.e., the various Parquet file data stored above, reads and merges them into a DataFrame. This DataFrame contains all the information extracted from the CII document, namely all node and edge information generated from entity data, relation data, event data, first description list, first description result, entity description summary, relation description summary, community classification result, and community description information. Then, the DataFrame is cleaned by removing null values and converting the `source` and `target` columns to string types. A directed graph is created using `networkx`, converting each row of data in the DataFrame into an edge in the graph. These edges represent entities and relations in the CII document. 3D coordinates are generated using the layout algorithm of `networkx`, and 3D trajectories of nodes and edges are generated using Plotly. Edge labels are added, which describe the entities and relations in the CII document. The final generated graph visualization result is saved as an HTML file and displayed in a browser. This result allows the content and relations of the CII document to be intuitively understood and analyzed.
[0144] Figure 3 This invention provides a framework diagram for a maritime document knowledge graph construction system. (For example...) Figure 3 As shown, a maritime document knowledge graph construction system includes: a data acquisition and processing module, a text segmentation module, an information extraction module, an information integration and summarization module, a community classification module, a community summary generation module, a vectorization processing module, and a graph generation module.
[0145] The data acquisition and processing module includes: a data acquisition submodule for collecting maritime data, and a data preprocessing submodule for preprocessing the maritime data, removing irrelevant content, formatting and cleaning the data to obtain the data to be processed; the maritime data includes ship operation records, technical documents, laws and regulations and news reports.
[0146] The text segmentation module is used to set the segmentation length and segment the data to be processed into new text units according to the segmentation length to obtain a list of text units.
[0147] The information extraction module includes: an information extraction module that extracts entity information, relation information, and event information from each text unit based on a large language model, and a structured storage module that stores the information from the information extraction module in a structured manner to obtain structured storage modules for entity data, relation data, and event data; the entity information includes name, type, and entity description; the relation information includes source entity, target entity, and relation description; and the event information includes event initiator, event type, status, start date, end date, and cause description; wherein, the name serves as node data of the graph, the entity description serves as node attribute, the directed or undirected connection from the source entity to the target entity serves as edge of the graph, the relation weight serves as edge weight, the relation description serves as edge attribute, and the event information is used to enrich node attributes or as additional edges.
[0148] The information integration and summarization module includes: an information integration submodule that stores different entity descriptions of the same entity information in different text units in a first description list and different relation descriptions of the same relation information in a second description list, based on the entity data and the relation data; a description summarization submodule that uses a large language model to summarize all descriptions of the same entity in the first description list into an entity description summary, summarizes all descriptions of the same relation in the second description list into a relation description summary, and uses the entity description summary and relation description summary to optimize the description summary of the node data and edge attributes, respectively.
[0149] The community classification module is used to cluster the entity data, relationship data, and event data, assign the entity data to a specific community, complete the grouping of node data, and generate community classification results.
[0150] The community summary generation module includes a community summary generation submodule that generates a community summary for each community based on the community classification results, and a community description information generation submodule that generates community description information for each community using a large language model and enriches the node attributes using the community description information; the community summary includes the community's entity information, relationship information, and event information.
[0151] The vectorization processing module vectorizes entity data, relation data, and community description information within the same community to generate vector representations that can represent their semantic content, thus forming semantic embedding.
[0152] The graph generation module constructs a knowledge graph based on the node data, node attributes, edges, edge weights, edge attributes, and the aforementioned vector representations.
[0153] It should be noted that the specific embodiments described above enable those skilled in the art to more fully understand the present invention, but do not limit the present invention in any way. Therefore, although the present invention has been described in detail with reference to the accompanying drawings and embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the present invention. In short, all technical solutions and improvements that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the present invention patent.
Claims
1. A method for constructing a maritime document knowledge graph, characterized in that, include: S1. Data Acquisition and Preprocessing: Collect maritime data, including ship operation records, technical documents, laws and regulations, and news reports; S2. Text segmentation: Set the segmentation length, and segment the maritime domain data into new text units according to the segmentation length to obtain a list of text units; S3. Key Information Extraction: Using a large language model, entity information, relation information, and event information are extracted from each text unit in the text unit list described in S2 as key information. The extracted key information is then structured and stored to obtain entity data, relation data, and event data. The names in the entity data are used as node data of the graph, the entity descriptions are used as node attributes, and the directed or undirected connections from the source entity to the target entity are used as edges of the graph. The relation weights in the relation data are used as edge weights, the relation descriptions are used as edge attributes, and the event information is used to enrich the attributes of nodes or as additional edges. S4. Generate key information summary based on large language model: Based on the entity data and the relation data, store the entity data and relation data in different text units in different lists and label them respectively; A large language model is used to generate key information summaries and optimize the attributes of node data and edges. The key information summaries include entity description summaries and relation description summaries. S5. Community Classification: Cluster the entity data, relationship data and event data, assign the entity data to a specific community, complete the grouping of node data, and obtain the community classification result; S6. Generate community summary: Based on the community classification results, generate a community summary for each community. The community summary includes the entity information, relationship information and event information of each community. S7. Vectorization Processing: Vectorize the entity information, relationship information, and community description information within the same community to generate a vector representation for each community; S8. Construct a knowledge graph: Use the node data, node attributes, edges, edge weights, edge attributes, and vector representations generated in steps S3-S7 to construct a knowledge graph.
2. The maritime document knowledge graph construction method according to claim 1, characterized in that, The construction method S8 further includes: using a preset large language model to convert each text unit into a vector representation, wherein the vector representation is used to capture the semantic information of the text unit, generate semantic embedding, and provide basic vectorization support for graph retrieval.
3. The maritime document knowledge graph construction method according to claim 1, characterized in that, If the maritime data mentioned in S1 is unstructured data, it is preprocessed and then input into S2; The unstructured data is preprocessed, including removing irrelevant content, formatting, and cleaning the data.
4. A method for constructing a maritime document knowledge graph as described in claim 1 or 3, characterized in that, The entity information includes name, type, and entity description; the relationship information includes source entity, target entity, relationship weight, and relationship description; and the event information includes event initiator, event type, status, start date, end date, and reason description.
5. A method for constructing a maritime document knowledge graph as described in claim 1 or 3, characterized in that, The method for generating entity description summaries and relation description summaries in S4 is as follows: In different text units, different entity descriptions of the same entity information are stored in a first description list, and different relation descriptions of the same relation information are stored in a second description list; the descriptions of the same entity in the first description list are summarized and entity description summaries are generated, and the descriptions of the same relation in the second description list are summarized and relation description summaries are generated; the attributes of the node data and edges are optimized using the entity description summaries and relation description summaries, respectively.
6. A method for constructing a maritime document knowledge graph as described in claim 1 or 3, characterized in that, S4 further includes: using a large language model, based on a synonym matching method, to uniformly process the names of the same entity information in different text units.
7. The maritime document knowledge graph construction method according to claim 1, characterized in that, The community classification results described in S5 have different levels of community settings; the next level of the community summary also includes community description information generated by the large language model. The node attributes are enriched using the community description information.
8. A maritime document knowledge graph construction system employing the method described in any one of claims 1-7, comprising: The module includes data acquisition and processing, text segmentation, information extraction, information integration and summarization, community classification, community summary generation, vectorization processing, and graph generation. The data acquisition and processing module includes: a data acquisition submodule for collecting maritime data, and a data preprocessing submodule for preprocessing the maritime data, removing irrelevant content, formatting and cleaning the data to obtain the data to be processed; the maritime data includes ship operation records, technical documents, laws and regulations and news reports; The text segmentation module is used to set the segmentation length and segment the data to be processed into new text units according to the segmentation length to obtain a list of text units; The information extraction module includes: an information extraction module that extracts entity information, relation information, and event information from each text unit based on a large language model, and a structured storage module that stores the information from the information extraction module in a structured manner to obtain structured storage modules for entity data, relation data, and event data; the entity information includes name, type, and entity description; the relation information includes source entity, target entity, and relation description; and the event information includes event initiator, event type, status, start date, end date, and cause description; wherein, the name serves as node data of the graph, the entity description serves as node attribute, the directed or undirected connection from the source entity to the target entity serves as edge of the graph, the relation weight serves as edge weight, the relation description serves as edge attribute, and the event information is used to enrich node attributes or as additional edges; The information integration and summarization module includes: an information integration submodule that stores different entity descriptions of the same entity information in different text units in a first description list and different relation descriptions of the same relation information in a second description list, based on the entity data and the relation data; an information integration submodule that uses a large language model to summarize the descriptions of the same entity in the first description list and generate an entity description summary, summarizes the descriptions of the same relation in the second description list and generates a relation description summary, and uses the entity description summary and relation description summary to optimize the description summary of the node data and edge attributes, respectively; The community classification module is used to cluster the entity data, relationship data and event data, assign the entity data to a specific community, complete the grouping of node data, and generate community classification results. The community summary generation module includes a community summary generation submodule that generates a community summary for each community based on the community classification results, and a community description information generation submodule that generates community description information for each community using a large language model and enriches the node attributes using the community description information; the community summary includes the entity information, relationship information and event information of the community; The vectorization processing module vectorizes entity data, relation data, and community description information within the same community to generate a vector representation that can represent its semantic content, thus forming a semantic embedding. The graph generation module constructs a knowledge graph based on the node data, node attributes, edges, edge weights, edge attributes, and the vector representation described in S7.
Citation Information
Patent Citations
Security tool knowledge graph construction method and device for open source community
CN113901466A
Information extraction and knowledge graph construction system and method
CN117313850A