An automatic water garbage collection method and device based on dynamic path planning

By employing dynamic path planning and real-time image recognition technologies, the system addresses the issues of targeting and efficiency of surface waste collection devices in complex water environments, achieving intelligent waste collection and improving the efficiency of waterborne waste management and environmental protection.

CN121147734BActive Publication Date: 2026-06-09HUAZHONG UNIV OF SCI & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAZHONG UNIV OF SCI & TECH
Filing Date
2025-08-07
Publication Date
2026-06-09

Smart Images

  • Figure CN121147734B_ABST
    Figure CN121147734B_ABST
Patent Text Reader

Abstract

This invention belongs to the technical field of aquatic waste collection, and discloses an automatic aquatic waste collection method and device based on dynamic path planning. The method includes: acquiring real-time water surface images and detecting and identifying target waste in the real-time water surface images based on a pre-trained detection model; when target waste is detected in the real-time water surface images, obtaining the position information of the target waste in the image based on the real-time water surface images; determining the movement direction based on the position information, and collecting the target waste according to the determined movement direction. This invention proposes to identify target waste in real-time water surface images based on a detection model, which can achieve targeted collection of target waste; and to plan the waste collection movement direction based on water surface images, through computer vision-guided dynamic path planning, realize a technological leap from passive mechanical interception to active search and capture, which is conducive to improving waste recycling efficiency and reducing energy consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of aquatic waste collection, and more specifically, relates to an automatic aquatic waste collection method and device based on dynamic path planning. Background Technology

[0002] With the intensification of human production activities, a large amount of non-biodegradable solid waste has entered natural water systems. These pollutants not only cause eutrophication and heavy metal pollution, but also pose direct ecological risks to aquatic organisms, such as entanglement and accidental ingestion. Furthermore, floating debris accumulating in complex water environments can easily cause safety hazards such as excessive pressure differentials at debris screens. However, due to the non-stationarity of current and wind speeds, aquatic waste exhibits uneven distribution and highly random movement, leading to technical bottlenecks such as high labor costs and low efficiency in traditional manual collection operations. Therefore, developing a collection device that can automatically collect waste on the water surface is of great significance for improving the efficiency of aquatic waste management and protecting the aquatic ecological environment.

[0003] Existing waste collection devices mainly fall into two categories: one based on the principle of eddy current generation, and the other using a mechanical interception-style physical isolation structure for waste collection. The former exhibits high collection efficiency in narrow and turbulent waters, but its application is limited by its fixed structure. The latter suffers from relatively outdated technology, relying solely on physical mechanisms for operation and lacking digital control modules. Against this backdrop, while floating platforms based on the eddy current generation principle have broken through traditional fixed application scenarios, enabling waste collection while moving on the water surface, they still exhibit significant limitations in efficiency when dealing with complex water environments.

[0004] To address the issue of surface waste collection, existing devices primarily focus on collaborative strategies for physical devices, typically moving and collecting waste along pre-set fixed or traversal paths. These existing strategies suffer from being somewhat mechanical, lacking specificity, and having low recycling efficiency. They have yet to achieve effective integration of physical devices with mathematical models and intelligent algorithms. Summary of the Invention

[0005] To address the above-mentioned deficiencies or improvement needs of existing technologies, this invention provides an automatic water surface waste collection method and device based on dynamic path planning. This method solves the problems that existing water surface waste collection strategies mainly focus on the coordination of physical devices, and typically collect waste by moving along preset fixed paths or traversing paths. These strategies are relatively mechanical, lack specificity, and have low recycling efficiency.

[0006] To achieve the above objectives, according to a first aspect of the present invention, an automatic collection method for marine debris based on dynamic path planning is provided, comprising:

[0007] Acquire real-time water surface images and detect and identify target garbage in the real-time water surface images based on a pre-trained detection model;

[0008] When the presence of target debris is detected in the real-time water surface image, the location information of the target debris in the image is obtained based on the real-time water surface image;

[0009] The direction of movement is determined based on the location information, and the target waste is collected by moving in the determined direction.

[0010] Furthermore, determining the direction of movement based on the location information specifically includes:

[0011] The real-time water surface image is divided into multiple regions along the circumference with the image center as the origin, and each region corresponds to a target direction; the corresponding target direction is obtained by matching the location information of the target debris, and then the movement direction is determined based on the target direction;

[0012] The automatic collection method for waterborne debris also includes: determining the moving speed of the debris collection based on the distance information of the target debris relative to the center of the image in the real-time water surface image.

[0013] Furthermore, it also includes:

[0014] When no target debris is detected in the real-time water surface image, the target aggregation degree of each target direction is established based on the historical movement direction of the target debris, so that the more times the target debris is collected in the target direction, the greater the target aggregation degree in the target direction.

[0015] The probability of movement in the target direction is obtained based on the target clustering degree in the target direction, such that the greater the target clustering degree in the target direction, the greater the probability of movement.

[0016] Garbage collection is performed by randomly selecting a target direction based on the probability of movement in each target direction.

[0017] Furthermore, when collecting target waste along the target direction, the target aggregation degree changes as follows:

[0018] ;

[0019] in, x i,0 For the first i Initial target clustering degree in each target direction; x i,j For the first i The first target direction j The degree of target aggregation during the next targeted waste collection; s The preset growth step size;

