Berth allocation planning aided decision method based on bi-kmeans
By using binocular vision and Bi-kmeans clustering technology, a berthing trajectory database is constructed to generate detailed berthing planning schemes, which solves the problems of insufficient accuracy and safety hazards in traditional berthing decision-making and achieves more efficient and safer berthing operations.
Patent Information
- Application Number
- CN202411455496.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2044-10-17
AI Technical Summary
Traditional berthing assistance decision-making systems lack consideration for time and berthing speed when planning trajectory turning points, and GPS errors lead to insufficient accuracy, posing safety hazards.
Binocular vision is used to collect ship trajectory information, construct a berthing trajectory database, and Bi-kmeans clustering is used to select the trajectory closest to the current starting point from the database to generate a recommended trajectory, and plan the position, time and berthing speed of the trajectory turning point.
It improves the accuracy of berthing trajectory acquisition, generates better berthing planning schemes, ensures safety and efficiency, and reduces safety risks.
Smart Images

Figure CN119338095B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of berthing planning, and specifically relates to a berthing planning auxiliary decision-making method based on Bi-kmeans. Background Technology
[0002] With rapid economic development and expanding consumer demand, the marine economy has experienced explosive growth, and the yachting industry has become a focus of attention and widespread interest. As a new growth point for the marine economy, the yachting industry has entered a golden age of development with a very broad prospect. Along with the gradual rise in coastal tourism, the rapid development of the small and medium-sized yacht market has become a new hotspot, leading to new changes in the yachting industry landscape. The market share of small yachts is constantly increasing, while the market share of large and luxury yachts is constantly decreasing. The yachting industry is showing a trend towards mass consumption, promoting the sustainable development of the yachting economy. During peak tourist seasons, yachts frequently enter and leave marinas. Many marinas are floating marinas with dense berthing. Careless operation during berthing and unberthing can easily result in collisions and damage to yachts, or even dangerous situations. Therefore, berthing and unberthing is the most crucial step in yacht operation.
[0003] When berthing or unberthing at a marina, yachts are traveling at low speeds and are significantly affected by wind and currents around the marina, resulting in complex stress conditions. Controlling the yacht's movement and positioning is difficult yet demanding, posing potential risks to berthing safety and leading to frequent maritime accidents. Therefore, yacht berthing planning is crucial for ensuring navigational safety, providing convenient facilities, managing time, and improving navigation efficiency. Properly planned berthing ensures smooth navigation and docking, enhancing the yachting experience and operational efficiency.
[0004] Currently, traditional berthing-aid decision-making only plans the location of trajectory turning points, with less emphasis on planning time and berthing speed. Traditional methods for collecting ship trajectories typically use Automatic Identification System (AIS), but AIS systems suffer from transmission delays, and their latitude and longitude coordinates are imported from GPS, which can sometimes have errors of up to 100 meters, making it unacceptable for berthing. Summary of the Invention
[0005] Primarily addressing the complexities of yacht berthing, but also applicable to other types of vessels, this invention aims to provide a novel Bi-kmeans-based berthing planning and decision support method to improve the accuracy and reliability of berthing. Its main design features include the following:
[0006] (1) Binocular vision is used to acquire docking trajectory data in order to improve accuracy;
[0007] (2) Bi-kmeans clustering was used;
[0008] (3) Not only the position of the trajectory turning point is planned, but also the planning time and berthing speed are realized, which is more perfect than the existing berthing decision scheme.
[0009] The technical scheme specifically adopted by the present application to solve its technical problems is:
[0010] A berthing planning auxiliary decision method based on Bi-kmeans, adopts binocular vision to collect ship trajectory information to construct a berthing trajectory database; when executing berthing decision, a trajectory set with the end point being a specified berth is selected from the trajectory database, and Bi-kmeans is used for clustering; among the k trajectories formed by the k cluster centers, a trajectory with the closest start point to the current berthing start point of the yacht is selected to generate a recommended trajectory.
[0011] Further, the method for collecting ship trajectory information by binocular vision is specifically:
[0012] The bow position is the solution of the following equation group:
[0013]
[0014] In the formula, x a (t) is the horizontal coordinate of the first measuring point at time t, y a (t) is the vertical coordinate of the first measuring point at time t; x b (t) is the horizontal coordinate of the second measuring point at time t, y b (t) is the vertical coordinate of the second measuring point at time t; d 11 (t) is the distance from the first measuring point to the bow at time t, d 21 (t) is the distance from the second measuring point to the bow;
[0015] The stern position is the solution of the following equation group:
[0016]
[0017] In the formula, d 11 (t) is the distance from the first measuring point to the stern at time t, d 22 (t) is the distance from the second measuring point to the stern at time t;
[0018] The bow direction at time t is:
[0019]
[0020] The speed of the ship in the forward direction at time t is:
[0021]
[0022] The speed of the ship in the transverse direction at time t is:
[0023]
[0024] The total speed of the ship at time t is:
[0025]
[0026] The trajectory state at time t is:
[0027] s(t) = {t, x1(t), y1(t), x2(t), y2(t), ψ(t), v(t)} (7).
[0028] Further, the trajectory database includes a plurality of pieces of trajectory information of a plurality of berths, each piece of trajectory information being associated with corresponding berth information.
[0029] Further, when performing the berthing decision, a set of trajectories with the berth as the end point is selected from the trajectory database according to the berth to which the ship is currently intended to berth.
[0030] Further, the implementation process of using Bi-kmeans for clustering is specifically as follows:
[0031] (1) All trajectories are regarded as one cluster, and the sum of squared errors SSE is calculated;
[0032] (2) In all current clusters, the cluster with the largest SSE is selected, and kmeans is used to divide it into two clusters;
[0033] (3) The sum of all SSEs after division is calculated, and if it is reduced compared with before, the division is retained, otherwise the division is cancelled;
[0034] (4) Steps (2) and (3) are repeated until a predetermined number of clusters k is reached, or the SSE cannot be continuously reduced.
[0035] Further, after the Bi-kmeans clustering process, k trajectories are selected from k cluster centers, the trajectory with the starting point closest to the current starting point of the yacht is selected, and the set of positions of the turning points is set as (P 1x ,P 1y ), (P 2x ,P 2y ), …, (P Nx ,P Ny ), and the corresponding historical times are (t1, t2, …, t N );
[0036] Suppose the starting time of the current yacht berthing is t0, the recommended trajectory is (t0, P 1x ,P 1y ), (t0+t2-t1, P 2x ,P 2y ), …, (t0+tN t1,p Nx t2,p Ny ).
[0037] Also, a Bi-kmeans-based berthing planning auxiliary decision-making system comprises a trajectory database, which is obtained by collecting ship trajectory information by using binocular vision;
[0038] Also, a decision-making module, when performing berthing decision-making, is configured to select a trajectory set with a terminal point being a specified berth from the trajectory database, and perform clustering by using Bi-kmeans; and select a trajectory with a starting point closest to a current berthing starting point of a yacht from k trajectories formed by k cluster centers to generate a recommended trajectory.
[0039] An electronic device comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the steps of the Bi-kmeans-based berthing planning auxiliary decision-making method as described above when executing the program.
[0040] A non-transitory computer-readable storage medium, on which a computer program is stored, and the computer program implements the steps of the Bi-kmeans-based berthing planning auxiliary decision-making method as described above when executed by a processor.
[0041] Compared with the prior art, the present application and the preferred scheme thereof collect berthing trajectory data by using binocular vision, thereby improving the accuracy of berthing trajectory collection; when performing berthing planning decision-making, the Bi-kmeans clustering scheme is used, the output result is more optimal, and the Bi-kmeans clustering scheme not only plans the position of a trajectory turning point, but also plans the time and the berthing speed, which is more perfect than the existing berthing decision-making scheme. BRIEF DESCRIPTION OF DRAWINGS
[0042] The present application will be further described in detail below in combination with the accompanying drawings and specific embodiments:
[0043] Figure 1 The figure is a flowchart of an embodiment method of the present application;
[0044] Figure 2 The figure is a schematic diagram of binocular distance measurement of an embodiment of the present application;
[0045] Figure 3 The figure is a schematic diagram of a recommended trajectory of an embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to make the features and advantages of the present patent more obvious and easy to understand, the following specific embodiments are described in detail as follows:
[0047] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of this application. Unless otherwise specified, all technical and scientific terms used in this specification have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.
[0048] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0049] like Figure 1 As shown, the method flow provided in this embodiment of the invention includes the following steps:
[0050] First, binocular vision is used to collect historical trajectories and construct a berthing trajectory database. For example... Figure 2 As shown. The specific binocular ranging scheme of this embodiment is as follows:
[0051] The position of the bow is a solution to the following system of equations:
[0052]
[0053] In the formula x a (t) represents the x-coordinate of the first measurement point at time t, y a (t) represents the ordinate of the first measurement point at time t. b (t) represents the x-coordinate of the second measurement point at time t, y b (t) represents the ordinate of the second measurement point at time t. 11 (t) represents the distance from the first measurement point at time t to the bow of the ship, and d 21 (t) represents the distance from the second measurement point to the bow.
[0054] The position of the stern is a solution to the following system of equations:
[0055]
[0056] In the formula d 11 (t) represents the distance from the first measurement point at time t to the stern, and d 22 (t) represents the distance from the second measurement point to the stern at time t.
[0057] Then, at time t, the bow direction of the ship is:
[0058]
[0059] The velocity of the ship in its forward direction at time t is:
[0060]
[0061] The speed of the ship in the transverse direction at time t is:
[0062]
[0063] The total speed of the ship at time t is:
[0064]
[0065] The trajectory state at time t is:
[0066] s(t) = {t, x1(t), y1(t), x2(t), y2(t), ψ(t), v(t)} (7)
[0067] Thus, the trajectory of the ship is accurately collected, and a berthing trajectory database is constructed through collection of a large amount of data, serving as a basis for subsequent trajectory planning.
[0068] Then, the yacht is currently intended to berth at a berth, and a trajectory set with the end point being the berth is selected from the trajectory database.
[0069] If kmeans is used to cluster the berthing trajectories, the number of clusters k is difficult to determine, and problems such as being easily trapped in a local optimal solution and being sensitive to the selection of initial clustering centers exist.
[0070] Therefore, in the embodiment, Bi-kmeans is used to cluster the trajectory set, and the implementation process is as follows:
[0071] (1) All trajectories are regarded as a cluster, and the sum of squared errors (SSE) is calculated;
[0072] (2) In all current clusters, the cluster with the largest SSE is selected, and kmeans is used to divide it into two clusters;
[0073] (3) The sum of all SSEs after division is calculated, and if it is reduced compared with before, the division is retained, otherwise the division is cancelled;
[0074] (4) Steps 2 and 3 are repeated until the predetermined number of clusters k is reached, or the SSE cannot be continuously reduced.
[0075] After the above clustering process, k trajectories composed of k cluster centers are selected, and the trajectory with the starting point closest to the current berthing starting point of the yacht is selected. Let the position set of the turning points of the trajectory be (P 1x ,P 1y ),(P 2x ,P 2y ),……,(P Nx ,P Ny), the corresponding historical time is (t1, t2, …, t N ).
[0076] As a preferred scheme of the embodiment, not only the position of the trajectory turning point is planned, but also the planning time and the berthing speed are realized. Assuming that the starting time of the current yacht berthing is t0, the recommended trajectory is generated as (t0, P 1x , P 1y ), (t0+t2-t1, P 2x , P 2y ), …, (t0+t N -t1, P Nx , P Ny ).
[0077] The implementation process of the data collection scheme is described below through a specific embodiment case. Taking the yacht “Xiangrun Yun” as an example, the parameters are as follows in the table.
[0078] Table 1 Main parameter table of the yacht “Xiangrun Yun”
[0079] MMSI 413546460 Ship name Xiangrunyun Ship length 10 meters Ship width 5 meters Call sign MS1M
[0080] The berthing trajectory is collected by binocular vision. The coordinates of the measuring point A are (0, 0), and the coordinates of the measuring point B are (4m, 0). The sample data of the positions of the bow and the stern are shown in the table.
[0081] Table 2 Sample data of the positions of the bow and the stern measured by binocular vision
[0082]
[0083]
[0084] Thus, the construction of the berthing trajectory database is realized.
[0085] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program codes.
[0086] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks. Figure 1 one or more flow or blocks.
[0087] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart block or blocks. Figure 1 one or more flow or blocks. Figure 1 one or more flow or blocks.
[0088] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks. Figure 1 one or more flow or blocks.
[0089] It should be noted that, unless otherwise defined, technical terms or scientific terms used in the present application shall have the common meaning understood by one of ordinary skill in the art to which the present application pertains. The terms "first", "second", and similar terms used in the present application do not denote any order, quantity, or importance, but are used to distinguish different components. The terms "include", "contain", and similar terms mean that the elements or objects before the terms encompass the elements or objects listed after the terms and their equivalents, and do not exclude other elements or objects. The terms "connected" or "coupled" and similar terms do not limit to physical or mechanical connections or couplings, but can include electrical connections or couplings, whether direct or indirect. The terms "upper", "lower", "left", "right", and the like are used only to indicate relative positional relationships when the absolute positions of the described objects are changed, and the relative positional relationships can also be changed accordingly.
[0090] The above merely describes preferred embodiments of the present application, and is not intended to limit the present application in other forms. Any person skilled in the art can make changes or modifications to the above disclosed technical contents to obtain equivalent embodiments. However, any simple modification, equivalent change and modification made to the above embodiments without departing from the technical solution of the present application and according to the technical essence of the present application shall still fall within the protection scope of the present application.
[0091] The present patent is not limited to the above preferred embodiments, and anyone can derive other various forms of Bi-kmeans-based berthing planning auxiliary decision-making methods based on the present patent. Any equivalent change and modification made within the scope of the present patent application shall fall within the scope of the present patent.
Claims
1. A Bi-kmeans-based berthing planning aided decision-making method, characterized in that: The method for collecting the ship trajectory information by using binocular vision is specifically as follows: The bow position is a solution of the following equation set: The stern position is a solution of the following equation set: (1) where x a (t) is the abscissa of the first measuring point at time t, y a (t) is the ordinate of the first measuring point at time t; x b (t) is the abscissa of the second measuring point at time t, y b (t) is the ordinate of the second measuring point at time t; d 11 (t) is the distance of the first measuring point from the bow of the ship at time t, d 21 (t) is the distance of the second measuring point from the bow of the ship at time t; The heading of the ship at time t is: (2) where d 11 (t) is the distance from the first measuring point to the stern of the ship at time t, d 22 (t) is the distance from the second measuring point to the stern of the ship at time t The forward speed of the ship at time t is: (3) The lateral speed of the ship at time t is: (4) The total speed of the ship at time t is: (5) The trajectory state at time t is: (6) The trajectory database comprises a plurality of pieces of trajectory information of a plurality of berths, and each piece of trajectory information has corresponding berth information. (7) After the Bi-kmeans clustering process, the trajectory with the closest starting point to the current berthing starting point of the yacht is selected from the k trajectories composed of the k cluster centers; let the position set of the turning point be (P 1x , P 1y ), (P 2x , P 2y ), …, (P Nx , P Ny ), then the corresponding historical time is (t1, t2, …, t N ). Let the starting time of the current yacht berthing be t0, and the recommended trajectory is (t0, P 1x , 1y (t0+t2-t1, P 2x , 2y ), …, (t0+t N -t1, P Nx , Ny ).
2. The Bi-kmeans-based ber planning aided decision-making method according to claim 1, characterized in that: When performing the berthing decision, the trajectory set with the end point being the berth to which the ship is currently intended to berth is selected from the trajectory database.
3. The Bi-kmeans-based ber planning aided decision-making method according to claim 1, characterized in that:
4. The Bi-kmeans-based berthing planning auxiliary decision method according to claim 1, characterized in that: The implementation process of the clustering by using Bi-kmeans is specifically as follows: (1) all trajectories are regarded as a cluster, and the sum of squared errors SSE is calculated; (2) in the current all clusters, the cluster with the maximum SSE is selected, and kmeans is used to divide the cluster into two clusters; (3) the sum of all SSEs after the division is calculated, and if the sum is reduced compared with before, the division is retained, otherwise the division is cancelled; (4) steps (2) and (3) are repeated until the predetermined number of clusters k is reached, or the SSE cannot be continuously reduced. For implementing the method according to claim 1, comprising: a trajectory database, which is obtained by collecting ship trajectory information by using binocular vision; 5. A Bi-kmeans-based ber planning assistant decision system, characterized in that, and a decision module, which is used to select the trajectory set with the end point being the specified berth from the trajectory database when performing the berthing decision, and to cluster by using Bi-kmeans; in the k trajectories formed by the k cluster centers, the trajectory with the starting point closest to the current berthing starting point of the yacht is selected to generate a recommended trajectory. The processor implements the steps of the Bi-kmeans-based berthing planning auxiliary decision method according to any one of claims 1-4 when executing the program.
6. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The computer program implements the steps of the Bi-kmeans-based berthing planning auxiliary decision method according to any one of claims 1-4 when executed by the processor.
7. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that,
Citation Information
Patent Citations
Large ship high-precision navigation and berthing method
CN107367279A
Automatic berthing system and method of unmanned vessel
CN109285389A