Coast sensing path interpolator
By receiving historical ship position data and allocating land block areas, combining visibility maps and path search algorithms to optimize path interpolation, the problems of high-resolution model operation complexity and low-resolution model in the existing technology are solved, and efficient and accurate ship path interpolation is achieved.
Patent Information
- Application Number
- CN202380092916.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-31
- Publication Date
- 2025-09-05
AI Technical Summary
The prior art is difficult to maintain efficient and accurate when considering land blocks when generating ship path interpolation, especially when the computational complexity is too high under high resolution models, while the low resolution models cannot accurately represent fine waterways such as rivers.
By receiving historical ship location data, allocating land block regional waterways, using unit grids and travel square algorithms to generate output coastline models, combining visibility graphs and path search algorithms such as A* or Dyxtra algorithms, optimizing the path interpolation process.
It improves the accuracy of path interpolation, reduces the computational complexity, ensures that the path does not intersect with the land block, and is suitable for processing large amounts of ship data in real time.
Smart Images

Figure CN120604229A_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Australian Provisional Patent Application No. 2022900188 filed on February 1, 2022, the contents of which are incorporated herein by reference in their entirety. Technical Field
[0003] The present disclosure relates to interpolating vessel paths around geographic obstacles represented as polygons. Background Art
[0004] Thousands of ships, such as container ships and other cargo vessels, travel the world's waterways. For each of these ships, it is important to have an accurate estimate of its travel path. While positioning data is generally available, there are some cases where it is missing. In those cases, a path can be interpolated between existing locations. However, path interpolation that does not account for land masses, such as islands, results in a path that intersects those land masses. This is clearly inaccurate and undesirable. Furthermore, the interpolation method should be able to run on existing computer hardware, meaning that path interpolation should be computationally efficient, allowing interpolation to be performed within a short timeframe (e.g., minutes to hours).
[0005] Models exist for land masses, such as polygonal coastline models, which can be used to perform coast-aware path interpolation. However, there is a difficult trade-off between the computational complexity incurred by high-resolution models and the inaccuracies incurred by low-resolution models. In particular, it is difficult to account for paths along rivers, which are only fully visible in high-resolution models due to their narrow shapes. In low-resolution models, rivers are often absent or appear as one-dimensional lines, which are insufficient for accurate path interpolation. Using higher-resolution models would result in prohibitive computational complexity—especially when processing a large number of ships in real time, as this means that processing must be done between position updates. Summary of the Invention
[0006] A method for generating an output coastline model, comprising:
[0007] receiving historical vessel position data, the historical vessel position data comprising a plurality of historical positions of the vessel for each of a plurality of vessels;
[0008] receiving an input shoreline model defining waterways and land masses;
[0009] determining, based on the historical ship position data, land areas in the input coastline model that include the multiple historical positions of the multiple ships;
[0010] The landmass regions in the input shoreline model containing the plurality of historical locations are assigned to the waterways in the input shoreline model, thereby generating an output shoreline model.
[0011] Advantageously, the model uses the historical positions of ships to assign landmass regions to waterways. Thus, the method substantially increases the resolution of the model in areas where higher resolution is particularly desirable. Overall, this improves the accuracy of the model for ship paths without significantly increasing the model size, which would occur if the entire model were changed to a higher resolution. The result is a model that is more accurate while still fitting within available computer memory.
[0012] In some embodiments, the method further comprises:
[0013] providing a cell grid over at least a portion of the input coastline model;
[0014] determining a density of the plurality of historical locations in each cell in the grid; and
[0015] The land parcel is assigned to the waterway in response to the density being above a threshold.
[0016] In some embodiments, the method further comprises generating a polygon using the cells as points of the polygon to assign the land parcels on one side of the polygon to the waterway.
[0017] In some embodiments, generating the polygon includes determining a shape of the polygon for each group of cells based on which cells of the group are above a threshold.
[0018] In some embodiments, the method further comprises performing a marching squares algorithm to assign the land mass areas to the waterways.
[0019] In some embodiments, the input shoreline model includes one or more rivers represented as lines, and the output shoreline model includes the one or more rivers represented as polygonal lines representing waterway areas.
[0020] In some embodiments, the input coastline model and the output coastline model are global models.
[0021] In some embodiments, the input shoreline model and the output shoreline model each include a visibility map.
[0022] In some embodiments, the method further comprises interpolating vessel paths within the waterways in the output shoreline model.
[0023] In some embodiments, generating the output shoreline model includes modifying the input shoreline model by subtracting an area containing the plurality of historical locations from the landmass area in the input shoreline model.
[0024] In some embodiments, receiving the input coastline model includes reading a serialized file storing the input coastline model.
[0025] In some embodiments, the input coastline model includes an adjacency matrix representing visibility between nodes of a visibility graph, and the adjacency matrix is serialized to the serialization file.
[0026] In some embodiments, the serialized file includes fixed length fields.
[0027] In some embodiments, the method includes accessing the fixed length field using a memory map.
[0028] In some embodiments, the method further comprises caching, using a processor cache, fields of the serialized file that are geographically proximate on the processor cache.
[0029] In some embodiments, the method further includes instantiating an array containing the fields that are geographically proximate to store the array in the processor cache, and then iterating over the array.
[0030] In some embodiments, the method further comprises the steps of determining and distributing among a plurality of threads, each of the threads accessing a single copy of the input shoreline model from a shared memory.
[0031] A software which, when executed by a computer, causes the computer to perform the above method.
[0032] A computer system includes one or more processors configured to perform the above method.
[0033] A method for interpolating a vessel path around a geographic obstacle represented as a polygon, comprising:
[0034] generating a visibility map representing visibility between points of the polygon;
[0035] storing the visibility graph for use by multiple executions of a pathfinding method;
[0036] receiving a source and a destination to perform said path finding method from said source to said destination;
[0037] Generate an updated visibility graph containing the source and the destination by:
[0038] determining a first edge in the visibility graph that is closest to the source along a direction between the source and the destination,
[0039] connecting the source to the graph by connecting the source to the first edge,
[0040] determining a second edge in the visibility graph that is closest to the destination along the direction between the source and the destination, and
[0041] connecting the destination to the graph by connecting the destination to the second edge; and
[0042] The path finding method is executed to find a path from the source to the destination in the updated visibility graph.
[0043] In some embodiments, the method further comprises generating a spatial index for edges that intersect the line between the source and the destination, the spatial index indicating a position of the intersecting edge along the line.
[0044] In some embodiments, the execution of the path finding method is conditioned on the spatial index.
[0045] In some embodiments, the method further comprises performing the path finding in response to determining that at least one edge intersects the line; and returning the line as the path in response to determining that no edge intersects the line.
[0046] In some embodiments, determining the first edge comprises selecting the first edge closest to the source and intersecting the line between the source and the destination; and determining the second edge comprises selecting the second edge closest to the destination and intersecting the line between the source and the destination.
[0047] In some embodiments, the visibility graph includes nodes associated with corresponding geographic locations stored with a fixed precision.
[0048] In some embodiments, the fixed precision is a degree relative to the geographic location of each node. In some embodiments, the fixed precision is a microdegree. In some embodiments, the geographic location is stored as a 32-bit integer.
[0049] In some embodiments, storing the visibility graph comprises generating a mapping directly in an address space of a computer system by calling a low-level mapping function; serializing the visibility graph; and storing the serialized visibility graph directly in the address space.
[0050] In some embodiments, the method further includes biasing the path finding method toward a greedier operation to increase computational speed.
[0051] In some embodiments, the path finding method comprises an A* method.
[0052] In some embodiments, the path finding method includes Dijkstra's algorithm.
[0053] In some embodiments, the path finding method is based on a first set of vertices included in the shortest path tree and a second set of vertices not included in the shortest path tree, and the path finding method includes finding a vertex in the second set of vertices having a minimum distance to the source.
[0054] In some embodiments, the method further comprises generating a user interface showing the path from the source to the destination.
[0055] A software which, when executed by a computer, causes the computer to perform the above method.
[0056] A computer system for interpolating a vessel path around a geographic obstacle represented as a polygon, comprising:
[0057] a data storage device configured to store the polygon representing the geographic obstacle;
[0058] A processor configured to perform the following steps:
[0059] generating a visibility map representing visibility between points of the polygon;
[0060] storing the visibility graph for use by multiple executions of a pathfinding method;
[0061] receiving a source and a destination to perform said path finding method from said source to said destination;
[0062] Generate an updated visibility graph containing the source and the destination by:
[0063] determining a first edge in the visibility graph that is closest to the source along a direction between the source and the destination,
[0064] connecting the source to the graph by connecting the source to the first edge,
[0065] determining a second edge in the visibility graph that is closest to the destination along the direction between the source and the destination, and
[0066] connecting the destination to the graph by connecting the destination to the second edge; and
[0067] The path finding method is executed to find a path from the source to the destination in the updated visibility graph. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 The problem of ship path interpolation is illustrated.
[0069] Figure 2 Draws a picture of Figure 1 Visibility graph for the example scene.
[0070] Figure 3 An updated visibility graph with connected sources and destinations is plotted.
[0071] Figure 4 The determined path from source to destination through the visibility graph is depicted.
[0072] FIG5 illustrates a method for interpolating a vessel path around a geographical obstacle.
[0073] Figure 6 Depicts how to determine the edges closest to the source and destination, respectively.
[0074] Figure 7 Plots the result of connecting sources and destinations to their corresponding closest edges.
[0075] Figure 8 A bird's-eye view of a typical freight scene is depicted, showing land masses on either side of a river.
[0076] Figure 9 Depicts the method used to generate the output coastline.
[0077] Figure 10 A cell grid stretched over the input coastline model is shown.
[0078] Figure 11 Draws Figure 10 A grid with a binary value assigned to each cell.
[0079] Figure 12 A sample shape library is depicted. DETAILED DESCRIPTION
[0080] Ship tracking is a crucial step in the global movement of cargo. Systems exist to provide a vessel's current location, such as the Automatic Identification System (AIS), which provides Global Positioning System (GPS) coordinates. However, it's common for the provided location to contain gaps, making it impossible to obtain an accurate position for periods of time while the vessel is moving.
[0081] It is often desirable to generate a map in a user interface that shows the path taken by a vessel. This can be a path of past positions of the vessel or a path of predicted future positions of the vessel. In any case, such paths are often incomplete, for example due to missing GPS data. One option for generating a complete path is to interpolate between existing positions and within the gaps in missing position data.
[0082] However, most interpolation methods generate straight or curved lines that do not account for whether landmasses are blocking the ship's path. For example, if a ship is traveling from A to B and a landmass lies between A and B, requiring the ship to circumvent the landmass, existing interpolation methods will intersect the landmass, which is obviously undesirable because the ship cannot travel over land. Therefore, a more accurate method for interpolating a ship's path would be desirable. Furthermore, a method that is computationally efficient compared to existing methods would be desirable.
[0083] Path interpolation
[0084] Figure 1 To illustrate the problem of vessel path interpolation, a vessel 101 is shown traveling from source 102 around landmass 105 to destination 103. Four past vessel positions (e.g., 106) are available, but no further positions are available from the position shown at 101. Note that typical vessel data does include destination 103. The diagram shows the actual path 107, which is unknown at this stage. However, destination 103 is known from the route data available to vessel 101. In other examples, the vessel has already reached destination 103 and reported its GPS position therefrom, but no GPS positions are available along the actual path of travel. One way to estimate the path of travel is by linear interpolation, which generates an estimated path 108. Clearly, estimated path 108 is inaccurate because it crosses landmass 105.
[0085] Visibility Graph
[0086] Another way to estimate the travel path is by constructing Figure 1 A graph representation of the landmasses 105 in FIG is used and a graph search algorithm is performed to find the shortest path through the graph. A particularly suitable graph for this purpose is a visibility graph. In a visibility graph, there are nodes representing geographic locations, and edges between nodes indicate that the connected nodes can 'see' each other. That is, there are no obstructing landmasses between the nodes connected by the edges, and a ship can travel directly between the two connected nodes along the corresponding edge. In this sense, the landmasses 105 are approximated as polygons 201 (in FIG. Figure 2 ), and the corners of the polygon are nodes of the visibility graph 204. The edges of the polygon are also edges of the visibility graph 204 because two adjacent points will always see each other.
[0087] exist Figure 2There are two additional edges in denoted by 202 and 203, which indicate visibility through nodes that are immediately adjacent to the node and are also part of the visibility graph 204, but are not part of the initial polygon 201 that approximates the landmass 105. This occurs, for example, when the landmass polygon 201 is concave due to a bay or estuary. Figure 2 The visibility map 204 shown in can be generated once or obtained from a third-party source.
[0088] In one example, the visibility graph can be generated by Lee's visibility graph algorithm described in Coleman, Dave., "Lee's O(n2 log n) Visibility Graph Algorithm Implementation and Analysis" (2012), available at https: / / dav.ee / papers / Visibility_Graph_Algorithm.pdf. Essentially, the algorithm described there computes the visibility graph G from G(V, E) by computing the visibility graph of a single vertex n times. v For each vertex v i ∈ V, the visibility of all other vertices is calculated by: 1) sorting all surrounding vertices in angular order from a certain starting scan line, 2) visiting each vertex in angular order using a rotating plane scan technique, and 3) keeping track of the distance of each surrounding line segment on the scan line in a sorted data structure. Once the visibility graph is generated, it can be serialized and stored as a file on the file system. This file can remain unchanged until the terrain changes or needs to be updated for other reasons.
[0089] In some instances, the file is in a structured text format, such as Extensible Markup Language (XML) or JavaScript Object Notation (JSON). In other instances, the file is in a binary format. The file has a header with a small amount of metadata, namely the number of polygons in the graph. Next, it serializes the actual polygons from the coastline map in a fixed-point representation. Finally, the visibility graph itself is serialized as an adjacency matrix (but only half, because the matrix is symmetric). The adjacency matrix has a row for each node and a column for each node. Therefore, for n nodes, the adjacency matrix is an n×n matrix, and if there is no visibility between two nodes, the cell is empty or has a bit value of '0', and if there is visibility between two nodes, the cell has an entry, such as a bit value of '1'. Fixed-point representation stores coordinates as 32-bit integers (in microdegrees).
[0090] Now assume that ship 101 only travels along the edges of visibility graph 204, which easily avoids intersecting landmass 105. The goal is to find the shortest path along those edges. However, each time this method is performed, the position of ship 101 is typically different, meaning that ship 101 is connected to visibility graph 204 each time the method is performed.
[0091] One way to connect the vessel 101 to the visibility graph 204 is to perform a visibility analysis to determine the nodes visible to the vessel 101. Note that the vessel 101 is also referred to as the 'source' because the vessel is the source for the path-finding algorithm. Therefore, the 'source' may also be the last reported position before the gap, and the destination may be the first reported position after the gap.
[0092] Figure 3 The result of connecting the vessel 101 to the visibility graph 204 is shown, which creates additional edges between the vessel 101 and each of the nodes visible from the vessel 101. The diagram also shows edges indicating nodes visible from the destination. Figure 3 The graph shown in FIG can be used to determine the shortest path from the source (vessel 101) to the destination 103 that avoids the landmass 105. The shortest path 401 in this example is Figure 4 Indicated by bold lines.
[0093] While the above approach works well for small problems with a small number of nodes in the polygons 201, it has been found that for larger problems, and particularly where the entire world is represented in one graph, computational complexity becomes a problem. One particular problem that has been identified is adding ships 101 and destinations 103 to the graph. Figure 3 This is because this step must be performed again when the vessel 101 has moved.
[0094] Improved graph generation
[0095] To solve this problem, Figure 5a The diagram shows the method for representing a polygon (e.g., Figures 2 to 4 The method 500 is performed by a processor of a computer system that executes instructions represented in a software program to perform the method 500.
[0096] Computer Implementation Plan
[0097] Figure 5bA computer network 550 is shown, including a first computer system 551 and a second computer system 561. The first computer system 551 includes a processor 552, a non-transitory program memory 553, and a data memory 554. The data memory can be either transient, such as random access memory (RAM), or non-transitory, such as a hard disk. The processor 552 executes program code stored in the program memory 553, which causes the processor 552 to perform the method 500. The program code stored in the memory 553 can also be referred to as a first software system. More specifically, for example, the methods disclosed herein are implemented in a programming language, which is then compiled into binary form and installed in the program memory 553.
[0098] The first computer system 551 further includes a communication port for receiving position data from a position data receiver 556, which in turn receives position data from a vessel 557 via wireless communication. As described above, the vessel 557 may carry a GPS sensor and wirelessly transmit GPS coordinates to the receiver 556. Other sensors, such as the Global Navigation Satellite System (GLONASS), BeiDou, or Galileo, may also be used. Positions determined by satellite navigation using these systems may be improved using assistance techniques (e.g., Assisted GPS). Other non-satellite-based position systems, such as inertial navigation systems or dead reckoning, may also be used for position determination.
[0099] In another example, the geolocation data includes data from an Automatic Identification System (AIS), which can be transmitted from each vessel to a ground-based receiver (T-AIS) or satellite (S-AIS). The data from the various receivers can be aggregated and provided via the Internet. In this manner, the processor 552 can receive location data via the Internet, for example, by invoking an API call from an AIS data provider, such as MarineTraffic.com, Vesselfinder.com, or Spire Marine.
[0100] The processor 552 receives the geographic location data generated by the receiver 556 through a communication port 555, which may be a wide area network (WAN) or local area network (LAN) interface. In other examples, the processor 552 receives the location data from a database 558 storing historical location data, such as the recorded locations of all available vessels over the past year.
[0101] As described in more detail herein, processor 552 performs graph operations and executes path-finding methods to determine a path that avoids land masses.
[0102] Processor 552 may also generate a map in the user interface that displays the interpolated path taken by the vessel. That is, the user interface displays the edges of the visibility map that constitute the determined path. This may be a path of the vessel's past positions or a path of the vessel's predicted future positions. The user interface may also display land masses, such that the path is overlaid on a map of a specific geographic area. It should be noted that the path estimate is now more accurate, meaning that the user interface displays more accurate data to the user in the sense that the interpolated path does not intersect any of the land masses.
[0103] Tracking data output
[0104] Once processor 502 has determined the path, it can also determine or receive tracking data, for example, by detecting a vessel departure. Processor 502 can then generate an event to notify second computer system 561 of the detected departure. The second computer system also includes a second processor 562, a second program memory 563, a second data memory 564, and a second database 568. The program code installed in second program memory 563 can also be referred to as a second software system. Second processor 562 can provide an API that processor 552 can call, for example, by calling a web-API function at SecondComputerSystem.com / api / vesselDeparted?vesselID=123. The web location SecondComputerSystem.com can be replaced with an Internet Protocol (IP) address. As can be seen in this example, the API function call includes the vessel identifier, vesselID, which in this case is 123. The API function call is the event generated by processor 552 after determining that the vessel has left the port.
[0105] Alternatively, the first computer system 552 may expose an API, and the second processor 562 may call an update request function. After determining that the vessel has departed, the processor 552 may generate an event in response to the update request. Specifically, the generated event may be a change in the value of a return variable.
[0106] In response to receiving the tracking data, for example, via an API, the second computer system 561 may perform actions that are then said to be triggered by events generated by the processor 552 of the first computer system 551 .
[0107] While FIG5 illustrates an example computer network with two different hardware systems, it should be noted that the described method can also be performed on the same hardware system, allowing two software systems to communicate with each other. In this sense, the first software system generates an event that triggers an action in the second software system. For example, the first and second computer systems 551 can be implemented in a cloud computing environment with a dynamically changing number of computing and storage instances. The API calls provided below can also be replaced by function calls or inter-process communication, or by storing files containing trace data in a non-transitory data store 554.
[0108] method
[0109] Return to Figure 5a , the processor 552 first generates 501 indicating that Figure 2 204 shows the visibility between the points of the polygons depicted in FIG. As described above, the edges of visibility graph 204 indicate that connected nodes are visible to each other. In the case of ship movement, an edge means that the ship can travel directly between two connected nodes. If two nodes are not connected, then this means that there is an obstacle (e.g., landmass) between those nodes and the ship cannot travel directly between those nodes.
[0110] The processor stores 502 the visibility map 204 for use in multiple executions of the pathfinding method. As discussed above, the visibility map 204, including the polygon 201 approximating the landmass 105 and the additional edges 202 and 203, remains static and is generated only once. This can be done for the entire world in order to generate the polygons and other edges of the visibility map for all landmasses in the world.
[0111] Next, the processor receives 503 a source and a destination to perform a path-finding method from the source to the destination. For example, the processor 503 may also perform a vessel tracking method to receive and track the GPS coordinates of a vessel. The processor may then estimate / interpolate the vessel's movement from the current or last location ("source") to the destination by performing the path-finding method disclosed herein.
[0112] In order to adapt the existing static visibility map 204 to the current dynamic situation, ie the location of the source 101 , the processor generates 504 an updated visibility map comprising sources and destinations.
[0113] and Figure 3 Instead, the processor determines 505 a first edge in the visibility graph that is closest to the source along the direction between the source and the destination. Figure 6This concept is illustrated by showing source 101, visibility graph 204, and dashed line 601 representing the direction between source 101 and destination 103. As can be seen, dashed line 601 intersects visibility graph 204, and therefore intersects the edges of visibility graph 204. More specifically, dashed line 601 intersects first edge 202 and second edge 203. As demonstrated in this example, the edge closest to source 101 along the direction between source 204 and destination 103 is edge 203.
[0114] The processor now determines the closest of these edges by determining the distance along the imaginary line 601 between the source 101 and the intersection point. More specifically, the processor generates a spatial index for the edge that intersects the line 601. The spatial index indicates the position of the intersecting edge along the line. For example, the processor may maintain a counter that starts with the first edge 202 and increments for each edge that intersects the line. Figure 6 In the small example of , edge 202 will have a counter value of '0' and edge 203 will have a counter value of '1' as the corresponding spatial index values. Determining this spatial index is much simpler than calculating the actual geographical distance between the points.
[0115] Next, the processor connects source 101 to the edge with the largest spatial index value and connects destination 103 to the edge with the smallest spatial index value. If no edge intersects line 601, the processor determines that line 601 is an estimate of the path of vessel 101. That is, the processor only performs the path finding method if there is at least one edge that intersects line 601.
[0116] Thus, the processor connects 506 source 101 to visibility graph 204 by connecting it to edge 203. The processor connects source 2041 by creating one or more new edges between source 2041 and nodes of visibility graph 204. More specifically, the processor creates one or more edges between source 101 and the node closest to edge 203 of source 101. In some examples, the processor adds two edges, including one edge to each node of edge 203, as shown in FIG5. In other examples, the processor selects the node closest to edge 203 of source 101 and creates only one edge to that node.
[0117] Similarly, the processor determines 507 another edge 202 in the visibility graph 204 that is closest to the destination 103 along the direction between the source 101 and the destination 103, and connects 508 the destination 103 to the visibility graph 204 by connecting the destination 103 to the determined edge 202. Likewise, the connection to the closest of the two nodes may be via two added edges or via only a single edge.
[0118] Once you have obtained Figure 7Based on the updated visibility graph 204 shown in FIG, the processor executes 509 a path finding method to find a path from the source 101 to the destination 103 in the updated visibility graph.
[0119] Path Finding
[0120] There are a number of different path-finding algorithms that can be used to find a path from source 101 to destination 103 along the edges of the updated visibility graph. One example is the A* search algorithm disclosed in Hart, PE; Nilsson, NJ; Raphael, B. (1968), "A Formal Basis for the Heuristic Determination of Minimum Cost Paths," IEEE Transactions on Systems Science and Cybernetics, 4(2):100-7, incorporated herein by reference. The A* algorithm is an informed search algorithm, or best-first search, which means that it is formulated over a weighted graph: starting from a particular starting node of the graph (i.e., source 101), it aims to find a path to the destination node with minimum cost (minimum travel distance, shortest time, etc.). It does this by maintaining a tree of paths starting at the start node and extending those paths one edge at a time until their termination criterion is met.
[0121] In each iteration of its main loop, A* determines which of its paths to extend. It does this based on the cost of the path and an estimate of the cost required to extend the path all the way to the goal. Specifically, A* chooses the path that minimizes:
[0122] f(n)=g(n)+h(n)
[0123] where n is the next node on the path, g(n) is the cost of the path from the start node to n, and h(n) is a heuristic function that estimates the cost of the cheapest path from n to the destination. A* terminates when the path it chooses to extend is the path from the start to the goal, or if there are no suitable paths to extend. The heuristic function h(n) is problem-specific and can be the geographic distance between n and the destination.
[0124] There may be existing libraries that can perform the above steps, such as the pyvisgraph library available on GitHub by Christian August Reksten-Monsen (TaipanRex).
[0125] Since the A* algorithm is an extension of the Dykstra algorithm, it is also possible that in some applications, the processor performs the Dykstra algorithm, but for larger problems, efficiency may become an issue. More specifically, the processor maintains two sets, one set containing vertices included in the shortest path tree and the other set containing vertices not yet included in the shortest path tree. At each step of the algorithm, the processor searches for vertices in the other set (the set not yet included) that have the minimum distance from the source. In yet another example, the processor performs the Lee path finding algorithm (Lee, CY (1961), "An Algorithm for Path Connections and Its Applications", IRE Transactions on Electronic Computers, EC-10 (2): 346-365), which is a breadth-first search. The algorithm follows a wave expansion paradigm, where all neighbors of the origin are marked with a distance from the origin ('1'), and in the next step, all neighbors of the neighbor are marked with a distance '2', and so on. The algorithm then backtracks from the destination by selecting the next node in the path that has a smaller distance than the current node.
[0126] acceleration
[0127] To speed up the operation of the method disclosed herein, the processor may store the geographic location of the vessel and the nodes of the visibility graph 204 in fixed-precision variables in the computer program. This is in contrast to floating-point variables. Fixed-precision variables can be integers, such as 32-bit integers. Such integers can store each geographic location with an accuracy of one microdegree (1 / 1,000,000 degree) relative to longitude and latitude. Since integers can be processed more efficiently than floating-point variables, the use of fixed-precision variables significantly increases the operation speed of the method. In addition, floating-point errors are avoided, which improves accuracy. More specifically, equations for floating-point numbers are not clearly defined. On the other hand, whether two integers or fixed-precision numbers are equal is clear. For floating-point numbers, in some cases, poorly defined inequalities can lead to false positives in the sense that the processor determines that a node is visible but in fact the node is not. In such cases, the visibility graph will contain self-intersecting edges, which may lead to incorrect results. The processor eliminates these inaccuracies by using fixed-precision numbers or integers.
[0128] Another way to improve the performance of the methods disclosed herein is to store visibility graph 204 using low-level functions rather than typical operating system functions for storing data objects. More specifically, the processor can generate a mapping directly in the computer system's address space by calling a low-level mapping function. This reserves space on persistent computer memory, such as a hard drive or solid-state drive. The processor can then serialize visibility graph 204 and store the serialized visibility graph directly in the mapped address space on persistent memory.
[0129] In another approach to improving performance, the pathfinding method can be tuned to operate more greedily. This means that the processor is more likely to choose nodes with lower heuristic costs. In other words, the optimization favors the heuristic part of the A* algorithm over the exact distance from the source to the node n. For example, the A* equation is changed from
[0130] f(n)=g(n)+h(n)
[0131] becomes
[0132] f(n)=(2-w)*g(n)+w*h(n),
[0133] where w is a tunable parameter for "greediness" > 1. This can increase the risk of not finding the best possible path through visibility graph 204. However, for some applications, whether the path is optimal is not important as long as landmass obstacles are avoided. On the other hand, this greedier approach means the processor visits fewer paths, thus significantly reducing processing time.
[0134] The optimizations disclosed herein are particularly useful when data (e.g., vessel positions) enter the system at a rate (e.g., multiple positions per unit time). If the disclosed system processes this volume at a slower rate, the problem becomes infeasible, but with the optimizations disclosed herein, it is possible to process vessel positions faster than they are generated, which can also be referred to as real-time processing.
[0135] result
[0136] The performance characteristics of the disclosed method were tested through a series of benchmarks. Benchmarking the method against PyVisGraph was performed on a local machine, while benchmarking visibility graph generation for high-resolution maps was performed on an AWS EC2 instance. The former was to ensure that the assumption that the disclosed method outperforms existing solutions was valid. The latter was to ensure that the performance was sufficient for the specific application.
[0137] result:
[0138] For a low-resolution graph (5065 vertices), graph generation using the disclosed method is 3.7 times faster than PyVisGraph.
[0139] On an M.2 AWS EC2 instance with 96 cores and 128GB of memory, high-resolution map generation takes about 10 hours.
[0140] • On a coarse graph (656 vertices), interpolation using the disclosed method is 9.5 times faster than PyVisGraph.
[0141] • For a low-resolution graph (5065 vertices), interpolation using the disclosed method is 9 times faster than PyVisGraph.
[0142] • If the disclosed method meets certain reasonable expectations, then the interpolation of the entire history of events for a historically rich vessel is within acceptable limits.
[0143] The present disclosure provides a solution for path interpolation between missing GPS positions that is accurate and computationally feasible for a large number of vertices.
[0144] Data-driven map generation
[0145] As previously explained, a problem with coastline models is that high-resolution models lead to excessive computational complexity for pathfinding, while low-resolution models cannot accurately represent small waterways, such as rivers, in two dimensions. In this context, resolution can be defined as the maximum distance between two points that define a polygon representing the coastline. Coastlines are typically the demarcation between landmass areas and waterways in the model. However, coastline models also contain single lines to represent rivers, so these rivers do not demarcate the waterways from the landmasses, but only give a rough indication of the river's location without giving its width, which can typically vary along the river.
[0146] Figure 8 A bird's-eye view of a typical freight transport scenario is depicted, showing land masses 801 on either side of a river 802. A coastline model represents the river as a single line 803 connected to another line 804, which represents the coast of a larger body of water (e.g., an ocean). Ships 805 and 806 travel along river 802, but as can be seen visually, ships 805 / 806 do not follow line 803. Therefore, it is difficult to accurately predict ship movement or interpolate ship movement between two points.
[0147] Figure 9A method 900 is depicted for generating an output shoreline model that is more accurate for rivers and other small waterways than existing coarse models without unduly increasing computational complexity. In particular, the method only adds detail for the body of water actually navigated by the vessel providing the position information.
[0148] Method 900 begins by receiving 901 historical vessel position data. For each of a plurality of vessels, this data includes a plurality of historical positions of the vessel. For example, the data may include AIS data containing a plurality of GPS positions along each vessel's path. A link between the positions and the actual path is not required, meaning that the link can be discarded. In other words, method 900 operates on the plurality of positions without reference to the timestamps of these positions. This means that there may be no temporal component to the data analysis of method 900, and the historical positions are an unordered collection of positions without any relationship between them. However, it should be noted that relationships may be maintained, but this is not required for the method disclosed herein to function.
[0149] Next, method 900 includes receiving 902 an input shoreline model that defines waterways and land masses. For example, this input shoreline model may be obtained from the Global Self-Consistent, Hierarchical, High-Resolution Database (GSHHG) https: / / www.soest.hawaii.edu / pwessel / gshhg / at a resolution showing rivers as lines. The model shows lakes and oceans as polygonal shapes or regions. Viewed another way, it can also be said that the model shows land masses, and that waterways are defined by the absence of land masses or simply by being outside of the polygons defined as land masses. This again presents the problem that there is a polygon defining the land masses, and within the polygon there is a single line defining the river. However, the river, being merely a line, has no width and is not technically part of a closed polygon or region.
[0150] Next, method 900 determines 903 landmass areas in the input shoreline model that contain multiple historical locations of multiple ships based on the historical ship position data. In other words, method 900 determines which landmass areas actually contain ship positions, meaning that these landmass areas are not actually landmass areas but rather waterways. More specifically, these areas have been defined as landmasses in the model due to an oversimplification by defining rivers as lines without width, but are actually waterways.
[0151] To this end, method 900 provides the following Figure 10. The cell grid is extended over at least a portion of the input shoreline model. For example, the cell grid may be extended over all portions having at least one vessel location. In other embodiments, the cell grid is extended a predefined distance from lines defining the boundaries between water and land masses in the shoreline model. The model may specifically identify lines as rivers, and method 900 may then extend the predefined distance perpendicular to those lines.
[0152] This predefined distance may be set by the maximum distance of a river or other waterway that can be represented as a line in a coastline model. This distance may be 100m or 500m. Figure 10 As can be seen in , the grid cells extend in either direction from the line representing the river. The size of the grid cells may be chosen based on the accuracy desired and may be in the range of 1m to 100m, or may be 10m or any other suitable size.
[0153] Next, the method 900 calculates the density of historical locations in each cell of the grid. For example, the method 900 counts the number of historical locations located in each grid cell separately. There may be a threshold defined to filter out noisy or incorrect historical locations from the data set. The threshold may be zero for no filtering, or may be 10 or 100 locations. The threshold may also be calculated based on the total number of locations or the average size of the locations. Figure 10 In , cells with positions above the threshold are shaded.
[0154] Next, method 900 may assign a binary value to each grid cell.The binary value indicates whether the number of locations within the grid cell is below or equal to (value '0') or above (value '1') a threshold. Figure 11 A grid is shown with each binary value indicated as a dot in the center of the corresponding grid cell. Black dots indicate the number of locations in the grid that are above a threshold.
[0155] Next, method 900 assigns the landmass areas in the input shoreline model that contain multiple historical locations to the waterways in the input shoreline model. In other words, landmass areas that were previously part of the landmass because the shoreline model defined the rivers as one-dimensional lines can now be assigned to the waterways instead. This means that these areas are effectively subtracted from the shoreline model, in the sense that they are subtracted from the landmass. In yet another embodiment, method 900 adds polygon points to the shoreline model to exclude, subtract, or "cut away" certain areas that are subsequently waterways because they are now outside the landmass polygons. If the landmass is positively defined by the shoreline model, then subtracting the areas from the landmass effectively assigns these areas to the waterways. Consequently, the method produces an output shoreline model that is now more accurate because the output shoreline model more accurately represents the rivers as two-dimensional waterways rather than one-dimensional lines.
[0156] More specifically, the method assigns land parcels to waterways in response to density being above a threshold. Figure 11 In the method 900, the center of the cell with a position above the threshold is assigned to the waterway. More specifically, the method 900 may perform a walking squares algorithm. This means that the method considers each 2×2 square of center points. As explained above, each center point is assigned a value of '0' or '1'. The method starts at the top left center point of the 2×2 square and proceeds clockwise through the four center points. Therefore, the method adds the value assigned to the current center point to the total. Figure 11 An example 2×2 square is shown with corresponding paths 1101 through the four center points of the square. In this example, the value forms the number '1001' (=9) because the first and last center points of the path are above the threshold, while the two middle points are below the threshold. The method then accesses a library of 16 shapes indexed by the corresponding number indicating the path through the center point. Figure 12 An example shape library is shown, and the method selects case 9 corresponding to the number obtained along the path of the four center point paths. Figure 12 As can be seen from the figure, case 9 is a vertical line. Therefore, method 900 selects the following for path 1101: Figure 11 . The method 900 then moves to the next 2×2 square of the center point and repeats the steps of obtaining a binary number to select one of the 16 shapes. Finally, the method 900 adds the selected shape as a polygonal line to the coastline model to subtract the waterway from the landmass.
[0157] exist Figure 11 The results are shown in bold in [ 1 ]. As can be seen, the bold lines now define the rivers as two-dimensional objects, which allows for accurate tracking, interpolation, and prediction. In this sense, method 900 generates polygons using cells as points of polygons to assign land masses on one side of the polygon to waterways, and for each group of cells (i.e., squares), the method selects a polygon shape based on which cells of the group are above a threshold. Thus, the output shoreline model includes rivers represented as polygonal lines representing waterway areas.
[0158] It is interesting to observe that the proposed method also adds islands and other land masses within rivers to the coastline model. This is because islands will not have any recorded historical ship positions. Therefore, points about islands will be below the threshold. Therefore, method 900 selects a shape about the edge of the island, that is, a shape about the edge of the waterway area with recorded historical ship positions, which defines the shape of the island. By adding the selected shape to the coastline model, method 900 essentially adds the island to the model. Using the interpolation method disclosed herein, the ship path can be interpolated to track around the island rather than intersecting across the island. This results in a more accurate display of the interpolated ship path, a more accurate display of the predicted ship path, and a more accurate prediction of ship movement, such as the estimated arrival time.
[0159] It should be noted that method 900 is particularly advantageous in the case of large input and output coastline models, because when the resolution is increased across the entire model to accurately represent rivers, the size of such models will increase significantly. This is because increasing the resolution will not only widen the rivers, but will also increase the number of polygon points almost everywhere in the model, such as along ocean coastlines where higher resolution is not required. For example, the method is particularly advantageous when the input and output coastline models are global models, where increasing the resolution is impractical. For example, increasing the resolution can easily result in a 100-fold increase in model size. Therefore, instead, in addition to the relatively low-resolution coastline model, the output model only represents rivers that are navigable and therefore have historical locations. In this context, global means that the model describes the coastline anywhere on the Earth or at least a large portion of the coastline on the Earth, such as the major continents or all regions on the Earth that are relevant for ship tracking. For example, a global model that does not include Antarctica is still a global model in the sense of a route from one side of the Earth to the other or between any two ports on the Earth, and belongs to the same model. In yet another embodiment, there is only a single model for all ship routes being considered.
[0160] Because shipping vessels frequently travel across large parts of the globe, it's desirable to maintain a global model to accurately determine the globally optimal path that ships are predicted to take. Therefore, the aforementioned issue of large model size is particularly relevant for ship tracking. In other words, the higher the map resolution, the more nodes on the graph, and the more memory required to store the graph. Lower map resolution means less accurate coastlines and less accurate pathfinding results.
[0161] The present disclosure provides a solution that initially relies on a relatively low resolution map, but over time the disclosed method uses the historical positions of ships to locally improve the resolution of the map by assigning landmass areas to waterways at the locations where the ship positions have been recorded. As a result, the map becomes high resolution in areas where high resolution is required, such as along rivers, while the size of the entire model does not increase significantly and still fits into the computer memory available in current computer systems. This avoids the need to split the global model into local sub-models, which would lead to suboptimal path estimates and has a number of technical difficulties. It should be noted that some of the examples disclosed herein involve rivers, but the method is equally useful for increasing resolution in other areas of the model besides rivers, such as coastal areas where the shape of the coast is very complex and is therefore over-simplified or over-smoothed due to the initial low resolution of the model.
[0162] Once the shoreline model is updated to properly represent the river, method 900 can interpolate the ship path in the waterway in the output shoreline model as described herein. Again, because the output shoreline model is a global model, the entire ship path is in the same model, which means that the path is globally optimal.
[0163] Implementation details
[0164] In some instances, the input coastline model (and possibly the output coastline model) can be used as a single file or split across multiple files. Those files are stored on a typical file system on a computer storage device (e.g., a hard drive or solid-state drive) and contain a list of polygons with corresponding points. The polygons and corresponding points are stored as a series of records. Therefore, file objects are also called serialized files. This typically includes text files and binary files. In one example, the coastline model is stored in the shapefile format defined by the Environmental Systems Research Institute (ESRI).
[0165] The shapefile format stores geometric shapes as primitives, such as points, lines, and polygons. These shapes, along with the data attributes linked to each shape, create a representation of geographic data. Although the term "shapefile" is used, the format can consist of a collection of files with a common file name prefix that are stored in the same directory. Three mandatory files have file name extensions: .shp, .shx, and .dbf. Actual shapefiles specifically refer to .shp files, but a shapefile alone is incomplete for distribution because other supporting files are required.
[0166] Mandatory files include:
[0167] .shp—Shape format; the feature geometry itself {Content-Type: x-gis / x-shapefile}
[0168] .shx — Shape index format; a positional index of feature geometry that allows fast forward and backward searches {Content-Type: x-gis / x-shapefile}
[0169] .dbf—attribute format; column attributes for each shape in dBase IV format {Content-Type: application / octet-stream OR text / plain}
[0170] Shapefiles can include fixed-length fields. For example, a shapefile can include a 100-byte header and then any number of records. Records can have different lengths, but the length of each record is stored in the 8-byte record header. There can also be an index file containing an index of the location of the feature geometry. Using this index, it is possible to search backward in the shapefile. In particular, because the index file has fixed-length records, it is possible to search backward in the search file. The processor can then read the record offset to find the correct location in the .shp file.
[0171] The input coastline model may be a visibility graph indicating which nodes of the coastline are visible from other nodes of the coastline. The visibility graph may be generated by a processor performing the Li visibility graph algorithm as described above. When method 900 receives an input coastline model, this means that the computer processor reads a serialized file storing the visibility graph into a memory. However, it should be noted that the entire file does not have to be read, but individual blocks may be read instead. To this end, the processor uses a memory map to access fixed-length fields. For example, the processor may execute program code that uses the mmap function available in many programming languages. The mmap function enables reading of a specific storage area, which is suitable for reading desired records of the visibility graph. Again, this facilitates the use of mmap. Therefore, accessing the desired visibility information is significantly faster because the entire file does not need to be read. In addition, memory usage is again significantly reduced because most of the visibility graph can be retained on permanent storage (HD or SSD, etc.).
[0172] On the other hand, the processor includes a processor cache, which is memory integrated into the processor chip package. Therefore, the processor cache has significantly faster read and write speeds than external random access memory (RAM). It is now possible to read fields of a serialized file into the cache (caching the serialized file) that are geographically close or visible and are therefore more likely to be needed during model updates. The processor may include different levels of cache, such as level 1 and level 2 cache. It is generally not possible to explicitly define the data loaded into the cache, but it is possible to anticipate the prefetch strategy adopted by the processor or compiler. Where a prefetch strategy is available, it is possible to define data types so that the processor loads the most useful data into the cache. For example, in one example, program code causes the processor to instantiate an array containing fields that are geographically close or visible. The compiler and processor will assume that the values in the array are most likely to be used in short succession. Therefore, defining the array causes the processor to store the array in the processor cache. The processor can then iterate over the array very efficiently. Similarly, the array elements are nodes and edges of a visibility graph that is read from persistent storage using a memory map.
[0173] Finally, it should be noted that since the calculation of density and the processing of the 2×2 squares are independent of each other, the marching squares algorithm can be parallelized. In one example, the processor is programmed to spawn multiple threads to determine the cell density / application threshold and then assign the cells to the waterways. The advantage of having multiple threads over having multiple processes or even running steps on multiple machines is that the threads share a common memory space. Thus, the multiple threads each access a single copy of the input shoreline model from shared memory. More specifically, the multiple threads can even access the shapefile from the processor cache. This can be achieved by spawning threads that process cells and squares that are geographically close to each other, because the shapefile data can then be loaded into a single array, which in turn means that the entire array is likely to be prefetched into the processor cache. Again, this leads to a significant speedup and reduction in memory usage, because the data does not need to be loaded into memory separately for each operation.
[0174] It will be appreciated by those skilled in the art that numerous changes and / or modifications may be made to the above-described embodiments without departing from the broad general scope of the present disclosure. Therefore, the embodiments of the present invention should be considered in all aspects as illustrative and not restrictive.
Claims
1. A method for generating an output coastline model, the method comprising: receiving historical vessel position data, the historical vessel position data comprising a plurality of historical positions of the vessel for each of a plurality of vessels; receiving an input shoreline model defining waterways and land masses; determining, based on the historical ship position data, land areas in the input coastline model that include the multiple historical positions of the multiple ships; The landmass regions in the input shoreline model containing the plurality of historical locations are assigned to the waterways in the input shoreline model, thereby generating an output shoreline model.
2. The method according to claim 1, wherein the method further comprises: providing a cell grid over at least a portion of the input coastline model; determining a density of the plurality of historical locations in each cell of the grid; and The land parcel is assigned to the waterway in response to the density being above a threshold. 3 . The method of claim 2 , wherein the method further comprises generating a polygon using the cells as points of the polygon to assign the land parcels on one side of the polygon to the waterway. 4 . The method of claim 3 , wherein generating a polygon comprises determining a shape of the polygon for each group of cells based on which cells in the group are above the threshold.
5. The method of any one of the preceding claims, wherein the method further comprises performing a marching squares algorithm to assign the land mass areas to the waterways.
6. A method according to any one of the preceding claims, wherein the input coastline model comprises one or more rivers represented as lines, and the output coastline model comprises the one or more rivers represented as polygonal lines representing waterway areas.
7. A method according to any one of the preceding claims, wherein the input coastline model and the output coastline model are global models.
8. A method according to any one of the preceding claims, wherein the input coastline model and the output coastline model each comprise a visibility map.
9. A method according to any preceding claim, wherein the method further comprises interpolating vessel paths within the waterways in the output coastline model.
10. The method of any preceding claim, wherein generating the output coastline model comprises modifying the input coastline model by subtracting an area containing the plurality of historical locations from the landmass area in the input coastline model.
11. The method of any one of the preceding claims, wherein receiving the input coastline model comprises reading a serialized file storing the input coastline model. 12 . The method of claim 11 , wherein the input coastline model comprises an adjacency matrix representing visibility between nodes of a visibility graph, and the adjacency matrix is serialized to the serialization file.
13. The method of claim 11 or 12, wherein the serialized file comprises fixed length fields.
14. The method of claim 13, wherein the method comprises using a memory map to access the fixed length fields.
15. The method of any one of claims 12 to 14, wherein the method further comprises using a processor cache to cache fields of the serialized file that are geographically proximate on the processor cache.
16. The method of claim 15, wherein the method further comprises instantiating an array containing the fields that are geographically proximate to store the array in the processor cache, and then iterating over the array.
17. A method according to any preceding claim, wherein the method further comprises the steps of determining and distributing among a plurality of threads, each of the plurality of threads accessing a single copy of the input coastline model from a shared memory.
18. Software which, when executed by a computer, causes the computer to carry out the method according to any one of the preceding claims.
19. A computer system comprising one or more processors configured to perform the method according to any one of claims 1 to 17.