[0020] The motion guidance increment in the target direction is obtained based on the target clustering degree, and then the motion guidance value in the target direction is obtained. The movement probability in the target direction is obtained based on the proportion of the motion guidance value to the sum of motion guidance values ​​in all target directions. and exercise guidance values Specifically as follows:

[0021] ;

[0022] ;

[0023] in, α This is the preset initial motion guidance value.

[0024] Furthermore, when target debris is detected in the real-time water surface image, the location information of the target debris in the image is obtained based on the real-time water surface image; the movement direction is determined based on the location information, and the target debris is collected by moving in the determined movement direction, specifically including:

[0025] The nearest target trash to the center of the real-time water surface image is obtained, and its location information is acquired. Based on the location information of the nearest target trash, the movement direction is determined, and the nearest target trash is collected sequentially.

[0026] Alternatively, when the number of target debris in the real-time water surface image is greater than or equal to a preset threshold, the traversal order of all target debris is optimized based on the position of all target debris in the real-time water surface image to obtain an optimized path; and the target debris is collected sequentially according to the optimized path.

[0027] Furthermore, the traversal order of all target garbage is optimized to obtain an optimized path, specifically including:

[0028] Based on the location information of the target debris in the real-time water surface image, the distance between any two target debris is obtained, and a distance matrix is ​​established;

[0029] Construct a minimum spanning tree based on the distance matrix, which contains vertices and connecting edges, and minimizes the sum of the weights of the connecting edges. The location of the target garbage forms a vertex, and the weight of the connecting edge is the distance between the corresponding vertices.

[0030] Add an edge to each vertex in the minimum spanning tree that has an odd number of connecting edges, so that the number of connecting edges for all vertices is even, and construct an Eulerian graph.

[0031] Multiple circuits are obtained by traversing the Euler graph through connecting edges, forming an Euler circuit;

[0032] Traverse the vertices sequentially along the Eulerian circuit, retaining the position of the first occurrence of each vertex, and obtain the Hamiltonian path that traverses all vertices once. Then, obtain the optimized path based on the Hamiltonian path.

[0033] Furthermore, based on the distance matrix, a minimum spanning tree is constructed that contains vertices and connecting edges, and minimizes the sum of the weights of the connecting edges. Specifically, this includes:

[0034] Arrange the distance values ​​in the distance matrix in ascending order, and start from the beginning to select the distance values ​​in turn to connect the corresponding vertices, until all other vertices can be reached directly or indirectly from any vertex along the connecting edge, and exclude the case of only one closed loop, thus forming the minimum spanning tree;

[0035] Constructing an Eulerian graph specifically includes:

[0036] Construct the set of odd-degree vertices in the minimum spanning tree where the number of connecting edges is odd;

[0037] Select a vertex from the set of odd-degree vertices, create a new edge connecting the vertex to the vertex with the nearest distance value in the set of odd-degree vertices, and remove the vertex and its nearest neighbor from the set of odd-degree vertices. Repeat this process multiple times until the set of odd-degree vertices is empty.

[0038] By adding new connecting edges to the existing connecting edges on the minimum spanning tree, an Eulerian graph is formed.

[0039] According to a second aspect of the present invention, an automatic collection device for marine debris is provided, comprising a cylinder and a water pump, a power module, a buoyancy module and a camera module respectively connected to the cylinder;

[0040] The cylinder has an inlet circumferentially opened in the middle part of the cylinder, and the water pump is located in the lower part of the cylinder. The water pump is used to pump the water inside the cylinder to the outside to generate a negative pressure vortex so that the water on the surface flows into the cylinder from the inlet to achieve garbage collection.

[0041] The power module provides the cylinder with moving power and controllable direction, the buoyancy module provides the cylinder with buoyancy to float on the water surface, and the camera module is located above the cylinder to capture images of the water surface.

[0042] Furthermore, a filter screen is provided inside the cylinder below the inlet; the camera module is fixed above the cylinder by a support rod, with the shooting angle facing downwards.

[0043] Furthermore, it also includes a hardware module, wherein a closed space is provided above the interior of the cylinder, and the power module and the hardware module are respectively located inside the closed space;

[0044] The hardware module includes a control motherboard, which is connected to the water pump, the power module, and the camera module respectively, and is used to control the automatic water garbage collection device to implement the automatic water garbage collection method based on dynamic path planning described above.

[0045] In summary, compared with the prior art, the automatic collection method and device for marine debris based on dynamic path planning provided by this invention offer the following advantages:

[0046] 1. A detection model is proposed to identify target debris in real-time water surface images, enabling targeted collection of the debris and improving the targeting and intelligence of waterborne debris collection, making the collection more effective. Furthermore, a plan for the movement direction of debris collection based on water surface images is proposed. By constructing a computer vision-guided dynamic path planning system, a technological leap from passive mechanical interception to active search and capture is achieved, which is conducive to improving the efficiency of waste recycling and reducing energy consumption.

[0047] 2. A lightweight visual inspection model is used to analyze the spatial distribution of floating garbage on the water surface. A target screening mechanism based on the principle of minimum Euclidean distance is proposed, and a closed-loop control system of "perception-decision-execution" is constructed. This forms a technical integration of dynamic path planning and precise positioning and capture, which improves the purposefulness and accuracy of capture.

