Ship destination identification method and device, electronic equipment and readable storage medium
By filtering target vessels from AIS data, constructing a port semantic library, and using a large language model for deep semantic matching, the bottleneck problem of data quality in the vessel destination field of AIS was solved, achieving efficient and accurate port data identification and consistency conversion.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YIHAILAN (BEIJING) DATA TECH CO LTD
- Filing Date
- 2026-03-06
- Publication Date
- 2026-06-05
AI Technical Summary
In existing technologies, the ship destination field in Automatic Identification Systems (AIS) suffers from data quality bottlenecks due to diverse field sources, inconsistent data entry methods, and significant language differences, affecting the consistency of data in port arrival statistics, maritime traffic forecasting, and logistics supply chains.
By screening target sample vessels from the Automatic Identification System (AIS) data, extracting voyage data, cleaning and standardizing it, constructing a port semantic library, and using a large language model for deep semantic matching and reasoning, standard port information is identified. Combined with clustering algorithms and the large language model, candidate clusters are generated, achieving end-to-end intelligent conversion.
It has achieved the transformation from chaotic and ambiguous raw fields to accurate, standardized, and computable port data, improving the accuracy and consistency of destination data identification and supporting high-precision traffic forecasting and port management.
Smart Images

Figure CN122154688A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information data processing technology, and more specifically, to a method, apparatus, electronic device, and readable storage medium for identifying ship destinations. Background Technology
[0002] With the acceleration of digitalization in the global shipping industry, massive amounts of dynamic ship data based on the Automatic Identification System (AIS) have become an important data foundation for port operations, route optimization, traffic safety supervision, and global trade flow analysis.
[0003] With the rapid increase in the number of ships worldwide and the increasing complexity of shipping routes, the ship destination field in AIS information has gradually become a bottleneck for data quality. Due to diverse field sources, inconsistent entry methods, significant language differences (spelling errors, non-standard abbreviations), and inconsistent self-entry behavior by crew members, AIS destination data contains a large number of ambiguous, erroneous, or unresolvable records. Maritime management cannot effectively parse and process the prevalent multilingualism, spelling variations, non-standard abbreviations, and semantic ambiguity, making it difficult to accurately identify and normalize different expressions for the same port. This affects the data consistency of port arrival statistics, maritime traffic forecasting, berth resource management, and the logistics supply chain. Summary of the Invention
[0004] The purpose of this invention is to provide a method, apparatus, electronic device, and readable storage medium for identifying ship destinations, which can solve the problems of difficulty in accurately identifying and normalizing different expressions of the same port and insufficient consistency of destination data.
[0005] In view of this, an embodiment of the first aspect of the present invention provides a method for identifying a ship's destination.
[0006] A second aspect of the present invention provides a ship destination identification device.
[0007] An embodiment of the third aspect of the present invention provides an electronic device.
[0008] An embodiment of the fourth aspect of the present invention provides a readable storage medium.
[0009] To achieve the above objectives, an embodiment of the first aspect of the present invention provides a method for identifying a ship's destination, comprising: selecting at least one target sample ship from data of an Automatic Identification System (AIS); extracting voyage data of each target sample ship within a preset historical time period; extracting and associating the destination field text reported by the target sample ship from the voyage data to determine a historical destination information set; cleaning and standardizing the destination field text in the historical destination information set to obtain structured standard destination text data; converting the standard destination text data into high-dimensional semantic vectors, and clustering the semantic vectors using a clustering algorithm to determine a port semantic library representing different standard ports; obtaining a large language model; inputting the destination field text data of the ship to be identified into the large language model; and identifying the corresponding standard port information from the port semantic library based on the destination field text data using the large language model; wherein the standard port information includes the destination name, the standard name of the destination port, the port unique identifier, and a prediction confidence parameter.
[0010] This invention discloses a method for ship destination identification based on a combination of historical data mining and semantic understanding using a large language model.
[0011] The core of the ship destination identification method lies in first selecting sample ships from historical AIS data, and then constructing a historical destination information set by extracting their voyage records and associated destination texts. Next, using text embedding and clustering techniques, a port semantic library is automatically learned and summarized from the historical destination information set, mapping various standardized text expressions to standard ports.
[0012] When faced with real-time destination text of the vessel to be identified, a large language model is invoked, and deep semantic matching and reasoning are performed in conjunction with a port semantic library. The structured standard port information is directly output. The standard port information includes the original text, standard port name, unique identifier code and confidence level. This achieves end-to-end intelligent conversion from chaotic and ambiguous original fields to accurate, standardized and computable port data.
[0013] In some technical solutions, optionally, standard port information corresponding to the destination field text data is identified from the port semantic library, including: if the destination field text has corresponding standard destination text data in the port semantic library, the standard port information corresponding to the standard destination text data is output as the matching result; if the destination field text does not have corresponding standard destination text data in the port semantic library, candidate clusters are generated through a large language model, and the candidate clusters include at least one destination name prediction result.
[0014] In this scheme, when the input text highly matches a certain standard expression in the library, the corresponding standard port information is directly output to achieve efficient and zero-error parsing; when the input text is a new expression not found in the library, the deep semantic understanding and generalization capabilities of the large language model are invoked to generate structured candidate clusters as prediction results.
[0015] In some technical solutions, optionally, if the destination field text does not have corresponding standard destination text data in the port semantic class library, then a candidate cluster is generated through a large language model, including: generating a new port semantic candidate class based on the large language model; marking records containing the destination field text and its associated context data as new samples and storing them in a sample pool to be processed; obtaining a preset sample threshold; when the number of new samples for the same port semantic candidate class in the sample pool to be processed accumulates to the preset sample threshold, or when verification of real arrival information for the port semantic candidate class is received, the port semantic candidate class is added to the port semantic class library as a new standard port semantic class.
[0016] In this approach, when the large language model generates temporary port semantic candidate classes for text with unknown destinations, it does not treat them as a one-time result, but instead initiates a rigorous verification and adoption process.
[0017] In some technical solutions, optionally, a large language model is used to identify corresponding standard port information from a port semantic library based on the destination field text data. This includes: determining clustering confidence parameters based on the semantic distance between the high-dimensional semantic vector corresponding to the destination field text of the vessel to be identified and the center of the matching cluster in the port semantic library; obtaining the real-time location parameters of the vessel to be identified when it reports the destination field text; determining geographic confidence parameters based on the consistency between the real-time location parameters and the geographic location corresponding to the destination port; determining historical confidence parameters based on the frequency of the vessel to be identified visiting the destination port; calculating a comprehensive confidence score by weighting the predicted confidence parameters, clustering confidence parameters, geographic confidence parameters, and historical confidence parameters; and performing secondary matching on the standard port information when the comprehensive confidence score is lower than a preset confidence threshold.
[0018] In this scheme, after the large language model completes the initial semantic recognition of the destination text, it introduces three independent pieces of evidence from the text's historical patterns, physical navigation logic, and individual ship behavior, namely cluster confidence, geographical confidence, and historical confidence. These are then weighted and fused with the model's own prediction confidence to generate a comprehensive and quantifiable reliability score.
[0019] When the score is lower than the preset threshold, the system automatically triggers a secondary matching process to try to obtain more reliable results through deeper search or reasoning.
[0020] In some technical solutions, the ship destination identification method may optionally include: receiving the actual arrival information of the ship to be identified corresponding to the destination port; using the actual arrival information as a monitoring signal to compare and verify with standard port information; if an identification error is found in the comparison, generating an error correction training sample, which includes the destination error correction field text, the actual arrival information, real-time position parameters, and voyage context data; and updating the port semantic mapping relationship in the port semantic library based on the error correction training sample.
[0021] In this solution, the real arrival information of ships provided by external trusted data sources is used as a standard monitoring signal and automatically compared and verified with the standard port information output by the solution itself.
[0022] When an identification error is detected, a complete error correction training sample is automatically generated, containing the original error text, the correct port, and the spatiotemporal and voyage context. The error correction training sample is then used to update the semantic mapping relationship in the port semantic library.
[0023] This achieves a paradigm shift from static recognition models to dynamic evolutionary systems, enabling the system to learn continuously, accurately, and automatically from its own errors, thereby ensuring that the recognition capability continuously iterates and improves as the data grows without the need for manual annotation intervention.
[0024] In some technical solutions, optionally, the port semantic library is updated based on the error correction training samples, including: adding the destination error correction field text to the standard destination text data to update the standard destination text data; re-converting the updated standard destination text data into high-dimensional semantic vectors; re-clustering the updated semantic vectors using a clustering algorithm; and using the most frequent text within the clustered clusters or the matching text corresponding to the actual arrival information as the latest representative name of the destination port to complete the incremental update of the port semantic library.
[0025] In this scheme, after receiving the error correction training samples, the erroneous texts are incorporated into the standard destination text data. Subsequently, the semantic vectors of the entire library are recalculated and unsupervised clustering is performed to discover the optimal data structure in the updated semantic space.
[0026] In some technical solutions, optionally, the ship voyage data of each target sample ship within a preset historical period is extracted, including: extracting all arrival events of the target sample ship within the preset historical period from the historical data of the Automatic Identification System (AIS); pairing the temporally consecutive arrival events to form multiple historical voyages, each historical voyage containing the previous port information, the next port information, the departure time and the arrival time; and determining the ship voyage data based on the multiple historical voyages.
[0027] In this scheme, all arrival events of the target vessel within a historical period are detected, and time-sequential events are automatically paired to form a series of standard voyage records containing clear origin and destination ports, departure and arrival times.
[0028] A second aspect of the present invention provides a ship destination identification device, comprising: a sample determination module for selecting at least one target sample ship from data of an Automatic Identification System (AIS); a data extraction module for extracting voyage data of each target sample ship within a preset historical time period; a text extraction module for extracting and associating the destination field text reported by the target sample ship from the voyage data to determine a historical destination information set; a standard processing module for cleaning and standardizing the destination field text in the historical destination information set to obtain structured standard destination text data; a clustering vector module for converting the standard destination text data into high-dimensional semantic vectors and clustering the semantic vectors using a clustering algorithm to determine a port semantic class library representing different standard ports; a model acquisition module for acquiring a large language model; a data input module for inputting the destination field text data of the ship to be identified into the large language model; and an information identification module for identifying the corresponding standard port information from the port semantic class library based on the destination field text data using the large language model; wherein the standard port information includes the destination name, the standard name of the destination port, the port unique identifier, and a prediction confidence parameter.
[0029] An embodiment of the third aspect of this application provides an electronic device including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the ship destination identification method as described in the first aspect.
[0030] An embodiment of the fourth aspect of this application provides a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the ship destination identification method as described in the first aspect.
[0031] Additional aspects and advantages of the technical solutions of the present invention will become apparent in the following description or may be learned by practice of the invention. Attached Figure Description
[0032] Figure 1 One of the flowcharts of the ship destination identification method according to this application is shown; Figure 2 A second schematic diagram of the ship destination identification method according to this application is shown; Figure 3 A third schematic diagram of the ship destination identification method according to this application is shown; Figure 4 A fourth schematic diagram of the ship destination identification method according to this application is shown; Figure 5 Fifth of the flowcharts illustrating the ship destination identification method according to this application is shown; Figure 6 A flowchart of the ship destination identification method according to this application is shown in diagram six; Figure 7 A flowchart of the ship destination identification method according to this application is shown in diagram seven; Figure 8 A schematic block diagram of the structure of a ship destination identification device according to this application is shown; Figure 9 A schematic block diagram of the structure of an electronic device according to this application is shown.
[0033] Among them, 900: Ship destination identification device; 902: Sample determination module; 904: Data extraction module; 906: Text extraction module; 908: Standard processing module; 910: Clustering vector module; 912: Model acquisition module; 914: Data input module; 916: Information recognition module; 1000: Electronic device; 1109: Memory; 1110: Processor. Detailed Implementation
[0034] To better understand the above-described objectives, features, and advantages of the embodiments of the present invention, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0035] Many specific details are set forth in the following description in order to provide a full understanding of this application. However, embodiments of the invention may also be implemented in other ways different from those described herein. Therefore, the scope of protection of this application is not limited to the specific embodiments disclosed below.
[0036] With the acceleration of digitalization in the global shipping industry, massive amounts of dynamic ship data based on the Automatic Identification System (AIS) have become an important data foundation for port operations, route optimization, traffic safety supervision, and global trade flow analysis.
[0037] AIS data provides real-time operational information to government maritime authorities, port regulators, shipping companies, and data analytics firms by continuously broadcasting information such as vessel location, course, speed, and destination.
[0038] Meanwhile, with the rapid increase in the number of ships worldwide and the increasing complexity of shipping routes, the ship destination field has gradually become a bottleneck for data quality in AIS information: due to the diverse sources of the field, inconsistent entry methods, significant language differences (spelling errors, non-standard abbreviations), and inconsistent self-entry behavior of crew members, there are a large number of fuzzy, erroneous, or unresolvable records in AIS destination data.
[0039] These issues directly impact the consistency and accuracy of data in port arrival statistics, maritime traffic forecasting, berth resource management, and the logistics supply chain.
[0040] In related AIS data processing, the ship destination field presents the following typical challenges: Data format inconsistency: Input content lacks standardization, exhibiting multiple languages, inconsistent capitalization, mixed symbols, and spelling errors; Semantic diversity and ambiguity: Different ships, companies, or regions may use different names for the same port, such as "SHANGHAI," "SHANGHAIPORT," and "CNSHA," all representing the same port, which traditional algorithms struggle to unify; Lack of contextual semantic understanding: Traditional matching algorithms (such as dictionary comparison or string similarity calculation) cannot effectively handle alias mapping, language differences, and semantic confusion; Weak geographic location association: The destination field is not fully integrated with the ship's current location, heading characteristics, or historical origin-destination (OD) information, leading to insufficient recognition accuracy; Lack of self-learning ability: Traditional models cannot dynamically update and adaptively adjust when new ports, new spelling variations, or data anomalies appear.
[0041] These challenges make it difficult to directly use AIS destination data for high-precision traffic forecasting, port scheduling, or global shipping network analysis, making the industry urgently need a more intelligent and semantic data processing framework.
[0042] The ship destination identification method, apparatus, electronic device, and readable storage medium provided in this application will be described in detail below with reference to specific embodiments and application scenarios.
[0043] This embodiment provides a method for identifying a ship's destination, such as... Figure 1 As shown, ship destination identification methods include: Step 100: Select at least one target sample vessel from the Automatic Identification System (AIS) data; Step 102: Extract the voyage data of each target sample vessel within a preset historical time period; Step 104: Extract and associate the destination field text reported by the target sample ships from the ship voyage data to determine the historical destination information set; Step 106: Clean and standardize the destination field text in the historical destination information set to obtain structured standard destination text data; Step 108: Convert the standard destination text data into high-dimensional semantic vectors, and cluster the semantic vectors using a clustering algorithm to determine the port semantic class library representing different standard ports; Step 110: Obtain the large language model; Step 112: Input the destination field text data of the vessel to be identified into the large language model; Step 114: Identify the corresponding standard port information from the port semantic library based on the destination field text data using a large language model; The standard port information includes the destination name, the standard name of the destination port, the port's unique identifier, and the predicted confidence level parameter.
[0044] This invention discloses a method for ship destination identification based on a combination of historical data mining and semantic understanding using a large language model.
[0045] The core of the ship destination identification method lies in first selecting sample ships from historical AIS data, and then constructing a historical destination information set by extracting their voyage records and associated destination texts. Next, using text embedding and clustering techniques, a port semantic library is automatically learned and summarized from the historical destination information set, mapping various standardized text expressions to standard ports.
[0046] When faced with real-time destination text of the vessel to be identified, a large language model is invoked, and deep semantic matching and reasoning are performed in conjunction with a port semantic library. The structured standard port information is directly output. The standard port information includes the original text, standard port name, unique identifier code and confidence level. This achieves end-to-end intelligent conversion from chaotic and ambiguous original fields to accurate, standardized and computable port data.
[0047] This process involves selecting at least one target vessel that meets certain criteria from the massive, raw AIS message stream based on preset rules. This selected vessel set is representative and of relatively high data quality, chosen for the subsequent construction of the port semantic library.
[0048] For example, the preset rules include, but are not limited to: the gross tonnage of the ship is greater than a preset tonnage, such as 3,000 gross tons.
[0049] By using preset rules to filter target sample vessels, the system automatically filters out small fishing boats, yachts, and other vessels whose AIS data may be incomplete, non-standard, or irrelevant to business, ensuring that the data sources used for training and building the basic model have high standardization and commercial value.
[0050] Specifically, vessel navigation records requiring processing are extracted from the global real-time and historical data streams of the Automatic Identification System (AIS). These records contain several key fields, such as the vessel's maritime movement business identifier, timestamp, latitude and longitude, course and speed, and the core destination text field, manually entered by the crew. The destination text field is a free text string containing characters from multiple languages, describing the vessel's intended destination. Its content may include port names, country names, region names or their abbreviations, alternative names, or even misspelled words, thus forming a raw, unprocessed set of destination messages.
[0051] Information on officially certified and recorded ports and locations is collected from authoritative directories published by global or regional official maritime agencies, port authorities, and international shipping organizations, as well as from commercial shipping geographic information databases. This information constitutes a standard port geographic knowledge base, in which each record contains at least the port's official standard name (which may have multilingual versions), a unique port identification code (such as UN / LOCODE, port call sign), and precise geographic coordinates. The port geographic knowledge base serves as the final reference benchmark for all subsequent semantic normalization processing.
[0052] In the context of this invention, the target sample vessels specifically refer to those vessels with high-quality historical navigation data selected for constructing a port semantic knowledge base. A typical selection criterion is based on the vessel's gross tonnage (a unit measuring the internal volume of a vessel); for example, only ocean-going merchant ships with a gross tonnage greater than 3,000 are selected. This selection ensures that the data sources used for knowledge mining come from a group of vessels with relatively standardized navigation behavior, advanced AIS equipment, and high-quality data reporting, thereby improving the reliability of the constructed knowledge.
[0053] Vessel voyage data refers to structured navigation units reconstructed from AIS historical tracks and berthing records. Its core is the extraction of continuous, verifiable arrival events and the pairing of two temporally adjacent arrival events to form a "origin-destination" pair. Each voyage data explicitly records the "previous port of call," the "next port of call," and the corresponding "departure time" and "arrival time." This provides crucial temporal and spatial context for understanding a vessel's navigation intentions within a specific time period.
[0054] The historical destination information set is an association-referenced dataset. For each reconstructed historical voyage, the system extracts the raw text of all "destination" fields periodically broadcast by the vessel via AIS equipment within the corresponding departure-to-arrival time window. These texts are then precisely linked to the actual "next port of call" reached during the historical voyage (confirmed from the port geographic knowledge base). The historical destination information set establishes a supervised mapping relationship between the reported destination text during the voyage and the standardized ports actually arrived at, serving as the fundamental raw material for training the system to understand port alternatives and error patterns.
[0055] Structured standard destination text data is the result of automated cleaning and normalization of raw text from historical destination information sets. The cleaning process includes removing invalid records that are empty, contain only test code, or contain a large number of meaningless symbols. Normalization includes: removing leading and trailing spaces, uniformly converting to uppercase (or lowercase) letters, replacing common symbols (such as "-", " / ", ".") with spaces, and performing dictionary-based simple spell checking and common abbreviation expansion. This step aims to eliminate low-level, rule-based noise, providing relatively clean and uniformly formatted text input for subsequent steps requiring in-depth semantic analysis.
[0056] High-dimensional semantic vectors are mathematical representations of each standardized destination text, generated using pre-trained text embedding models (such as Sentence-BERT and text representation models). A high-dimensional semantic vector is a fixed-length array of real numbers, where each dimension represents a certain abstract semantic feature. In the high-dimensional semantic space learned during model training, semantically similar texts will have their corresponding vectors closer in space (e.g., cosine similarity), thus enabling a numerical measurement of semantic relevance between texts, going beyond superficial character matching.
[0057] The port semantic library is the core knowledge component automatically constructed through unsupervised learning in this invention. Its construction process is as follows: First, all standard destination text data is converted into a high-dimensional semantic vector set using an embedding model. Next, a density-based clustering algorithm is used to analyze this vector set, automatically grouping vectors that cluster together in space into the same cluster. Each cluster semantically corresponds to a potential, real-world port, and all vectors within the cluster represent different textual expressions pointing to the port (aliases, abbreviations, multilingual names, common misspellings). Then, each cluster is matched and aligned with a port geographic knowledge base: by calculating the similarity between the cluster's central vector and the standard port name vectors in the knowledge base, each cluster is assigned a most matching standard port identity (including its standard name, unique identifier, and coordinates).
[0058] The final port semantic class library is a queryable and extensible mapping table. Its core record format is: {standard port identifier:{standard name:“X port”, coordinates:(x,y), semantic vector cluster:[vector1(text A),vector2(text B),...]}}.
[0059] Large language models refer to large-scale deep learning models that are pre-trained on massive amounts of general text and possess powerful contextual understanding and generation capabilities.
[0060] In this invention, the large language model is used as a general-purpose and powerful semantic understanding and reasoning engine. Upon receiving instructions with a specific structure, it can combine its own world knowledge and deep understanding of language to perform complex analysis and judgment tasks.
[0061] The vessel to be identified refers to any vessel whose AIS destination field needs to be parsed in real time or in batches in a practical application scenario. The destination field text data reported by the vessel is the raw input string that needs to be intelligently parsed by the system, and may contain various types of noise.
[0062] The standard port information is the final output of this method; it is a structured, machine-readable data object containing multi-dimensional information. When the large language model is invoked, it receives the destination field text data of the vessel to be identified, along with its associated context (which may include vessel position, heading, and current voyage information), and retrieves port semantic libraries for reference. The model uses deep semantic reasoning to determine which standard port in the library the input text most likely points to and formats the output accordingly.
[0063] The standard port information object precisely includes: Destination name: the lightly cleaned input text or its main part, used to trace the original information; Standard name of the destination port: the identified, official port name; Port unique identifier: such as UN / LOCODE, providing a globally unambiguous machine identifier; Prediction confidence parameter: the degree of confidence of the large language model in this matching judgment, usually represented by a probability value between 0 and 1, providing a basis for decision-making for downstream applications.
[0064] Standard port information output formats include, but are not limited to, tables and images.
[0065] Through the complete process described above, from data filtering, knowledge mining, model integration to intelligent reasoning, this invention achieves end-to-end automated conversion from chaotic, ambiguous, and non-standard AIS free text destination input to accurate, standardized, and structured standard port information output.
[0066] Understandably, this invention combines the deep semantic understanding capabilities of a large language model with a port semantic library based on historical data mining to achieve intelligent recognition and standardization of AIS destination fields. By constructing a port semantic library, the system can automatically learn and summarize various non-standard expressions, multilingual variations, common spelling errors, and non-standard abbreviations of port names, providing accurate domain prior knowledge for subsequent recognition.
[0067] Compared with traditional methods based on string similarity matching or static rule dictionaries, this invention demonstrates stronger generalization ability, fault tolerance, and contextual understanding in complex semantic scenarios. It can significantly improve the accuracy of destination identification and the consistency of destination data, effectively solving the bottleneck problem of destination field quality that has long plagued shipping data applications.
[0068] For example, the ship destination identification method provided by the present invention can be deployed as a high-performance microservice in the cloud or encapsulated as a standardized application programming interface (API) to provide plug-and-play destination identification and standardization capabilities for core maritime business systems.
[0069] In practical applications, the vessel destination identification service can be seamlessly integrated into the real-time data streams or back-end batch processing pipelines of systems such as vessel traffic services, intelligent port scheduling, global vessel monitoring, and maritime safety supervision, to achieve real-time, accurate, and automated mapping of AIS destination messages to standard port information.
[0070] The output of this method (structured, computable standard port information) can directly drive port arrival forecasting, berth resource optimization and allocation, and loading and unloading operation planning. It can also be written into the shipping data platform as a high-quality key data element, providing a unified and reliable port identity for advanced analytical applications such as route network analysis, global trade flow monitoring, and ship energy efficiency assessment, fundamentally breaking the data silos and information inconsistencies caused by confusing destination descriptions.
[0071] In the port scheduling system, the identified standard port information can be automatically linked with berth plans, yard planning, and operation instructions, ensuring that all documents, interfaces, and instructions throughout the entire process from planning to on-site execution use unique and unambiguous standard port codes, completely eliminating scheduling conflicts and resource mismatches caused by inconsistent names.
[0072] In global ship monitoring and safety supervision, the system can analyze the destinations reported by ships in real time, and combine them with their current location, course and historical behavior to predict navigation intentions and provide early warnings of abnormal behaviors (such as deviating from the declared route or entering sensitive waters), which significantly improves maritime safety situational awareness and proactive supervision capabilities.
[0073] In some embodiments, the standard port information output by identification can be updated in real time to electronic charts, radar displays, or ship monitoring lists to achieve standardized and visual presentation of destination information, greatly improving the situational awareness and decision-making efficiency of command and duty personnel.
[0074] In some embodiments, the output may optionally be the standard port information with the highest matching degree, or, if the confidence level is insufficient, a list containing multiple candidate port information may be output for the user to make a final confirmation. The candidate list may be displayed in a way that includes, but is not limited to, a drop-down list, a pop-up window, or a sidebar.
[0075] In some embodiments, the ship destination identification method provided by the present invention can be used not only for real-time dynamic identification, but also for batch cleaning and standardization of historical AIS big data, providing high-quality raw material data for the production of high-value data products such as shipping flow statistical analysis, ship behavior pattern mining, and port competitiveness assessment.
[0076] In some embodiments, the standard port information output can be accompanied by dynamic information such as the ship's Maritime Mobile Service Identity (MMSI), timestamp, latitude and longitude, course and speed to form a standardized voyage event data product. This product can then be provided to the outside world through a data service platform or API marketplace, empowering a broader shipping digital ecosystem, including shipping finance, ship insurance, supply chain management, and carbon footprint accounting.
[0077] In some embodiments, optionally, such as Figure 2 As shown, standard port information is identified from the port semantic library based on the destination field text data, including: Step 1140: If the destination field text has corresponding standard destination text data in the port semantic class library, then output the standard port information corresponding to the standard destination text data as the matching result. Step 1142: If the destination field text does not have corresponding standard destination text data in the port semantic class library, then generate candidate clusters through the large language model. The candidate clusters include at least one destination name prediction result.
[0078] In this embodiment, when the input text highly matches a certain standard expression in the library, the corresponding standard port information is directly output to achieve efficient and zero-error parsing; when the input text is a new expression not seen in the library, the deep semantic understanding and generalization capabilities of the large language model are invoked to generate structured candidate clusters as prediction results.
[0079] Specifically, after obtaining the destination field text data to be identified, the destination field text data to be identified is quickly compared and its relevance is evaluated with a pre-built port semantic library. The port semantic library is a dynamic knowledge graph in which each standard port entity is associated with a standard destination text data set formed by clustering historical data. The standard destination text data set contains various known standardized text expressions of the port and their semantic vectors.
[0080] The core criterion for relevance assessment and path routing is the similarity between the semantic vector of the input text and the corresponding vectors of all standard destination text data in the library. The system presets a very high similarity threshold (e.g., cosine similarity ≥ 0.95).
[0081] If the similarity between a vector of a certain standard destination text data and the input vector reaches a similarity threshold, it is determined that there is corresponding standard destination text data in the port semantic library, triggering an efficient and accurate matching path; if the similarity between a vector of a certain standard destination text data and the input vector does not reach a similarity threshold, it is determined that there is no corresponding standard destination text data, triggering an intelligent reasoning generation path.
[0082] The efficient and precise matching path is a highly efficient vector index retrieval method. After calculating the semantic vector of the input text, it uses an approximate nearest neighbor search technique to search for vectors that are extremely close, i.e., highly similar, in the vector index of the port semantic library, thus avoiding the complex calculations of large language models.
[0083] Once a highly corresponding vector is found, it is immediately linked to the standard port semantic class it belongs to through the mapping relationship bound in the class library. This allows the acquisition of structured standard port information (including standard port name, unique identifier, etc.) corresponding to the standard port semantic class. This efficient and accurate matching path ensures instantaneous, zero-error matching of port expressions that have historically occurred frequently and whose patterns are known.
[0084] In the intelligent reasoning generation path, when the semantic vector of the input text cannot find a highly similar match in the vector index of the entire port semantic class library, the current input is determined to be a new, unrecorded destination representation. This could represent the name of a completely new port, an extremely obscure alias of an existing port, or a severely distorted spelling.
[0085] At this point, the large language model will be invoked, and it will be provided with the input text and possible key context (such as the approximate location of the ship and its historical route). The large language model will then switch to its core generalization and reasoning mode.
[0086] Large language models do not perform simple vector matching. Instead, based on the port naming rules, geographical common sense, and language conversion patterns (e.g., recognizing that "EAST" usually corresponds to "Donggang" and "TERMINAL" corresponds to "Terminal Area") learned from a vast amount of corpus and limited historical samples, they conduct in-depth semantic analysis and possibility speculation. Their output is one or more structured candidate clusters. Each candidate cluster is a temporary, unverified semantic hypothesis that contains at least one predicted destination name result.
[0087] Candidate clusters (including predicted port names, confidence levels, and summaries of reasoning bases) are output as preliminary standard port information. At the same time, the complete records of the queries (original inputs, contexts, prediction results) are marked as samples to be verified and stored in an independent queue, waiting for subsequent closed-loop verification and learning through the actual arrival AIS signals of ships or manual feedback.
[0088] Understandably, the dual-path mechanism reflects the sophistication of the system design. The high-efficiency and precise matching path, as a cache, processes the vast majority of known queries with fixed patterns, achieving sub-millisecond response and 100% theoretical accuracy, ensuring the overall processing efficiency of the system and the certainty of core scenarios. The intelligent reasoning generation path, as an intelligent computing unit, specializes in handling long-tail and unknown difficult cases. Although it takes a slightly longer time, through the reasoning ability of the large language model, it realizes the effective processing of zero-shot and open-set queries, greatly expanding the application boundary of the system.
[0089] In some embodiments, optionally, as Figure 3 shown, if there is no corresponding standard destination text data for the destination field text in the port spoken language semantic class library, candidate clusters are generated through the large language model, including: Step 11420: Generate a new port spoken language semantic candidate class according to the large language model; Step 11422: Mark the record containing the destination field text and its associated context data as a new sample and store it in the sample pool to be processed; Step 11424: Obtain a preset sample threshold; Step 11426: When the number of new samples for the same port spoken language semantic candidate class in the sample pool to be processed accumulates to the preset sample threshold, or when real arrival information verification for the port spoken language semantic candidate class is received, add the port spoken language semantic candidate class as a new standard port spoken language semantic class to the port spoken language semantic class library.
[0090] In this embodiment, when the large language model generates a temporary port spoken language semantic candidate class for unknown destination text, it does not take it as a one-time result but initiates a rigorous verification and absorption process.
[0091] First, relevant information about the identified event is packaged into new samples and stored in a sample pool for evidence accumulation. Through continuous monitoring, when the number of samples under the same candidate class reaches a preset threshold, or when strong external verification is received from a real arrival event, the port semantic candidate class is automatically upgraded to a formal standard port semantic class and integrated into the core knowledge base.
[0092] Understandably, this embodiment can continuously discover new knowledge from actual operational data. When new port names, new abbreviations, or new spelling variations appear in the industry, they can be automatically incorporated into the knowledge system through a large language model, permanently expanding its recognition boundaries. This solves the problem that traditional methods inevitably become outdated due to the solidification of the knowledge base, thus maintaining long-term effectiveness in a rapidly changing shipping environment.
[0093] Specifically, when the large language model determines that the input destination field text has no corresponding item in the existing port semantic class library, it does not simply output an isolated name prediction, but generates a structured, temporary knowledge unit based on the semantics and context of the input destination field text and its own understanding of port naming rules, which is the port semantic candidate class.
[0094] The port semantic candidate class is a temporary, unverified port semantic hypothesis. It must contain at least: the standard name of the destination port inferred from the large language model; the initial text representation corresponding to the destination field text; and the semantic vector corresponding to the destination field text. While the port semantic candidate class formally mimics the structure of the standard port semantic class, it has not yet been formally adopted by the system.
[0095] The system packages the complete context record of the current identification task into a new sample, which includes not only the original destination field text, but also its associated context data (such as the ship's MMSI, reporting time, location, heading, etc.), as well as port semantic candidate class information generated by the large language model. Subsequently, the packaged complete context record is marked with a status and stored in a dedicated pool of samples to be processed.
[0096] The pending sample pool is a buffer or queue maintained in memory or a database to accumulate and temporarily store all new samples triggered by port semantic candidate classes that have not yet met the conversion or rejection conditions. Samples in the pending sample pool can be organized and indexed according to their respective candidate classes.
[0097] The system reads a pre-configured preset sample threshold. The preset sample threshold is an integer (e.g., 5, 10), representing how many independent and consistent new samples the system requires to support a port semantic candidate class in order to be considered reliable.
[0098] When it is detected that the number of new samples belonging to the same port semantic candidate class has accumulated to a preset sample threshold, it indicates that the same inference pattern has been repeatedly observed, significantly increasing its reliability. Alternatively, verification of actual arrival information for the port predicted by the port semantic candidate class is received from external data sources (such as port berthing reports or satellite AIS). That is, when a ship actually arrives at the port predicted by the model, constituting a strong supervision signal, this verified port semantic candidate class is formally upgraded to a new standard port semantic class. The standard port semantic class will be assigned a formal unique port identifier (or a newly assigned one), and its contained textual expressions and semantic vectors will be integrated into the port semantic class library.
[0099] Meanwhile, the relevant samples will be removed from the pool of samples to be processed.
[0100] In some embodiments, the preset sample threshold is optionally not a fixed value, but a parameter that can be dynamically adjusted according to the type of port semantic candidate class, the source region, or the initial confidence of the model.
[0101] For example, for candidates with extremely high model confidence, the preset sample threshold can be set to 1 (i.e., a single verification is sufficient to trigger the test); for candidates from sparse data regions or candidates with low model confidence, a higher preset sample threshold (e.g., 10) can be set to require more evidence.
[0102] In some embodiments, optionally, when two or more port semantic candidate classes point to geographically close or semantically similar ports, conflict detection can be initiated, and a decision can be made to merge them into one class or select one by comparing sample size, average confidence, or introducing external knowledge.
[0103] In some embodiments, the authentic arrival information used for verification may optionally come from a variety of heterogeneous data sources. These heterogeneous data sources are not limited to official port reports, but may also include berthing events from satellite AIS, shipping schedules provided by shipping agents, news reports, etc.
[0104] In some embodiments, optionally, a version snapshot is created for each update to the port semantic library (adding new classes or modifying existing classes), and the sample set and decision basis that triggered the update are recorded. If an error is subsequently discovered to have been introduced by an update, a quick rollback based on the version record is supported to restore the system to its state before the update.
[0105] In some embodiments, optionally, such as Figure 4 As shown, the standard port information is identified from the port semantic library based on the destination field text data using a large language model, including: Step 1150: Determine the clustering confidence parameter based on the semantic distance between the high-dimensional semantic vector corresponding to the destination field text of the vessel to be identified and the center of the matching cluster in the port semantic class library; Step 1152: Obtain the real-time location parameters when the vessel to be identified reports the destination field text; Step 1154: Determine the geographic confidence parameter based on the degree of consistency between the real-time location parameters and the corresponding geographic location of the destination port; Step 1156: Determine the historical confidence parameters based on the frequency of visits to the destination port by the vessel to be identified; Step 1158: Calculate the overall confidence score by weighting the predicted confidence parameter, cluster confidence parameter, geographical confidence parameter, and historical confidence parameter; Step 1160: When the overall confidence score is lower than the preset confidence threshold, perform a second matching of the standard port information.
[0106] In this embodiment, after the large language model completes the initial semantic recognition of the destination text, it introduces three independent pieces of evidence from the text's historical patterns, physical navigation logic, and individual ship behavior, namely cluster confidence, geographical confidence, and historical confidence. These are then weighted and fused with the model's own prediction confidence to generate a comprehensive and quantifiable reliability score.
[0107] When the score is lower than the preset threshold, the system automatically triggers a secondary matching process to try to obtain more reliable results through deeper search or reasoning.
[0108] Understandably, this invention demonstrates stronger result reliability, decision interpretability, and system robustness in shipping scenarios that are complex, ambiguous, or even involve adversarial inputs.
[0109] By comparing the comprehensive confidence score with the preset confidence threshold in this embodiment, errors that appear to match but are actually illogical can be effectively identified and blocked. This minimizes the risk of misjudgment caused by model illusion, data noise, or human misguidance, significantly improving the credibility of destination identification results and providing a directly credible automated decision-making basis for downstream high-value applications.
[0110] Specifically, a high-dimensional semantic vector representing the current destination text to be identified is extracted. Simultaneously, from the port semantic class library, the center vector of the semantic cluster corresponding to the standard port initially identified as the matching target by the large language model is obtained. This center vector is calculated from all historical text vectors within the cluster and represents the average or kernel semantic features of the category.
[0111] Next, the semantic distance between the input text vector and the cluster center vector is calculated. The reciprocal of this semantic distance, or a distance-based decay function value, is quantized as the cluster confidence parameter.
[0112] The clustering confidence parameter reflects the degree to which the semantic features of the current input destination text match the historical common expression patterns of the target port. The closer the distance, the higher the parameter value, indicating that the destination text is one of the typical expressions of the target port; the farther the distance, the more likely the text is an obscure, rare, or even questionable expression of the port.
[0113] From the AIS data stream, accurately correlate and extract the ship dynamic information at the same time point as the destination message currently being processed.
[0114] Ship dynamic information includes at least the ship's latitude and longitude coordinates, and usually also its heading and speed relative to the ground, which together constitute a spatiotemporal snapshot for assessing the ship's instantaneous navigation intentions and status.
[0115] The coordinates of the initially identified destination port are retrieved from the geographic information database. Then, a series of spatial consistency calculations are performed: the distance from the ship's current position to the coordinates of the destination port is calculated; the angle between the ship's current course and the ideal bearing from the current position to the destination port is calculated.
[0116] Based on the distance, the magnitude of the heading deviation angle, and the current speed, a geographical plausibility score, or geographical confidence parameter, is calculated using a predefined mathematical model (or a trained scorer). The geographical confidence parameter is used to assess the plausibility and likelihood of the ship's current physical state relative to its declared destination in terms of realistic navigation logic.
[0117] Query the long-term navigation records of the vessel to be identified and count the total number of times the vessel actually arrived at the currently preliminarily identified destination port within a set historical time window (e.g., the past 24 months), i.e., the visit frequency.
[0118] The historical confidence parameter is calculated based on this frequency, typically using normalization or by introducing a time decay factor. The more frequent the access, the higher the historical confidence parameter value.
[0119] Historical confidence parameters reflect the habituality, periodicity, or business correlation of ship visits to ports.
[0120] The confidence parameters from the four independent sources are integrated, and a preset weight coefficient is assigned to each parameter. The weights can be obtained through offline optimization or online learning. A single comprehensive confidence score is calculated using a weighted summation formula. The comprehensive confidence score integrates multi-dimensional and heterogeneous evidence, making it more comprehensive and robust than the confidence score from any single source, and providing a quantitative basis for deciding whether to accept the current identification results.
[0121] The calculated overall confidence score is compared with this threshold. If the score is higher than or equal to the threshold, the current identification result is considered reliable, and the process ends. If the score is lower than the preset confidence threshold, the system determines that the reliability of this preliminary identification result is insufficient and automatically triggers a secondary matching process. The secondary matching may employ more complex strategies, such as: expanding the search scope in the port semantic library, using alternative matching algorithms, performing deep reasoning based on the ship's complete planned voyage, or routing the current case to a manual processing queue for expert review.
[0122] When the initial identification result fails the comprehensive confidence test, the system automatically initiates an upgraded review and re-identification process. Its purpose is to attempt to obtain a result with higher confidence by investing more computing resources or introducing more complex logic, i.e., a secondary matching.
[0123] For example, in global ship monitoring, the destinations reported by ships can be classified based on a comprehensive confidence score.
[0124] High-confidence results drive automatic tracking and display; low-confidence results trigger secondary matching or highlight alarms to prompt duty officers to pay close attention.
[0125] For example, when a ship's destination is identified as port A but its overall score is extremely low (possibly due to an opposite course), it will automatically try to match a more reasonable port B, or directly pop up a verification prompt, allowing the watch officer to instantly focus on high-risk, inconsistent navigation intentions, greatly improving the ability to detect and warn of abnormal behavior in its early stages.
[0126] For example, in smart port scheduling, the automatic allocation plan for resources such as berths and yards can be strongly linked to the confidence level of the identification results. Automatic resource reservation and the issuance of operational instructions are only triggered when the confidence score of the arrival forecast exceeds a strict threshold; for low-confidence forecasts, the process automatically switches to manual confirmation. This ensures that critical instructions from planning to execution are based on highly reliable information, fundamentally preventing resource vacancy, conflicts, or operational interruptions caused by destination identification errors.
[0127] For example, in maritime safety and anomaly monitoring, the overall confidence score itself can serve as a key risk indicator. Consistently low-confidence destination reports may suggest AIS equipment malfunction, deliberate concealment of intent, or fraudulent activity. Based on this, the monitoring system can automatically filter out a list of suspicious vessels for focused tracking, analysis, or boarding inspection, achieving a leap from broad monitoring to precise enforcement.
[0128] In some embodiments, the calculation of the clustering confidence parameter, geographic confidence parameter, and historical confidence parameter may optionally incorporate dynamic weights or adaptive thresholds. For example, in open waters such as the high seas, the weight of geographic confidence can be appropriately reduced; for vessels from well-known shipping companies with complete data, the weight of historical confidence can be increased accordingly.
[0129] In some embodiments, the system can optionally generate standardized work orders for cases whose overall confidence score is below a threshold and for which a high confidence result cannot be obtained after secondary matching, and route them to a designated human review seat or expert system to achieve a closed loop for handling difficult cases through human-machine collaboration.
[0130] In some embodiments, the confidence assessment and secondary matching mechanism can be used not only for real-time data processing, but also for large-scale quality auditing and batch correction of historical AIS identification results, providing high-quality datasets with reliability annotations for historical flight data analysis, model performance evaluation, and insurance claims investigation.
[0131] In some embodiments, optionally, such as Figure 5 As shown, the ship destination identification method also includes: Step S200: Receive the actual arrival information of the vessel to be identified at the destination port; Step S202: Use the actual arrival information as a monitoring signal and compare and verify it with the standard port information; Step S204: If an identification error is found during comparison, an error correction training sample is generated. The error correction training sample includes the destination error correction field text, the actual arrival information, the real-time location parameters, and the voyage context data. Step S206: Update the port semantic library based on the error correction training samples.
[0132] In this embodiment, the real arrival information of ships provided by external trusted data sources is used as a standard monitoring signal and automatically compared and verified with the standard port information identified and output by itself.
[0133] When an identification error is detected, a complete error correction training sample is automatically generated, containing the original error text, the correct port, and the spatiotemporal and voyage context. The error correction training sample is then used to update the semantic mapping relationship in the port semantic library.
[0134] This achieves a paradigm shift from static recognition models to dynamic evolutionary systems, enabling the system to learn continuously, accurately, and automatically from its own errors, thereby ensuring that the recognition capability continuously iterates and improves as the data grows without the need for manual annotation intervention.
[0135] First, through data interfaces, information about the actual arrival of ships at the port is continuously or periodically received from authoritative external data sources, such as port state control reports, berthing and departure plans provided by shipping agents, satellite AIS berthing event analysis, or port activity databases that integrate multiple signals, to determine the true arrival information.
[0136] Information about a vessel’s actual arrival at a port exists in a structured record format, with core fields including at least: the vessel’s Maritime Mobility Service Identifier (MMSI), the official port identification code (such as UN / LOCODE) of the port of arrival, and the exact arrival timestamp.
[0137] For each received genuine arrival information, the system uses MMSI and timestamps to trace back and search for all standard port information records output by the identification system within a certain period before the corresponding vessel's arrival (e.g., from departure to arrival).
[0138] The system accurately matches the port identification codes in the actual arrival information with the port identification codes predicted by the system to determine whether the prediction needs to be corrected.
[0139] When the comparison results show that the predicted port is inconsistent with the actual port of arrival, it is judged as an identification error.
[0140] At this point, the error correction training sample is determined. The error correction training sample is a structured data packet containing all relevant contextual information that led to this error, specifically including: Destination error correction field text: the original AIS destination field text that initially triggered the error identification; Actual port arrival information: the port information that the vessel actually arrived at, serving as the correct label; Real-time position parameters: the latitude, longitude, heading, and speed of the vessel to be identified when it reported the above erroneous destination text; Voyage context data: the complete or partial voyage information of the vessel at the time of the error identification, such as the previous port of call, planned route, etc.
[0141] Error-correcting training samples are information-complete training data units constructed to correct system errors. They not only point out where the original text is incorrect relative to the correct port name, but also retain the context in which the error occurred (location, voyage context), providing rich features for targeted model or knowledge base optimization.
[0142] The generated error-corrected training samples are used to incrementally update the port semantic class library. The update operations include: correcting mappings: removing the destination error-correcting field text and its semantic vector from the port clusters that were originally incorrectly associated with it, and associating them with the correct port clusters corresponding to the actual arrival information; enhancing representations: adding the above text and vectors to the correct port clusters to enrich the semantic expression diversity of ports; adjusting cluster centers: recalculating the semantic center vectors of the affected clusters to reflect the changes in members; triggering model fine-tuning: after accumulating a certain number of error-corrected samples, they can be used to fine-tune the prompting strategy of the large language model or the semantic embedding model on a small scale.
[0143] Among them, the port semantic mapping relationship refers to the correspondence established between each destination field text (or its vector representation) and a standard port entity in the port semantic class library.
[0144] Not all error-correction training samples are of equal value. Large language models can assign weights to samples based on: the authority of the sample source (e.g., official port reports have higher weight than commercial data), the type of vessel (merchant data has higher weight than fishing data), or the severity of the misidentification. High-weighted samples can be prioritized or have a greater impact on the knowledge base.
[0145] At the same time, a sample priority queue can be set up to ensure that critical errors are corrected in a timely manner.
[0146] In some embodiments, the port semantic library is optionally updated not in real time with each error trigger, but rather using a periodic batch update strategy. The generated error-correcting training samples are stored in a buffer pool, and a batch incremental learning task is launched according to a preset scheduling strategy (such as a low-load period in the early morning each day). The batch incremental learning task processes all samples in the pool at once, recalculates relevant semantic vectors, and optimizes clustering, achieving a more stable and efficient knowledge base version iteration.
[0147] In some embodiments, optionally, such as Figure 6 As shown, the port semantic library is updated based on the error correction training samples, including: Step S2060: Add the destination correction field text to the standard destination text data to update the standard destination text data; Step S2062: Perform high-dimensional semantic vector transformation on the updated standard destination text data; Step S2064: Re-cluster the updated semantic vectors using a clustering algorithm; Step S2066: Use the most frequent text within the cluster after clustering or the matching text corresponding to the actual arrival information as the latest representative name of the destination port to complete the incremental update of the port semantic library.
[0148] In this embodiment, after receiving the error correction training samples, the erroneous text is incorporated into the standard destination text data. Then, the semantic vector of the entire library is recalculated and unsupervised clustering is performed to discover the optimal data structure in the updated semantic space.
[0149] Finally, based on the most frequent text within the cluster or actual arrival information, the latest representative name is determined for each port semantic class.
[0150] It is understandable that the mechanism of updating the port semantic library through error correction training samples has achieved a leap from single-point error correction to structural knowledge reorganization. This ensures that the port semantic library can dynamically adjust its internal structure, maintain clear semantic boundaries and stable naming while continuously absorbing new knowledge. In this way, it can complete self-evolution in an efficient and controllable manner, fundamentally maintaining the long-term consistency and recognition accuracy of the knowledge base.
[0151] Specifically, the original text that led to the incorrect identification, i.e., the destination error correction field text, is extracted from the error correction training samples. After undergoing the same cleaning and standardization preprocessing as the initial data, the destination error correction field text is added to the benchmark dataset used to build and maintain the knowledge base—a structured, standard set of destination text data. This transforms error examples into new learning material, expanding the raw material base of the knowledge base.
[0152] The Standard Destination Text Data is a continuously growing, clean text corpus containing all known, preprocessed destination field texts. It serves as the source data for generating high-dimensional semantic vectors and building port semantic libraries.
[0153] After the text corpus is updated, the semantic representation of the entire corpus or at least the affected portion needs to be recalculated. A text embedding model is invoked to re-encode the updated standard destination text data set, or the incremental portion, converting each text into a corresponding high-dimensional semantic vector.
[0154] This ensures that newly added error-corrected text can be integrated into a unified semantic vector space, and its vector representation is comparable to the vectors of all other texts in the library within the same mathematical framework.
[0155] Among them, the updated standard destination text data refers to the latest version of the text corpus that has incorporated the destination error correction field text.
[0156] The purpose of re-performing high-dimensional semantic vector transformation is to refresh the semantic representation foundation of the entire system based on the latest text data, so that the vector representation of the knowledge base is consistent with the latest data distribution.
[0157] Using the same clustering algorithm as when building the initial class library, unsupervised clustering analysis is performed again on the entire set of high-dimensional semantic vectors generated from the updated standard destination text data.
[0158] Because of the addition of new vector points (vectors of the error-correcting text), the original cluster boundaries and membership relationships may change. This re-clustering aims to discover and establish the latest and optimal semantic grouping structure. Text vectors that were previously misclassified are expected to be assigned to the correct semantic clusters that correspond to the actual arrival information in this clustering.
[0159] After re-clustering, the system determines the latest representative name for each generated semantic cluster. One of the following strategies is adopted: High-frequency text principle: Count the frequency of all texts in at least one cluster, and use the text with the most frequent occurrences as the latest representative name of the cluster (i.e., the port); Real information anchoring principle: For clusters that change due to error correction training samples, directly use the standard port name corresponding to the real arrival information in the samples as the latest representative name of the corresponding cluster.
[0160] Subsequently, the system uses these latest cluster structures, member vectors, and representative names to refresh the corresponding records in the port semantic library, completing a full incremental update. Old erroneous mappings are overwritten, and new correct associations are established.
[0161] Not every update requires a full revectorization and re-clustering of the updated standard destination text data. Revectorization and re-clustering includes, but is not limited to: Local updates: If the number of newly added destination error correction field texts is small, and their semantic vectors are very close to the center of an existing cluster, then only vector adjustments and boundary fine-tuning of the clusters are needed, without the need for full re-clustering; Incremental clustering: Using clustering algorithms that support incremental updates, only the new vectors are inserted into the existing cluster structure for local adjustments, rather than starting from scratch; Delayed / batch clustering: After accumulating multiple error correction samples, batch clustering tasks are launched periodically to balance real-time performance and computational efficiency.
[0162] After completing the incremental update and switching to the new class library, the system tracks and monitors whether similar queries that previously caused the error correction have been correctly identified. Simultaneously, it assesses changes in overall identification metrics. This performance data can be fed back to meta-parameters used to optimize the update mechanism itself, such as the threshold for determining when to trigger full re-clustering and the weight of the representative name selection strategy.
[0163] In some embodiments, optionally, after re-clustering, a post-processing step is introduced to optimize cluster quality: Small cluster handling: Clusters that are too small (e.g., containing only 1-2 vectors) are specially handled, either by merging them into the nearest cluster or by marking them as low-confidence candidate clusters for further observation; Conflict detection and resolution: Detecting whether there are clusters with similar semantic vectors but assigned to different port identifiers after clustering, which may indicate that port aliases have not been correctly merged, and merging can be done automatically or manually; Silhouette coefficient evaluation: Calculating metrics such as the silhouette coefficient of the clustering results to quantify the clustering quality of this update. If the quality significantly deteriorates, a rollback or alarm can be triggered.
[0164] In some embodiments, optionally, such as Figure 7 As shown, ship voyage data for each target sample vessel within a preset historical time period is extracted, including: Step 1020: Extract all arrival events of the target sample vessel within a preset historical time period from the historical data of the Automatic Identification System (AIS); Step 1022: Pair up consecutive arrival events to form multiple historical voyages. Each historical voyage includes information on the previous port, the next port, departure time, and arrival time. Step 1024: Determine ship voyage data based on multiple historical voyages.
[0165] In this embodiment, by detecting all arrival events of the target vessel within a historical period and automatically pairing temporally consecutive events, a series of standard voyage records containing clearly defined origin and destination ports, departure and arrival times are formed.
[0166] It is understandable that the process of extracting the voyage data of each target sample vessel within a preset historical period realizes an essential transformation from low-level, continuous point data to high-level, discrete commercial navigation units. This not only automatically generates destination text and real port supervision data pairs for training and verification, eliminating the reliance on manual annotation, but more importantly, it provides an indispensable voyage context for subsequent semantic recognition, thus laying a high-quality, high-semantic data foundation for the entire intelligent recognition system.
[0167] Specifically, it accesses a database storing massive amounts of historical AIS messages. First, it locates the target sample vessel set based on filtering criteria (such as gross tonnage > 3000).
[0168] Then, for each ship in the set, within a preset historical period (e.g., the past 365 days), all its AIS trajectory points are scanned. Using a stop point detection algorithm or combined with port geofencing information, data segments of all ships whose speed is close to zero and have been in the known port area for a certain period of time are identified. Each such data segment is identified as an arrival event.
[0169] All arrival events identified for a ship within a preset historical time period are sorted in ascending order by timestamp. Then, the sorted event sequences are paired up.
[0170] For example, the first event is used as the starting point and the second event as the ending point to form a voyage; then, the second event is used as the new starting point and the third event as the ending point to form the next voyage, and so on. Each such pairing constitutes a historical voyage.
[0171] In this context, it specifically refers to a situation in a ship's voyage lifecycle where an arrival event (marking the end of a berth and the start of the next leg of the voyage) is sequentially adjacent to the next arrival event (marking the end of the previous leg of the voyage), with no other identified berth events in between. This reflects the continuous operational cycle of a ship's "departure, voyage, arrival," meaning it is continuous in time.
[0172] A historical voyage abstractly represents a complete commercial transport or movement mission of a ship, that is, the process of departing from one port (origin) and sailing to another port (destination). It is the logical context unit for building subsequent analyses (such as destination identification).
[0173] The previous port information includes the port identifier of the first arrival event on which the pairing is based; the next port information includes the port identifier of the second arrival event on which the pairing is based.
[0174] Departure time includes the departure time extracted from the first arrival event; arrival time includes the arrival time extracted from the second arrival event.
[0175] By organizing all historical voyages of a ship within a preset historical period through the above steps into a list or sequence in chronological order, this ordered set constitutes the ship's voyage data. Ship voyage data is not merely a record of port pairs, but also implicitly contains behavioral characteristics such as the ship's route patterns and operational habits.
[0176] In one specific embodiment, optionally, in order to overcome the problems of weak semantic understanding, low recognition accuracy and untimely updates in related technologies in AIS ship destination parsing, the present invention proposes an intelligent recognition and self-learning method for AIS ship destination based on a large language model and cluster analysis, so as to realize high-precision semantic standardization and dynamic evolution of AIS destination fields.
[0177] This embodiment provides a ship destination identification method based on a large language model, which is particularly suitable for the automatic identification, semantic normalization and dynamic learning optimization of the destination field in massive AIS ship data.
[0178] By integrating ship OD data from historical voyages and combining the semantic understanding capabilities of large models with text embedding clustering algorithms, we can achieve standardized merging and self-learning iteration of non-standard destination fields.
[0179] Step S1: Data Preparation (1) The system first filters all ships with a gross tonnage greater than 3,000 from AIS data or ship database to form a target ship set, denoted as S; ; in, This refers to the gross tonnage of the ship.
[0180] (2) Each ship in the set Extract its port call history over the past three months to form a set of OD data (Origin-Destination), i.e., vessel voyage data, denoted as Each OD record includes: the name and latitude / longitude coordinates of the previous port; the name and latitude / longitude coordinates of the next port; and the start and end times (departure and arrival times). (3) Within each OD time period, extract the destination field data reported by the ship's AIS system, including the destination text, reporting time, ship position coordinates, and heading. Integrate and insert this destination data into the corresponding OD time period to form a summary of the ship's destination information for the corresponding voyage, resulting in the following combined structure: ; in, For ships The set of all destination data for the j-th voyage's OD.
[0181] Step S2: Data Preprocessing Preprocess the collected destination fields: (1) Remove obviously invalid or erroneous fields, including fields with empty content, test placeholders such as “UNKNOWN” and “TEST”, and abnormal values containing special characters such as horizontal lines, slashes, question marks, and arrows; (2) Standardize the destination text, including: removing extra spaces and symbols; unifying capitalization; performing Chinese-English translation and spelling standardization; word segmentation and language normalization; (3) Form structured destination text cleaning results to prepare for subsequent semantic recognition model input.
[0182] Step S3: Destination clustering and port semantic class establishment: Before proceeding with large-scale model semantic parsing, the system first establishes a port semantic category library based on text embedding technology.
[0183] (1) Text embedding is performed on all cleaned destination fields to generate high-dimensional semantic vectors; (2) Calculate the semantic similarity between fields, and automatically cluster destinations with similarity higher than the threshold using the clustering algorithm HDBSCAN; (3) The central term or frequent item of the cluster represents a standard port semantic category; (4) Align the clustering results with the port geographic knowledge base (coordinates, standard naming) to construct a port semantic class mapping library, denoted as C; (5) Output port class library to provide semantic reference and prior context for subsequent large model recognition.
[0184] Step S4: Large-scale model semantic understanding and destination standardization identification: With the support of a clustering library, the system performs semantic recognition and standardization of the destination field: (1) Input a single destination field into a large language model (LLM). The input information includes the field text, the ship's current position, the OD context, the heading, and the port semantic library; (2) The model is based on natural language understanding ability to determine the port semantic class to which the current field belongs (selected from the class library output by S3) and identify synonyms, spelling errors or language differences; (3) The model output includes the destination name, standard port name, port unique identifier, and prediction confidence value; (4) If the destination field does not match an existing port class, the model will generate candidate clusters and store them temporarily for processing in the subsequent incremental learning stage (S6).
[0185] Step S5: Confidence Assessment and Multi-Source Validation After completing the standardized identification of the large model, the results are comprehensively verified and scored: (1) The sources of confidence include the following aspects: the confidence value of large model predictions That is, the prediction confidence parameter; cluster consistency. In other words, clustering confidence parameters: the semantic distance between the destination vector and its corresponding center vector; and geographic rationality verification. The geographic confidence parameter refers to the degree of consistency between the ship's current position and course and the geographic location of the identified port; historical consistency. Historical confidence parameter: the frequency with which a ship has visited a port.
[0186] (2) Calculate the overall score: ; Where Conf is the comprehensive score, and a, b, c, and d are adjustable weight coefficients.
[0187] Results with low confidence levels will be subject to manual review or automatic secondary matching. Step S6: Incremental learning and feedback loop: (1) The system continuously receives real arrival information of ships as a monitoring signal to verify the previous predicted destination results.
[0188] (2) If the prediction results are found to be inconsistent with the actual port, the system generates new training samples and updates: destination semantic mapping table; embedded clustering model parameters; large model instruction template or threshold parameters.
[0189] (3) The incremental learning module supports online iterative optimization and data version management, and automatically records the evolution process of each destination normalization mapping rule.
[0190] (4) Through the closed-loop mechanism, the system can learn adaptively as AIS data is continuously updated, thereby improving the destination recognition accuracy and real-time response capability.
[0191] Understandably, the ship destination identification method provided by this invention has strong semantic recognition capabilities, effectively solving the problem of field confusion caused by multiple languages, spellings, and aliases; it improves the normalization consistency of standardized ports by combining clustering prior knowledge; and it significantly improves the reliability and interpretability of identification through multi-source confidence assessment.
[0192] Furthermore, it has a self-learning closed-loop mechanism and the ability to dynamically optimize and update knowledge.
[0193] The ship destination identification method can be applied to multiple scenarios, including global port dynamic monitoring, AIS intelligence analysis, traffic risk early warning, and intelligent port management systems.
[0194] like Figure 8As shown in the illustration, this application also provides a ship destination identification device 900, which includes: a sample determination module 902, used to select at least one target sample ship from the data of the Automatic Identification System (AIS); a data extraction module 904, used to extract the ship voyage data of each target sample ship within a preset historical time period; a text extraction module 906, used to extract and associate the destination field text reported by the target sample ship from the ship voyage data, and determine the historical destination information set; and a standard processing module 908, used to clean and standardize the destination field text in the historical destination information set to obtain a structured standard destination information set. The system includes: a destination text data module 910, a clustering vector module 910, which converts standard destination text data into high-dimensional semantic vectors and clusters the semantic vectors using a clustering algorithm to determine the port semantic class library representing different standard ports; a model acquisition module 912, which acquires a large language model; a data input module 914, which inputs the destination field text data of the vessel to be identified into the large language model; and an information recognition module 916, which identifies the corresponding standard port information from the port semantic class library based on the destination field text data using the large language model. The standard port information includes the destination name, the standard name of the destination port, the port unique identifier, and the prediction confidence parameter.
[0195] like Figure 9 As shown, this application embodiment also provides an electronic device 1000, including a processor 1110, a memory 1109, and a program or instructions stored in the memory 1109 and executable on the processor 1110. When the program or instructions are executed by the processor 1110, they implement the various processes of the above-described embodiment of the ship destination identification method and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0196] Optionally, the processor 1110 is used to filter at least one target sample vessel from the Automatic Identification System (AIS) data; Optionally, the processor 1110 is also used to extract voyage data for each target sample vessel within a preset historical time period; Optionally, the processor 1110 is also used to extract and associate the destination field text reported by the target sample vessel from the vessel voyage data to determine the set of historical destination information. Optionally, the processor 1110 is also used to clean and standardize the destination field text in the historical destination information set to obtain structured standard destination text data. Optionally, the processor 1110 is also used to convert standard destination text data into high-dimensional semantic vectors, and to cluster the semantic vectors using a clustering algorithm to determine port semantic class libraries representing different standard ports. Optionally, the processor 1110 is also used to acquire a large language model; Optionally, the processor 1110 is also used to input the destination field text data of the vessel to be identified into a large language model; Optionally, the processor 1110 is also used to identify corresponding standard port information from a port semantic library based on the destination field text data using a large language model.
[0197] The memory 1109 can be used to store software programs and various data. The memory 1109 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 1109 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 1109 in this embodiment includes, but is not limited to, these and any other suitable types of memory.
[0198] This application also provides a readable storage medium storing a program or instructions. When executed by a processor, the program or instructions implement the various processes of the above-described ship destination identification method embodiments and achieve the same technical effects. To avoid repetition, these will not be described again here. Furthermore, the readable storage medium improves the data storage capacity and data processing speed of the ship destination identification method in this application.
[0199] A computer-readable storage medium can be a tangible device that holds and stores instructions for use by an instruction execution device. A computer-readable storage medium can be an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing, but is not limited thereto. A non-exhaustive list of more specific examples of computer-readable storage media includes: portable computer floppy disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable optical disc read-only memory (CD-ROM), digital universal disk (DVD), memory cards, floppy disks, encoding mechanical devices (e.g., punched cards or grooves with raised structures for recording instructions), and any suitable combination of the foregoing. The computer-readable storage medium used herein should not be construed as the transmission of signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media, or electrical signals transmitted through wires.
[0200] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0201] In this invention, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance; the term "multiple" refers to two or more unless otherwise explicitly defined. The terms "install," "connect," "link," and "fix" should be interpreted broadly. For example, "connect" can be a fixed connection, a detachable connection, or an integral connection; "link" can be a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0202] In the description of this invention, it should be understood that the terms "upper," "lower," "left," "right," "front," "rear," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or unit referred to must have a specific orientation or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0203] In the description of this specification, the terms "one embodiment," "some embodiments," "specific embodiment," etc., refer to specific features, structures, materials, or characteristics described in connection with an embodiment or example that are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0204] The above are merely preferred embodiments of the present invention and are not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for identifying a ship's destination, characterized in that, include: Select at least one target sample vessel from the Automatic Identification System (AIS) data; Extract the voyage data of each target sample vessel within a preset historical time period; Extract and associate the destination field text reported by the target sample vessel from the vessel voyage data to determine the historical destination information set; The destination field text in the historical destination information set is cleaned and standardized preprocessed to obtain structured standard destination text data; The standard destination text data is converted into high-dimensional semantic vectors, and the semantic vectors are clustered using a clustering algorithm to determine the port semantic class library representing different standard ports. Obtain a large language model; Input the destination field text data of the vessel to be identified into the large language model; The large language model identifies the corresponding standard port information from the port semantic library based on the destination field text data; The standard port information includes the destination name, the standard name of the destination port, the port unique identifier, and the predicted confidence level parameter.
2. The ship destination identification method according to claim 1, characterized in that, The step of identifying the corresponding standard port information from the port semantic library based on the destination field text data includes: If the destination field text has a corresponding standard destination text data in the port semantic class library, then the standard port information corresponding to the standard destination text data is output as the matching result. If the destination field text does not have corresponding standard destination text data in the port semantic class library, then candidate clusters are generated through the large language model, and the candidate clusters include at least one destination name prediction result.
3. The ship destination identification method according to claim 2, characterized in that, If the destination field text does not have corresponding standard destination text data in the port semantic class library, then candidate clusters are generated through the large language model, including: A new port semantic candidate class is generated based on the large language model; Records containing the destination field text and its associated context data are marked as new samples and stored in the sample pool to be processed; Obtain the preset sample threshold; When the number of new samples for the same port semantic candidate class in the sample pool to be processed accumulates to the preset sample threshold, or when real arrival information verification for the port semantic candidate class is received, the port semantic candidate class is added to the port semantic class library as a new standard port semantic class.
4. The ship destination identification method according to claim 1, characterized in that, The step of identifying corresponding standard port information from the port semantic library based on the destination field text data using the large language model includes: The clustering confidence parameter is determined based on the semantic distance between the high-dimensional semantic vector corresponding to the destination field text of the vessel to be identified and the center of the matching cluster in the port semantic library. Obtain the real-time location parameters of the vessel to be identified when it reports the destination field text; The geographical confidence parameter is determined based on the degree of consistency between the real-time location parameters and the geographical location corresponding to the destination port. The historical confidence parameters are determined based on the frequency of visits to the destination port corresponding to the vessel to be identified. The overall confidence score is calculated by weighting the predicted confidence parameter, cluster confidence parameter, geographical confidence parameter, and historical confidence parameter. When the overall confidence score is lower than the preset confidence threshold, the standard port information is matched a second time.
5. The ship destination identification method according to claim 4, characterized in that, Also includes: Receive the actual arrival information of the vessel to be identified corresponding to the destination port; The actual arrival information is used as a monitoring signal and compared with the standard port information for verification. If an identification error is found during comparison, an error correction training sample is generated. The error correction training sample includes destination error correction field text, actual arrival information, real-time location parameters, and voyage context data. The port semantic library is updated based on the error correction training samples.
6. The ship destination identification method according to claim 5, characterized in that, The step of updating the port semantic library based on the error-correcting training samples includes: The destination error correction field text is added to the standard destination text data to update the standard destination text data; The updated standard destination text data is re-transformed into high-dimensional semantic vectors. The updated semantic vectors are re-clustered using a clustering algorithm; The latest representative name of the destination port is obtained by using the most frequent text within the cluster after clustering or the matching text corresponding to the actual arrival information. This completes the incremental update of the port semantic library.
7. The ship destination identification method according to any one of claims 1 to 6, characterized in that, The extraction of voyage data for each target sample vessel within a preset historical time period includes: Extract all arrival events of the target sample vessel within a preset historical time period from historical data of the Automatic Identification System (AIS); Arrival events that are consecutive in time are paired to form multiple historical voyages. Each historical voyage includes information on the previous port, information on the next port, departure time, and arrival time. Ship voyage data is determined based on multiple historical voyages.
8. A ship destination identification device, characterized in that, include: The sample determination module is used to select at least one target sample vessel from the Automatic Identification System (AIS) data. The data extraction module is used to extract voyage data for each of the target sample vessels within a preset historical time period; The text extraction module is used to extract and associate the destination field text reported by the target sample vessel from the vessel voyage data to determine the historical destination information set; The standard processing module is used to clean and standardize the destination field text in the historical destination information set to obtain structured standard destination text data. The clustering vector module is used to convert the standard destination text data into high-dimensional semantic vectors, and to cluster the semantic vectors using a clustering algorithm to determine the port semantic class library representing different standard ports. The model acquisition module is used to acquire large language models; The data input module is used to input the destination field text data of the vessel to be identified into the large language model; The information recognition module is used to identify the corresponding standard port information from the port semantic library based on the destination field text data using the large language model; The standard port information includes the destination name, the standard name of the destination port, the port unique identifier, and the predicted confidence level parameter.
9. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the ship destination identification method as described in any one of claims 1 to 7.
10. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the ship destination identification method as described in any one of claims 1 to 7.