Method and system for automatic collection of fallen leaves and sediments in a swimming pool based on visual recognition

The pool cleaning method, which utilizes visual recognition and dynamic robot path adjustment, solves the problems of blind spots and low efficiency, achieving highly efficient pool cleaning results.

CN120848560BActive Publication Date: 2025-12-16YITUO ELECTRIC CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511348778.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-22
Publication Date
2025-12-16
Estimated Expiration
2045-09-22

AI Technical Summary

Technical Problem

Existing pool cleaning equipment suffers from blind spots and low cleaning efficiency, especially manual cleaning and fixed-path cleaning methods, which are difficult to effectively cover all contaminated areas.

Method used

An automatic collection method for fallen leaves and sediment in swimming pools based on vision recognition is adopted. The distribution of fallen leaves is predicted by a spatiotemporal graph neural network and combined with a sediment prediction hybrid model to generate the robot's initial collection task. During the execution process, the path is dynamically adjusted to remove floating objects and sediment.

Benefits of technology

It achieves efficient and comprehensive cleaning of the swimming pool, avoids blind spots, reduces the cost of manual intervention, and adapts to cleaning needs in different scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120848560B_ABST
    Figure CN120848560B_ABST
Patent Text Reader

Abstract

The embodiment of the present application relates to the field of artificial intelligence, and provides a method and system for automatically collecting fallen leaves and sediments in a swimming pool based on visual recognition. The method comprises the following steps: acquiring the distribution of trees around the target swimming pool; dividing the target swimming pool into multiple swimming pool grid areas according to the structure of the swimming pool; combining the current weather condition and the distribution of trees, and predicting the distribution of fallen leaves in a future preset period of time through a fallen leaf distribution prediction model of a spatio-temporal graph neural network; acquiring multi-modal environmental data and people flow state data around the target swimming pool, and predicting the distribution of sediments in a future preset period of time through a sediment prediction mixed model; generating an initial collection task of a target robot according to the spatial structure of the target swimming pool based on the distribution of fallen leaves and the distribution of sediments; and dynamically adjusting the initial collection task according to the monitoring image data in the surrounding water area to remove the temporary floating objects and sediments in the surrounding water area, thereby improving the cleaning coverage and cleaning efficiency of the swimming pool.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, and particularly relates to a method and system for automatically collecting fallen leaves and sediments in a swimming pool based on visual recognition. BACKGROUND

[0002] At present, in the scenes of a family swimming pool, a commercial swimming pool (such as a hotel, a gym swimming pool), a public swimming pool and the like, floating objects (such as fallen leaves) and sediments in the swimming pool can be removed by an artificial way, but this way has a high cost and a low cleaning efficiency.

[0003] In the related art, a swimming pool cleaning device removes fallen leaves and sediments in the swimming pool by using a fixed path, and blind cleaning areas are prone to occur, for example, fallen leaves appear in an area just cleaned, and the area needs to be cleaned in the next cycle. Or repeated cleaning, such as repeatedly returning to clean the same area, and the cleaning efficiency is low. Therefore, it is urgent to provide a technical solution to solve at least one of the above technical problems. SUMMARY

[0004] The main purpose of the embodiments of the present application is to provide a method and system for automatically collecting fallen leaves and sediments in a swimming pool based on visual recognition, and to solve the technical problems of blind cleaning areas and low cleaning efficiency in the related art.

[0005] In a first aspect, the embodiments of the present application provide a visual recognition-based automatic collection method for fallen leaves and sediments in a swimming pool, comprising: acquiring the distribution of trees around the target swimming pool; dividing the target swimming pool into multiple swimming pool grid areas according to the structure of the swimming pool; combining the current weather conditions and the distribution of trees, and predicting the distribution of fallen leaves in a future preset period of time through a fallen leaf distribution prediction model of a spatio-temporal graph neural network; wherein the nodes in the fallen leaf distribution prediction model correspond one-to-one to the trees, and the node features include the tree species, tree height, distance from the swimming pool, and historical fallen leaf amount of the corresponding trees, and the edge features are constructed based on the relative position, position, and wind direction transmission relationship of the trees; the edge features include the relative position, relative distance, and wind direction transmission weight between the trees; the fallen leaf distribution includes a fallen leaf probability matrix corresponding to the swimming pool grid area, and each matrix element in the fallen leaf probability matrix is used to represent the predicted probability value of the occurrence of fallen leaves in the corresponding swimming pool grid area in the future preset period of time; acquiring multi-modal environmental data and people flow state data around the target swimming pool, and predicting the distribution of sediments in a future preset period of time through a sediment prediction hybrid model; the sediment prediction hybrid model is constructed based on a spatio-temporal graph convolution network and a multi-view spatio-temporal graph attention network, and the fluid mechanics equation and the sediment motion equation are embedded into the sediment prediction hybrid model; according to the fallen leaf distribution and the sediment distribution, an initial collection task of a target robot is generated for 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; in the process of executing the initial collection task by the target robot, the initial collection path in the initial collection task is dynamically adjusted according to 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 the temporary floating objects and sediments in the surrounding water area.

[0006] In a second aspect, an embodiment of the present application provides a visual recognition-based automatic collection system for fallen leaves and sediments in a swimming pool, comprising: a collection module configured to obtain a tree distribution around a target swimming pool; a division module configured to divide the target swimming pool into a plurality of swimming pool grid areas according to a swimming pool structure; a fallen leaf prediction module configured to predict a fallen leaf distribution in a future preset period of time by combining a current weather condition and the tree distribution, and using a fallen leaf distribution prediction model of a spatio-temporal graph neural network; wherein nodes in the fallen leaf distribution prediction model correspond to trees one by one, node features include tree species, tree height, distance from the swimming pool, and historical fallen leaf amount of the corresponding trees, and edge features are constructed based on relative positions, positions, and wind direction transmission relationships of the trees; the edge features include relative positions, relative distances, and wind direction transmission weights between the trees; the fallen leaf distribution includes a fallen leaf probability matrix corresponding to the swimming pool grid areas, each matrix element in the fallen leaf probability matrix is used to represent a predicted probability value of the corresponding swimming pool grid area having fallen leaves in the future preset period of time; a sediment prediction module configured to obtain multi-modal environment data and people flow state data around the target swimming pool, and predict a sediment distribution in a future preset period of time by using a sediment prediction hybrid model; the sediment prediction hybrid model is constructed based on a spatio-temporal graph convolution network and a multi-view spatio-temporal graph attention network, and fluid mechanics equations and sediment motion equations are embedded into the sediment prediction hybrid model; a planning module configured to generate an initial collection task of a target robot for a spatial structure of the target swimming pool according to the fallen leaf distribution and the sediment distribution; the initial collection task includes a starting point, a covered water area, and an initial collection path; and an execution module configured to dynamically adjust the initial collection path in the initial collection task to obtain a real-time collection task according to monitoring image data in surrounding water areas during execution of the initial collection task by the target robot, and execute the real-time collection task to remove temporary floating objects and sediments in the surrounding water areas.

[0007] In a third aspect, an embodiment of the present application further provides an electronic device, which comprises a processor, a memory for storing a computer program, and the processor is configured to execute the computer program and implement the visual recognition-based automatic collection method for fallen leaves and sediments in a swimming pool according to the first aspect or any embodiment of the present application.

[0008] In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium, which stores a computer software program, and the computer software program is executed by a processor to implement the visual recognition-based automatic collection method for fallen leaves and sediments in a swimming pool according to the first aspect or any embodiment of the present application.

[0009] The embodiment of the present application provides a kind of based on visual recognition's swimming pool fallen leaves and sediment automatic collection method and system.The method, the tree distribution of the target swimming pool around is obtained.The target swimming pool is divided into multiple swimming pool grid areas according to the structure of swimming pool.Combining current weather conditions and tree distribution, the fallen leaves distribution situation in future preset period is predicted by the fallen leaves distribution prediction model of space-time graph neural network;Wherein, the nodes in the fallen leaves distribution prediction model correspond to the trees one by one, and the node features include the tree species, tree height, distance from the pool and historical fallen leaves amount of the corresponding trees, and the edge features are obtained based on the relative position, position and wind direction transmission relationship of trees;Edge features include the relative position, relative distance and wind direction transfer weight between trees;The fallen leaves distribution situation includes the fallen leaves probability matrix corresponding to the swimming pool grid area, and each matrix element in the fallen leaves probability matrix is used to indicate the predicted probability value of the corresponding swimming pool grid area in future preset period The fallen leaves appear.The multi-modal environment data and people flow state data around the target swimming pool are obtained, and the sediment distribution situation in future preset period is predicted by the sediment prediction hybrid model;The sediment prediction hybrid model is constructed based on space-time graph convolution network and multi-view space-time graph attention network, and the fluid mechanics equation and sediment motion equation are embedded into the sediment prediction hybrid model.According to the fallen leaves distribution situation and the sediment distribution situation, the initial collection task of target robot is generated for the spatial structure of target swimming pool;Initial collection task includes starting point, covered water area and initial collection path.In the process that target robot executes initial collection task, according to the monitoring image data in surrounding water area, the initial collection path in initial collection task is dynamically adjusted to obtain real-time collection task, and the real-time collection task is executed to remove the floating objects and sediments temporarily appearing in surrounding water area.

[0010] In the embodiment of the present application, the distribution prediction of fallen leaves and sediments has both data-driven relevance and physical law rationality through space-time graph neural network, physical model embedding and other methods, providing a reliable basis for cleaning decision. Secondly, from grid division, initial path planning to dynamic adjustment, the present application focuses on high-risk areas and reduces unnecessary movement, greatly reducing the redundant operation of robots and improving the cleaning efficiency of swimming pool robots. In addition, the present application not only covers the high-risk areas predicted by the initial collection task, but also responds to temporary pollution through dynamic adjustment, avoiding the drawbacks of cleaning blind area and low cleaning efficiency in traditional cleaning methods, and finally achieving efficient and comprehensive cleaning of swimming pool fallen leaves and sediments, reducing the cost of manual intervention and adapting to the cleaning needs of swimming pools in different scenarios. BRIEF DESCRIPTION OF DRAWINGS

[0011] Figure 1 A flowchart of a swimming pool fallen leaves and sediment automatic collection method based on visual recognition provided by the embodiment of the present application is shown.

[0012] 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

[0013] 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.

[0014] 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:

[0015] Step S101: Obtain the distribution of trees around the target swimming pool.

[0016] Step S102: Divide the target pool into multiple pool grid areas according to the pool structure.

[0017] 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.

[0018] 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.

[0019] 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.

[0020] The pool grid area is a discrete space unit divided according to the structural features of the target pool, and the pool water area and related areas. The division process will combine the actual layout of the pool structure to ensure that each unit has a relatively uniform space range. Subsequent operations such as distribution prediction and collection task planning of fallen leaves and sediments will be based on these discrete units. By clearly defining the spatial position and range of each unit, precise spatial positioning benchmarks are provided for automatic collection operations.

[0021] Further optionally, the division of the pool grid area can be optimized from the perspective of adapting to actual scene needs, correlating core technical links, and responding to dynamic changes. First, the division logic needs to be closely combined with the pool structure and facility distribution. For fixed facilities in the pool such as escalators, water inlets, and water outlets, they should not be divided into the same grid as the surrounding water area. Instead, small avoidance grids should be defined around the facilities. Non-uniform grid division should be used for irregular pools (such as circular or irregular polygonal pools). The grid size should be reduced in areas with high curvature to ensure that the grid boundaries match the actual pool contours and reduce space waste or coverage omissions. Second, the grid size should be adjusted according to the differences in pollution factors. In areas with high leaf fall, such as the windward side of the pool and the pool edge near trees, and areas where sediments are prone to accumulate, such as low-lying pool bottoms and areas with high human traffic, the grid size should be reduced to improve the spatial accuracy of subsequent leaf and sediment distribution prediction. In areas with low pollution risk, 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 in relation to robot operation parameters. The maximum effective operation radius of a single robot movement and the coverage range of the collection device should be used as a basis to ensure that a single grid can be cleaned by a robot in one positioning operation. This avoids the problem of a single operation being unable to cover a large grid or a small grid increasing the frequency of robot movement and energy consumption, thereby improving the matching degree of path planning and actual operation.

[0022] In addition, a dynamic adjustment mechanism can be introduced to optimize the grid division periodically based on real-time environmental data such as water flow speed, wind direction changes, and pollution frequency of different grids in historical cleaning data. For example, during the rainy season when leaf fall increases, the pool edge grid can be temporarily refined. During the pool water change period, the grid boundaries can be adjusted according to the water flow direction to ensure that the grid division always adapts to the actual pollution distribution and cleaning needs. Finally, by establishing grid division evaluation indicators such as grid pollution prediction error rate, robot operation coverage rate, and invalid movement distance proportion, the scheme can be continuously iteratively optimized to ensure that the division effect meets the dual goals of accurate cleaning and efficient operation.

[0023] The steps S101 and S102 described above, obtaining the distribution of trees around the target pool and dividing the grid area according to the pool structure, are the basic premise for realizing accurate cleaning. This step explicitly identifies the core source of fallen leaves to avoid directional bias in subsequent prediction, while avoiding the limitations of traditional pool cleaning, which is a whole and extensive evaluation. The distribution prediction and collection task planning of fallen leaves and sediments in the subsequent steps can be located to a specific spatial unit, providing a unified spatial coordinate reference for subsequent steps, ensuring the spatial relevance and consistency of all technical links, and avoiding the invalid investment of cleaning resources in areas without fallen leaves or sediments.

[0024] In the embodiment of the application, the fallen leaf distribution prediction model of the spatio-temporal graph neural network is a model specially used for predicting the spatial distribution of fallen leaves in the future period of the pool. The core is to build a spatio-temporal graph structure containing tree-related information, combine neural networks to mine the fallen leaf propagation law in the spatio-temporal dimension, and finally output the fallen leaf probability of each grid area of the pool. In the initial stage of model construction, the surrounding trees of the target pool need to be fully information collected to determine the node features, such as distinguishing the tree species of each tree through visual recognition equipment, measuring the tree height using laser ranging tools, calculating the shortest distance from the tree to the pool edge with the help of geographic positioning tools, and then retrieving the fallen leaf records of the tree in the same season under similar weather to determine the historical fallen leaf amount. After integrating these information, it is used as the basic features of each tree corresponding node, ensuring that the node can accurately reflect the fallen leaf potential and influence range of a single tree.

[0025] Further optionally, the nodes in the fallen leaf distribution prediction model correspond one-to-one to the trees, the node features include the tree species, tree height, distance from the pool, and historical fallen leaf amount of the corresponding tree, and the edge features are constructed based on the relative position, position, and wind direction propagation relationship of the trees. Further, the edge features include the relative position, relative distance, and wind direction transmission weight between the trees. Further, the fallen leaf distribution includes a fallen leaf probability matrix corresponding to the pool grid area, and each matrix element in the fallen leaf probability matrix is used to represent the predicted probability value of the corresponding pool grid area appearing fallen leaves in the future preset period.

[0026] For example, in the construction method of edge features, further optionally, the latitude and longitude coordinates of each tree are obtained by positioning tools, the coordinate difference between any two trees is calculated to determine the relative position, and the straight-line distance between the two trees is calculated as a relative distance parameter. For the wind direction transmission weight, the degree of fit between the wind direction and the connection direction of any two trees needs to be analyzed in combination with the hourly wind direction data of the future preset period, such as when the wind direction is consistent with the connection direction of the two trees, the fallen leaves of the tree upwind may be affected by the wind direction and indirectly affect the surrounding area of the tree downwind. At this time, the weight of this influence needs to be adjusted according to the wind speed, and the relative position, relative distance, and wind direction transmission weight are integrated to form edge features that characterize the interaction between trees.