[0048] 3. An innovative multi-strategy collaborative decision-making framework was proposed, achieving a technological breakthrough from fixed interception to autonomous mobile collection, and constructing a complete solution for deterministic target capture and uncertain environment exploration; at the same time, different operation strategies can be switched in real time based on real-time acquired environmental data such as GPS positioning and water quality parameters, enabling the device to have the ability to adjust its mobile operation in open water in real time, improving the mobility and coverage efficiency of waste collection in complex water scenarios.

[0049] 4. Through the deep integration of various algorithm strategies, hardware systems and physical devices, a collaborative waste collection system with continuous evolution capabilities has been constructed. This design not only innovatively programs a set of dedicated autonomous movement logic for the device, but also enables the device to have the ability to access new devices and the potential to integrate advanced algorithms, providing sustainable technical expansion space for subsequent upgrades. Attached Figure Description

[0050] Figure 1 This is a flowchart illustrating the automatic collection method for marine debris provided by the present invention.

[0051] Figure 2 This is a complete flowchart of a specific embodiment of the automatic collection method for waterborne waste provided by the present invention.

[0052] Figure 3 This is an overall schematic diagram of the automatic waterborne waste collection device provided by the present invention.

[0053] Figure 4 This is a schematic diagram of the top cover structure provided by the present invention.

[0054] Figure 5 This is a schematic diagram of the upper cylindrical structure provided by the present invention.

[0055] Figure 6 This is a cross-sectional view of the upper cylindrical body provided by the present invention.

[0056] Figure 7 This is a schematic diagram of the lower cylindrical structure provided by the present invention.

[0057] Figure 8 This is a cross-sectional view of the lower cylindrical body provided by the present invention.

[0058] Figure 9 This is a schematic diagram of the buoyancy module structure provided by the present invention.

[0059] Figure 10 This is a schematic diagram of the camera and solar panel assembly structure provided by the present invention.

[0060] In all the accompanying drawings, the same reference numerals are used to denote the same elements or structures, wherein:

[0061] 1-Top cover; 11-Connecting opening; 12-Magnetic docking piece; 13-Portable handle; 14-Slide groove; 2-Upper cylinder; 21-Connecting hinge; 22-Hook structure; 23-Slot; 24-Magnetic connecting piece; 25-Power extension output hole; 3-Lower cylinder; 31-Snap-on structure; 32-Filter screen; 33-Water pump; 4-Buoyancy module; 41-Buoyancy plate; 42-Buoyancy foam board; 43-Docking hinge; 5-Solar module; 51-Solar panel; 52-Camera; 53-Hollow wiring conduit. Detailed Implementation

[0062] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0063] Please see Figure 1 This embodiment provides an automatic water debris collection method based on dynamic path planning, which includes:

[0064] Acquire real-time water surface images and detect and identify target garbage in the real-time water surface images based on a pre-trained detection model;

[0065] When the presence of target debris is detected in the real-time water surface image, the location information of the target debris in the image is obtained based on the real-time water surface image;

[0066] The direction of movement is determined based on the location information, and the target waste is collected by moving in the determined direction.

[0067] This embodiment mainly provides an automatic collection method for marine debris based on dynamic path planning, aiming to solve the problems of insufficient targeting and low efficiency of existing debris collection devices in complex water scenarios. It proposes to detect target debris based on real-time water surface images and to scientifically and dynamically plan the debris collection path based on the image location of the detected target debris, thereby improving the targeting of the collection and increasing the efficiency of debris collection, fundamentally improving the problems of insufficient targeting and collection efficiency of existing devices.

[0068] refer to Figure 2 In some specific embodiments, an automatic collection method for marine debris based on dynamic path planning is proposed, which mainly includes the following parts:

[0069] S1: A pre-trained computer vision model capable of recognizing specific marine debris, i.e., target debris.

[0070] S2: Garbage location and search strategy based on computer vision;

[0071] S3: Cruise optimization strategy based on sigmoid function;

[0072] S4: Local optimization strategy based on greedy algorithm;

[0073] S5: Remotely customized search strategy;

[0074] S6: Integrate the trained computer vision model (detection model) and the code of the four strategies into the control motherboard, configure the environment and debug.

[0075] S7: The remote control terminal on the computer sends a signal to the control motherboard to start the program on the control motherboard. At the same time, it receives information such as GPS positioning, water quality, and battery health transmitted back by the control motherboard to realize real-time monitoring of the device.

[0076] S8: Based on the information received from S7, it switches to different garbage collection strategies for different scenarios, recycles the garbage after completing the garbage collection task, and issues an end command to terminate the program running on the motherboard.

[0077] Specifically, the training of the computer vision model, i.e., the detection model, in S1 includes:

[0078] S11: Collect target sample images containing typical floating debris (at least one type) and manually annotate the bounding box coordinates of the target debris in the target sample images. After annotation, divide the dataset into training and testing sets in an 8:2 ratio.

[0079] S12: Based on the computing power characteristics of the embedded control motherboard, a lightweight convolutional neural network architecture is selected as the basic detection model;

[0080] S13: Iteratively train the selected basic detection model based on the training set and the test set until it achieves a target recognition accuracy of over 95% on the test set.

