Ship route dynamic optimization method and system based on double grids
By using a dual grid method in route planning, combining historical route data and predicted meteorological and sea conditions data to optimize routes, the problem that route planning in the existing technology is difficult to ensure global optimality and algorithm operation efficiency, and safe and efficient route planning is achieved.
Patent Information
- Application Number
- CN202510024046.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-05-23
AI Technical Summary
Existing route planning schemes are difficult to ensure the optimality of routes across the global scope, especially in long-distance and cross-season navigation tasks. Too fine grid division will lead to extended algorithm operation time and affect decision-making efficiency.
The ship route dynamic optimization method based on dual grids is adopted to optimize routes by building the first grid and the second grid. The first grid is constructed based on historical route data and predicted meteorological and sea conditions data, while the second grid identifies risk steering points and fine-tunes in the refined initial route.
The adaptability and accuracy of route planning are achieved, potential navigation risks are avoided, and planned routes are obtained that are both safe and efficient. By updating the first grid in real time, the timeliness and reliability of route planning are ensured.
Smart Images

Figure CN120027791A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ship route planning, and in particular to a ship route dynamic optimization method and system based on double grids. Background Art
[0002] With the development of intelligent ship technology, route planning technology is mainly reflected in route design and optimization in the intelligent navigation module. Through route planning, route monitoring, automatic collision avoidance and other functions, the ship's maritime transportation is safer and more efficient. However, route planning still faces many challenges. How to plan a safe and reliable route and how to dynamically optimize during navigation are still the key points.
[0003] Among the existing route planning schemes, some schemes divide the vast ocean into several navigation blocks and set up turning points between these blocks as connecting hubs to achieve segmented optimization of the route; this scheme is difficult to ensure the optimality of the route in the global scope. Especially when facing long-distance, cross-seasonal navigation missions, route selection is closely related to seasonal changes, and the direction and path are often very different.
[0004] Some schemes divide the grid too finely, which can improve the optimization accuracy, but will greatly increase the number of grid points, causing the algorithm running time to be sharply extended, affecting decision-making efficiency.
[0005] Some plans rely too much on historical data, ignore the update of nautical chart information, fail to further refine and adjust the planned routes, and fail to monitor meteorological and sea conditions in real time during navigation, which may lead to encountering bad weather during actual navigation, thereby increasing navigation safety risks and affecting operational efficiency. Summary of the invention
[0006] In view of the above analysis, an embodiment of the present invention aims to provide a method and system for dynamic optimization of ship routes based on a dual grid, so as to solve the problem of high navigation risk of existing routes.
[0007] The embodiment of the present invention provides a method for dynamic optimization of ship routes based on a dual grid, comprising the following steps:
[0008] Obtaining ship information and each necessary point in its route plan; predicting weather and sea condition data according to the sailing time, and obtaining an initial route passing through each necessary point based on the first grid; the first grid is constructed based on historical route data and predicted weather and sea condition data;
[0009] Refining the initial route, and identifying whether there is a risk turning point in the refined initial route based on the nautical chart information, and if so, fine-tuning the risk turning point based on the second grid to obtain a planned route; the second grid is constructed based on the refined initial route and the risk turning point;
[0010] Sail according to the planned route, regularly update the first grid based on the latest predicted weather and sea conditions data, and then optimize the remaining planned routes.
[0011] Based on the further improvement of the above method, the first grid is constructed based on historical route data and predicted weather and sea state data, including:
[0012] The historical key turning points of each route in the historical route data are obtained in sequence through downsampling;
[0013] All historical key turning points are clustered by clustering algorithm to obtain multiple classes and noise points; the center point of each class is used as the initial node of the first grid;
[0014] According to the predicted weather and sea condition data, the initial nodes that do not meet the ship information are deleted, and the remaining initial nodes are constructed with edges based on the historical route data and noise points to obtain the first grid.
[0015] Based on the further improvement of the above method, the second grid is constructed according to the refined initial routes and risk turning points, including:
[0016] According to the risk area where the risk turning point is located, the non-risk turning points on the left and right sides of all the risk turning points in each risk area on the refined initial route are obtained along the route direction, and the left and right boundary turning points are determined according to the positions of the non-risk turning points;
[0017] Establish a planning area according to the left and right boundary turning points and the route direction, and divide the planning area into grids according to preset intervals to obtain a second grid;
[0018] The centers of cells in the second grid that are not in the risk area are used as nodes of the second grid, and an edge is constructed between every two adjacent nodes.
[0019] Based on the further improvement of the above method, the edge weights of the first grid and the second grid are calculated by the following formula based on the great circle route distance between the nodes at both ends of each edge, as well as the influencing factors of wind speed, wind direction, wave height and surge direction:
[0020]
[0021] Among them, Cost i,j represents the edge weight between nodes i and j in the grid, and Represent the wind speed influence factors of nodes i and j respectively, and Represent the wind direction influencing factors of nodes i and j respectively, and Represent the wave height influence factors of nodes i and j respectively, and They represent the influencing factors of the inrush direction of nodes i and j respectively, represents the normalized great circle route distance between nodes i and j; w 1 ,w 2 ,,w 3 ,w 4 ,w 5 They represent the weights of wind speed factor, wind direction factor, wave height factor, surge direction factor and great circle route distance, respectively, and
[0022] Based on the further improvement of the above method, the initial route passing through each necessary point is obtained based on the first grid, including:
[0023] By calculating the great circle route distance between each necessary point and each node in the first grid, the node corresponding to the smallest great circle route distance is selected to obtain each planning point;
[0024] Starting from the starting point of each planning point, the dynamic programming algorithm is used to solve the optimal path for each two adjacent planning points according to the weights of each edge of the first grid, until the end point of each planning point. Finally, the optimal path segments are spliced in sequence to obtain the complete path, and the necessary points are used to replace the planning points in the complete path to obtain the initial route.
[0025] Based on the further improvement of the above method, the risk turning point is fine-tuned based on the second grid to obtain the planned route, including:
[0026] Along the route direction, the left boundary turning point of the second grid is used as the fine-tuning starting point, and the right boundary turning point is used as the fine-tuning end point. According to the weights of each edge of the second grid, the dynamic programming algorithm is used to solve the optimal path from the fine-tuning starting point to the fine-tuning end point. The path between the fine-tuning starting point and the fine-tuning end point in the refined initial route is replaced to obtain the planned route.
[0027] Based on the further improvement of the above method, the wind speed influence factor is obtained by performing multiple power operations on the ratio of the node's wind speed prediction value to the wind speed threshold; the wave height influence factor is obtained by performing multiple power operations on the ratio of the node's wave height prediction value to the wave height threshold.
[0028] Based on the further improvement of the above method, the wind direction influence factor is obtained according to the threshold range of the angle between the navigation direction and the predicted node wind direction, and the influence factor value corresponding to the threshold range is obtained; the surge direction influence factor is obtained according to the threshold range of the angle between the navigation direction and the predicted node surge direction, and the influence factor value corresponding to the threshold range is obtained.
[0029] Based on the further improvement of the above method, the initial nodes that do not meet the ship information are deleted according to the predicted meteorological and sea conditions data, including:
[0030] According to the predicted weather and sea conditions data, the predicted values of water depth, wind speed and wave height at the initial node are obtained;
[0031] If the water depth prediction value of the initial node is less than the sum of the estimated draft and the surplus water depth in the ship information, the initial node is deleted;
[0032] If the predicted wind speed value or wave height value of the node exceeds the wind and wave resistance level in the ship information, the initial node will be deleted.
[0033] Based on the further improvement of the above method, the remaining initial nodes construct edges according to the historical route data and noise points, including:
[0034] Sort the remaining initial nodes and noise points by flight segment and time, and take out two adjacent initial nodes in turn. If there is no noise point between the two initial nodes, then establish an edge between the two initial nodes when there is historical route data between the classes to which the two initial nodes belong; if there is a noise point between the two initial nodes, then establish an edge between the two initial nodes only when the distance or time difference between the two initial nodes is within the threshold range.
[0035] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:
[0036] 1. Based on the historical route experience and combined with the predicted weather and sea conditions data, the first grid that meets the actual environment is constructed, which enhances the adaptability and accuracy of route planning; then a local refined second grid is constructed according to the risk turning point to accurately adjust the route, avoid potential navigation risks, and obtain a safe and efficient planned route; during navigation, the first grid is updated in real time according to the latest weather and sea conditions data, so as to continuously optimize the route without over-reliance on historical data, ensuring the timeliness and reliability of route planning, not limited by the sea area or navigation distance, and enabling ships to respond quickly to the latest environmental changes.
[0037] 2. By constructing the first grid through downsampling and clustering, an effective representation of a large range of route planning space is achieved with a smaller number of nodes. This not only significantly reduces the computing resources and time cost required for model operation, but also minimizes resource consumption while maintaining efficient route planning capabilities.
[0038] 3. Based on the safe turning points on the left and right sides of the risk turning point and the predicted weather and sea conditions data, an accurate representation of a small area is constructed to achieve less resource consumption while improving optimization accuracy.
[0039] In the present invention, the above-mentioned technical solutions can also be combined with each other to achieve more preferred combination solutions. Other features and advantages of the present invention will be described in the subsequent description, and some advantages can become obvious from the description, or can be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained through the contents particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings are only used for the purpose of illustrating specific embodiments and are not to be considered as limiting the present invention. In the entire drawings, the same reference symbols represent the same components;
[0041] Figure 1 The present invention is a flowchart of a method for dynamic optimization of ship routes based on double grids in an embodiment of the present invention. DETAILED DESCRIPTION
[0042] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.
[0043] A specific embodiment of the present invention discloses a dual-grid based ship route dynamic optimization method, such as Figure 1 As shown, the following steps are included:
[0044] S1. Obtaining ship information and each necessary point in its route plan; predicting weather and sea condition data according to the sailing time, and obtaining an initial route passing through each necessary point based on the first grid; the first grid is constructed based on historical route data and predicted weather and sea condition data;
[0045] S2, refining the initial route, and identifying whether there is a risk turning point in the refined initial route based on the nautical chart information, and if so, fine-tuning the risk turning point based on the second grid to obtain a planned route; the second grid is constructed based on the refined initial route and the risk turning point;
[0046] S3. Navigate according to the planned route, regularly update the first grid according to the latest predicted weather and sea conditions data, and then optimize the remaining planned routes.
[0047] During implementation, before sailing, step S1 is used to build an overall first grid based on the deep integration of historical route experience and the predicted meteorological and sea conditions data, thereby enhancing the adaptability and accuracy of route planning; step S2 is used to build a locally refined second grid according to the risk turning point, accurately adjust the route, avoid potential navigation risks, and obtain a safe and efficient planned route; during sailing, step S3 is used to update the first grid in real time according to the latest meteorological and sea conditions data, thereby continuously optimizing the route without over-reliance on historical data, ensuring the timeliness and reliability of route planning, and not being limited by the sea area or sailing distance, so that the ship can respond quickly to the latest environmental changes.
[0048] Specifically, in step S1, the ship information and its route plan include: departure port, arrival port, transit port, stay time at transit port, strait, sailing time, estimated draft and surplus water depth, etc. Among them, the longitude and latitude of the departure port, arrival port, transit port and strait are the necessary points of the route to be planned, and the departure port and arrival port are the starting point and end point of the necessary points.
[0049] Based on the geographical location of the transit port and the transit strait, according to the longitude and latitude of the transit port and the longitude and latitude of both ends of the transit strait, the great circle route distance between the transit port and the transit strait and the starting point and the end point is calculated, and the navigation order of each must-pass point is sorted according to the distance.
[0050] The first grid in step S1 is constructed based on historical route data and predicted weather and sea condition data, including:
[0051] ① Obtain the historical key turning points of each route in the historical route data in turn through downsampling.
[0052] It should be noted that the historical route data is collected from multiple data sources such as the automatic identification system AIS, the global positioning system GPS, etc., and may only be part of the complete route; the historical route data includes but is not limited to: MMSI (Maritime Mobile Service Identify), IMO (International Maritime Organization, an identification code issued by the International Maritime Organization), ship type, timestamps of each turning point, longitude and latitude, and draft, etc.
[0053] The historical route data are split according to the ship's MMSI and different segments, sorted by the timestamp of the turning point in each segment, and then downsampled using the Douglas-Peucker algorithm to obtain the historical key turning points of each route.
[0054] The Douglas-Peucker algorithm is a shape-based downsampling algorithm that greatly reduces the amount of data, extracts the historical key turning points of each segment, and retains the shape characteristics of the route. When downsampling, the distance from each turning point on the segment to the line connecting the first and last points is calculated, and these distances are compared with the set distance threshold. If the calculated distance is greater than the distance threshold, the turning point is retained and the segment is divided into two parts for further processing; if the calculated distance is less than or equal to the distance threshold, the turning point is discarded. The size of the distance threshold directly affects the degree of simplification of the curve; the smaller the threshold, the more points are retained and the smoother the segment curve; the larger the threshold, the fewer points are retained and the sharper the segment curve.
[0055] ② Cluster all historical key turning points through clustering algorithm to obtain multiple classes and noise points; the center point of each class is used as the initial node of the first grid.
[0056] Summarize all the key turning points obtained by downsampling, and use the spatial density clustering algorithm, such as the DBSCAN algorithm, to cluster them according to the longitude and latitude coordinates. The algorithm marks all historical key turning points into three types: core points, boundary points, and noise points. Boundary points belong to the same class as the core points within the neighborhood radius, and noise points do not belong to any class. The center point of each class is the average longitude and latitude of all key turning points in the class.
[0057] The center point of each class is taken as the initial node of the first grid. The density and distribution of the initial nodes in coastal areas, complex sea areas and vast sea areas are obviously different.
[0058] ③ According to the predicted weather and sea conditions data, the initial nodes that do not meet the ship information are deleted, and the remaining initial nodes are constructed with edges based on the historical route data and noise points to obtain the first grid.
[0059] According to the sailing time, the weather and sea condition data of each initial node in the first grid are predicted by calling the weather and sea condition forecast interface, and the initial nodes that do not meet the ship information are deleted, including:
[0060] According to the predicted weather and sea conditions data, the predicted values of water depth, wind speed and wave height at the initial node are obtained;
[0061] If the water depth prediction value of the initial node is less than the sum of the estimated draft and the surplus water depth in the ship information, the initial node will be deleted;
[0062] If the predicted wind speed value or wave height value of the node exceeds the wind and wave resistance level in the ship information, the initial node is deleted.
[0063] Furthermore, the remaining initial nodes construct edges based on historical route data and noise points, including:
[0064] Sort the remaining initial nodes and noise points by flight segments and time, and take out two adjacent initial nodes in turn. If there is no noise point between the two initial nodes, then when there is historical route data between the classes to which the two initial nodes belong, that is, there is a historical route record between any node in the class and any node in the adjacent class, establish an edge between the two initial nodes; if there is a noise point between the two initial nodes, then establish an edge between the two initial nodes only when the distance or time difference between the two initial nodes is within the threshold range.
[0065] Preferably, the corresponding historical route data is recorded and stored for each edge, and statistical features are calculated as edge features to assist decision making. Exemplarily, the statistical features include: travel frequency, time distribution, seasonal distribution, draft distribution, fuel consumption statistics, and ship type.
[0066] Furthermore, this embodiment defines the edge weight in the first grid as the cost of navigation, dynamically calculates multiple influencing factors based on the predicted meteorological and sea condition data of the nodes, and constructs a dynamic cost function with weighted great circle route distances between nodes to calculate the edge weight.
[0067] Specifically, the weight of each edge in the first grid is calculated based on the predicted wind speed, wind direction, wave height and surge direction of the nodes at both ends of each edge, and then averaged, and then weighted with the normalized great circle route distance between the nodes. The formula is as follows:
[0068]
[0069] Among them, Cost i,j represents the edge weight between nodes i and j in the grid, and Represent the wind speed influence factors of nodes i and j respectively, and Represent the wind direction influencing factors of nodes i and j respectively, and Represent the wave height influence factors of nodes i and j respectively, and They represent the influencing factors of the inrush direction of nodes i and j respectively, represents the normalized great circle route distance between nodes i and j; w 1 ,w 2 ,,w 3 ,w 4 ,w 5 They represent the weights of wind speed factor, wind direction factor, wave height factor, surge direction factor and great circle route distance, respectively, and Each weight is set based on the actual risk-taking capacity and needs.
[0070] Furthermore, the wind speed influence factor is obtained by performing multiple power operations on the ratio of the node's wind speed prediction value to the wind speed threshold; the wave height influence factor is obtained by performing multiple power operations on the ratio of the node's wave height prediction value to the wave height threshold, and the formula is as follows:
[0071]
[0072] Among them, B wS and B wH Represent the wind speed threshold and wave height threshold respectively, and Respectively represent the predicted wind speed and wave height of node i; k represents the exponent of the power operation, preferably, k = 4. It can be seen from the formula that when the wind speed or wave height of a node is greater than the corresponding threshold, the node may not be suitable for navigation, and the exponent of the power operation amplifies this influence and increases the cost of the node.
[0073] The wind direction influence factor is the influence factor value corresponding to the threshold range of the angle between the navigation direction and the predicted node wind direction; the surge direction influence factor is the influence factor value corresponding to the threshold range of the angle between the navigation direction and the predicted node surge direction. The formula is as follows:
[0074]
[0075] Among them, θ i Represents the angle between the navigation direction and the predicted wind direction of node i; σ i represents the angle between the navigation direction and the predicted flow direction of node i; θ i and σ i The reference direction is due north. It can be seen from the formula that when the angle between the navigation direction and the predicted wind direction and surge direction of the node is in the range of [100°, 170°], the navigation speed and navigation efficiency are not high. By setting the influence factor to 1, the cost of the node is increased; when the angle is in the range of [10°, 80°], it is conducive to navigation. By setting the influence factor to -1, the cost of the node is reduced.
[0076] The normalized great circle route distance between nodes is obtained by the following formula:
[0077]
[0078] Where R is the radius of the earth, and Respectively represent the latitude of nodes i and j, λ i and λ jdenote the longitude of nodes i and j respectively, arccos(·) denotes the inverse cosine function, and Normalized(·) denotes the normalized function.
[0079] It should be noted that after the first grid is constructed based on the remaining initial nodes and edges, the initial route passing through each necessary point is obtained based on the first grid, including:
[0080] By calculating the great circle route distance between each necessary point and each node in the first grid, the node corresponding to the smallest great circle route distance is selected to obtain each planning point;
[0081] Starting from the starting point of each planning point, the dynamic programming algorithm is used to solve the optimal path of each segment for each two adjacent planning points according to the weight of each edge of the first grid, until the end point of each planning point, and finally the optimal path of each segment is spliced in order to obtain the complete path, and the necessary points are replaced by each planning point in the complete path to obtain the initial route. The dynamic programming algorithm uses the A* algorithm or the Dijkstra algorithm, and the optimal path solved is the path with the minimum navigation cost.
[0082] In this step, by downsampling and clustering the historical route data and combining it with the predicted weather and sea condition data to construct the first grid that meets the actual environment, an effective representation of the route planning space is achieved with a smaller number of nodes. This not only significantly reduces the computing resources and time cost required for the model operation, but also minimizes resource consumption while maintaining efficient route planning capabilities. Moreover, the predicted weather and sea condition data screens the historical nodes, without over-reliance on historical data, ensuring the timeliness and reliability of route planning.
[0083] In step S2, the initial route is further refined by successively identifying whether the distance between two adjacent turning points meets the actual requirements. If it is greater than the set maximum threshold, a new turning point is added through the great circle route interpolation method to ensure that the planned route path is smooth and meets the actual navigation needs.
[0084] Furthermore, whether there is a risk turning point in the refined initial route is identified based on the nautical chart information. The risk turning point is a turning point in a risk area, and the risk area includes: land, prohibited navigation area and danger zone.
[0085] It should be noted that this embodiment fine-tunes the risk turning point by constructing a second grid. If there are several risk turning points in multiple different risk areas, a corresponding second grid is constructed for each risk area to obtain the flight segment path that replaces the risk turning point in the risk area to achieve fine-tuning.
[0086] Specifically, the second grid is constructed based on the refined initial routes and risk turning points, including:
[0087] According to the risk area where the risk turning point is located, the non-risk turning points on the left and right sides of all the risk turning points in each risk area on the refined initial route are obtained along the route direction, and the left and right boundary turning points are determined according to the positions of the non-risk turning points;
[0088] A planning area is established according to the left and right boundary turning points and the route direction, and the planning area is divided into grids according to preset intervals to obtain a second grid; wherein the planning area is a rectangle or a circle, if it is a rectangle, the left and right boundary turning points are used as the midpoints of the rectangle width, and the distance between the left and right boundary turning points is used as the rectangle length; if it is a circle, the distance between the left and right boundary turning points is used as the diameter;
[0089] The centers of cells in the second grid that are not in the risk area are used as nodes of the second grid, and an edge is constructed between every two adjacent nodes.
[0090] According to the great circle route distances of the nodes at both ends of the edge in the second grid, and the influencing factors of wind speed, wind direction, wave height and surge direction calculated according to the predicted meteorological and sea condition data, the edge weights in the second grid are calculated according to the calculation method of the edge weights of the first grid in step S1.
[0091] Furthermore, the risk turning point is fine-tuned based on the second grid to obtain a planned route, including:
[0092] Along the route direction, the left boundary turning point of the second grid is used as the fine-tuning starting point, and the right boundary turning point is used as the fine-tuning end point. According to the weights of each edge of the second grid, the dynamic programming algorithm is used to solve the optimal path from the fine-tuning starting point to the fine-tuning end point. The path between the fine-tuning starting point and the fine-tuning end point in the refined initial route is replaced to obtain the planned route.
[0093] This step constructs an accurate representation of a small space based on the safe turning points on the left and right sides of the risk turning point and the predicted weather and sea conditions data, thereby achieving less resource consumption while improving the optimization accuracy.
[0094] The ship sails according to the planned route. In step S3, the weather and sea condition forecast interface is continuously and regularly called to evaluate the weather and sea condition data of the turning points on the planned route that have not been navigated. If there are turning points that do not meet the water depth, wind speed or wave height for safe passage, the nodes and weights in the first grid are updated according to the method of step S1, and the unnavigated route is optimized. If the chart information changes and a new risk turning point in the risk area appears, the nodes and weights in the second grid are updated according to the method of step S2, and the new risk turning point is fine-tuned to ensure navigation safety.
[0095] Compared with the prior art, the present embodiment provides a method for dynamic optimization of ship routes based on dual grids. On the basis of historical route experience, the predicted meteorological and sea conditions data are combined to construct a first grid that meets the actual environment, thereby enhancing the adaptability and accuracy of route planning. Then, a locally refined second grid is constructed according to the risk turning point to accurately adjust the route, avoid potential navigation risks, and obtain a safe and efficient planned route. During navigation, the first grid is updated in real time according to the latest meteorological and sea conditions data, thereby continuously optimizing the route, not overly relying on historical data, ensuring the timeliness and reliability of route planning, and not being limited by the sea area or navigation distance, so that the ship can respond quickly according to the latest environmental changes. By constructing the first grid by downsampling and clustering, an effective representation of a large range of space for route planning is achieved with a small number of nodes, which not only significantly reduces the computing resources and time cost required for model operation, but also minimizes resource consumption while maintaining efficient route planning capabilities. According to the safe turning points on the left and right sides of the risk turning point and the predicted meteorological and sea conditions data, an accurate representation of a small range of space is constructed, which improves the optimization accuracy and achieves less resource consumption.
[0096] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0097] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A ship route dynamic optimization method based on dual grids, characterized in that: The following steps are involved: Obtaining ship information and each necessary point in its route plan; predicting weather and sea conditions data according to the sailing time, and obtaining an initial route passing through each necessary point based on the first grid; The first grid is constructed based on historical route data and predicted weather and sea condition data; Refining the initial route, and identifying whether there is a risk turning point in the refined initial route based on the nautical chart information, and if so, fine-tuning the risk turning point based on the second grid to obtain a planned route; The second grid is constructed according to the refined initial route and the risk turning point; Sailing along the planned route, the first grid is updated regularly according to the latest predicted weather and sea condition data, and the remaining planned routes are optimized.
2. The method for dynamic optimization of ship routes based on dual grids according to claim 1, characterized in that: The first grid is constructed based on historical route data and predicted weather and sea conditions data, including: The historical key turning points of each route in the historical route data are obtained in sequence through downsampling; All historical key turning points are clustered by clustering algorithm to obtain multiple classes and noise points; the center point of each class is used as the initial node of the first grid; According to the predicted weather and sea condition data, the initial nodes that do not meet the ship information are deleted, and the remaining initial nodes are constructed with edges according to the historical route data and the noise points to obtain the first grid.
3. The method for dynamic optimization of ship routes based on dual grids according to claim 1, characterized in that: The second grid is constructed according to the refined initial route and the risk turning point, and includes: According to the risk area where the risk turning point is located, non-risk turning points on the left and right sides of all risk turning points in each risk area on the refined initial route are obtained along the route direction, and the left and right boundary turning points are determined according to the positions of the non-risk turning points; Establish a planning area according to the left and right boundary turning points and the route direction, and divide the planning area into grids according to preset intervals to obtain a second grid; The centers of cells in the second grid that are not in the risk area are used as nodes of the second grid, and an edge is constructed between every two adjacent nodes.
4. The method for dynamic optimization of ship routes based on dual grids according to claim 1, characterized in that: The edge weights of the first grid and the second grid are calculated by the following formula based on the great circle route distance between the nodes at both ends of each edge and the influencing factors of wind speed, wind direction, wave height and surge direction: Among them, Cost i,j represents the edge weight between nodes i and j in the grid, and Represent the wind speed influence factors of nodes i and j respectively, and Represent the wind direction influencing factors of nodes i and j respectively, and Represent the wave height influence factors of nodes i and j respectively, and They represent the influencing factors of the inrush direction of nodes i and j respectively, represents the normalized great circle route distance between nodes i and j; w1, w2, w3, w4, w5 represent the weights of wind speed influence factor, wind direction influence factor, wave height influence factor, surge direction influence factor and great circle route distance respectively, and 5. The method for dynamic optimization of ship routes based on dual grids according to claim 2 or 4, characterized in that: The obtaining of the initial route passing through each necessary point based on the first grid includes: By calculating the great circle route distance between each necessary point and each node in the first grid, the node corresponding to the smallest great circle route distance is selected to obtain each planning point; Starting from the starting point of each planning point, the dynamic programming algorithm is used to solve the optimal path for each two adjacent planning points according to the weights of each edge of the first grid, until the end point of each planning point. Finally, the optimal path segments are spliced in sequence to obtain the complete path, and the necessary points are used to replace the planning points in the complete path to obtain the initial route.
6. The method for dynamic optimization of ship routes based on dual grids according to claim 3 or 4, characterized in that: The step of fine-tuning the risk turning point based on the second grid to obtain a planned route includes: Along the route direction, the left boundary turning point of the second grid is used as the fine-tuning starting point, and the right boundary turning point is used as the fine-tuning end point. According to the weights of each edge of the second grid, the dynamic programming algorithm is used to solve the optimal path from the fine-tuning starting point to the fine-tuning end point. The path between the fine-tuning starting point and the fine-tuning end point in the refined initial route is replaced to obtain the planned route.
7. The method for dynamic optimization of ship routes based on dual grids according to claim 4 is characterized in that: The wind speed influence factor is obtained by performing multiple power operations on the ratio of the node's wind speed prediction value to the wind speed threshold; the wave height influence factor is obtained by performing multiple power operations on the ratio of the node's wave height prediction value to the wave height threshold.
8. The method for dynamic optimization of ship routes based on dual grids according to claim 4, characterized in that: The wind direction influence factor is an influence factor value corresponding to a threshold range obtained based on the threshold range of the angle between the navigation direction and the predicted node wind direction; the flow direction influence factor is an influence factor value corresponding to the threshold range obtained based on the threshold range of the angle between the navigation direction and the predicted node flow direction.
9. The method for dynamic optimization of ship routes based on dual grids according to claim 2, characterized in that: The deleting of the initial nodes that do not satisfy the ship information according to the predicted weather and sea condition data includes: According to the predicted weather and sea conditions data, the predicted values of water depth, wind speed and wave height at the initial node are obtained; If the water depth prediction value of the initial node is less than the sum of the estimated draft and the surplus water depth in the ship information, the initial node is deleted; If the predicted wind speed value or wave height value of the node exceeds the wind and wave resistance level in the ship information, the initial node is deleted.
10. The method for dynamic optimization of ship routes based on dual grids according to claim 2, characterized in that: The remaining initial nodes construct edges according to the historical route data and the noise points, including: Sort the remaining initial nodes and noise points by flight segment and time, and take out two adjacent initial nodes in turn. If there is no noise point between the two initial nodes, then establish an edge between the two initial nodes when there is historical route data between the classes to which the two initial nodes belong; if there is a noise point between the two initial nodes, then establish an edge between the two initial nodes only when the distance or time difference between the two initial nodes is within the threshold range.