[0027] The fallen leaf distribution prediction model runs, the spatio-temporal graph neural network first analyzes the spatial dimension of the constructed graph structure, captures the influence of the distribution of different trees in space on the fallen leaf propagation path, such as the tree near the pool and the tree with high height, the fallen leaves are more likely to directly fall into the pool. At the same time, combined with the time dimension weather change data, such as the increase and decrease of wind speed in the future period, the change of wind direction, the prediction logic of fallen leaf propagation is dynamically adjusted. In the prediction process, the model will map the fallen leaf potential and propagation law of each tree to each grid area of the pool, such as the broad-leaved tree at the windward side, in windy weather, its fallen leaves are more likely to fall into the downwind side grid of the pool. The fallen leaf distribution prediction model will increase the fallen leaf probability value of these grids, and finally integrate the probability information of all grids to generate a fallen leaf probability matrix, which clearly presents the possibility of each pool grid appearing fallen leaves in the future period.

[0028] Taking an open-air pool in a community as an example, three trees are planted around the pool, which are an adult camphor tree, a young osmanthus tree and a ginkgo tree. When constructing the model node, the node characteristics of the camphor tree will be marked as evergreen tree species and large historical fallen leaf amount, tree height 8 meters, distance from pool edge 3 meters. The node characteristics of the osmanthus tree are marked as evergreen tree species, medium historical fallen leaf amount, tree height 3 meters, distance from pool edge 5 meters. The node characteristics of the ginkgo tree are marked as deciduous tree species, autumn historical fallen leaf amount increases sharply, tree height 6 meters, distance from pool edge 4 meters. When constructing the edge characteristics, the relative position of the camphor tree and the osmanthus tree is calculated as northwest-southeast, the straight line distance is 4 meters, and if the future preset period is dominated by northwest wind, the camphor tree as the upwind tree has higher wind direction transmission weight to the osmanthus tree. The fallen leaf distribution prediction model runs, combined with the wind speed of northwest wind, it is judged that the fallen leaves of the camphor tree are more likely to be blown to the southeast grid of the pool, the fallen leaves of the osmanthus tree are less affected to the pool grid due to the long distance and low tree height, and the fallen leaves of the ginkgo tree have less contribution to the fallen leaf probability of each grid if it is in the non-fallen leaf season. Finally, in the generated fallen leaf probability matrix, the probability values of the southeast and south grids of the pool are obviously higher than those of other areas, which provides a clear direction for subsequent cleaning task planning.

[0029] As an optional embodiment, in step S103, first, the fine-grained weather data of the area where the target swimming pool is located in the future preset period is obtained, and the 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, eliminate the dimensional difference, and obtain the weather feature vector with unified dimensions. Further, the node feature basic parameters of each tree around the target swimming pool are extracted, wherein the node feature basic parameters include: the tree species corresponding to the tree species leaf fall period, the leaf adhesion force pre-defined coefficient, the actual tree height, the shortest straight line distance from the tree trunk of the tree to the edge of the swimming pool, and the historical daily average leaf fall amount in the same season and similar weather condition period; the node feature basic parameters of each tree are multiplied with the weather feature vector to obtain the fusion node feature of each tree. Then, based on the latitude and longitude coordinates of each tree, the relative position coordinates and straight line distance between any two trees are calculated as the relative position parameters and relative distance parameters in the edge feature, respectively; according to the hourly wind direction in the weather feature vector, the wind direction transmission weight between any two trees is calculated; the angle between the connection direction of the two trees and the hourly wind direction is taken as a parameter, and the product of the cosine value of the angle and the hourly wind speed is divided by the historical maximum wind speed of the swimming pool network area to obtain the wind direction transmission weight, thereby obtaining the edge feature set containing the relative position parameters, the relative distance parameters and the wind direction transmission weight of the two trees. Then, the trees around the target swimming pool are taken as graph nodes, the correlation between any two trees is taken as graph edges, the fusion node feature is taken as node attribute, and the edge feature set is taken as edge attribute, to construct the input graph structure of the spatio-temporal graph neural network. Finally, the input graph structure is input into the pre-trained leaf fall distribution prediction model to obtain the leaf fall probability matrix.

[0030] Specifically, in step S103, first, the fine-grained weather data of the area where the target swimming pool is located in the future preset period is obtained, and the fine-grained weather data usually includes hourly wind speed, hourly wind direction, cumulative precipitation, and average temperature. These data are usually obtained through meteorological observation platforms, micro-weather sensor arrays deployed around the swimming pool, etc., to ensure that key information such as hourly wind speed, hourly wind direction, cumulative precipitation, and average temperature can be obtained in real time or in advance. Since the dimensions of these data differ, such as wind speed in meters per second and temperature in degrees Celsius, direct use will affect the calculation accuracy of the model, so the Min-Max normalization method is used to process them. By mapping the data to a unified numerical interval, the dimensional difference is eliminated, and finally a weather feature vector with unified dimensions is formed, laying a foundation for subsequent fusion with other features.

[0031] Then, the node feature basic parameters of each tree around the target pool are extracted, wherein the leaf fall period of the tree species needs to be determined in combination with botanical data or long-term observation records. For example, the leaf fall period of evergreen tree species is significantly different from that of deciduous tree species, and the leaf fall period of deciduous tree species will be further shortened in a specific season. The predefined coefficient of leaf adhesion is set according to the characteristics of the tree species and the shape of the leaf. The coefficient value of the tree with thicker leaves and stronger leaf stalk adhesion is higher, and vice versa. The actual tree height is obtained by laser range finder or unmanned aerial vehicle aerial measurement, and the shortest straight line distance from the tree trunk to the edge of the pool is calculated by means of geographic information tools in combination with the positioning coordinates of the pool and the tree. The historical daily average leaf fall amount in the same season and similar weather conditions needs to be obtained by calling the past leaf cleaning records, visual monitoring data and other statistics of the pool. After obtaining these basic parameters, the node feature basic parameters of each tree are multiplied with the weather feature vector obtained before to form the fusion node feature of each tree, so that the weather factor can accurately act on the leaf fall characteristics of the tree. For example, when the weather feature vector contains a high wind speed, the possibility of leaf fall of the tree will be enhanced through fusion, and finally the fusion node feature of each tree is formed.

[0032] Subsequently, the edge feature is calculated. First, based on the latitude and longitude coordinates of each tree, the relative position coordinates between any two trees are calculated by coordinate difference, and the spatial orientation relationship between the two is determined. At the same time, the straight line distance between the two trees is calculated by the distance formula between two points. These two results are used as the relative position parameter and the relative distance parameter in the edge feature. For the calculation of the 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 included angle between the direction and the hourly wind direction is calculated. The cosine value of the included angle reflects the degree of fit between the wind direction and the direction of the line connecting the trees. When the included angle is smaller, the cosine value is closer to 1, indicating that the wind direction is more consistent with the direction of the line connecting the trees. Then, the cosine value is multiplied by the corresponding hourly wind speed, and then divided by the maximum wind speed monitored in the area where the pool is located. In this way, the wind direction transmission weight is controlled within a reasonable range, avoiding abnormal weight caused by extreme wind speed. Finally, the relative position parameter, the relative distance parameter and the wind direction transmission weight are integrated to form the edge feature set between each pair of trees.

[0033] When constructing the input graph structure of the spatio-temporal graph neural network, each tree around the target pool is taken as an independent node in the graph, and the spatial correlation and wind direction influence between any two trees are taken as the edges in the graph. At the same time, the fusion node feature obtained before is assigned to the corresponding node as the node attribute, and the edge feature set is assigned to the corresponding edge as the edge attribute, so that the whole graph structure can not only reflect the individual characteristics of the trees, but also reflect the interaction between the trees, meeting the structure requirements of the input data of the spatio-temporal graph neural network.

[0034] Finally, the constructed input graph structure is input into the pre-trained fallen leaf distribution prediction model. The model has been trained with a large amount of tree distribution data, weather data, and fallen leaf distribution data in different pool scenarios, and has the ability to identify the spatio-temporal correlation between tree characteristics, weather factors, and fallen leaf distribution. After the model runs, it will analyze the propagation range and probability of fallen leaves of each tree in the future preset period based on the input graph structure information, and correspond to each grid area of the pool. Finally, the fallen leaf probability matrix is output, clearly presenting the prediction of fallen leaves in each pool grid area.

[0035] Taking an open-air pool in a certain community as an example, there are three trees around the pool, one adult camphor tree, one five-year-old ginkgo tree, and one three-year-old osmanthus tree. During implementation, the future 24-hour fine-grained weather data is obtained through the meteorological sensor in the community, including hourly northwest wind, average wind speed, light precipitation, and average temperature. After Min-Max standardization processing, the weather feature vector is obtained. When extracting node feature basic parameters, the camphor tree is labeled as evergreen species, long leaf fall period, high leaf adhesion coefficient, tree height 7 meters, distance from pool 4 meters, and historical daily average leaf fall amount in the same period. The ginkgo tree is labeled as deciduous species, short autumn leaf fall period, medium leaf adhesion coefficient, tree height 5 meters, distance from pool 3 meters, and historical daily average leaf fall amount in the same period. The osmanthus tree is labeled as evergreen species, long leaf fall period, high leaf adhesion coefficient, tree height 2 meters, distance from pool 6 meters, and historical daily average leaf fall amount in the same period. Then these parameters are fused with the weather feature vector. The fusion of northwest wind and the easy propagation characteristics of ginkgo tree fallen leaves will enhance the influence weight of its node characteristics. When calculating edge characteristics, the camphor tree is in the northwest direction of the ginkgo tree, the straight-line distance between the two is 5 meters, the wind direction is consistent with the line direction, the angle cosine value is close to 1, and after multiplying the wind speed and dividing by the historical maximum wind speed, a higher wind direction transmission weight is obtained. The wind direction transmission weight of ginkgo tree and osmanthus tree, and camphor tree and osmanthus tree is lower. After constructing the input graph structure, the pre-trained model is input. The model analysis shows that the ginkgo tree is more likely to fall into the north and west grids of the pool due to its short leaf fall period, close distance to the pool, and assistance of northwest wind. The fallen leaves of the camphor tree have a small impact on the pool grid due to their high adhesion and slightly distant distance. The fallen leaves of the osmanthus tree have a negligible impact due to their distant distance. In the final output fallen leaf probability matrix, the probability values of the north and west grids of the pool are significantly higher than those of other regions.

[0036] It can be understood that the specific process of inputting node features and edge features into the spatio-temporal graph neural network model is illustrated by taking the scene of a community open-air swimming pool and the surrounding three trees (camphor tree, ginkgo tree, and osmanthus tree) as an example. First, feature preparation is completed. The future 24-hour fine-grained weather data is obtained through the meteorological sensor, and the weather feature vector containing hourly wind speed, wind direction, temperature, and precipitation is obtained by Min-Max standardization. Then, the node feature basic parameters of the three trees are extracted. The camphor tree is an evergreen tree species with a long leaf fall period, high leaf adhesion coefficient, a tree height of 7 meters, a distance of 4 meters to the swimming pool, and a small amount of historical daily average leaf fall. The ginkgo tree is a deciduous tree species with a short leaf fall period, a medium leaf adhesion coefficient, a tree height of 5 meters, a distance of 3 meters to the swimming pool, and a large amount of historical daily average leaf fall. The osmanthus tree is an evergreen tree species with a long leaf fall period, a high leaf adhesion coefficient, a tree height of 2 meters, a distance of 6 meters to the swimming pool, and a small amount of historical daily average leaf fall. The basic parameters of each tree are multiplied element by element with the weather feature vector to form a fusion node feature vector that better reflects the characteristics of the tree. Finally, three unified node feature vectors are obtained, each corresponding to one of the three trees.

[0037] Next, in the leaf fall distribution prediction model of the spatio-temporal 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 the ginkgo tree are northwest-southeast, with a straight-line distance of 5 meters. The relative positions of the camphor tree and the osmanthus tree are northeast-southwest, with a straight-line distance of 8 meters. The relative positions of the ginkgo tree and the osmanthus tree are east-west, with a straight-line distance of 6 meters. Then, the wind direction transmission weight is calculated based on the northwest wind data in the weather feature vector. The angle between the camphor tree and the ginkgo tree connection direction and the northwest wind is small, and the cosine value is close to 1. After multiplying the wind speed and dividing by the historical maximum wind speed, a higher weight is obtained. The camphor tree and the osmanthus tree, and the ginkgo tree and the osmanthus tree have a large angle between the connection direction and the wind direction, resulting in a lower weight. Finally, three groups of edge feature vectors are formed, each containing relative position, relative distance, and wind direction transmission weight.

[0038] Subsequently, in the leaf fall distribution prediction model of the spatio-temporal graph neural network, the model input structure is constructed. The three trees are taken as the three nodes of the spatio-temporal graph neural network, and the node attributes are assigned as the corresponding fusion node feature vectors. The association between any two trees is taken as the edge of the graph, and the edge attributes are assigned as the corresponding edge feature vectors. At the same time, time dimension information is added, and the future 24 hours are divided into 24 time steps, each corresponding to a group of real-time weather feature updated node and edge features, forming a graph structure data of spatio-temporal sequence.

[0039] Exemplarily, when constructing the comprehensive evaluation matrix, the 24 time step data (corresponding to the distribution of each hour in the future 24 hours) contained in the leaf fall probability matrix and the sediment concentration matrix are first extracted as grid-level time sequence features based on the swimming pool grid as the core dimension, rather than directly using single time step data. Specifically, for each swimming pool grid, the leaf fall probability time sequence features in the 24 time steps are first calculated, including the time step corresponding to the peak value of the leaf fall probability (for example, the leaf fall probability of a certain grid reaches 85% at the 5th time step in the future 5 hours, which is the peak value of the whole day), the duration of the peak value (for example, the probability is more than 70% in the 5th-7th time step) and the average leaf fall probability in 24 hours. At the same time, the sediment concentration time sequence features in the 24 time steps of the grid are calculated, including the time step of the peak value of the sediment concentration, the duration of the concentration exceeding the preset threshold (for example, 10 mg / L) and the average concentration. On this basis, the sediment risk level (for example, high, medium and low) corresponding to each time step is bound with the leaf fall probability and the sediment concentration of the time step to form associated data containing grid, time step and three-dimensional pollution features. For example, the 3rd time step of a certain grid: leaf fall probability 60%, sediment concentration 12 mg / L, risk level medium. Then, the 24 time step associated data is integrated into the comprehensive pollution index of the grid by a weighted fusion algorithm, wherein the pollution data in the robot operation period (for example, within the future 8 hours, corresponding to 8 time steps) is given a higher weight (for example, weight 0.6), and the pollution data in the non-operation period (for example, 16-24 hours in the future, corresponding to 8 time steps) is given a lower weight (for example, weight 0.2), balancing the urgent pollution that needs to be cleaned at present and 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 indexes of all grids together constitute the comprehensive evaluation matrix.

[0040] Exemplarily, when setting the priority rules, the time sequence characteristics of 24 time steps need to be converted into the priority judgment basis of the dual dimensions of pollution intensity and time urgency, rather than relying only on a single pollution value. First, based on the time sequence characteristics of each grid in the comprehensive evaluation matrix, the pollution period type is divided. If the peak value of the leaf fall probability and the peak value of the sediment concentration of a certain grid are concentrated in the future 1-4 hours (corresponding to 4 time steps), and the risk level of the sediment in this period is ≥ medium, it is determined as an emergency high pollution period grid. If the peak value is concentrated in the future 5-12 hours (corresponding to 8 time steps), and the risk level is ≥ medium, it is determined as a recent high pollution period grid. If the peak value is concentrated in the future 13-24 hours (corresponding to 12 time steps), it is determined as a long-term potential pollution grid. Secondly, combined with the robot operation ability (such as single endurance corresponding to 1 time step, single operation can cover 5 grids), the highest priority is given to the emergency high pollution period grid, which needs to be included in the core collection area of the initial collection task, and the time step corresponding to it needs to match the first operation period of the robot (such as the first operation period of the robot is 1-2 hours in the future, corresponding to 2 time steps, then the emergency high pollution period grid in this period is preferentially covered). The near-term high pollution period grid is included in the potential risk area, and the priority is second. The time step corresponding to it needs to match the subsequent operation period of the robot (such as the second and third operation periods). The long-term potential pollution grid is temporarily included in the regular monitoring area, and the priority is the lowest. After the time step data is updated (such as every 6 hours), the priority is re-evaluated. At the same time, the priority rules will also consider the pollution superposition effect. If the leaf fall probability of a certain grid exceeds 70% and the sediment concentration exceeds 15 mg / L in the same time step (such as the 6th time step), the priority of the grid in that time step will be additionally increased, avoiding the misjudgment of priority due to single pollution evaluation, and ensuring that the priority reflects the pollution difference of different time steps and meets the actual needs of the robot time period operation.

