Shipping critical path identification method and device, electronic equipment and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-15
- Publication Date
- 2026-08-11
AI Technical Summary
[0003]然而,传统简单图只能表征港口节点间的两两交互关系,无法刻画同一船舶轨迹中多个港口节点的共现关系 ,导致航线整体特征信息丢失;同时,在超图网络中直接识别关键超边面临极高的计算复杂度,缺乏有效的空间转换机制将路径搜索问题降维简化;此外,现有特征提取方法往往仅依赖单一拓扑结构,忽略了船舶载重吨等物理属性以及网络全局连通状态,且静态指标无法动态反映移除某条航线后对整个网络连通鲁棒性的级联破坏效应,导致识别出的关键路径不够准确
处理器,与存储器耦合,用于执行存储器中存储的程序,以实现上述任意实现方式中的航运关键路径识别方法中的步骤。
Smart Images

Figure CN122548205A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of shipping traffic network analysis technology, specifically to methods, devices, electronic equipment, and storage media for identifying critical shipping paths. Background Technology
[0002] Existing technologies, when analyzing critical paths in shipping networks, typically construct traditional simple graph network models with ports as nodes and shipping routes as edges, and often employ evaluation methods based on static topology indicators or perform heuristic searches directly on the graph structure to identify key elements.
[0003] However, traditional simple graphs can only represent pairwise interactions between port nodes and cannot depict the co-occurrence of multiple port nodes in the same ship trajectory, resulting in the loss of overall route feature information. At the same time, directly identifying key hyperedges in hypergraph networks faces extremely high computational complexity and lacks an effective spatial transformation mechanism to simplify the path search problem. In addition, existing feature extraction methods often rely on a single topology, ignoring physical attributes such as ship deadweight tonnage and the global connectivity of the network. Furthermore, static indicators cannot dynamically reflect the cascading destructive effect of removing a route on the robustness of the entire network connectivity, resulting in inaccurate identification of critical paths.
[0004] Therefore, there is an urgent need to provide a critical path identification method based on hypergraph dual transformation and deep reinforcement learning to achieve efficient and accurate identification of high-value critical paths in complex inland waterway networks. Summary of the Invention
[0005] To address the aforementioned issues, this application provides a method for identifying critical paths in shipping networks, aimed at improving the accuracy of identifying high-value critical paths. The technical solution is as follows: In a first aspect, the present invention provides a method for identifying critical paths in shipping, comprising: Obtain historical ship trajectory data, extract trajectory sequences based on the historical ship trajectory data, and construct a shipping hypergraph network using the trajectory sequences as hyperedges; Transform the hyperedges in the shipping hypergraph network into dual graph nodes that represent the shipping route trajectories. If any two hyperedges in the shipping hypergraph network pass through at least one port node, then establish a connection between the dual graph nodes to obtain a dual line graph composed of dual graph nodes and connections. Obtain the route feature vector corresponding to the dual line graph; Based on the route feature vector, a deep reinforcement learning model iteratively selects the target route from the current pool of candidate routes. Based on the impact of the target route on network connectivity, a critical path identification sequence is obtained.
[0006] Combining the first aspect and the above implementation methods, in some possible implementation methods, trajectory sequences are extracted based on historical ship trajectory data, and shipping hypergraph networks are constructed using these trajectory sequences as hyperedges, including: Preprocessing of historical ship trajectory data yields sorted trajectory data; Traverse the sorted trajectory data. If the speed of the current trajectory point is lower than the preset speed threshold and the continuous dwell time exceeds the preset duration threshold, and meets any one of the following conditions: the port identifier of the current trajectory point has changed or the time interval between two consecutive records exceeds the preset time interval, then determine the current trajectory point as a berthing event. Based on the berthing event, all position records of the ship corresponding to the ship's historical trajectory data are traversed. If the spatial label of the current record is different from the historical spatial label in the sequence, the spatial label of the current record is added to the sequence to obtain the trajectory sequence that retains the actual movement after deduplication. The actual movement trajectory sequence of each ship after deduplication is retained as a hyperedge, and a shipping hypergraph network is constructed based on the hyperedge.
[0007] Combining the first aspect and the above implementation methods, in some possible implementation methods, the ship's historical trajectory data is preprocessed to obtain sorted trajectory data, including: Spatial clustering is performed on the known port coordinates, and the centroid of the clustered port clusters is calculated to obtain the coordinates of the nodes. Obtain the raw trajectory data, perform format conversion and missing value filling on the raw trajectory data to obtain clean trajectory data; The cleaning trajectory data is sorted twice based on the ship's identifier and timestamp to obtain sorted trajectory data.
[0008] Combining the first aspect and the above implementation methods, in some possible implementation methods, obtaining the route feature vector corresponding to the dual line graph includes: Obtain the center coordinates, total number of visits, unique set of visited ships, and total deadweight tonnage of the nodes in the shipping hypergraph network to obtain the node's physical attributes; Based on the dual line graph and node physical attributes, feature aggregation is performed to obtain the route feature vector.
[0009] Combining the first aspect and the above implementation methods, in some possible implementation methods, obtaining the route feature vector corresponding to the dual line graph includes: On the dual line graph, the information of adjacent line nodes is aggregated by a graph neural network model and fused with the total tonnage and visit frequency in the physical attributes of the nodes to obtain the initial line feature vector. The initial line feature vector is a feature representation that characterizes the local topology of the line and the physical attributes of the corresponding port. Virtual nodes connected to all nodes in the dual-line graph are introduced. Based on the virtual nodes, the network-wide features are aggregated to obtain the network-wide health status features. The network-wide health status features are global feature representations that characterize the overall connectivity robustness of the network, generated by aggregating the information of all nodes in the current network through virtual nodes. The initial route feature vector is fused with the health status features of the entire network to obtain the route feature vector.
[0010] Combining the first aspect and the above implementation methods, in some possible implementations, based on route feature vectors, a deep reinforcement learning model iteratively selects target routes from the current pool of candidate routes. Based on the impact of the target routes on network connectivity, a critical path identification sequence is obtained, including: The remaining topology and feature matrix of the shipping network at the current moment are used as the state space, and the target routes selected and removed from the current candidate route pool are used as the action space. Based on the state space and action space, the descent degree of the largest connected subgraph in the entire network after removing the target route is calculated using a deep reinforcement learning model; The reward value is determined based on the descent degree of the largest connected subgraph in the entire network, and the deep reinforcement learning model is iteratively updated based on the reward value to determine the degree of influence of the target route on network connectivity, and the critical path identification sequence is determined based on the degree of influence.
[0011] Combining the first aspect and the above implementation methods, some possible implementations, after constructing the shipping hypergraph network, include: For any pair of adjacent nodes of a hyperedge in a shipping hypergraph network, an undirected edge is established, and the edge weight is determined based on the co-occurrence frequency of the undirected edge to obtain the undirected topology network. For each pair of adjacent nodes in the shipping hypergraph network, a directed edge is established. Based on the total number of voyages, the sum of the total tonnage, and the number of unique ships corresponding to the directed edge, a multi-dimensional weight attribute is determined to obtain a directed weighted flow network.
[0012] Secondly, the present invention also provides a shipping critical path identification device, comprising: The network construction unit is used to acquire historical ship trajectory data, extract trajectory sequences based on the historical ship trajectory data, and construct a shipping hypergraph network using the trajectory sequences as hyperedges. The dual-line graph construction unit is used to convert the hyperedges in the shipping hypergraph network into dual graph nodes that represent the route trajectory. If any two hyperedges pass through at least one port node in the shipping hypergraph network, then a connection is established between the dual graph nodes to obtain a dual-line graph composed of dual graph nodes and connections. The vector acquisition unit is used to acquire the route feature vector corresponding to the dual line graph; The critical path identification unit is used to iteratively select target routes from the current pool of candidate routes based on route feature vectors through a deep reinforcement learning model, and obtain the critical path identification sequence based on the degree of influence of the target routes on network connectivity.
[0013] Thirdly, the present invention also provides an electronic device, including a memory and a processor, wherein, Memory, used to store programs; A processor, coupled to memory, is used to execute a program stored in memory to implement the steps in the shipping critical path identification method in any of the above implementations.
[0014] Fourthly, the present invention also provides a computer-readable storage medium for storing a computer-readable program or instruction, which, when executed by a processor, can implement the steps of the shipping critical path identification method in any of the above implementations.
[0015] The beneficial effects of this invention are as follows: First, trajectory sequences are extracted based on historical ship trajectory data, and a shipping hypergraph network is constructed using these trajectory sequences as hyperedges to represent the co-occurrence relationships among multiple port nodes, thus solving the problem that traditional simple graphs cannot represent the overall characteristics of shipping routes. Second, the hyperedges in the shipping hypergraph network are converted into dual graph nodes representing the route trajectories. Dual line graphs are constructed by establishing connections based on the port nodes they pass through, transforming the path search problem into a node mining task and reducing the computational complexity of key hyperedge identification. Third, route feature vectors are generated on the dual line graph using a graph neural network algorithm, aggregating the association information between route nodes to obtain a low-dimensional vector representation that can represent the topological position of the route in the network. Finally, based on the route feature vectors, a deep reinforcement learning model iteratively selects target routes from the pool of candidate routes, dynamically evaluating the impact of removing target routes on network connectivity to obtain a critical path identification sequence, thereby achieving efficient and accurate identification of high-value critical paths in complex inland waterway shipping networks. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 A flowchart illustrating the shipping critical path identification method provided by the present invention; Figure 2 For the present invention Figure 1 A schematic diagram of an embodiment of S101; Figure 3For the present invention Figure 1 A schematic diagram of an embodiment of S101; Figure 4 For the present invention Figure 1 A schematic diagram of an embodiment of S103; Figure 5 For the present invention Figure 1 A schematic diagram of an embodiment of S103; Figure 6 For the present invention Figure 1 A schematic diagram of an embodiment of S104; Figure 7 For the present invention Figure 1 A schematic diagram of an embodiment of S104; Figure 8 A schematic diagram of the shipping critical path identification device provided by the present invention; Figure 9 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0019] In the description of the embodiments of the present invention, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.
[0020] The terms "first," "second," etc., used in the embodiments of this invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a technical feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature.
[0021] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0022] This application provides a method for identifying critical paths in shipping. The method is executed by a device for identifying critical paths in shipping or by an electronic device equipped with such a device. The following is a detailed description; however, it should be noted that the order of description of the embodiments is not intended to limit the preferred order of the embodiments.
[0023] Please see Figure 1 , Figure 1 This is a flowchart illustrating the shipping critical path identification method provided in an embodiment of this application. Figure 1 As shown, the method in this application embodiment may include the following steps S101-S104: S101. Obtain historical ship trajectory data, extract trajectory sequences based on historical ship trajectory data, and construct a shipping hypergraph network using trajectory sequences as hyperedges.
[0024] In this embodiment, the ship historical trajectory data is a raw dataset containing maritime mobile communication service identifiers, timestamps, longitude, latitude, deadweight tonnage, ship type, and spatial labels. The trajectory sequence is obtained by traversing the time-sorted records of each ship, adding the spatial label of the current record to the sequence and removing duplicates only if the spatial label of the current record differs from the previous historical spatial label in the sequence. A hyperedge refers to treating the complete trajectory sequence of each ship as a hyperedge, which contains all nodes visited by the ship, representing the co-occurrence relationship of these nodes through the same ship during the same voyage or time period.
[0025] In one feasible implementation, the original Automatic Identification System (AIS) data file is read as the ship's historical trajectory data. The timestamps in the ship's historical trajectory data are converted into a standard time format, the deadweight tonnage is converted into a numerical type, missing values are filled with 0, and the data is double-sorted according to the ship identifier and timestamp corresponding to the maritime mobile communication service to obtain the sorted dataset.
[0026] The known port coordinates in the shipping network are processed using a density-based spatial clustering algorithm. Specifically, based on a pre-defined neighborhood radius, loading and unloading points or operating areas that are close to each other are grouped into the same port cluster. The centroid of the cluster is calculated as the representative coordinate of the node. The trajectory points in the sorted dataset are then mapped to the corresponding port clusters, and each trajectory point is assigned a port identifier (i.e., a spatial label).
[0027] By traversing and sorting the sequence of ship trajectory points in the dataset by time, we identify berthing records that meet the conditions of a speed of less than or equal to 0.1 knots and a continuous stay of more than or equal to 30 minutes. When either the port identifier of the current point changes or the time interval between two consecutive records is greater than 6 hours, it is determined as a new berthing event.
[0028] After extracting the port identifier corresponding to each docking event, the port identifiers visited by the same ship are concatenated in chronological order, and consecutive duplicates of the same port identifier are removed to construct a deduplicated trajectory sequence. Finally, the complete trajectory sequence of each ship is used as a hyperedge to construct a shipping hypergraph network.
[0029] S102, convert the hyperedges in the shipping hypergraph network into dual graph nodes representing the route trajectory. If any two hyperedges pass through at least one port node in the shipping hypergraph network, then establish a connection between the dual graph nodes to obtain a dual line graph composed of dual graph nodes and connections.
[0030] In this embodiment, a dual graph node refers to a node representing the shipping route trajectory obtained by transforming each hyperedge in the shipping hypergraph network. Establishing an edge means establishing a connection between two corresponding dual graph nodes if and only if two hyperedges in the shipping hypergraph network both pass through at least one port node. The dual graph is a graph structure composed of dual graph nodes and edges, used to simplify the path for identifying critical hyperedges into a general graph structure capable of identifying critical nodes in a general graph.
[0031] In one feasible implementation, each hyperedge in the shipping hypergraph network is traversed and transformed into a dual graph node in the dual graph. For any two hyperedges, it is determined whether they have a common port node in the original shipping hypergraph network. If the intersection of the port nodes of the two hyperedges is not an empty set, an edge is established between the corresponding two dual graph nodes, thereby completing the transformation from the hypergraph space to the dual graph space and obtaining the dual graph.
[0032] S103, obtain the route feature vector corresponding to the dual line graph.
[0033] In this embodiment, the route feature vector is a low-dimensional vector representation generated by running a graph neural network algorithm on the dual line graph, which aggregates information from adjacent route nodes and fuses physical attributes and globally perceived features. The graph sampling and aggregation algorithm is a graph neural network algorithm that generates node embedding representations by sampling and aggregating features of adjacent nodes. The globally perceived virtual node is a virtual node connected to all nodes in the dual line graph, used to aggregate network-wide features to represent the overall network health status.
[0034] In one feasible implementation, the extracted physical attributes are transformed into initial feature vectors for route nodes. These physical attributes include the total tonnage and frequency of visits for the route. An initial feature matrix is then constructed using the initial feature vectors of all route nodes in the dual line graph.
[0035] The graph sampling and aggregation algorithm is run on the dual line graph. Iteratively updates the node representation by aggregating the initial feature matrices of adjacent line nodes to generate local low-dimensional vector representations of line nodes. At the same time, a globally aware virtual node is introduced. This globally aware virtual node is a special node that establishes edges with all line nodes in the dual line graph. It generates a global feature vector representing the overall network health status by aggregating the local low-dimensional vector representations of all line nodes in the network. Finally, the local low-dimensional vector representations of line nodes are concatenated and fused with the global feature vector to obtain the line feature vector.
[0036] For example, the specific form of the feature aggregation formula in step S103 above is as follows:
[0037] in Indicates the current route node Adjacent routes; Represents the learnable parameter matrix; This represents the feature aggregation result of adjacent route nodes; Indicates the current node The feature representation of the previous layer; Indicates the current route node Feature representation of this layer; Represents the feature aggregation function; This represents the linear rectification activation function.
[0038] For example, the formula for aggregation of features of globally perceived virtual nodes is:
[0039] in, Globally aware virtual node characteristics representing the overall network health status; Denotes the set of superedges; Representing each route node In the Layer feature representation.
[0040] S104: Based on the route feature vector, a deep reinforcement learning model iteratively selects the target route from the current pool of candidate routes. Based on the degree of influence of the target route on network connectivity, a critical path identification sequence is obtained.
[0041] In this embodiment, the deep reinforcement learning model models route identification as a reinforcement learning task, utilizing a deep Q-network to find the sequence with the greatest destructive impact on network connectivity during dynamic evolution. The deep reinforcement learning model's architecture is a deep Q-network architecture based on a Markov decision process, including a state space, action space, and reward function. The current candidate route pool is the set of routes available for selection and removal from the remaining shipping network at the current time. The degree of impact on network connectivity refers to the degree of decrease in the maximum connected subgraph of the entire network. The maximum connected subgraph of the entire network is the connected subgraph containing the most nodes in the network. The critical path identification sequence is the target route sequence that is most destructive to the robustness of the shipping network, combined in the order of removal.
[0042] In one feasible implementation, the residual topology of the remaining shipping network at the current moment and the route feature vectors can be defined as the state space. The action space is defined as selecting and removing a route from the current pool of candidate routes. The reward function is calculated based on the descent degree of the largest connected subgraph in the entire network. The deep Q-network is iteratively trained by minimizing the difference between the predicted Q-value and the target Q-value. During the iteration process, the target route with the greatest destructive power to network connectivity is continuously selected. The target routes are combined in the order of removal to obtain the critical path identification sequence.
[0043] For example, the specific form of the above reward function formula is as follows:
[0044] in, As a reward, The total number of super-edges, This represents the initial network connectivity. The remaining size after removing the route.
[0045] It should be understood that the shipping critical path identification method in this application embodiment can be implemented in any system based on shipping network data analysis, such as electronic devices like ship navigation control terminals, shipping big data analysis servers, or smart maritime integrated supervision platforms. Specifically, the shipping critical path identification method is pre-stored in the memory of the aforementioned electronic device in the form of a computer program. When the electronic device is started periodically or the system triggers a shipping network analysis task, the program is called and executed by the processor to achieve accurate discovery and identification of weak shipping routes and critical paths in the shipping network.
[0046] In summary, this method extracts trajectory sequences from historical ship trajectory data and constructs a shipping hypergraph network using these sequences as hyperedges. This network represents the co-occurrence relationships among multiple port nodes, solving the problem that traditional simple graphs cannot represent the overall characteristics of shipping routes. Secondly, the hyperedges in the shipping hypergraph network are transformed into dual graph nodes representing the route trajectories. Dual line graphs are constructed based on shared port nodes, transforming the path search problem into a node mining task and reducing the computational complexity of critical hyperedge identification. Then, a graph neural network algorithm is used to generate route feature vectors on the dual line graph, aggregating the association information between route nodes to obtain a low-dimensional vector representation of the route's topological position in the network. Finally, based on the route feature vectors, a deep reinforcement learning model iteratively selects target routes from a pool of candidate routes, dynamically evaluating the impact of removing target routes on network connectivity to obtain a critical path identification sequence. This achieves efficient and accurate identification of high-value critical paths in complex inland waterway networks.
[0047] In one feasible implementation, in order to evaluate the importance of each port node in the shipping supergraph network, this scheme designs a multi-criteria decision model that integrates topological characteristics and physical attributes. The aim is to determine the comprehensive influence score of each port node by weighting the indicators of each port node according to the entropy weight method in the information entropy theory.
[0048] In this embodiment of the application, there are multiple port nodes, and the set of indicators corresponding to each port node is as follows: These represent node expiration, hypernetwork K-shell value, adjacency structure entropy, cumulative deadweight tonnage, and number of visited ships, respectively. The specific execution is as follows: An original evaluation matrix is constructed, and range standardization is applied to eliminate the influence of dimensions. The feature weights under each indicator are calculated, and then the information entropy of each indicator is calculated. The final indicator weights are obtained by calculating the difference coefficients of each indicator. After determining the indicator weights, the TOPSIS method is used to calculate the weighted Euclidean distances from several points of each port to the ideal solution and the negative ideal solution. Finally, the comprehensive influence score of each port node is obtained.
[0049] For example, the specific formula used to eliminate the influence of dimensions can be:
[0050] in, For the first The port in The original values under each indicator and The first The minimum and maximum values of the indicators, To avoid the denominator being zero, use extremely small positive numbers. This refers to the standardized dimensionless index value. For example, the formula for calculating the feature weight under the corresponding indicator is as follows:
[0051] in, For the first The sum of the standardized values of all ports for this indicator. This indicates the relative characteristic weight of the port under the corresponding indicator. The formula for calculating the information entropy of the above-mentioned indicators is:
[0052] in, The total number of ports. The smaller the value, the greater the difference in the indicator data and the richer the information.
[0053] For example, the formula for calculating the difference coefficient of the above-mentioned indicators to obtain the final indicator weights is as follows:
[0054]
[0055] in, To differentiate the ability of indicators, The total number of evaluation indicators, For the first Normalized weights of the indicators. For example, the formula for calculating the weighted Euclidean distance from each port to the ideal solution and the negative ideal solution using the TOPSIS method for comprehensive evaluation is as follows:
[0056]
[0057] in, For the ideal solution, For a negative ideal solution, , The first The distance from each port to the ideal solution and the negative ideal solution. For example, the formula for calculating the port's overall influence score is as follows:
[0058] in, This represents the overall influence score. The higher the value, the higher the overall influence score of the port node.
[0059] Please see Figure 2 , Figure 2 This is the present invention. Figure 1 A schematic diagram of an embodiment of S101. (See attached diagram.) Figure 2 As shown, the method in this application embodiment may include the following steps S201-S204: S201, preprocess the historical trajectory data of ships to obtain sorted trajectory data.
[0060] In this embodiment, preprocessing refers to the process of format conversion, missing value imputation, and sorting according to specified fields for the original trajectory data. Sorted trajectory data refers to a dataset that, after being double-sorted according to ship identifier and timestamp, ensures that the data for the same ship is arranged in chronological order.
[0061] In one feasible implementation, the original Automatic Identification System (AIS) data file is read as the ship's historical trajectory data. The timestamps are converted to a standard time format, the deadweight tonnage is converted to a numerical value, and missing values are filled with 0. Then, the ship's historical trajectory data is double-sorted according to the ship's identifier and timestamp corresponding to the maritime mobile communication service to ensure that the data of the same ship is arranged in chronological order, thus obtaining sorted trajectory data.
[0062] For example, the specific form of the formula used in the above double sorting is as follows:
[0063] in, This represents the sorted ship trajectory data; This represents the preprocessed historical trajectory data of the ship; This represents the sorting operation function; This indicates a sorting key sequence, first by the maritime mobile communication service identifier ( Grouped by timestamp ( Sort in ascending order.
[0064] S202, Traverse and sort the trajectory data. If the speed of the current trajectory point is lower than the preset speed threshold and the continuous dwell time exceeds the preset duration threshold, and meets any one of the following conditions: the port identifier of the current trajectory point has changed or the time interval between two consecutive records exceeds the preset time interval, then the current trajectory point is determined to be a berthing event.
[0065] In this embodiment, the current trajectory point refers to the ship position record point being traversed and checked in chronological order within the sorted trajectory data. A berthing event refers to a berthing record where a ship is in a low-speed, stationary state within the port area and meets specific time or spatial change conditions. Two consecutive records are two adjacent trajectory points in the sorted trajectory data.
[0066] In one feasible implementation: traverse and sort the trajectory data, calculate the speed and continuous dwell time of the current trajectory point, and determine whether the speed is less than or equal to 0.1 knots and the continuous dwell time is greater than or equal to 30 minutes; if so, further determine whether the port identifier of the current trajectory point has changed or the time interval between two consecutive records is greater than 6 hours; if the above speed and duration conditions are met, and either the spatial identifier has changed or the time interval exceeds the limit, then the current trajectory point is determined to be a new berthing event.
[0067] S203: Based on the berthing event, traverse all position records of the ship corresponding to the ship's historical trajectory data. If the spatial label of the current record is different from the historical spatial label in the sequence, add the spatial label of the current record to the sequence to obtain a trajectory sequence that retains the actual movement after deduplication.
[0068] In this embodiment, the historical spatial label refers to the spatial label added to the sequence by the previous record during the traversal process. Retaining the actual movement trajectory sequence after deduplication means eliminating redundancy caused by continuous data reporting from the same location by the ship, and only retaining the actual port node access sequence of movement jumps.
[0069] In one feasible implementation, for each ship, all its position records are traversed based on the berthing event, and the corresponding spatial label is extracted. During the traversal, the spatial label of the current record is compared with the historical spatial labels in the sequence. If the spatial label of the current record is different from the historical spatial label, the spatial label of the current record is added to the sequence. If the spatial label of the current record is the same as the historical spatial label, the record is skipped, thereby eliminating the redundancy caused by the ship continuously reporting data at the same location, retaining the actual movement jumps, and obtaining a deduplicated trajectory sequence that retains the actual movement.
[0070] For example, the formula for the above trajectory sequence is in the following specific form:
[0071] in, This indicates that after deduplication, only the actual movement trajectory sequence is retained; Indicates the ship's time Corresponding spatial tags ( ); This represents a sequence of timestamps arranged in chronological order.
[0072] S204 uses the deduplicated and retained trajectory sequence of each ship as a hyperedge, and constructs a shipping hypergraph network based on the hyperedge.
[0073] In one feasible implementation, the deduplicated trajectory sequence of each ship, retaining its actual movement, is regarded as a hyperedge. This hyperedge contains all the port nodes visited by the ship, representing the co-occurrence relationship of these port nodes through the same ship in the same voyage or time period. The hyperedges corresponding to all ships are combined with the set of port nodes to construct a shipping hypergraph network composed of the set of port nodes and the set of hyperedges.
[0074] For example, the specific form of the above hyperedge definition formula is as follows:
[0075] in, For superedge, to For the first After deduplication of a ship, spatial labels are retained in the actual movement trajectory sequence.
[0076] In summary, this application ensures the temporal logic of the trajectory by sorting and preprocessing the historical trajectory data; it identifies berthing events by combining multiple conditions such as speed, dwell time, port label changes, and time intervals, filtering out false berthing data caused by signal drift or brief deceleration, ensuring that the extracted berthing events conform to the semantics of actual operations; it deduplicates position records based on berthing events, retaining only nodes with changed spatial labels, and eliminates high-frequency redundant reports and stationary data during ship navigation, reducing data scale and subsequent computational complexity while preserving the core movement trajectory; finally, it constructs a shipping hypergraph network using the deduplicated actual movement trajectory sequence as hyperedges, fully preserving the co-occurrence relationship of multiple port nodes in a single voyage, avoiding the loss of overall voyage semantics caused by traditional graph models that decompose routes into isolated port pairs, thereby improving the accuracy and computational efficiency of shipping network modeling.
[0077] Please see Figure 3 , Figure 3 This is the present invention. Figure 1 A schematic diagram of an embodiment of S101. (See attached diagram.) Figure 3 As shown, the method in this application embodiment may include the following steps S301-S303: S301. Perform spatial clustering on the known port coordinates, calculate the centroid of the clustered port clusters, and obtain the coordinates of the nodes.
[0078] In this embodiment, known port coordinates refer to the collection of geographic coordinates of all loading / unloading points or operating areas within each port area. Spatial clustering refers to the algorithmic process of grouping geographically close loading / unloading points or operating areas into the same category based on distance metrics. A port cluster refers to a set of clusters containing multiple loading / unloading points or operating areas that are close to each other, partitioned by spatial clustering. Node representative coordinates refer to the coordinates representing the overall position of the port cluster obtained by calculating the geometric center of all coordinates within the port cluster.
[0079] In one feasible implementation, known port coordinates are obtained; then, a density-based spatial clustering algorithm is used to perform spatial clustering on the known port coordinates, setting the neighborhood radius to 500 meters, and grouping loading / unloading points or operating areas that are close to each other into the same port cluster; finally, the average latitude and longitude of all known port coordinates in the port cluster is calculated as the centroid, thereby obtaining the node representative coordinates.
[0080] For example, the specific form of the above centroid calculation formula is as follows:
[0081] in, The node represents coordinates. This represents the number of known port coordinates in the port cluster. The first in the port cluster Known port coordinates.
[0082] S302, Obtain the original trajectory data, perform format conversion and missing value filling on the original trajectory data to obtain cleaned trajectory data.
[0083] In this embodiment, raw trajectory data refers to unprocessed ship navigation data records directly obtained from the Automatic Identification System (AIS). Format conversion refers to the process of converting the time and numerical fields in the raw trajectory data into a standard calculation format. Missing value imputation refers to assigning default values to missing fields in the raw trajectory data to avoid calculation anomalies. Cleaned trajectory data refers to a dataset that conforms to standard format requirements after format conversion and missing value imputation.
[0084] For example, the first data record in the original trajectory data is Maritime Mobile Communication Service Identifier = 413567890, timestamp = 2025-01-01 08:30:00, longitude = 122.56, latitude = 31.28, deadweight tonnage = NULL, and the second data record is Maritime Mobile Communication Service Identifier = 413567891, timestamp = 2025-01-01 08:35:00, longitude = 122.58, latitude = 31.30, deadweight tonnage = 8000. At this time, missing value filling processing is performed on the first data record, and the missing deadweight tonnage null value is uniformly filled with 0, resulting in deadweight tonnage = 0.
[0085] S303, the cleaning trajectory data is sorted twice based on the ship's identification and timestamp to obtain sorted trajectory data.
[0086] In this embodiment, the ship identifier refers to a maritime mobile communication service identifier used to uniquely distinguish different ships. The timestamp refers to a time stamp recording the moment the trajectory data was generated. Double sorting refers to a sorting method where the data is first grouped and sorted according to the ship identifier, and then arranged sequentially according to the timestamp within each group. Sorted trajectory data refers to a dataset that, after double sorting, ensures that the data for the same ship is arranged continuously in chronological order. The specific execution method for double sorting the cleaned trajectory data using ship identifiers and timestamps to obtain sorted trajectory data is described in step S201 above and will not be repeated here.
[0087] In summary, this application eliminates the interference of differences in the locations of different berths or anchorages within the same port on the network topology by spatially clustering known port coordinates and calculating centroids, thus merging spatially adjacent fine-grained port coordinates into unified node representative coordinates. This avoids node redundancy and improves the accuracy of the network macrostructure. By converting the format of the original trajectory data and filling in missing values, the application unifies data specifications and repairs incomplete records, ensuring the integrity and continuity of trajectory data and avoiding trajectory breaks or misjudgments due to missing data. By doubly sorting the cleaning trajectory data based on vessel identifiers and timestamps, the application ensures that the trajectory points of the same vessel strictly follow the chronological order, providing a reliable temporal logic basis for subsequent extraction of temporal dependency features and berthing events, preventing path inference errors caused by disordered trajectory points, thereby improving the overall quality and reliability of data preprocessing.
[0088] Please see Figure 4 , Figure 4 This invention Figure 1 A schematic diagram of an embodiment of S103. (See attached diagram.) Figure 4 As shown, the method in this application embodiment may include the following steps S401-S402: S401, obtain the center coordinates, total number of visits, unique set of visiting ships, and total deadweight tonnage of the nodes in the shipping supergraph network to obtain the physical attributes of the nodes.
[0089] In this embodiment, the center coordinates refer to the geographic centroid coordinates of the spatial cluster corresponding to the port node in the shipping supergraph network. Total visits refer to the cumulative frequency of all ships berthing or passing through the port node. The unique set of visited ships refers to the unique set of different ship identifiers that have visited the port node, reflecting the port's ship attractiveness and diversity. Total deadweight tonnage refers to the sum of the carrying capacities of all ships visiting the port node, reflecting the port's cargo volume and throughput potential. Node physical attributes refer to multidimensional data composed of the center coordinates, total visits, unique set of visited ships, and total deadweight tonnage, used to describe the inherent spatial location and business statistical characteristics of the port node.
[0090] In one feasible implementation: traverse each port node in the shipping hypergraph network, extract the centroid of the port node currently being traversed, calculated during the spatial clustering stage, as the center coordinate; then, count the number of all hyperedges containing the port node, and use this as the total number of visits.
[0091] Collect all ship identifiers corresponding to the superedges that pass through the port node, and construct a unique set of visited ships through deduplication. At the same time, sum up the deadweight tonnage of all ships in the set to obtain the total deadweight tonnage. Finally, combine the center coordinates, total number of visits, unique set of visited ships, and total deadweight tonnage to obtain the node physical attributes of the port node.
[0092] S402, based on the dual line graph and node physical attributes, feature aggregation processing is performed to obtain the route feature vector.
[0093] In this embodiment, feature aggregation processing refers to mapping the physical attributes of port nodes to the route nodes of the dual line graph as initial features, and then using a graph neural network to perform neighbor information transfer and fusion calculations on the topological structure of the dual line graph. The route feature vector is a low-dimensional vector representation generated by fusing the physical attributes of ports included in the route, the topological information of adjacent routes, and the global perception features of the entire network.
[0094] In one feasible implementation, for each route node in the dual line graph, the physical attributes of all port nodes included in the original shipping supergraph network are averaged and pooled to map them as the initial features of that route node. A graph sampling and aggregation algorithm is run on the dual line graph to generate topological features by aggregating the initial features of adjacent route nodes. Simultaneously, a globally aware virtual node is introduced and connected to all route nodes in the dual line graph, aggregating the network-wide features to represent the overall network health status. The initial features, topological features, and globally aware virtual node features of the route nodes are concatenated and nonlinearly mapped to obtain a route feature vector containing both physical semantics and topological associations.
[0095] In summary, this application extracts multi-dimensional node physical attributes from the shipping hypergraph network, such as the center coordinates, total number of visits, unique set of visiting vessels, and total deadweight tonnage of port nodes. These attributes are then combined with the topology of the dual line graph for feature aggregation. This results in route feature vectors that not only capture the structural evolution of the network but also deeply integrate the spatial location and business statistics of the ports. Consequently, the comprehensiveness and accuracy of feature representation are significantly improved, providing a reliable data foundation for subsequent deep reinforcement learning models to accurately assess the importance of routes and identify critical paths.
[0096] Please see Figure 5 , Figure 5 This is the present invention. Figure 1 A schematic diagram of an embodiment of S103. (See attached diagram.) Figure 5 As shown, the method in this application embodiment may include the following steps S501-S503: S501, on the dual line graph, the information of adjacent route nodes is aggregated through a graph neural network model, and the total tonnage and visit frequency in the node physical attributes are fused to obtain the initial route feature vector.
[0097] In one feasible implementation, on the dual line graph, the dual graph node corresponding to each route is taken as the target node. The total tonnage and visit frequency in the node's physical attributes are used as input layer features. The features of each neighboring route node in the target node's neighbor route set are aggregated through the aggregation function in the graph neural network model to obtain a neighbor aggregated feature vector. By concatenating the target node's own feature vector with the adjacent aggregated feature vectors, and inputting the concatenated feature vector into the activation function for nonlinear transformation, the initial route feature vector is finally output.
[0098] S502 introduces virtual nodes connected to all nodes in the dual line graph, and aggregates the network-wide features based on the virtual nodes to obtain the network-wide health status features.
[0099] In this embodiment, a virtual node refers to an auxiliary computational node artificially introduced into the dual line graph of the shipping hypergraph. This virtual node does not correspond to any real shipping route in the original hypergraph, but rather establishes connections with all shipping route nodes in the dual line graph. Its function is to act as a central hub for global information, aggregating the features of all shipping route nodes in the dual line graph to represent the "health status" of the overall network, thereby generating a network-wide health status feature. The network-wide health status feature is a global feature representation characterizing the overall connectivity robustness of the network, generated by aggregating information from all nodes in the current network through the virtual node.
[0100] In one feasible implementation, a virtual node is introduced into the dual line graph, and the virtual node is connected to all the line nodes in the dual line graph. Based on the virtual node, the initial line feature vectors of all line nodes in the dual line graph are globally aggregated by an aggregation function. The feature vector generated after aggregation is determined as the health status feature of the entire network. Thus, the information of all nodes in the current network is summarized through the virtual node to generate a global feature representation that characterizes the overall connectivity robustness of the network.
[0101] S503, based on the initial route feature vector and the health status features of the entire network, is fused to obtain the route feature vector.
[0102] In one feasible implementation, the initial route feature vector of each route node in the dual line graph is concatenated with the health status features of the entire network. The feature vector generated after the fusion process is determined as the route feature vector, so that the route feature vector simultaneously contains the topological and physical attribute information of local adjacent route nodes as well as the state information of the overall network connectivity robustness.
[0103] In summary, this application uses a graph neural network model on the dual line graph to aggregate information from adjacent route nodes and fuses the total tonnage and visit frequency from the node's physical attributes to obtain an initial route feature vector. This allows the extracted features to incorporate a deeper level of physical load dimension on top of the topological dimension. Simultaneously, virtual nodes are introduced to aggregate network-wide features to obtain network-wide health status features that characterize the overall network connectivity robustness. The initial route feature vector is then fused with the network-wide health status features to obtain the route feature vector. This results in the final generated route feature vector not only containing topological and physical attribute information of local adjacent route nodes but also perceiving the overall connectivity status of the global network. This improves the comprehensiveness and accuracy of route feature representation, providing a more precise feature representation foundation for subsequent critical path identification based on deep reinforcement learning.
[0104] Please see Figure 6 , Figure 6 This is the present invention. Figure 1 A schematic diagram of an embodiment of S104. (See attached diagram.) Figure 6 As shown, the method in this application embodiment may include the following steps S601-S603: S601 uses the remaining topology and feature matrix of the remaining shipping network at the current moment as the state space, and the target routes selected and removed from the current candidate route pool as the action space.
[0105] In this embodiment, the remaining shipping network at the current time refers to the network structure consisting of the remaining dual graph nodes and edges after the removal of several routes through preceding actions at the current time. The residual topology refers to the connection relationships between nodes and edges in the remaining shipping network at the current time. The state space is the set of states of a Markov decision process composed of the residual topology and feature matrix of the remaining shipping network at the current time, used to characterize the dynamic evolution environment of the current network. The action space is the set consisting of all selectable and removed routes in the current candidate route pool.
[0106] S602, based on state space and action space, uses a deep reinforcement learning model to calculate the descent degree of the largest connected subgraph in the entire network after removing the target route.
[0107] In this embodiment, the deep reinforcement learning model is a deep Q-network model. The architecture of the deep reinforcement learning model is a dual-network architecture including an evaluation network and a target network. The largest connected subgraph in the entire network is the connected subgraph with the largest number of nodes in the remaining shipping network at the current time.
[0108] In one feasible implementation, the state space and action space are input into a deep reinforcement learning model, and the deep reinforcement learning model outputs the predicted Q value after removing the target route; the target route is selected and removed based on the predicted Q value, the size of the largest connected subgraph of the entire network after removing the target route is calculated, and compared with the connected size of the initial network to obtain the degree of decrease of the largest connected subgraph of the entire network.
[0109] S603 determines the reward value based on the descent degree of the largest connected subgraph in the entire network, and iteratively updates the deep reinforcement learning model based on the reward value to determine the degree of influence of the target route on network connectivity, and determines the critical path identification sequence based on the degree of influence.
[0110] In one feasible implementation, a reward value is calculated based on the descent degree of the largest connected subgraph in the entire network, and the reward value is fed back to the deep reinforcement learning model. By minimizing the difference between the predicted Q value and the target Q value of the deep reinforcement learning model, a loss function is calculated, and the parameters of the deep reinforcement learning model are iteratively updated based on the loss function. The steps of state space construction, action selection, reward calculation, and model update are repeated until the iteration stopping condition is met. Based on the removal order of each target route after the final iteration, the degree of influence of the target routes on network connectivity is determined, and they are arranged in descending order of influence to obtain the critical path identification sequence.
[0111] For example, the specific form of the loss function of the deep reinforcement learning model in the above steps is as follows:
[0112] in, The value of the loss function. From time At the time The cumulative reward value, As a discount factor, For at any time Optional actions For the target network in state Select action The target Q value, For the parameters of the target network, To evaluate the network in state Select action The predicted Q value, To evaluate the parameters of the network.
[0113] In summary, this application transforms the task of identifying hyperedges in the shipping hypergraph into a node search task in the dual space, and combines it with a deep reinforcement learning model to find the route sequence with the greatest destructive power to network connectivity in dynamic evolution. This enables the accurate identification of critical paths that have a strategic supporting role in network connectivity, thereby improving the efficiency and accuracy of critical path identification.
[0114] Based on this, please see Figure 7 , Figure 7 This is the present invention. Figure 1 A schematic diagram of an embodiment of S104. (See attached diagram.) Figure 7 As shown, the method in this application embodiment may include the following steps S701-S702: S701: For any pair of adjacent nodes of a hyperedge in the shipping hypergraph network, establish an undirected edge, determine the edge weight based on the co-occurrence frequency of the undirected edge, and obtain the undirected topology network.
[0115] In this embodiment, an undirected edge refers to an edge connecting two port nodes regardless of direction. Co-occurrence frequency refers to the total number of times the same pair of adjacent nodes appears in all hyperedges. Edge weight refers to the numerical value assigned to an undirected edge representing the co-occurrence strength of the port node pair. An undirected topology network refers to an undirected graph model used to analyze the connectivity between port nodes.
[0116] In one feasible implementation, by traversing each hyperedge in the shipping hypergraph network, any pair of adjacent nodes in the hyperedge is extracted, an undirected edge is established for the pair of adjacent nodes in the undirected graph structure, the total number of times the pair of adjacent nodes appears in all hyperedges is counted as the co-occurrence frequency, and the co-occurrence frequency is assigned to the undirected edge as the edge weight. After the traversal is completed, the undirected topology network is obtained.
[0117] For example, the formula for determining the edge weights in the above steps can be:
[0118] in, Represented as adjacent node pairs edge weights, For adjacent node pairs Co-occurrence frequency among all hyperedges and is the adjacent node in the hyperedge.
[0119] S702 establishes directed edges for each pair of adjacent nodes in the shipping hypergraph network. Based on the total number of voyages, the sum of total deadweight tonnage, and the number of unique ships corresponding to the directed edges, multidimensional weight attributes are determined to obtain a directed weighted flow network.
[0120] In this embodiment, a directed edge refers to a directional edge, with the direction pointing from the preceding port node to the following port node. The total number of voyages refers to the total number of ship voyages that pass through the path represented by the directed edge. The total deadweight tonnage sum refers to the sum of the deadweight tonnage of all ships that pass through the path represented by the directed edge. The number of unique ships refers to the number of non-repeating ships that pass through the path represented by the directed edge. The multidimensional weight attribute refers to the attribute set consisting of the total number of voyages, the total deadweight tonnage sum, and the number of unique ships. The directed weighted flow network refers to a directed graph model used to analyze actual capacity flow.
[0121] In one feasible implementation, each hyperedge in the shipping hypergraph network is traversed, and each pair of adjacent preceding and following nodes in the hyperedge is extracted. A directed edge is established in the directed graph structure, pointing from the preceding port node to the following port node. The total number of ship voyages passing through the directed edge is counted as the voyage weight. The deadweight tonnage of all ships passing through the directed edge is accumulated to obtain the total deadweight tonnage as the capacity weight. The number of non-repeating ships passing through the directed edge is counted as the ship quantity weight. The voyage weight, capacity weight, and ship quantity weight are combined into a multi-dimensional weight attribute and assigned to the directed edge. After traversal, a directed weighted flow network is obtained.
[0122] In summary, this application constructs an undirected topological network and a directed weighted flow network by projecting the shipping hypergraph network, thereby enabling simultaneous analysis of connectivity between port nodes and actual capacity flow. This achieves a fusion analysis of the topological characteristics and physical attributes of the shipping network, providing multi-dimensional data support for subsequent critical path mining.
[0123] The following will combine Figure 8 This application provides a detailed description of the shipping critical path identification device provided in its embodiments. It should be noted that... Figure 8 The shipping critical path identification device in the present application is used to perform the critical path identification function of the present application. Figures 1-7 The methods shown in the embodiments are for illustrative purposes only, illustrating the parts relevant to the embodiments of this application. For specific technical details not disclosed, please refer to this application. Figures 1-7 In the embodiment shown, the shipping critical path identification device 800 may include a network construction unit 801, a dipole graph construction unit 802, a vector acquisition unit 803, and a critical path identification unit 804, as detailed below: Network building unit 801 is used to acquire historical ship trajectory data, extract trajectory sequences based on historical ship trajectory data, and construct a shipping hypergraph network using trajectory sequences as hyperedges; The dual-line graph construction unit 802 is used to convert the hyperedges in the shipping hypergraph network into dual graph nodes that represent the route trajectory. If any two hyperedges pass through at least one port node in the shipping hypergraph network, then a connection is established between the dual graph nodes to obtain a dual-line graph composed of dual graph nodes and connections. Vector acquisition unit 803 is used to acquire the route feature vector corresponding to the dual line graph; The critical path identification unit 804 is used to iteratively select a target route from the current pool of candidate routes based on the route feature vector through a deep reinforcement learning model, and obtain a critical path identification sequence based on the degree of influence of the target route on network connectivity.
[0124] The shipping critical path identification device 800 provided in the above embodiments can realize the technical solutions described in the above embodiments of the shipping critical path identification method. The specific implementation principles of each module or unit can be found in the corresponding content in the above embodiments of the shipping critical path identification method, and will not be repeated here.
[0125] like Figure 9 As shown, the present invention also provides an electronic device 900. The electronic device 900 includes a processor 901, a memory 902, and a display 903. Figure 9 Only some components of the electronic device 900 are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0126] In some embodiments, processor 901 may be a central processing unit (CPU), microprocessor, or other data processing chip, used to run program code stored in memory 902 or process data, such as the shipping critical path identification method of the present invention.
[0127] In some embodiments, processor 901 may be a single server or a group of servers. The server group may be centralized or distributed. In some embodiments, processor 901 may be local or remote. In some embodiments, processor 901 may be implemented on a cloud platform. In one embodiment, the cloud platform may include a private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, intranet, multi-cloud, etc., or any combination thereof.
[0128] In some embodiments, memory 902 may be an internal storage unit of electronic device 900, such as a hard disk or memory of electronic device 900. In other embodiments, memory 902 may also be an external storage device of electronic device 900, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on electronic device 900.
[0129] Furthermore, the memory 902 may include both internal storage units of the electronic device 900 and external storage devices. The memory 902 is used to store application software and various types of data installed on the electronic device 900.
[0130] In some embodiments, display 903 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 903 is used to display information from electronic device 900 and to display a visual user interface. Components 901-903 of electronic device 900 communicate with each other via a system bus.
[0131] In one embodiment, when processor 901 executes the shipping critical path identification program in memory 902, the following steps can be implemented: Obtain historical ship trajectory data, extract trajectory sequences based on the historical ship trajectory data, and construct a shipping hypergraph network using the trajectory sequences as hyperedges; Transform the hyperedges in the shipping hypergraph network into dual graph nodes that represent the shipping route trajectories. If any two hyperedges in the shipping hypergraph network pass through at least one port node, then establish a connection between the dual graph nodes to obtain a dual line graph composed of dual graph nodes and connections. Obtain the route feature vector corresponding to the dual line graph; Based on the route feature vector, a deep reinforcement learning model iteratively selects the target route from the current pool of candidate routes. Based on the impact of the target route on network connectivity, a critical path identification sequence is obtained.
[0132] It should be understood that when the processor 901 executes the shipping critical path identification program in the memory 902, in addition to the functions mentioned above, it can also perform other functions, as detailed in the description of the corresponding method embodiments above.
[0133] Furthermore, this embodiment of the invention does not specifically limit the type of electronic device 900 mentioned. Electronic device 900 can be a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, laptop computer, or other portable electronic device. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic device can also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the invention, electronic device 900 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).
[0134] Accordingly, this application also provides a computer-readable storage medium for storing computer-readable programs or instructions. When the programs or instructions are executed by a processor, they can implement the steps or functions of the shipping critical path identification method provided in the above-described method embodiments.
[0135] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.), and the computer program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0136] The critical path identification method, apparatus, electronic device, and storage medium provided by this invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.
Claims
1. A method for identifying the critical path in shipping, characterized in that, include: Obtain historical ship trajectory data, extract trajectory sequences based on the historical ship trajectory data, and construct a shipping hypergraph network using the trajectory sequences as hyperedges; The hyperedges in the shipping hypergraph network are converted into dual graph nodes that represent the route trajectory. If any two hyperedges in the shipping hypergraph network pass through at least one port node, then a connection is established between the dual graph nodes to obtain a dual line graph composed of the dual graph nodes and the connection. Obtain the route feature vector corresponding to the dual line graph; Based on the route feature vector, a target route is iteratively selected from the current pool of candidate routes using a deep reinforcement learning model. Based on the degree of influence of the target route on network connectivity, a critical path identification sequence is obtained.
2. The method according to claim 1, characterized in that, The step of extracting trajectory sequences based on the ship's historical trajectory data and constructing a shipping hypergraph network using the trajectory sequences as hyperedges includes: The historical trajectory data of the ships is preprocessed to obtain sorted trajectory data; Traverse the sorted trajectory data. If the speed of the current trajectory point is lower than the preset speed threshold and the continuous dwell time exceeds the preset duration threshold, and meets any one of the following conditions: the port identifier of the current trajectory point has changed or the time interval between two consecutive records exceeds the preset time interval, then the current trajectory point is determined to be a berthing event. The two consecutive records are two adjacent trajectory points in the sorted trajectory data. Based on the mooring event, all position records of the ship corresponding to the ship's historical trajectory data are traversed. If the spatial label of the current record is different from the historical spatial label in the sequence, the spatial label of the current record is added to the sequence to obtain a trajectory sequence that retains the actual movement after deduplication. The deduplicated and retained trajectory sequences of each ship are used as hyperedges, and a shipping hypergraph network is constructed based on these hyperedges.
3. The method according to claim 2, characterized in that, The preprocessing of the ship's historical trajectory data to obtain sorted trajectory data includes: Spatial clustering is performed on the known port coordinates, and the centroid of the clustered port clusters is calculated to obtain the coordinates of the nodes. Obtain the original trajectory data, and perform format conversion and missing value filling on the original trajectory data to obtain clean trajectory data; The cleaning trajectory data is sorted twice based on the ship's identifier and timestamp to obtain sorted trajectory data.
4. The method according to claim 1, characterized in that, The step of obtaining the route feature vector corresponding to the dual line graph includes: Obtain the center coordinates, total number of visits, unique set of visited ships, and total deadweight tonnage of the nodes in the shipping hypergraph network to obtain the node physical attributes; Based on the dual line graph and the physical attributes of the nodes, feature aggregation processing is performed to obtain the route feature vector.
5. The method according to claim 1, characterized in that, The step of obtaining the route feature vector corresponding to the dual line graph includes: On the dual line graph, the information of adjacent route nodes is aggregated by a graph neural network model and fused with the total tonnage and visit frequency in the physical attributes of the nodes to obtain an initial route feature vector. The initial route feature vector is a feature representation that characterizes the local topology of the route and the physical attributes of the corresponding port. Virtual nodes connected to all nodes in the dual line graph are introduced. Based on the virtual nodes, the network-wide features are aggregated to obtain the network-wide health status features. The network-wide health status features are global feature representations that characterize the overall connectivity robustness of the network, generated by aggregating the information of all nodes in the current network through virtual nodes. The initial route feature vector is fused with the network-wide health status features to obtain the route feature vector.
6. The method according to claim 1, characterized in that, The process involves iteratively selecting a target route from the current pool of candidate routes using a deep reinforcement learning model based on the route feature vector, and obtaining a critical path identification sequence based on the impact of the target route on network connectivity, including: The remaining topology and feature matrix of the shipping network at the current moment are used as the state space, and the target routes selected and removed from the current candidate route pool are used as the action space. Based on the state space and the action space, the descent degree of the largest connected subgraph in the entire network after removing the target route is calculated using a deep reinforcement learning model; The reward value is determined based on the descent degree of the largest connected subgraph in the entire network, and the deep reinforcement learning model is iteratively updated based on the reward value to determine the degree of influence of the target route on network connectivity, and the critical path identification sequence is determined based on the degree of influence.
7. The method according to claim 1, characterized in that, After constructing the shipping hypergraph network, the following is also included: For any pair of adjacent nodes of the hyperedge in the shipping hypergraph network, an undirected edge is established, and the edge weight is determined based on the co-occurrence frequency of the undirected edge to obtain an undirected topology network. For each pair of adjacent nodes in the shipping hypergraph network, a directed edge is established. Based on the total number of voyages, the sum of the total deadweight tonnage, and the number of unique ships corresponding to the directed edge, a multidimensional weight attribute is determined to obtain a directed weighted flow network.
8. A shipping critical path identification device, characterized in that, The device includes: The network construction unit is used to acquire historical ship trajectory data, extract trajectory sequences based on the historical ship trajectory data, and construct a shipping hypergraph network using the trajectory sequences as hyperedges. The dual-line graph construction unit is used to convert the hyperedges in the shipping hypergraph network into dual graph nodes that represent the route trajectory. If any two hyperedges in the shipping hypergraph network pass through at least one port node, then a connection is established between the dual graph nodes to obtain a dual-line graph composed of the dual graph nodes and the connection. A vector acquisition unit is used to acquire the route feature vector corresponding to the dual line graph; The critical path identification unit is used to iteratively select a target route from the current pool of candidate routes based on the route feature vector using a deep reinforcement learning model, and obtain a critical path identification sequence based on the degree of influence of the target route on network connectivity.
9. An electronic device, characterized in that, The electronic device includes: Memory, used to store executable program code; A processor for calling and running the executable program code from the memory, causing the electronic device to perform the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the method as described in any one of claims 1 to 7.