Method and system for automatically collecting fallen leaves and sediments in swimming pool based on visual identification
By using visual recognition and spatiotemporal neural networks to predict the distribution of fallen leaves and sediment in the pool, and dynamically adjusting the cleaning path, the problems of blind spots and low efficiency in pool cleaning are solved, achieving highly efficient automatic cleaning.
Patent Information
- Application Number
- CN202511348778.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-22
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-09-22
AI Technical Summary
The existing swimming pool cleaning equipment has problems of blind spots and low cleaning efficiency. In particular, manual cleaning and fixed path cleaning methods are difficult to effectively cover all contaminated areas.
A vision-based method is used to predict the distribution of fallen leaves and sediment through a spatiotemporal graph neural network. Combined with a multi-view spatiotemporal graph attention network, the robot's cleaning path is dynamically adjusted to achieve precise cleaning of the grid area of the swimming pool.
It improves the efficiency and coverage of pool cleaning, reduces cleaning blind spots, reduces manual intervention costs, and adapts to cleaning needs in different scenarios.
Smart Images

Figure CN120848560A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to an automatic collection method and system for fallen leaves and sediment in swimming pools based on visual recognition. Background Technology
[0002] Currently, in scenarios such as home pools, commercial pools (such as hotel and gym pools), and public pools, floating objects (such as fallen leaves) and sediment can be removed manually. However, this method is costly and inefficient.
[0003] In related technologies, pool cleaning equipment uses fixed paths to remove fallen leaves and sediment, which easily leads to cleaning blind spots. For example, leaves may reappear in an area that has just been cleaned, requiring cleaning to wait until the next cycle. Alternatively, repeated cleaning may occur, such as repeatedly cleaning the same area, resulting in low cleaning efficiency. Therefore, there is an urgent need to propose a technical solution to address at least one of the above-mentioned technical problems. Summary of the Invention
[0004] The main objective of this invention is to provide a method and system for automatic collection of fallen leaves and sediment in swimming pools based on visual recognition, aiming to solve the technical problems of easy cleaning blind spots and low cleaning efficiency in related technologies.
[0005] In a first aspect, embodiments of the present invention provide an automatic collection method for fallen leaves and sediment in swimming pools based on visual recognition, comprising: acquiring the distribution of trees around a target swimming pool; dividing the target swimming pool into multiple pool grid areas according to the pool structure; and predicting the distribution of fallen leaves in a future preset time period by combining the current weather conditions and tree distribution with a leaf distribution prediction model of a spatiotemporal graph neural network; wherein, the nodes in the leaf distribution prediction model correspond one-to-one with trees, and the node features include the tree species, tree height, distance from the pool, and historical leaf volume of the corresponding tree, and the edge features are constructed based on the relative position, location, and wind direction propagation relationship of the trees; the edge features include the relative position, relative distance, and wind direction transmission weight between trees; the leaf distribution includes a leaf probability matrix corresponding to the pool grid areas, and each element in the leaf probability matrix is used to represent the future leaf distribution of the corresponding pool grid area. The system predicts the probability of fallen leaves appearing within a preset time period; it acquires multimodal environmental data and pedestrian flow data around the target swimming pool, and predicts the distribution of sediment within a future preset time period using a sediment prediction hybrid model; the sediment prediction hybrid model is constructed based on a spatiotemporal graph convolutional network and a multi-view spatiotemporal graph attention network, embedding fluid dynamics equations and sediment motion equations into the sediment prediction hybrid model; based on the distribution of fallen leaves and sediment, it generates an initial collection task for the target robot according to the spatial structure of the target swimming pool; the initial collection task includes a starting point, a covered water area, and an initial collection path; during the execution of the initial collection task by the target robot, it dynamically adjusts the initial collection path in the initial collection task based on monitoring image data in the surrounding water area to obtain a real-time collection task, and executes the real-time collection task to remove temporarily appearing floating objects and sediment in the surrounding water area.
[0006] Secondly, embodiments of the present invention provide an automatic collection system for fallen leaves and sediment in swimming pools based on visual recognition, comprising: a collection module for acquiring the distribution of trees around a target swimming pool; a division module for dividing the target swimming pool into multiple pool grid areas according to the pool structure; and a leaf prediction module for predicting the distribution of fallen leaves in a future preset period by combining current weather conditions and tree distribution information using a spatiotemporal graph neural network leaf distribution prediction model; wherein, the nodes in the leaf distribution prediction model correspond one-to-one with trees, and the node features include the tree species, tree height, distance from the pool, and historical leaf volume of the corresponding tree, and the edge features are constructed based on the relative position, location, and wind direction propagation relationship of the trees; the edge features include the relative position, relative distance, and wind direction transmission weight between trees; the leaf distribution includes a leaf probability matrix corresponding to the pool grid areas, and each element in the leaf probability matrix represents the leaf distribution of the corresponding pool grid area in the future preset period. The system includes a prediction probability value for fallen leaves appearing within a given time period; a sediment prediction module, used to acquire multimodal environmental data and pedestrian flow data around the target pool, and predict sediment distribution within a preset time period using a sediment prediction hybrid model; the sediment prediction hybrid model is constructed based on a spatiotemporal graph convolutional network and a multi-view spatiotemporal graph attention network, embedding fluid dynamics equations and sediment motion equations into the sediment prediction hybrid model; a planning module, used to generate an initial collection task for the target robot based on the distribution of fallen leaves and sediment, considering the spatial structure of the target pool; the initial collection task includes a starting point, a covered area, and an initial collection path; and an execution module, used to dynamically adjust the initial collection path in the initial collection task based on monitoring image data in the surrounding water area during the execution of the initial collection task by the target robot, to obtain a real-time collection task, and execute the real-time collection task to remove temporarily appearing floating objects and sediment in the surrounding water area.
[0007] Thirdly, embodiments of the present invention also provide an electronic device, the electronic device including a processor and a memory for storing a computer program; the processor is used to execute the computer program and, when executing the computer program, implement the automatic collection method for pool leaves and sediment based on visual recognition as described in the first aspect or any embodiment of the present invention.
[0008] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer software program, which, when executed by a processor, implements the automatic collection method for pool leaves and sediment based on visual recognition as described in the first aspect or any embodiment of the present invention.
[0009] This invention provides a method and system for automatic collection of fallen leaves and sediment in swimming pools based on visual recognition. The method involves acquiring the distribution of trees around a target swimming pool. The target swimming pool is divided into multiple pool grid areas according to its structure. Combining current weather conditions and tree distribution, a leaf distribution prediction model using a spatiotemporal graph neural network is used to predict the leaf distribution over a preset future period. In this model, each node corresponds to a tree, and node features include the tree species, tree height, distance from the pool, and historical leaf volume. Edge features are constructed based on the relative position, location, and wind direction propagation relationship of the trees. Edge features include the relative position, relative distance, and wind direction propagation weight between trees. The leaf distribution includes a leaf probability matrix corresponding to each pool grid area, where each element represents the predicted probability of fallen leaves appearing in the corresponding pool grid area over a preset future period. Multimodal environmental data and pedestrian flow data around the target swimming pool are acquired, and the sediment distribution within a preset future time period is predicted using a sediment prediction hybrid model. This sediment prediction hybrid model is constructed based on a spatiotemporal graph convolutional network and a multi-view spatiotemporal graph attention network, embedding fluid dynamics equations and sediment motion equations into it. Based on the distribution of fallen leaves and sediment, an initial collection task for the target robot is generated, tailored to the spatial structure of the target swimming pool. This initial collection task includes a starting point, a covered area, and an initial collection path. During the execution of the initial collection task by the target robot, the initial collection path is dynamically adjusted based on monitoring image data from the surrounding water area to obtain a real-time collection task, which is then executed to remove temporarily appearing floating debris and sediment from the surrounding water area.
[0010] In this embodiment of the invention, spatiotemporal graph neural networks and physical model embedding are used to ensure that the distribution prediction of fallen leaves and sediment combines data-driven correlation with the rationality of physical laws, providing a reliable basis for cleaning decisions. Secondly, from grid division and initial path planning to dynamic adjustment, this embodiment focuses on high-risk areas and reduces ineffective movement, significantly reducing redundant robot operations and improving the cleaning efficiency of the pool robot. Furthermore, this embodiment covers predicted high-risk areas through initial collection tasks and responds to temporary sudden pollution through dynamic adjustments, avoiding the drawbacks of blind spots and low cleaning efficiency in traditional cleaning methods. Ultimately, it achieves efficient and comprehensive cleaning of fallen leaves and sediment in pools, reducing manual intervention costs and adapting to pool cleaning needs in different scenarios. Attached Figure Description
[0011] Figure 1 A schematic flowchart illustrating an automatic collection method for fallen leaves and sediment in a swimming pool based on visual recognition, provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of a scenario for an automatic collection method of fallen leaves and sediment in a swimming pool based on visual recognition, provided by an embodiment of the present invention. Detailed Implementation
[0012] This invention provides a method and system for automatic collection of fallen leaves and sediment in swimming pools based on visual recognition. The method can be applied to a terminal device, such as a mobile terminal, mobile phone, virtual reality device, tablet computer, laptop computer, desktop computer, wearable device, or other electronic device. This terminal device can be a server connected to a cloud service system or a server cluster. The connection can be implemented through hardware circuitry or a communication module.
[0013] The following detailed description of some embodiments of the present invention is provided in conjunction with the accompanying drawings. Figure 1 This is a flowchart illustrating an automatic collection method for fallen leaves and sediment in a swimming pool based on visual recognition, provided as an embodiment of the present invention. Please refer to... Figure 1 The method includes the following steps: Step S101: Obtain the distribution of trees around the target swimming pool.
[0014] Step S102: Divide the target pool into multiple pool grid areas according to the pool structure.
[0015] Step S103: Combining the current weather conditions and tree distribution, predict the leaf distribution in the future within a preset time period using a spatiotemporal graph neural network leaf distribution prediction model.
[0016] In this embodiment of the invention, the target swimming pool is a specific swimming pool for which automatic collection of fallen leaves and sediment is required. It can cover various types of swimming pools with aquatic environments, such as public swimming pools, private swimming pools, and landscaped swimming pools. The core is to achieve water quality cleaning and debris removal through automatic collection methods, which is the specific object of the entire automatic collection process.
[0017] The pool structure refers to the various physical components and spatial characteristics that constitute the target pool, including the overall shape and planar dimensions of the pool, the material and height of the pool walls, the slope and flatness of the pool bottom, as well as the fixed facilities within the pool, such as ladders for people to enter and exit, water inlets and outlets for water circulation, underwater lighting equipment, drainage outlets, etc. It also covers the boundary structure connecting the pool with the surrounding environment. These characteristics together determine the spatial layout of the pool and are an important basis for dividing the pool grid areas.
[0018] The pool grid area is a discrete spatial unit formed by dividing the pool water area and related areas according to the structural characteristics of the target pool. The division process will take into account the actual layout of the pool structure to ensure that each unit has a relatively uniform spatial range. Subsequent operations such as leaf and sediment distribution prediction and collection task planning will be carried out based on these discrete units. By clarifying the spatial location and range of each unit, a precise spatial positioning benchmark is provided for automatic collection operations.
[0019] Optionally, optimizing the pool grid area division can be approached from the perspectives of adapting to actual scenario needs, linking core technical aspects, and responding to dynamic changes. First, the division logic should be optimized in close conjunction with the pool structure and facility distribution. For fixed facilities within the pool, such as escalators, inlets, and outlets, avoid dividing them into the same grid as the surrounding water area. Instead, small avoidance grids should be drawn centered on these facilities. For irregularly shaped pools (such as circular or irregular polygonal pools), non-uniform grid division should be used, reducing the grid granularity in areas with greater curvature in the pool walls to ensure that the grid boundaries closely match the actual pool contour, reducing wasted space or omissions. Second, the grid granularity should be adjusted based on differences in pollution influencing factors. In areas with high leaf fall rates, such as upwind areas of the pool, pool edges near trees, and areas prone to sediment accumulation, such as low-lying areas at the pool bottom and areas with high pedestrian traffic, the grid should be refined to a smaller size to improve the spatial accuracy of subsequent leaf and sediment distribution predictions. In areas with lower pollution risk and relatively stable environments, such as the center of the pool, the grid size can be appropriately increased to balance prediction accuracy and computational efficiency. At the same time, the grid size should be determined by linking the robot's operation parameters. Based on the maximum effective working radius of the robot's single movement and the coverage of the collection device, it should be ensured that a single grid can be cleaned by the robot in one positioning operation. This avoids the grid being too large, which would result in the grid not being able to cover the area in a single operation, or the grid being too small, which would increase the frequency of robot movement and energy consumption. This will improve the matching degree between path planning and actual operation.
[0020] Furthermore, a dynamic adjustment mechanism can be introduced, combining real-time environmental data such as water flow velocity and wind direction changes, as well as the pollution frequency of different grids in historical cleaning data, to periodically optimize grid division. For example, during the rainy season when leaf litter increases dramatically, the poolside grid can be temporarily refined. During the pool water change cycle, the grid boundaries can be adjusted according to the water flow direction, ensuring that the grid division always adapts to the actual pollution distribution and cleaning needs. Finally, by establishing grid division evaluation indicators, such as the pollution prediction error rate within the grid, robot operation coverage, and the proportion of ineffective movement distance, the scheme can be continuously iterated and optimized to ensure that the division effect meets the dual goals of precise cleaning and efficient operation.
[0021] The above steps S101 and S102, obtaining the distribution of trees around the target pool and dividing the area into grids according to the pool structure, are the basic prerequisites for achieving precise cleaning. This step clarifies the core source of fallen leaves to avoid directional deviations in subsequent predictions. It also avoids the limitations of the traditional rough assessment of pool cleaning, so that the subsequent prediction of the distribution of fallen leaves and sediment and the planning of collection tasks can be located in specific spatial units. This provides a unified spatial coordinate benchmark for subsequent steps, ensuring the spatial correlation and consistency of all technical links, and avoiding the ineffective investment of cleaning resources in areas without fallen leaves or sediment.
[0022] In this embodiment of the invention, the spatiotemporal graph neural network-based leaf distribution prediction model is a model specifically designed to predict the spatial distribution of fallen leaves in a swimming pool over future time periods. Its core is to construct a spatiotemporal graph structure containing tree association information, combine this with neural network mining of leaf propagation patterns across spatiotemporal dimensions, and ultimately output the probability of leaf fall in each grid area of the swimming pool. In the initial stage of model construction, comprehensive information collection on trees surrounding the target swimming pool is necessary to determine node characteristics. For example, visual recognition devices can be used to distinguish the tree species, laser ranging tools can be used to measure tree height, geolocation tools can be used to calculate the shortest distance from the tree to the edge of the pool, and leaf fall records for the tree under similar weather conditions in the same season can be retrieved to determine historical leaf fall volume. This information is then integrated as the basic features of each tree's corresponding node, ensuring that the node accurately reflects the leaf fall potential and impact range of a single tree.
[0023] Optionally, the nodes in the leaf distribution prediction model correspond one-to-one with trees. Node features include the tree species, tree height, distance from the pool, and historical leaf fall amount. Edge features are constructed based on the relative positions of the trees, their locations, and wind direction propagation relationships. Further, edge features include the relative positions and distances between trees, and wind direction propagation weights. Further, the leaf distribution includes a leaf probability matrix corresponding to the pool grid area, where each element represents the predicted probability value of leaf fall occurring in the corresponding pool grid area within a preset future time period.
[0024] For example, in the construction of edge features, optionally, the latitude and longitude coordinates of each tree can be obtained through a positioning tool, the coordinate difference between any two trees can be calculated to determine their relative positions, and the straight-line distance between the two trees can be calculated as a relative distance parameter. For wind direction transmission weights, hourly wind direction data for a future preset time period needs to be combined to analyze the degree of fit between the direction of the line connecting any two trees and the wind direction. For instance, when the wind direction is consistent with the direction of the line connecting two trees, the fallen leaves of trees upwind may be carried by the wind and indirectly affect the surrounding area of trees downwind. In this case, the weight of this influence needs to be adjusted according to the wind speed. The relative position, relative distance, and wind direction transmission weights are integrated to form edge features that characterize the interaction between trees.
[0025] When the leaf distribution prediction model is running, the spatiotemporal graph neural network first performs spatial dimension analysis on the constructed graph structure to capture the impact of the spatial distribution of different trees on the leaf propagation path. For example, trees that are close to the pool and are taller are more likely to have their leaves fall directly into the pool. Simultaneously, it combines temporal weather change data, such as future wind speed increases or decreases and wind direction changes, to dynamically adjust the leaf propagation prediction logic. During the prediction process, the model maps the leaf potential and propagation pattern of each tree to different grid areas of the pool. For example, in strong winds, the leaves of broad-leaved trees upwind are more likely to fall into the downwind grids of the pool. The leaf distribution prediction model then increases the leaf probability value of these grids. Finally, it integrates the probability information of all grids to generate a leaf probability matrix, clearly showing the likelihood of leaf drop in each pool grid in the future.
[0026] Taking a community outdoor swimming pool as an example, three trees are planted around the pool: a mature camphor tree, a young osmanthus tree, and a ginkgo tree. When constructing model nodes, the camphor tree node is labeled as an evergreen species with a large historical leaf drop, 8 meters tall, and 3 meters from the pool edge. The osmanthus tree node is labeled as an evergreen species with a moderate historical leaf drop, 3 meters tall, and 5 meters from the pool edge. The ginkgo tree node is labeled as a deciduous species with a sharp increase in historical leaf drop in autumn, 6 meters tall, and 4 meters from the pool edge. When constructing edge features, the relative positions of the camphor tree and the osmanthus tree are calculated as northwest-southeast, with a straight-line distance of 4 meters. If the prevailing wind direction in the future is northwest, the camphor tree, as the upwind tree, will have a higher weight in transmitting wind direction to the osmanthus tree. When the leaf distribution prediction model is running, it takes into account the wind speed of the northwest wind to determine that the fallen leaves of camphor trees are more likely to be blown towards the southeast grid of the pool. The fallen leaves of osmanthus trees, due to their greater distance and lower tree height, mainly affect the south grid of the pool. If the ginkgo trees are not in the leaf-falling season, their contribution to the leaf-fall probability of each grid is smaller. In the final leaf-fall probability matrix, the probability values of the southeast and south grids of the pool are significantly higher than those of other areas, providing a clear direction for subsequent cleaning task planning.
[0027] As an optional embodiment, in step S103, firstly, fine-grained weather data of the target swimming pool area within a preset future time period is acquired. This fine-grained weather data includes hourly wind speed, hourly wind direction, cumulative precipitation, and average temperature. The Min-Max normalization method is used to normalize the fine-grained weather data, eliminating dimensional differences and obtaining a weather feature vector with unified dimensions. Next, the basic node feature parameters of each tree surrounding the target swimming pool are extracted. These parameters include: the tree species' leaf fall cycle, a predefined coefficient of leaf adhesion, actual tree height, the shortest straight-line distance from the tree trunk to the edge of the pool, and the historical daily average leaf fall during the same season and similar weather conditions. The basic node feature parameters of each tree are then fused with the weather feature vector through element-wise multiplication to obtain the fused node features of each tree. Next, based on the latitude and longitude coordinates of each tree, the relative position coordinates and straight-line distance between any two trees are calculated, serving as the relative position parameter and relative distance parameter in the edge features, respectively. According to the hourly wind direction in the weather feature vector, the wind direction transfer weight between any two trees is calculated. Using the angle between the line connecting the two trees and the hourly wind direction as a parameter, the product of the cosine of the angle and the hourly wind speed is divided by the historical maximum wind speed of the pool network area to obtain the wind direction transfer weight, resulting in an edge feature set containing the relative position parameter, relative distance parameter, and wind direction transfer weight of the two trees. Then, using the trees around the target pool as graph nodes, the relationship between any two trees as graph edges, the fused node features as node attributes, and the edge feature set as edge attributes, the input graph structure of the spatiotemporal graph neural network is constructed. Finally, the input graph structure is input into the pre-trained leaf distribution prediction model to obtain the leaf probability matrix.
[0028] Specifically, in step S103, it is first necessary to acquire fine-grained weather data for the target swimming pool area within a preset future time period. This type of data is typically obtained by connecting to regional meteorological observation platforms or miniature meteorological sensor arrays deployed around the swimming pool, ensuring that key information such as hourly wind speed, hourly wind direction, cumulative precipitation, and average temperature can be acquired in real time or in advance. Since these data have different units (e.g., wind speed is in meters per second and temperature is in degrees Celsius), direct use would affect the accuracy of model calculations. Therefore, the Min-Max normalization method is used to process them. By mapping the data to a unified numerical range, the unit differences are eliminated, ultimately forming a weather feature vector with unified dimensions, laying the foundation for subsequent fusion with other features.
[0029] Next, basic parameters of the nodal characteristics of each tree around the target swimming pool are extracted. The leaf-shedding cycle of each tree species needs to be determined based on botanical data or long-term observation records. For example, the leaf-shedding cycles of evergreen and deciduous trees differ significantly, with deciduous trees experiencing a further shortening of their leaf-shedding cycle in specific seasons. The predefined coefficient for leaf adhesion is set based on tree species characteristics and leaf morphology; trees with thicker leaves and stronger petiole adhesion have higher coefficient values, and vice versa. Actual tree height is obtained through laser rangefinders or drone aerial photography. The shortest straight-line distance from the tree trunk to the edge of the pool is calculated using geographic information systems (GIS) tools combined with the positioning coordinates of the pool and the trees. The historical average daily leaf fall during the same season and similar weather conditions is obtained by retrieving past pool leaf removal records and visual monitoring data. After obtaining these basic parameters, the node feature parameters of each tree are fused with the previously obtained weather feature vector through element-wise multiplication, so that weather factors can accurately affect the leaf drop characteristics of trees. For example, when the weather feature vector contains high wind speed, the possibility of tree leaves falling off will be enhanced through fusion, and finally the fused node features of each tree are formed.
[0030] Subsequently, edge features are calculated. First, based on the latitude and longitude coordinates of each tree, the relative position coordinates between any two trees are calculated using the coordinate difference, clarifying their spatial orientation. Simultaneously, the straight-line distance between two trees is calculated using the distance formula between two points. These two results serve as the relative position parameter and relative distance parameter in the edge features, respectively. For the calculation of wind direction transmission weight, the hourly wind direction in the weather feature vector is used as the basis. First, the direction of the line connecting any two trees is determined, and then the angle between this direction and the hourly wind direction is calculated. The cosine value of the angle reflects the degree of consistency between the wind direction and the direction of the tree connection. The smaller the angle, the closer the cosine value is to 1, indicating a more consistent wind direction with the tree connection. Then, this cosine value is multiplied by the corresponding hourly wind speed and divided by the historically monitored maximum wind speed in the pool area. This controls the wind direction transmission weight within a reasonable range, avoiding abnormal weighting due to extreme wind speeds. Finally, the relative position parameter, relative distance parameter, and wind direction transmission weight are integrated to form the edge feature set between each pair of trees.
[0031] When constructing the input graph structure of the spatiotemporal graph neural network, each tree around the target swimming pool is used as an independent node in the graph. The spatial association and wind direction influence between any two trees are used as edges in the graph. At the same time, the previously obtained fused node features are assigned to the corresponding nodes as node attributes, and the edge feature set is assigned to the corresponding edges as edge attributes. This makes the entire graph structure reflect both the individual characteristics of the trees and the interactions between the trees, thus meeting the structural requirements of the spatiotemporal graph neural network for the input data.
[0032] Finally, the constructed input graph structure is fed into the pre-trained leaf distribution prediction model. This model has been trained with a large amount of tree distribution data, weather data, and leaf distribution data in different swimming pool scenarios. It has the ability to identify the spatiotemporal relationship between tree characteristics, weather factors, and leaf distribution. After the model runs, it will analyze the propagation range and probability of leaf fall of each tree in the future preset time period based on the input graph structure information, and correspond it to each grid area of the swimming pool. Finally, it outputs a leaf probability matrix, which clearly presents the prediction of leaf fall in each grid area of the swimming pool.
[0033] Taking an outdoor swimming pool in a residential community as an example, there are three trees around the pool: a mature camphor tree, a five-year-old ginkgo tree, and a three-year-old osmanthus tree. During implementation, fine-grained weather data for the next 24 hours is first obtained through meteorological sensors within the community, including hourly northwest wind, average wind speed, minor precipitation, and average temperature. This data is then processed using Min-Max standardization to obtain a weather feature vector. When extracting basic node feature parameters, the camphor tree is labeled as an evergreen species with a long leaf-shedding period, high leaf adhesion coefficient, a height of 7 meters, a distance of 4 meters from the pool, and historically low daily leaf drop. The ginkgo tree is labeled as a deciduous species with a short autumn leaf-shedding period, moderate leaf adhesion coefficient, a height of 5 meters, a distance of 3 meters from the pool, and historically high daily leaf drop. The osmanthus tree is labeled as an evergreen species with a long leaf-shedding period, high leaf adhesion coefficient, a height of 2 meters, a distance of 6 meters from the pool, and historically low daily leaf drop. These parameters are then fused with the weather feature vector. The fusion of the northwest wind and the easy propagation characteristics of ginkgo leaves enhances the influence weight of these node features. When calculating edge features, the camphor tree is located northwest of the ginkgo tree, with a straight-line distance of 5 meters between them. The wind direction is consistent with the direction of the connecting line, and the cosine of the angle is close to 1. Multiplying by the wind speed and dividing by the historical maximum wind speed yields a high wind direction transmission weight. The wind direction transmission weights between the ginkgo tree and the osmanthus tree, and between the camphor tree and the osmanthus tree, are relatively low. After constructing the input graph structure, the model is input into the pre-trained model. The model analysis shows that because the ginkgo tree has a short leaf-falling cycle, is close to the pool, and is aided by the northwest wind, its fallen leaves are more likely to fall into the grids on the north and west sides of the pool. The fallen leaves of the camphor tree have high adhesion and are slightly farther away, so they have little impact on the pool grids. The fallen leaves of the osmanthus tree have negligible impact due to their distance. In the final output leaf-falling probability matrix, the probability values of the grids on the north and west sides of the pool are significantly higher than those of other areas.
[0034] To illustrate the process of inputting node features and edge features into a spatiotemporal graph neural network model, we can take a scenario involving an outdoor swimming pool in a community and three surrounding trees (camphor, ginkgo, and osmanthus). First, feature preparation is completed by acquiring fine-grained weather data for the next 24 hours using meteorological sensors. This data is then standardized using Min-Max to obtain a weather feature vector containing hourly wind speed, wind direction, temperature, and precipitation. Next, the basic parameters of the node features of the three trees are extracted. The camphor tree is an evergreen tree with a long leaf-falling cycle, high leaf adhesion coefficient, a tree height of 7 meters, a distance of 4 meters from the pool, and low average daily leaf fall in the same period of history. The ginkgo tree is a deciduous tree with a short leaf-falling cycle, medium leaf adhesion coefficient, a tree height of 5 meters, a distance of 3 meters from the pool, and high average daily leaf fall in the same period of history. The osmanthus tree is an evergreen tree with a long leaf-falling cycle, high leaf adhesion coefficient, a tree height of 2 meters, a distance of 6 meters from the pool, and low average daily leaf fall in the same period of history. The basic parameters of each tree are fused with the weather feature vector element by element. For example, after the leaf-falling cycle parameter of the ginkgo tree is fused with the high wind speed feature, a fused node feature vector that better reflects the easy spread of its fallen leaves is formed. Finally, a node feature vector with three unified dimensions is obtained, corresponding to the three trees respectively.
[0035] Next, in the leaf distribution prediction model of the spatiotemporal graph neural network, edge features are constructed. Based on the latitude and longitude coordinates of the three trees, the relative positions of the camphor tree and ginkgo tree are calculated as northwest-southeast with a straight-line distance of 5 meters, the relative positions of the camphor tree and osmanthus tree are northeast-southwest with a straight-line distance of 8 meters, and the relative positions of the ginkgo tree and osmanthus tree are east-west with a straight-line distance of 6 meters. Then, combined with the northwest wind data in the weather feature vector, the wind direction transmission weight is calculated. The angle between the direction of the line connecting the camphor tree and ginkgo tree and the northwest wind is small, and the cosine value is close to 1. Multiplying by the wind speed and dividing by the historical maximum wind speed gives a higher weight. The weights of the camphor tree and osmanthus tree and the ginkgo tree and osmanthus tree are lower because the angle between the direction of the line connecting them and the wind direction is large. Finally, three sets of edge feature vectors are formed, each containing three parameters: relative position, relative distance, and wind direction transmission weight.
[0036] Subsequently, in the leaf distribution prediction model of the spatiotemporal graph neural network, the model input structure is constructed, with three trees as three nodes of the spatiotemporal graph neural network, and the node attributes are respectively assigned to the corresponding fused node feature vectors; the relationship between any two trees is taken as the edge of the graph, and the edge attributes are respectively assigned to the corresponding edge feature vectors. At the same time, time dimension information is added, and the next 24 hours are divided into 24 time steps by hour. Each time step corresponds to a set of nodes and edge features updated by real-time weather features, forming a spatiotemporal sequence graph structure data.
[0037] For example, when constructing a comprehensive assessment matrix, it is necessary to first extract grid-level temporal features from the 24 time-step data (corresponding to the hourly distribution over the next 24 hours) contained in the leaf fall probability matrix and sediment concentration matrix, using the pool grid as the core dimension, rather than directly using single-time-step data. Specifically, for each pool grid, the temporal features of leaf fall probability within the 24 time steps are first statistically analyzed, including the time step corresponding to the peak leaf fall probability (e.g., a grid has a leaf fall probability of 85% in the next 5 hours at time step 5, which is the peak for the whole day), the duration of the peak (e.g., the probability exceeds 70% in time steps 5-7), and the 24-hour average leaf fall probability. At the same time, the temporal features of sediment concentration within the 24 time steps of the grid are statistically analyzed, including the time step of the peak sediment concentration, the duration of the concentration exceeding the preset threshold (e.g., 10 mg / L), and the average concentration. Based on this, the sediment risk level (e.g., high, medium, low) corresponding to each time step is bound to the leaf fall probability and sediment concentration of that time step, forming associated data that includes grid, time step, and three-dimensional pollution features. For example, at time step 3 of a certain grid: leaf fall probability 60%, sediment concentration 12 mg / L, risk level medium. Subsequently, a weighted fusion algorithm is used to integrate the associated data from 24 time steps into a comprehensive pollution index for that grid. Among them, pollution data during robot operation periods (e.g., the next 8 hours, corresponding to 8 time steps) are given higher weights (e.g., weight 0.6), while pollution data during non-operation periods (e.g., the next 16-24 hours, corresponding to 8 time steps) are given lower weights (e.g., weight 0.2). This balances the urgent pollution that needs to be cleaned now with the potential pollution that needs to be planned in advance in the future. Finally, each grid forms a comprehensive pollution index, and the comprehensive pollution indices of all grids together constitute a comprehensive evaluation matrix.
[0038] For example, when setting priority rules, the temporal characteristics of the 24 time steps need to be transformed into a priority determination criterion based on both pollution intensity and time urgency, rather than relying solely on a single pollution value. First, based on the temporal characteristics of each grid in the comprehensive assessment matrix, pollution period types are classified. If the peak value of leaf fall probability and the peak value of sediment concentration in a certain grid are both concentrated within the next 1-4 hours (corresponding to 4 time steps), and the sediment risk level is ≥ medium during this period, then it is determined to be an urgent high-pollution period grid. If the peak values are concentrated within the next 5-12 hours (corresponding to 8 time steps), and the risk level is ≥ medium, then it is determined to be a recent high-pollution period grid. If the peak values are concentrated within the next 13-24 hours (corresponding to 12 time steps), then it is determined to be a long-term potential pollution grid. Secondly, considering the robot's operational capabilities (e.g., one time step per cycle, coverage of five grids per operation), grids in urgent high-pollution periods are assigned the highest priority. These grids should be prioritized for inclusion in the core collection area of the initial collection task, and their corresponding time steps should match the robot's first operational period (e.g., if the robot's first operational period is 1-2 hours in the future, corresponding to 2 time steps, then priority should be given to covering urgent high-pollution grids within that period). Grids in recent high-pollution periods are included in potential risk areas with the next highest priority, and their corresponding time steps should match the robot's subsequent operational periods (e.g., the second and third operational periods). Grids with potential long-term pollution are temporarily included in regular monitoring areas with the lowest priority, and their priority will be reassessed after the model updates its time step data (e.g., every 6 hours). Meanwhile, the priority rules also take into account the pollution superposition effect. If a grid has a leaf fall probability of over 70% and a sediment concentration of over 15 mg / L in the same time step (such as the 6th time step), and the risk level is high, then the priority of that grid in that time step will be increased. This avoids misjudgment of priority due to assessment of a single pollutant and ensures that the priority reflects the pollution differences in different time steps and meets the actual needs of the robot's time-segmented operation.
[0039] Finally, the spatiotemporal graph neural network's leaf distribution prediction model obtains the model input. Specifically, the spatiotemporal graph structure data is first converted into a format recognizable by the model. Node features are stored in matrix form, with rows representing nodes, columns representing feature dimensions, and the third dimension representing time steps. Edge features are stored in three-dimensional tensor form, recording the edge features between each pair of nodes at different time steps. The adjacency matrix records the connection relationships between nodes, with positions connected by edges marked as 1 and those without connections marked as 0. This data is input into the spatiotemporal graph neural network. The model first passes through a spatial convolutional layer, using edge features to adjust the information transmission weights between nodes. For example, due to the higher edge feature weights between camphor trees and ginkgo trees, the leaf drop of both trees has a greater impact on information transmission. Then, a temporal convolutional layer captures the dynamic changes of nodes and edge features at different time steps. For example, when the wind speed increases at a certain time step, the contribution of ginkgo tree node features to the prediction of leaf drop in the pool grid will be adjusted accordingly. Finally, through multi-layer network operations, the probability matrix of leaf drop in the pool grid area at each time step is output, completing the transformation from features to prediction results.
[0040] Optionally, when the input graph structure is input into the pre-trained leaf distribution prediction model, the spatial convolutional layer learns the spatial association features between trees through a graph attention mechanism, such as the mutual shading of fallen leaves from adjacent trees or the influence of wind transmission. The temporal recurrent layer, using a gated recurrent unit (GRU), learns the temporal influence features of weather changes on the leaf falling process within a preset future time period, such as the difference in leaf diffusion rate caused by wind speed changes. The spatial association features and temporal influence features are concatenated and fused to obtain spatiotemporal fusion features. The output layer maps the spatiotemporal fusion features into a leaf falling probability matrix through a fully connected network. Specifically, the row and column dimensions of the leaf falling probability matrix are consistent with the horizontal and vertical number of the pool grid areas, respectively. The value of each element in the matrix is the predicted probability value of fallen leaves appearing in the corresponding pool grid area within a preset future time period, ranging from 0 to 1, thus completing the prediction of leaf distribution.
[0041] It's worth noting that after inputting the graph structure into the pre-trained leaf distribution prediction model, the spatial convolutional layer first learns the spatial relationship features between trees through a graph attention mechanism. In practice, this layer calculates the attention weights of each tree node with all other surrounding tree nodes. This calculation process closely integrates the relative position, relative distance, and wind direction transmission weights in the edge features. If two trees are close together and the line connecting them is aligned with the wind direction, it means they are more closely related in leaf propagation. For example, a ginkgo tree upwind and a camphor tree downwind have higher wind direction transmission weights, so the graph attention mechanism assigns them higher attention weights, allowing the ginkgo tree's leaf characteristics to be more prominently transmitted to the camphor tree node. It also captures the mutual occlusion effects between trees. For instance, a tall camphor tree north of an osmanthus tree weakens the northerly wind's influence on leaf propagation. The attention mechanism reflects this occlusion effect by reducing the weights between the two. Finally, a feature vector containing spatial relationships is formed by weighted summation of the neighborhood information of each node.
[0042] Next, the temporal recurrent layer employs a gated recurrent unit (GRU) to learn the temporal impact characteristics of weather changes on the leaf fall process within a preset future time period. In implementation, the GRU receives updated node features and weather data sequentially at preset time steps (e.g., one hour for the next 24 hours). It dynamically adjusts the retention and updating of information through built-in reset and update gates. In time steps with low wind speeds, the leaf diffusion rate is slow, and the GRU retains the "slow diffusion" temporal information for that period through the update gate. When wind speeds increase in subsequent time steps, the update gate adjusts the weights, incorporating new information about "accelerated diffusion" into the temporal features. Simultaneously, the reset gate filters out outdated low-speed diffusion information, ensuring that the temporal impact features accurately reflect the dynamic effect of weather changes on the leaf fall process. For example, in the early morning when wind speeds are low, the temporal features will show a trend of leaves concentrating in the pool grid around the trees, while during the afternoon when wind speeds peak, the features will show a trend of leaves spreading to more distant grids.
[0043] After extracting spatial association features and temporal influence features, the model concatenates and fuses these two types of features to obtain spatiotemporal fusion features. In practice, the spatial association feature vector and temporal influence feature vector of each tree node are directly concatenated dimensionally. For example, the spatial feature vector contains information such as the strength of association between trees, while the temporal feature vector contains information such as the impact of weather at different time steps. The resulting spatiotemporal fusion features encompass both spatial information ("which trees are closely associated") and temporal information ("how weather at different times affects leaf fall"), ensuring that neither type of key information is lost and providing comprehensive support for the subsequent mapping to the pool grid for leaf fall probability.
[0044] Finally, the output layer maps the spatiotemporal fusion features into a leaf-fall probability matrix through a fully connected network. In implementation, the fully connected network first transforms the dimensions of the spatiotemporal fusion features into dimensions matching the total number of grid cells in the pool. For example, if the pool is divided into several grids horizontally and vertically, with a total of N grid cells, the network will convert the fusion features into an N-dimensional feature vector. Then, an activation function will compress the values of each dimension to the range of 0 to 1. Finally, according to the number of horizontal and vertical grid cells in the pool, the N-dimensional vector is reshaped into a corresponding matrix. The row dimension of the matrix matches the number of horizontal grid cells, and the column dimension matches the number of vertical grid cells. The value of each element in the matrix represents the predicted probability of leaf fall in the corresponding pool grid area within a preset future time period.
[0045] Taking the camphor, ginkgo, and osmanthus trees around the community's outdoor swimming pool as an example, the graph attention mechanism of the spatial convolutional layer assigns higher attention weights to the ginkgo trees (deciduous trees, close to the pool) and the camphor trees (upwind of the ginkgo trees) due to their high wind direction transmission weights, highlighting the propagation correlation of ginkgo leaves driven by the wind around the camphor trees; when processing the weather in the temporal cyclic layer, the GRU captures the changes in wind speed from low in the early morning to high in the afternoon, and the temporal features show the trend of accelerated diffusion of ginkgo leaves in the afternoon; after spatiotemporal fusion feature stitching, the fully connected network maps these features into a probability matrix of the pool grid, where the grid element values on the north side (close to the ginkgo trees) and the west side (downwind of the camphor trees) of the pool are significantly higher than those in other areas, accurately reflecting the prediction results that these areas are more likely to have fallen leaves, thus completing the prediction of the distribution of fallen leaves.
[0046] Step S103 above combines weather and tree distribution with a spatiotemporal graph neural network-based leaf distribution prediction model to improve the spatiotemporal accuracy and practicality of leaf distribution prediction. The model has a one-to-one correspondence between nodes and trees and incorporates features such as tree species, tree height, and historical leaf volume to accurately characterize the leaf characteristics of a single tree. The design of relative position and wind direction transmission weights in the edge features can effectively capture the spatial relationship between trees and the influence of wind direction on leaf propagation. The spatiotemporal graph neural network can simultaneously mine the correlation patterns between the future time period in the time dimension and the tree pool grid in the spatial dimension. The final output leaf probability matrix transforms the future leaf distribution into quantifiable grid-level probability values, enabling subsequent collection tasks to directly lock high-risk leaf-fall grids, avoiding the resource waste caused by traditional timed full-area cleaning, and improving the foresight and targeting of leaf cleaning.
[0047] Step S104: Obtain multimodal environmental data and pedestrian flow data around the target swimming pool, and predict the sediment distribution in the future preset time period using a sediment prediction hybrid model.
[0048] In this embodiment, the sediment prediction hybrid model is constructed based on a spatiotemporal graph convolutional network and a multi-view spatiotemporal graph attention network, embedding fluid dynamics equations and sediment motion equations into the sediment prediction hybrid model. Specifically, the sediment prediction hybrid model is a composite prediction model that integrates data-driven modeling and physical law constraints. Its core objective is to accurately capture the spatiotemporal distribution changes of sediment in a swimming pool. Its architecture is based on a spatiotemporal graph convolutional network (ST-GCN) and a multi-view spatiotemporal graph attention network (MST-GAT), while embedding fluid dynamics equations and sediment motion equations, taking into account both data correlation mining and physical law adaptation, and avoiding prediction biases that may occur in pure data-driven models that violate actual physical phenomena.
[0049] From the perspective of the model's basic architecture, the Spatiotemporal Graph Convolutional Network (ST-GCN) is mainly responsible for extracting the spatiotemporal correlation features of sediment distribution. During implementation, the model first treats the grid regions of the target pool as nodes in the graph structure. Node features integrate multimodal environmental data (such as water quality parameters, local water flow velocity, and water temperature of the pool grid), human flow status data (such as the human flow density and activity type corresponding to the grid), and historical sediment data (such as the sediment concentration of the grid in the same period in the past). The edges of the graph are constructed based on the fluid exchange intensity between pool grids (such as the frequency of material exchange between adjacent grids due to water circulation), spatial distance (the straight-line distance between grid centers), and the indirect influence of human flow activities (such as the sediment migration of densely populated grids on surrounding grids). The edge weights represent the correlation of sediment migration between grids. ST-GCN uses temporal convolutional layers to process node feature changes at different time steps (e.g., every 2 hours in the next 24 hours) to capture the dynamic migration trend of sediment over time. At the same time, it uses spatial graph convolutional layers to mine the sediment diffusion relationship between adjacent grids. For example, the high flow velocity of the grid near the inlet will drive the sediment to migrate to the downstream grid. ST-GCN can transform this relationship into feature weights through spatial convolution, which strengthens the information transmission between related grids.
[0050] The Multi-View Spatiotemporal Graph Attention Network (MST-GAT) addresses the challenge of adapting to varying dominant influencing factors of sediment in different pool grids, enabling dynamic adjustment of feature weights. During implementation, MST-GAT calculates attention weights for node features from both environmental and human flow perspectives. In densely populated grid areas (such as pool entrances and children's play areas), where hair and debris brought in by people are the primary sources of sediment, MST-GAT increases the attention weights of human flow characteristics (such as human density and historical foreign object introduction records), allowing the model to focus more on capturing the impact of human flow on sediment. In grid areas with active water flow (such as inlets, outlets, and bottom circulation zones), where water scouring and circulation are the core drivers of sediment migration, the model increases the attention weights of water flow characteristics in the environmental dimension (such as water velocity and direction), reinforcing the role of water flow in sediment distribution. Meanwhile, MST-GAT will integrate the attention weights from both perspectives with the movement trend features of historical sediment data to form the final fused attention weights, ensuring that the feature weights of each grid can match their actual dominant factors and improve the accuracy of feature extraction.
[0051] It is worth noting that the sediment prediction hybrid model embeds fluid dynamics equations and sediment motion equations, using physical laws to constrain the rationality of the prediction results. In specific implementation, the model calls the built-in Physics-InformedGNN module to first discretize the fluid dynamics equations and sediment motion equations, which match the target pool's spatial structure, into algebraic relationships between nodes and edges in a graph structure. For example, the difference in water velocity between adjacent grids is calculated based on the fluid dynamics equations and converted into adjustment coefficients for edge weights, ensuring that the sediment migration characteristic from high-velocity grids to low-velocity grids conforms to the laws of water flow. The sediment settling velocity of sediments with different particle diameters is calculated based on the sediment motion equations and converted into constraints on the settling rate parameters in the node features, avoiding unreasonable predictions that small sediment particles settling faster than large particles. Meanwhile, the sediment prediction hybrid model constructs a physical loss function, compares the predicted sediment concentration changes and migration paths with the theoretical values calculated by the physical equations, and optimizes the model parameters through backpropagation of the loss values to ensure that the final output sediment distribution strictly follows physical laws such as gravity settling and water flow migration. For example, the predicted sediment concentration in the low-lying areas of the pool bottom will be higher than that in the surrounding raised areas, which is consistent with the actual phenomenon of sediment accumulating in lower places due to gravity.
[0052] For example, the fluid dynamics equations can be the Navier-Stokes equations describing water flow, while the sediment movement equations can be the Stokes equations for calculating gravitational settling velocity and the drag formulas reflecting particle resistance. The embedded fluid dynamics equations, such as the Navier-Stokes equations, can be adapted to the pool shape, bottom slope, and inlet / outlet locations of the target pool, accurately describing the velocity, pressure changes, and trajectory of the water flow. This provides a foundation for analyzing the effect of water flow on sediment, such as calculating the water flow vector downstream of the inlet grid to support the prediction of sediment migration direction. The sediment movement equations include gravitational settling equations (such as the Stokes equations) and particle resistance formulas. The former, combined with pool water temperature and equivalent sediment particle diameter, calculates the settling velocity of different types of sediment; the latter reflects the resistance of the water body to the particles, correcting the sediment's trajectory. Both constrain the movement of sediments, ensuring that the predictions conform to physical principles such as gravity settling and water scouring, and avoiding unreasonable situations such as small particles settling faster than large particles. For example, the predicted sediment concentration in the low-lying areas of the pool bottom is made to better match the actual accumulation pattern.
[0053] In actual operation, the sediment prediction hybrid model first receives multimodal environmental data and pedestrian flow data, transforming them into node and edge features of a graph structure. Then, it extracts spatiotemporal correlation features using ST-GCN and dynamically allocates attention weights using MST-GAT. Under the constraints of the physical model, the features are then optimized and integrated. Finally, it outputs sediment distribution results corresponding to the pool grid areas, including a sediment concentration matrix (reflecting the average concentration of each grid), sediment type probability distribution (such as the proportion of silt, hair, and metal debris), and risk level (determining pollution risk based on concentration and type), providing accurate sediment distribution data for the subsequent planning of the robot's initial collection task. For example, in a community pool scenario, the model identifies dense pedestrian flow near the entrance grid, increases the weight of pedestrian flow features, and predicts a higher concentration of hair-type sediment in that area. Meanwhile, based on the direction of water flow at the inlet, it is predicted that sediment will migrate towards the grid in the middle of the pool with the water flow. Due to the slope of the pool bottom, more sediment will accumulate in the low-lying southwest corner grid. In the final output concentration matrix, the values near the inlet and the southwest corner grid are significantly higher than those in other areas, which is highly consistent with the actual sediment distribution pattern in the pool.
[0054] Step S104 above achieves accurate prediction of sediment distribution based on a hybrid model of multimodal data and sediment prediction, adapting to the physical laws of sediment distribution through multi-factor fusion. The introduction of multimodal environmental data and human flow status data comprehensively covers the main influencing factors of sediment. The model integrates spatiotemporal graph convolutional networks and multi-view spatiotemporal graph attention networks to solve the adaptation problem of different dominant factors of sediment in different regions. More importantly, the embedding of fluid dynamics equations and sediment motion equations ensures that the prediction results strictly follow physical laws, avoiding prediction biases that may occur in purely data-driven models that violate physical common sense. The final output sediment concentration matrix, sediment type probability distribution, and risk level provide a three-dimensional decision basis for concentration type risk for subsequent task planning, ensuring that sediment cleaning can accurately match the pollution level and pollution type of different grids.
[0055] As an optional embodiment, in step S104, firstly, multimodal environmental data is acquired through a sensor array deployed around and inside the target swimming pool, and pedestrian flow data is acquired through a visual recognition device. The multimodal environmental data includes pool water quality parameters, surrounding meteorological data, and pool structure data. For example, the multimodal environmental data is acquired through a sensor array deployed around and inside the pool. Meteorological sensors installed around the pool collect surrounding meteorological data such as wind force, wind direction, and air humidity. Water quality sensors installed at different depths inside the pool record water quality parameters such as water temperature, turbidity, water flow velocity, and flow direction. Simultaneously, pool structure data, including pool depth distribution, pool bottom slope, the location of the inlet and outlet, and flow rate, is acquired through laser scanning or drawing analysis. The pedestrian flow data includes real-time pedestrian density, pedestrian activity areas, pedestrian activity types, and historical records of foreign objects brought in by pedestrians. The data on the flow of people is collected by visual recognition devices (such as high-definition cameras) deployed around the pool. Image recognition technology is used to extract real-time flow density, activity areas (such as poolside rest areas and shallow water entry areas), and activity types (such as swimming and playing in the water). Combined with historical management records, records of foreign objects brought in by people at different times (such as hair, skin care product residue, dust particles brought in from the outside world, etc.) are compiled.
[0056] Subsequently, after data acquisition, preprocessing is required to construct an environmental spatiotemporal map of human traffic. This involves preprocessing the collected multimodal environmental data, human traffic status data, and historical sediment data from the pool, and constructing a spatiotemporal map of human traffic using each pool grid area as a node. Preprocessing includes cleaning outlier data (e.g., removing jump values caused by sensor malfunctions), data normalization (e.g., mapping different levels of water flow velocity and human traffic density to the same numerical range), and aligning historical sediment data (e.g., sediment concentration and type for each grid in the same period of the past) with real-time data. When constructing the spatiotemporal map, each previously defined pool grid area serves as a node in the graph. Node features integrate the environmental characteristics of that grid (e.g., local water temperature, water flow vector), human traffic characteristics (e.g., average human traffic density, main activity types), and historical sediment characteristics (e.g., average sediment concentration and common types for that grid in the same period of the past). The node features include environmental characteristics, pedestrian flow characteristics, and historical sediment characteristics of the corresponding pool grid area. Edge features are constructed based on the fluid exchange intensity, spatial distance, and indirect influence of pedestrian activity between pool grid areas. Edge weights are used to represent the degree of sediment migration correlation between pool grid areas. Specifically, the edges of the graph are constructed according to the relationships between grids. Adjacent grids have higher edge weights due to frequent water exchange and high fluid exchange intensity. Grids with close spatial distances also have relatively high edge weights. If a grid has dense pedestrian flow, it has a strong driving effect on sediment migration in surrounding grids, and the weight of the corresponding edge will also increase. Ultimately, the edge weights comprehensively reflect the degree of sediment migration correlation between grids.
[0057] Next, the ST-GCN layer of the spatiotemporal graph convolutional network in the sediment prediction hybrid model performs temporal convolution on the node features in the environmental pedestrian flow spatiotemporal map. The spatial graph convolutional layer captures the diffusion and migration relationships of sediment between adjacent pool grid areas, extracting the spatiotemporal distribution dependency features of the sediment. Specifically, the ST-GCN layer in the sediment prediction hybrid model begins processing the environmental pedestrian flow spatiotemporal map. The temporal convolutional layer processes the node features according to a preset time step (e.g., every 3 hours in the next 24 hours), capturing the dynamic changes of sediment over time, such as the impact of inlet flow rate changes on sediment migration in downstream grids. The spatial graph convolutional layer, based on edge weights, strengthens information transmission between adjacent grids. For example, in areas with a steep pool bottom slope, lower grids receive sediment migration features from higher grids through spatial convolution, thereby capturing the diffusion relationship of sediment accumulating to lower areas due to gravity. Finally, it extracts the spatiotemporal distribution dependency features of sediment that simultaneously contain temporal dynamics and spatial correlations.
[0058] Then, using the MST-GAT layer of the multi-view spatiotemporal graph attention network in the sediment prediction hybrid model, adaptive attention weights are assigned to the environmental and human flow state dimensions in the environmental human flow spatiotemporal graph. These adaptive attention weights are then fused with the movement trend features of historical sediment data to obtain the fused attention weights for the sediment. Specifically, the adaptive attention weights for human flow state features are increased in densely populated water inflow areas, while the adaptive attention weights for environmental water flow features are increased in areas with active water flow. In particular, the MST-GAT layer dynamically adjusts the feature weights. This layer calculates attention weights from both environmental and human flow dimensions. In densely populated water inflow areas, where hair and impurities brought in by human activity are the main sources of sediment, MST-GAT increases the adaptive attention weights for human flow features (such as human flow density and foreign object introduction records), making the model more focused on the impact of human flow on sediment. In areas with active water flow, such as inlets and outlets, the scouring and driving force of the water flow is the dominant factor in sediment migration. In this case, the adaptive attention weight of environmental characteristics (such as water flow velocity and direction) will be increased. Subsequently, the model integrates the weights of these two dimensions with the historical sediment movement trend characteristics (such as sediment in a certain grid often migrating southeast with the water flow) to form a fused attention weight that takes into account both regional characteristics and historical patterns.
[0059] Finally, based on the spatiotemporal distribution dependency features of the sediment and the fusion attention weights, the sediment distribution corresponding to the pool grid area is predicted. The sediment distribution includes a sediment concentration matrix, sediment type probability distribution, and sediment risk level corresponding to the pool grid area. Each element in the sediment concentration matrix represents the average sediment concentration of the corresponding pool grid area over a preset future time period. Specifically, the sediment prediction hybrid model predicts the sediment distribution based on the spatiotemporal distribution dependency features of the sediment and the fusion attention weights. A fully connected layer maps the fusion features to a sediment concentration matrix corresponding to the pool grid, where each element corresponds to the average sediment concentration of the grid over a preset future time period. Simultaneously, a classification layer outputs the sediment type probability distribution for each grid (e.g., the probability of the proportion of silt, hair, and metal debris), and combines concentration and type to determine the risk level (e.g., grids with high concentrations and sharp debris have a high risk level).
[0060] Taking a community swimming pool as an example, the pool has a shallow inlet area (high pedestrian traffic), a deep water area (slower flow), an inlet (located on the northeast side), and an outlet (located on the southwest side). During data collection, the visual equipment in the inlet area captured high pedestrian density, mostly children playing in the water. The inlet sensor recorded a strong water flow moving southwest. Due to its low slope, the southwest corner of the pool bottom is prone to sediment accumulation according to historical data. When constructing the spatiotemporal map of pedestrian traffic, the pedestrian characteristics of the grid in the inlet area are prominent, while the water flow characteristics of the grid around the inlet are significant. Furthermore, the grids around the inlet and the southwest side have higher edge weights due to the influence of water flow. The ST-GCN layer captures the temporal characteristics of sediment migration to the southwest caused by the water flow at the inlet, as well as the spatial correlation of the southwest corner grid receiving sediment from surrounding areas due to its low-lying location. The MST-GAT layer increases the weight of pedestrian characteristics in the inlet area, predicting a high proportion of hair-like sediment in this area. The weight of water flow characteristics is increased in the inlet area to strengthen its influence on downstream grids. In the final output concentration matrix, the concentration values in the water inlet area and the southwest corner grid are relatively high. The type distribution shows that the water inlet area is mainly composed of hair, while the southwest corner is mainly composed of silt. The risk level of both is marked as medium to high, providing a clear basis for subsequent cleaning tasks.
[0061] Optionally, assuming the fluid dynamics equations embedded in the sediment prediction model include the Navier-Stokes equations, based on this assumption, before acquiring multimodal environmental data and pedestrian flow data around the target pool and predicting the sediment distribution within a preset future time period using the sediment prediction hybrid model, the Physics-Informed GNN module in the sediment prediction hybrid model can be invoked to discretize the Navier-Stokes equations and sediment motion equations matching the spatial structure of the target pool into an algebraic relationship between nodes and edges. The physical relationships influencing sediment motion in the Navier-Stokes equations and sediment motion equations are transformed into correlations between the physical and numerical characteristics of nodes, adapting the physical laws to the graph structure data format of the target pool's spatial structure. Furthermore, a physical loss function is used to constrain the sediment distribution output of the sediment prediction hybrid model to conform to the physical laws, ensuring that the sediment migration process in the sediment distribution conforms to the water flow and gravity settling laws within the target pool.
[0062] Specifically, before performing predictions using the sediment prediction mixing model, the built-in Physics-Informed GNN module needs to be invoked to adapt and integrate the physical equations with the graph structure. During implementation, this module first matches the corresponding Navier-Stokes equations (the core equations describing fluid motion) and sediment motion equations (equations covering gravity settling, particle resistance, etc.) based on the specific spatial structure of the target pool (such as pool shape, depth distribution, inlet and outlet locations, and bottom slope). For example, for pools with a significant bottom slope, the parameters of the gravity term in the equations are adjusted to accommodate the change in water flow direction caused by the slope. For pools with stable inlet flow velocities, the coefficients of the momentum term in the Navier-Stokes equations are optimized to match the actual water flow conditions. Subsequently, the module discretizes these continuous physical equations into algebraic relationships between nodes and edges in a graph structure. Each pool grid region is considered as a discrete node. The algebraic relationships between nodes correspond to the calculation formulas for physical quantities such as local water flow velocity, sediment concentration, and particle diameter in the equation. For example, the sediment settling velocity of a certain node can be directly calculated from the characteristics of that node, such as water temperature and equivalent particle diameter, through the discrete sediment motion equation. The edges between grids correspond to the interaction terms of water flow exchange and sediment migration in the equation. For example, the algebraic relationship between adjacent nodes reflects the influence of the water flow velocity of the upstream node on the sediment migration of the downstream node. By decomposing the continuous equation into an algebraic form of node local calculation and edge interaction calculation, physical laws can be integrated into the feature propagation process of the graph neural network.
[0063] The Physics-Informed GNN module described above is responsible for embedding physical laws into the model to prevent predictions from deviating from reality. The module first discretizes the Navier-Stokes equations (the core equations describing fluid motion) and sediment motion equations (describing the motion of sediments in fluids under the influence of gravity, buoyancy, and water flow thrust), which match the target pool's spatial structure: transforming continuous equations into algebraic relationships based on nodes and edges in a spatiotemporal graph. Optionally, the physical relationships influencing sediment motion in the Navier-Stokes equations and sediment motion equations are further transformed into correlations between the physical and numerical characteristics of nodes, adapting the physical laws to the graph-structured data format of the target pool's spatial structure. For example, the relationship between water flow velocity and sediment migration rate in the Navier-Stokes equations and sediment motion equations is transformed into a numerical correlation between the water flow velocity characteristic of a node and the sediment concentration change rate of adjacent nodes, adapting the physical laws to the graph-structured data format. The module then constructs a physical loss function, which calculates the deviation between the model's current output of sediment distribution (such as sediment migration direction and concentration change in a certain grid) and the results derived from the physical equations. For example, if the model predicts that sediment in a certain grid migrates against the direction of water flow, or if the sedimentation trend caused by gravity is not reflected in deep water areas, the loss function will generate a large deviation value. This loss value works in conjunction with the model's prediction loss (such as the error between predicted concentration and actual concentration) to adjust the parameters of the ST-GCN and MST-GAT layers through backpropagation, ensuring that the model output always conforms to the laws of water flow and gravity sedimentation, and avoiding results that violate physical common sense, such as rapid diffusion of sediment in still water areas or faster sedimentation of lighter sediments than heavier sediments.
[0064] After discretizing the equations, the model output needs to be constrained by a physical loss function to ensure that the prediction results conform to actual physical laws. During implementation, the physical loss function first calculates the theoretical values of sediment migration and settling in each grid region based on the algebraic relationships of the discretized nodes and edges. For example, based on the edge algebraic relationships after discretizing the Navier-Stokes equations, the theoretical value of the sediment migration amount that the downstream grid of the inlet should receive is calculated. Based on the node algebraic relationships after discretizing the sediment motion equations, the theoretical settling rate of sediment in the low-lying grids at the bottom of the pool is calculated. Next, the model's predicted sediment concentration changes and migration paths are compared with these theoretical values, and the deviation between the two is calculated, such as the difference between the predicted sediment migration amount of a certain grid and the theoretical value. This deviation is included as a loss term in the model's total loss function. During model training and prediction iterations, parameters are continuously optimized through backpropagation to reduce the deviation between the predicted values and the physical theoretical values, thereby avoiding problems that might arise from purely data-driven models that violate physical common sense. For example, to prevent predictions that do not conform to the laws of gravity settling or water flow, such as small particles settling faster than large particles, sediment migrating against the direction of water flow, or sediment concentration in higher grids at the bottom of the pool being higher than in lower grids, it is necessary to ensure that the sediment distribution in each grid conforms to the actual physical processes such as water flow and gravity accumulation in the pool.
[0065] Taking a rectangular swimming pool in a community as an example, the pool has an inlet on the northeast side (water flows towards the outlet on the southwest side), and the pool bottom slopes gently from northeast to southwest (slightly lower on the southwest side). When calling the Physics-Informed GNN module, it matches and adapts the Navier-Stokes equations to the rectangular pool and the gentle slope structure, focusing on adjusting the gravity component parameters along the slope direction in the equations, and selecting sediment movement equations that include the influence of the slope. During discretization, each grid in which the pool is divided is treated as a node. The node algebraic relationship includes the gravity settling rate calculated based on the pool bottom height and the particle suspension capacity calculated based on the local water flow velocity. The edge algebraic relationship reflects the positive correlation between the water flow velocity of the upstream grid (northeast side) and the sediment migration of the downstream grid (southwest side). The physical loss function calculates, based on these algebraic relationships, the theoretical value that the downstream grid on the southwest side should receive more migrated sediment than the upstream grid on the northeast side, and that the sediment settling rate of the low-lying grid on the southwest side should be higher than that of the high-slope grid on the northeast side. During model prediction, if the sediment concentration in a certain northeastern high-slope grid is higher than that in a southwest low-lying grid in the preliminary prediction results, the physical loss function will capture this deviation that does not conform to the law of gravity. By adjusting the model parameters through backpropagation, the final output sediment distribution will show a reasonable result that the sediment migration of the grid downstream of the inlet increases and the sediment concentration of the southwest low-lying grid is the highest, which is completely in line with the physical law of water flow and gravity sedimentation.
[0066] Step S105: Based on the distribution of fallen leaves and sediment, an initial collection task for the target robot is generated for the spatial structure of the target pool. In this embodiment, the initial collection task includes a starting point, a covered water area, and an initial collection path.
[0067] Step S105 above combines the distribution of fallen leaves and sediment with the pool structure to generate an initial collection task, achieving efficient task planning that matches needs and capabilities. This step uses two prediction results as core inputs, and by integrating high-probability grids of fallen leaves and high-concentration or high-risk grids of sediment, it clarifies the core cleaning area and the regular monitoring area, avoiding the blind expansion of the cleaning range. At the same time, the initial collection path includes a starting point that prioritizes the water area near the core area and focuses on high-risk areas. The initial collection path is adapted to the pool structure, ensuring that the robot can quickly enter high-priority operations and reducing the risk of collision by avoiding fixed facilities in the pool. In addition, the path planning focuses on covering key areas to reduce ineffective movement, setting an efficient basic action framework for the robot's subsequent operations, avoiding the subjectivity and inefficiency of traditional manual path planning, and improving the standardization and efficiency of the initial operation.
[0068] As an optional embodiment, in step S105, the leaf probability matrix in the leaf distribution, the sediment concentration matrix in the sediment distribution, and the sediment risk level are correlated grid by grid to construct a comprehensive evaluation matrix. Priority rules are set based on the comprehensive evaluation matrix, with priorities from high to low as core collection areas, single core areas, potential risk areas, and routine monitoring areas. The adaptive weights of each pool grid area are dynamically adjusted according to the pool usage scenario. Further optionally, pool grid areas where the leaf probability in the leaf probability matrix is greater than a preset leaf threshold, or where the sediment concentration in the sediment concentration matrix is greater than a preset concentration threshold, or where the sediment risk level is high, are marked as core collection areas. Single core areas are grids that only meet the high leaf probability or high sediment concentration criteria, with a lower pollution level and lower priority than core collection areas. Potential risk areas are grids with medium leaf probability and sediment concentration and a medium risk level, with a lower priority. Routine monitoring areas are the remaining unclassified grids, with the lowest priority. At the same time, the priority rules will dynamically adjust the adaptive weight of each grid according to the pool usage scenario. For example, when the pool is about to be opened for children, the weight of potential risk areas near the entrance will be increased to ensure that the area is given priority in the detailed cleaning scope.
[0069] Furthermore, considering the spatial structure of the target pool, the starting point is preferentially set near the geometric center of the core collection area, or at the poolside location with the smallest sum of straight-line distances to multiple core collection areas, to ensure that the target robot immediately enters a high-priority operation state after startup. Optionally, the spatial structure of the target pool includes at least one of the following: a robot docking position, an inlet location, an outlet location, and an unobstructed passageway. This step requires consideration of the target pool's spatial structure, including information such as the robot docking position, inlet location, outlet location, and unobstructed passageway. If the core collection areas are concentrated in a certain area, the starting point will be set near the geometric center of that area, facilitating immediate cleaning operation after robot startup. If the core collection areas are scattered in different locations in the pool, the starting point will be selected from the poolside location with the smallest sum of straight-line distances to these core collection areas. This location must also be close to an unobstructed passage to avoid delays in high-priority operations due to path obstruction after the robot starts. For example, if the core collection areas of a pool are located near the northeast poolside and the southwest entrance, the starting point will be selected from the poolside location in the middle of the north side of the pool, which is close to both core areas and can be quickly reached through an unobstructed passage.
[0070] Next, the coverage area for the initial collection task is delineated based on priority. The delineation logic strictly follows the priority order, ensuring complete coverage of all core collection areas and potential risk areas, avoiding omissions of highly or moderately polluted areas. For regular monitoring areas, coverage is included by sampling every preset number of grids, reducing unnecessary work areas and lowering robot energy consumption. The initial collection task covers all core collection areas and potential risk areas, and samples regular monitoring areas every preset number of grids, avoiding grids containing fixed facilities within the pool. These fixed facilities include ladders, underwater lights, and drains. During the delineation process, grids containing fixed facilities such as ladders, underwater lights, and drains are avoided. These facilities not only obstruct robot movement but may also cause collisions and damage to cleaning equipment, affecting operational efficiency. For example, if a pool has three ladders on its east side, the grids within a 1-meter radius of the ladders will be excluded during the coverage area planning, and only the surrounding grids will be cleaned.
[0071] Next, an improved A* path optimization algorithm is employed, with the objective functions of minimizing the total path length, optimizing the core area access order, and minimizing the number of turns, to generate continuous path nodes as the initial collection path. Each path node contains the center coordinates of each core collection area and the sampled coordinates of potential risk areas, and the straight-line distance between adjacent nodes does not exceed the maximum effective operating radius of the target robot in a single movement. The route is planned in the direction of the pool water flow to reduce the impact of the pool water flow on the stability of the target robot's operation. The pool water flow direction is based on the water flow vector output by the sediment prediction hybrid model. Specifically, the route planning proceeds in the direction of the pool water flow, which is derived from the water flow vector output by the sediment prediction hybrid model. Operating in the direction of the water flow reduces the impact of the water flow on the robot's stability and avoids positional deviations caused by moving against the current. For example, if the pool water flows from the northwest inlet to the southeast outlet, the initial collection path will start from the northwest core area, sequentially passing through the southeast core area and potential risk areas in the direction of the water flow, and finally covering the sampled regular monitoring area.
[0072] Furthermore, corresponding collection device parameters are matched for different grid areas in the initial collection path. In the core collection area, if the main pollutant is fallen leaves, the floating debris collection chamber is activated; if the main pollutant is sediment, the bottom suction device is activated. Potentially risky areas employ a dual-mode backup of both the floating debris collection chamber and the bottom suction device. Based on the robot's single-operation capacity, the covered water area is divided into a preset number of continuous task segments, with each segment's duration not exceeding the target robot's single-operation endurance limit. For example, corresponding collection device parameters are matched for different grid areas in the initial collection path. In the core collection area, if the comprehensive evaluation matrix determines that the area is mainly composed of fallen leaves, the floating debris collection chamber is activated to focus on collecting surface leaves. If the main pollutant is sediment, especially silt and hair accumulated at the bottom of the pool, the bottom suction device is activated. Potentially risky areas, due to the uncertainty of the pollution type, employ a dual-mode backup of both the floating debris collection chamber and the bottom suction device to ensure timely cleaning regardless of whether fallen leaves or sediment are encountered. At the same time, the water area to be covered will be divided into several continuous task segments based on the robot's single-operation capacity. The operation time of each task segment will not exceed the single-operation endurance limit of the target robot, so as to avoid the robot interrupting the task due to insufficient power during operation. For example, if the single-operation endurance limit of a robot is 60 minutes, and the overall operation of the covered water area requires 90 minutes, it will be divided into two task segments. After the first segment of operation lasts for 45 minutes, the robot will return to the docking position to recharge before starting the second segment of operation.
[0073] Finally, through grid coverage calculation and route rationality verification, the grid coverage calculation focuses on verifying the coverage of the core collection area to ensure that the coverage of the core collection area reaches 100%, and the coverage of potential risk areas is not lower than the preset standard. If there are uncovered core grids or unreasonable route segments, the process jumps to the step of delineating the coverage area of the initial collection task based on priority, and repeats this step to adjust the initial collection task, outputting the initial collection task including the starting point coordinates, the list of coverage area grids, the initial collection path node sequence, the task segment division, and the device parameter configuration. The route rationality verification checks whether there are duplicate paths or dead ends that prevent the robot from moving. If there are uncovered core grids or unreasonable road segments, the process returns to the previous steps for adjustment, such as adding uncovered core grids to the coverage area or replanning the route node sequence to eliminate duplicate paths. After multiple rounds of verification and confirmation, the final output includes the starting point coordinates, the list of coverage area grids, the initial collection path node sequence, the task segment division, and the device parameter configuration, providing clear guidance for the robot's subsequent operations.
[0074] Taking a community outdoor swimming pool as an example, the pool is surrounded by many trees. The northeast side of the pool, due to its proximity to trees and high daily foot traffic, has a high probability of fallen leaves and high sediment concentration, thus a high-risk area and is designated as a core collection area. The southwest side of the pool, simply because of its proximity to trees, has a high probability of fallen leaves but a lower sediment concentration, and is designated as a single core area. The central area of the pool has a moderate probability of fallen leaves and sediment concentration, a medium-risk area, and is considered a potential risk area. The deep water area of the pool is far from pollution sources and is a routine monitoring area. After constructing a comprehensive assessment matrix, the priority of each area was determined according to priority rules. Additionally, because the pool offers children's swimming lessons on weekend mornings, the adaptive weight of the potential risk area near the entrance was temporarily increased. The starting point was selected near the geometric center of the northeast core collection area, a location close to the robot's docking position, and with an unobstructed passageway allowing the robot to quickly start its work. The covered water area completely includes the northeast core area, the southwest single core area, and the central potential risk area. The routine monitoring area was sampled every two grids, avoiding the grids containing the four escalators and two underwater lights within the pool. The initial collection path, generated using an improved A* algorithm, follows the pool's water flow from northeast to southwest, sequentially passing the center of the northeast core area, the sampling coordinates of the central potential risk area, and the center of the southwest single core area. The distance between adjacent nodes is within the robot's single movement range. For the northeast core area, due to the large amount of fallen leaves and sediment, the bottom suction device is prioritized based on the real-time pollution percentage, switching to the floating debris collection chamber after the sediment is cleared. Only the floating debris collection chamber is used in the southwest single core area. A dual-mode backup is used for the central potential risk area. The robot has a single-run time of 60 minutes and a total operating time of 75 minutes, therefore divided into two task segments: a 40-minute segment and a 35-minute segment. After grid coverage calculation, 100% coverage of the core area is confirmed, with no route repetition or dead ends. The final output is a complete initial collection task, ensuring the robot can efficiently complete the cleaning.
[0075] Step S106: During the initial collection task performed by the target robot, the initial collection path in the initial collection task is dynamically adjusted based on the monitoring image data of the surrounding water area to obtain a real-time collection task, and the real-time collection task is executed to remove temporarily appearing floating objects and sediments in the surrounding water area. For example, Figure 2 The cleaning scenario shown demonstrates that the target robot can remove leaves that temporarily drift in from the left and sediment from the bottom of the right side, and remove the sediment outside the target pool.
[0076] Step S106 above dynamically adjusts the initial collection path during the initial collection task performed by the target robot. This effectively compensates for the shortcomings of the initial prediction, which cannot cover temporary emergencies. It achieves a closed-loop cleaning system with forward-looking planning and real-time response. On the one hand, it solves the problem of sudden pollution not covered by the initial prediction by real-time monitoring and identification of temporary floating objects or sediments. On the other hand, the dynamic adjustment mechanism includes a complete logic that includes trajectory prediction based on the characteristics of floating or settling objects, calling the corresponding model path optimization, inserting temporary path points, A* algorithm rearranging the order, secondary confirmation, and visual recognition to verify the existence of objects. This ensures the timely removal of temporary objects and balances the efficiency of the initial collection task with constraints such as temporary path points not exceeding the robot's maximum movement range and controllable total operation time increment. It avoids the overall operation rhythm from being chaotic due to dynamic adjustment and ultimately achieves high-efficiency real-time cleaning without omissions.
[0077] As an optional embodiment, in step S106, during the initial collection task performed by the target robot, the initial collection path in the initial collection task is dynamically adjusted based on the monitoring image data in the surrounding water area to obtain a real-time collection task, and the real-time collection task is executed to remove temporarily appearing floating objects and sediments in the surrounding water area. This includes: real-time acquisition of monitoring image data in the water area surrounding the target robot; identification of potential collection objects in the surrounding water area based on the monitoring image data; wherein potential collection objects include at least temporarily appearing floating objects and sediments; calling the trajectory prediction model of the corresponding type based on the type of potential collection object, and obtaining the motion trajectory of the potential collection object through the trajectory prediction model; dynamically adjusting the initial collection path in the initial collection task based on the motion trajectory to obtain a real-time collection task, and executing the real-time collection task to remove or confirm temporarily appearing potential collection objects in the surrounding water area.
[0078] Specifically, during the initial collection task performed by the target robot, the core of dynamically adjusting the initial collection path is to respond in real time to temporarily appearing floating objects and sediments, ensuring the comprehensiveness and timeliness of cleaning. This process begins with real-time data acquisition. The robot's high-definition underwater camera and water surface image sensor continuously capture images of the surrounding water, typically generating a monitoring image every 0.5 seconds. This data, combined with data from the robot's onboard water quality sensors (such as localized turbidity changes), forms multi-source monitoring data, providing rich evidence for subsequent object identification. This data is transmitted back to the control system in real time via a wireless transmission module, ensuring the timeliness of information processing. For example, when a pool robot is cleaning the core area on the northeast side, the camera captures images of the water surface and pool bottom within a 3-meter radius every 0.5 seconds, simultaneously recording changes in turbidity values in that area.
[0079] When identifying potential collection objects based on monitoring image data, the system calls a pre-trained image recognition model. This model is trained on a large amount of labeled data (such as samples of fallen leaves, plastic bottles, and clumps of mud under different lighting and water flow conditions). It can accurately distinguish between temporarily appearing floating objects (such as leaves blown in by the wind or plastic cups dropped by tourists) and sediment (such as suddenly gathered clumps of mud or hair), while eliminating the influence of fixed pool facilities (such as reflections of escalators or interference from underwater lighting). During the recognition process, the model outputs the object's category, size, current coordinates, and movement status (such as stationary sediment or floating objects moving with the water flow). For example, when the robot is operating in a single core area on the southwest side, the image recognition model detects a circular floating object with a diameter of about 10 centimeters, identifies it as a plastic bottle, and locates it at 1.2 meters southeast of the robot, slowly moving westward with the water flow.
[0080] After determining the type of potential collection object, the corresponding trajectory prediction model is invoked to obtain its movement trajectory. The trajectory prediction model for floating objects is mainly based on a Long Short-Term Memory (LSTM) network. Because floating objects are significantly affected by water flow and wind, the model training data includes historical floating object trajectories (such as the movement paths of fallen leaves under different wind and water flow speeds) and corresponding environmental parameters (real-time water flow vectors and wind speed), enabling it to learn the dynamic movement patterns of floating objects as the environment changes. The trajectory prediction model for sediment combines gated recurrent units (GRUs) with physical rules. Because sediment mostly moves on the bottom of the pool and is more affected by gravity, pool bottom slope, and local water flow scouring, the model incorporates pool bottom slope data and the calculation logic of water flow friction on the pool bottom, making the prediction more consistent with actual settling and migration trends. For example, when a plastic bottle (floating object) is identified, the trajectory prediction model of the floating object is called. The current water flow speed (0.3 m / s westward) and wind force (light breeze eastward) are input. The model outputs the trajectory of the plastic bottle in the next 10 seconds. It first moves slowly westward, and its speed slows down after 5 seconds due to the influence of the light breeze. Finally, it reaches a position 0.8 meters west of the robot after 10 seconds.
[0081] When dynamically adjusting the initial collection path based on the predicted motion trajectory, the system calculates the deviation between the future position of the potential collection object and the robot's current path. If the deviation exceeds the robot's effective operating range (e.g., the robot's current route is a straight westward line, while the plastic bottle will appear 0.5 meters north of the route in 10 seconds), a path correction mechanism is activated. The correction logic prioritizes minimizing deviation from the original route. By fine-tuning the robot's turning angle and movement speed, it can quickly return to the original path after intercepting the potential object, avoiding excessive deviation that could affect the cleaning progress of the core area. For example, regarding the aforementioned plastic bottle, the system calculates that the robot only needs to slightly adjust its direction northward by 15 degrees and maintain its original speed for 3 seconds to include the plastic bottle in the collection range before it reaches the predicted position. After collection, it can then slightly adjust its direction southward by 15 degrees to return to the original route. The entire adjustment process only adds 2 meters to the path length, having a minimal impact on the overall task duration.
[0082] For identified sediment (such as suddenly clumps of silt), which move slowly and tend to slide along the bottom slope of the pool, the trajectory prediction model will output its settling position within the next 30 seconds. The system will then adjust the timing of the robot's bottom suction device activation and add a node at that settling position to the path to ensure accurate removal when passing over it. If the potential object is identified as stationary sediment (such as impurities that suddenly accumulate due to stagnant water flow), the point will be directly inserted into the original path as a temporary node, and the robot will continue along the original route after cleaning.
[0083] Taking a hotel swimming pool as an example, when performing the initial collection task, the robot cleans the core area along the direction of the water flow (from north to south). Real-time monitoring images identify a large fallen leaf (temporary floating debris) on the north side of the water surface, moving south with the current. The trajectory prediction model, combined with the current water flow speed (0.2 m / s), predicts that the leaf will reach a point 1 meter in front of the robot in 20 seconds. It is determined that no significant path adjustment is needed; maintaining the original direction and speed will allow the robot to capture the leaf upon arrival via the floating debris collection bin. Subsequently, while cleaning a potentially hazardous area, the bottom camera detects a clump of hair sediment approximately 20 cm in diameter. The trajectory prediction model, combined with the pool bottom slope (sloping south), predicts that it will slowly slide 0.5 meters south within one minute. This sliding endpoint is added to the original path as a temporary node. When the target robot reaches this location, the pool bottom suction device is activated to remove it. The robot then continues along the original route to complete the remaining cleaning tasks. The entire process handles temporary objects without significantly affecting the efficiency of the initial collection task.
[0084] Optionally, based on the type of the potential collection object, a trajectory prediction model of the corresponding type is invoked, and the motion trajectory of the potential collection object is obtained through the trajectory prediction model. This includes: classifying potential collection objects into floating objects and settling objects based on the visual features of the monitoring image data and the characteristics of the pool environment; wherein, the visual features include shape, density, and suspension state; floating objects include at least one of the following substances with a density less than water: temporarily fallen leaf fragments, plastic impurities, foam; the motion of floating objects is mainly affected by water flow speed, water flow direction, and wind force around the pool; settling objects include at least one of the following substances with a density not less than water: silt particles, hair clumps, metal fragments; the motion of settling objects is affected by gravity settling, water flow scouring at the bottom of the pool, and circulation at the pool inlet or outlet. Based on the classification results, the corresponding pre-trained trajectory prediction model is invoked. For floating objects, a spatiotemporal fluid coupled trajectory model is invoked. This model is constructed based on the spatiotemporal graph convolutional network ST-GCN and simplified fluid dynamics equations. Input features include the initial position coordinates of the floating object collected by multi-source sensors, the water flow vector of the pool grid area, surrounding wind force and direction data, pre-calibrated pool boundary reflection coefficients, and historical motion trajectory samples of similar floating objects. The multi-source sensors for floating objects include visual recognition devices, underwater flow velocity sensors, and miniature meteorological sensors. For settling objects, a settling trajectory model is invoked. This model is based on the sediment prediction hybrid model and incorporates gravity settling equations and particle resistance formulas. Input features include the initial suspension height of the settling object, equivalent particle diameter, pool water temperature, local water flow velocity, pool bottom slope, and historical sediment settling rate data collected by multi-source sensors. The multi-source sensors for settling objects include underwater monitoring devices, visual recognition devices, underwater temperature sensors, flow velocity sensors, and laser rangefinders. Using the spatiotemporal fluid coupling trajectory model or the sedimentation trajectory model, motion trajectory data of potential collection objects is generated in units of time steps within a preset future period. The motion trajectory data includes the predicted position coordinates, motion speed magnitude, and direction vector of each time node of the potential collection object.
[0085] The fluid dynamics equations include simplified fluid dynamics equations. These simplified equations are derived from classical fluid dynamics equations (such as the Navier-Stokes equations) by specifically simplifying them based on the semi-enclosed, relatively stable environment of a swimming pool. The core function is to quantify the relationship between water flow, wind force, and the motion of floating objects. Furthermore, the simplification of classical fluid dynamics equations is based on the fact that there is no strong turbulence in the pool area and the flow velocity is mostly in the low Reynolds number range. Therefore, the complex turbulent viscous and nonlinear inertial terms in the original equations are ignored, retaining only the viscous force and pressure gradient terms directly related to the motion of floating objects, while incorporating corrections for the effect of wind on the water surface. Wind force and direction data around the pool are converted into water surface shear stress and superimposed on the water flow velocity vector calculation, forming a local flow field calculation model adapted to floating objects (such as leaf fragments and plastic debris). In the spatiotemporal fluid coupled trajectory model, the simplified fluid dynamics equations are used to calculate the magnitude and direction of the thrust of water flow on floating objects in different grid regions, serving as a physical constraint term when the ST-GCN layer learns the spatiotemporal correlation characteristics, preventing the model prediction from deviating from the laws of water flow action.
[0086] The gravity settling equation can be the Stokes settling equation, applicable to low-velocity, small-particle scenarios in swimming pools, used to calculate the theoretical settling velocity of settling objects (such as silt particles and hair clumps) under gravity. The particle drag formula can be a drag force formula, used to quantify the resistance of water to particles during settling and correct the deviation between the actual settling velocity and the theoretical value. The above two together constitute the physical basis of the settling trajectory model. The gravity settling equation is applicable only if the Reynolds number Re of the settling object is less than 1 (which is met by the slow settling velocity and small particle diameter of silt and hair clumps in swimming pools), while the particle drag formula adjusts the drag force coefficient according to the shape of the settling object (such as approximately spherical silt particles and irregular aggregates of hair clumps).
[0087] For example, in the steps described above, at a community outdoor swimming pool, when the target robot performed its initial collection task, its onboard high-definition vision equipment and water quality sensors worked together to capture two potential collection objects. One object was located on the north side of the pool surface, appearing as thin, fragmented flakes that remained suspended on the surface without sinking. Based on the density characteristics of the pool water, its density was determined to be less than water, and it was identified as leaf fragments brought in by a gust of wind. According to the classification rules based on visual characteristics and environmental characteristics, it was categorized as a floating object. The other object was located approximately 0.6 meters underwater on the south side of the pool, appearing as a loosely tangled clump that slowly moved towards the bottom. Its density was not less than water, and it was identified as a clump of hair brought in by a swimmer, categorized as a settling object.
[0088] For the leaf debris on the north side, a spatiotemporal fluid coupled trajectory model was invoked. Inputs included the initial coordinates of the leaf debris (center point of the grid in the middle of the water surface on the north side of the pool), the current water flow vector of the north grid area (flowing generally southeast), the real-time wind force and direction around the pool (gentle southeast wind), the boundary reflection coefficient of the north wall of the pool (considering the pool wall's blocking and rebound effect on the water flow and floating objects), and historical trajectory samples of similar leaf debris under the same water flow and wind conditions (in the past, during southeast winds, the north-side leaves mostly drifted southeast with the water flow and slightly rebounded upon encountering the east wall of the pool). The model, using a time step of 10 minutes, calculated that the leaf debris would steadily move with the southeast water flow, and with the assistance of the southeast wind, its trajectory would slightly shift southward, eventually approaching the water surface near the southeast wall of the pool after 6 minutes.
[0089] For the hair clump on the south side, a settling trajectory model was invoked, inputting its initial suspension height (0.6 meters underwater), the equivalent diameter of the hair clump (calculated based on the average entanglement size of similar hair clumps), the current pool water temperature (26℃, normal temperature), the local water flow velocity in the south grid area (slow flow velocity along the pool bottom towards the southwest), the slope of the pool bottom on the south side (slightly inclined towards the southwest), and historical settling rate data of similar hair clumps at similar water temperatures and pool bottom slopes (in the past, at 26℃, the hair clumps settled to the pool bottom at approximately 0.1 meters per minute). Combining these characteristics, it was predicted that the hair clump would continue to settle to the pool bottom under gravity, while being scourd by the slow southwest-oriented pool bottom water flow, it would slowly shift towards the southwest during the settling process, eventually landing on the south-southwest side of the pool bottom after 8 minutes.
[0090] Optionally, when invoking the spatiotemporal fluid coupled trajectory model, the initial position coordinates of the floating objects are determined by the visual recognition equipment (such as a high-definition water surface camera) mounted on the pool and robot. First, the visual equipment can acquire real-time monitoring images containing the floating objects. Then, a pre-trained object detection algorithm (such as the YOLO series algorithms) can be used to extract the pixel contours of the objects in the images. Finally, combined with the preset physical coordinate system of the pool grid area (the actual physical coordinates of each grid vertex in the pool have been laser-calibrated during system initialization, such as the XY axis coordinates in meters with the northwest corner of the pool as the origin), the actual physical coordinates of the object's center point, i.e., the initial position coordinates, can be calculated through the mapping relationship between pixel coordinates and physical coordinates (such as the pre-calibrated "every 100 pixels corresponds to 0.5 meters of physical distance").
[0091] The water flow vector of the pool grid area is obtained through underwater velocity sensors (such as ultrasonic current meters) deployed in each grid of the pool. The sensors are evenly distributed according to the grid division density (e.g., at least one sensor is deployed in each grid), and collect the velocity (m / s) and direction (with true north as 0° and clockwise increasing angle values, such as 30° representing northeast-northeast) of the water flow in the grid in real time. The collected data is filtered (e.g., Kalman filtering) to remove noise and is directly used as the water flow vector of the grid area. If some grids do not have sensors directly deployed, the flow vector can be calculated using linear interpolation based on the velocity data of adjacent grids to ensure that each grid has corresponding water flow vector data.
[0092] Surrounding wind speed and direction data are collected using miniature meteorological sensors (such as integrated anemometers) permanently installed around the pool. The sensors should be installed at a height of 1.5-2 meters (to avoid obstruction from ground obstacles). They collect real-time data on wind speed (in meters per second) and direction (expressed as angles or 16 azimuths, e.g., 135° for southeast wind). The data collection frequency is consistent with the time step of the trajectory prediction (e.g., one time step every 10 seconds) to ensure the data reflects current and short-term wind speed and direction changes in real time. If it is necessary to predict wind speed and direction within a preset time period, local short-term weather forecast data and historical data on similar weather patterns can be used for supplementary corrections to ensure the timeliness and accuracy of the data input to the model.
[0093] The pool boundary reflectance coefficient is pre-calibrated during system initialization. A base coefficient is set based on the actual material (e.g., smooth ceramic tile, rough concrete, glass curtain wall) and surface shape (right-angled edges, curved edges) of the pool boundary. Smooth ceramic tile boundaries, due to their strong reflectivity towards floating objects (e.g., fallen leaves), have a reflectance coefficient calibrated to 0.8-0.9. Rough concrete boundaries, with weaker reflectivity, are calibrated to 0.3-0.5. Curved boundaries are fine-tuned according to the curvature direction (the reflectance coefficient of concave curved edges is slightly lower than that of convex curved edges, with a difference of approximately 0.1). After calibration, the pool boundary is segmented according to grid regions, and the reflectance coefficient of each segment is stored. When calling the model, the reflectance coefficient value of that segment is directly retrieved based on the boundary position corresponding to the grid where the floating object is located.
[0094] Optionally, when calling the settling trajectory model, the initial suspension height of the settling object is obtained through underwater monitoring equipment. If an underwater camera is used, underwater images containing the settling object are first acquired. The object's outline and the pool bottom outline are extracted using an image segmentation algorithm. The vertical pixel distance between the two in the image is calculated. Then, combined with the depth calibration parameters of the underwater image (e.g., 0.3 meters of actual depth per 100 pixels, calibrated by a laser rangefinder during system initialization), the actual height of the object from the pool bottom, i.e., the initial suspension height, is calculated. If an ultrasonic ranging sensor (installed on the pool bottom or underwater fixed bracket) is used, the vertical distance between the sensor and the object is directly measured. Then, the sensor's own installation depth is subtracted (e.g., if the sensor is installed 0.2 meters above the pool bottom, the measured distance is 0.5 meters, then the initial suspension height is 0.3 meters), ensuring that the data directly reflects the actual suspension state of the object.
[0095] The equivalent diameter of particles is determined through visual recognition and image analysis. For single particle objects such as silt particles and metal debris, clear two-dimensional images of the object are acquired by underwater vision equipment. The particle outline is extracted using an edge detection algorithm, and the equivalent circular diameter of the outline (i.e., the diameter of a circle with the same area as the particle outline) is calculated as the equivalent diameter of the particle. For irregular aggregates such as hair clumps, images are acquired from multiple angles (e.g., once every 30°, for a total of 6 acquisitions). The equivalent diameter of the aggregate in each image is calculated, and the average value is taken as the final equivalent diameter of the particle, reducing errors caused by the shooting angle.
[0096] Pool water temperature is collected using underwater temperature sensors distributed throughout the pool. The sensors are arranged with a grid-based density (e.g., one sensor is shared by every two adjacent grids), collecting real-time water temperature data (°C) at their location. The collection frequency is synchronized with the time step of trajectory prediction (e.g., once every 30 seconds). If a grid does not have a directly corresponding temperature sensor, the water temperature data from three adjacent sensors is calculated using a weighted average method (the closer the distance, the higher the weight), ensuring continuous and accurate water temperature data for each grid area. This data is directly used as model input, reflecting the impact of water temperature on the settling rate of sediment-forming objects (such as sediment particles).
[0097] Local water flow velocity is acquired through bottom or underwater velocity sensors. Sensors are installed close to the grid area where settling objects are located (e.g., if the object is in the middle grid at the bottom of the pool, velocity sensor data from that grid and adjacent grids are used). Priority is given to collecting water flow velocity in the same direction as the object's movement (e.g., if the settling object is moving southwest along the bottom of the pool, the southwest-direction water flow velocity is prioritized). If the object is in a dynamic state, a visual tracking algorithm can be used to record the object's positional changes within a continuous time step, calculate the object's velocity, and then combine this with the "correlation model between object movement velocity and local water flow velocity" (an empirical model pre-trained by the system) from fluid mechanics to infer the local water flow velocity as a supplement to the sensor data, improving the matching degree between the data and the actual environment in which the object is located.
[0098] The pool bottom slope is calibrated via laser scanning during system initialization. A laser rangefinder is used to perform a comprehensive scan of the pool bottom, acquiring the three-dimensional coordinates of each sampling point (X and Y axes for horizontal coordinates, Z axis for depth coordinates). Then, the ratio of the Z-axis difference (depth difference) of adjacent sampling points within each pool grid to the horizontal distance is calculated to obtain the pool bottom slope of that grid (expressed as a percentage or angle, e.g., a 0.5% slope means that the depth increases by 0.5 meters for every 100 meters of horizontal distance). For areas with local bulges or depressions on the pool bottom, the accuracy of the slope data is improved by subdividing the grid (e.g., subdividing the original 1m × 1m grid into 0.5m × 0.5m grids). After calibration, a pool bottom slope distribution map is generated and stored in the system. When calling the model, the corresponding slope value is directly retrieved based on the grid where the settlement object is located.
[0099] After generating motion trajectory data for two types of objects (including predicted position coordinates, velocity magnitude, and direction vector at each time point), optionally, a trajectory uncertainty interval can be established based on input data errors and environmental interference factors. This trajectory uncertainty interval serves as a fault-tolerant reference for adjusting the initial collection path. Specifically, input data errors mainly refer to the deviations generated during the acquisition and processing of the input data used to generate the trajectory prediction model. Input data errors include measurement errors inherent in the sensor hardware itself. For example, a visual sensor used to detect leaf fragments may have positioning coordinate deviations, and a sensor for detecting hair clumps underwater may experience velocity detection errors due to slight water flow disturbances. These errors can be determined through parameters in the sensor's technical manual, such as the gyroscope's zero-bias stability and angle random walk, which directly reflect the sensor's error range in a stable state. Input data errors also include errors introduced during data preprocessing. For example, in image recognition, coordinate extraction deviations can occur due to blurred leaf edges, or estimation errors can arise when filling in missing velocity data. These errors can be quantified using algorithms such as standard deviation analysis of repeated measurements and Kalman filtering. For instance, by statistically analyzing the deviations of multiple measurements from the true values, the magnitude of errors caused by missing data or improper standardization can be determined. Furthermore, determining input data errors requires combining equipment characteristics with statistical analysis methods. For sensor errors, the error range can be directly obtained based on accuracy indicators in the hardware parameter manual, such as the angle random walk coefficient and zero-bias stability. For preprocessing errors, the error distribution can be determined by comparing the results of different processing methods or by using Monte Carlo simulations to model scenarios such as missing data and incorrect data types, and then statistically analyzing the error distribution patterns.
[0100] Environmental interference factors refer to the physical effects or changes in conditions from the external environment during the movement of an object. These factors directly affect the actual trajectory of the object, causing it to deviate from the predicted path. For lightweight outdoor objects like fallen leaves, the main environmental interference factor is wind fluctuation, especially the strength of southeasterly winds. The turbulent characteristics of the wind can change the direction and speed of the fallen leaves, even causing random swaying of the trajectory. At the same time, wind can also interfere with the detection accuracy of sensors, such as causing image blurring, further increasing the uncertainty of trajectory prediction. For hair clumps in a swimming pool, the environmental interference factors are relatively mild, mainly including minor disturbances in underwater water flow, slight effects of water temperature changes on water density (although the changes are not significant in a short period of time), and slight undulations in the slope of the pool bottom. These factors indirectly affect the movement of the hair clump through changes in fluid resistance. However, because the pool environment is relatively closed and stable, the intensity and frequency of these interferences are low, and therefore the impact on the trajectory is small. Furthermore, the identification and quantification of environmental interference factors require on-site monitoring and scenario characteristic analysis. For example, anemometers can be used to record the fluctuation range of outdoor wind force, and water flow sensors can be used to monitor the changes in flow velocity in the pool. Combined with the physical properties of the objects (such as the windward area of fallen leaves and the buoyancy characteristics of hair clumps), a correlation model between environmental factors and trajectory deviation can be established to ultimately determine the size of the fault tolerance space under different scenarios. For example, fallen leaves need to reserve 0.3 meters of fault tolerance space due to wind interference, while hair clumps only need 0.15 meters due to stable water flow.
[0101] Fallen leaf fragments are affected by slight wind fluctuations (the southeast wind has occasional changes in strength), resulting in a slightly larger range of uncertainty. Therefore, a margin of approximately 0.3 meters is needed to allow for path adjustments. Hair clumps, on the other hand, have a smaller range of uncertainty due to the relatively stable underwater current in the pool, with no significant changes in water temperature or bottom slope in the short term. A margin of approximately 0.15 meters is required for this. These uncertainties serve as a reference for subsequent initial path adjustments, ensuring that the robot can accurately intercept potential collection targets even in the face of slight environmental changes, avoiding omissions due to trajectory prediction errors.
[0102] It's worth noting that the available examples of trajectory prediction models can be categorized into various types based on the motion characteristics of the predicted object, environmental influencing factors, and technical principles. For example, a trajectory prediction model suitable for floating objects can be a hybrid model based on long short-term memory networks and attention mechanisms. This model focuses on capturing the temporal dependencies in the floating object's motion while dynamically allocating the influence weights of environmental factors such as water flow and wind through attention weights. For instance, for plastic foam moving with a light breeze and gentle current, the model will pay more attention to the disturbance of the trajectory caused by instantaneous changes in wind force. Alternatively, another suitable model for trajectory prediction of floating objects is a physically constrained particle filtering model. This model treats floating objects as particles subject to fluid resistance and continuously corrects the predicted trajectory using filtering algorithms combined with real-time water flow field data. This model is particularly suitable for handling sudden environmental disturbances such as reflections at pool boundaries, such as predicting the bounce path of fallen leaf fragments after hitting the pool wall.
[0103] For sedimentation-related objects, in addition to sedimentation trajectory models based on sediment prediction hybrid models, there is another model combining deep belief networks and Stokes equations. This model learns the nonlinear motion characteristics of sediments through multi-layer neural networks and embeds the physical rules of gravity sedimentation, enabling accurate prediction of the sliding trajectories of sediment particles of different diameters on the pool bottom. For example, large sediment particles settle faster due to gravity, while small particles are more significantly affected by water flow. Another model is a spatiotemporal attention graph network model, which divides the pool bottom into graph nodes and uses edge weights between nodes to represent the scouring intensity of the water flow. It utilizes an attention mechanism to amplify the influence of high-velocity areas on sediment migration, making it suitable for predicting the aggregation path of hair clumps in the pool bottom circulation area.
[0104] The trajectory prediction model, suitable for complex dynamic environments, is a multimodal fusion Transformer model that can simultaneously process object shape features from visual images, water flow velocity features collected by sensors, and historical trajectory temporal features. It uses a self-attention mechanism to uncover correlations between multi-source data; for example, it can combine the floating posture of a plastic bottle, local water flow direction, and the motion patterns of similar objects in the past for trajectory prediction. Another type of trajectory prediction model is a reinforcement learning model that continuously optimizes its prediction strategy through ongoing interaction with the environment. It performs exceptionally well in complex water flow areas such as pool inlets and outlets, quickly adapting to the impact of sudden changes in water flow on object motion. For instance, when a sudden increase in water flow alters the migration path of sediment, the model can adjust its prediction results through real-time feedback.
[0105] Optionally, the initial collection path in the initial collection task is dynamically adjusted based on the motion trajectory to obtain a real-time collection task, and the real-time collection task is executed to clear or confirm potential collection objects temporarily appearing in the surrounding water area. This includes: based on the motion trajectory data, determining whether floating objects will drift away from the current robot's operating area with the water flow or wind, determining whether settling objects will quickly settle to a specific position on the bottom of the pool, and calculating the effective collection window period, which indicates the longest time that floating objects are within the robot's collection range. Furthermore, priorities are set according to the urgency and impact range of the floating objects. Further, objects with short effective collection windows (such as rapidly settling high-concentration silt clumps) and large impact ranges (such as large areas of floating fallen leaves) are given priority, while low-priority objects (such as slowly drifting small particulate impurities) can be integrated into the regular collection process of the subsequent initial path. Temporary path points for high-priority objects are inserted between adjacent task points on the initial collection path. The location information of the temporary path points is set based on the center position of the object's dense dwell time period predicted by the trajectory, and it is ensured that the connection distance between the temporary path points and the initial collection path does not exceed the maximum effective range of a single movement of the target robot. If multiple temporary collection objects exist simultaneously, the initial collection path and the access order of temporary path points are reordered based on the A* algorithm shortest path model to obtain an adjusted real-time collection path. This avoids the robot going back and forth and ensures that the increase in total operation time does not exceed a preset percentage of the initial collection task duration. Then, after the target robot reaches the target location according to the adjusted real-time collection path, it confirms the presence of the collection object using a visual recognition device. If present, the corresponding collection device is activated to complete the removal. Finally, after removing the temporary objects, the target robot automatically returns to the next task point on the initial collection path, ensuring that the water area covered by the initial collection task is not missed.
[0106] Specifically, in an outdoor swimming pool in a residential community, the target robot was moving along its initial collection path from the core cleaning area in the northwest to the potential risk area in the southeast. Along the way, its onboard visual monitoring equipment and underwater sensors simultaneously detected three potential temporary collection targets. A large patch of fallen leaves appeared on the northeast side of the water surface, rapidly drifting towards the pool edge due to gusts of wind and currents. If not intercepted promptly, it would quickly drift away from the robot's current operating area, resulting in a short effective collection window and a wide coverage area. On the south side, approximately 0.3 meters underwater, a clump of highly concentrated sediment was rapidly settling towards the bottom. Once it completely sank into the pool bottom crevices, subsequent cleaning would be significantly more difficult, making the effective collection window equally urgent. On the west side, only a small piece of plastic remained on the surface, drifting slowly with a weak current. It would not leave the operating area in the short term and had minimal impact on water quality. According to priority rules, the large patch of fallen leaves and the highly concentrated sediment were classified as high priority, while the small plastic piece was classified as low priority. These were planned to be integrated into the regular collection process along the initial path, without adjusting the current core path.
[0107] In the initial path of the target robot, adjacent task points were point A (center of the core area) on the northwest side and point B (sampling point of the potential risk area) on the southeast side. The system first combined the trajectory prediction results of the fallen leaf clump to calculate the center position of its dense dwell time within the effective collection window. A first temporary path point was inserted between point A and point B. The straight-line distance between this point and point A did not exceed the maximum effective range of the robot's single movement, ensuring that the robot could connect without stopping midway. Subsequently, based on the sedimentation trajectory prediction of the sediment clump, the key interception position before it settled to the bottom of the pool was determined, and a second temporary path point was inserted. At the same time, the access order was reordered based on the shortest path model of the A* algorithm. Finally, it was determined that the robot would first move from point A to the first temporary path point to process the fallen leaf clump, then move to the second temporary path point to intercept the sediment clump, and finally arrive at point B. This avoided the robot going back and forth and detouring. According to real-time calculations, the adjusted total operation time only increased slightly compared to the initial collection task time, which did not exceed the preset percentage. When the target robot arrived at the first temporary path point according to the adjusted real-time collection path, the visual recognition device clearly captured a large area of fallen leaves. The floating debris collection chamber was immediately activated, and the leaves were completely removed using negative pressure adsorption. Upon reaching the second temporary path point, the underwater camera confirmed that the high-concentration sediment clumps were still suspended and had not completely sunk to the bottom of the pool. The bottom suction device was then activated, using a rotating brush head and negative pressure suction port to thoroughly remove the sediment clumps. During this process, a signal resembling metal debris was detected in the southwest corner of the pool. After the robot reached the corresponding location according to the predicted trajectory, it failed to find the target. The system quickly retrieved the sedimentation trajectory model, re-inputting real-time water flow velocity, water temperature, and other data for the area to generate a secondary predicted trajectory. After fine-tuning the position according to the secondary predicted trajectory, the metal debris was still not located. Therefore, the corresponding pool grid area was marked as a region requiring further verification and included in the key monitoring scope of the next round of initial collection tasks.
[0108] After all high-priority temporary objects were processed, the target robot automatically returned from the second temporary path point to point B of the initial collection path and continued to perform the collection task for the potential risk area in the southeast. When it moved to the western area along the initial path, it also cleaned up the low-priority small plastic fragments. Throughout the process, no grid areas covered by the initial collection task were missed, which not only responded efficiently to temporary pollution but also ensured the integrity of the initial collection task.
[0109] Further optionally, after step S106, the timing and frequency of the target robot's task execution can be dynamically adjusted based on the leaf distribution prediction model's real-time updates of the leaf distribution and the sediment distribution model's real-time updates of the sediment prediction model.
[0110] After dynamically adjusting the initial collection path of the target robot, to further adapt to the actual changes in fallen leaves and sediment in the pool, it is necessary to dynamically adjust the robot's task execution timing and frequency based on the prediction updates of the fallen leaf distribution prediction model and the sediment distribution prediction updates of the sediment hybrid model. During implementation, a continuous data feedback mechanism must first be established. Visual recognition devices around the pool and sensors inside the pool should be used to collect real-time data on the actual number of fallen leaves and sediment concentration changes in each grid area. This data should be compared with the previously predicted leaf probability matrix and sediment concentration matrix to analyze the reasons for deviations, such as sudden wind changes causing leaves to fall earlier or a surge in temporary pedestrian traffic bringing in more sediment. Simultaneously, environmental dynamics such as upcoming rainfall or the pool's imminent opening should be considered to determine the adjustment direction, ensuring that the adjusted timing and frequency can respond promptly to pollution without wasting resources.
[0111] The core of adjusting the timing of task execution is to align with peak pollution periods and adapt to the pool's usage scenarios. If the rate of leaf or sediment growth in a certain area is detected to be far exceeding predictions—for example, a sudden strong wind in the afternoon causing a rapid increase in leaf fall from trees near the pool—and visual recognition shows that the actual leaf volume in high-risk grids is approaching the cleaning threshold, the collection task for that area will be initiated ahead of schedule to prevent pollutants from accumulating and increasing cleaning difficulty. If it is predicted that the amount of leaf and sediment generated during a certain period, such as after the pool closes late at night, will be minimal, and the current pollution level in the grid is below the cleaning threshold, the next task execution will be postponed to reduce ineffective robot starts and stops. Simultaneously, adjustments will be made based on the pool's opening hours. For example, if the pool opens at 9:00 AM daily, the collection task in high-traffic areas, such as the water inlet, must be completed two hours before opening to ensure water quality meets standards at opening time. Even if the predicted sediment concentration in that area has not yet reached its peak, the execution time will be moved forward to before opening to match actual usage needs.
[0112] The frequency of task execution is adjusted based on the pollution intensity and accumulation rate of different grid areas. For grids with consistently high leaf drop rates, such as those near large trees along the pool edge, or core pollution areas with consistently high sediment concentrations, such as the pool entrance or low-lying areas at the bottom of the pool, if pollutant accumulation is detected shortly after cleaning (e.g., one hour after cleaning the entrance grid and the sensor shows sediment concentration returning to 60% of its original level), the task execution frequency for that area will be increased to ensure pollution is always kept at a low level. For regular areas with low pollution levels and gradual changes, such as the grid in the center of the pool, if pollutant growth is slow within a few hours after cleaning (e.g., leaf drop increases by only 20% of the predicted value), the execution frequency will be reduced to decrease robot energy consumption and operation time. Simultaneously, frequency adjustment is coordinated with path optimization to avoid repetitive work in adjacent areas at the same time. For example, high-frequency cleaning of the entrance area is integrated with regular cleaning of surrounding grids, reducing robot movement time through path connections and improving overall operational efficiency.
[0113] Taking an outdoor swimming pool in a residential community as an example, the north side of the pool is near three mature camphor trees, a high-risk area for fallen leaves. The east side is the water inlet area, which is frequently visited by people and easily accumulates hair, impurities, and other sediment. The central area, being far from pollution sources and with a gentle water flow, experiences less pollution. During dynamic adjustments, real-time monitoring revealed that after 5 PM each day, the north side grid, affected by northwest winds, experienced a significantly faster increase in fallen leaves, far exceeding predicted values. Therefore, the collection time for this area was moved from 6 PM to 5:15 PM to prevent a large influx of leaves into the pool that would be difficult to clean. In the east side water inlet area, during peak weekend hours (10 AM to 4 PM), sensors showed that sediment concentration had risen back to 60% of pre-cleaning levels within just one hour after cleaning. Therefore, the frequency of cleaning during this period was increased from once every two hours to once every hour to ensure that the water quality at the inlet consistently meets standards. After cleaning the central area, sensors showed only a slight increase in sediment concentration and minimal fallen leaves within four hours. Therefore, the frequency of cleaning was reduced from once every three hours to once every four hours. Meanwhile, when adjusting the timing and frequency, the early tasks in the leaf-covered area on the north side and the high-frequency tasks on the east side will be connected through path optimization. After the robot completes the early cleaning on the north side, it can directly go to the east side along the shortest path to perform the next task, avoiding detours. This ensures the cleaning effect of each area and effectively controls the robot's total working time.
[0114] In this embodiment of the invention, acquiring the distribution of trees around the target swimming pool and dividing it into grid areas is the foundation for precise cleaning. It clarifies the source of fallen leaves, provides a spatial baseline, and avoids resource waste. Combining weather and tree distribution, a spatiotemporal neural network model improves the accuracy of fallen leaf prediction, outputting a probability matrix to pinpoint high-risk grids. Multimodal data and a hybrid model incorporating fluid dynamics and sediment motion equations enable accurate sediment prediction, providing a three-dimensional decision-making basis for concentration, type, and risk. The initial collection task is planned by integrating the two types of prediction results, defining the core cleaning area, and optimizing the path to improve efficiency and avoid collisions. During execution, the path is dynamically adjusted, and sudden floating objects or sediment are identified in real time. Through trajectory prediction, path optimization, and secondary confirmation, the balance between sudden demands and initial efficiency is achieved, ultimately realizing a closed-loop cleaning process that is thorough and highly efficient.
[0115] This invention provides an automatic collection system for fallen leaves and sediment in swimming pools based on visual recognition. The system includes: a collection module for acquiring the distribution of trees around a target swimming pool; a division module for dividing the target swimming pool into multiple pool grid areas according to the pool structure; and a leaf prediction module for predicting the distribution of fallen leaves in a future preset time period by combining current weather conditions and tree distribution information using a spatiotemporal graph neural network leaf distribution prediction model. In the leaf distribution prediction model, nodes correspond one-to-one with trees. Node features include the tree species, tree height, distance from the pool, and historical leaf volume. Edge features are constructed based on the relative position, location, and wind direction propagation relationship of the trees. Edge features include the relative position, relative distance, and wind direction propagation weight between trees. The leaf distribution includes a leaf probability matrix corresponding to each pool grid area, where each element of the probability matrix represents the leaf distribution of the corresponding pool grid area in the future preset time period. The system includes a predicted probability value for fallen leaves appearing within a given time period; a sediment prediction module, used to acquire multimodal environmental data and pedestrian flow data around the target pool, and predict sediment distribution within a preset time period using a sediment prediction hybrid model; the sediment prediction hybrid model is constructed based on a spatiotemporal graph convolutional network and a multi-view spatiotemporal graph attention network, embedding fluid dynamics equations and sediment motion equations into the model; a planning module, used to generate an initial collection task for the target robot based on the distribution of fallen leaves and sediment, considering the spatial structure of the target pool; the initial collection task includes a starting point, a covered area, and an initial collection path; and an execution module, used to dynamically adjust the initial collection path based on monitoring image data in the surrounding water area during the execution of the initial collection task by the target robot, to obtain a real-time collection task, and execute the real-time collection task to remove temporarily appearing floating objects and sediment in the surrounding water area. In some embodiments, a vision-based automatic collection system for fallen leaves and sediment in swimming pools can be applied to terminal devices. It should be noted that, for the sake of convenience and brevity, the specific working process of the vision recognition-based automatic collection system for pool leaves and sediment described above can be referred to the corresponding process in the aforementioned embodiment of the vision recognition-based automatic collection method for pool leaves and sediment, and will not be repeated here.
[0116] This invention provides a terminal device. The terminal device 300 includes a processor 301 and a memory 302, connected via a bus 303, such as an I2C bus. Specifically, the processor 301 provides computing and control capabilities to support the operation of the entire terminal device. The processor 301 can be a central processing unit, or it can be other general-purpose processors, digital signal processors, application-specific integrated circuits, field-programmable gate arrays (FPGAs), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Those skilled in the art will understand that the structures shown in the above embodiments are merely block diagrams of some structures related to the embodiments of this invention and do not constitute a limitation on the terminal device to which the embodiments of this invention are applied. A specific server may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements. The processor is used to run a computer program stored in the memory and, when executing the computer program, implements any of the visual recognition-based automatic collection methods for pool leaves and sediment provided in this invention. It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the terminal device described above can be referred to the aforementioned embodiment of the automatic collection method for pool leaves and sediment based on visual recognition, and will not be repeated here.
[0117] This invention also provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs that can be executed by one or more processors to implement the steps of any of the vision-based automatic collection methods for pool leaves and sediments provided in the specification of this invention.
Claims
1. A method for automatic collection of fallen leaves and sediment in swimming pools based on visual recognition, characterized in that, The method includes: Obtain the distribution of trees around the target swimming pool; The target pool is divided into multiple pool grid areas according to its structure. Combining current weather conditions and tree distribution, a spatiotemporal graph neural network-based leaf distribution prediction model is used to predict the leaf distribution within a preset future time period. In this model, each node corresponds to a tree, and node features include the tree species, tree height, distance from the pool, and historical leaf fall amount. Edge features are constructed based on the relative positions, locations, and wind direction propagation relationships of the trees. Edge features include the relative positions and distances between trees, as well as wind direction propagation weights. The leaf distribution includes a leaf probability matrix corresponding to the pool grid area, where each element represents the predicted probability of leaf fall occurring in the corresponding pool grid area within the preset future time period. The system acquires multimodal environmental data and pedestrian flow data around the target swimming pool, and uses a sediment prediction hybrid model to predict the sediment distribution within a preset future time period. The sediment prediction hybrid model is constructed based on a spatiotemporal graph convolutional network and a multi-view spatiotemporal graph attention network, and incorporates fluid dynamics equations and sediment motion equations into the sediment prediction hybrid model. Based on the distribution of fallen leaves and sediment, an initial collection task for the target robot is generated for the spatial structure of the target pool; the initial collection task includes the starting point, the covered water area, and the initial collection path; During the initial collection task performed by the target robot, the initial collection path in the initial collection task is dynamically adjusted based on the monitoring image data in the surrounding water area to obtain the real-time collection task, and the real-time collection task is executed to remove temporarily appearing floating objects and sediments in the surrounding water area.
2. The automatic collection method for fallen leaves and sediment in swimming pools based on visual recognition according to claim 1, characterized in that, During the initial collection task performed by the target robot, the initial collection path in the initial collection task is dynamically adjusted based on monitoring image data of the surrounding water area to obtain a real-time collection task, and the real-time collection task is executed to remove temporarily appearing floating objects and sediments in the surrounding water area, including: Real-time acquisition of monitoring image data of the water area surrounding the target robot; Based on the monitoring image data, potential collection targets in the surrounding waters are identified; wherein potential collection targets include at least temporarily appearing floating objects and sediments. Based on the type of the potential collection object, the corresponding trajectory prediction model is invoked, and the motion trajectory of the potential collection object is obtained through the trajectory prediction model. The initial collection path in the initial collection task is dynamically adjusted based on the motion trajectory to obtain the real-time collection task, and the target robot is instructed to perform the real-time collection task to clear or confirm potential collection objects that temporarily appear in the surrounding water.
3. The automatic collection method for fallen leaves and sediment in swimming pools based on visual recognition according to claim 2, characterized in that, The step of invoking the trajectory prediction model corresponding to the type of the potential collection object, and obtaining the motion trajectory of the potential collection object through the trajectory prediction model, includes: Based on the visual characteristics of the monitoring image data and the characteristics of the pool environment, potential collection objects are divided into floating objects and settling objects. The visual characteristics include shape, density, and suspension state. Floating objects include at least one of the following substances with a density less than water: temporarily fallen leaf fragments, plastic debris, and foam. The movement of floating objects is mainly affected by water flow speed, water flow direction, and wind force around the pool. Settling objects include at least one of the following substances with a density not less than water: silt particles, hair clumps, and metal fragments. The movement of settling objects is affected by gravity settling, water scouring at the bottom of the pool, and circulation at the pool inlet and outlet. Based on the classification results, the corresponding pre-trained trajectory prediction model is invoked; for floating objects, a spatiotemporal fluid coupled trajectory model is invoked. This spatiotemporal fluid coupled trajectory model is constructed based on the spatiotemporal graph convolutional network ST-GCN and simplified fluid dynamics equations. The input features include the initial position coordinates of the floating object collected by multi-source sensors, the water flow vector of the pool grid area, the surrounding wind force and direction data, the pre-calibrated pool boundary reflection coefficient, and historical motion trajectory samples of similar floating objects. The multi-source sensors for floating objects include visual recognition devices, underwater flow velocity sensors, and miniature meteorological sensors. For sedimentation objects, a sedimentation trajectory model is invoked. This sedimentation trajectory model is based on the sediment prediction and mixing model and is constructed by embedding the gravity sedimentation equation and particle resistance formula. The input features include the initial suspension height, equivalent particle diameter, pool water temperature, local water flow velocity, pool bottom slope, and historical sedimentation rate data of the sedimentation objects collected by multi-source sensors. The multi-source sensors for sedimentation objects include underwater monitoring equipment, visual recognition equipment, underwater temperature sensors, flow velocity sensors, and laser rangefinders. Using the spatiotemporal fluid coupling trajectory model or the sedimentation trajectory model, motion trajectory data of potential collection objects is generated in units of time steps within a preset future period. The motion trajectory data includes the predicted position coordinates, motion speed magnitude, and direction vector of each time node of the potential collection object.
4. The automatic collection method for fallen leaves and sediment in swimming pools based on visual recognition according to claim 3, characterized in that, The process of dynamically adjusting the initial collection path based on the motion trajectory to obtain a real-time collection task, and instructing the target robot to execute the real-time collection task to clear or confirm potential collection objects temporarily appearing in the surrounding water area, includes: Based on the motion trajectory data, it is determined whether floating objects will drift away from the current robot's working area with the water flow or wind, whether settling objects will quickly sink to a specific position at the bottom of the pool, and the effective collection window period is calculated. The effective collection window period is used to indicate the longest time that floating objects are within the robot's collection range. Prioritize the collection of floating objects based on their urgency and scope of impact. Between adjacent task points on the initial collection path, temporary path points for high-priority objects are inserted. The location information of the temporary path points is set based on the center position of the object's dense dwell time period predicted by the trajectory, and it is ensured that the connection distance between the temporary path points and the initial collection path does not exceed the maximum effective range of the target robot's single movement. If multiple temporary collection objects exist simultaneously, the access order of the initial collection path and the temporary path points is reordered based on the A* algorithm shortest path model to obtain the adjusted real-time collection path, avoiding the robot going back and forth and detouring, and ensuring that the total operation time does not increase by more than the preset proportion of the initial collection task time. After the target robot arrives at the target location according to the adjusted real-time collection path, it confirms the existence of the collection object through visual recognition equipment. If the object exists, the corresponding collection device is activated to complete the removal. After the temporary object removal is completed, the target robot automatically returns to the next task point on the initial collection path to ensure that the water area covered by the initial collection task is not missed.
5. The automatic collection method for fallen leaves and sediment in swimming pools based on visual recognition according to claim 1, characterized in that, The method of predicting leaf distribution within a preset future time period by combining current weather conditions and tree distribution using a spatiotemporal graph neural network includes: Acquire fine-grained weather data for the target swimming pool area within a preset future time period. The fine-grained weather data includes hourly wind speed, hourly wind direction, cumulative precipitation, and average temperature. The fine-grained weather data is normalized using the Min-Max normalization method to eliminate dimensional differences and obtain a weather feature vector with uniform dimensions. Extract the basic parameters of the node features of each tree around the target swimming pool. The basic parameters of the node features include: the leaf fall cycle of the tree species, the predefined coefficient of leaf adhesion, the actual tree height, the shortest straight distance from the tree trunk to the edge of the swimming pool, and the historical average daily leaf fall during the same season and weather conditions. The basic parameters of the node features of each tree are fused with the weather feature vector by element-wise multiplication to obtain the fused node features of each tree. Based on the latitude and longitude coordinates of each tree, the relative position coordinates and straight-line distance between any two trees are calculated and used as the relative position parameter and relative distance parameter in the edge features, respectively. According to the hourly wind direction in the weather feature vector, the wind direction transmission weight between any two trees is calculated. Using the angle between the direction of the line connecting the two trees and the hourly wind direction as a parameter, the cosine value of the angle is multiplied by the hourly wind speed and divided by the historical maximum wind speed of the pool network area to obtain the wind direction transmission weight. This results in an edge feature set containing the relative position parameter, relative distance parameter and wind direction transmission weight of the two trees. Using the trees around the target swimming pool as graph nodes, the relationship between any two trees as graph edges, the fused node features as node attributes, and the set of edge features as edge attributes, the input graph structure of the spatiotemporal graph neural network is constructed. The input graph structure is input into the pre-trained leaf distribution prediction model to obtain the leaf probability matrix.
6. The automatic collection method for fallen leaves and sediment in swimming pools based on visual recognition according to claim 1, characterized in that, The process of acquiring multimodal environmental data and pedestrian flow data around the target swimming pool, and predicting sediment distribution within a preset future time period using a sediment prediction hybrid model, includes: Multimodal environmental data is acquired by sensor arrays deployed around and inside the target swimming pool, and pedestrian flow data is acquired by visual recognition devices. The multimodal environmental data includes pool water quality parameters, surrounding meteorological data, and pool structure data. The pedestrian flow data includes real-time pedestrian density, activity areas, activity types, and historical records of foreign objects brought in by pedestrians. Preprocessing is performed based on the collected multimodal environmental data, pedestrian flow data, and historical sediment data of the pool. A spatiotemporal map of the environment and pedestrian flow is constructed with each pool grid area as a node. The node features include the environmental features, pedestrian flow features, and historical sediment features of the corresponding pool grid area. The edge features are constructed based on the fluid exchange intensity, spatial distance, and indirect influence of pedestrian activities between pool grid areas. The edge weights are used to represent the degree of sediment migration correlation between pool grid areas. The ST-GCN layer of the spatiotemporal graph convolutional network in the sediment prediction hybrid model is used to perform temporal convolution on the node features in the spatiotemporal graph of environmental pedestrian flow. The spatial graph convolutional layer captures the diffusion relationship and migration correlation of sediment between adjacent pool grid areas, and extracts the spatiotemporal distribution dependence features of sediment. Using the MST-GAT layer of the multi-view spatiotemporal graph attention network in the sediment prediction hybrid model, adaptive attention weights are assigned to the environmental dimension and the human flow state dimension in the environmental human flow spatiotemporal graph. The adaptive attention weights are then fused with the movement trend features of historical sediment data to obtain the fused attention weights for sediment. Specifically, the adaptive attention weights of human flow state features are increased in densely populated water entry areas, and the adaptive attention weights of environmental water flow features are increased in areas with active water flow. Based on the spatiotemporal distribution dependency features of sediment and the fusion of attention weights, the sediment distribution corresponding to the pool grid area is predicted; the sediment distribution includes the sediment concentration matrix, sediment type probability distribution, and sediment risk level corresponding to the pool grid area; each matrix element in the sediment concentration matrix represents the average sediment concentration of the corresponding pool grid area in a future preset time period.
7. The automatic collection method for fallen leaves and sediment in swimming pools based on visual recognition according to claim 6, characterized in that, The fluid dynamics equations embedded in the sediment prediction model include the Navier-Stokes equations; before acquiring multimodal environmental data and pedestrian flow data around the target swimming pool, and predicting sediment distribution within a preset future time period using the sediment prediction hybrid model, the process also includes: The Physics-Informed GNN module in the sediment prediction hybrid model is invoked to discretize the Navier-Stokes equations and sediment motion equations matching the target pool spatial structure into algebraic relationships between nodes and edges. The physical relationships affecting sediment motion laws in the Navier-Stokes equations and sediment motion equations are transformed into the correlation between the physical and numerical characteristics of nodes, so that the physical laws are adapted to the graph structure data format in the target pool spatial structure. The sediment prediction mixing model is constrained by a physical loss function to ensure that the sediment migration process in the sediment distribution conforms to the water flow and gravity settling laws within the target pool.
8. The automatic collection method for fallen leaves and sediment in swimming pools based on visual recognition according to claim 6, characterized in that, The step of generating an initial collection task for the target robot based on the distribution of fallen leaves and sediment, tailored to the spatial structure of the target swimming pool, includes: The leaf probability matrix in the leaf distribution, the sediment concentration matrix in the sediment distribution, and the sediment risk level are correlated grid by grid to construct a comprehensive evaluation matrix; Priority rules are set based on the comprehensive evaluation matrix, with priorities from high to low as core collection area, single core area, potential risk area, and routine monitoring area, and the adaptive weight of each pool grid area is dynamically adjusted. Based on the spatial structure of the target pool, the starting point should be prioritized to be set at the geometric center of the core collection area, or at the poolside location with the smallest sum of straight-line distances from multiple core collection areas, to ensure that the target robot can directly enter a high-priority operation state after startup; the spatial structure of the target pool should include at least one of the following: a pool robot docking position, an inlet position, an outlet position, and an unobstructed passage. The initial collection task's coverage area is determined based on priority; the initial collection task covers all core collection areas and potential risk areas, and samples are taken from regular monitoring areas at predetermined grid intervals, avoiding grids containing fixed facilities within the pool; fixed facilities within the pool include ladders, underwater lights, and drain outlets; An improved A* path optimization algorithm is adopted, with the objectives of minimizing the total path length, optimizing the core area access order, and minimizing the number of turns, to generate continuous path nodes as the initial collection path; For different grid areas in the initial collection path, the corresponding collection device parameters are matched; in the core collection area, if the main component is fallen leaves, the floating debris collection chamber is activated, and if the main component is sediment, the bottom suction device is activated; in potentially risky areas, a dual-mode backup of the floating debris collection chamber and the bottom suction device is adopted; and according to the robot's single operation capacity, the covered water area is divided into a preset number of continuous task segments, and the duration of each task segment does not exceed the single endurance limit of the target robot. Through grid coverage calculation and route rationality verification, if there are no uncovered core grids or unreasonable route segments, the initial collection task is output, which includes the starting point coordinates, the list of covered water area grids, the initial collection path node sequence, the task segment division, and the device parameter configuration. If there are uncovered core grids or unreasonable route segments, the process jumps to the step of delineating the covered water area of the initial collection task based on priority, and the initial collection task is regenerated.
9. The automatic collection method for fallen leaves and sediment in swimming pools based on visual recognition according to claim 1, characterized in that, During the initial collection task performed by the target robot, the initial collection path in the initial collection task is dynamically adjusted based on monitoring image data in the surrounding water area to obtain a real-time collection task. After executing the real-time collection task, the method further includes: Based on the real-time updates of the leaf distribution prediction model and the real-time updates of the sediment distribution prediction hybrid model, the timing and frequency of the target robot's task execution are dynamically adjusted.
10. An automatic collection system for fallen leaves and sediment in swimming pools based on visual recognition, characterized in that, The system includes: The data acquisition module is used to obtain the distribution of trees around the target swimming pool; The partitioning module is used to divide the target pool into multiple pool grid areas according to the pool structure. The leaf fall prediction module combines current weather conditions and tree distribution to predict leaf fall distribution within a preset future time period using a spatiotemporal graph neural network-based leaf fall distribution prediction model. In this model, each node corresponds to a tree, and node features include the tree species, tree height, distance from the pool, and historical leaf fall amount. Edge features are constructed based on the relative positions, locations, and wind direction propagation relationships of the trees. Edge features include the relative positions and distances between trees, as well as wind direction propagation weights. The leaf fall distribution includes a leaf fall probability matrix corresponding to the pool grid area, where each element represents the predicted probability of leaf fall occurring in the corresponding pool grid area within the preset future time period. The sediment prediction module is used to acquire multimodal environmental data and pedestrian flow data around the target swimming pool, and predict the sediment distribution in a future preset time period through a sediment prediction hybrid model. The sediment prediction hybrid model is constructed based on a spatiotemporal graph convolutional network and a multi-view spatiotemporal graph attention network, and the fluid dynamics equations and sediment motion equations are embedded into the sediment prediction hybrid model. The planning module is used to generate an initial collection task for the target robot based on the distribution of fallen leaves and sediment, taking into account the spatial structure of the target pool. The initial collection task includes a starting point, a covered area, and an initial collection path. The execution module is used to dynamically adjust the initial collection path in the initial collection task based on the monitoring image data in the surrounding water area during the initial collection task performed by the target robot, so as to obtain the real-time collection task and execute the real-time collection task to remove temporary floating objects and sediments in the surrounding water area.
Citation Information
Patent Citations
Swimming pool pollutant cleaning route generation method and device, cleaning method and device and electronic equipment
CN120428705A
Swimming pool robot positioning and trajectory prediction method and system fusing sonar and vision
CN120489100A
Mapping and tracking methods and systems principally for use in connection with swimming pools and spas
US20200056890A1
Cited By
Graph neural network-based rainstorm intensity spatial distribution prediction and falling area delimiting method
CN121051399A