[0041] Finally, in the fallen leaf distribution prediction model of the spatio-temporal graph neural network, the model input is obtained. Specifically, the spatio-temporal graph structure data is first converted into a format recognizable by the model. The node features are stored in a matrix form, with rows representing nodes, columns representing feature dimensions, and the third dimension representing time steps. The edge features are stored in a three-dimensional tensor form, recording the edge features between each pair of nodes at different time steps. The adjacency matrix records the connection relationship between nodes, with a value of 1 for connected edges and 0 for no connection. These data are input into the spatio-temporal graph neural network. The model first passes through a spatial convolution layer to adjust the information transmission weight between nodes using edge features. For example, the fallen leaf influence information transmission between camphor trees and ginkgo trees is higher due to the high edge feature weight. Then, the model passes through a temporal convolution layer to capture the dynamic changes of node and edge features at different time steps. For example, when the wind speed increases at a certain time step, the fallen leaf contribution prediction of the ginkgo tree node feature to the swimming pool grid is adjusted accordingly. Finally, through multi-layer network operation, the fallen leaf probability matrix of the swimming pool grid area at each time step is output, completing the conversion from features to prediction results.

[0042] Further optionally, when the input graph structure is input into the pre-trained fallen leaf distribution prediction model, the spatial convolution layer learns the spatial correlation features between trees through a graph attention mechanism, such as the mutual shading or wind conduction influence of adjacent trees. The time sequence recurrent layer uses a Gated Recurrent Unit (GRU) to learn the time sequence influence features of weather changes on the fallen leaf process within a future preset period, such as the fallen leaf diffusion rate difference caused by wind speed changes. The spatial correlation features and time sequence influence features are spliced and fused to obtain spatio-temporal fusion features. The output layer maps the spatio-temporal fusion features to a fallen leaf probability matrix through a fully connected network. Specifically, the row and column dimensions of the fallen leaf probability matrix are consistent with the horizontal and vertical numbers of the swimming pool grid area, respectively. The value of each element in the matrix is the predicted probability value of the corresponding swimming pool grid area appearing fallen leaves within a future preset period, with a value range of 0 to 1, completing the prediction of the fallen leaf distribution.

[0043] It is worth mentioning that after the input graph structure is input into the pre-trained completed fallen leaf distribution prediction model, the spatial convolution layer first learns the spatial correlation features between trees through the graph attention mechanism. In implementation, for each tree node, the attention weight of the tree node with all other tree nodes in the surrounding is calculated, and the calculation process is closely combined with the relative position, relative distance and wind direction transmission weight in the edge feature. If two trees are close to each other and the connecting line direction is consistent with the wind direction, it means that the correlation between the two trees in the fallen leaf propagation is closer, for example, the ginkgo tree at the windward and the camphor tree at the leeward, because the wind direction transmission weight is high, the graph attention mechanism will allocate higher attention weight to the pair of nodes, so that the fallen leaf characteristic information of the ginkgo tree can be more prominently transmitted to the camphor tree node. At the same time, it can also capture the mutual shielding effect between trees, for example, if the tall camphor tree is located at the north side of the osmanthus tree, it will weaken the driving effect of the north wind on the osmanthus tree fallen leaf propagation, and the attention mechanism will reflect this shielding effect by reducing the weight between the two, and finally the weighted sum of the neighborhood information of each node is obtained to form a feature vector containing spatial correlation.

[0044] Then, the time sequence cycle layer adopts the gated recurrent unit GRU to learn the time sequence influence features of weather changes on the fallen leaf process in the future preset period. In implementation, the GRU receives the updated node features and weather data at each time step in units of preset time steps (such as 24 hours in the future, one time step per hour), and dynamically adjusts the retention and update of information through the built-in reset gate and update gate. In the time step with low wind speed, the fallen leaf diffusion rate is slow, and the GRU will retain the time sequence information of “slow diffusion” in this period through the update gate; when the wind speed increases in the subsequent time step, the update gate will adjust the weight to integrate the new information of “faster diffusion” into the time sequence feature, and the reset gate will filter out the outdated low-speed diffusion information, ensuring that the time sequence influence feature can accurately reflect the dynamic effect of weather changes on the fallen leaf process. For example, in the morning, the wind speed is small, and the time sequence feature reflects the trend that the fallen leaves are concentrated in the swimming pool grid around the tree; in the afternoon, the wind speed peaks, and the trend that the fallen leaves diffuse to further grids is reflected.

[0045] After the spatial correlation features and the time sequence influence features are extracted, the model will splice and fuse the two kinds of features to obtain the spatio-temporal fusion features. In implementation, the spatial correlation feature vector and the time sequence feature vector of each tree node are directly spliced in dimension, for example, the spatial feature vector contains information such as the correlation strength between trees, and the time sequence feature vector contains information such as the influence of weather at different time steps. After splicing, the spatio-temporal fusion features contain both the spatial information of “which trees have close correlation” and the time information of “how does the weather at different times affect the fallen leaves”, ensuring that the two key information is not lost, providing comprehensive support for the subsequent mapping of the fallen leaf probability to the swimming pool grid.

[0046] Finally, the output layer maps the spatio-temporal fusion features into a fallen leaf probability matrix through a fully connected network. In implementation, the fully connected network first converts the dimension of the spatio-temporal fusion features into a dimension matching the total number of pool grids through multiple layers of neurons. For example, if the pool is divided into a number of grids in the horizontal and vertical directions, and the total number of grids is N, the network will convert the fusion features into an N-dimensional feature vector. Then, the network will compress the value of each dimension to a range of 0 to 1 through an activation function. Finally, the N-dimensional vector is reshaped into a corresponding matrix according to the horizontal and vertical number of pool grids. The row dimension of the matrix is consistent with the horizontal number of pool grids, and the column dimension is consistent with the vertical number of pool grids. The value of each element in the matrix represents the predicted probability of fallen leaves in the corresponding pool grid area within the future preset time period.

[0047] Taking the camphor trees, ginkgo trees, and osmanthus trees around the community open-air pool as an example, the spatial convolution layer's graph attention mechanism will give higher attention weights to the ginkgo trees (fallen leaf species, close to the pool) and the camphor trees (upwind of the ginkgo trees) due to the wind direction transmission weight of the ginkgo trees (fallen leaf species, close to the pool) and the camphor trees (upwind of the ginkgo trees), highlighting the propagation correlation of the fallen leaves of the ginkgo trees driven by the wind around the camphor trees. The GRU of the time series recurrent layer will capture the change of low wind speed in the early morning and high wind speed in the afternoon when processing the weather in the next 24 hours. The time series features will show the trend of the accelerated spread of fallen leaves of the ginkgo trees in the afternoon. After the spatio-temporal fusion features are spliced, the fully connected network will map these features into a probability matrix of the pool grid. The grid element values of 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 of other areas, accurately reflecting the prediction result that fallen leaves are more likely to occur in these areas, thus completing the prediction of the fallen leaf distribution.

[0048] The above step S103 predicts the fallen leaf distribution through the fallen leaf distribution prediction model of the spatio-temporal graph neural network combined with the weather and tree distribution, improving the spatio-temporal accuracy and practicality of fallen leaf distribution prediction. In the model, the nodes correspond one-to-one to the trees and integrate features such as tree species, tree height, and historical fallen leaf amount to accurately depict the fallen leaf characteristics of individual trees. The design of the relative position wind direction transmission weight in the edge feature can effectively capture the spatial correlation between trees and the influence of wind direction on the spread of fallen leaves. The spatio-temporal graph neural network can simultaneously explore the correlation between the future time period in the time dimension and the tree pool grid in the space dimension. The finally output fallen leaf probability matrix converts the future fallen leaf distribution into quantifiable grid-level probability values, enabling the subsequent collection task to directly lock onto high fallen leaf risk grids, avoiding resource waste caused by traditional timed global cleaning, and improving the forward-looking and targeted nature of fallen leaf cleaning.

[0049] Step S104, acquire the multi-modal environment data and people flow state data around the target pool, and predict the sediment distribution in the future preset time period through the sediment prediction hybrid model.

[0050] In the embodiments of the present application, the sediment prediction hybrid model is constructed based on a spatio-temporal graph convolution network and a multi-view spatio-temporal graph attention network, and fluid mechanics equations and sediment motion equations are embedded into the sediment prediction hybrid model. Specifically, the sediment prediction hybrid model is a composite prediction model that combines data-driven modeling and physical law constraints, and the core goal is to accurately capture the distribution changes of the sediment in the pool in the space-time dimension. The architecture is based on a spatio-temporal graph convolution network (ST-GCN) and a multi-view spatio-temporal graph attention network (MST-GAT), and simultaneously embeds fluid mechanics equations and sediment motion equations, taking into account data correlation mining and physical law adaptation, and avoiding prediction bias that may occur in pure data-driven models that violates actual physical phenomena.

[0051] From the model infrastructure, the spatio-temporal graph convolution network (ST-GCN) is mainly responsible for extracting the spatio-temporal correlation features of the sediment distribution. In implementation, the model will first take the grid area of the target pool as the node in the graph structure, and the node features integrate multi-modal environmental data (such as water quality parameters, local water flow velocity, and water temperature of the pool grid), human flow state data (such as the human flow density and activity type of the grid), and historical sediment data (such as the sediment concentration of the same grid in the past period). The edges of the graph are constructed based on the fluid exchange strength between the pool grids (such as the material exchange frequency generated by the water flow circulation between adjacent grids), the spatial distance (the straight-line distance between the centers of the grids), and the indirect influence of human flow activities (such as the sediment migration driving of the surrounding grids by the dense grid of human flow), and the edge weight represents the sediment migration correlation degree between the grids. The ST-GCN processes the node feature changes at different time steps (such as every 2 hours within 24 hours in the future) through a time convolution layer, captures the dynamic migration trend of the sediment over time, and simultaneously mines the sediment diffusion relationship between adjacent grids through a spatial graph convolution layer, such as the high flow velocity of the grid near the water inlet driving the sediment to migrate to the downstream grid. The ST-GCN can convert this correlation into feature weights through spatial convolution, and strengthen the information transmission between related grids.

[0052] Multi-view spatio-temporal graph attention network (MST-GAT) is used to solve the adaptation problem of different pool grid sediment leading factors. In the implementation process, MST-GAT will calculate the attention weight of node features from the perspective of environmental dimension and people flow dimension, that is, in the grid area with dense people flow (such as pool entrance and children activity area), hair and impurities brought by people flow are the main source of sediment, MST-GAT will increase the attention weight of people flow state features (such as people flow density and historical foreign object carrying record), so that the model can focus more on capturing the influence of people flow on sediment. In the grid area with active water flow (such as water inlet, water outlet and pool bottom circulation area), water flow scouring and circulation driving are the core driving force of sediment migration, at this time the model will increase the attention weight of water flow features (such as water flow speed and flow direction) in the environmental dimension, and strengthen the effect of water flow on sediment distribution. At the same time, MST-GAT will fuse the moving trend features of historical sediment data with the attention weights of the two perspectives to form the final fusion attention weight, ensuring that the feature weight of each grid can match its actual leading factor and improving the accuracy of feature extraction.

[0053] It is worth noting that the sediment prediction hybrid model is embedded with fluid mechanics equations and sediment motion equations to constrain the rationality of the prediction results by physical laws. In specific implementation, the model will call the built-in Physics-InformedGNN module to first discretize the fluid mechanics equations and sediment motion equations that match the target pool space structure into algebraic relationships of nodes and edges in the graph structure. For example, according to the fluid mechanics equation, the water flow velocity difference between adjacent grids is calculated to convert into an adjustment coefficient of edge weight, ensuring that the characteristics of sediment migration from high flow velocity grid to low flow velocity grid conform to the water flow motion law. According to the sediment motion equation, the sedimentation speed of sediment with different particle diameters is calculated to convert into a constraint condition of the sedimentation rate parameter in the node feature, avoiding unreasonable prediction that small particle sedimentation speed is faster than large particle. At the same time, the sediment prediction hybrid model will construct a physical loss function to compare the predicted sediment concentration change and migration path with the theoretical value calculated by the physical equation, and optimize the model parameters through loss value back propagation, ensuring that the finally output sediment distribution strictly follows the physical laws such as gravity sedimentation and water flow migration, for example, the sediment concentration prediction value in the low-lying area of the pool bottom will be higher than that in the surrounding convex area, which conforms to the actual phenomenon that sediment accumulates in low-lying areas due to gravity.

[0054] Exemplarily, the fluid mechanics equation can be the Navier-Stokes equation describing the movement of water flow, and the sediment movement equation can be the Stokes equation calculating the gravity settling velocity, and the drag formula reflecting the resistance of particles. The embedded fluid mechanics equation can be the Navier-Stokes equation, which can adapt to the pool shape, pool bottom slope and water inlet and outlet position of the target swimming pool, accurately describe the velocity, pressure change and movement trajectory of the water flow, and provide a basis for analyzing the driving effect of water flow on the sediment, such as calculating the water flow vector of the grid downstream of the water inlet by the equation, supporting the prediction of the migration direction of the sediment with the water flow. The sediment movement equation includes the gravity settling equation (such as the Stokes equation) and the particle resistance formula, the former calculates the settling velocity of different types of sediment in combination with the water temperature of the swimming pool, the equivalent diameter of the sediment particles, and the like; and the latter reflects the resistance of the water body to the particles, and corrects the movement trajectory of the sediment. Both of them jointly constrain the movement law of the sediment, ensure that the prediction conforms to the physical common sense of gravity settling and water flow scouring, and avoid unreasonable situations such as small particle sediment settling faster than large particle, such as making the predicted value of the sediment concentration at the low-lying place of the pool bottom more in line with the actual accumulation law.

[0055] In actual operation, the sediment prediction mixed model will first receive multi-modal environment data and people flow state data, and convert them into node and edge features of a graph structure. Then the ST-GCN is used to extract the spatio-temporal correlation features, and the MST-GAT is used to dynamically allocate attention weights. Then, under the constraint of the physical model, the features are optimized and integrated. Finally, the sediment distribution results corresponding to the swimming pool grid area are output, including the sediment concentration matrix (reflecting the average concentration of each grid), the probability distribution of sediment types (such as the proportion probability of sand, hair, and metal debris), and the risk level (judging the pollution risk according to the concentration and type), which provides accurate sediment distribution basis for the subsequent planning of the initial collection task of the robot. For example, in a community swimming pool scene, the model will identify that the grid near the entrance is crowded with people, increase the weight of the people flow feature, and predict that the concentration of hair-type sediment in this area is high. At the same time, according to the direction of the water flow at the water inlet, it is predicted that the sediment will migrate to the middle grid of the swimming pool with the water flow, and due to the slope of the pool bottom, more sand will accumulate in the low-lying southwest corner grid. In the finally output concentration matrix, the values of the grids near the entrance and the southwest corner are significantly higher than those in other areas, which is highly consistent with the actual sediment distribution law of the swimming pool.

[0056] The step S104 is based on the sediment distribution prediction of the multi-modal data and the sediment prediction mixed model to achieve multi-factor fusion physical law adaptive precise prediction of the sediment distribution. The introduction of multi-modal environmental data and people flow state data comprehensively covers the main influencing factors of the sediment. The model fuses the spatio-temporal graph convolution network and the multi-view spatio-temporal graph attention network to solve the adaptation problem of the differences in the dominant factors of the sediment in different regions. More importantly, the embedding of the fluid mechanics equation and the sediment motion equation makes the prediction results strictly follow the physical law, avoiding the prediction deviation that may occur in the pure data-driven model that violates the physical common sense. The finally output sediment concentration matrix, the sediment type probability distribution and the risk level provide three-dimensional decision basis of the concentration type risk for the subsequent task planning, ensuring that the sediment cleaning can accurately match the pollution degree and pollution type of different grids.