[0081] Furthermore, when target debris is detected in the real-time water surface image, the location information of the target debris in the image is obtained based on the real-time water surface image; the movement direction is determined based on the location information, and the target debris is collected by moving in the determined movement direction, specifically including:

[0082] The system obtains the target trash closest to the center of the image from the real-time water surface image and acquires the location information of the nearest target trash; based on the location information of the nearest target trash, it determines the direction of movement and collects the nearest target trash in sequence.

[0083] When target trash is detected in an image, the S2 localization and search strategy can be used. Specifically, S2 includes:

[0084] S21: Initialize the detection model parameter configuration, camera driver loading, and serial communication protocol configuration;

[0085] S22: Capture video of the water surface and collect a single frame image from the real-time video stream as a real-time water surface image, and determine whether the number of garbage targets in the image is greater than zero;

[0086] S23: When a garbage target is detected, determine the detected target with the smallest Euclidean distance from the geometric center of the image as the nearest garbage target;

[0087] S24: Determine the movement direction information based on the location information of the nearest target debris in the image, and generate a direction control signal;

[0088] S25: Generate a speed control signal, such as a motor speed signal, based on the Euclidean distance of the nearest target debris from the center of the image.

[0089] S26: The direction control signal and speed signal are encapsulated into binary control instructions according to the communication protocol and transmitted to the lower-level control module through the serial communication interface. The lower-level machine executes the corresponding motor control instructions to drive the device to move toward the target garbage location.

[0090] S27: Repeat steps S22 to S26 to achieve continuous collection of all garbage targets in the environment until a system termination command is received; that is, when collecting the nearest target garbage in sequence, the movement direction can be adjusted in real time according to the real-time water surface image.

[0091] Specifically, determining the direction of movement based on the location information includes:

[0092] The real-time water surface image is divided into multiple regions along the circumference with the image center as the origin, and each region corresponds to a target direction; the corresponding target direction is obtained by matching the location information of the target debris, and then the movement direction is determined based on the target direction;

[0093] The automatic collection method for waterborne debris also includes: determining the moving speed of the debris collection based on the distance information of the target debris relative to the center of the image in the real-time water surface image.

[0094] In this embodiment, the pixel coordinates of the target debris in the image can be extracted, and the coordinate values ​​relative to the image center (i.e., in the relative coordinate system) can be calculated using the normalized coordinate transformation formula. Then, the polar coordinate parameters with the screen center as the pole can be solved based on the polar coordinate transformation formula. The image Cartesian coordinate system can be divided into eight... The arc-shaped sector region, each region corresponds to a specific target direction code. The polar angle value in the polar coordinate parameter is matched with the region using the direction coding rule to generate the corresponding direction control signal (for example, the coding range 1-8, which corresponds to eight reference directions such as due east, northeast, and due north).

[0095] It can also calculate the Euclidean distance between the target trash and the center of the image. D (Can be pixel values), the distance value is converted using a linear mapping function. D The speed is mapped to a range of 0-100, and the motor speed control signal is generated using the following formula. v The movement speed is as follows:

[0096] ;

[0097] in, v This represents the percentage relative to the maximum moving speed (e.g., the percentage of motor speed relative to the maximum speed). D The distance between the target debris on the water surface image and the image center is denoted as . The linear velocity mapping control proposed in this embodiment can more intelligently control the debris collection process, improve intelligence, facilitate better debris collection, and reduce energy consumption.

[0098] Furthermore, automated methods for collecting marine debris also include:

[0099] When no target debris is detected in the real-time water surface image, the target aggregation degree of each target direction is established based on the historical movement direction of the target debris, so that the more times the target debris is collected in the target direction, the greater the target aggregation degree in the target direction.

[0100] The probability of movement in the target direction is obtained based on the target clustering degree in the target direction, such that the greater the target clustering degree in the target direction, the greater the probability of movement.

[0101] Garbage collection is performed by randomly selecting a target direction based on the probability of movement in each target direction.

[0102] When no target debris is detected in the image, the S3 cruise optimization strategy based on the sigmoid function can be used. Specifically, S3 includes:

[0103] S31: Initialize the detection model parameter configuration, camera driver loading, and serial communication protocol configuration; input the preset parameters of the optimization strategy; and set the first... i The initial target clustering degree in each target direction is x i,0 target aggregation growth step size s Initial motion guidance value α Preset cruise speed .

[0104] S32: When the i When target debris is detected in a target direction, the processing flow from steps S22 to S26 is executed, and the currently output direction control signal is recorded. i And the aggregation index for the corresponding direction is calculated according to the following formula. x i,j Perform adaptive updates;

[0105] That is, when collecting target waste along the target direction, the target aggregation degree changes as follows:

[0106] ;

[0107] in, x i,0 For the first i Initial target clustering degree in each target direction; x i,j For the first i The first target direction j The degree of target aggregation during the next targeted waste collection; s The increment step is set to the preset target aggregation degree.

[0108] S33: When no target debris is detected in the image, the motion guidance increment for each target direction should be calculated according to the formula corresponding to the sigmoid function, and then the motion guidance value for each target direction should be calculated: that is, the motion guidance increment for the target direction is obtained based on the target clustering degree in the target direction, and then the motion guidance value for the target direction is obtained. The movement probability of the target direction is obtained based on the proportion of the motion guidance value to the sum of the motion guidance values ​​for all target directions; motion guidance increment and exercise guidance values Specifically as follows:

