Ship activity rule knowledge graph construction method, ship activity rule prediction method and ship activity rule prediction device
By constructing a knowledge graph of ship activity patterns and utilizing multi-source heterogeneous data and graph neural networks, the problem of inaccurate ship activity pattern mining in existing technologies has been solved, enabling accurate pattern identification and route optimization in complex scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INST OF AUTOMATION CHINESE ACAD OF SCI
- Filing Date
- 2025-12-17
- Publication Date
- 2026-05-15
AI Technical Summary
In existing technologies, when using data-driven or model-driven methods to mine ship activity patterns, there is an overemphasis on isolated trajectory points or single behavioral events. This results in the data source being in an independent analysis state for a long time, making it difficult to reflect the ship activity patterns in complex scenarios and leading to inaccurate mining results.
By extracting event and activity elements from multi-source heterogeneous ship data, constructing a structured dataset, establishing relationships, building a knowledge graph with ontology layer and triplet structure, and combining graph neural networks and density clustering algorithms, the spatiotemporal trajectory patterns of ships can be identified.
It improves the accuracy of ship activity pattern mining results, can reflect ship activity patterns in complex scenarios, and supports route optimization and anomaly detection.
Smart Images

Figure CN122047434A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data analysis technology, and in particular to a method for constructing a knowledge graph of ship activity patterns, a method for predicting patterns, and an apparatus. Background Technology
[0002] Mining patterns in target activity is an important research direction in the fields of data mining and artificial intelligence. It aims to reveal the dynamic patterns of target objects by analyzing data such as spatiotemporal trajectories and behavioral logs. Mining patterns in ship target activity can provide auxiliary references for shipping route optimization, port scheduling and management, illegal fishing monitoring, and maritime traffic risk early warning.
[0003] In related technologies, data-driven methods (such as sequence pattern mining and deep learning models) or model-driven methods (such as Markov decision processes and Gaussian mixture models) are usually used to mine the patterns of ship activities. However, these methods overemphasize isolated trajectory points or single behavioral events while ignoring the deep correlation between target entities and complex marine environmental events. This results in fragmented pattern recognition, and the data sources are often in a state of independent analysis for a long time. The data features are difficult to reflect the patterns of ship activities in complex scenarios, which in turn leads to inaccurate results in mining ship activity patterns. Summary of the Invention
[0004] This invention provides a method, method, and apparatus for constructing a knowledge graph of ship activity patterns, which addresses the shortcomings of existing technologies that use data-driven or model-driven methods to mine ship activity patterns. These technologies tend to overemphasize isolated trajectory points or single behavioral events, and the data sources are often in an independent analysis state, making it difficult to reflect ship activity patterns in complex scenarios, thus leading to inaccurate results in mining ship activity patterns.
[0005] This invention provides a method for constructing a knowledge graph of ship activity patterns, comprising: Multiple sets of event elements and activity elements, as well as multiple entity information, are extracted from multi-source heterogeneous data of ships, and the multiple sets of event elements and activity elements are converted into a structured dataset; wherein, the multi-source heterogeneous data includes at least two of the following: ship trajectory information, port scheduling information, meteorological environment information, and ship file information; each data item in the structured dataset includes element ID, element type, associated target, time attribute, spatial attribute, associated element ID, and credibility score; Extract the association between event elements and activity elements from the structured dataset; An ontology layer is constructed based on multiple ship-related concepts and the relationships between these concepts. A triplet structure is constructed based on the associations between the multiple entity information, the event elements, and the activity elements. An index is constructed based on the target attributes of each entity to build a knowledge graph of ship activity patterns. The target attributes include at least one of entity ID, name, spatial latitude and longitude, and time attributes.
[0006] According to the present invention, a method for constructing a knowledge graph of ship activity patterns is provided, wherein the multi-source heterogeneous data of ships includes ship trajectory information, port scheduling information, meteorological environment information, and ship file information; Before extracting multiple sets of event elements and activity elements, as well as multiple entity information, from the ship's multi-source heterogeneous data, the method further includes: Remove abnormal noise points from the ship trajectory information and fill in the missing trajectory points in the ship trajectory information; The port scheduling information and the ship file information are processed by word segmentation, removal of special characters, removal of stop words, and filtering of keywords, respectively; The meteorological and environmental information is then normalized.
[0007] According to the present invention, a method for constructing a knowledge graph of ship activity patterns is provided, wherein the structured dataset includes standard structured data, semi-structured data, and text data; The extraction of the association between event elements and activity elements from the structured dataset includes: The first association relationship is extracted from the standard structured data using preset relationship matching rules; A second association relationship is extracted from the semi-structured data using a deep learning-based relationship extraction model; The third association relationship is extracted from the text data by matching relationships using regular expressions.
[0008] According to the method for constructing a knowledge graph of ship activity patterns provided by the present invention, after extracting the third association relationship from the text data through regular expression matching, the method further includes: The confidence scores of the first association and the second association are calculated, and the target association is selected from the first association and the second association based on the confidence scores and the preset scoring threshold. The target relationships were reviewed based on expert experience, and the review results were obtained.
[0009] This invention also provides a method for predicting patterns, comprising: The latitude and longitude trajectory data and target node data of ships are extracted from the knowledge graph of ship activity patterns; wherein, the latitude and longitude trajectory data includes timestamps; the target node data includes port nodes, ship nodes, and activity nodes; the knowledge graph of ship activity patterns is constructed using the ship activity pattern knowledge graph construction method. A density-based spatiotemporal clustering algorithm is used to convert the latitude and longitude trajectory data into a latitude and longitude coordinate system. Combined with timestamps, the spatiotemporal grid of the ship's location is divided, and the spatiotemporal trajectory pattern information of the ship is identified based on the divided spatiotemporal grid. A graph neural network node embedding algorithm is used to embed the target node data into a low-dimensional vector space, and the similarity of each target node is calculated to obtain the port-related activity pattern information of the ship.
[0010] According to a pattern prediction method provided by the present invention, after obtaining the port-related activity pattern information of the vessel, the method further includes: Ship navigation data is input into the ship activity anomaly detection model to obtain ship activity anomaly detection results; The ship activity anomaly detection model is obtained by iteratively training an isolated forest model using the activity feature matrix corresponding to the target association data as training samples and the anomaly scores of different ship activities as labels. The target association data is determined based on the ship activity pattern knowledge graph and includes ship activity trajectory association data, event and activity association data, and ship, activity and performance association data.
[0011] The present invention also provides a knowledge graph construction device for ship activity prediction, comprising: The first extraction module is used to extract multiple sets of event elements and activity elements, as well as multiple entity information, from the multi-source heterogeneous data of ships, and convert the multiple sets of event elements and activity elements into a structured dataset; wherein, the multi-source heterogeneous data includes at least two of the following: ship trajectory information, port scheduling information, meteorological environment information, and ship file information; each data item in the structured dataset includes element ID, element type, associated target, time attribute, spatial attribute, associated element ID, and credibility score; The second extraction module is used to extract the association between event elements and activity elements from the structured dataset; The graph construction module is used to construct an ontology layer based on multiple concepts related to the ship and the relationships between these concepts, construct a triplet structure based on the multiple entity information, the association between the event elements and the activity elements, construct an index based on the target attributes of each entity, and construct a knowledge graph of ship activity patterns; wherein, the target attributes include at least one of entity ID, name, spatial latitude and longitude, and time attributes.
[0012] The present invention also provides a pattern prediction device, comprising: The third extraction module is used to extract the latitude and longitude trajectory data and target node data of ships from the ship activity pattern knowledge graph; wherein, the latitude and longitude trajectory data includes timestamps; the target node data includes port nodes, ship nodes, and activity nodes; the ship activity pattern knowledge graph is constructed using the ship activity pattern knowledge graph construction method; The pattern mining module is used to convert the latitude and longitude trajectory data into a latitude and longitude coordinate system using a density-based spatiotemporal clustering algorithm, divide the spatiotemporal grid of the ship's location using timestamps, and identify the spatiotemporal trajectory pattern information of the ship based on the divided spatiotemporal grid; and to embed the target node data into a low-dimensional vector space using a graph neural network node embedding algorithm, and calculate the similarity of each target node to obtain the port-related activity pattern information of the ship.
[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the ship activity pattern knowledge graph construction method or pattern prediction method as described above.
[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the ship activity pattern knowledge graph construction method or pattern prediction method as described above.
[0015] The present invention provides a method, method, and apparatus for constructing a knowledge graph of ship activity patterns. This method extracts multiple sets of event elements, activity elements, and entity information from multi-source heterogeneous ship data, and converts these event and activity elements into a structured dataset. This enables spatiotemporal alignment of multimodal data associated with ships. Furthermore, it extracts the relationships between event and activity elements from the structured dataset, thereby establishing deep associations between different entities and complex marine environmental events. Finally, it constructs an ontology layer based on multiple ship-related concepts and the relationships between these concepts, builds a triplet structure based on the relationships between multiple entity information, event elements, and activity elements, and constructs an index based on the target attributes of each entity. This constructs a knowledge graph of ship activity patterns, reflecting ship activity patterns in complex scenarios and thus improving the accuracy of ship activity pattern mining results. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 This is a flowchart illustrating the method for constructing a knowledge graph of ship activity patterns provided by the present invention.
[0018] Figure 2 This is one of the flowcharts illustrating the pattern prediction method provided by this invention.
[0019] Figure 3 This is the second flowchart of the pattern prediction method provided by the present invention.
[0020] Figure 4 This is a schematic diagram of the structure of the knowledge graph construction device for ship activity patterns provided by the present invention.
[0021] Figure 5 This is a schematic diagram of the pattern prediction device provided by the present invention.
[0022] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0024] The following is combined with Figures 1-5 The present invention describes a method for constructing a knowledge graph of ship activity patterns, a method for predicting patterns, and an apparatus for such prediction.
[0025] Figure 1 This is a flowchart illustrating the method for constructing a knowledge graph of ship activity patterns provided by the present invention, as shown below. Figure 1 As shown, the method includes the following steps: Step 110: Extract multiple sets of event elements and activity elements, as well as multiple entity information from the multi-source heterogeneous data of ships, and convert the multiple sets of event elements and activity elements into a structured dataset; wherein, the multi-source heterogeneous data includes at least two of the following: ship trajectory information, port scheduling information, meteorological environment information, and ship file information; each data in the structured dataset includes element ID, element type, associated target, time attribute, spatial attribute, associated element ID, and credibility score.
[0026] In this step, the ship trajectory information can be collected by the ship's AIS (Automatic Identification System). For example, the ship trajectory information includes the ship's latitude and longitude, speed, heading, timestamp, etc.
[0027] In this step, port scheduling information includes berthing plans, loading and unloading notices, berth allocation records, etc.; port scheduling information can be text data.
[0028] In this step, meteorological environmental information can be marine environmental data of the ship's location, such as wind speed, wave height, ocean current direction, and navigation restriction notices in the sea area; meteorological environmental information can also be text data.
[0029] In this step, the vessel profile information includes vessel operational data, such as vessel tonnage, load capacity, range, and historical route records.
[0030] In this step, event elements refer to specific scenarios triggered during ship operations (such as weather warnings and navigation restrictions), while activity elements are the continuous behaviors of the ship to achieve its goals (such as cross-sea navigation and obstacle avoidance).
[0031] For example, event elements can be specific scenarios triggered during ship operation, including port berthing, completion of loading and unloading, navigation restrictions in sea areas, weather warnings, deviation from the route, and ship encounters; activity elements can be a series of continuous behaviors of a ship to achieve its shipping goals, including cross-sea navigation activities, port loading and unloading activities, obstacle avoidance and diversion activities, waiting for berth activities, and emergency deceleration activities.
[0032] In this step, text data from multi-source heterogeneous data can be segmented into words, and an entity naming algorithm based on bidirectional long short-term memory neural network can be used to extract keywords of valid ship name type, location type name, and activity name from the segmented text as event entities, thereby obtaining multiple entity information.
[0033] In this embodiment, converting multiple sets of event elements and activity elements into a structured dataset can be achieved through the following steps: (1) Unify the data format and convert all event elements and activity elements into “three-tuple candidate format” (subject-attribute-value).
[0034] For example: Ship A - Port of Call - Shanghai Port; Cross-sea navigation activity - Start time - 2024-05-10-08:00:00; Weather warning event - affected sea area - northern East China Sea; Obstacle avoidance and detour activity - detour range -15°.
[0035] (2) Use the element standardization algorithm to unify the data format.
[0036] For example, an ontological modeling method (based on the OWL language) is used to define semantic specifications for elements. For instance, the time format of "navigation activities" is unified as "YYYY-MM-DD HH:MM:SS", and the "destination range" is unified as an angle unit.
[0037] (3) Integrate multiple sets of "event-activity" information.
[0038] For example, a weighted fusion model based on attention mechanism is used to process multiple sets of event elements and activity elements, and output a structured "event-activity" element dataset. Each data entry contains seven fields: "element ID, element type, associated target, time attribute, spatial attribute, associated element ID, and credibility score".
[0039] Step 120: Extract the relationship between event elements and activity elements from the structured dataset.
[0040] In this step, by exploring the deep logical connections between "events" and "activities", a causal or mapping relationship is established between the external environment or operational status (events) and the ship's behavioral performance (activities).
[0041] In this embodiment, rule-based matching algorithms (such as time window overlap and ID consistency) or deep learning-based relationship classification models (such as BERT fine-tuning models) can be used to determine whether an event is the cause of an activity, or whether the two have a strong accompaniment relationship. This association is used to establish a semantic connection of "what cause (event) led to what behavior (activity)", giving isolated activities a business explanation.
[0042] For example, the relationship between event elements and activity elements can be that "port berthing event" (time element) triggers "waiting for berth activity" (activity element), "weather warning event" (time element) triggers "obstacle avoidance and diversion activity" (activity element), and "loading and unloading completion event" initiates "cross-sea navigation activity", etc.
[0043] Step 130: Construct an ontology layer based on multiple ship-related concepts and the relationships between them; construct a triplet structure based on the relationships between multiple entity information, event elements, and activity elements; construct an index based on the target attributes of each entity; and construct a knowledge graph of ship activity patterns. The target attributes include at least one of entity ID, name, spatial latitude and longitude, and time attributes.
[0044] In this step, the knowledge graph of ship activity patterns is constructed using a "layered construction + dynamic update" approach; the graph architecture includes an ontology layer, a triplet structure (data layer), and an index.
[0045] The following explains the construction methods of the ontology layer, the triplet structure (data layer), and the index: (1) Based on the OWL language, define the core concepts (ships, ports, events, activities, environment), concept attributes and relationships between concepts to form a domain ontology model, namely the ontology layer.
[0046] Among these, the above concepts include: "Navigation Activity" inherits the concept of "Activity" and adds exclusive attributes such as "Starting Longitude", "Ending Latitude" and "Average Speed".
[0047] (2) The data layer stores the relationship between the above-mentioned entity information, event elements and activity elements, and adopts the triple structure of "entity-relationship-entity" (such as <COSCO Shipping XXX, participating, cross-sea navigation ID2001>), while associating entity attributes and relationship confidence.
[0048] (3) The index layer creates indexes for entity ID, entity name, spatial attributes (latitude and longitude), and time attributes.
[0049] In this embodiment, the steps for constructing a knowledge graph of ship activity patterns using the ontology layer, triplet structure (data layer), and indexes are as follows: (1) Import the domain ontology defined by OWL into Neo4j and create concept nodes and attribute templates; (2) Import multiple entity information in batches using Cypher statements and automatically match ontology attribute templates; (3) Sort the association between event elements and activity elements based on the relationship confidence. This can be done by first importing associations with confidence ≥ confidence threshold (e.g., 0.8), and then importing low-confidence relationships (e.g., those marked as pending verification) in batches. (4) The community discovery algorithm (Louvain algorithm) is used to identify entity clusters (such as the clustering of ships of the same shipping company and the clustering of activities in the same sea area), and to provide a hierarchical structure for subsequent pattern mining.
[0050] The method for constructing a knowledge graph of ship activity patterns provided by the embodiments of the present invention can perform spatio-temporal alignment on multi-modal data associated with ships by extracting multiple sets of event elements and activity elements, as well as multiple entity information from multi-source heterogeneous data of ships, and converting the multiple sets of event elements and activity elements into a structured data set. Then, the association relationship between event elements and activity elements is extracted from the structured data set, thereby establishing a deep association between different entities and complex marine environment events. Finally, an ontology layer is constructed with multiple concepts related to ships and the relationships between the concepts, a triple structure is constructed with the association relationships of multiple entity information, event elements and activity elements, and an index is constructed with the target attributes of each entity to construct a knowledge graph of ship activity patterns, which can reflect the ship activity patterns in complex scenarios, and thus improve the accuracy of the mining results of ship activity patterns.
[0051] In some embodiments, the multi-source heterogeneous data of ships includes ship trajectory information, port scheduling information, meteorological environment information, and ship archive information. Before extracting multiple sets of event elements and activity elements, as well as multiple entity information from the multi-source heterogeneous data of ships, the method further includes: removing abnormal noise points in the ship trajectory information, and filling in the missing trajectory points in the ship trajectory information; performing word segmentation, removing special characters, stop words, and screening keywords on the port scheduling information and ship archive information respectively; and performing normalization processing on the meteorological environment information.
[0052] In this embodiment, due to unstable maritime communication signals or equipment failures, coordinate drift (i.e., "abnormal noise points") or data interruption (i.e., "missing points") often occur. The sliding window filtering algorithm can be used to remove the drift points that violate the physical motion law, and the linear interpolation method can be used to fill the gaps in the time series to ensure the continuity of the trajectory.
[0053] In this embodiment, the port scheduling information and ship archive information are text data, which contain a large number of meaningless function words, punctuation marks, and format characters. Natural language processing tools (such as NLTK) can be used for word segmentation, regular expressions can be used to remove special characters, stop words such as "of, already, in" can be filtered out, and the TF-IDF algorithm can be used to screen out the most representative keywords to prepare for entity extraction.
[0054] In this embodiment, since the dimensions and orders of magnitude of meteorological environment information such as wind speed, wave height, and air pressure vary greatly (for example, the air pressure may be 1000 hPa, while the wave height is only 2 m), Min-Max normalization can be used in this embodiment to uniformly map data in different dimensions to the [0, 1] interval to eliminate the influence of dimensions and facilitate subsequent model fusion.
[0055] The method for constructing a knowledge graph of ship activity patterns provided in this invention improves the accuracy of spatiotemporal clustering by removing abnormal noise points from ship trajectory information and supplementing missing trajectory points, thus avoiding incorrect route identification caused by signal drift. By performing word segmentation, removal of special characters, stop words, and keyword filtering on port scheduling information and ship file information respectively, the computational burden of natural language processing models is reduced, and the accuracy of entity recognition is improved. By normalizing meteorological and environmental information, the weight imbalance problem during multi-source data fusion can be solved, thereby improving the quality of multi-source heterogeneous data.
[0056] In some embodiments, the structured dataset includes standard structured data, semi-structured data, and text data; extracting the association between event elements and activity elements from the structured dataset includes: extracting a first association from the standard structured data using a preset relationship matching rule; extracting a second association from the semi-structured data using a deep learning-based relationship extraction model; and extracting a third association from the text data using regular expression matching.
[0057] In this embodiment, considering the extremely complex source forms of ship data, the processing objects are subdivided into three categories: standard structured data (such as AIS status tables and ship attribute tables with clearly defined fields in the database), semi-structured data (such as port dispatch logs and maintenance records containing fixed fields but with natural language content), and plain text data (such as completely unstructured weather notices and maritime navigation warnings).
[0058] In this embodiment, for structured data, relationship matching rules can be predefined, such as "if the ship entity ID is consistent with the 'executor ID' of the activity entity, then a 'ship-participating activity' relationship is constructed", which is the first association relationship.
[0059] In this embodiment, for semi-structured data (such as fuzzy associations in port scheduling text), a Transformer-based relation classification model (BERT fine-tuning) can be used. The input is "entity pair + context text" (such as "COSCO Shipping XXX", "Shanghai Port", "berthed at Shanghai Port on May 10, 2024"), and the output is the relation type. The model is required to have a relation classification accuracy of ≥ preset accuracy threshold (such as 88%) on shipping domain datasets, which is the second association relationship.
[0060] In this embodiment, for text data, a "ship-berthing-port" relationship is constructed by matching relationships using regular expressions (such as "[ship name]+[at]+[port name]+[berthing]", i.e., the third association relationship).
[0061] The method for constructing a knowledge graph of ship activity patterns provided in this invention extracts the correlation between event elements and activity elements from a structured dataset. This includes: extracting a first correlation from standard structured data using preset relation matching rules; extracting a second correlation from semi-structured data using a deep learning-based relation extraction model; and extracting a third correlation from text data using regular expression matching. Rule matching ensures the processing speed and high accuracy of basic data, deep learning models solve the problem of complex semantic understanding and uncover implicit causal logic, and regular expression matching efficiently processes announcement-type texts with fixed formats, achieving efficient processing of different data formats.
[0062] In some embodiments, after extracting the third association from the text data through regular expression matching, the method further includes: scoring the confidence of the first association and the second association, and selecting the target association from the first association and the second association based on the confidence score results and a preset scoring threshold; and reviewing the target association based on expert experience to obtain the review result.
[0063] In this embodiment, the scoring threshold can be set according to user needs. Different scoring thresholds can be set for different relationships. For example, the scoring threshold can be set to 0.9 for the first relationship and 0.7 for the second relationship.
[0064] In this embodiment, a confidence score is assigned to each relationship based on the relationship confidence score, and relationships with low execution are quickly filtered out for subsequent review.
[0065] For example, the rule can be set to extract a relationship score of ≥0.9, and deep learning can extract a relationship score of ≥0.7. Relationships with a score below 0.6 need to be manually reviewed (based on expert experience) before being entered into the database.
[0066] The method for constructing a knowledge graph of ship activity patterns provided in this invention improves the accuracy and reliability of the knowledge graph of ship activity patterns by scoring the confidence of the first and second associations and selecting target associations from the first and second associations based on the confidence score results and preset scoring thresholds; and by reviewing the target associations based on expert experience to obtain the review results.
[0067] The pattern prediction method provided by this invention is described below. The pattern prediction method described below can be referred to in correspondence with the knowledge graph construction method of ship activity patterns described above.
[0068] Figure 2 This is one of the flowcharts illustrating the pattern prediction method provided by this invention, such as... Figure 2 As shown, this pattern prediction method includes the following steps: Step 210: Extract the latitude and longitude trajectory data and target node data of ships from the ship activity pattern knowledge graph; wherein, the latitude and longitude trajectory data includes timestamps; the target node data includes port nodes, ship nodes and activity nodes; the ship activity pattern knowledge graph is constructed using the ship activity pattern knowledge graph construction method.
[0069] Step 220: Use a density-based spatiotemporal clustering algorithm to convert latitude and longitude trajectory data into a latitude and longitude coordinate system, combine timestamps to divide the spatiotemporal grid of the ship's location, and identify the spatiotemporal trajectory pattern information of the ship based on the divided spatiotemporal grid; use a graph neural network node embedding algorithm to embed the target node data into a low-dimensional vector space, and calculate the similarity of each target node to obtain the port-related activity pattern information of the ship.
[0070] In this step, the latitude and longitude trajectory data of ships, as well as port nodes, ship nodes, and activity nodes are first extracted from the knowledge graph of ship activity patterns. Different algorithms are then used to mine the spatiotemporal trajectory patterns of ships and the patterns of port-related activities.
[0071] Specifically, a density-based spatiotemporal clustering algorithm is used, setting time thresholds (e.g., 2 hours), spatial thresholds (e.g., 0.5° latitude and longitude), and density thresholds (e.g., at least 5 ship samples) to map ship navigation trajectories to a latitude and longitude coordinate system. Combined with timestamps, a spatiotemporal grid is divided to identify high-density trajectory clusters (mainstream routes) and simultaneously calculate the traffic efficiency of low-density areas (i.e., potential optimized routes).
[0072] In this embodiment, the above-mentioned density-based spatiotemporal clustering algorithm is used to mine the spatiotemporal trajectory patterns of ships to support route optimization. The spatiotemporal trajectory pattern information includes: outputting a set of mainstream routes (3 mainstream routes from port A to port B), potential optimized routes (based on the spatiotemporal clustering results, the routes with the shortest travel time and the fewest obstacle avoidance events are selected), and the distribution of route congestion periods (e.g., the probability of congestion on the northern route of C Sea is ≥60% from 10:00 to 14:00 every day).
[0073] In this embodiment, a graph neural network node embedding algorithm can also be used to embed port nodes, ship nodes, and activity nodes in the knowledge graph into a low-dimensional vector space, calculate node similarity, and capture the association strength between ports and ships, and the transit association strength between ports.
[0074] In this embodiment, the port-related activity pattern information includes: ship-port compatibility ranking (e.g., ships with a deadweight tonnage of ≥100,000 tons have the highest compatibility with Ningbo-Zhoushan Port), optimal transshipment port recommendation (e.g., the optimal transshipment port from Qingdao Port to Guangzhou Port is Xiamen Port, which shortens the transshipment time by 2 hours), port berthing waiting patterns (e.g., the waiting time for container berths at Shanghai Port is ≤1 hour on Wednesdays and Fridays, and ≥2 hours at other times), etc.
[0075] The pattern prediction method provided in this invention extracts the latitude and longitude trajectory data and target node data of ships from a knowledge graph of ship activity patterns. It then uses a density-based spatiotemporal clustering algorithm to convert the latitude and longitude trajectory data into a latitude and longitude coordinate system. Combined with timestamps, it divides the spatiotemporal grid of the ship's location and identifies the spatiotemporal trajectory pattern information of the ship based on the divided spatiotemporal grid. Finally, it uses a graph neural network node embedding algorithm to embed the target node data into a low-dimensional vector space and calculates the similarity of each target node to obtain the port-related activity pattern information of the ship. This achieves accurate extraction of ship activity patterns and route optimization decision support.
[0076] In some embodiments, after obtaining the port-related activity pattern information of the ship, the method further includes: inputting the ship navigation data into the ship activity anomaly detection model to obtain the ship activity anomaly detection result; wherein, the ship activity anomaly detection model is obtained by iteratively training an isolated forest model with the activity feature matrix corresponding to the target related data as the training sample and the anomaly score of different ship activities as the label; the target related data is determined based on the ship activity pattern knowledge graph, and the target related data includes ship activity trajectory related data, event and activity related data, and ship, activity and performance related data.
[0077] In this embodiment, an anomaly detection algorithm based on isolated forests is used to train the feature data of normal navigation activities as a training set. Specifically, the "activity feature matrix" is used as input to train the isolated forest model, and an anomaly threshold is set to score new ship activity data to identify behaviors that deviate from normal patterns.
[0078] In this embodiment, the abnormal ship activity detection results can be a set of abnormal behavior types (such as unjustified course changes, speeding, and illegal entry into restricted sea areas), abnormal behavior triggering factors (such as 80% of unjustified course changes being related to unmarked temporary navigation restriction events), and the distribution of route risk points (such as a certain sea area in the East China Sea having an abnormal obstacle avoidance event rate of ≥25%, which is a high-risk area).
[0079] The pattern prediction method provided in this invention obtains the abnormal ship activity detection results by inputting ship navigation data into a ship activity anomaly detection model, thereby realizing the discovery of abnormal behavior early warning patterns to support the optimization of route safety.
[0080] Figure 3 This is the second flowchart of the regularity prediction method provided by the present invention. Figure 3 In the illustrated embodiment, the pattern prediction method is implemented through the following steps: S1. Fusion of multi-source information elements; S2, Event Entity Extraction; S3. Extraction of the target "event-activity" relationship; S4. Knowledge Graph Construction; S5. Mining of target activity patterns; among which, mining of target activity patterns includes analysis of spatiotemporal distribution patterns, analysis of navigation behavior patterns, analysis of task association patterns, analysis of group evolution patterns, and analysis of abnormal behavior patterns.
[0081] The following describes the knowledge graph construction device for ship activity patterns provided by the present invention. The knowledge graph construction device for ship activity patterns described below and the knowledge graph construction method for ship activity patterns described above can be referred to in correspondence.
[0082] Figure 4 This is a schematic diagram of the structure of the knowledge graph construction device for ship activity patterns provided by the present invention, as shown below. Figure 4 As shown, the knowledge graph construction device for ship activity prediction includes: a first extraction module 410, a second extraction module 420, and a graph construction module 430.
[0083] The first extraction module 410 is used to extract multiple sets of event elements and activity elements, as well as multiple entity information, from the multi-source heterogeneous data of ships, and convert the multiple sets of event elements and activity elements into a structured dataset; wherein, the multi-source heterogeneous data includes at least two of the following: ship trajectory information, port scheduling information, meteorological environment information, and ship file information; each data item in the structured dataset includes element ID, element type, associated target, time attribute, spatial attribute, associated element ID, and credibility score; The second extraction module 420 is used to extract the relationship between event elements and activity elements from the structured dataset; The graph construction module 430 is used to construct an ontology layer based on multiple ship-related concepts and the relationships between these concepts, construct a triplet structure based on the association relationships between multiple entity information, event elements, and activity elements, construct an index based on the target attributes of each entity, and construct a knowledge graph of ship activity patterns; wherein, the target attributes include at least one of entity ID, name, spatial latitude and longitude, and time attributes.
[0084] The knowledge graph construction device for ship activity patterns provided in this invention extracts multiple sets of event elements, activity elements, and entity information from multi-source heterogeneous data of ships, and converts these event elements and activity elements into a structured dataset. This enables spatiotemporal alignment of multimodal data associated with ships. Furthermore, it extracts the relationships between event elements and activity elements from the structured dataset, thereby establishing deep associations between different entities and complex marine environmental events. Finally, it constructs an ontology layer based on multiple ship-related concepts and the relationships between these concepts, builds a triplet structure based on multiple entity information, the relationships between event elements and activity elements, and constructs an index based on the target attributes of each entity. This constructs a knowledge graph of ship activity patterns, which can reflect the ship activity patterns in complex scenarios, thereby improving the accuracy of the ship activity pattern mining results.
[0085] The pattern prediction device provided by the present invention is described below. The pattern prediction device described below and the pattern prediction method described above can be referred to in correspondence.
[0086] Figure 5 This is a schematic diagram of the pattern prediction device provided by the present invention, as shown below. Figure 5 As shown, the pattern prediction device includes a third extraction module 510 and a pattern mining module 520.
[0087] The third extraction module 510 is used to extract the latitude and longitude trajectory data and target node data of ships from the ship activity pattern knowledge graph; wherein, the latitude and longitude trajectory data includes timestamps; the target node data includes port nodes, ship nodes and activity nodes; the ship activity pattern knowledge graph is constructed using the ship activity pattern knowledge graph construction method; The pattern mining module 520 is used to convert latitude and longitude trajectory data into a latitude and longitude coordinate system using a density-based spatiotemporal clustering algorithm, divide the spatiotemporal grid of the ship's location by combining timestamps, and identify the spatiotemporal trajectory pattern information of the ship based on the divided spatiotemporal grid; it also uses a graph neural network node embedding algorithm to embed the target node data into a low-dimensional vector space and calculates the similarity of each target node to obtain the port-related activity pattern information of the ship.
[0088] The pattern prediction device provided in this invention extracts the latitude and longitude trajectory data and target node data of ships from a knowledge graph of ship activity patterns. It then uses a density-based spatiotemporal clustering algorithm to convert the latitude and longitude trajectory data into a latitude and longitude coordinate system. Combined with timestamps, it divides the spatiotemporal grid of the ship's location and identifies the spatiotemporal trajectory pattern information of the ship based on the divided spatiotemporal grid. Finally, it uses a graph neural network node embedding algorithm to embed the target node data into a low-dimensional vector space and calculates the similarity of each target node to obtain the port-related activity pattern information of the ship. This achieves accurate extraction of ship activity patterns and route optimization decision support.
[0089] Figure 6 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6 As shown, the electronic device may include: a processor 610, a communications interface 620, a memory 630, and a communications bus 640, wherein the processor 610, the communications interface 620, and the memory 630 communicate with each other through the communications bus 640. The processor 610 can call logical instructions in the memory 630 to execute a method for constructing a knowledge graph of ship activity patterns. This method includes: extracting multiple sets of event elements and activity elements, and multiple entity information from multi-source heterogeneous data of ships, and converting these event elements and activity elements into a structured dataset; wherein the multi-source heterogeneous data includes at least two of the following: ship trajectory information, port scheduling information, meteorological environment information, and ship archive information; each data entry in the structured dataset includes an element ID, element type, associated target, time attribute, spatial attribute, associated element ID, and credibility score; extracting the relationships between event elements and activity elements from the structured dataset; constructing an ontology layer based on multiple ship-related concepts and the relationships between these concepts; constructing a triplet structure based on multiple entity information, the relationships between event elements and activity elements; constructing an index based on the target attributes of each entity; and constructing a knowledge graph of ship activity patterns; wherein the target attributes include at least one of the following: entity ID, name, spatial latitude and longitude, and time attribute.
[0090] Alternatively, a pattern prediction method can be implemented, which includes: extracting the latitude and longitude trajectory data and target node data of ships from a ship activity pattern knowledge graph; wherein, the latitude and longitude trajectory data includes timestamps; the target node data includes port nodes, ship nodes, and activity nodes; the ship activity pattern knowledge graph is constructed using a ship activity pattern knowledge graph construction method; a density-based spatiotemporal clustering algorithm is used to convert the latitude and longitude trajectory data to a latitude and longitude coordinate system, and the spatiotemporal grid of the ship's location is divided in combination with the timestamps, and the spatiotemporal trajectory pattern information of the ship is identified based on the divided spatiotemporal grid; a graph neural network node embedding algorithm is used to embed the target node data into a low-dimensional vector space, and the similarity of each target node is calculated to obtain the port-related activity pattern information of the ship.
[0091] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0092] On the other hand, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements a method for constructing a knowledge graph of ship activity patterns provided by the above methods. This method includes: extracting multiple sets of event elements and activity elements, and multiple entity information from multi-source heterogeneous data of ships, and converting the multiple sets of event elements and activity elements into a structured dataset; wherein the multi-source heterogeneous data includes at least two of ship trajectory information, port scheduling information, meteorological environment information, and ship archive information; each data item in the structured dataset includes an element ID, element type, associated target, time attribute, spatial attribute, associated element ID, and credibility score; extracting the association relationship between event elements and activity elements from the structured dataset; constructing an ontology layer based on multiple ship-related concepts and the relationships between these concepts; constructing a triplet structure based on multiple entity information, the association relationship between event elements and activity elements; constructing an index based on the target attributes of each entity; and constructing a knowledge graph of ship activity patterns; wherein the target attributes include at least one of entity ID, name, spatial latitude and longitude, and time attribute.
[0093] Alternatively, a pattern prediction method can be implemented, which includes: extracting the latitude and longitude trajectory data and target node data of ships from a ship activity pattern knowledge graph; wherein, the latitude and longitude trajectory data includes timestamps; the target node data includes port nodes, ship nodes, and activity nodes; the ship activity pattern knowledge graph is constructed using a ship activity pattern knowledge graph construction method; a density-based spatiotemporal clustering algorithm is used to convert the latitude and longitude trajectory data to a latitude and longitude coordinate system, and the spatiotemporal grid of the ship's location is divided in combination with the timestamps, and the spatiotemporal trajectory pattern information of the ship is identified based on the divided spatiotemporal grid; a graph neural network node embedding algorithm is used to embed the target node data into a low-dimensional vector space, and the similarity of each target node is calculated to obtain the port-related activity pattern information of the ship.
[0094] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0095] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0096] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for constructing a knowledge graph of ship activity patterns, characterized in that, include: Multiple sets of event elements and activity elements, as well as multiple entity information, are extracted from multi-source heterogeneous data of ships, and the multiple sets of event elements and activity elements are converted into a structured dataset; wherein, the multi-source heterogeneous data includes at least two of the following: ship trajectory information, port scheduling information, meteorological environment information, and ship file information; each data item in the structured dataset includes element ID, element type, associated target, time attribute, spatial attribute, associated element ID, and credibility score; Extract the association between event elements and activity elements from the structured dataset; An ontology layer is constructed based on multiple ship-related concepts and the relationships between these concepts. A triplet structure is constructed based on the associations between the multiple entity information, the event elements, and the activity elements. An index is constructed based on the target attributes of each entity to build a knowledge graph of ship activity patterns. The target attributes include at least one of entity ID, name, spatial latitude and longitude, and time attributes.
2. The method for constructing a knowledge graph of ship activity patterns according to claim 1, characterized in that, The multi-source heterogeneous data of the vessel includes vessel trajectory information, port scheduling information, meteorological environment information, and vessel file information; Before extracting multiple sets of event elements and activity elements, as well as multiple entity information, from the ship's multi-source heterogeneous data, the method further includes: Remove abnormal noise points from the ship trajectory information and fill in the missing trajectory points in the ship trajectory information; The port scheduling information and the ship file information are processed by word segmentation, removal of special characters, removal of stop words, and filtering of keywords, respectively; The meteorological and environmental information is then normalized.
3. The method for constructing a knowledge graph of ship activity patterns according to claim 1, characterized in that, The structured dataset includes standard structured data, semi-structured data, and text data; The extraction of the association between event elements and activity elements from the structured dataset includes: The first association relationship is extracted from the standard structured data using preset relationship matching rules; A second association relationship is extracted from the semi-structured data using a deep learning-based relationship extraction model; The third association relationship is extracted from the text data by matching relationships using regular expressions.
4. The method for constructing a knowledge graph of ship activity patterns according to claim 3, characterized in that, After extracting the third association relationship from the text data through regular expression matching, the method further includes: The confidence scores of the first association and the second association are calculated, and the target association is selected from the first association and the second association based on the confidence scores and the preset scoring threshold. The target relationships were reviewed based on expert experience, and the review results were obtained.
5. A method for predicting patterns, characterized in that, include: The latitude and longitude trajectory data and target node data of ships are extracted from the knowledge graph of ship activity patterns; wherein, the latitude and longitude trajectory data includes timestamps; the target node data includes port nodes, ship nodes, and activity nodes; the knowledge graph of ship activity patterns is constructed by the ship activity pattern knowledge graph construction method as described in any one of claims 1-4; A density-based spatiotemporal clustering algorithm is used to convert the latitude and longitude trajectory data into a latitude and longitude coordinate system. Combined with timestamps, the spatiotemporal grid of the ship's location is divided, and the spatiotemporal trajectory pattern information of the ship is identified based on the divided spatiotemporal grid. A graph neural network node embedding algorithm is used to embed the target node data into a low-dimensional vector space, and the similarity of each target node is calculated to obtain the port-related activity pattern information of the ship.
6. The pattern prediction method according to claim 5, characterized in that, After obtaining the port-related activity patterns of the vessel, the method further includes: Ship navigation data is input into the ship activity anomaly detection model to obtain ship activity anomaly detection results; The ship activity anomaly detection model is obtained by iteratively training an isolated forest model using the activity feature matrix corresponding to the target association data as training samples and the anomaly scores of different ship activities as labels. The target association data is determined based on the ship activity pattern knowledge graph and includes ship activity trajectory association data, event and activity association data, and ship, activity and performance association data.
7. A knowledge graph construction device for predicting ship activity, characterized in that, include: The first extraction module is used to extract multiple sets of event elements and activity elements, as well as multiple entity information, from the multi-source heterogeneous data of ships, and convert the multiple sets of event elements and activity elements into a structured dataset; wherein, the multi-source heterogeneous data includes at least two of the following: ship trajectory information, port scheduling information, meteorological environment information, and ship file information; each data item in the structured dataset includes element ID, element type, associated target, time attribute, spatial attribute, associated element ID, and credibility score; The second extraction module is used to extract the association between event elements and activity elements from the structured dataset; The graph construction module is used to construct an ontology layer based on multiple concepts related to the ship and the relationships between these concepts, construct a triplet structure based on the multiple entity information, the association between the event elements and the activity elements, construct an index based on the target attributes of each entity, and construct a knowledge graph of ship activity patterns; wherein, the target attributes include at least one of entity ID, name, spatial latitude and longitude, and time attributes.
8. A pattern prediction device, characterized in that, include: The third extraction module is used to extract the latitude and longitude trajectory data and target node data of ships from the ship activity pattern knowledge graph; wherein, the latitude and longitude trajectory data includes timestamps; the target node data includes port nodes, ship nodes, and activity nodes; the ship activity pattern knowledge graph is constructed by the ship activity pattern knowledge graph construction method as described in any one of claims 1-4; The pattern mining module is used to convert the latitude and longitude trajectory data to a latitude and longitude coordinate system using a density-based spatiotemporal clustering algorithm, divide the spatiotemporal grid of the ship's location using timestamps, and identify the spatiotemporal trajectory pattern information of the ship based on the divided spatiotemporal grid. The target node data is embedded into a low-dimensional vector space using a graph neural network node embedding algorithm, and the similarity of each target node is calculated to obtain the port-related activity pattern information of the ship.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 6.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 6.