[0057] As an optional embodiment, in step S104, first, the multi-modal environmental data is obtained through the sensor array deployed around the target pool and in the pool, and the people flow state data is obtained through the visual recognition device. The multi-modal environmental data includes pool water quality parameters, surrounding meteorological data, and pool structure data. For example, the multi-modal environmental data is obtained through the sensor array deployed around the pool and in the pool. The meteorological sensor arranged around the pool collects wind power, wind direction, air humidity and other surrounding meteorological data. The water quality sensor installed at different depths in the pool records water temperature, turbidity, water flow speed and flow direction and other water quality parameters. At the same time, the pool structure data is obtained through laser scanning or drawing analysis, including pool depth distribution, pool bottom slope, position and flow of water inlet and outlet and other information. The people flow state data includes real-time people flow density, personnel activity area, personnel activity type, and historical people flow foreign matter record. The people flow state data is collected by the visual recognition device (such as high-definition camera) arranged around the pool. Through image recognition technology, real-time people flow density, personnel activity area (such as pool edge rest area, shallow water area and water entry area), personnel activity type (such as swimming, playing and fighting) are extracted, and combined with historical management records, the people flow foreign matter record (such as hair, skin care product residue, and dust particles brought from outside) in different time periods is sorted out.

[0058] Further, after data collection is completed, preprocessing is required and an environmental flow time-space graph is constructed. That is, based on the collected multi-modal environmental data, flow state data and pool historical sediment data, preprocessing is performed, and an environmental flow time-space graph is constructed with each pool grid area as a node. Preprocessing includes cleaning of abnormal data (such as removing jump values caused by sensor failure), data normalization (such as mapping water flow velocity and flow density of different magnitudes to the same numerical range), and aligning historical sediment data (such as the concentration and type of sediment in each grid in the same period) with real-time data. When constructing the time-space graph, each pool grid area divided earlier is taken as a node of the graph, and the node features integrate the environmental features (such as local water temperature, water flow vector) of the grid, the flow features (such as average flow density, main activity type) and the historical sediment features (such as the average concentration and common type of sediment in the same period of the grid). Among them, the node features include the environmental features, 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 flow activity between pool grid areas, and the edge weight is used to represent the sediment migration correlation degree between pool grid areas. Specifically, the edges of the graph are constructed according to the relationship between the grids. Adjacent grids have frequent water exchange, high fluid exchange intensity, and large edge weight. The edge weight of grids with short spatial distance is relatively high. If the flow in a certain grid is dense, it has a strong driving effect on the sediment migration of the surrounding grids, and the weight of the corresponding edge will also be improved. The final edge weight comprehensively reflects the sediment migration correlation degree between grids.

[0059] Then, the node features in the environmental flow time-space graph are time-series convoluted by the ST-GCN layer in the sediment prediction hybrid model, the diffusion relationship and migration correlation relationship of the sediment between adjacent pool grid areas are captured by the spatial graph convolution layer, and the time-space distribution dependent features of the sediment are extracted. Specifically, the ST-GCN layer in the sediment prediction hybrid model starts processing the environmental flow time-space graph. The time-series convolution layer processes each node feature according to a preset time step (such as every 3 hours for 24 hours in the future), captures the dynamic changes of the sediment over time, such as the influence of the time-varying water inflow on the sediment migration of the downstream grid. The spatial graph convolution layer strengthens the information transmission between adjacent grids based on the edge weight, such as the low grid in the area with steep pool bottom slope receiving the sediment migration features of the high grid through spatial convolution, thereby capturing the diffusion relationship of the sediment accumulation in low places due to gravity, and finally extracting the sediment time-space distribution dependent features containing both time dynamics and spatial correlation.

[0060] Then, the multi-view spatio-temporal graph attention network MST-GAT layer in the sediment prediction hybrid model is used to allocate adaptive attention weights to the environmental dimension and the crowd state dimension in the environmental crowd spatio-temporal graph, and the adaptive attention weights are fused with the moving trend features of the historical sediment data to obtain the fused attention weights of the sediment. Specifically, the multi-view spatio-temporal graph attention network MST-GAT layer dynamically adjusts the feature weights. This layer calculates the attention weights from the two dimensions of environment and crowd, that is, in the water intake area where the crowd is dense, the hair and impurities brought in by the activities of the crowd are the main source of the sediment, and the multi-view spatio-temporal graph attention network MST-GAT will increase the adaptive attention weights of the crowd features (such as crowd density and foreign object bringing record), so that the model pays more attention to the influence of the crowd on the sediment. In the water intake area, the outflow area and other active water flow areas, the scouring and driving of the water flow are the dominant factors for the migration of the sediment, and the adaptive attention weights of the environmental features (such as water flow speed and flow direction) will be increased. Then, the model fuses the weights of the two dimensions with the moving trend features of the historical sediment (such as the sediment in a certain grid always migrates to the southeast direction with the water flow), to form the fused attention weights considering the regional characteristics and historical rules.

[0061] Finally, based on the spatio-temporal distribution dependent features of the sediment and the fused attention weights, the distribution of the sediment corresponding to the pool grid area is predicted. The distribution of the sediment includes the sediment concentration matrix corresponding to the pool grid area, the probability distribution of the sediment type, and the risk level of the sediment. Each matrix element in the sediment concentration matrix represents the average sediment concentration of the corresponding pool grid area in the future preset period. Specifically, the sediment prediction hybrid model predicts the distribution of the sediment based on the spatio-temporal distribution dependent features of the sediment and the fused attention weights. The fused features are mapped to the sediment concentration matrix corresponding to the pool grid through the fully connected layer, and each element in the matrix corresponds to the average sediment concentration of the grid in the future preset period. At the same time, the classification layer outputs the probability distribution of the sediment type of each grid (such as the probability of sand, hair, and metal debris), and combines the concentration and type to determine the risk level (such as the risk level of the grid with high concentration and sharp debris is high).

[0062] Taking a community pool as an example, the pool is provided with a shallow water area entry area (high human flow density), a deep water area (slow water flow), an inlet (located in the northeast side) and an outlet (located in the southwest side). During data collection, the visual equipment in the entry area captured a high human flow density, mostly children playing in the water. The inlet sensor recorded a strong water flow flowing to the southwest. The southwest corner of the pool bottom is lower due to the lower slope, and historical data shows that it is prone to accumulate sediment. When constructing the spatio-temporal diagram of the environment, the human flow characteristics of the entry area grid are prominent, the water flow characteristics of the grid around the inlet are significant, and the inlet and the southwest grid have higher edge weights due to the water flow. The ST-GCN layer captures the time sequence characteristics of the inlet water flow driving the sediment to migrate to the southwest, and the spatial correlation of the southwest corner grid receiving surrounding sediment due to the low-lying. The MST-GAT layer enhances the human flow feature weight in the entry area, predicting a high proportion of hair-like sediment in this area. In the inlet area, the water flow feature weight is enhanced, and its influence on the downstream grid is strengthened. In the final output concentration matrix, the concentration values of the entry area and the southwest corner grid are higher, and the type distribution shows that the entry area is mainly hair, and the southwest corner is mainly sediment, and the risk level is marked as medium-high, providing a clear basis for subsequent cleaning tasks.

[0063] Further optionally, assuming that the fluid mechanics equation embedded in the sediment prediction model includes the Navier-Stokes equation, based on this assumption, before predicting the sediment distribution in the future preset period through the sediment prediction hybrid model, the Physics-Informed GNN module in the sediment prediction hybrid model can be called to discretize the Navier-Stokes equation and the sediment motion equation matched with the spatial structure of the target pool into algebraic relations of nodes and edges. The physical relationship affecting the motion law of the sediment in the Navier-Stokes equation and the sediment motion equation is converted into the correlation between the physical characteristics and numerical characteristics of the nodes, so that the physical law is adapted to the graph structure data format in the spatial structure of the target pool. Further, the sediment prediction hybrid model is constrained by a physical loss function to output a sediment distribution that conforms to the physical law, so as to ensure that the sediment migration process in the sediment distribution conforms to the water flow motion law and the gravity sedimentation law in the target pool.

[0064] Specifically, before prediction by the sediment prediction hybrid model, the Physics-Informed GNN module built in the model needs to be called first to complete the adaptation and integration of the physical equation and the graph structure. In implementation, the module will first match the corresponding Navier-Stokes equation (the core equation describing fluid motion) and the sediment motion equation (the equation covering the laws of gravity settlement, particle resistance, etc.) according to the specific spatial structure of the target pool (such as pool shape, pool depth distribution, water inlet and outlet position, pool bottom slope, etc.). For example, for a pool with a clear slope at the bottom, the parameters of the gravity term in the equation will be adjusted to adapt to the change in water flow direction caused by the slope. For a pool with stable water inlet flow rate, the coefficients of the momentum term in the Navier-Stokes equation will be optimized to match the actual water flow state. Subsequently, the module will discretize these continuous physical equations into algebraic relationships of nodes and edges in the graph structure. Each pool grid area is regarded as a discrete node, and the algebraic relationship of the node corresponds to the calculation formula of the local water flow velocity, sediment concentration, particle diameter, etc. in the equation, such as the sediment settling velocity of a certain node, which can be directly calculated by the node's water temperature, particle equivalent diameter, etc. characteristics through the discretized sediment motion equation. The edges between grids correspond to the interaction terms of water exchange and sediment migration in the equation, such as the algebraic relationship of the edges between adjacent nodes, which reflects the influence of the upstream node water flow velocity on the downstream node sediment migration amount. By decomposing the continuous equation into algebraic forms of node local calculation and edge interaction calculation, the physical law can be integrated into the feature propagation process of the graph neural network.

[0065] The above Physics-Informed GNN module is responsible for embedding physical laws into the model to avoid the predicted results from deviating from reality. The module first discretizes the Navier-Stokes equation (a core equation describing fluid motion) and the sediment motion equation (describing the motion law of sediments in the fluid affected by gravity, buoyancy, and water flow thrust) that matches the target pool space structure: converting continuous equations into algebraic relationships based on spatiotemporal graph nodes and edges. Further optionally, the physical relationship affecting the motion law of sediments in the Navier-Stokes equation and the sediment motion equation is converted into the association relationship between the physical characteristics and numerical characteristics of the nodes, so that the physical law adapts to the graph structure data format in the target pool space structure. For example, the relationship between the water flow velocity in the Navier-Stokes equation and the sediment migration rate in the sediment motion equation is converted into the numerical association between the water flow velocity characteristics of a node and the sediment concentration change rate of adjacent nodes, so that the physical law adapts to the data format of the graph structure. Subsequently, the module constructs a physical loss function that calculates the deviation between the current output of the model (such as the migration direction and concentration change of sediments in a certain grid) and the result derived from the physical equation. For example, if the model predicts that the sediments in a certain grid migrate against the water flow direction, or do not reflect the sedimentation trend caused by gravity in deep water areas, the loss function will generate a large deviation value. This loss value and the prediction loss of the model (such as the error between the predicted concentration and the true concentration) work together to adjust the parameters of the ST-GCN and MST-GAT layers through backpropagation, ensuring that the model output always conforms to the water flow motion law and gravity sedimentation law, and avoiding results that violate physical common sense, such as rapid diffusion of sediments in still water areas, faster sedimentation of light-weight sediments than heavy-weight sediments, etc.

[0066] After the equation is discretized, the model output needs to be constrained by a physical loss function to ensure that the prediction results conform to the actual physical laws. During implementation, the physical loss function will first calculate the theoretical values of sediment migration and settlement in each grid area based on the algebraic relationship of the discretized nodes and edges. For example, according to the algebraic relationship of the discretized edges of the Navier-Stokes equation, the theoretical value of the amount of sediment migration that the downstream grid of the water inlet should receive is calculated. According to the algebraic relationship of the discretized nodes of the sediment motion equation, the theoretical settlement rate of the sediment in the low-lying grid at the bottom of the pool is calculated. Then, the predicted changes in sediment concentration and migration path are compared with these theoretical values, and the deviation between them is calculated, such as the difference between the predicted sediment migration amount of a certain grid and the theoretical value, and this deviation is included as a loss term in the total loss function of the model. During the model training and prediction iteration process, the parameters will be continuously optimized through backpropagation to reduce the deviation between the predicted value and the physical theoretical value, thereby avoiding the problems that may occur in purely data-driven models that violate physical common sense. For example, to prevent the prediction results from violating the laws of gravity settlement or water flow motion, such as small particles settling faster than large particles, sediment migrating against the direction of water flow, and the sediment concentration in the high grid at the bottom of the pool being higher than that in the low grid, etc., to ensure that the changes in sediment distribution in each grid can conform to the physical processes of water flow driving and gravity accumulation in the pool.

[0067] Taking a rectangular pool in a community as an example, the northeast side of the pool is the water inlet (water flows to the southwest side outlet), and the pool bottom is inclined from northeast to southwest (slightly lower in the southwest side). When calling the Physics-Informed GNN module, the Navier-Stokes equation suitable for the rectangular pool and the gentle slope structure will be matched, and the gravity component parameter in the equation along the slope direction will be adjusted, and the sediment motion equation containing the slope influence will be selected. During the discretization process, each grid of the pool is divided into nodes, and the node algebraic relationship includes the gravity settlement rate calculated based on the pool bottom height and the particle suspension ability calculated based on the local water flow velocity, and the edge algebraic relationship represents the positive correlation calculation formula between the water flow velocity of the upstream grid (northeast side) and the sediment migration amount of the downstream grid (southwest side). The physical loss function will calculate the theoretical values based on these algebraic relationships, such as the downstream grid in the southwest side should receive more migrated sediment than the upstream grid in the northeast side, and the sediment settlement rate in the low-lying grid in the southwest side should be higher than that in the high slope grid in the northeast side. During model prediction, if the preliminary prediction result shows that the sediment concentration in a certain high slope grid in the northeast side is higher than that in the low-lying grid in the southwest side, the physical loss function will capture this deviation that does not conform to the gravity law, and the model parameters will be adjusted through backpropagation, and the final output of the sediment distribution will show a reasonable result that the sediment migration amount in the downstream grid of the water inlet increases, and the sediment concentration in the low-lying grid in the southwest side is the highest, completely conforming to the physical laws of water flow driving and gravity settlement.

[0068] In step S105, an initial collection task of the target robot is generated for the spatial structure of the target swimming pool according to the leaf distribution and the sediment distribution. In the embodiments of the present application, the initial collection task includes a starting point, a covered water area, and an initial collection path.

[0069] In step S105, the initial collection task is generated according to the leaf distribution and the sediment distribution and the structure of the swimming pool, which realizes efficient task planning that matches the demand and the ability. This step takes two prediction results as core inputs, and clearly defines the core cleaning area and the regular monitoring area by fusing the high-probability grid of the leaves and the high-concentration or high-risk grid of the sediments, so as to avoid blind expansion of the cleaning range. In addition, the initial collection path contains a starting point that is preferentially near the core area, covers the water area near the high-risk area, and is adapted to the structure of the swimming pool, which not only ensures that the robot can quickly cut into high-priority work, but also reduces the risk of collision by avoiding fixed facilities in the swimming pool. In addition, the path planning is developed around the key area to reduce invalid movement, which sets an efficient basic action framework for subsequent work of the robot and avoids subjectivity and inefficiency in traditional manual path planning, thereby improving the standardization and efficiency of the initial work.

[0070] 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 associated with each grid to construct a comprehensive evaluation matrix. Based on the comprehensive evaluation matrix, a priority rule is set, and the priority is from high to low in turn as the core collection area, the single core area, the potential risk area, and the regular monitoring area. In addition, the adaptive weight of each grid area of the swimming pool is dynamically adjusted according to the use scene of the swimming pool. Further optionally, the swimming pool grid area with the leaf probability greater than a preset leaf threshold value in the leaf probability matrix, or the swimming pool grid area with the sediment concentration greater than a preset concentration threshold value in the sediment concentration matrix, or the swimming pool grid area with the high sediment risk level, is marked as the core collection area. The single core area is a grid that only meets the high value of the leaves or only meets the high value of the sediments, and the pollution degree is second, and the priority is lower than that of the core collection area. The potential risk area is a grid with medium levels of leaf probability and sediment concentration and medium risk level, and the priority is third. The regular monitoring area is the remaining grid that is not classified, and the priority is the lowest. At the same time, the priority rule dynamically adjusts the adaptive weight of each grid according to the use scene of the swimming pool, for example, when the swimming pool is about to be opened for children, the weight of the potential risk area near the entrance is increased to ensure that this area is preferentially included in the detailed cleaning range.