[0109] ;

[0110] ;

[0111] in, α This is the preset initial motion guidance value.

[0112] S34: Calculate the weighting coefficients of the motion guidance values ​​for each target direction according to the following formula, and construct a probability distribution model;

[0113] ;

[0114] In the formula, P i Indicates the first i The probability of movement in each target direction.

[0115] Based on the movement probability of each target direction, a random direction signal with direction priority is generated.

[0116] S35: Combines the generated direction signal with the preset cruise speed The commands are encapsulated into binary control instructions according to the communication protocol and transmitted to the lower-level computer system through a serial communication interface to execute the corresponding autonomous navigation control on the water.

[0117] S36: When no trash target is detected in the image, repeat steps S33 to S35 until a trash target is detected or a system termination command is received. If no trash target is detected, a time interval for movement in each target direction can be set. That is, when the target moves along a random direction signal to a preset time interval, a random direction signal is generated again to change the direction.

[0118] This embodiment proposes to design a motion guidance increment based on the sigmoid function, and then obtain the motion guidance value based on the motion guidance increment to obtain the movement probability. This also helps to avoid getting trapped in local optima and is conducive to the healthy and smooth operation of the algorithm.

[0119] Furthermore, when the presence of target debris is detected in the real-time water surface image, the location information of the target debris in the image is obtained based on the real-time water surface image; the movement direction is determined based on the location information, and the target debris is collected by moving in the determined movement direction; the method further includes:

[0120] When the number of target debris in the real-time water surface image is greater than or equal to a preset threshold, the traversal order of all target debris is optimized based on the position of all target debris in the real-time water surface image to obtain an optimized path; and the target debris is collected sequentially according to the optimized path.

[0121] Furthermore, the traversal order of all target garbage is optimized to obtain an optimized path, specifically including:

[0122] Based on the location information of the target debris in the real-time water surface image, the distance between any two target debris is obtained, and a distance matrix is ​​established;

[0123] Construct a minimum spanning tree based on the distance matrix, which contains vertices and connecting edges, and minimizes the sum of the weights of the connecting edges. The location of the target garbage forms a vertex, and the weight of the connecting edge is the distance between the corresponding vertices.

[0124] Add an edge to each vertex in the minimum spanning tree that has an odd number of connecting edges, so that the number of connecting edges for all vertices is even, and construct an Eulerian graph.

[0125] Multiple circuits are obtained by traversing the Euler graph through connecting edges, forming an Euler circuit;

[0126] Traverse the vertices sequentially along the Eulerian circuit, retaining the position of the first occurrence of each vertex, and obtain the Hamiltonian path that traverses all vertices once. Then, obtain the optimized path based on the Hamiltonian path.

[0127] In this embodiment, when the number of target debris in the real-time water surface image is greater than or equal to a preset threshold, the local optimization strategy based on the greedy algorithm in step S4 is executed; specifically, step S4 includes:

[0128] S41: Initialize the detection model parameter configuration, camera driver loading, and serial communication protocol configuration;

[0129] S42: Acquire a single frame image from the real-time video stream and determine whether the number of garbage targets in the image is greater than or equal to a preset threshold. The preset threshold can be, for example, 2.

[0130] S43: If the number of target trash detected in the image is greater than or equal to 2, record the first... k The center pixel coordinates of each target are the coordinates with the image center as the origin. ;

[0131] S44: Generate a distance matrix based on coordinates:

[0132] (a) Store the coordinates of all detected target waste centers into a set. In the formula For the first k The center pixel coordinates of the target garbage;

[0133] (b) Calculate any two target garbage , The Euclidean distance is as follows: ;

[0134] (c) Generate the distance matrix according to the following formula;

[0135] ;

[0136] S45: Construct a minimum spanning tree containing vertices and connecting edges, with the minimum sum of edge weights, based on the distance matrix. Specifically, construct the minimum spanning tree using Kruskal's algorithm:

[0137] (a) Distance values ​​in the distance matrix As weights, the weight set is constructed as follows:

[0138] ;

[0139] (b) Sort the distance values ​​in the distance matrix in ascending order, and start from the beginning to select the distance values ​​to connect the corresponding vertices in turn, until all other vertices can be reached directly or indirectly from any vertex along the connecting edge, and exclude the case of only one closed loop, thus forming a minimum spanning tree; that is, sort the connecting edges in ascending order of distance values, select the shortest edge to connect the vertices in turn, randomly select vertices with the same distance value, exclude connections that form a closed loop, and continue the operation until all vertices are connected;

[0140] (c) By the first l A connected edge Forming an edge set Construct a set of vertices V The spanning tree that minimizes the sum of the edge weights of all vertices is called the minimum spanning tree. .

[0141] Then, the Eulerian graph is constructed, specifically including:

[0142] S46: Use a greedy strategy for the set of vertices with odd degree:

[0143] (a) Construct the set of odd-degree vertices in the minimum spanning tree whose number of connecting edges is odd, i.e., identify the set of odd-degree vertices. Among them, degrees deg Equal to the number of connected edges, For the first m indivual deg The vertices are odd numbers;

