Method and related device for identifying events of waterborne traffic activities in port waters
By acquiring ship AIS and port business data within port waters, preprocessing the data, and constructing an ID3 algorithm decision tree model, the accuracy problem of identifying ship behavior under complex conditions in existing technologies is solved, achieving highly accurate and reliable traffic event identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHAN UNIV OF TECH
- Filing Date
- 2026-02-04
- Publication Date
- 2026-06-09
AI Technical Summary
In existing technologies, AIS-based ship behavior recognition has difficulty accurately distinguishing traffic events under complex conditions, such as berthing versus slow approach, normal waiting at anchor versus abnormal drifting, resulting in low recognition accuracy.
By acquiring AIS data of ships and port business data in the port waters, preprocessing the data, constructing preset semantic feature data, and using an event recognition decision tree model based on the ID3 algorithm to identify traffic activity events.
It improves the accuracy of identifying maritime traffic events in port waters and the reliability in complex environments, enabling accurate differentiation of complex operating conditions.
Smart Images

Figure CN122176958A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent water transportation technology, and in particular to a method and related equipment for identifying water traffic events in port waters. Background Technology
[0002] Port maritime traffic management relies on real-time monitoring of vessel navigation, berthing, anchoring, and operations to support dispatching, port and shipping supervision, and safety management. Accordingly, vessel dynamics are primarily acquired through Automatic Identification Systems (AIS), while port operation plans, berth plans, and pilotage plans are provided by the Port Call or Terminal Operating System. Among related technologies, AIS-based vessel behavior recognition generally relies on manual rules or simple thresholds (such as speed and heading changes), making it difficult to accurately distinguish complex operating conditions, such as the difference between berthing and slow approach, the distinction between normal waiting at anchor and abnormal drifting, and the identification of pilotage boarding. Furthermore, its accuracy in identifying traffic incidents is relatively low.
[0003] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the Invention
[0004] The main objective of this application is to propose a method and related equipment for identifying water traffic events in port waters, which can effectively improve the accuracy of identifying water traffic events in port waters and enhance the reliability and generalization ability of event identification in complex water environments.
[0005] To achieve the above objectives, one aspect of this application proposes a method for identifying maritime traffic events in port waters, the method comprising: Acquire first port data within the target port waters; wherein, the first port data includes vessel AIS data and port business data; The first port data is preprocessed to obtain the second port data; Preset semantic feature data is constructed based on the second port data; Traffic activity event type data is obtained by identifying traffic activity events through a preset event recognition decision tree model based on the preset semantic feature data; wherein, the preset event recognition decision tree is constructed based on the ID3 algorithm.
[0006] In some embodiments, acquiring the first port data within the target port waters includes: The original AIS message data is acquired, and then the original AIS message data is cropped according to preset spatial boundary conditions to obtain ship AIS data. The port business data is obtained, and then the port business data and the ship AIS data are associated to obtain the first port data.
[0007] In some embodiments, the step of preprocessing the first port data to obtain the second port data includes: The missing values of the ship's AIS data are removed to obtain the first AIS data; The first AIS data is traversed according to preset fields to identify duplicate records and obtain duplicate data identification results; wherein, the duplicate data identification results include a first data row with completely duplicate data or a second data row with partially duplicate data; Based on the duplicate data identification results, the first AIS data is subjected to a preset duplicate deletion process to obtain the second AIS data; wherein, the preset duplicate deletion process includes partially deleting the first data row or completely deleting the second data row; The third AIS data is obtained by performing outlier processing on the second AIS data. The second port data is constructed by combining the third AIS data with the port business data.
[0008] In some embodiments, constructing preset semantic feature data based on the second port data includes: Construct an event semantic feature tagging system; wherein, the event semantic feature tagging system includes location semantic feature types, motion state semantic feature types, interaction relationship semantic feature types, and business operation semantic feature types; The second port data is transformed into discrete semantic labels through the event semantic feature labeling system to obtain the preset semantic feature data.
[0009] In some embodiments, before performing the traffic activity event identification based on the preset semantic feature data through a preset event recognition decision tree model to obtain traffic activity event type data, the method further includes: Based on a pre-defined hierarchical classification system for events, historical ship trajectory samples are labeled with event tags to construct a model training dataset. Discretize the continuous feature data in the model training dataset to construct a candidate attribute set; Information gain is calculated based on the candidate attribute set, and the expected splitting feature is determined by the calculated feature information gain data. Based on the expected splitting features, a decision tree discriminant structure is recursively generated to obtain the preset event recognition decision model.
[0010] In some embodiments, after performing the traffic activity event identification based on the preset semantic feature data through a preset event recognition decision tree model to obtain traffic activity event type data, the method further includes: The traffic activity event type data is standardized and encoded according to a preset event coding system to obtain an event identification data packet; wherein, the preset event coding system is constructed by classifying and coding ship event behavior scenarios.
[0011] To achieve the above objectives, another aspect of this application provides a device for identifying maritime traffic events in port waters, the device comprising: The first module is used to acquire first port data within the target port waters; wherein, the first port data includes vessel AIS data and port business data; The second module is used to preprocess the first port data to obtain the second port data. The third module is used to construct preset semantic feature data based on the second port data; The fourth module is used to identify traffic activity events based on the preset semantic feature data through a preset event recognition decision tree model, and obtain traffic activity event type data; wherein the preset event recognition decision tree is constructed based on the ID3 algorithm.
[0012] To achieve the above objectives, another aspect of this application provides an electronic device, the electronic device comprising: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor performs the method described above.
[0013] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0014] To achieve the above objectives, another aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method. The embodiments of this application include at least the following beneficial effects: This application provides a method, apparatus, electronic device, storage medium, and program product for identifying water traffic activity events in port waters. This solution acquires vessel AIS data and port business data (i.e., first port data) within the target port waters, preprocesses the first port data to obtain second port data, and then constructs preset semantic feature data based on the second port data. Next, the embodiments of this invention identify traffic activity events using a preset event recognition decision tree model constructed based on the ID3 algorithm, based on the preset semantic feature data, to obtain traffic activity event type data, thereby achieving the identification of water traffic activity events in port waters. It is readily understood that by combining vessel AIS data and port business data for traffic activity event identification, the embodiments of this invention can improve the reliability and generalization ability of event identification in complex water environments. Simultaneously, by combining the preset event decision tree constructed based on the ID3 algorithm for water traffic activity event identification, the accuracy of water traffic activity event identification in port waters is effectively improved. Attached Figure Description
[0015] Figure 1 This is a flowchart of the port waterway waterway traffic activity event identification method provided in the embodiments of the present invention; Figure 2 This is a schematic diagram of the construction process of the decision tree model provided in the embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of the port waterway water traffic activity event identification device provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0017] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”
[0018] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0020] Before providing a detailed description of the embodiments of this application, some of the nouns and terms involved in the embodiments of this application will be explained first. The nouns and terms involved in the embodiments of this application are subject to the following interpretations.
[0021] Decision Tree model: A supervised learning algorithm based on a tree structure for decision-making, applicable to classification and regression tasks. Accordingly, it simulates the human decision-making process, breaking down complex problems into a series of simple judgment steps to arrive at a conclusion.
[0022] Port maritime traffic management relies on real-time monitoring of vessel navigation, berthing, anchoring, and operations to support dispatching, port and shipping supervision, and safety management. Accordingly, vessel dynamics are primarily acquired through Automatic Identification Systems (AIS), while port operation plans, berth plans, and pilotage plans are provided by the Port Call or Terminal Operating System. Among related technologies, AIS-based vessel behavior recognition generally relies on manual rules or simple thresholds (such as speed and heading changes), making it difficult to accurately distinguish complex operating conditions, such as the difference between berthing and slow approach, the distinction between normal waiting at anchor and abnormal drifting, and the identification of pilotage boarding. Furthermore, its accuracy in identifying traffic incidents is relatively low.
[0023] In view of this, this application provides a method, apparatus, electronic device, storage medium, and program product for identifying maritime traffic events in port waters. This solution acquires vessel AIS data and port business data (i.e., first port data) within the target port waters, preprocesses the first port data to obtain second port data, and then constructs preset semantic feature data based on the second port data. Next, this embodiment of the invention identifies traffic events using a preset event recognition decision tree model constructed based on the ID3 algorithm, based on the preset semantic feature data, to obtain traffic event type data, thereby achieving maritime traffic event identification in port waters. This effectively improves the accuracy of maritime traffic event identification in port waters and enhances the reliability and generalization ability of event identification in complex water environments.
[0024] The port waterway traffic event identification method provided in this application relates to the field of intelligent water transportation technology. This method can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or vehicle-mounted terminal, but is not limited to these. The server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network. The software can be an application implementing the port waterway traffic event identification method, but is not limited to the above forms.
[0025] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0026] Figure 1 This is an optional flowchart of the port waterway maritime traffic event identification method provided in the embodiments of this application. Figure 1 The method may include, but is not limited to, steps S110 to S140.
[0027] Step S110: Obtain the first port data within the target port waters. The first port data includes vessel AIS data and port operation data.
[0028] Step S120: Perform data preprocessing on the first port data to obtain the second port data.
[0029] Step S130: Construct preset semantic feature data based on the second port data.
[0030] Step S140: Based on the preset semantic feature data, traffic activity events are identified using a preset event recognition decision tree model to obtain traffic activity event type data. The preset event recognition decision tree is constructed based on the ID3 algorithm.
[0031] In this specific embodiment, the present invention first acquires first port data within the target port waters. Specifically, the target port waters in this embodiment refer to the port waters where maritime traffic activity event identification needs to be performed. Accordingly, the first port data in this embodiment includes vessel AIS data and port business data. For example, the present invention acquires the dynamic AIS data of vessels within the target port waters and extracts information such as vessel identification, timestamp, position, speed, heading, and navigation status. Simultaneously, the present invention also acquires port business data corresponding to the vessel, including berthing and departure times, pilotage operation times, loading and unloading operation times, and other business information, and associates the AIS data and port business data through the vessel identification to obtain the first port data. Next, the present invention preprocesses the first port data to obtain second port data, and then constructs preset semantic feature data based on the second port data. Specifically, since the acquired vessel AIS data often contains data anomalies, such as missing, duplicate, and abnormal data, the present invention cleans the data and smooths the vessel trajectory data to obtain vessel motion trajectory data that meets the requirements of subsequent event identification, thereby constructing the second port data. Accordingly, based on the ship AIS data and port business data obtained after data preprocessing (i.e., second port data), this embodiment of the invention extracts and constructs a set of semantic features for application specimen recognition, namely, preset semantic feature data. Finally, this embodiment of the invention uses the preset semantic feature data to identify traffic activity events through a preset event recognition decision tree model, obtaining traffic activity event type data. Specifically, this embodiment of the invention pre-constructs a preset event recognition decision tree model based on the ID3 algorithm. Accordingly, this embodiment of the invention uses the preset semantic feature data as input and constructs a decision tree model for identifying water traffic activity events in port waters, namely, the preset event recognition decision tree model, to determine the type of traffic activity event corresponding to the ship in the port waters by progressively judging the ship's current state, thereby achieving the identification of water traffic activity events.
[0032] In some embodiments of the present invention, acquiring first port data within the target port waters includes, but is not limited to, the following steps: The original AIS message data is acquired, and then the original AIS message data is cropped according to the preset spatial boundary conditions to obtain the ship's AIS data.
[0033] The port business data is acquired, and then the port business data is correlated with the ship AIS data to obtain the first port data.
[0034] In this specific embodiment, the present invention first acquires raw AIS message data, then performs regional cropping on the raw AIS message data according to preset spatial boundary conditions to obtain ship AIS data, and acquires port business data. Then, by associating the port business data and ship AIS data, a first port data set is constructed. Specifically, the present invention first collects continuous dynamic messages covering the study area from AIS shore-based receiving stations, VTS centers, and preset maritime databases surrounding the target port waters; that is, raw AIS message data, to construct a ship motion trajectory dataset. The raw AIS message data acquired in this embodiment includes key fields such as MMSI, latitude and longitude, speed over land (SOG), heading over land (COG), heading, and ship status. Preset spatial boundary conditions, such as setting port boundaries, anchorage ranges, and channel centerlines, are used to perform regional cropping on the raw messages to obtain ship AIS data. Furthermore, to supplement the business semantic information of vessels while in port, this embodiment of the invention simultaneously acquires structured business data generated by the port scheduling system, port and shipping management platform, or the vessel management's PortCall system, including berthing plans (ETAs), actual berthing and departure times (ATAs, ATDs), pilotage applications and boarding / disembarking times, tugboat usage records, and loading / unloading operation start and end times. Further, this embodiment of the invention achieves association between PortCall data and AIS data through multi-field comparison of MMSI, vessel name, and IMO number, providing reliable data for subsequent event semantic binding and decision tree training.
[0035] In some embodiments of the present invention, data preprocessing is performed on the first port data to obtain the second port data, including but not limited to the following steps: Missing values were removed from the ship's AIS data to obtain the first AIS data.
[0036] The system iterates through the first AIS data based on preset fields to identify duplicate records, thus obtaining the duplicate data identification results. These results include either the first data row containing completely duplicate data or the second data row containing partially duplicate data.
[0037] Based on the duplicate data identification results, the first AIS data undergoes a preset duplicate deletion process to obtain the second AIS data. This preset duplicate deletion process includes either partially deleting rows from the first data line or completely deleting rows from the second data line.
[0038] Outlier handling is performed on the second AIS data to obtain the third AIS data.
[0039] The second port data was constructed by combining the third AIS data with port business data.
[0040] In this specific embodiment, the present invention first performs missing value deletion processing on the ship's AIS data to obtain first AIS data. Specifically, due to electromagnetic interference, geographical environment interference, other equipment problems, and human operation issues during ship navigation, AIS data may contain missing values, duplicate values, and outliers, requiring cleaning processing of the acquired ship AIS data. Accordingly, the present invention first traverses the ship's AIS data to filter out missing values and directly deletes them to obtain first AIS data. Next, the present invention traverses the first AIS data according to preset fields to identify duplicate records, and performs preset duplicate deletion processing on the first AIS data based on the identified duplicate data results to obtain second AIS data. Specifically, the preset fields in the present invention include two fields: MMSI and AIS message time. For example, by traversing the AIS data using the MMSI and AIS message time fields, duplicate values in the first AIS data are identified. Accordingly, the identified duplicate data results in the present invention include a first data row and a second data row. In this invention, the first data row refers to a data row with completely identical data, such as two rows of data having completely identical ship dynamic information such as latitude and longitude. The second data row refers to a data row with partially identical data, such as two rows of data having identical ship static information and time. Accordingly, the deletion processing performed on the first or second data row in this embodiment includes partial deletion or complete deletion. Specifically, this embodiment performs partial deletion processing on the first data row with completely identical data, that is, retaining the first retrieved data row and deleting other data rows in the first data row besides the first retrieved data row. For example, when the first data row has two rows of data that are completely identical, this embodiment retains the first retrieved data row and deletes the second retrieved data row. Alternatively, this embodiment directly performs complete deletion on the second data row. For example, when the retrieved second data row has two rows of data that are partially inconsistent, this embodiment directly deletes both rows. Further, this embodiment performs outlier processing on the second AIS data to obtain third AIS data, and then constructs second port data based on the third AIS data and port business data. Specifically, outliers in this embodiment include erroneous data types and drifting data types. Accordingly, for erroneous data among outliers, this embodiment of the invention sets a threshold range and deletes data exceeding the range. For example, the speed range is set to [0 knots, 25 knots], and the heading range is [0, 360°), and data rows exceeding the range are deleted. Furthermore, for drift data among outliers, this embodiment of the invention sets boundary parameters to delete data rows outside the boundaries.For example, in this invention, the study boundary is defined, and then data rows whose location information exceeds the boundary latitude and longitude are deleted to complete the processing of drift data.
[0041] In some embodiments of the present invention, preset semantic feature data is constructed based on second port data, including but not limited to the following steps: Construct an event semantic feature labeling system. This system includes location semantic feature types, motion state semantic feature types, interaction relationship semantic feature types, and business operation semantic feature types.
[0042] The second port data is transformed into discrete semantic labels through an event semantic feature labeling system, resulting in preset semantic feature data.
[0043] In this specific embodiment, the present invention first constructs an event semantic feature labeling system, and then uses this system to convert the second port data into discrete semantic labels, obtaining preset semantic feature data. Specifically, after data preprocessing, the present invention constructs an event semantic feature recognition system to characterize the key attributes of port water traffic activities. Accordingly, the event semantic feature labeling system in this embodiment includes location semantic feature types, motion state semantic feature types, interaction relationship semantic feature types, and business operation semantic feature types, that is, key attributes are characterized as location semantic features, motion state semantic features, interaction relationship semantic features, and business operation semantic features. Among them, the location semantic features in this embodiment are used to represent the functional area and boundary state of the vessel, including area type semantics (such as channel area, port basin area, berth area, anchorage area, loading and unloading operation area, and waters outside the port), area boundary semantics (such as entering the area, leaving the area, within the area, and crossing the area), and geometric relationship semantics with the berth (such as approaching the berth, already at the berth, and far from the berth). Accordingly, motion state semantic features are used to represent the discretized results of a ship's navigation state, including speed state semantics (e.g., stationary, low speed, operating speed, sailing speed), speed change semantics (e.g., acceleration, deceleration, essentially unchanged), and heading state semantics (e.g., stable heading, slow turn, sharp turn). These semantic features are obtained by segmenting and thresholding the original speed, heading, and their time-series changes. Additionally, interaction relationship semantic features are used to represent the spatial and operational relationships between a ship and other ships and port facilities, including relationships with facilities (e.g., interaction with pilot ships, interaction with tugboats, no significant interaction) and relationships with other ships (e.g., sailing alone, berthing formation, towing formation). Simultaneously, operational semantic features are used to represent the operational status of a ship in the port's production and operation process, including operation type semantics (e.g., pilotage operation, towing operation, loading / unloading operation, refueling operation) and operation stage semantics (e.g., operation preparation, operation in progress, operation completed). Furthermore, the embodiments of the present invention, through the constructed event semantic feature label system, uniformly convert the original continuous data into a set of discrete semantic labels with clear meanings, enabling the decision tree model to perform node division and path reasoning within a unified semantic space, thereby realizing the identification of multiple categories of port waterway traffic events.
[0044] In some embodiments of the present invention, before performing traffic activity event identification based on preset semantic feature data and a preset event identification decision tree model to obtain traffic activity event type data, the port waterway waterway traffic activity event identification method provided by the embodiments of the present invention further includes, but is not limited to, the following steps: Based on a pre-defined event hierarchical classification system, historical ship trajectory samples are labeled with event tags to construct a model training dataset.
[0045] Discretize the continuous feature data in the model training dataset to construct a candidate attribute set.
[0046] Information gain is calculated based on the candidate attribute set, and then the expected splitting feature is determined by the calculated feature information gain data.
[0047] Based on the expected splitting features, a decision tree discriminant structure is recursively generated to obtain the preset event recognition decision model.
[0048] In this specific embodiment, the present invention first labels historical ship trajectory samples with event tags according to a preset event hierarchical system to construct a model training dataset. Then, the continuous feature data in the model training dataset is discretized to obtain a set of candidate attributes. Specifically, in constructing a decision tree model for identifying water traffic activities in port waters, the present invention uses the ID3 algorithm as the core inference mechanism. Accordingly, the present invention first labels historical ship trajectory samples with event tags based on a hierarchical classification system for water traffic activities in port waters, i.e., a preset event hierarchical classification system, to construct a model training dataset. In this embodiment, the event tags include first-level event categories, second-level categories, and third-level subcategories. Accordingly, after completing the sample labeling, the samples and their corresponding event tags are used as training data to construct a decision tree model for identifying water traffic activities in port waters, i.e., a preset event identification decision model. In this embodiment, each internal node of the decision tree selects the optimal partitioning attribute using the ID3 information gain criterion. Further, as... Figure 2 As shown, to adapt to ID3's requirements for discrete attributes, this embodiment of the invention discretizes continuous features in the dataset, such as velocity SOG, acceleration ΔSOG / Δt, rate of change of heading ROT, DCPA / TCPA, water depth matching degree, berth distance, and other continuous feature data, to obtain a set of candidate attributes. The discretization processing method in this embodiment includes: 1) Binning based on business semantics (such as distance thresholds for berthing approach area / mooring area / berth operation area). 2) Adaptive binning based on statistical quantiles (e.g., dividing low / medium / high speed intervals according to training set quantiles); 3) Combine the status switching of the PortCall time anchor point (such as before and after pilotage boarding, before and after towing establishment / cancellation); 4) Discretized attributes serve as candidates for decision tree splitting, improving model interpretability and generalization ability.
[0049] Furthermore, in this embodiment of the invention, information gain is calculated based on the candidate attribute set, and then the expected splitting feature is determined through the calculated feature information gain data. A decision tree discriminant structure is recursively generated based on the expected splitting feature to construct a preset event recognition decision model. Specifically, during the decision tree growth process, let the training sample set of the current node be S, and the category set be... , ; belongs to category The number of samples is ,but In this embodiment of the invention, the empirical entropy is defined as follows:
[0050] Let the set of values for candidate attribute A be V(A)={v1,…,vm}, and let the training sample set S be divided into subsets according to A=vj. , The conditional entropy is then expressed as follows:
[0051] Accordingly, the information gain in this embodiment of the invention is defined as follows:
[0052] Next, when the decision tree model enters the node splitting stage, the system calculates the reduction in uncertainty of the event category for each attribute from the candidate attribute set based on the sample set of the current node, and selects candidate attributes as the node splitting conditions based on this reduction, thereby constructing a decision tree structure for identifying water traffic activities in port waters. Specifically, this embodiment of the invention can use semantic features characterizing the overall motion state of the vessel and water attributes as candidate attributes to perform initial hierarchical partitioning of samples, distinguishing different basic behavioral patterns. Furthermore, in the further node partitioning process, this embodiment of the invention can introduce semantic features related to spatial location relationships to distinguish different operational scenarios or event types. Simultaneously, in a more granular discrimination stage, this embodiment of the invention can also introduce interaction relationship semantics and business association semantics to support the identification of specific sub-categories of events.
[0053] Furthermore, in this embodiment of the invention, the construction of the decision tree model is performed recursively. Specifically, when a node sample meets a preset category purity condition, the further splitting of that node is terminated, and the corresponding event category is output. Correspondingly, when the candidate attribute set is exhausted or the splitting gain is lower than a preset threshold, a majority voting method can be used to determine the node output result. In addition, to improve the robustness of the model, this embodiment of the invention can also prune the generated tree structure to reduce redundant splitting caused by noisy data. It is readily understood that the decision tree model constructed in the above manner in this embodiment of the invention can, based on AIS temporal features, spatial regional semantics, and port business data, perform layer-by-layer discrimination of ship status and output the port waterway maritime traffic activity event type and its code corresponding to the identification result.
[0054] In some embodiments of the present invention, after performing traffic activity event identification based on preset semantic feature data and a preset event identification decision tree model to obtain traffic activity event type data, the port waterway waterway traffic activity event identification method provided by the embodiments of the present invention further includes, but is not limited to, the following steps: Traffic event type data is standardized and encoded according to a preset event coding system to obtain event identification data packets. The preset event coding system is constructed by classifying and coding ship event behavior scenarios.
[0055] In this specific embodiment, the present invention standardizes and encodes traffic activity event data using a preset event coding system to obtain event identification data packets. Specifically, the preset event coding system in this embodiment is constructed by classifying and coding ship event behavior scenarios. To ensure that the event identification results have unified semantic boundaries and interchangeability, this embodiment defines port waterway traffic activity events as: dynamic behaviors or scenarios that have clear start and end points, specific operational attributes and service objects, and can be identified through AIS and business data during the navigation, berthing, operation, and auxiliary support processes of ships in port-related waterways. Simultaneously, the event classification in this embodiment follows the principles of ease of identification, collection, and statistics, adopts a linear classification method, and maintains coordination with relevant management departments or industry terminology to support port scheduling, traffic management, and information service scenarios. Correspondingly, the event coding in this embodiment adopts a hierarchical coding method, with the code consisting of 5 equal-length numeric codes: the first digit is the primary category code; the second and third digits are the secondary category code; and the fourth and fifth digits are the tertiary category code; the coding structure is denoted as: A BB CC. Accordingly, the port water traffic activity event classification and coding table constructed in this embodiment of the invention is shown in Table 1 below: Table 1
[0056] Accordingly, after event identification is completed, this embodiment of the invention maps the confirmed semantic events to the aforementioned standardized three-level subclass codes. Through this coding mechanism, this embodiment generates structured event data packets, including vessel MMSI, event time, event location, event code, and related attribute features, achieving standardized, traceable, and shareable management of maritime traffic events in port waters. This method effectively integrates AIS and PortCall information, combined with the hierarchical discrimination logic of decision trees, to accurately identify maritime traffic events in port waters, providing real-time and reliable data support for port scheduling, supervision, and safety management.
[0057] It is readily understood that this invention first utilizes a hierarchical event system for port waterway traffic activities, integrating ship AIS dynamic data, port area spatial range, and PortCall business information to achieve automatic identification and structured representation of waterway traffic events in port waters. Compared to methods that rely solely on trajectory geometry or fixed threshold rules for discrimination, this invention can accurately distinguish between various navigation and operational behaviors of ships in complex port environments, effectively reducing confusion between different event types. Secondly, this invention constructs a port waterway waterway traffic event identification model, namely a pre-defined event identification decision tree model, organizing the event discrimination process into a progressively layered semantic reasoning structure. This allows the model to gradually determine the event category based on the ship's motion state, spatial position relationship, and interactive behavior characteristics, thereby ensuring consistency between the event identification results and actual port operation procedures and improving the stability and interpretability of the identification results. Furthermore, this invention can also associate the identification results with the port area spatial range after completing event identification, and visually display the location and time of the event in a visual manner. This invention can mark identified port waterway traffic events at specific locations and times along vessel tracks, and simultaneously display the corresponding event type and event code, presenting the event results intuitively in a spatial and temporal format. Furthermore, this invention standardizes the coding output of port waterway traffic events, giving the event identification results a unified data representation. The event coding results in this invention can be directly used for subsequent event retrieval, statistical analysis, and linkage with monitoring systems, avoiding ambiguity issues caused by traditional manual annotation or unstructured descriptions, and facilitating the automated management and intelligent application of port waterway traffic events.
[0058] Please see Figure 3 This application also provides a port waterway maritime traffic event identification device, which can implement the above-described method. The device includes: The first module 210 is used to acquire first port data within the target port waters. This first port data includes vessel AIS data and port operation data.
[0059] The second module 220 is used to preprocess the data of the first port to obtain the data of the second port.
[0060] The third module 230 is used to construct preset semantic feature data based on the second port data.
[0061] The fourth module 240 is used to identify traffic activity events based on preset semantic feature data and a preset event recognition decision tree model, thereby obtaining traffic activity event type data. The preset event recognition decision tree is constructed based on the ID3 algorithm.
[0062] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0063] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0064] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0065] Please see Figure 4 , Figure 4 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 310 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 320 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 320 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 320 and is called and executed by the processor 310 using the methods described in the embodiments of this application. Input / output interface 330 is used to realize information input and output; The communication interface 340 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 350 transmits information between various components of the device (e.g., processor 310, memory 320, input / output interface 330, and communication interface 340); The processor 310, memory 320, input / output interface 330 and communication interface 340 are connected to each other within the device via bus 350.
[0066] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0067] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0068] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0069] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented by the embodiments of this program product are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0070] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0071] The port waterway maritime traffic event identification method, apparatus, electronic device, storage medium, and program product provided in this application comprehensively utilize AIS dynamic data of vessels within the port waterway and port business data (PortCall data). Through association and preprocessing of multi-source data, an event semantic feature system is constructed, encompassing location semantics, motion state semantics, interaction relationship semantics, and business operation semantics. Using this semantic feature as input, a decision tree model is employed as the event identification mechanism to discriminate and confirm maritime traffic events in the port waterway. Finally, standardized event codes corresponding to the identification results are generated and structured event data is output. This invention can improve the accuracy and consistency of maritime traffic event identification even when AIS data is noisy, incomplete, or the port operating conditions are complex. Furthermore, the output results in this invention adopt a unified encoding format, facilitating the storage, retrieval, statistics, and cross-system exchange of event data, thereby improving the versatility and engineering deployability of the event identification method. Accordingly, embodiments of the present invention can improve the accuracy of identifying port vessel berthing, anchoring, loading and unloading operations, pilotage, and abnormal behavior events, and reduce the risk of misjudgment caused by relying solely on manual rules or simple threshold judgments. Simultaneously, by constructing a unified event structured coding system, the present invention achieves standardized and automated processing of event data. Furthermore, by combining AIS dynamic data of vessels within port waters with port business data, embodiments of the present invention achieve multi-data source fusion, improving the reliability and generalization capability of event identification in complex water environments.
[0072] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0073] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0074] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0075] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0076] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0077] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0078] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0079] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0080] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0081] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0082] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A method for identifying maritime traffic events in port waters, characterized in that, The method includes the following steps: Acquire first port data within the target port waters; wherein, the first port data includes vessel AIS data and port business data; The first port data is preprocessed to obtain the second port data; Preset semantic feature data is constructed based on the second port data; Traffic activity event type data is obtained by identifying traffic activity events through a preset event recognition decision tree model based on the preset semantic feature data; wherein, the preset event recognition decision tree is constructed based on the ID3 algorithm.
2. The method according to claim 1, characterized in that, The acquisition of the first port data within the target port waters includes: The original AIS message data is acquired, and then the original AIS message data is cropped according to preset spatial boundary conditions to obtain ship AIS data. The port business data is obtained, and then the port business data and the ship AIS data are associated to obtain the first port data.
3. The method according to claim 1, characterized in that, The step of preprocessing the first port data to obtain the second port data includes: The missing values of the ship's AIS data are removed to obtain the first AIS data; The first AIS data is traversed according to preset fields to identify duplicate records and obtain duplicate data identification results; wherein, the duplicate data identification results include a first data row with completely duplicate data or a second data row with partially duplicate data; Based on the duplicate data identification results, the first AIS data is subjected to a preset duplicate deletion process to obtain the second AIS data; wherein, the preset duplicate deletion process includes partially deleting the first data row or completely deleting the second data row; The third AIS data is obtained by performing outlier processing on the second AIS data. The second port data is constructed by combining the third AIS data with the port business data.
4. The method according to claim 1, characterized in that, The process of constructing preset semantic feature data based on the second port data includes: Construct an event semantic feature tagging system; wherein, the event semantic feature tagging system includes location semantic feature types, motion state semantic feature types, interaction relationship semantic feature types, and business operation semantic feature types; The second port data is transformed into discrete semantic labels through the event semantic feature labeling system to obtain the preset semantic feature data.
5. The method according to claim 1, characterized in that, Before performing the step of identifying traffic activity events based on the preset semantic feature data using a preset event recognition decision tree model to obtain traffic activity event type data, the method further includes: Based on a pre-defined hierarchical classification system for events, historical ship trajectory samples are labeled with event tags to construct a model training dataset. Discretize the continuous feature data in the model training dataset to construct a candidate attribute set; Information gain is calculated based on the candidate attribute set, and the expected splitting feature is determined by the calculated feature information gain data. Based on the expected splitting features, a decision tree discriminant structure is recursively generated to obtain the preset event recognition decision model.
6. The method according to claim 1, characterized in that, After performing the step of identifying traffic activity events based on the preset semantic feature data using a preset event recognition decision tree model to obtain traffic activity event type data, the method further includes: The traffic activity event type data is standardized and encoded according to a preset event coding system to obtain an event identification data packet; wherein, the preset event coding system is constructed by classifying and coding ship event behavior scenarios.
7. A device for identifying maritime traffic events in port waters, characterized in that, The device includes: The first module is used to acquire first port data within the target port waters; wherein, the first port data includes vessel AIS data and port business data; The second module is used to preprocess the first port data to obtain the second port data. The third module is used to construct preset semantic feature data based on the second port data; The fourth module is used to identify traffic activity events based on the preset semantic feature data through a preset event recognition decision tree model, and obtain traffic activity event type data; wherein the preset event recognition decision tree is constructed based on the ID3 algorithm.
8. An electronic device, characterized in that, include: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 6.