[0071] Further, the starting point is preferably set near the geometric center of the core collection area or at a pool edge position with the minimum sum of straight-line distances to multiple core collection areas, in combination with the spatial structure of the target pool, to ensure that the target robot enters a high-priority operation state directly after starting. Further optionally, the spatial structure of the target pool includes at least one of the following: pool robot parking position, water inlet position, water outlet position, and unobstructed passage. This step needs to combine the spatial structure of the target pool, including information such as pool robot parking position, water inlet position, water outlet position, and unobstructed passage. If the core collection area is concentrated in a certain area, the starting point is set near the geometric center of the area, which is convenient for the robot to start cleaning immediately. If the core collection area is scattered in different positions of the pool, the starting point is selected at a pool edge position with the minimum sum of straight-line distances to these core collection areas, and this position needs to be close to the unobstructed passage to avoid delaying high-priority operations due to path obstruction after the robot starts, such as the core collection areas of a certain pool being near the northeast pool edge and the southwest entrance, respectively. The starting point is selected at the middle pool edge position on the north side of the pool, which is close to both core areas and can quickly reach through the unobstructed passage.

[0072] Next, the initial collection task coverage area is determined based on priority. The determination logic strictly follows the priority order, which ensures that all core collection areas and potential risk areas are completely covered, avoiding omission of high-pollution or medium-pollution areas. For regular monitoring areas, they are included by sampling coverage every preset number of grids, reducing unnecessary operation range and reducing robot energy consumption. The initial collection task covers all core collection areas and potential risk areas, and samples coverage every preset number of grids for regular monitoring areas, avoiding grids where fixed facilities in the pool are located. The fixed facilities in the pool include stairs, underwater lights, and drains. At the same time, the determination process will avoid grids where fixed facilities in the pool are located, such as stairs, underwater lights, and drains. These facilities not only hinder the movement of the robot, but also may cause the cleaning device to collide with the facilities and be damaged, affecting the operation efficiency. For example, three stairs are installed on the east side of a certain pool, and when planning the coverage area, the grids within a 1-meter range around the stairs are excluded, and only the surrounding grids are cleaned.

[0073] Then, an improved A* path optimization algorithm is adopted to generate a continuous path node as an initial collection path with the shortest total path length, the optimal core area access sequence, and the least number of turns as the objective function. The route node contains the center coordinates of each core collection area and the sample coordinates of the potential risk area, and the straight-line distance between adjacent nodes does not exceed the maximum effective working radius of the target robot single movement. The route is planned along the direction of the pool water flow to reduce the impact of the pool water flow on the stability of the target robot operation. The direction of the pool water flow is based on the water flow vector output by the sediment prediction hybrid model. Specifically, the route planning is carried out along the direction of the pool water flow, and the direction of the pool water flow is from the water flow vector output by the sediment prediction hybrid model. Working along the direction of the water flow can reduce the impact of the water flow on the stability of the robot, and avoid the position deviation of the robot due to the counterflow, such as the water flow of a certain pool flowing from the northwest inlet to the southeast outlet. The initial collection path will start from the northwest core area, pass through the southeast core area and the potential risk area along the direction of the water flow, and finally cover the sampled regular monitoring area.

[0074] Further, for different grid areas in the initial collection path, the corresponding collection device parameters are matched. In the core collection area, if leaves are the main part, the floating object collection bin is enabled, and if sediments are the main part, the pool bottom sewage suction device is enabled. The potential risk area adopts dual-mode backup of the floating object collection bin and the pool bottom sewage suction device. According to the single operation capacity of the robot, the covered water area is divided into a preset number of continuous task segments, and the task duration of each segment does not exceed the single endurance limit of the target robot. For example, for different grid areas in the initial collection path, the corresponding collection device parameters are matched. In the core collection area, if it is judged by the comprehensive evaluation matrix that leaves are the main part, the robot will be enabled with a floating object collection bin to focus on collecting surface leaves. If it is judged that sediments are the main part, especially the sand and hair accumulated at the bottom of the pool, the pool bottom sewage suction device is enabled. Due to the uncertainty of the pollution type in the potential risk area, the dual-mode backup of the floating object collection bin and the pool bottom sewage suction device is adopted to ensure that both leaves and sediments can be cleaned in time. At the same time, according to the single operation capacity of the robot, the covered water area is divided into a plurality of continuous task segments, and the operation time of each task segment does not exceed the single endurance limit of the target robot, so as to avoid the interruption of the task due to insufficient power during the operation of the robot. For example, if the single endurance limit of a certain robot is 60 minutes, and the overall operation of the covered water area requires 90 minutes, the water area will be divided into two task segments, and the robot will return to the parking position to charge after 45 minutes of operation in the first segment, and then start the operation in the second segment.

[0075] Finally, through grid coverage calculation and route rationality check, the grid coverage calculation will focus on checking the coverage of the core collection area to ensure that the coverage of the core collection area reaches 100%, and the coverage of the potential risk area is not less than the preset standard. If there is an uncovered core grid or an unreasonable route segment, jump to the step of delimiting the coverage water area of the initial collection task based on priority, re-execute the step to adjust the initial collection task, and output the initial collection task containing the starting point coordinates, the coverage water grid list, the initial collection path node sequence, the task segment division, and the device parameter configuration. The route rationality check will check whether the route has a repeated path, whether there is a dead end that causes the robot to be unable to move, and the like. If it is found that there is an uncovered core grid or an unreasonable route segment in the route, it will return to the previous step for adjustment, such as supplementing the uncovered core grid to the coverage water area or re-planning the route node sequence to eliminate the repeated path. After multiple rounds of verification and confirmation that there is no error, the initial collection task containing the starting point coordinates, the coverage water grid list, the initial collection path node sequence, the task segment division, and the device parameter configuration is finally output, providing a clear guide for subsequent work of the robot.

[0076] Taking a community open-air swimming pool as an example, a plurality of trees are planted around the swimming pool, and the northeast side of the pool is close to the trees and has a high probability of falling leaves and a high concentration of sediments, so it is classified as a high-risk level and is listed as a core collection area. The southwest side of the pool is close to the trees and has a high probability of falling leaves, but the concentration of sediments is low, so it is listed as a single core area. The central area of the pool has a medium level of falling leaves and sediment concentration, and a medium risk level, which is a potential risk area. The deep water area of the pool is far away from the pollution source and belongs to the regular monitoring area. After constructing the comprehensive evaluation matrix, the priority of each area is determined according to the priority rules, and the adaptive weight of the potential risk area near the entrance is temporarily increased because the swimming pool will open a children's swimming course in the morning on weekends. The starting point is near the geometric center of the northeast core collection area, which is close to the robot docking position and has no obstructed path to allow the robot to quickly start work. The covered water area completely includes the northeast core area, the southwest single core area, and the central potential risk area, and the regular monitoring area is sampled every 2 grids, avoiding the 4 escalators and 2 underwater lights in the pool. The initial collection path generated by the improved A* algorithm follows the water flow direction of the pool from northeast to southwest, passing through 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 in turn, and the distance between adjacent nodes is within the single movement range of the robot. For the northeast core area, the pool bottom suction device is preferentially activated according to the real-time pollution ratio due to the large amount of falling leaves and sediments, and the floating object collection bin is switched after the sediments are cleaned. The southwest single core area only activates the floating object collection bin. The central potential risk area adopts a dual-mode backup. The robot has a single endurance of 60 minutes, and the total operation time of the covered water area is 75 minutes, so it is divided into two task segments, the first segment is 40 minutes, and the second segment is 35 minutes. After calculating the grid coverage, it is confirmed that the core area is 100% covered, the route has no repetition and dead end, and the final initial collection task is output to ensure that the robot can efficiently complete the cleaning.

[0077] In step S106, during the execution of the initial collection task by the target robot, the initial collection path in the initial collection task is dynamically adjusted according to 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 the temporarily appearing floating objects and sediments in the surrounding water area. For example, Figure 2 The cleaning scene shown, the target robot can remove the temporarily floating leaves on the left side and the sediments at the bottom on the right side, and remove the sediments outside the target pool.

[0078] The step S106 dynamically adjusts the initial collection path during the execution of the initial collection task by the target robot, effectively compensates for the short board that the initial prediction cannot cover the temporary burst situation, and realizes the closed-loop cleaning of forward-looking planning and real-time response. On the one hand, the real-time monitoring and identification of the temporary floating object or the precipitate solve the burst pollution problem that is not covered by the initial prediction. On the other hand, the dynamic adjustment mechanism includes the complete logic of calling the corresponding model path optimization inserting the temporary path point A* algorithm rearrangement order and the secondary confirmation of the existence of the object through the visual identification based on the object characteristics of floating or sinking. The logic guarantees the timely removal of the temporary object, balances the burst cleaning demand and the efficiency of the initial collection task through the constraints such as the controllable total working time increment of the temporary path point not exceeding the maximum moving range of the robot, avoids the chaos of the overall working rhythm caused by the dynamic adjustment, and finally realizes the real-time cleaning with no omission and high efficiency.

[0079] As an optional embodiment, in step S106, during the execution of the initial collection task by the target robot, the initial collection path in the initial collection task is dynamically adjusted according to 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 the floating object and the precipitate temporarily appearing in the surrounding water area. The method comprises the following steps: collecting monitoring image data in the surrounding water area of the target robot in real time; identifying potential collection objects in the surrounding water area based on the monitoring image data; wherein the potential collection objects at least include the floating object and the precipitate temporarily appearing; calling a trajectory prediction model of a corresponding type based on the type to which the potential collection object belongs, and obtaining a motion trajectory of the potential collection object through the trajectory prediction model; and 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 the potential collection objects temporarily appearing in the surrounding water area.

[0080] Specifically, during the execution of the initial collection task by the target robot, the core of dynamically adjusting the initial collection path is to respond to the floating object and the precipitate temporarily appearing in real time, so as to ensure the comprehensiveness and timeliness of cleaning. This process starts from real-time data collection. The high-definition underwater camera and the water surface image sensor carried by the robot will continuously shoot the surrounding water area, usually generating one frame of monitoring image every 0.5 seconds. At the same time, the water quality sensor data (such as local turbidity change) equipped on the robot body is combined to form multi-source monitoring data, which provides rich basis for subsequent object identification. These data are transmitted back to the control system in real time through the wireless transmission module, ensuring the timeliness of information processing. For example, when a certain pool robot is cleaning the northeast core area, the camera captures the images of the water surface and the pool bottom within a range of 3 meters around every 0.5 seconds, and synchronously records the turbidity value change of the area.

[0081] When identifying potential collection objects based on monitoring image data, the system calls a pre-trained image recognition model that is trained through a large amount of labeled data (such as samples of fallen leaves, plastic bottles, and mud balls under different light and water flow conditions) and can accurately distinguish between temporary floating objects (such as leaves blown in by the wind or plastic cups dropped by tourists) and sediments (such as mud balls that suddenly gather or hair clots) while excluding the influence of fixed pool facilities (such as inverted ladders or underwater light line interference). During the identification process, the model outputs the object's category, size, current coordinates, and movement state (such as stationary sediments or floating objects moving with the water flow), for example, when the robot is working in the single core area on the southwest side, the image recognition model finds a circular floating object about 10 cm in diameter, determines it to be a plastic bottle, and locates it at 1.2 meters southeast of the robot, slowly moving westward with the water flow.

[0082] After determining the type of potential collection object, the corresponding trajectory prediction model is called to obtain its motion trajectory. The trajectory prediction model for floating objects is mainly based on the Long Short-Term Memory (LSTM) network, as floating objects are significantly affected by water flow and wind, the model training data includes historical floating object motion trajectories (such as the movement path of fallen leaves under different wind and water flow speeds) and corresponding environmental parameters (real-time water flow vector, wind size), which can learn the motion rules of floating objects under dynamic environmental changes. The trajectory prediction model for sediments combines the Gated Recurrent Unit (GRU) and physical rules, as sediments move mostly on the pool bottom and are more affected by gravity, pool bottom slope, and local water flow scour, the model integrates pool bottom slope data and water flow friction on the pool bottom calculation logic, making the prediction more consistent with the actual settlement and migration trend. For example, for the identified plastic bottle (floating object), the floating object trajectory prediction model is called, and parameters such as the current water flow speed (0.3 meters per second westward) and wind (gentle wind eastward) are input, the model outputs the motion trajectory of the plastic bottle in the next 10 seconds, first moving slowly westward, then slowing down due to the influence of the gentle wind after 5 seconds, and finally reaching the robot's west side 0.8 meters away after 10 seconds.

[0083] When dynamically adjusting the initial collection path based on the predicted trajectory, the system calculates the deviation of the future position of the potential collection object from the current path of the robot. If the deviation exceeds the effective working range of the robot (for example, the current route of the robot is a straight line west, and the plastic bottle will appear 10 seconds later at a position 0.5 meters north of the route), the path correction mechanism is started. The correction logic is based on the principle of minimizing deviation from the original route. By fine-tuning the turning angle and moving speed of the robot, it can quickly return to the original path after intercepting the potential object, avoiding excessive deviation affecting the cleaning progress of the core area. For example, for the above-mentioned plastic bottle, the system calculates that the robot only needs to fine-tune the direction by 15 degrees north, and maintain the original speed for 3 seconds, so that it can include the plastic bottle in the collection range before it reaches the predicted position. After collection, fine-tune the direction by 15 degrees south to return to the original route. The entire adjustment process only increases the path length by 2 meters, which has little effect on the overall task time.

[0084] For identified sediments (such as suddenly accumulated mud balls), due to slow movement and sliding along the pool bottom slope, the trajectory prediction model outputs the settlement position of the sediment within the next 30 seconds. The system adjusts the starting time of the robot's pool bottom suction device and adds a node at the settlement position in the path to ensure accurate suction when passing through. If the potential object is identified as a fixed sediment (such as impurities that suddenly accumulate due to water flow stagnation), a temporary node is inserted at the original path to continue the original route after cleaning.

[0085] Taking a hotel pool as an example, when the robot performs the initial collection task, it cleans the core area along the water flow direction (from north to south), and real-time image recognition detects a large piece of fallen leaves (temporary floating object) on the north side of the water surface, which is moving south with the water flow. The trajectory prediction model predicts that the fallen leaves will reach the path 1 meter in front of the robot in 20 seconds based on the current water flow speed (0.2 meters / second). It is determined that there is no need to adjust the path significantly, and only the original direction and speed need to be maintained to capture the fallen leaves through the floating object collection bin when they arrive. Subsequently, when the robot cleans the potential risk area, the pool bottom camera finds a 20-centimeter-diameter hair sediment, and the trajectory prediction model predicts that it will slowly slide to the south direction 0.5 meters in 1 minute based on the pool bottom slope (inclined south). A temporary node is added to the original path at the sliding endpoint, and the pool bottom suction device is activated to remove the sediment when the target robot reaches the location. After that, it continues to complete the remaining cleaning task along the original route, and the entire process not only handles the temporarily appearing object, but also does not significantly affect the execution efficiency of the initial collection task.