[0144] (b) Select a vertex from the set of odd-degree vertices, establish a new edge connecting this vertex to its nearest neighbor in the set of odd-degree vertices, and remove this vertex and its nearest neighbor from the set of odd-degree vertices. Repeat this process multiple times until the set of odd-degree vertices is empty; that is, based on a greedy strategy that seeks a local optimum in each operation, from OV Select any vertex v ,connect v Its nearest neighbor vertex u (i.e., in the set of vertices with odd degree) v The vertex with the smallest distance value), from OV Remove from v and u Continue operating until OV It is an empty set;

[0145] (c) The set of matching edges, denoted as ,in The first one obtained in step S46(b) p Edges, obtain greedy matching ,in OV Let be the set of vertices with odd degree. OS For the set of matching edges;

[0146] S47: Construct the Euler graph and generate the Euler circuit:

[0147] (a) Add new connecting edges to the existing connecting edges in the minimum spanning tree to form an Eulerian graph. Merge the minimum spanning trees according to the following formula. MST Greedy matching M Constructing an Eulerian graph G , so that each vertex deg All are even numbers;

[0148] ;

[0149] In the formula, , V Represents a set of vertices. S Denotes the set of edges. OS Represents the set of matching edges;

[0150] Initialize the adjacency list according to the following formula. ;

[0151] ;

[0152] In the formula ; A (v ) represents the connection between vertices in an Eulerian graph. v The set of other vertices that are directly connected.

[0153] (b) Then, the starting point is randomly selected based on the Eulerian graph and the adjacency list using the Hierholzer algorithm. v Perform a traversal of the connected edges, recursively traversing unvisited edges. When there are no unvisited edges, backtrack and record them in the path array. Path In this process, starting from any arbitrary starting point, the connecting edges are visited sequentially according to the direct connection relationship. When forming a cycle, the cycle is stored as a path and recorded until all connecting edges have been visited, thus obtaining multiple cycles.

[0154] (c) Based on the path array Path Obtain the optimal edge set Opt Thus, the Euler circuit is obtained. Optimal edge set Opt The edges corresponding to the multiple loops obtained in step (b) are recorded sequentially.

[0155] S48: Hamiltonian loop conversion:

[0156] (a) Traverse the vertices sequentially along the Eulerian circuit, keeping only the position of the first vertex and ignoring subsequent repeated visits, and finally obtain the Hamiltonian path that traverses all vertices once;

[0157] (b) Connect the vertices in the Hamiltonian path sequentially to form the final edge set, denoted as . ,in For the first q There are 4 edges that connect the two points, and their weights are the same as the values ​​of the distance matrix between the two points they connect.

[0158] (c) Connect the end point of the path directly to the start point to obtain a Hamiltonian cycle. ,in FS This is the final set of edges.

[0159] S49: Extracting the vertex sequence of a Hamiltonian circuit Hami Calculate the relative coordinate system coordinates and polar coordinate parameters according to step S23, use their weights as the distance, execute steps S24-S26, then take the current endpoint as the new starting point, select the next vertex as the new endpoint, and repeat until all vertices are traversed.

[0160] Furthermore, the automated waterborne waste collection method also includes: receiving remote commands and performing waste collection based on those commands. Specifically, it can also execute S5 remote custom search strategies; S5 includes:

[0161] S51: The control terminal sends digital control commands to the device's hardware module via the wireless communication module;

[0162] S52: The microcontroller in the device's hardware module decodes the received control commands and adjusts them according to the preset cruising speed. Drive the corresponding motor to perform movement in the specified direction;

[0163] Furthermore, this embodiment also provides an automatic water garbage collection device, including a cylinder and a water pump, a power module, a buoyancy module and a camera module respectively connected to the cylinder;

[0164] The cylinder has an inlet circumferentially opened in the middle part of the cylinder, and the water pump is located in the lower part of the cylinder. The water pump is used to pump the water inside the cylinder to the outside to generate a negative pressure vortex so that the water on the surface flows into the cylinder from the inlet to achieve garbage collection.

[0165] The power module provides the cylinder with moving power and controllable direction, the buoyancy module provides the cylinder with buoyancy to float on the water surface, and the camera module is located above the cylinder to capture images of the water surface.

[0166] This invention includes a floating garbage collection device and a hardware control system, see reference. Figure 3 The cylinder comprises an upper cylinder and a lower cylinder. The bottom of the upper cylinder is detachably connected to the top of the lower cylinder, and an inlet is formed between them. The bottom of the upper cylinder is closed, and a top cover 1 is detachably connected to the top, thereby forming a closed space above the interior of the cylinder to facilitate the accommodation of related equipment.

[0167] like Figure 4 As shown, the top cover 1 prevents water from entering the upper cylinder 2 and is easy to disassemble, facilitating the insertion and removal of components from the upper cylinder 2. The top cover 1 includes a connecting opening 11, a magnetic docking piece 12 connected to the upper cylinder 2, a portable handle 13, and a sliding groove 14 connected to the upper cylinder. The connecting opening 11 provides an opening for the hollow wiring tube 53 in the solar module 5 to pass through the upper cylinder 2 and the lower cylinder 3. The magnetic docking piece 12 works in conjunction with the magnetic connecting piece 24 of the upper cylinder 2 to provide a fixing function. The internal shape of the sliding groove 14 matches the shape of the slot 23 inside the upper cylinder 2. By rotating and locking, the top cover 1 is tightly connected to the upper cylinder 2, which, in conjunction with the magnetic design, achieves a double locking effect.

