Method and system for constructing multimodal shipping vertical large model based on knowledge graph and graph-rag
By constructing an ontology and knowledge graph in the shipping field, performing multimodal coding and feature fusion, training a large-scale base model, and executing rule consistency verification, the problem of difficult fusion of multi-source heterogeneous data is solved, a reliable decision-making closed loop is realized, and executable shipping decision results are generated.
Patent Information
- Application Number
- CN202611448858.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-17
- Publication Date
- 2026-11-27
AI Technical Summary
Existing large-scale shipping vertical models suffer from difficulties in reliably integrating multi-source heterogeneous data. The graph retrieval and rule verification optimization solutions have not formed a closed loop, resulting in output results that lack executability and fail to meet the interpretability, traceability, and executability requirements of safety-sensitive shipping businesses.
We construct an ontology and knowledge graph for the shipping domain, associate multi-source heterogeneous data through identity anchors, perform multimodal coding and feature fusion, train a large-scale model based on shipping domain corpus, generate candidate solutions, and perform rule consistency verification and optimization to form a reliable decision-making closed loop.
It achieves reliable fusion of multi-source heterogeneous data, generates executable, interpretable, and traceable shipping decision results, improves the intelligence level of inland waterway shipping, and avoids decision-making errors and erroneous correlations.
Smart Images