[0086] Further optionally, based on the type of the potential collection object, a trajectory prediction model corresponding to the type is called, and a motion trajectory of the potential collection object is obtained through the trajectory prediction model, including: based on visual features of the monitoring image data and characteristics of the swimming pool environment, the potential collection object is divided into floating objects and sinking objects; wherein the visual features include morphology, density, and suspension state; the floating objects include at least one of the following substances with a density less than water: temporary fallen leaves, plastic impurities, and foam; the motion of the floating objects is mainly affected by the water flow speed, the water flow direction, and the wind force around the swimming pool; the sinking objects include at least one of the following substances with a density not less than water: silt particles, hair clumps, and metal debris; the motion of the sinking objects is affected by gravity settling, pool bottom water flow scouring, and circulation at the pool inlet or outlet; according to the classification result, a corresponding pre-trained trajectory prediction model is called; for the floating objects, a space-time fluid coupled trajectory model is called, which is constructed based on a space-time graph convolution network ST-GCN and a simplified fluid mechanics equation, and the input features include initial position coordinates of the floating objects collected by a multi-source sensor, water flow vectors of the swimming pool grid area, peripheral wind direction data, a pre-calibrated swimming pool boundary reflectivity, and motion trajectory samples of historical floating objects of the same type; the multi-source sensor for the floating objects includes a visual recognition device, an underwater flow sensor, and a micro weather sensor; for the sinking objects, a settling trajectory model is called, which is constructed based on the sedimentation prediction hybrid model, and embeds a gravity settling equation and a particle resistance formula, and the input features include initial suspension height of the sinking objects collected by a multi-source sensor, particle equivalent diameter, pool water temperature, local water flow speed, pool bottom slope, and historical sedimentation rate data; the multi-source sensor for the sinking objects includes an underwater monitoring device, a visual recognition device, an underwater temperature sensor, a flow sensor, and a laser range finder; through the space-time fluid coupled trajectory model or the settling trajectory model, motion trajectory data of the potential collection object is generated in time steps of a preset time period in the future, and the motion trajectory data includes predicted position coordinates, motion speed size, and direction vector of each time node of the potential collection object.

[0087] The fluid mechanics equation includes a simplified fluid mechanics equation. The simplified fluid mechanics equation can be obtained by simplifying the classical fluid mechanics equation (such as the Navier-Stokes equation) according to the characteristics of the semi-closed swimming pool and the relatively stable water flow, and is used to quantify the correlation between the water flow, the wind force and the movement of the floating object. Further, the simplification of the classical fluid mechanics equation is based on the fact that there is no strong turbulence in the swimming pool water area, and the flow velocity is in the low Reynolds number range, so the complex turbulent viscosity term and the nonlinear inertia term in the original equation are ignored, only the viscosity force term and the pressure gradient term directly related to the movement of the floating object are retained, and the effect of the wind on the water surface is modified. The wind direction data around the swimming pool are converted into the shear stress on the water surface, which is superimposed on the water flow velocity vector calculation to form a local flow field calculation model suitable for floating objects (such as fallen leaves and plastic impurities). In the space-time fluid coupling trajectory model, the size and direction of the thrust of the water flow on the floating object in different grid regions are calculated by the simplified fluid mechanics equation as a physical constraint term for learning the space-time correlation features by the ST-GCN layer, so as to avoid deviation of the model prediction from the water flow action rule.

[0088] The gravity settling equation can be a Stokes settling equation suitable for the low flow velocity and small particle scenario in the swimming pool, which is used to calculate the theoretical settling velocity of the settling object (such as silt particles and hair clumps) under the action of gravity. The particle resistance formula can be a drag force formula, which is used to quantify the resistance of the water body to the particles during the settling process, and to correct the deviation of the actual settling velocity from the theoretical value. The above two constitute the physical basis of the settling trajectory model. The applicable premise of the gravity settling equation is that the particle Reynolds number Re of the settling object is less than 1 (the settling speed of the silt and hair clumps in the swimming pool is slow, and the particle diameter is small, which meets the condition), and the particle resistance formula adjusts the drag coefficient according to the shape of the settling object (such as silt particles being approximately spherical and hair clumps being irregular aggregates).

[0089] For example, in the above steps, when the target robot performs the initial collection task in a community open-air swimming pool, the high-definition vision device and the water quality sensor carried by the target robot cooperatively capture two potential collection objects. One is located on the north side of the swimming pool, showing a light and thin broken sheet shape, always suspended on the surface layer of the water surface without sinking underwater, and is identified as fallen leaves brought by the gust of wind according to the density characteristics of the swimming pool water body, which is determined to be less than water, and is classified as a floating object according to the classification rules of the visual features and the environmental characteristics. The other is located about 0.6 meters underwater on the south side of the swimming pool, showing a loose and winding clump shape, slowly moving towards the bottom of the pool, and the density is not less than water, which is identified as a hair clump brought by a swimmer, and is classified as a settling object.

[0090] For the leaf debris on the north side, the spatiotemporal fluid-coupled trajectory model is called, and the initial position coordinates of the leaf debris (the center point of the middle grid on the water surface of the north side of the pool), the water flow vector of the current north side grid area (overall flowing in the southeast direction), the real-time wind direction of the pool periphery (gentle southeast wind), the boundary reflectivity of the pool wall on the north side (considering the blocking and rebounding effect of the pool wall on the water flow and floating objects), and the motion trajectory sample of similar leaf debris under the same water flow and wind conditions (in the past, the north side leaf debris drifted southeast with the water flow, and rebounded slightly when encountering the east pool wall) are input. The model calculates that the leaf debris will move steadily with the southeast water flow, and the trajectory will slightly shift to the south direction due to the assistance of the southeast wind, and finally it will approach the water surface near the southeast pool wall of the pool after 6 minutes.

[0091] For the hair ball on the south side, the settling trajectory model is called, and the initial suspension height (0.6 meters under water), the particle equivalent diameter of the hair ball (converted according to the average entangled size of similar hair balls), the current pool water temperature (26°C normal temperature), the local water flow speed of the south side grid area (slow and flowing in the southwest direction along the pool bottom), the slope of the pool bottom on the south side (slightly inclined to the southwest), and the settling velocity data of similar hair balls under similar water temperature and pool bottom slope (in the past, the hair ball settled about 0.1 meters per minute towards the pool bottom at 26°C). Combined with these characteristics, it is predicted that the hair ball will continue to settle towards the pool bottom under the action of gravity, and will slowly shift to the southwest direction during the settling process, and finally will fall on the pool bottom in the southwest of the pool after 8 minutes.

[0092] Further optionally, when the spatiotemporal fluid-coupled trajectory model is called, the initial position coordinates of the floating object are determined by the visual recognition device (such as a high-definition water surface camera) carried by the pool and the robot. First, the real-time monitoring image containing the floating object can be collected by the visual device, and the pixel contour of the object in the image can be extracted by using a pre-trained target detection algorithm (such as the YOLO series algorithm), and then the actual physical coordinates of the center point of the object can be calculated by combining the preset physical coordinate system of the pool grid area (the actual physical coordinates of each grid vertex of the pool have been calibrated by laser during system initialization, such as X-Y axis meter coordinates with the northwest corner of the pool as the origin), and the mapping relationship between pixel coordinates and physical coordinates (such as the pre-calibrated "0.5 meters of physical distance corresponding to 100 pixels").

[0093] The water flow vector of the pool grid area is obtained by deploying underwater flow rate sensors (such as ultrasonic flow meters) in each grid of the pool. The sensors are evenly distributed in grid density (such as at least one sensor per grid), and real-time collection of the speed (m / s) and direction (0° for north, clockwise increasing angle value, such as 30° for northeast) of the water flow in the grid. After filtering processing (such as Kalman filtering) to remove noise, the collected data is directly used as the water flow vector of the grid area. If some grids do not have direct sensor deployment, the flow rate data of adjacent grids can be used to calculate the water flow vector data of each grid through linear interpolation.

[0094] The peripheral wind direction data is collected by a micro-weather sensor (such as an integrated anemometer) fixedly installed around the pool. The sensor installation height is preferably 1.5-2 meters (to avoid ground obstacles) to collect the wind speed (unit: m / s) and direction (represented by angle or sixteen directions, such as southeast wind corresponding to 135°) of the pool periphery in real time. The collection frequency is consistent with the time step of trajectory prediction (such as one time step every 10 seconds), ensuring that the data can reflect the current and short-term wind direction changes in real time. If it is necessary to predict the wind direction in the future preset period, local short-term weather forecast data and historical wind direction change rules of similar weather can be combined for supplementary correction to ensure the timeliness and accuracy of the input model data.

[0095] The pool boundary reflectivity is calibrated in the system initialization stage. According to the actual material (such as smooth ceramic tile, rough concrete, glass curtain wall) and surface form (right angle edge, arc edge) of the pool boundary, the basic coefficient is set. The smooth ceramic tile boundary has strong reflection effect on floating objects (such as fallen leaves), and the reflection coefficient is calibrated to 0.8-0.9. The rough concrete boundary has weak reflection effect, and the reflection coefficient is calibrated to 0.3-0.5. The arc boundary is fine-tuned according to the bending direction (the reflection coefficient of the concave arc boundary is slightly lower than that of the convex arc boundary, with a difference of about 0.1). After calibration, the pool boundary is segmented according to the grid area, and the reflection coefficient of each segment is stored. When calling the model, the reflection coefficient value of the segment is directly called according to the boundary position of the floating object in the grid.

[0096] Further optionally, when the settling trajectory model is called, the initial suspension height of the settling object is obtained by the underwater monitoring device. If an underwater camera is used, first, an underwater image containing the settling object is collected, the object contour and the pool bottom contour are extracted using an image segmentation algorithm, the vertical pixel distance of the two in the image is calculated, and then combined with the depth calibration parameter of the underwater image (such as 0.3 meters of actual depth corresponding to every 100 pixels, which is calibrated by a laser range finder during system initialization), the actual height of the object from the pool bottom is converted, that is, the initial suspension height; if an ultrasonic ranging sensor (installed on the pool bottom or an underwater fixed support) is used, the vertical distance between the sensor and the object is directly measured, and then the installation depth of the sensor itself is subtracted (such as the sensor is installed 0.2 meters above the pool bottom, and the measured distance is 0.5 meters, then the initial suspension height is 0.3 meters), to ensure that the data directly reflects the actual suspension state of the object.

[0097] The particle equivalent diameter is determined by visual recognition and image analysis. For single particle objects such as sediment particles and metal debris, a clear two-dimensional image of the object is collected by the underwater visual device, the particle contour is extracted using an edge detection algorithm, and the equivalent circular diameter of the contour (i.e. the diameter of a circle with the same area as the particle contour) is calculated as the particle equivalent diameter; for hair clumps and other irregular aggregates, multiple angle images are collected (such as every 30°, a total of 6 times), the equivalent diameter of the aggregate in each image is calculated, and the average value is taken as the final particle equivalent diameter to reduce errors caused by the shooting angle.

[0098] The pool water temperature is collected by the underwater temperature sensor distributed in the pool. The sensors are arranged in a grid division density (such as 1 sensor for every 2 adjacent grids), and the water temperature data (℃) at the location is collected in real time (such as 1 time every 30 seconds). The collection frequency is synchronized with the time step of trajectory prediction (such as 1 time every 30 seconds). If there is no direct corresponding temperature sensor in a grid, the water temperature data of the adjacent 3 sensors is calculated by weighted average method (the closer the distance, the higher the weight), to ensure that the water temperature data of each grid area is continuous and accurate, and the data is directly used as model input to reflect the influence of water temperature on the settling rate of the settling object (such as sediment particles).

[0099] Local water flow velocity is obtained by pool bottom or underwater flow velocity sensor. The sensor installation position is close to the grid area where the settling object is located (such as the object is in the middle grid of the pool bottom, the flow velocity sensor data of the grid and adjacent grid is called), the water flow velocity consistent with the object motion direction is preferentially collected (such as the settling object moves along the pool bottom to the southwest direction, the water flow velocity to the southwest direction is mainly collected). If the object is in a dynamic moving state, the position change of the object in the continuous time step can be recorded by the visual tracking algorithm, the moving speed of the object is calculated, and then the local water flow velocity is inversely deduced by combining the "object moving speed and local water flow velocity correlation model" (empirical model pre-trained by the system) in fluid mechanics, as a supplement to the sensor data, to improve the matching degree of the data and the actual environment of the object.

[0100] The pool bottom slope is calibrated by laser scanning at system initialization. The laser range finder is used to scan the pool bottom comprehensively, and the three-dimensional coordinates (X, Y axis is horizontal coordinate, Z axis is depth coordinate) of each sampling point of the pool bottom are obtained, and then the ratio of the Z axis difference (depth difference) and the horizontal distance of adjacent sampling points in each pool grid is calculated to obtain the pool bottom slope of the grid (expressed in percentage or angle, such as 0.5% slope represents that the depth increases 0.5 meters per 100 meters of horizontal distance). For the area with local protrusions and depressions on the pool bottom, the accuracy of the slope data is improved by subdividing the grid (such as subdividing the original 1 meter x 1 meter grid into 0.5 meter x 0.5 meter), and after calibration, the pool bottom slope distribution map is generated and stored in the system, and the corresponding slope value is directly called according to the grid where the settling object is located when the model is called.

[0101] After generating the motion trajectory data of the two types of objects (including the predicted position coordinates, motion speed size and direction vector of each time node), further optionally, the trajectory uncertainty interval is established according to the input data error and environmental interference factors, and the trajectory uncertainty interval is used as the fault tolerance reference for initial collection path adjustment. Specifically, the input data error mainly refers to the deviation of the input data of the trajectory prediction model used to generate the motion trajectory data in the acquisition and processing process. The input data error includes the measurement error of the sensor hardware itself, such as the positioning coordinate deviation of the visual sensor used to detect the fallen leaves and debris, and the speed detection error of the sensor used to detect the hair group under water due to slight water flow disturbance. Such errors can be determined through parameters in the sensor technical manual, such as the zero bias stability of the gyroscope, the angle random walk and other indicators, which directly reflect the error range of the sensor in the stable state. The input data error also includes errors introduced in the data preprocessing link, such as the coordinate extraction deviation caused by the blurred edge of the fallen leaves during image recognition, or the estimation error caused by filling the missing speed data. Such errors can be quantified through standard deviation analysis of multiple repeated measurements, Kalman filtering and other algorithms, such as determining the error amplitude caused by data missing or improper standardization by comparing the deviation of multiple measurement values from the true value. Further, the determination of the input data error needs to be combined with the device characteristics and statistical analysis method. For sensor error, the error range can be directly obtained according to the precision indicators in the hardware parameter manual, such as the angle random walk coefficient, the zero bias stability and the like. For preprocessing error, the error distribution law is determined by comparing the result difference of different processing methods, or simulating the data missing, type error and other scenarios by using Monte Carlo simulation.

[0102] Environmental interference factors refer to physical actions or condition changes from the external environment during the object's movement, which directly affect the object's actual trajectory and cause it to deviate from the predicted path. For outdoor light objects such as fallen leaves, the main environmental interference factor is the fluctuation of wind force, especially the strength of southeast wind. The turbulent characteristics of wind can change the movement direction and speed of fallen leaves, even causing random swings in the trajectory. Wind can also interfere with the detection accuracy of sensors, such as causing image blurring, further increasing the uncertainty of trajectory prediction. For hair balls in the pool, environmental interference factors are relatively mild, including minor disturbances of underwater currents, slight effects of water temperature changes on water density (although changes are not significant in a short time), and possible slight undulations of the pool bottom slope. These factors indirectly affect the movement state of hair balls through changes in fluid resistance. However, due to the relatively closed and stable environment of the pool, the strength and frequency of such disturbances are low, so their impact on the trajectory is small. Further, the identification and quantification of environmental interference factors require field monitoring and scene characteristic analysis, such as using an anemometer to record the fluctuation amplitude of outdoor wind, using a flow sensor to monitor the flow rate change in the pool, combining the physical properties of the object (such as the wind area of fallen leaves and the buoyancy characteristics of hair balls), establishing a correlation model between environmental factors and trajectory deviation, and finally determining the fault tolerance space size in different scenarios, such as reserving 0.3 meters of fault tolerance space for fallen leaves due to wind interference, and only 0.15 meters for hair balls due to stable water flow.

[0103] Fallen leaves are slightly affected by small fluctuations in wind force (occasional changes in southeast wind strength), resulting in a larger uncertainty interval range, which requires about 0.3 meters of fault tolerance space for path adjustment. Hair balls are relatively stable in the pool due to the stability of underwater currents, and there are no significant changes in water temperature and pool bottom slope in a short time, resulting in a smaller uncertainty interval range, with a fault tolerance space of about 0.15 meters. These uncertainty intervals serve as a reference for subsequent initial collection path adjustment, ensuring that the robot can accurately intercept potential collection objects even in the face of slight environmental changes, avoiding missing due to trajectory prediction deviation.