[0168] like Figure 5 and Figure 6As shown, the upper cylindrical body 2 includes a connecting hinge 21, a hook structure 22, a slot 23, a magnetic connecting piece 24, and a power extension output hole 25. Multiple hinge structures are circumferentially connected to the upper cylindrical body, and the cylindrical body is connected to the buoyancy module 4 through these hinge structures, allowing damping adjustment by adjusting the angle of the buoyancy module 4. The connecting hinge 21 works in conjunction with the docking hinge 43 in the buoyancy module 4, enabling damping adjustment of the buoyancy module 4. The hook structure 22 works in conjunction with the snap-fit ​​structure 31 of the lower cylindrical body 3, achieving the effect of connecting the upper and lower cylindrical bodies.

[0169] The power module includes a motor and a propeller. The motor is located inside the cylinder and extends out of the cylinder via a drive shaft to be connected to the propeller. The drive rod between the motor and the propeller extends underwater through a power extension output hole 25. A silicone sleeve is fitted at the power extension output hole 25 to prevent water from entering the upper cylinder 2.

[0170] like Figure 7 and Figure 8 As shown, the lower cylinder 3 includes a snap-fit ​​structure 31, a filter screen 32, and a water pump 33; the filter screen 32 is located inside the cylinder below the inlet; the filter screen 32 is used to collect the collected garbage; the water pump 33 works continuously during operation, pumping water from the lower cylinder 3 to the outside of the cylinder through a pipe; the water pressure difference caused by pumping water creates a suction vortex inside the lower cylinder 3, sucking in the surrounding water garbage from the inlet; the water pump is powered by the power supply component in the upper cylinder 2 hardware module.

[0171] like Figure 9 As shown, the buoyancy device 4 includes a buoyancy plate 41, a buoyancy foam board 42, and a connecting hinge 43. The buoyancy foam board 42 is installed under the buoyancy plate 41, and this part is responsible for providing the main buoyancy. The water garbage collection device is equipped with a total of four buoyancy devices 4, which are fixed around the water garbage collection device by the connecting hinge 21 of the upper cylinder 2.

[0172] The automatic waterborne waste collection device also includes a hardware module. The power module and the hardware module are respectively located inside the enclosed space above the cylinder. The hardware module includes a control motherboard, which is connected to the water pump, the power module and the camera module respectively, and is used to control the automatic waterborne waste collection device to implement the automatic waterborne waste collection method based on dynamic path planning described above.

[0173] In this embodiment, the hardware control system includes hardware modules responsible for sending and receiving signals and transmitting motion signals to the motor. For example... Figure 6As shown, the hardware module is fixed inside the upper cylinder 2. A camera module, such as camera 52, can be fixed above the cylinder via a support rod, with a downward shooting angle. The control board in the hardware module can transmit electrical signals to the power module in real time to control the motor's movement based on the images transmitted from camera 52. The motor in the power module drives the propeller, which extends underwater through the power extension output hole 25, to rotate, thereby causing the surface garbage collection device to move in the desired direction. The hardware module may also include a power supply component, a GPS positioning component, a battery health monitoring component, a water quality monitoring component, and a communication module.

[0174] Optionally, the camera module can capture images from a perspective directly below the center of the automatic water surface collection device, with the image center coinciding with the device's center. This ensures that the directions of all targets align with the device's movement direction, facilitating device control. In other embodiments, the shooting angle can be different. The relative position between the image coordinate system and the coordinate system controlling the automatic water surface collection device's movement can be pre-calibrated, allowing the actual movement direction of the device to be obtained based on the target directions in the image. No specific limitation is imposed.

[0175] like Figure 1 and Figure 10 As shown, the automatic water debris collection device also includes a solar panel 5, which comprises a solar panel 51, a camera 52, and a hollow conduit 53. The solar panel 51 can be connected to the power supply component in the hardware module to provide power when there is sufficient solar energy. The camera 52 captures images of the debris distribution on the water surface from above in real time and transmits them to the control mainboard in the hardware module. The hollow conduit runs through the upper cylinder 2 and the lower cylinder 3 of the device, and its hollow interior facilitates the cable connection of various electronic components. The hollow conduit also serves as a support rod for mounting the camera 52.