Figure CN123178972A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of knowledge graph technology, and in particular relates to a method and system for constructing a large multimodal shipping vertical model based on knowledge graph and Graph-RAG. Background Technology
[0002] Inland waterway shipping plays a vital role in transporting bulk cargo. Vessels must navigate through locks, channels, and anchorages, and are subject to factors such as hydrology, meteorology, navigation rules, dangerous goods declarations, and construction-related navigation restrictions. With the continuous growth of inland waterway shipping, the number of vessels waiting to pass through locks is constantly increasing, making operational decisions regarding lock passage, dangerous goods isolation, abnormal navigation identification, and emergency response increasingly complex. The information upon which these decisions rely is scattered across multiple independent systems: AIS, radar, video surveillance, electronic charts, meteorological and hydrological stations, lock control systems, vessel declaration systems, regulatory databases, and accident case databases. These systems exhibit significant differences in data structure, spatiotemporal benchmarks, and update frequencies, lacking a unified mechanism for correlation and verification. Shipping operational decisions are highly sensitive to safety; errors in any stage can lead to vessel collisions, dangerous goods incidents, or waterway congestion. Therefore, the decision-making process not only requires correct conclusions but also interpretability, traceability, and enforceability. However, existing information technology methods struggle to automatically integrate heterogeneous data scattered across multiple systems into unified decision-making knowledge. Furthermore, they fail to simultaneously consider multiple optimization objectives—waiting time, resource utilization, conflict risk, and rule compliance—in complex lock passage scheduling and critical waterway risk control scenarios. How to construct a multimodal shipping vertical model that can uniformly express shipping business knowledge, reliably integrate multi-source heterogeneous data, and output interpretable and reliable execution decision results has become a technical challenge hindering the improvement of intelligent inland waterway shipping.
[0003] To address the aforementioned technical problems, existing technologies typically employ three main approaches. The first approach is knowledge graph-enhanced retrieval and question-answering. The basic idea is to first extract entities, attributes, and relationships from unstructured texts such as regulations, cases, and documents to construct a domain knowledge graph. Then, during question-answering, relevant knowledge is retrieved through a combination of entity linking, intent mining, vector retrieval, and graph retrieval. The graph paths and relevant clauses are then assembled into a context sequence and input into a large language model, which generates a natural language answer. For example, Chinese patent CN119988572A discloses a GraphRAG-based intelligent question-answering method. This method uses an intent mining model to mine the intent of the query text to obtain query entities, queries the knowledge graph based on the query entities to obtain relevant subgraph information, retrieves relevant community summary vector databases to obtain relevant community summary information, and then uses an answer generation model to generate the target answer, thereby improving the accuracy of answers for cross-chapter and cross-document queries. The second category is multi-source ship data fusion methods. The basic idea is to perform coordinate transformation and spatiotemporal alignment on perception layer data such as AIS trajectories, videos, and radar data. This is achieved through target detection, trajectory association, and identity matching to link multi-source observations of the same ship. For example, Chinese patent CN109460740B discloses a ship identification method based on AIS and video data fusion. This method collects ship samples to train a ship target classifier, uses the classifier to detect ship targets in video frames, continuously collects AIS data and filters it from both temporal and spatial scales, uses linear extrapolation to predict the current position of the AIS target and transforms it to the image coordinate system, and then performs position matching between the target to be matched and the transformed AIS target. The third category is shipping scheduling assistance methods based on large language models. The basic idea is to use knowledge graphs and constraint rules to screen the feasibility of ships to be scheduled, generate candidate scheduling schemes, and then use reinforcement learning or mathematical programming models to select the best scheme from the candidates, outputting a natural language scheduling conclusion with explanation. The above three methods have improved the informatization and intelligence level of the shipping industry to a certain extent, but none of them have formed an integrated closed-loop solution that organically combines the reliable fusion of multi-source heterogeneous data, the enhancement of knowledge graph retrieval, and the optimization of rule verification.
[0004] However, the aforementioned existing technologies have at least the following drawbacks. First, they lack dedicated business ontology, rule chains, and security boundary modeling for the shipping industry. Chinese patent CN114443860A discloses a knowledge graph-based method and system for ship intent recognition and reasoning. This method extracts entities, attributes, and relationships from knowledge data to form a ship intent knowledge graph. Sensor data is semantically processed and input into the knowledge graph for entity recognition, path calculation, and automatic completion to infer ship intent. However, this solution only models around the ship intent dimension and cannot uniformly represent ships, locks, waterways, ports, anchorages, dangerous goods, scheduling rules, construction navigation restrictions, hydrological and meteorological conditions, and emergency procedures. Static rules, dynamic situations, and historical cases are scattered across different knowledge sources, lacking unified spatiotemporal and version anchors, making it difficult to support rule verification and security boundary determination. Second, they lack an integrated standardization, alignment, and reliable fusion mechanism for multi-source heterogeneous data. While the ship identification method based on the fusion of AIS and video data disclosed in Chinese Patent Publication No. CN109460740B achieves position matching between AIS and video at the trajectory level, this solution only addresses trajectory data at the perception layer. It fails to reliably associate static business data such as declaration forms, regulatory provisions, and scheduling logs with real-time sensor data through identity anchors, nor does it establish a consistent situational snapshot at the moment the decision-making task is initiated. Safety constraint information such as the dangerous goods level and cargo type carried in static documents cannot participate in subsequent reasoning, and multiple adjacent targets in dense waiting scenarios are prone to erroneous associations. Thirdly, the generated results usually only provide text answers. The intelligent question-answering method based on GraphRAG disclosed in Chinese Patent Publication No. CN119988572A generates target answers through intent mining, subgraph query, and community summary retrieval. However, this solution outputs natural language text and does not perform rule consistency verification and optimization on the generated results. It is difficult to output evidence chains, rule chains, risk scores, and executable decision objects, which cannot meet the implementation requirements of safety-sensitive shipping businesses for interpretability, traceability, and enforceability. Therefore, it is necessary to design a method and system for constructing a multimodal shipping vertical large model based on knowledge graphs and Graph-RAG to solve the above problems. Summary of the Invention
[0005] The technical problem to be solved by this invention is to provide a method and system for constructing a multimodal shipping vertical large model based on knowledge graphs and Graph-RAG. It aims to overcome the problems of existing shipping vertical large models, such as the difficulty in reliably integrating multi-source heterogeneous data, the lack of a closed loop in graph retrieval and rule verification optimization, and the lack of executable output results. It features the characteristics of ensuring the credibility of decision data through identity anchor association and consistent situation snapshot, and achieving an interpretable and credible decision-making closed loop through dual-path retrieval and conflict back-injection.
[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A method for constructing a multimodal shipping vertical large model based on knowledge graphs and Graph-RAG includes the following steps: Construct a shipping ontology and a shipping knowledge graph, which includes a static knowledge graph and a dynamic situational graph. Acquire multi-source heterogeneous shipping data, perform cleaning, standardization and time alignment on the multi-source heterogeneous shipping data, and link and fuse static business data with real-time sensor data through identity anchors to obtain a unified shipping data base; Multimodal coding and feature fusion are performed on the modal data in the unified shipping data base, and the resulting fused features are written into the dynamic situation map. Construct a large-scale basic model for the shipping vertical category, and train the large-scale basic model for the shipping vertical category using shipping domain corpus; Receive shipping business tasks, perform task identification and task decomposition on the shipping business tasks, and simultaneously perform graph retrieval and vector retrieval, and assemble the obtained graph path evidence and text evidence into enhanced context; The enhanced context input to the shipping vertical base model generates candidate solutions. Based on a consistent situation snapshot aligned with the time of task initiation, the candidate solutions are subjected to consistency verification and optimization of the execution rules to obtain the final decision result and output it.
[0007] Preferably, the shipping ontology is constructed using a combination of top-down and bottom-up approaches. The top-down component defines the conceptual framework based on shipping management systems, navigation regulations, lock scheduling rules, and expert experience. The bottom-up component extracts high-frequency entities, attributes, and relationships from declaration forms, scheduling logs, case documents, and video events and populates the ontology. The shipping ontology includes a set of entities, a set of relationships, a set of attributes, a set of events, and a set of rules, represented by a shipping knowledge graph. ,in, Represents a set of entities. Represents a set of relations. Represents a collection of attributes. Represents a set of events. It represents a set of rules; the shipping knowledge graph is built on a four-layer heterogeneous knowledge organization framework, which includes an entity layer, an attribute layer, an event layer, and a rule layer. The framework introduces spatiotemporal anchors and version anchors to enable unified management of static rules, dynamic situations, and historical cases in the same graph.
[0008] Furthermore, the entities in the entity set include ships, fleets, lock chambers, lock sessions, channel sections, anchorages, berths, ports, navigation marks, dispatchers, regulatory agencies, and emergency resources, while the attributes in the attribute set include ship length, beam, draft, cargo type, dangerous goods class, declaration time, estimated time of arrival, water level, current speed, visibility, lock chamber length, and effective width.
[0009] Furthermore, the events in the event set include declaration, arrival, waiting for gate entry, gate exit, abnormal docking, deviation, speeding, collision risk, construction navigation restrictions, and emergency response. The rules in the rule set include priority rules, isolation rules, scheduling order rules, gate chamber adaptation rules, navigation scale rules, and manual takeover rules.
[0010] Furthermore, the construction of the shipping knowledge graph includes: performing entity identification, relation extraction, and event extraction from regulatory texts, case documents, and scheduling records. Entity identification uses BERT-CRF, GlobalPointer, or cue learning models, relation extraction uses Biaffine, CasRel, or instruction extraction models, and event extraction uses a joint framework of trigger word identification and argument extraction.
[0011] Preferably, the shipping knowledge graph adopts a dual storage architecture of graph database and vector database. The graph database is used to store entities, relationships, rule paths and event chains, while the vector database is used to store embedded vectors of legal provisions, case paragraphs, image descriptions and scheduling semantic fragments. The static knowledge graph stores ontology, regulations, facilities and typical cases, while the dynamic situation graph updates ship positions, queues, lock occupancy, water levels and weather conditions at the second or minute level according to the event flow.
[0012] Furthermore, acquiring multi-source heterogeneous shipping data includes: accessing AIS tracks, radar points, video streams, electronic navigation charts, meteorological and hydrological data, lock operation status, lock chamber resource status, vessel declaration forms, historical records, regulations and procedures, accident cases, and regulatory logs.
[0013] Furthermore, the cleaning, standardization, and time alignment of multi-source heterogeneous shipping data include: performing field mapping, unit unification, outlier removal, missing value repair, and timestamp standardization on structured data in multi-source heterogeneous shipping data; and using Kalman filtering or particle filtering for denoising trajectory data.
[0014] Furthermore, a sliding time window mechanism is adopted for time alignment of multi-source heterogeneous shipping data, and the records of the same vessel in the AIS, video recognition and reporting system are matched according to the minimum time difference and minimum spatial distance.
[0015] Preferably, the association and fusion of static business data and real-time sensor data through identity anchors includes: An identity anchoring is established between static business data and real-time sensor data based on the ship's static identification. Then, kinematic features are used to verify the trajectory continuity of the identity anchoring results. Finally, visual recognition attributes and cargo type in the static business data are used to verify attribute consistency, thus obtaining the association confidence level between the static business data and the real-time sensor data. The association confidence level is calculated as follows: ; in, This indicates the confidence level of the correlation between static business data and real-time sensor data. This indicates the score for matching the ship's static identification markings. This indicates the kinematic trajectory verification score. The attribute consistency check score, the ship static identification matching score, the kinematic trajectory verification score, and the attribute consistency check score all range from 0 to 1. , , Let represent the weighting coefficients of the three scores, and satisfy . , , , .
[0016] Preferably, the three-level association is performed in the order of static identification first and then dynamic identification. When the static identification matching score of the ship is lower than the preset identity threshold, it is determined that the identity does not match and the data item is excluded. When the static identification matching score of the ship is not lower than the preset identity threshold and the kinematic trajectory verification score is lower than the preset trajectory threshold, it is determined that the trajectory is abnormal, the data item is retained and marked as abnormal, and the abnormal data item participates in the subsequent abnormal navigation identification. When the attribute consistency verification score is lower than the preset attribute threshold, it is determined that the declared information is inconsistent with the visual recognition, triggering the review of the declared information. The weighting coefficient satisfies the following conditions: The static identification matching score corresponds to the strong identity anchor and has the highest weight, while the attribute consistency verification score corresponds to the auxiliary verification and has the lowest weight. The preset association threshold is 0.6. Data items with an association confidence level lower than the preset association threshold will not be included in subsequent scheduling decisions.
[0017] Preferably, the static identification matching score of the ship is calculated as follows: ; in, This indicates the number of static identifier fields involved in the matching. This indicates the static identifier field number. Indicates the first Matching weights for static identifier fields. Indicates the first The matching results of the static identifier fields, including ship name, MMSI, length, beam, and draft, are given when the MMSI field is exactly equal. The value is 1 if the length, beam, and draft fields are within the preset tolerance range. Select 1 otherwise select 0; The kinematic trajectory verification score is calculated as follows: ; in, Indicates the number of sampling times. Indicates the sampling time sequence number. Indicates the first The planar distance between the AIS extrapolated position and the visual recognition position of the vessel at each sampling time. This indicates the preset position deviation tolerance. This indicates an indicator function that takes the value 1 if the condition is true and 0 otherwise; the attribute consistency check score is calculated as follows: ; in, Indicates the number of attributes compared. Indicates the comparison attribute number. Indicates the first The comparison attributes include ship category, cargo type, and dangerous goods class. When they match, the comparison is considered complete. Select 1 if the value is 1, otherwise select 0.
[0018] Furthermore, a quality scoring function is constructed for the data quality of multi-source heterogeneous shipping data, and a unified shipping data foundation includes a standardized text library, real-time event stream, structured business tables, time-series feature tables, and multimodal sample indexes.
[0019] Furthermore, multimodal encoding of the various modal data in the unified shipping data platform includes: text modality is encoded using a shipping-domain-adapted large language model or encoder model to obtain text representation. ,in, The encoded representation of the text modality.
[0020] Furthermore, multimodal coding also includes: visual modality is encoded using a combination of object detection model and visual encoder. The object detection model is YOLO, RT-DETR or MaskR-CNN and is used to identify ship type, heading, berthing status, lane occupancy status and floating object events. The visual encoder is CLIP, SwinTransformer or ViT.
[0021] Furthermore, multimodal coding also includes: for AIS trajectory, water level changes, flow velocity changes and gate operation status, the temporal mode is modeled using Informer, TemporalFusionTransformer, LSTM or spatiotemporal graph neural network to obtain temporal representation.
[0022] Furthermore, multimodal coding also includes: structured business data being encoded into a structured representation through a multilayer perceptron or feature cross-network, and mechanistic constraints being mapped into constraint vectors through a rule encoder.
[0023] Preferably, writing the obtained fused features into the dynamic situation map includes: using a gated attention mechanism to fuse the outputs of each modality, and writing the outputs of each modality into state objects, event objects, and risk objects before writing them into the dynamic situation map and binding them with the task context; the map retrieval includes rule path retrieval, case path retrieval, and causal path retrieval, and the vector retrieval includes the recall of legal text fragments, case summaries, scheduling log fragments, and image description fragments.
[0024] Furthermore, the training of the shipping vertical base model using shipping domain corpus includes four stages: domain-based pre-training, supervised fine-tuning, preference optimization, and safety alignment. The base model is a Transformer model that supports long context and tool invocation capabilities.
[0025] Furthermore, the domain continues to pre-train using shipping regulations, cases, dispatch logs, declaration documents, and operation and maintenance manual corpora. It learns shipping terminology and business expressions through autoregressive loss and monitors fine-tuning using task instruction samples, which include regulatory interpretations, document pre-review, gate passage suggestions, anomaly analysis, emergency response, and evidence attribution.
[0026] Furthermore, graph constraint loss and rule constraint loss are added during the training process to enable the large-scale model of shipping vertical base to have graph consistency and rule consistency.
[0027] Furthermore, the preference optimization phase employs DPO, RLHF, or rule-based reward optimization.
[0028] Furthermore, the task identification and decomposition for shipping business tasks includes parsing the input into task type, target object, time range, spatial range, rule constraints, and output format.
[0029] Preferably, when assembling the obtained graph path evidence and text evidence into an enhanced context, priority is given to retaining the path chains that are strongly related to the current task, forming a context sequence consisting of task objectives, key entities, constraint rules, real-time situation and historical cases. Then, the evidence is converted into a prompt template, requiring the shipping vertical base model to output conclusions, basis, risks, suggestions and manual confirmation items. For important nodes in the enhanced context, a subgraph compression strategy is adopted to reduce the context length through maximum edge coverage, path redundancy removal and summary rewriting, while retaining the original evidence index for auditing purposes; When enhancing the context input to the shipping vertical base model to generate candidate solutions, the generated candidate solutions are required to be associated with at least one graph path and one textual evidence. When the evidence is insufficient, a conservative conclusion that the evidence is insufficient and needs to be manually reviewed is output.
[0030] Preferably, the consistent situation snapshot is generated in the following manner: At the moment the task is initiated, the situational data of the dynamic situation map is frozen. All situational data within the snapshot are uniformly aligned to the moment of task initiation. Each situational data item carries a collection timestamp and a time-effect decay coefficient for its type. The timeliness of each situational data item is calculated and judged according to a preset timeliness threshold. Data with a timeliness lower than the preset threshold is not included in the snapshot and triggers re-collection. Rule consistency verification and optimization only read the snapshot. The timeliness calculation is as follows: ; in, Indicates the first The timeliness of situational data Indicates the first The time-decrease coefficient of the type of situational data. Indicates the time of task initiation and the number of... The time difference between the acquisition time of the situation data and the value of the time-effect decay coefficient are determined by the type of situation data. The time-effect decay coefficient of ship position data is greater than that of water level data.
[0031] Preferably, aligning all situational data within the snapshot to the mission initiation time includes: applying uniform kinematic extrapolation to ship position situational data, and aligning it according to the... The velocity component of the situational data is extrapolated to the time of task initiation to obtain the alignment position; for slow-changing situational data such as water level, flow velocity, and visibility, the nearest neighbor value is used, and the sampled value closest to the time of task initiation is taken as the alignment value; for event-driven situational data such as gate occupancy and queues, state preservation is adopted, and the state after the most recent event update is used at the time of task initiation.
[0032] Preferably, the first The time-decrease coefficient of the situation data is calculated according to It is confirmed that, among them, Indicates the first The nominal update cycle for the type of situation data is specified. The nominal update cycle for ship position situation data is in seconds, and the nominal update cycle for water level situation data is in minutes. The preset timeliness threshold is set to 0.5.
[0033] Preferably, the process of performing rule consistency verification and optimization on candidate solutions includes: performing inference through task planning agent, knowledge retrieval agent, rule verification agent, optimization solution agent and audit agent. The inference chain is semantic understanding, evidence alignment, candidate solution generation, graph consistency check, rule consistency check, risk assessment, optimization rearrangement and result output.
[0034] Preferably, the rule consistency verification includes: the rule verification agent checks whether the candidate scheme violates the constraints of lock chamber size, hazardous materials isolation, priority, construction navigation restrictions and manual takeover. If a conflict is found, a structured conflict vector is output. The structured conflict vector includes the rule identifier, violation direction, involved entities and violation amount. The structured conflict vector is serialized into constraint text and injected back into the regenerated prompt template to trigger regeneration. The regenerated candidate scheme is verified again until there is no conflict or manual takeover is triggered.
[0035] Preferably, the method for determining the amount of violation is as follows: For violations of constraints detected by the rule verification agent, if the violation constraint is an upper bound constraint and the actual value of the candidate solution under the violation constraint is greater than the limit value of the violation constraint, then... Calculate the violation amount; when the violation constraint is a lower bound constraint and the actual value of the candidate solution under the violation constraint is less than the limit value of the violation constraint, proceed according to... Calculate the amount of violation; where, Indicates a violation of quantity, This represents the actual value of the candidate solution under the violated constraint. This represents the constraint value that violates the constraint, where the constraint value is a positive number; and according to... Calculate the relative violation rate, where, The structured conflict vector further includes the relative violation rate, representing the relative violation rate.
[0036] Furthermore, the optimization solution selects mixed-integer linear programming, constraint programming, genetic algorithm, tabu search, or bundle search rearrangement based on the scenario scale. For real-time scenarios, a two-stage method of rule filtering, heuristic generation, and local search correction is adopted.
[0037] Preferably, the optimized solution outputs a structured decision object, which includes gate allocation, candidate order, expected waiting time, risk level, conflict description, and alternative solutions.
[0038] Preferably, the method further includes: recording task input, evidence recall results, graph paths, rule hit results, candidate answers, manually revised content, and final execution results to form a feedback sample library, which is used to support online learning, feedback optimization, and security auditing.
[0039] Preferably, the method further includes: constructing error attribution labels for online errors, including retrieval missing, outdated graph, rule conflict, visual misidentification, temporal prediction bias, and large model illusion, and performing targeted optimization of the graph, retrieval machine, and generative model based on the error attribution labels.
[0040] Furthermore, the online learning adopts a two-layer update mechanism. The first layer is the incremental update of the knowledge layer, which incrementally writes the graph and builds the vector library for new regulations, new cases, new equipment status and new business rules. The second layer is the periodic update of the model layer, which performs efficient fine-tuning of parameters based on manually revised samples. The efficient fine-tuning of parameters uses LoRA, QLoRA or Adapter training.
[0041] Furthermore, security audits preserve evidence chains, rule chains, and model version numbers according to task numbers to support result retrospective analysis, liability determination, and evidence review.
[0042] Preferably, a multimodal shipping vertical category large model system based on knowledge graphs and Graph-RAG includes a data access layer, a data governance layer, a knowledge graph layer, a vector retrieval layer, a multimodal perception layer, a base large model layer, a Graph-RAG enhancement layer, a rule verification layer, an optimization solution layer, a business interface layer, and a security audit layer. The data access layer is used to connect AIS, radar, video, electronic aeronautical charts, meteorological and hydrological data, lock control systems, and business databases, and output multi-source heterogeneous shipping data. The data governance layer receives multi-source heterogeneous shipping data output from the data access layer and performs cleaning, standardization and time alignment, and associates and fuses static business data with real-time sensor data through identity anchors; The knowledge graph layer receives standardized data output from the data governance layer, stores ontology, rules and event chains, and maintains a dynamic situational graph. The vector retrieval layer receives standardized data output from the data governance layer and stores the embedded vectors of legal provisions, case paragraphs, image descriptions, and scheduling semantic fragments; The multimodal perception layer receives standardized data output from the data governance layer, completes the encoding of text, visual, temporal, and structured data, and writes the encoding results back to the knowledge graph layer; The base large model layer generates candidate schemes based on the augmentation context output of the Graph-RAG augmentation layer; The Graph-RAG enhancement layer receives user tasks and completes evidence retrieval and context assembly; The rule verification layer receives candidate solutions output by the base model layer and performs security boundary and business rule verification based on a consistent situation snapshot aligned with the task initiation time. The optimization solution layer receives the verification results output by the rule verification layer and generates the final executable solution; The business interface layer receives the final executable solution output by the optimization and solution layer and uses it to interface with scheduling, monitoring, command and control and mobile systems; The security audit layer records data throughout the entire process.
[0043] Furthermore, the Graph-RAG enhancement layer includes a task identification unit, a graph retrieval unit, a vector retrieval unit, a context assembly unit, and a subgraph compression unit. The task identification unit is used to perform task identification and task decomposition. The graph retrieval unit is used to perform rule path retrieval, case path retrieval, and causal path retrieval. The vector retrieval unit is used to retrieve legal clause fragments, case summaries, scheduling log fragments, and image description fragments. The context assembly unit is used to assemble the retrieval results into an enhanced context. The subgraph compression unit is used to perform subgraph compression on important nodes.
[0044] Furthermore, a unified vessel identifier is generated for each ship. The vessel, lock chamber, channel section, dangerous goods class, priority rules, construction restrictions, and historical lock passage cases are written into the knowledge graph layer. The multimodal perception layer is used to determine the berthing and channel occupancy status of the vessel and predict the arrival time and waiting time for the next hour. The base large model layer generates candidate ranking schemes. The Graph-RAG enhancement layer retrieves relevant graph paths, regulatory clauses, dangerous goods isolation requirements, and historical successful cases. The rule verification layer checks whether the candidate ranking schemes violate lock chamber size, dangerous goods isolation, priority, construction navigation restrictions, and manual takeover constraints based on a consistent situation snapshot aligned with the task initiation time. The optimization solution layer solves the problem with the objectives of minimum waiting time, minimum risk, and maximum utilization rate, and outputs the final ranking, estimated lock passage time, and alternative schemes.
[0045] Furthermore, the system is also used for monitoring abnormal navigation in key waterways. It identifies abnormal docking, reverse navigation, deviation, and speeding behaviors through video and AIS, generates risk management suggestions by combining water level, construction area, and historical accident cases, and outputs the linkage objects, management level, and escalation trigger conditions through the rule verification layer.
[0046] Preferably, a computer device includes a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform a method for constructing a multimodal shipping vertical large model based on knowledge graphs and Graph-RAG.
[0047] Preferably, a computer-readable storage medium stores computer instructions for instructing a computer to execute a method for constructing a multimodal shipping vertical large model based on knowledge graphs and Graph-RAG.
[0048] The beneficial effects of this invention are as follows: 1. This invention constructs a four-layer heterogeneous knowledge organization framework covering entity, attribute, event, and rule layers, and introduces spatiotemporal anchors and version anchors. It realizes the unified representation of entities such as ships, fleets, lock chambers, channel sections, ports, anchorages, navigation marks, dispatchers, regulatory agencies, and emergency resources, as well as attributes such as ship length, beam, draft, cargo type, dangerous goods class, water level, and current speed. It incorporates events such as declaration, arrival, waiting for lock, entering the lock, exiting the lock, abnormal berthing, deviation, and speeding, as well as priority rules, isolation rules, dispatching order rules, lock chamber adaptation rules, navigation scale rules, and manual takeover rules into the same graph for unified management. This enables static rules, dynamic situations, and historical cases to be collaboratively organized within the same graph based on unified spatiotemporal anchors and version anchors. This technical solution enables the integrated and unified expression of multi-source shipping knowledge, avoiding semantic fragmentation and conceptual conflicts between multiple knowledge sources. It solves the shortcomings of existing technologies, such as the lack of dedicated business ontology for shipping elements and the inability to unify the organization of static rules and dynamic situations. It significantly improves the ability of vertical large models to understand shipping professional concepts, entity relationships and business contexts, and provides a unified knowledge foundation for rule consistency verification and safety boundary determination.
[0049] 2. This invention employs a three-tiered association mechanism: establishing identity anchoring between static business data and real-time sensor data using ship static identification, performing trajectory continuity verification using kinematic features, and verifying attribute consistency between visual recognition attributes and cargo type in static business data. Based on matching scores, it calculates association confidence, ensuring that heterogeneous data such as AIS, radar, video, electronic charts, and declaration forms can still be accurately associated with the same vessel even in densely packed scenarios within lock waiting areas. This avoids erroneous associations caused by minimum spatial distance matching when multiple targets are adjacent. Furthermore, this invention freezes a consistent situation snapshot at the time of task initiation, performs uniform kinematic extrapolation on ship position situation data, nearest neighbor retrieval on slowly varying water level and flow velocity data, and state preservation on event-driven data such as lock chamber occupancy. Expired situation data is also eliminated using a timeliness formula, ensuring that rule verification and optimization are based solely on situation data that is time-consistent and has undergone confidence screening. Through the above solution, multi-source heterogeneous data has achieved integrated and reliable fusion, which solves the defects of existing technologies, such as the difficulty in correlating static business data with real-time sensor data and the inconsistency between dynamic situation and verification time, leading to decision distortion, and improves the accuracy of perception and decision-making in complex inland waterway scenarios.
[0050] 3. This invention employs a dual-path enhancement approach—graph path retrieval, text semantic retrieval, and real-time situational constraint injection—to create an enhanced context comprised of task objectives, key entities, constraint rules, real-time situational awareness, and historical cases. It requires that generated candidate solutions be associated with at least one graph path and one piece of textual evidence. When evidence is insufficient, it outputs a conservative conclusion requiring manual review, significantly suppressing the illusions inherent in large language models. Building upon this, the invention constructs a trusted reasoning closed loop through task planning agents, knowledge retrieval agents, rule verification agents, optimization and solution agents, and audit agents. This loop performs graph and rule consistency checks on candidate solutions. Solutions violating constraints related to lock chamber size, hazardous materials isolation, priority, construction navigation restrictions, and manual takeover generate structured conflict vectors, which are then injected back into the regenerated prompt template until no conflict is found or manual takeover is triggered. Finally, it outputs a structured decision object carrying an evidence chain, rule chain, risk score, and manual confirmation item. Through this approach, the generated results are elevated from ordinary text-based question answering to executable and traceable scheduling decisions, overcoming the shortcomings of existing technologies that only output textual answers and are insufficient to meet the needs of safety-sensitive shipping operations. Attached Figure Description
[0051] Figure 1 This is a schematic diagram of the method flow in an embodiment of the present invention; Figure 2 This is a schematic diagram of the system structure in an embodiment of the present invention; Figure 3 This is a schematic diagram of the timeliness decay curves of different timeliness types of situation data in a consistent situation snapshot; Figure 4 This is a bar chart comparing the association accuracy of the three-level identity anchor point association method in this approach and the existing minimum time difference spatial distance matching scheme under waiting scenarios with different ship densities. Figure 5 It is a convergence curve of the relative violation rate of candidate solutions after structured conflict vector back-injection as a function of regeneration rounds. Detailed Implementation
[0052] Example 1: like Figure 1 As shown, a method for constructing a multimodal shipping vertical large model based on knowledge graphs and Graph-RAG includes the following steps: Construct a shipping ontology and a shipping knowledge graph, which includes a static knowledge graph and a dynamic situational graph. Acquire multi-source heterogeneous shipping data, perform cleaning, standardization and time alignment on the multi-source heterogeneous shipping data, and link and fuse static business data with real-time sensor data through identity anchors to obtain a unified shipping data base; Multimodal coding and feature fusion are performed on the modal data in the unified shipping data base, and the resulting fused features are written into the dynamic situation map. Construct a large-scale basic model for the shipping vertical category, and train the large-scale basic model for the shipping vertical category using shipping domain corpus; Receive shipping business tasks, perform task identification and task decomposition on the shipping business tasks, and simultaneously perform graph retrieval and vector retrieval, and assemble the obtained graph path evidence and text evidence into enhanced context; The enhanced context input to the shipping vertical base model generates candidate solutions. Based on a consistent situation snapshot aligned with the time of task initiation, the candidate solutions are subjected to consistency verification and optimization of the execution rules to obtain the final decision result and output it.
[0053] Preferably, the shipping ontology is constructed using a combination of top-down and bottom-up approaches. The top-down component defines the conceptual framework based on shipping management systems, navigation regulations, lock scheduling rules, and expert experience. The bottom-up component extracts high-frequency entities, attributes, and relationships from declaration forms, scheduling logs, case documents, and video events and populates the ontology. The shipping ontology includes a set of entities, a set of relationships, a set of attributes, a set of events, and a set of rules, represented by a shipping knowledge graph. ,in, Represents a set of entities. Represents a set of relations. Represents a collection of attributes. Represents a set of events. It represents a set of rules; the shipping knowledge graph is built on a four-layer heterogeneous knowledge organization framework, which includes an entity layer, an attribute layer, an event layer, and a rule layer. The framework introduces spatiotemporal anchors and version anchors to enable unified management of static rules, dynamic situations, and historical cases in the same graph.
[0054] Furthermore, the entities in the entity set include ships, fleets, lock chambers, lock sessions, channel sections, anchorages, berths, ports, navigation marks, dispatchers, regulatory agencies, and emergency resources, while the attributes in the attribute set include ship length, beam, draft, cargo type, dangerous goods class, declaration time, estimated time of arrival, water level, current speed, visibility, lock chamber length, and effective width.
[0055] Furthermore, the events in the event set include declaration, arrival, waiting for gate entry, gate exit, abnormal docking, deviation, speeding, collision risk, construction navigation restrictions, and emergency response. The rules in the rule set include priority rules, isolation rules, scheduling order rules, gate chamber adaptation rules, navigation scale rules, and manual takeover rules.
[0056] Furthermore, the construction of the shipping knowledge graph includes: performing entity identification, relation extraction, and event extraction from regulatory texts, case documents, and scheduling records. Entity identification uses BERT-CRF, GlobalPointer, or cue learning models, relation extraction uses Biaffine, CasRel, or instruction extraction models, and event extraction uses a joint framework of trigger word identification and argument extraction.
[0057] Preferably, the shipping knowledge graph adopts a dual storage architecture of graph database and vector database. The graph database is used to store entities, relationships, rule paths and event chains, while the vector database is used to store embedded vectors of legal provisions, case paragraphs, image descriptions and scheduling semantic fragments. The static knowledge graph stores ontology, regulations, facilities and typical cases, while the dynamic situation graph updates ship positions, queues, lock occupancy, water levels and weather conditions at the second or minute level according to the event flow.
[0058] Furthermore, acquiring multi-source heterogeneous shipping data includes: accessing AIS tracks, radar points, video streams, electronic navigation charts, meteorological and hydrological data, lock operation status, lock chamber resource status, vessel declaration forms, historical records, regulations and procedures, accident cases, and regulatory logs.
[0059] Furthermore, the cleaning, standardization, and time alignment of multi-source heterogeneous shipping data include: performing field mapping, unit unification, outlier removal, missing value repair, and timestamp standardization on structured data in multi-source heterogeneous shipping data; and using Kalman filtering or particle filtering for denoising trajectory data.
[0060] Furthermore, a sliding time window mechanism is adopted for time alignment of multi-source heterogeneous shipping data, and the records of the same vessel in the AIS, video recognition and reporting system are matched according to the minimum time difference and minimum spatial distance.
[0061] Preferably, the association and fusion of static business data and real-time sensor data through identity anchors includes: An identity anchoring is established between static business data and real-time sensor data based on the ship's static identification. Then, kinematic features are used to verify the trajectory continuity of the identity anchoring results. Finally, visual recognition attributes and cargo type in the static business data are used to verify attribute consistency, thus obtaining the association confidence level between the static business data and the real-time sensor data. The association confidence level is calculated as follows: ; in, This indicates the confidence level of the correlation between static business data and real-time sensor data. This indicates the score for matching the ship's static identification markings. This indicates the kinematic trajectory verification score. The attribute consistency check score, the ship static identification matching score, the kinematic trajectory verification score, and the attribute consistency check score all range from 0 to 1. , , Let represent the weighting coefficients of the three scores, and satisfy . , , , .
[0062] Preferably, the three-level association is performed in the order of static identification first and then dynamic identification. When the static identification matching score of the ship is lower than the preset identity threshold, it is determined that the identity does not match and the data item is excluded. When the static identification matching score of the ship is not lower than the preset identity threshold and the kinematic trajectory verification score is lower than the preset trajectory threshold, it is determined that the trajectory is abnormal, the data item is retained and marked as abnormal, and the abnormal data item participates in the subsequent abnormal navigation identification. When the attribute consistency verification score is lower than the preset attribute threshold, it is determined that the declared information is inconsistent with the visual recognition, triggering the review of the declared information. The weighting coefficient satisfies the following conditions: The static identification matching score corresponds to the strong identity anchor and has the highest weight, while the attribute consistency verification score corresponds to the auxiliary verification and has the lowest weight. The preset association threshold is 0.6. Data items with an association confidence level lower than the preset association threshold will not be included in subsequent scheduling decisions.
[0063] Preferably, the static identification matching score of the ship is calculated as follows: ; in, This indicates the number of static identifier fields involved in the matching. This indicates the static identifier field number. Indicates the first Matching weights for static identifier fields. Indicates the first The matching results of the static identifier fields, including ship name, MMSI, length, beam, and draft, are given when the MMSI field is exactly equal. The value is 1 if the length, beam, and draft fields are within the preset tolerance range. Select 1 otherwise select 0; The kinematic trajectory verification score is calculated as follows: ; in, Indicates the number of sampling times. Indicates the sampling time sequence number. Indicates the first The planar distance between the AIS extrapolated position and the visual recognition position of the vessel at each sampling time. This indicates the preset position deviation tolerance. This indicates an indicator function that takes the value 1 if the condition is true and 0 otherwise; the attribute consistency check score is calculated as follows: ; in, Indicates the number of attributes compared. Indicates the comparison attribute number. Indicates the first The comparison attributes include ship category, cargo type, and dangerous goods class. When they match, the comparison is successful. Select 1 if the value is 1, otherwise select 0.
[0064] Furthermore, a quality scoring function is constructed for the data quality of multi-source heterogeneous shipping data, and a unified shipping data foundation includes a standardized text library, real-time event stream, structured business tables, time-series feature tables, and multimodal sample indexes.
[0065] Furthermore, multimodal encoding of the various modal data in the unified shipping data platform includes: text modality is encoded using a shipping-domain-adapted large language model or encoder model to obtain text representation. ,in, The encoded representation of the text modality.
[0066] Furthermore, multimodal coding also includes: visual modality is encoded using a combination of object detection model and visual encoder. The object detection model is YOLO, RT-DETR or MaskR-CNN and is used to identify ship type, heading, berthing status, lane occupancy status and floating object events. The visual encoder is CLIP, SwinTransformer or ViT.
[0067] Furthermore, multimodal coding also includes: for AIS trajectory, water level changes, flow velocity changes and gate operation status, the temporal mode is modeled using Informer, TemporalFusionTransformer, LSTM or spatiotemporal graph neural network to obtain temporal representation.
[0068] Furthermore, multimodal coding also includes: structured business data being encoded into a structured representation through a multilayer perceptron or feature cross-network, and mechanistic constraints being mapped into constraint vectors through a rule encoder.
[0069] Preferably, writing the obtained fused features into the dynamic situation map includes: using a gated attention mechanism to fuse the outputs of each modality, and writing the outputs of each modality into state objects, event objects, and risk objects before writing them into the dynamic situation map and binding them with the task context; the map retrieval includes rule path retrieval, case path retrieval, and causal path retrieval, and the vector retrieval includes the recall of legal text fragments, case summaries, scheduling log fragments, and image description fragments.
[0070] Furthermore, the training of the shipping vertical base model using shipping domain corpus includes four stages: domain-based pre-training, supervised fine-tuning, preference optimization, and safety alignment. The base model is a Transformer model that supports long context and tool invocation capabilities.
[0071] Furthermore, the domain continues to pre-train using shipping regulations, cases, dispatch logs, declaration documents, and operation and maintenance manual corpora. It learns shipping terminology and business expressions through autoregressive loss and monitors fine-tuning using task instruction samples, which include regulatory interpretations, document pre-review, gate passage suggestions, anomaly analysis, emergency response, and evidence attribution.
[0072] Furthermore, graph constraint loss and rule constraint loss are added during the training process to enable the large-scale model of shipping vertical base to have graph consistency and rule consistency.
[0073] Furthermore, the preference optimization phase employs DPO, RLHF, or rule-based reward optimization.
[0074] Furthermore, the task identification and decomposition for shipping business tasks includes parsing the input into task type, target object, time range, spatial range, rule constraints, and output format.
[0075] Preferably, when assembling the obtained graph path evidence and text evidence into an enhanced context, priority is given to retaining the path chains that are strongly related to the current task, forming a context sequence consisting of task objectives, key entities, constraint rules, real-time situation and historical cases. Then, the evidence is converted into a prompt template, requiring the shipping vertical base model to output conclusions, basis, risks, suggestions and manual confirmation items. For important nodes in the enhanced context, a subgraph compression strategy is adopted to reduce the context length through maximum edge coverage, path redundancy removal and summary rewriting, while retaining the original evidence index for auditing purposes; When enhancing the context input to the shipping vertical base model to generate candidate solutions, the generated candidate solutions are required to be associated with at least one graph path and one textual evidence. When the evidence is insufficient, a conservative conclusion that the evidence is insufficient and needs to be manually reviewed is output.
[0076] Preferably, the consistent situation snapshot is generated in the following manner: At the moment the task is initiated, the situational data of the dynamic situation map is frozen. All situational data within the snapshot are uniformly aligned to the moment of task initiation. Each situational data item carries a collection timestamp and a time-effect decay coefficient for its type. The timeliness of each situational data item is calculated and judged according to a preset timeliness threshold. Data with a timeliness lower than the preset threshold is not included in the snapshot and triggers re-collection. Rule consistency verification and optimization only read the snapshot. The timeliness calculation is as follows: ; in, Indicates the first The timeliness of situational data Indicates the first The time-decrease coefficient of the type of situational data. Indicates the time of task initiation and the number of... The time difference between the acquisition time of the situation data and the value of the time-effect decay coefficient are determined by the type of situation data. The time-effect decay coefficient of ship position data is greater than that of water level data.
[0077] Preferably, aligning all situational data within the snapshot to the mission initiation time includes: applying uniform kinematic extrapolation to ship position situational data, and aligning it according to the... The velocity component of the situational data is extrapolated to the time of task initiation to obtain the alignment position; for slow-changing situational data such as water level, flow velocity, and visibility, the nearest neighbor value is used, and the sampled value closest to the time of task initiation is taken as the alignment value; for event-driven situational data such as gate occupancy and queues, state preservation is adopted, and the state after the most recent event update is used at the time of task initiation.
[0078] Preferably, the first The time-decrease coefficient of the situation data is calculated according to It is confirmed that, among them, Indicates the first The nominal update cycle for the type of situation data is specified. The nominal update cycle for ship position situation data is in seconds, and the nominal update cycle for water level situation data is in minutes. The preset timeliness threshold is set to 0.5.
[0079] Preferably, the process of performing rule consistency verification and optimization on candidate solutions includes: performing inference through task planning agent, knowledge retrieval agent, rule verification agent, optimization solution agent and audit agent. The inference chain is semantic understanding, evidence alignment, candidate solution generation, graph consistency check, rule consistency check, risk assessment, optimization rearrangement and result output.
[0080] Preferably, the rule consistency verification includes: the rule verification agent checks whether the candidate scheme violates the constraints of lock chamber size, hazardous materials isolation, priority, construction navigation restrictions and manual takeover. If a conflict is found, a structured conflict vector is output. The structured conflict vector includes the rule identifier, violation direction, involved entities and violation amount. The structured conflict vector is serialized into constraint text and injected back into the regenerated prompt template to trigger regeneration. The regenerated candidate scheme is verified again until there is no conflict or manual takeover is triggered.
[0081] Preferably, the method for determining the amount of violation is as follows: For violations of constraints detected by the rule verification agent, if the violation constraint is an upper bound constraint and the actual value of the candidate solution under the violation constraint is greater than the limit value of the violation constraint, then... Calculate the violation amount; when the violation constraint is a lower bound constraint and the actual value of the candidate solution under the violation constraint is less than the limit value of the violation constraint, proceed according to... Calculate the amount of violation; where, Indicates a violation of quantity, This represents the actual value of the candidate solution under the violated constraint. This represents the constraint value that violates the constraint, where the constraint value is a positive number; and according to... Calculate the relative violation rate, where, The structured conflict vector further includes the relative violation rate, representing the relative violation rate.
[0082] Furthermore, the optimization solution selects mixed-integer linear programming, constraint programming, genetic algorithm, tabu search, or bundle search rearrangement based on the scenario scale. For real-time scenarios, a two-stage method of rule filtering, heuristic generation, and local search correction is adopted.
[0083] Preferably, the optimized solution outputs a structured decision object, which includes gate allocation, candidate order, expected waiting time, risk level, conflict description, and alternative solutions.
[0084] Preferably, the method further includes: recording task input, evidence recall results, graph paths, rule hit results, candidate answers, manually revised content, and final execution results to form a feedback sample library, which is used to support online learning, feedback optimization, and security auditing.
[0085] Preferably, the method further includes: constructing error attribution labels for online errors, including retrieval missing, outdated graph, rule conflict, visual misidentification, temporal prediction bias, and large model illusion, and performing targeted optimization of the graph, retrieval machine, and generative model based on the error attribution labels.
[0086] Furthermore, the online learning adopts a two-layer update mechanism. The first layer is the incremental update of the knowledge layer, which incrementally writes the graph and builds the vector library for new regulations, new cases, new equipment status and new business rules. The second layer is the periodic update of the model layer, which performs efficient fine-tuning of parameters based on manually revised samples. The efficient fine-tuning of parameters uses LoRA, QLoRA or Adapter training.
[0087] Furthermore, security audits preserve evidence chains, rule chains, and model version numbers according to task numbers to support result retrospective analysis, liability determination, and evidence review.
[0088] like Figure 2 As shown, a multimodal shipping vertical category large model system based on knowledge graph and Graph-RAG is presented. The system includes a data access layer, a data governance layer, a knowledge graph layer, a vector retrieval layer, a multimodal perception layer, a base large model layer, a Graph-RAG enhancement layer, a rule verification layer, an optimization solution layer, a business interface layer, and a security audit layer. The data access layer is used to connect AIS, radar, video, electronic aeronautical charts, meteorological and hydrological data, lock control systems, and business databases, and output multi-source heterogeneous shipping data. The data governance layer receives multi-source heterogeneous shipping data output from the data access layer and performs cleaning, standardization and time alignment, and associates and fuses static business data with real-time sensor data through identity anchors; The knowledge graph layer receives standardized data output from the data governance layer, stores ontology, rules and event chains, and maintains a dynamic situational graph. The vector retrieval layer receives standardized data output from the data governance layer and stores the embedded vectors of legal provisions, case paragraphs, image descriptions, and scheduling semantic fragments; The multimodal perception layer receives standardized data output from the data governance layer, completes the encoding of text, visual, temporal, and structured data, and writes the encoding results back to the knowledge graph layer; The base large model layer generates candidate schemes based on the augmentation context output of the Graph-RAG augmentation layer; The Graph-RAG enhancement layer receives user tasks and completes evidence retrieval and context assembly; The rule verification layer receives candidate solutions output by the base model layer and performs security boundary and business rule verification based on a consistent situation snapshot aligned with the task initiation time. The optimization solution layer receives the verification results output by the rule verification layer and generates the final executable solution; The business interface layer receives the final executable solution output by the optimization and solution layer and uses it to interface with scheduling, monitoring, command and control and mobile systems; The security audit layer records data throughout the entire process.
[0089] Furthermore, the Graph-RAG enhancement layer includes a task identification unit, a graph retrieval unit, a vector retrieval unit, a context assembly unit, and a subgraph compression unit. The task identification unit is used to perform task identification and task decomposition. The graph retrieval unit is used to perform rule path retrieval, case path retrieval, and causal path retrieval. The vector retrieval unit is used to retrieve legal clause fragments, case summaries, scheduling log fragments, and image description fragments. The context assembly unit is used to assemble the retrieval results into an enhanced context. The subgraph compression unit is used to perform subgraph compression on important nodes.
[0090] Furthermore, a unified vessel identifier is generated for each ship. The vessel, lock chamber, channel section, dangerous goods class, priority rules, construction restrictions, and historical lock passage cases are written into the knowledge graph layer. The multimodal perception layer is used to determine the berthing and channel occupancy status of the vessel and predict the arrival time and waiting time for the next hour. The base large model layer generates candidate ranking schemes. The Graph-RAG enhancement layer retrieves relevant graph paths, regulatory clauses, dangerous goods isolation requirements, and historical successful cases. The rule verification layer checks whether the candidate ranking schemes violate lock chamber size, dangerous goods isolation, priority, construction navigation restrictions, and manual takeover constraints based on a consistent situation snapshot aligned with the task initiation time. The optimization solution layer solves the problem with the objectives of minimum waiting time, minimum risk, and maximum utilization rate, and outputs the final ranking, estimated lock passage time, and alternative schemes.
[0091] Furthermore, the system is also used for monitoring abnormal navigation in key waterways. It identifies abnormal docking, reverse navigation, deviation, and speeding behaviors through video and AIS, generates risk management suggestions by combining water level, construction area, and historical accident cases, and outputs the linkage objects, management level, and escalation trigger conditions through the rule verification layer.
[0092] Preferably, a computer device includes a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform a method for constructing a multimodal shipping vertical large model based on knowledge graphs and Graph-RAG.
[0093] Preferably, a computer-readable storage medium stores computer instructions for instructing a computer to execute a method for constructing a multimodal shipping vertical large model based on knowledge graphs and Graph-RAG.
[0094] Example 2: This embodiment uses the No. 1 lock chamber of a large inland waterway lock hub as the application scenario for lock passage auxiliary decision-making. The lock chamber has an effective length of 220m, an effective width of 30m, and a minimum navigable water depth of 4.5m. The simulation covers a complete lock passage wave with a duration of 7200 seconds, simulating 18 vessels waiting to pass through the lock and 3 rounds of rolling scheduling. The experimental platform is a single workstation with a Windows 10 operating system, MATLAB R2022b simulation environment, Intel i7 processor, and 32GB of memory. The mixed integer linear programming solver used is Gurobi, with a maximum solution time of 30 seconds per iteration.
[0095] The parameter settings are as follows: the association confidence weighting coefficient is taken as... , , ,satisfy Furthermore, the sum is 1. The previous use of 0.3 and 0.3 in the S1 scenario was a typo; 0.3 and 0.2 are now used. The preset identity threshold is 0.7, the preset trajectory threshold is 0.6, the preset attribute threshold is 0.6, and the preset association threshold is 0.6. The nominal update cycle for ship position situational data is 20 seconds, with a timeliness decay coefficient. The nominal update cycle for water level data is 300 seconds, with a time decay coefficient. The preset time threshold is 0.5; the decision target weights are minimum waiting time 0.4, minimum risk 0.4, and maximum utilization rate 0.2.
[0096] Two existing methods were used for comparison. Method A is the minimum time difference and minimum spatial distance matching method, which only performs nearest neighbor matching between AIS and video based on time difference and spatial distance, without using identity anchoring and attribute verification. The rest of the data access, cleaning, and scheduling optimization are the same as this method. Method B is the direct reading method of inconsistent situation snapshots. The rule verification and optimization solution directly read the current state of the dynamic situation map, without performing task-based time alignment and timeliness filtering on the situation data. The rest of the steps are the same as this method.
[0097] The complete process of the embodiment is as follows: The multi-source data of 18 ships is first cleaned, standardized and time-aligned. This method performs three-level identity anchor association for each ship to obtain the association confidence. Data items below a preset correlation threshold of 0.6 are intercepted and not included in the scheduling decision; subsequently, a consistency snapshot is frozen at the time of task initiation, and data is processed according to the timeliness of each status data. Data below a preset timeliness threshold of 0.5 is removed and re-collection is triggered. The shipping vertical-based base model generates candidate solutions based on graph path evidence and textual evidence. A rule-checking agent performs constraint checks on the candidate solutions and generates structured conflict vectors for non-compliant solutions, re-generating them until no conflict exists or manual intervention is triggered. The optimization solution layer solves the problem with a weighted objective of minimum waiting time, minimum risk, and maximum utilization, outputting suggested gate passage order, matching gate times, risk level, and evidence chain. The comparison methods operate under the same constraints, parameters, and data, handling differences only in their respective ways. The comparison results are shown in Tables 1 and 2 below.
[0098] Table 1: The operational data of this method itself, with 10 representative ships selected from 18 ships waiting to enter the lock;
[0099] Table 2: Comparison of the effectiveness of this method with two comparative methods under the same operating conditions;
[0100] The data in Tables 1 and 2 show that our proposed method outperforms the two existing methods in terms of association accuracy, scheduling timeliness, and decision compliance. This advantage stems from the method's three key technical mechanisms rather than differences in the operating environment. In terms of data association, our method maintains an association accuracy of 0.93 in densely moored scenarios through a three-level association process: anchoring the ship's static identification, verifying the continuity of its kinematic trajectory, and verifying the consistency of its visual attributes. This is a 0.15 improvement over the 0.78 of comparative method A, and a 0.045 improvement in moderate scenarios. Table 1 shows that our method proactively intercepts ship number 6, which has an association confidence of 0.55, preventing erroneous association data from entering the scheduling decision. It also triggers re-collection for ship number 7, which has a timeliness of 0.41, instead of using outdated data. This dual filtering on the data source side is something neither of the two comparative methods achieved.
[0101] In terms of scheduling efficiency, thanks to the improved quality of input data after removing erroneous associations and outdated states, this method achieves an average expected waiting time of 1.84 hours, which is 0.51 hours shorter than the 2.35 hours of comparison method A and 0.17 hours shorter than the 2.01 hours of comparison method B. The maximum waiting time is also reduced by 1.2 hours and 0.6 hours respectively, and the gate utilization rate reaches 0.86, the highest among the three. Comparison method B, due to directly reading the current state of the dynamic map, mixes in outdated low-update-frequency data. Although the association accuracy is not affected, the waiting time and utilization rate are still inferior to this method, verifying the independent contribution of consistent state snapshots to scheduling quality.
[0102] At the decision-making compliance level, this method outputs structured conflict vectors through rule verification agents and regenerates them, converging the initial relative violation rate of 0.62 to conflict-free status within 6 rounds, achieving 0 violations in hazardous materials isolation, and a 0.95% executable decision ratio. In contrast, methods A and B, due to their conflict-free vector re-injection mechanism, fail to converge because their relative violation rates cannot decrease in a targeted manner, resulting in executable decision ratios of only 0.60 and 0.72%, respectively, and 3 and 1 violations in hazardous materials isolation, respectively. These results demonstrate that this method, by connecting identity anchor point trustworthy fusion, consistency status snapshot, and structured conflict vector re-injection into a closed loop, transforms the output of the generative large model from unusable text answers into executable scheduling schemes that have undergone data trustworthy filtering, temporal consistency assurance, and rule compliance verification. This achieves end-to-end trustworthy decision-making capabilities that existing knowledge graph question-answering and scheduling optimization schemes individually lack, making it suitable for safety-sensitive inland waterway lock-passing and critical waterway risk management scenarios.
[0103] Most existing knowledge graph question-answering and scheduling schemes treat real-time situational data as static facts and directly participate in reasoning, failing to differentiate between the timeliness differences of data from different sensors. This leads to data with vastly different update cycles, such as ship positions, water levels, and lock chamber occupancy, being used interchangeably during verification, easily resulting in erroneous scheduling judgments based on outdated, low-update-frequency data. This method freezes a consistent situational snapshot at task initiation and assigns a timeliness decay coefficient to each type of situational data. Rapidly changing data like ship positions expires quickly at a decay coefficient of 0.05 per second, while slowly changing data like water levels decays slowly at a decay coefficient of approximately 0.0033 per second. A preset timeliness threshold of 0.5 is then used to uniformly determine the expiration boundary. Figure 3 It is evident that ship position data completes a cycle of decay and surpasses the timeliness threshold in approximately 14 seconds, while water level data takes approximately 207 seconds. The timeliness processing of the two types of data is clearly stratified, expired data is identified and triggers re-collection, and rule verification and optimization solutions are based solely on situational data that is time-consistent and meets the freshness standard. This eliminates the distortion of cross-time mixed evidence from the perspective of consistency of decision data, which is something that existing general solutions that directly read the current state of the map do not possess.
[0104] The lock waiting area presents a unique scenario characterized by densely packed vessels, near-zero speeds, and extremely small distances. Existing minimum time difference and minimum spatial distance matching methods rely on the assumption of separable kinematic differences between targets. This assumption fails in the waiting area. While the accuracy rate can reach approximately 98.5% in sparse scenarios, it drops significantly to approximately 78% when vessel density increases to dense scenarios, with numerous erroneous associations caused by the close proximity of multiple targets. This method employs a three-tiered association system: establishing identity anchoring based on static vessel identifiers, performing trajectory continuity verification using kinematic features, and verifying attribute consistency using visual recognition attributes and cargo type. Identity information is embedded as a strong anchor point in the association process, ensuring that the association does not depend on the single path of target distance. Figure 4 As can be seen, the accuracy of this method remains at approximately 99%, 95.5%, and 93% in sparse, medium, and dense scenarios, respectively. In dense scenarios, it improves accuracy by approximately 15 percentage points compared to minimum time difference spatial distance matching. Furthermore, low-confidence data items are intercepted by a preset association threshold of 0.6 and do not enter subsequent scheduling decisions, thus ensuring the reliability of the ship identity correspondence on which the scheduling scheme relies from the data source side.
[0105] Existing large-scale model scheduling schemes only perform overall rejection or rely on training-phase avoidance when candidate schemes violate constraints such as lock chamber size, hazardous materials isolation, priority, construction navigation restrictions, and manual takeover. They lack a mechanism to feed back specific violation information to the generation stage. The regeneration process, lacking knowledge of the violations, repeatedly generates similar violating schemes, making directional convergence difficult. This method uses a rule verification agent to check each constraint of candidate schemes. For detected conflicts, the output includes the rule identifier, violation direction, involved entities, and violation amount. The structured conflict vector is calculated, and the relative violation rate is calculated. The conflict vector is serialized into constraint text and injected back into the regenerated prompt template. For example... Figure 5 As shown, the relative violation rate of the initial candidate solutions was 0.62, which dropped to 0.33 after one round of regeneration, and then decreased to 0 in each subsequent round, converging into a conflict-free solution within 6 rounds. The entire closed loop allows for traceability of the basis for each adjustment under the audit agent's record. This convergence characteristic transforms the generated results from unusable textual answers into compliant scheduling solutions that can be directly implemented, meeting the implementation requirements of safety-sensitive shipping operations.
Claims
1. A method for constructing a multimodal shipping vertical large model based on knowledge graphs and Graph-RAG, characterized in that, Includes the following steps: Construct a shipping ontology and a shipping knowledge graph, which includes a static knowledge graph and a dynamic situational graph. Acquire multi-source heterogeneous shipping data, perform cleaning, standardization and time alignment on the multi-source heterogeneous shipping data, and link and fuse static business data with real-time sensor data through identity anchors to obtain a unified shipping data base; Multimodal coding and feature fusion are performed on the modal data in the unified shipping data base, and the resulting fused features are written into the dynamic situation map. Construct a large-scale basic model for the shipping vertical category, and train the large-scale basic model for the shipping vertical category using shipping domain corpus; Receive shipping business tasks, perform task identification and task decomposition on the shipping business tasks, and simultaneously perform graph retrieval and vector retrieval, and assemble the obtained graph path evidence and text evidence into enhanced context; The enhanced context input to the shipping vertical base model generates candidate solutions. Based on a consistent situation snapshot aligned with the time of task initiation, the candidate solutions are subjected to consistency verification and optimization of the execution rules to obtain the final decision result and output it.
2. The method for constructing a multimodal shipping vertical large model based on knowledge graph and Graph-RAG according to claim 1, characterized in that, The shipping ontology is constructed using a combination of top-down and bottom-up approaches. The top-down component defines the conceptual framework based on shipping management systems, navigation regulations, lock scheduling rules, and expert experience. The bottom-up component extracts high-frequency entities, attributes, and relationships from declaration forms, scheduling logs, case documents, and video events and populates the ontology. The shipping ontology includes sets of entities, relationships, attributes, events, and rules, and is represented by a shipping knowledge graph. ,in, Represents a set of entities. Represents a set of relations. Represents a collection of attributes. Represents a set of events. It represents a set of rules; the shipping knowledge graph is built on a four-layer heterogeneous knowledge organization framework, which includes an entity layer, an attribute layer, an event layer, and a rule layer. The framework introduces spatiotemporal anchors and version anchors to enable unified management of static rules, dynamic situations, and historical cases in the same graph.
3. The method for constructing a multimodal shipping vertical large model based on knowledge graph and Graph-RAG according to claim 1, characterized in that, The shipping knowledge graph adopts a dual storage architecture of graph database and vector database. The graph database is used to store entities, relationships, rule paths and event chains, while the vector database is used to store embedded vectors of legal provisions, case paragraphs, image descriptions and scheduling semantic fragments. The static knowledge graph stores ontology, regulations, facilities and typical cases, while the dynamic situation graph updates ship positions, queues, lock occupancy, water levels and weather conditions at the second or minute level according to the event flow.
4. The method for constructing a multimodal shipping vertical large model based on knowledge graph and Graph-RAG according to claim 1, characterized in that, Linking and fusing static business data with real-time sensor data through identity anchors includes: An identity anchoring is established between static business data and real-time sensor data based on the ship's static identification. Then, kinematic features are used to verify the trajectory continuity of the identity anchoring results. Finally, visual recognition attributes and cargo type in the static business data are used to verify attribute consistency, thus obtaining the association confidence level between the static business data and the real-time sensor data. The association confidence level is calculated as follows: ; in, This indicates the confidence level of the correlation between static business data and real-time sensor data. This indicates the score for matching the ship's static identification markings. This indicates the kinematic trajectory verification score. The attribute consistency check score, the ship static identification matching score, the kinematic trajectory verification score, and the attribute consistency check score all range from 0 to 1. , , Let represent the weighting coefficients of the three scores, and satisfy . , , , .
5. The method for constructing a multimodal shipping vertical large model based on knowledge graph and Graph-RAG according to claim 4, characterized in that, The three-level association is executed in the order of static identification first, then dynamic identification. When the static identification matching score of a vessel is lower than the preset identity threshold, it is determined to be an identity mismatch and the data item is excluded. When the static identification matching score of a vessel is not lower than the preset identity threshold but the kinematic trajectory verification score is lower than the preset trajectory threshold, it is determined to be a trajectory anomaly, the data item is retained and marked as an anomaly, and the anomaly data item participates in subsequent abnormal navigation identification. When the attribute consistency verification score is lower than the preset attribute threshold, it is determined to be inconsistent between the declared information and visual recognition, triggering a review of the declared information. The weighting coefficients satisfy the following conditions: The ship static identification matching score corresponds to the strong identity anchor and has the highest weight, while the attribute consistency verification score corresponds to the auxiliary verification and has the lowest weight. Data items with an association confidence level lower than the preset association threshold are not included in subsequent scheduling decisions.
6. The method for constructing a multimodal shipping vertical large model based on knowledge graph and Graph-RAG according to claim 4, characterized in that, The matching score for the ship's static identification is calculated as follows: ; in, This indicates the number of static identifier fields involved in the matching. This indicates the static identifier field number. Indicates the first Matching weights for static identifier fields. Indicates the first The matching results of the static identifier fields, including ship name, MMSI, length, beam, and draft, are given when the MMSI field is exactly equal. The value is 1 if the length, beam, and draft fields are within the preset tolerance range. Select 1 otherwise select 0; The kinematic trajectory verification score is calculated as follows: ; in, Indicates the number of sampling times. Indicates the sampling time sequence number. Indicates the first The planar distance between the AIS extrapolated position and the visual recognition position of the vessel at each sampling time. This indicates the preset position deviation tolerance. This indicates an indicator function that takes the value 1 if the condition is true and 0 otherwise; the attribute consistency check score is calculated as follows: ; in, Indicates the number of attributes compared. Indicates the comparison attribute number. Indicates the first The comparison attributes include ship category, cargo type, and dangerous goods class. When they match, the comparison is considered complete. Select 1 if the value is 1, otherwise select 0.
7. The method for constructing a multimodal shipping vertical large model based on knowledge graph and Graph-RAG according to claim 1, characterized in that, The process of writing the obtained fusion features into the dynamic situation map includes: using a gated attention mechanism to fuse the outputs of each modality; the outputs of each modality are uniformly converted into state objects, event objects, and risk objects and then written into the dynamic situation map, and bound to the task context; the map retrieval includes rule path retrieval, case path retrieval, and causal path retrieval; and the vector retrieval includes the recall of legal text fragments, case summaries, scheduling log fragments, and image description fragments.
8. The method for constructing a multimodal shipping vertical large model based on knowledge graph and Graph-RAG according to claim 1, characterized in that, When assembling the obtained graph path evidence and text evidence into an enhanced context, priority is given to retaining the path chains that are strongly related to the current task, forming a context sequence consisting of task objectives, key entities, constraint rules, real-time situation and historical cases. Then, the evidence is converted into a prompt template, requiring the shipping vertical base model to output conclusions, basis, risks, suggestions and manual confirmation items. For important nodes in the enhanced context, a subgraph compression strategy is adopted to reduce the context length through maximum edge coverage, path redundancy removal and summary rewriting, while retaining the original evidence index for auditing purposes; When enhancing the context input to the shipping vertical base model to generate candidate solutions, the generated candidate solutions are required to be associated with at least one graph path and one textual evidence. When the evidence is insufficient, a conservative conclusion that the evidence is insufficient and needs to be manually reviewed is output.
9. The method for constructing a multimodal shipping vertical large model based on knowledge graph and Graph-RAG according to claim 1, characterized in that, Consistent situation snapshots are generated as follows: At the moment the task is initiated, the situational data of the dynamic situation map is frozen. All situational data within the snapshot are uniformly aligned to the moment of task initiation. Each situational data item carries a collection timestamp and a time-effect decay coefficient for its type. The timeliness of each situational data item is calculated and judged according to a preset timeliness threshold. Data with a timeliness lower than the preset threshold is not included in the snapshot and triggers re-collection. Rule consistency verification and optimization only read the snapshot. The timeliness calculation is as follows: ; in, Indicates the first The timeliness of situational data Indicates the first The time-decrease coefficient of the type of situational data. Indicates the time of task initiation and the number of... The time difference between the acquisition time of the situation data and the value of the time-effect decay coefficient are determined by the type of situation data. The time-effect decay coefficient of ship position data is greater than that of water level data.
10. The method for constructing a multimodal shipping vertical large model based on knowledge graph and Graph-RAG according to claim 9, characterized in that, All situational data within the snapshot are uniformly aligned to the mission initiation time, including: uniform kinematic extrapolation of ship position situational data, according to the... The velocity component of the situational data is extrapolated to the time of task initiation to obtain the alignment position; for slow-changing situational data such as water level, flow velocity, and visibility, the nearest neighbor value is used, and the sampled value closest to the time of task initiation is taken as the alignment value; for event-driven situational data such as gate occupancy and queues, state preservation is adopted, and the state after the most recent event update is used at the time of task initiation.
11. The method for constructing a multimodal shipping vertical large model based on knowledge graph and Graph-RAG according to claim 9, characterized in that, No. The time-decrease coefficient of the situation data is calculated according to It is confirmed that, among them, Indicates the first The nominal update period for the type of situation data is as follows: the nominal update period for ship position situation data is in seconds, and the nominal update period for water level situation data is in minutes.
12. The method for constructing a multimodal shipping vertical large model based on knowledge graph and Graph-RAG according to claim 1, characterized in that, The process of performing rule consistency verification and optimization on candidate solutions includes: performing inference through task planning agent, knowledge retrieval agent, rule verification agent, optimization solution agent and audit agent. The inference chain is semantic understanding, evidence alignment, candidate solution generation, graph consistency check, rule consistency check, risk assessment, optimization rearrangement and result output.
13. The method for constructing a multimodal shipping vertical large model based on knowledge graph and Graph-RAG according to claim 12, characterized in that, The rule consistency check includes: the rule check agent checks whether the candidate scheme violates the constraints of lock chamber size, hazardous materials isolation, priority, construction navigation restrictions and manual takeover. If a conflict is found, a structured conflict vector is output. The structured conflict vector includes the rule identifier, violation direction, involved entities and violation amount. The structured conflict vector is serialized into constraint text and injected back into the regenerated prompt template to trigger regeneration. The regenerated candidate scheme is checked again until there is no conflict or manual takeover is triggered.
14. The method for constructing a multimodal shipping vertical large model based on knowledge graph and Graph-RAG according to claim 13, characterized in that, The method for determining the amount of violation is as follows: For violations of constraints detected by the rule verification agent, if the violation constraint is an upper bound constraint and the actual value of the candidate solution under the violation constraint is greater than the limit value of the violation constraint, then... Calculate the violation amount; when the violation constraint is a lower bound constraint and the actual value of the candidate solution under the violation constraint is less than the limit value of the violation constraint, proceed according to... Calculate the amount of violation; where, Indicates a violation of quantity, This represents the actual value of the candidate solution under the violated constraint. This represents the constraint value that violates the constraint, where the constraint value is a positive number; and according to... Calculate the relative violation rate, where, The structured conflict vector further includes the relative violation rate, representing the relative violation rate.
15. The method for constructing a multimodal shipping vertical large model based on knowledge graph and Graph-RAG according to claim 1, characterized in that, The optimized solution outputs a structured decision object, which includes gate allocation, candidate order, expected waiting time, risk level, conflict description, and alternative solutions.
16. The method for constructing a multimodal shipping vertical large model based on knowledge graph and Graph-RAG according to claim 1, characterized in that, The method also includes recording task input, evidence retrieval results, graph paths, rule hit results, candidate answers, manually revised content, and final execution results to form a feedback sample library, which is used to support online learning, feedback optimization, and security auditing.
17. The method for constructing a multimodal shipping vertical large model based on knowledge graph and Graph-RAG according to claim 16, characterized in that, The method also includes: constructing error attribution labels for online errors, including retrieval missing, outdated graph, rule conflict, visual misidentification, temporal prediction bias, and large model illusion, and performing targeted optimization of the graph, retrieval machine, and generative model based on the error attribution labels.
18. A multimodal shipping vertical large-scale model system based on knowledge graphs and Graph-RAG, characterized in that, The system comprises a data access layer, a data governance layer, a knowledge graph layer, a vector retrieval layer, a multimodal perception layer, a base large model layer, a Graph-RAG enhancement layer, a rule verification layer, an optimization solution layer, a business interface layer, and a security audit layer. The data access layer connects AIS, radar, video, electronic aeronautical charts, meteorological and hydrological data, lock control systems, and business databases, and outputs multi-source heterogeneous shipping data. The data governance layer receives multi-source heterogeneous shipping data output from the data access layer and performs cleaning, standardization and time alignment, and associates and fuses static business data with real-time sensor data through identity anchors; The knowledge graph layer receives standardized data output from the data governance layer, stores ontology, rules and event chains, and maintains a dynamic situational graph. The vector retrieval layer receives standardized data output from the data governance layer and stores the embedded vectors of legal provisions, case paragraphs, image descriptions, and scheduling semantic fragments; The multimodal perception layer receives standardized data output from the data governance layer, completes the encoding of text, visual, temporal, and structured data, and writes the encoding results back to the knowledge graph layer; The base large model layer generates candidate schemes based on the augmentation context output of the Graph-RAG augmentation layer; The Graph-RAG enhancement layer receives user tasks and completes evidence retrieval and context assembly; The rule verification layer receives candidate solutions output by the base model layer and performs security boundary and business rule verification based on a consistent situation snapshot aligned with the task initiation time. The optimization solution layer receives the verification results output by the rule verification layer and generates the final executable solution; The business interface layer receives the final executable solution output by the optimization and solution layer and uses it to interface with scheduling, monitoring, command and control and mobile systems; The security audit layer records data throughout the entire process.
19. A computer device, characterized in that, It includes a memory and a processor, which are interconnected and communicate with each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the method for constructing a multimodal shipping vertical large model based on knowledge graph and Graph-RAG as described in any one of claims 1-17.
20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the method for constructing a multimodal shipping vertical large model based on knowledge graphs and Graph-RAG as described in any one of claims 1-17.
Citation Information
Patent Citations
Ship identification method based on AIS and video data fusion
CN109460740B
Ship intention recognition and reasoning method and system based on knowledge graph
CN114443860A
Intelligent question answering method, system and equipment based on GraphRAG and medium
CN119988572A