[0104] It is worth noting that the optional examples of trajectory prediction models can be divided into various types according to the motion characteristics of the prediction object, environmental factors and technical principles. The trajectory prediction model suitable for floating objects can be a hybrid model based on long short-term memory network and attention mechanism, which can focus on capturing the time sequence dependence in the movement of floating objects, and dynamically allocate the influence weight of environmental factors such as water flow and wind force through attention weight, such as plastic foam moving with the wind and gentle flow. The model will pay more attention to the disturbance of the instantaneous change of wind force on the trajectory. Alternatively, another model suitable for trajectory prediction of floating objects can also be a physically constrained particle filtering model, which regards the floating object as a particle subject to fluid resistance, and continuously corrects the predicted trajectory by filtering algorithm combined with real-time water flow field data, especially suitable for processing sudden environmental disturbances such as pool boundary reflection, such as predicting the rebound path of fallen leaves hitting the pool wall.

[0105] For settling objects, in addition to the settling trajectory model based on the settling prediction hybrid model, there is also a model combining deep belief network with Stokes equation, which learns the nonlinear motion characteristics of the settling object through multiple layers of neural network, while embedding the physical rules of gravitational settling, which can accurately predict the sliding trajectory of sediment with different particle diameters on the pool bottom. For example, large particle sediment will settle faster due to gravity, and small particles will be more affected by water flow. There is also a spatiotemporal attention graph network model that divides the pool bottom into graph nodes, with edge weights between nodes representing water flow erosion intensity, using attention mechanism to enhance the influence of high flow area on the migration of settling objects, suitable for predicting the aggregation path of hair clusters in the circulation area of the pool bottom.

[0106] The trajectory prediction model suitable for complex dynamic environment is a multi-modal fusion Transformer model that can simultaneously process object shape features in visual images, water flow velocity features collected by sensors and historical trajectory time sequence features, and through self-attention mechanism to mine the correlation between multiple data sources. For example, the floating posture of a plastic bottle, the local water flow direction and the movement law of the same object in the past are combined to predict the trajectory. There is also a reinforcement learning trajectory prediction model that continuously optimizes the prediction strategy through continuous interaction with the environment, which performs outstandingly in areas with complex water flow such as pool inlet and outlet, and can quickly adapt to the influence of sudden changes in water flow on object movement. For example, when the migration path of the sediment changes due to sudden increase in water inflow, the model can adjust the prediction result through real-time feedback.

[0107] Further 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 the temporarily appearing potential collection objects in the surrounding water area, including: based on the motion trajectory data, judging whether the floating type object will drift away from the current robot working area with the water flow or wind force, judging whether the sinking type object will quickly sink to a specific position on the pool bottom, and calculating an effective collection window period, the effective collection window period is used to indicate the longest duration that the floating type object is in the robot collection range. Further, the priority is set according to the collection urgency and the influence range of the floating type object. Further, the objects with short effective collection window period (such as high-concentration silt group quickly sinking) and large influence range (such as large-area floating leaf group) are preferentially processed, and the low-priority objects (such as small-particle impurities slowly drifting) can be integrated into the subsequent initial path regular collection process. Between adjacent task points of the initial collection path, temporary path points for high-priority objects are inserted, the position information of the temporary path points is set based on the center position of the object dense stay period predicted by the trajectory, and the connection distance between the temporary path points and the initial collection path is ensured to be not more than the maximum effective range of the target robot single movement. If there are multiple temporary collection objects at the same time, 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 to go back and forth to avoid detours, and ensuring that the total working time increase does not exceed the preset proportion of the initial collection task time length. Further, after the target robot reaches the target position according to the adjusted real-time collection path, it is confirmed through the visual recognition device whether the collection object exists. If it exists, the corresponding collection device is started to complete the clearing. Finally, after completing the temporary object clearing, the target robot automatically returns to the next task point of the initial collection path, ensuring that the covered water area of the initial collection task is not missed.

[0108] Specifically, in a certain small open pool, the target robot is moving along the initial collection path from the northwest core cleaning area to the southeast potential risk area, and on the way, the visual monitoring device and underwater sensor carried by the robot body synchronously capture three temporary potential collection objects. A large area of leaf group appears on the northeast water surface, which is quickly drifting towards the pool edge under the joint action of the gust and the pool water flow, and will drift away from the current robot working area in a short time if not intercepted in time, the effective collection window period is short and the coverage range is wide; there is a high-concentration silt group about 0.3 meters underwater on the south side, which is accelerating to sink to the pool bottom, and once it completely sinks into the pool bottom gap, the subsequent cleaning difficulty will increase significantly, and the effective collection window period is also urgent; there is only a small piece of plastic debris on the west water surface, which is slowly drifting with weak water flow, and will not leave the working area in a short time, and the influence range on water quality is very small. According to the priority rules, the large-area leaf group and the high-concentration silt group are determined as high-priority, and the small plastic debris is classified as low-priority, which is planned to be integrated into the subsequent initial path regular collection process, and the current core path is not adjusted temporarily.

[0109] In the initial path of the target robot, the adjacent task points are A point (core area center) on the northwest side and B point (potential risk area sampling point) on the southeast side. The system first combines the trajectory prediction results of the leaf group to calculate the dense stay period center position within the effective collection window period, inserts a first temporary path point between A point and B point, and ensures that the robot can connect without stopping in the middle. Then, according to the sedimentation trajectory prediction of the sediment group, the key interception position before the sediment group settles to the bottom of the pool is determined, and a second temporary path point is inserted. At the same time, based on the A* algorithm shortest path model, the access order is reordered, and finally it is determined to move from A point to the first temporary path point to process the leaf group, then go to the second temporary path point to intercept the sediment group, and finally arrive at B point, avoiding the robot to go back and forth. According to the real-time measurement, the total operation time after adjustment only increases a small amount compared with the initial collection task, and does not exceed the preset proportion. When the target robot arrives at the first temporary path point according to the adjusted real-time collection path, the visual recognition device clearly captures the large area of leaves, and immediately starts the floating object collection bin to completely remove the leaves by negative pressure adsorption. After arriving at the second temporary path point, the underwater camera confirms that the high-concentration sediment group is still in a suspended state and has not completely settled to the bottom of the pool, and then the pool bottom dirt suction device is started to completely remove the sediment group by rotating the brush head and negative pressure suction. During the period, a suspected metal debris signal was detected in the southwest corner of the pool. After the robot arrived at the corresponding position according to the predicted trajectory, no target was found. The system quickly calls the sedimentation trajectory model, re-enters the real-time water flow velocity, water temperature and other data of the region to generate a second prediction trajectory. After fine-tuning the position according to the second prediction trajectory, the metal debris is still not located, so the corresponding pool grid in the region is marked as a to-be-rechecked area and included in the key monitoring range of the next initial collection task.

[0110] After all high-priority temporary objects are processed, the target robot automatically returns to B point of the initial collection path from the second temporary path point and continues to execute the collection task of the southeast potential risk area. When moving to the west area along the initial path, the low-priority small plastic debris is also cleaned. During the whole process, all grid areas covered by the initial collection task are not missed, which not only efficiently responds to temporary pollution, but also guarantees the integrity of the initial collection task.

[0111] Further optionally, after step S106, the task execution time and task execution frequency of the target robot can be dynamically adjusted according to the leaf distribution situation updated in real time by the leaf distribution prediction model and the sediment distribution situation updated in real time by the sediment prediction mixing model.

[0112] After dynamically adjusting the initial collection path of the target robot, further adaptation to the actual change rule of fallen leaves and sediments in the pool is needed. The prediction update result of the fallen leaf distribution prediction model and the prediction update result of the sediment prediction mixing model are used to dynamically adjust the task execution time and frequency of the robot. In implementation, a continuous data feedback mechanism is needed to be established. The actual number of fallen leaves and the concentration change of sediments in each grid area are collected in real time by visual recognition equipment around the pool and in-pool sensors. The actual number of fallen leaves and the concentration change of sediments are compared with the previously predicted fallen leaf probability matrix and sediment concentration matrix. The deviation reasons are analyzed, such as sudden wind direction change leading to fallen leaves falling in advance, temporary surge of human flow bringing more sediments, and the like. At the same time, the adjustment direction is determined by combining the environmental dynamics such as impending rainfall and pool opening, to ensure that the adjusted time and frequency can timely respond to pollution and will not cause resource waste.

[0113] The core of the adjustment of the task execution time is to adapt to the pollution peak period and to adapt to the pool use scenario. If it is monitored that the growth rate of fallen leaves or sediments in a certain area is much higher than the prediction, such as a sudden strong wind in the afternoon, the fallen leaf amount of the trees around the pool increases rapidly, and the actual fallen leaf amount of the high fallen leaf risk grid displayed by the visual recognition is close to the cleaning threshold, the collection task of the area will be started in advance to avoid the increase of cleaning difficulty after the accumulation of pollutants. If it is predicted that the amount of fallen leaves and sediments is very small in a certain period such as after the pool is closed at night, and the pollution degree of the current grid is lower than the cleaning threshold, the next task execution time will be delayed to reduce the invalid start and stop of the robot. At the same time, it will be adjusted in combination with the pool opening time, such as the pool needs to complete the collection task of the high human flow area such as the water inlet two hours before opening to ensure that the water quality meets the standard at the time of opening. Even if it is predicted that the sediment concentration of the area does not reach the peak value at this time, the execution time will be advanced to before the opening to match the actual use demand.

[0114] The adjustment of the task execution frequency is classified and set according to the pollution intensity and accumulation speed of different grid areas. For the grid area with a high fallen leaf probability such as the grid area near the trees around the pool, or the core pollution area with a high sediment concentration such as the pool entrance and the low-lying place at the bottom of the pool, if it is monitored that the pollutants accumulate again within a short time after cleaning, such as the sensor shows that the sediment concentration rises to 60% of the original level one hour after the entrance grid is cleaned, the task execution frequency of the area will be increased to ensure that the pollution is always controlled at a low level. For the regular area with low pollution degree and slow change such as the central grid of the pool, if the pollutants grow slowly within a few hours after cleaning, such as the fallen leaf amount only increases by 20% of the predicted value, the execution frequency will be reduced to reduce the energy consumption and operation time of the robot. At the same time, the frequency adjustment will be coordinated with the path optimization to avoid repeated work in adjacent areas at the same time, such as integrating the cleaning of the high-frequency entrance area with the regular cleaning of the surrounding grid area to reduce the moving time of the robot through path connection and improve the overall operation efficiency.

[0115] Taking a small open-air swimming pool as an example, the north side of the swimming pool is close to three adult camphor trees, which is a high leaf fall area. The east side is the water entry area, where people flow densely and easily accumulate sediments such as hair and impurities. The central area is far away from the pollution source and the water flow is gentle, so the pollution is less. In dynamic adjustment, through real-time monitoring, it is found that after 5 o'clock in the evening every day, the north side grid is affected by the northwest wind, and the leaf fall rate increases significantly, far exceeding the predicted value. Therefore, the collection task time of this area is advanced from the original 6 o'clock in the evening to 5:15 in the evening to avoid the difficulty of cleaning after a large number of leaves fall into the pool. The water entry area on the east side has a high peak of people flow during the weekend, that is, from 10 o'clock in the morning to 4 o'clock in the afternoon. After cleaning, the sensor shows that the sediment concentration rises to 60% of the pre-cleaning level within one hour, so the execution frequency of this period is increased from once every two hours to once every hour to ensure that the water quality at the water entry is always up to standard. The sediment concentration in the central area increases slightly within four hours after cleaning, and the leaf fall is also very small, so the execution frequency is reduced from once every three hours to once every four hours. At the same time, when adjusting the time and frequency, the advanced task of the north side leaf area and the high-frequency task of the east side are connected through path optimization. After the robot completes the advanced cleaning on the north side, it can directly go to the east side to perform the next task along the shortest path, avoiding round trips, which not only ensures the cleaning effect of each area, but also effectively controls the total operation time of the robot.

[0116] In the embodiment of the application, obtaining the distribution of trees around the target swimming pool and dividing the grid area is the basis for accurate cleaning, which can determine the source of fallen leaves, provide spatial reference, and avoid waste of resources. Combined with weather and tree distribution, the spatio-temporal graph neural network model is used to improve the accuracy of fallen leaf prediction, and the probability matrix is output to lock the high leaf fall risk grid. The multi-modal data and the mixed model containing fluid mechanics and sediment motion equation realize accurate prediction of sediments, provide three-dimensional decision basis for concentration, type and risk. The two types of prediction results are fused to plan the initial collection task, determine the core cleaning area, and optimize the path to improve efficiency and avoid collision. In the execution, the path is dynamically adjusted, and the sudden floating or sediment is identified in real time. After trajectory prediction, path optimization and secondary confirmation, the sudden demand and the initial efficiency are balanced, and finally the closed-loop cleaning with no omission and high efficiency is realized.

[0117] The embodiment of the present application provides a kind of based on visual recognition's swimming pool fallen leaves and sediment automatic collection system, the system includes: acquisition module, for obtaining the tree distribution around target swimming pool;Division module, for dividing target swimming pool into multiple swimming pool grid areas according to swimming pool structure;Fallen leaves prediction module, for combining current weather condition and tree distribution, the fallen leaves distribution prediction model of spatio-temporal graph neural network is used to predict fallen leaves distribution in future preset period;Wherein, the node in the fallen leaves distribution prediction model is one-to-one corresponding to tree, and node feature includes the tree species of corresponding tree, tree height, distance swimming pool distance and historical fallen leaves amount, and edge feature is obtained based on the relative position, position and wind direction transmission relationship of tree;Edge feature includes the relative position, relative distance and wind direction transfer weight between trees;The fallen leaves distribution condition includes fallen leaves probability matrix corresponding to swimming pool grid area, each matrix element in the fallen leaves probability matrix is used to indicate the predicted probability value of the appearance of fallen leaves in future preset period in corresponding swimming pool grid area;Sediment prediction module, for obtaining the multi-modal environment data and people flow state data around target swimming pool, and the sediment distribution condition in future preset period is predicted by sediment prediction hybrid model;The sediment prediction hybrid model is constructed based on spatio-temporal graph convolution network and multi-view spatio-temporal graph attention network, and fluid mechanics equation and sediment motion equation are embedded into the sediment prediction hybrid model;Planning module, for generating the initial collection task of target robot according to the fallen leaves distribution condition and the sediment distribution condition for the space structure of target swimming pool;Initial collection task includes starting point, covered water area, initial collection path;Execution module, for dynamically adjusting initial collection path in initial collection task to obtain real-time collection task according to monitoring image data in surrounding water area in the process that target robot executes initial collection task, and executes real-time collection task to remove temporary appearing floating object and sediment in surrounding water area.In some embodiments, based on visual recognition's swimming pool fallen leaves and sediment automatic collection system can be applied to terminal equipment.It should be noted that, for the convenience and brevity of description, the specific working process of the above described based on visual recognition's swimming pool fallen leaves and sediment automatic collection system can refer to the corresponding process in the foregoing based on visual recognition's swimming pool fallen leaves and sediment automatic collection method embodiment, and will not be repeated here.

[0118] The embodiment of the present application provides a terminal device. The terminal device 300 comprises a processor 301 and a memory 302, and the processor 301 and the memory 302 are connected through a bus 303, such as an I2C bus. Specifically, the processor 301 is used for providing computing and control capabilities to support the operation of the whole terminal device. The processor 301 can be a central processing unit, and the processor 301 can also be other general-purpose processors, digital signal processors, application-specific integrated circuits, field programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. Those skilled in the art can understand that the structure shown in the above embodiment is only a block diagram of part of the structure related to the embodiment of the present application, and does not constitute a limitation on the terminal device to which the embodiment of the present application is applied. Specifically, the server can comprise more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement. The processor is used for running a computer program stored in the memory and implementing any one of the visual recognition-based automatic collection methods for fallen leaves and sediments in a swimming pool provided by the embodiment of the present application when the computer program is executed. It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the terminal device described above can refer to the foregoing visual recognition-based automatic collection method for fallen leaves and sediments in a swimming pool, and will not be described here.