[0176] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. An automatic collection method for marine debris based on dynamic path planning, characterized in that, include: Acquire real-time water surface images and detect and identify target garbage in the real-time water surface images based on a pre-trained detection model; When the presence of target debris is detected in the real-time water surface image, the location information of the target debris in the image is obtained based on the real-time water surface image; The movement direction is determined based on the location information, and the target waste is collected by moving in the determined movement direction. Also includes: The real-time water surface image is divided into multiple regions along the circumference with the image center as the origin, and each region corresponds to a target direction. When no target debris is detected in the real-time water surface image, the target aggregation degree of each target direction is established based on the historical movement direction of the target debris, so that the more times the target debris is collected in the target direction, the greater the target aggregation degree of the target direction. The probability of movement in the target direction is obtained based on the target clustering degree in the target direction, such that the greater the target clustering degree in the target direction, the greater the probability of movement. Garbage collection is performed by randomly selecting a target direction based on the probability of movement in each target direction. When collecting target waste along the target direction, the target aggregation degree changes as follows: ; in, x i,0 For the first i Initial target clustering degree in each target direction; x i,j For the first i The first target direction j The degree of target aggregation during the next targeted waste collection; s The preset growth step size; The motion guidance increment in the target direction is obtained based on the target clustering degree, and then the motion guidance value in the target direction is obtained. The movement probability in the target direction is obtained based on the proportion of the motion guidance value to the sum of motion guidance values ​​in all target directions. and exercise guidance values Specifically as follows: ; ; in, α This is the preset initial motion guidance value.

2. The automatic collection method for floating garbage based on dynamic path planning as described in claim 1, characterized in that, Determining the direction of movement based on the location information specifically includes: The target direction is obtained by matching the location information of the target waste, and then the movement direction is determined based on the target direction; The automatic collection method for waterborne debris also includes: determining the moving speed of the debris collection based on the distance information of the target debris relative to the center of the image in the real-time water surface image.

3. The automatic collection method for marine debris based on dynamic path planning as described in claim 1 or 2, characterized in that, When the presence of target debris is detected in the real-time water surface image, the location information of the target debris in the image is obtained based on the real-time water surface image; The movement direction is determined based on the location information, and the target waste is collected by moving in the determined movement direction, specifically including: The nearest target trash to the center of the real-time water surface image is obtained, and its location information is acquired. Based on the location information of the nearest target trash, the movement direction is determined, and the nearest target trash is collected sequentially. Alternatively, when the number of target debris in the real-time water surface image is greater than or equal to a preset threshold, the traversal order of all target debris is optimized based on the position of all target debris in the real-time water surface image to obtain an optimized path; and the target debris is collected sequentially according to the optimized path.

4. The automatic collection method for floating garbage based on dynamic path planning as described in claim 3, characterized in that, Optimize the traversal order of all target garbage to obtain the optimized path, specifically including: Based on the location information of the target debris in the real-time water surface image, the distance between any two target debris is obtained, and a distance matrix is ​​established; Construct a minimum spanning tree based on the distance matrix, which contains vertices and connecting edges, and minimizes the sum of the weights of the connecting edges. The location of the target garbage forms a vertex, and the weight of the connecting edge is the distance between the corresponding vertices. Add an edge to each vertex in the minimum spanning tree that has an odd number of connecting edges, so that the number of connecting edges for all vertices is even, and construct an Eulerian graph. Multiple circuits are obtained by traversing the Euler graph through connecting edges, forming an Euler circuit; Traverse the vertices sequentially along the Eulerian circuit, retaining the position of the first occurrence of each vertex, and obtain the Hamiltonian path that traverses all vertices once. Then, obtain the optimized path based on the Hamiltonian path.

5. The automatic collection method for marine debris based on dynamic path planning as described in claim 4, characterized in that, Construct a minimum spanning tree based on the distance matrix, containing vertices and connecting edges, with the minimum sum of edge weights. Specifically, this includes: Arrange the distance values ​​in the distance matrix in ascending order, and start from the beginning to select the distance values ​​in turn to connect the corresponding vertices, until all other vertices can be reached directly or indirectly from any vertex along the connecting edge, and exclude the case of only one closed loop, thus forming the minimum spanning tree; Constructing an Eulerian graph specifically includes: Construct the set of odd-degree vertices in the minimum spanning tree where the number of connecting edges is odd; Select a vertex from the set of odd-degree vertices, create a new edge connecting the vertex to the vertex with the nearest distance value in the set of odd-degree vertices, and remove the vertex and its nearest neighbor from the set of odd-degree vertices. Repeat this process multiple times until the set of odd-degree vertices is empty. By adding new connecting edges to the existing connecting edges on the minimum spanning tree, an Eulerian graph is formed.

6. An automatic waterborne waste collection device, characterized in that, It includes a cylindrical body and a water pump, a power module, a buoyancy module, and a camera module respectively connected to the cylindrical body; The cylinder has an inlet circumferentially opened in the middle part of the cylinder, and the water pump is located in the lower part of the cylinder. The water pump is used to pump the water inside the cylinder to the outside to generate a negative pressure vortex so that the water on the surface flows into the cylinder from the inlet to achieve garbage collection. The power module provides the cylinder with moving power and the direction is controllable; the buoyancy module provides the cylinder with buoyancy to float on the water surface; and the camera module is located above the cylinder to capture images of the water surface. It also includes a hardware module, and a closed space is provided above the interior of the cylinder, with the power module and the hardware module respectively located inside the closed space; The hardware module includes a control motherboard, which is connected to the water pump, the power module, and the camera module respectively, and is used to control the automatic water garbage collection device to implement the automatic water garbage collection method based on dynamic path planning as described in any one of claims 1-5.

7. The automatic waterborne waste collection device as described in claim 6, characterized in that, The interior of the cylinder is equipped with a filter screen below the inlet; the camera module is fixed above the cylinder by a support rod, with the shooting angle facing downwards.