[0119] The embodiment of the present application further provides a storage medium for computer readable storage, and the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any one of the visual recognition-based automatic collection methods for fallen leaves and sediments in a swimming pool provided in the specification of the embodiment of the present application.

Claims

1. A visual recognition-based method for automatic collection of fallen leaves and sediments in a swimming pool, characterized by, The method comprises: acquiring a tree distribution around a target swimming pool; dividing the target swimming pool into a plurality of swimming pool grid areas according to the structure of the swimming pool; combining the current weather conditions and the tree distribution, predicting the leaf fall distribution in a future preset period of time through a leaf fall distribution prediction model of a spatio-temporal graph neural network; wherein the nodes in the leaf fall distribution prediction model correspond one-to-one to the trees, the node features include the tree species, tree height, distance from the swimming pool, and historical leaf fall amount of the corresponding trees, and the edge features are constructed based on the relative positions, positions, and wind direction transmission relationships of the trees; the edge features include the relative positions, relative distances, and wind direction transmission weights between the trees; the leaf fall distribution includes a leaf fall probability matrix corresponding to the swimming pool grid areas, and each matrix element in the leaf fall probability matrix is used to represent a predicted probability value of the corresponding swimming pool grid area appearing leaf fall in the future preset period of time; acquiring multi-modal environment data and people flow state data around the target swimming pool, and predicting the sediment distribution in a future preset period of time through a sediment prediction hybrid model; the sediment prediction hybrid model is constructed based on a spatio-temporal graph convolution network and a multi-view spatio-temporal graph attention network, and the fluid mechanics equation and the sediment motion equation are embedded into the sediment prediction hybrid model; generating an initial collection task of a target robot for the spatial structure of the target swimming pool according to the leaf fall distribution and the sediment distribution; the initial collection task includes a starting point, a covered water area, and an initial collection path; in the process of the target robot executing the initial collection task, dynamically adjusting the initial collection path in the initial collection task to obtain a real-time collection task according to the monitoring image data in the surrounding water area, and executing the real-time collection task to remove the temporary floating objects and sediments in the surrounding water area.

2. The visual recognition based automatic collection method of leaves and sediments from a pool according to claim 1, characterized in that, The process of dynamically adjusting the initial collection path in the initial collection task to obtain a real-time collection task according to the monitoring image data in the surrounding water area, and executing the real-time collection task to remove the temporary floating objects and sediments in the surrounding water area in the process of the target robot executing the initial collection task, comprises: real-time acquisition of monitoring image data in the surrounding water area of the target robot; identification of potential collection objects in the surrounding water area based on the monitoring image data; wherein the potential collection objects at least include temporary floating objects and sediments; based on the type of the potential collection object, calling a corresponding trajectory prediction model, and obtaining the motion trajectory of the potential collection object through the trajectory prediction model; based on the motion trajectory, dynamically adjusting the initial collection path in the initial collection task to obtain a real-time collection task, and instructing the target robot to execute the real-time collection task to remove or confirm the temporary potential collection objects in the surrounding water area.

3. The visual recognition based automatic collection method of leaves and sediments from a pool according to claim 2, characterized in that, The process of calling a corresponding trajectory prediction model based on the type of the potential collection object, and obtaining the motion trajectory of the potential collection object through the trajectory prediction model, comprises: The potential collection objects are divided into floating objects and sinking objects based on visual features and pool environment characteristics of the monitoring image data, wherein the visual features include shape, density, and suspension state; the floating objects include at least one of the following substances with a density less than water: temporary fallen leaves, plastic impurities, and foam; the motion of the floating objects is mainly affected by water flow speed, water flow direction, and wind force around the pool; the sinking objects include at least one of the following substances with a density not less than water: silt particles, hair clumps, and metal debris; the motion of the sinking objects is affected by gravity settling, pool bottom water flow scouring, and circulation of the pool inlet and outlet; According to the classification result, a corresponding pre-trained trajectory prediction model is called; for floating objects, a space-time fluid coupled trajectory model is called, which is constructed based on a space-time graph convolution network (ST-GCN) and a simplified fluid mechanics equation, and the input features include initial position coordinates of the floating objects collected by a multi-source sensor, water flow vector of the pool grid area, peripheral wind direction data, pre-labeled pool boundary reflectivity, and motion trajectory samples of the same type of floating objects in history; the multi-source sensor for floating objects includes a visual recognition device, an underwater flow sensor, and a micro weather sensor; For the sinking objects, a sinking trajectory model is called, which is constructed based on the sediment prediction hybrid model, and embeds a gravity settling equation and a particle resistance formula, and the input features include initial suspension height of the sinking objects collected by a multi-source sensor, particle equivalent diameter, pool water temperature, local water flow speed, pool bottom slope, and historical sediment settling rate data; the multi-source sensor for the sinking objects includes an underwater monitoring device, a visual recognition device, an underwater temperature sensor, a flow sensor, and a laser range finder; Through the space-time fluid coupled trajectory model or the sinking trajectory model, motion trajectory data of the potential collection objects is generated in time steps within a future preset period, and the motion trajectory data includes predicted position coordinates, motion speed size and direction vector of each time node of the potential collection objects.

4. The visual recognition based automatic collection method of leaves and sediments from a pool according to claim 3, characterized in that, 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 target robot is instructed to execute the real-time collection task to remove or confirm the potential collection objects temporarily appearing in the surrounding water area, which includes: Based on the motion trajectory data, it is judged whether the floating objects will drift away from the current robot working area with the water flow or wind force, whether the sinking objects will quickly settle to a specific position on the pool bottom, and an effective collection window period is calculated, which is used to indicate the longest duration of the floating objects in the robot collection range; The priority is set according to the collection urgency and influence range of the floating objects; In the initial collection path between adjacent task points, temporary path points for high-priority objects are inserted, the position information of the temporary path points is set based on the central position of the object-intensive stay period predicted by the trajectory, and the connection distance between the temporary path points and the initial collection path is ensured to be within the maximum effective range of a single movement of the target robot; If multiple temporary collection objects exist at the same time, the adjusted real-time collection path is obtained by reordering the access order of the initial collection path and the temporary path points based on the A* algorithm shortest path model, which avoids the robot's roundabout and ensures that the total work time increases by no more than the preset proportion of the initial collection task time; After the target robot reaches the target position according to the adjusted real-time collection path, it confirms whether the collection object exists through the visual recognition device; if it exists, the corresponding collection device is started to complete the cleaning; after the temporary object is cleaned, the target robot automatically returns to the next task point of the initial collection path, ensuring that the coverage area of the initial collection task is not missed.

5. The visual recognition based automatic collection of leaves and sediment from a pool method according to claim 1, characterized in that, The current weather condition and the tree distribution condition are combined to predict the leaf fall distribution in a future preset period by using a spatio-temporal graph neural network leaf fall distribution prediction model, including: Obtaining fine-grained weather data of a target swimming pool in a future preset period, the fine-grained weather data including hourly wind speed, hourly wind direction, cumulative precipitation, and average temperature; using a Min-Max normalization method to normalize the fine-grained weather data to eliminate dimension differences and obtain a dimension-unified weather feature vector; Extracting node feature basic parameters of each tree around the target swimming pool, wherein the node feature basic parameters include: tree species leaf fall period corresponding to the tree species, leaf adhesion force pre-defined coefficient, actual tree height, shortest straight line distance from the tree trunk of the tree to the edge of the swimming pool, and historical daily leaf fall amount in the same season and similar weather condition period; performing element-by-element multiplication fusion on the node feature basic parameters of each tree and the weather feature vector to obtain the fusion node feature 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 as relative position parameters and relative distance parameters in 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; taking the included angle between the connection direction of the two trees and the hourly wind direction as a parameter, the product of the cosine value of the included angle and the hourly wind speed is divided by the historical maximum wind speed of the swimming pool network area to obtain the wind direction transmission weight, and an edge feature set containing the relative position parameters, the relative distance parameters, and the wind direction transmission weight of the two trees is obtained; Taking the trees around the target swimming pool as graph nodes, the correlation between any two trees as graph edges, the fusion node feature as node attributes, and the edge feature set as edge attributes, an input graph structure of the spatio-temporal graph neural network is constructed; The input graph structure is input into the pre-trained leaf fall distribution prediction model to obtain the leaf fall probability matrix.

6. The visual recognition based pool leaf and sediment automatic collection method according to claim 1, wherein, The target swimming pool is obtained around the multi-modal environment data and the flow state data, and the sediment prediction mixed model is used to predict the sediment distribution in a future preset period, including: Multi-modal environment data is acquired through a sensor array deployed around and in the target swimming pool, and crowd state data is acquired through a visual recognition device; the multi-modal environment data includes swimming pool water quality parameters, surrounding meteorological data, and swimming pool structure data; the crowd state data includes real-time crowd density, personnel activity area, personnel activity type, and historical crowd-borne foreign matter records; The collected multi-modal environment data, crowd state data, and swimming pool historical sediment data are preprocessed, and an environment-crowd spatio-temporal graph is constructed with each swimming pool grid area as a node; node features include environment features, crowd features, and historical sediment features of the corresponding swimming pool grid area, and edge features are constructed based on fluid exchange intensity, spatial distance, and indirect influence of crowd activity between swimming pool grid areas, and edge weights are used to represent the sediment migration correlation degree between swimming pool grid areas; Through the spatio-temporal graph convolution network ST-GCN layer in the sediment prediction hybrid model, the node features in the environment-crowd spatio-temporal graph are time-series convoluted, and the diffusion relationship and migration correlation of sediments between adjacent swimming pool grid areas are captured through the spatial graph convolution layer, and the spatio-temporal distribution dependent features of the sediments are extracted; The multi-view spatio-temporal graph attention network MST-GAT layer in the sediment prediction hybrid model is used to assign adaptive attention weights to the environment dimension and crowd state dimension in the environment-crowd spatio-temporal graph, and the adaptive attention weights are fused with the moving trend features of the historical sediment data to obtain the fusion attention weights of the sediments; wherein the adaptive attention weight of the crowd state feature is increased in the water entry area where the crowd is dense, and the adaptive attention weight of the environmental water flow feature is increased in the water flow active area. Based on the spatio-temporal distribution dependent features and the fusion attention weights of the sediments, the sediment distribution situation corresponding to the swimming pool grid area is predicted; the sediment distribution situation includes a sediment concentration matrix corresponding to the swimming pool grid area, a sediment type probability distribution, and a sediment risk level; each matrix element in the sediment concentration matrix represents the average sediment concentration of the corresponding swimming pool grid area in a future preset time period.

7. The visual recognition based method for automatic collection of leaves and sediment from a pool as claimed in claim 6 wherein, The fluid mechanics equation embedded in the sediment prediction model includes the Navier-Stokes equation; before the multi-modal environment data and crowd state data around the target swimming pool are acquired and the sediment distribution situation in a future preset time period is predicted through the sediment prediction hybrid model, the following steps are further included: The Physics-Informed GNN module in the sediment prediction hybrid model is called to discretize the Navier-Stokes equation matched with the spatial structure of the target swimming pool and the sediment motion equation into algebraic relationships of nodes and edges; the physical relationship affecting the motion law of the sediments in the Navier-Stokes equation and the sediment motion equation is converted into the correlation relationship between the physical features and numerical features of the nodes, so that the physical law is adapted to the graph structure data format in the spatial structure of the target swimming pool. The sediment prediction mixed model is constrained by a physical loss function to output a sediment distribution that conforms to physical laws, so as to ensure that the sediment migration process in the sediment distribution conforms to the water flow movement law and the gravity sedimentation law in the target pool.

8. The visual recognition based automatic collection method of leaves and sediments from a pool according to claim 6, characterized in that, The initial collection task of the target robot is generated for the spatial structure of the target pool according to the leaf distribution and the sediment distribution, and includes: The leaf probability matrix in the leaf distribution, the sediment concentration matrix in the sediment distribution, and the sediment risk level are associated with each grid to construct a comprehensive evaluation matrix; Based on the comprehensive evaluation matrix, a priority rule is set, and the priority is from high to low in turn: core collection area, single core area, potential risk area, and regular monitoring area, and the adaptive weight of each pool grid area is dynamically adjusted; In combination with the spatial structure of the target pool, the starting point is preferentially set at the geometric center of the core collection area or at the pool edge position with the minimum straight-line distance from multiple core collection areas, so as to ensure that the target robot directly enters a high-priority operation state after starting; The spatial structure of the target pool at least includes one of the following: pool robot parking position, water inlet position, water outlet position, and unobstructed channel; The priority is used to demarcate the covered water area of the initial collection task; the initial collection task covers all core collection areas and potential risk areas, and samples the regular monitoring area every preset number of grids, avoiding the grid where the fixed facilities in the pool are located; The fixed facilities in the pool include stairs, underwater lamps, and drainage outlets. An improved A* path optimization algorithm is used to generate a continuous path node as an initial collection path, with the shortest total path length, the optimal core area access sequence, and the least number of turns as the objective function. For different grid areas in the initial collection path, the corresponding collection device parameters are matched; in the core collection area, if the leaves are mainly collected, the floating object collection bin is enabled, and if the sediment is mainly collected, the pool bottom sewage suction device is enabled; The potential risk area uses the dual-mode standby of the floating object collection bin and the pool bottom sewage suction device; and according to the single operation capacity of the robot, the covered water area is divided into a preset number of continuous task segments, and each task segment has a duration not exceeding the single endurance limit of the target robot. Through grid coverage calculation and route rationality verification, if there is no uncovered core grid or unreasonable route segment, the initial collection task including the starting point coordinates, the covered water grid list, the initial collection path node sequence, the task segment division, and the device parameter configuration is output; if there is an uncovered core grid or an unreasonable route segment, jump to the step of demarcating the covered water area of the initial collection task based on the priority, and regenerate the initial collection task.

9. The visual recognition based pool leaf and sediment automatic collection method according to claim 1, wherein, In the process of executing the initial collection task by the target robot, the initial collection path in the initial collection task is dynamically adjusted according to the monitoring image data in the surrounding water area to obtain a real-time collection task, and after executing the real-time collection task, it further includes: The fallen leaf distribution updated in real time according to the fallen leaf distribution prediction model and the sediment distribution updated in real time according to the sediment prediction hybrid model are used to dynamically adjust the task execution time and the task execution frequency of the target robot.

10. A visual recognition based automatic collection system for leaves and sediment in a pool, characterized by, The system comprises: a collection module configured to acquire a tree distribution around a target swimming pool; a division module configured to divide the target swimming pool into a plurality of swimming pool grid areas according to a swimming pool structure; a fallen leaf prediction module configured to predict a fallen leaf distribution in a preset time period in the future by combining a current weather condition and the tree distribution and using a fallen leaf distribution prediction model of a spatio-temporal graph neural network; wherein nodes in the fallen leaf distribution prediction model correspond to trees one by one, node features include tree species, tree height, distance from the swimming pool, and historical fallen leaf amount of the corresponding trees, and edge features are constructed based on relative positions, positions, and wind direction transmission relationships of the trees; the edge features include relative positions, relative distances, and wind direction transmission weights between the trees; the fallen leaf distribution includes a fallen leaf probability matrix corresponding to the swimming pool grid areas, and each matrix element in the fallen leaf probability matrix is used to represent a predicted probability value of the corresponding swimming pool grid area having fallen leaves in the preset time period in the future; a sediment prediction module configured to acquire multi-modal environment data and people flow state data around the target swimming pool, and predict a sediment distribution in a preset time period in the future by using a sediment prediction hybrid model; the sediment prediction hybrid model is constructed based on a spatio-temporal graph convolution network and a multi-view spatio-temporal graph attention network, and fluid mechanics equations and sediment motion equations are embedded into the sediment prediction hybrid model; a planning module configured to generate an initial collection task of a target robot for a spatial structure of the target swimming pool according to the fallen leaf distribution and the sediment distribution; the initial collection task includes a starting point, a covered water area, and an initial collection path; an execution module configured to dynamically adjust the initial collection path in the initial collection task to obtain a real-time collection task according to monitoring image data in surrounding water areas during execution of the initial collection task by the target robot, and execute the real-time collection task to remove temporarily appeared floating objects and sediments in the surrounding water areas.

Citation Information

Patent Citations

  • 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