Waterline cleaning method and device, computer equipment and storage medium

By integrating the front distance measuring sensor, inlet and exit water detection device and lateral distance measuring sensor on the swimming pool robot, the motion state is dynamically adjusted, and the problems of environmental interference and path planning in water level line cleaning are solved, and efficient and safe water line cleaning is achieved.

CN120491083APending Publication Date: 2025-08-15SHENNAN CIRCUITS
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510414654.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

Existing pool robots are susceptible to environmental interference when cleaning the water level line, resulting in inaccurate detection results and lack efficient path planning and state switching mechanisms, which affects cleaning efficiency and safety.

Method used

The front distance measuring sensor, inlet and exit water detection device and lateral distance measuring sensor are used to collect information in real time, and combined with the current state, the robot's movement state is dynamically adjusted, and the waterline cleaning is achieved through preset state switching.

Benefits of technology

It realizes efficient and automated waterline cleaning of robots in complex swimming pool environments, improves cleaning effect and safety, and avoids lag or drops.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120491083A_ABST
    Figure CN120491083A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of robot control, in particular to a waterline cleaning method and device, computer equipment and a storage medium. Acquiring a current state of the swimming pool robot, determining a next state from preset states according to the first water outlet information, the first distance measurement information, the second water outlet information and the second distance measurement information in combination with the current state, acquiring execution operation of the next state, and controlling the swimming pool robot to move according to the execution operation. And returning to execute the operation of collecting the first water outlet information and the first distance measuring information in real time by the distance measuring sensor before use until the cleaning is completed. The next state is determined by combining the current state through the first water outlet information, the first distance measurement information, the second water outlet information and the second distance measurement information, the swimming pool robot is controlled to move according to the execution operation of the next state, and waterline cleaning is completed. Therefore, the motion state of the robot is automatically and dynamically adjusted, and the cleaning work of the waterline is automatically completed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of robot control technology, and in particular to a waterline cleaning method, device, computer equipment and storage medium. Background Art

[0002] As people's pursuit of a higher quality of life continues to improve, swimming pools are becoming increasingly popular as leisure and entertainment facilities in homes and public places. However, pool cleaning and maintenance are relatively tedious, especially cleaning the waterline. Dirt, grease, and other impurities easily accumulate in the waterline area. If not cleaned promptly, this area not only affects the pool's appearance but also may pollute the water quality, affecting the health of users.

[0003] Currently, most swimming pool robots rely on a single sensor for detection, which is easily affected by environmental interference (such as water surface fluctuations, light changes, etc.), resulting in inaccurate detection results, which in turn affects the cleaning effect. In addition, most robots perform complex motion switching between the pool wall and the water surface, including climbing walls, turning, and translation. They often lack efficient path planning and state switching mechanisms, resulting in low cleaning efficiency and may even cause freezing or falling.

[0004] Therefore, how to automatically and dynamically adjust the robot's motion state to automatically complete the waterline cleaning task has become an urgent problem to be solved. Summary of the Invention

[0005] The embodiments of the present invention provide a waterline cleaning method, apparatus, computer equipment and storage medium to solve the problem of how to automatically and dynamically adjust the motion state of a robot to automatically complete the waterline cleaning work.

[0006] In a first aspect, an embodiment of the present invention provides a waterline cleaning method, which is applied to a swimming pool robot. The swimming pool robot is provided with a water entry and exit detection device and a front ranging sensor at the head position, and a lateral ranging sensor is provided on the side of the swimming pool robot. The side provided with the lateral ranging sensor faces rightward during waterline cleaning. The waterline cleaning method includes: Using the front ranging sensor to collect the first water outflow information and the first ranging information in real time, using the water inlet and outlet detection device to collect the second water outflow information in real time, and using the lateral ranging sensor to collect the second ranging information in real time; Obtaining a current state of the swimming pool robot; determining a next state from preset states based on the first water outlet information, the first ranging information, the second water outlet information, and the second ranging information in combination with the current state, wherein the preset states include: self-rotation to find a wall state, turning to the wall state, advancing to the wall state, raising the head state, climbing up the wall state, retreating state, lowering the head state, attempting to exit the water state, water level line translation state, maintaining the water outlet state, climbing down the wall state, exploring state, advancing state, step-back state, turning left state, and turning right state; Obtain the execution operation of the next state, control the movement of the swimming pool robot according to the execution operation, and return to execute using the front ranging sensor to collect the first water outflow information and the first ranging information in real time, using the water inlet and outlet detection device to collect the second water outflow information in real time, and using the side ranging sensor to collect the second ranging information in real time until cleaning is completed.

[0007] In a second aspect, an embodiment of the present invention provides a waterline cleaning device, which is applied to a swimming pool robot. The swimming pool robot is provided with a water entry and exit detection device and a front ranging sensor at the head position. A lateral ranging sensor is provided on the side of the swimming pool robot. The side provided with the lateral ranging sensor faces rightward during waterline cleaning. The waterline cleaning device includes: an information acquisition module, configured to use the front ranging sensor to acquire the first water outflow information and the first ranging information in real time, use the water inlet and outlet detection device to acquire the second water outflow information in real time, and use the lateral ranging sensor to acquire the second ranging information in real time; a state determination module, configured to obtain a current state of the swimming pool robot, and determine a next state from preset states based on the first water outlet information, the first distance measurement information, the second water outlet information, and the second distance measurement information, in combination with the current state, wherein the preset states include: self-rotation to find a wall state, turning to the wall state, advancing to the wall state, raising the head state, climbing up the wall state, retreating state, lowering the head state, attempting to exit the water state, water level translation state, maintaining the water outlet state, climbing down the wall state, exploring state, advancing state, step-back state, turning left state, and turning right state; The operation execution module is used to obtain the execution operation of the next state, control the movement of the swimming pool robot according to the execution operation, and return to execute the real-time collection of the first water outflow information and the first ranging information by the front ranging sensor, the real-time collection of the second water outflow information by the water inlet and outlet detection device, and the real-time collection of the second ranging information by the side ranging sensor until the cleaning is completed.

[0008] In a third aspect, an embodiment of the present invention provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned waterline cleaning method when executing the computer program.

[0009] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the waterline cleaning method described above is implemented.

[0010] Compared with the prior art, the present invention has the following beneficial effects: by using the front ranging sensor to collect the first water outflow information and the first ranging information in real time, using the water entry and exit detection device to collect the second water outflow information in real time, and using the lateral ranging sensor to collect the second ranging information in real time, the current state of the swimming pool robot is obtained; according to the first water outflow information, the first ranging information, the second water outflow information, and the second ranging information, in combination with the current state, the next state is determined from the preset states, the preset states including: self-rotation to find the wall state, turning to the wall state, advancing to the wall state, raising the head state, climbing up the wall state, retreating state, lowering the head state, attempting to exit the water state, water level line translation state, maintaining the water outflow state, climbing down the wall state, exploring state, advancing state, step retreat state, left turn state, right turn state; obtaining the execution operation of the next state, controlling the movement of the swimming pool robot according to the execution operation, and returning to the execution of using the front ranging sensor to collect the first water outflow information and the first ranging information in real time, using the water entry and exit detection device to collect the second water outflow information in real time, and using the lateral ranging sensor to collect the second ranging information in real time until cleaning is completed. The first water discharge information, the first distance measurement information, the second water discharge information, and the second distance measurement information are combined with the current state to determine the next state. The swimming pool robot is then controlled to move according to the execution operation of the next state, thereby completing the waterline cleaning. This automatically and dynamically adjusts the robot's movement state to automatically complete the waterline cleaning task. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0012] Figure 1 This is a schematic diagram of an application environment of a waterline cleaning method provided in Example 1 of the present invention; Figure 2 This is a flow chart of a waterline cleaning method provided in the second embodiment of the present invention; Figure 3This is a flow chart of a waterline cleaning method provided in the third embodiment of the present invention; Figure 4 This is a flow chart of a waterline cleaning method provided in a fourth embodiment of the present invention; Figure 5 This is a flow chart of a waterline cleaning method provided in the fifth embodiment of the present invention; Figure 6 This is a structural diagram of a waterline cleaning device provided by Example 6 of the present invention; Figure 7 This is a structural diagram of a computer device provided in Example 7 of the present invention. DETAILED DESCRIPTION

[0013] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0014] like Figure 1 As shown, it is a schematic diagram of the application environment of a waterline cleaning method provided in the first embodiment of the present invention, wherein the client and the server are connected for communication, and the server is connected for communication with the cleaning robot. The user can provide the conditions, requirements and operation instructions for waterline cleaning to the server by operating the client, and the server is used to generate relevant control instructions for the cleaning robot according to the relevant content sent by the client, so that the user can remotely control the cleaning robot. The client includes but is not limited to various personal computers, laptops, smart phones, tablet computers, portable wearable devices and other computer devices. The computer device corresponding to the server can be implemented with an independent server or a server cluster composed of multiple servers.

[0015] like Figure 2 The figure is a flow chart of a waterline cleaning method provided by the second embodiment of the present invention, wherein the waterline cleaning method is applied to a swimming pool robot. The head of the swimming pool robot is provided with a water entry and exit detection device and a front distance measuring sensor. The side of the swimming pool robot is provided with a lateral distance measuring sensor. The side provided with the lateral distance measuring sensor faces right when cleaning the waterline. The waterline cleaning method is applied to Figure 1 The waterline cleaning method may include the following steps: Step S201: Use the front ranging sensor to collect first water outflow information and first ranging information in real time, use the water inlet and outlet detection device to collect second water outflow information in real time, and use the lateral ranging sensor to collect second ranging information in real time.

[0016] The front ranging sensor can detect whether the front is out of water. When the pool robot moves in the water and approaches the surface, the sensor can sense the change from underwater to above water, thus determining whether the front is out of water. For example, when the pool robot attempts to climb the pool wall to clean the waterline, it needs to know whether the front has reached the surface of the water. The first water-out signal can provide such a basis for judgment.

[0017] The front ranging sensor measures the distance between the robot and any obstacles ahead (typically the pool wall). In a pool environment, as the robot swims through the water or approaches a wall, this sensor continuously acquires distance data to the obstacle ahead. The water entry and exit detection device specifically detects whether the robot is in or out of the water. It accurately senses whether the robot's head is above or below the water surface. The second water exit information supplements and verifies the first water exit information. Combined with the first water exit information from the front ranging sensor, the two confirm each other, enabling more accurate judgment of the robot's water exit status. For example, when attempting to test water exit, the combined first and second water exit information allows the robot to more reliably decide whether to proceed with the exit.

[0018] The lateral ranging sensor is mounted on the side of the pool robot, facing right when cleaning the waterline. It primarily measures the distance between the robot's side and the pool's sidewall. During periods of waterline translation, this secondary ranging information helps the robot maintain an appropriate distance from the pool's sidewall and any obstacles between them, ensuring stable cleaning along the pool's waterline. For example, if the robot measures too far from the sidewall, it can adjust its direction to move closer to it; if too close, it can adjust its direction away to ensure effective cleaning and proper robot operation.

[0019] Step S202, obtaining the current state of the swimming pool robot, and determining the next state from preset states based on the first water outlet information, the first distance measurement information, the second water outlet information, and the second distance measurement information, in combination with the current state. The preset states include: self-rotation to find a wall state, turning to the wall state, advancing to the wall state, raising the head state, climbing up the wall state, retreating state, lowering the head state, attempting to exit the water state, water level line translation state, maintaining the water outlet state, climbing down the wall state, exploring state, advancing state, step retreat state, turning left state, and turning right state.

[0020] First, we need to clearly identify the pool robot's current state. This is because the robot's subsequent actions are adjusted based on its current operating status. For example, if the robot is currently in a forward state, subsequent state transitions will be based on the fact that it is moving forward. If it is currently climbing a wall, the decision-making process will be different. The current state is the fundamental starting point for all decision-making.

[0021] The first water outflow information reflects whether water is emerging in front of the robot, and can be used to determine whether relevant operations of water outflow can be performed. The first ranging information is the distance data between the robot and the obstacle in front, which can be used to control the movement of the robot towards or away from the wall. The second water outflow information is collected by the water inflow and outflow detection device, which can accurately determine whether the robot as a whole is out of water, and assist in confirming the position status of the robot above and below the water surface.

[0022] The preset states are pre-set according to the working requirements of the pool robot and the various situations it may encounter. In this way, the robot can flexibly switch between different states based on real-time sensor data and current status to adapt to the complex and changing pool environment, ensuring that the waterline cleaning task is completed efficiently and accurately.

[0023] Step S203, obtain the execution operation of the next state, control the movement of the swimming pool robot according to the execution operation, and return to execution to use the front ranging sensor to collect the first water outflow information and the first ranging information in real time, use the water inlet and outlet detection device to collect the second water outflow information in real time, and use the lateral ranging sensor to collect the second ranging information in real time until the cleaning is completed.

[0024] Once the pool robot receives the next state's execution instructions, it drives its various components according to these instructions to achieve the corresponding movement. This requires precise control of the robot's power system (such as motors and propellers), steering system (such as servos), and cleaning device. For example, in the "left turn state," the control system sends a signal to the steering system to turn the robot to the left a certain angle; in the "wall climbing state," the power system adjusts its output power to allow the robot to safely move from the pool wall into the water.

[0025] After completing the operations in the current state, the pool robot returns to step S201, continuing to use the front ranging sensor to collect the first water outflow information and the first ranging information in real time, the water inlet and outlet detection device to collect the second water outflow information in real time, and the side ranging sensor to collect the second ranging information in real time, thus completing a cycle. Because the pool environment is dynamic, the robot may encounter various new situations during movement, such as water level changes and changes in obstacle positions. By continuously collecting the latest sensor information, the pool robot can continuously update its understanding of its surroundings. It then re-executes step S202 to reassess and determine the next state, ensuring that the robot always makes the most appropriate decision for the current environment.

[0026] The above cycle will continue until the cleaning is complete. The cleaning completion conditions can be set according to the specific design. For example, it can be when the robot has traversed the entire pool waterline along the preset path, or when the preset cleaning time has expired. When these conditions are met, the robot will stop the cycle and end the cleaning task.

[0027] In an embodiment of the present application, a front ranging sensor is used to collect first water outflow information and first ranging information in real time, a water entry and exit detection device is used to collect second water outflow information in real time, and a lateral ranging sensor is used to collect second ranging information in real time to obtain the current state of the swimming pool robot. According to the first water outflow information, the first ranging information, the second water outflow information, and the second ranging information, in combination with the current state, a next state is determined from preset states, where the preset states include: self-rotation to find a wall state, turning to a wall state, advancing to a wall state, raising the head state, climbing up a wall state, retreating state, lowering the head state, attempting to exit the water state, water level line translation state, maintaining the water outflow state, climbing down a wall state, exploring state, advancing state, step retreat state, left turn state, and right turn state. An execution operation for the next state is obtained, and the movement of the swimming pool robot is controlled according to the execution operation. The first water outflow information and the first ranging information are collected in real time by the front ranging sensor, the second water outflow information is collected in real time by the water entry and exit detection device, and the second ranging information is collected in real time by the lateral ranging sensor until cleaning is completed. The first water discharge information, the first distance measurement information, the second water discharge information, and the second distance measurement information are combined with the current state to determine the next state. The swimming pool robot is then controlled to move according to the execution operation of the next state, thereby completing the waterline cleaning. This automatically and dynamically adjusts the robot's movement state to automatically complete the waterline cleaning task.

[0028] like Figure 3 FIG. 1 is a flow chart of a waterline cleaning method according to a third embodiment of the present invention. In step S202, based on the first water output information, the first distance measurement information, the second water output information, and the second distance measurement information, the next state is determined from the preset state in combination with the current state. The following steps may be included: Step S301: If the current state of the swimming pool robot is the self-rotation and wall-finding state, it is detected whether the first pitch angle of the swimming pool robot is higher than the preset first head-up angle. If the first pitch angle is higher than the preset first head-up angle, it is determined from the self-rotation and wall-finding state that the next state is the wall-climbing state, and the wall-climbing operation corresponding to the wall-climbing state is executed. If the first pitch angle is not higher than the preset first head-up angle, it is detected whether the first yaw angle of the swimming pool robot meets the preset self-rotation angle. If it meets the preset self-rotation angle, the swimming pool robot is determined from the self-rotation and wall-finding state to be the wall-turning state, and the wall-turning operation corresponding to the wall-turning state is executed.

[0029] Optionally, if the current state of the swimming pool robot is the wall-finding state in step S301, the following steps may also be included: If a self-rotation wall-finding operation corresponding to the self-rotation wall-finding state is obtained, the left and right wheels of the swimming pool robot are differentially adjusted until the swimming pool robot performs the self-rotation motion.

[0030] The initial state is the wall-seeking state. In this state, the robot rotates in place at a constant speed and updates the minimum value of the current first distance measurement information and the corresponding first pitch angle of the pool robot in real time. When the pool robot rotates a full 360 degrees, it jumps to the wall-seeking state. Exceptionally, if the robot's head is detected to have exceeded the preset first tilt angle during rotation (the maximum tilt angle of a standard pool is 15 degrees, so the current tilt angle of the robot is greater than 30 degrees), the robot is considered to be tilted by the pool bottom or other reasons, and jumps to the wall-climbing state.

[0031] Among them, the above angles are one of the yaw (yaw angle) and pitch (pitch angle) obtained through imu. When the pool bottom rotates, it is yaw, and head-up detection relies on pitch. The subsequent angles are the same.

[0032] Step S302: If the current state of the pool robot is the Turn Towards Wall state, the target turning position is determined based on the first ranging information, and whether the turning direction of the pool robot meets the target turning position is detected. If the turning direction meets the target turning position, the next state is determined from the Turn Towards Wall state as the Forward Towards Wall state, and the Forward Towards Wall operation corresponding to the Forward Towards Wall state is executed.

[0033] Optionally, if the current state of the swimming pool robot is the turning wall state in step S302, the following steps may be further included: If a turning wall operation corresponding to the turning wall state is obtained, the pool robot is controlled to turn to the target turning position.

[0034] In the Turn Towards Wall state, the robot aims to reach the pitch angle corresponding to the minimum distance measured by the currently recorded first distance measurement information. The robot determines whether to turn left or right based on the relationship between the current first pitch angle and the preset first head-up angle. In other words, the robot rotates in the direction that requires the smallest rotation angle. When the robot reaches the preset first head-up angle, it transitions to the Forwards Wall state.

[0035] Step S303: If the current state of the swimming pool robot is the forward-to-wall state, the first distance measurement information is detected within a preset first detection time to determine whether there is a preset first relative distance. If the first distance measurement information does not contain the preset first relative distance within the preset first detection time, the next state is determined from the forward-to-wall state to be the backward state, and a backward operation corresponding to the backward state is performed. If the preset first relative distance exists, the next state is determined from the forward-to-wall state to be the head-up state, and a head-up operation corresponding to the head-up state is performed.

[0036] Optionally, if the current state of the swimming pool robot is the wall state in step S303, the following steps may be further performed: If a forward-to-wall operation corresponding to the forward-to-wall state is obtained, the swimming pool robot is controlled to move forward.

[0037] In the Forward Wall state, the robot will advance in a straight line until the first distance measurement information continuously detects a distance less than the preset first relative distance, at which point it will transition to the Head Up state. However, if the distance is still less than the preset value after the Forward Wall timeout, the robot will be considered to be stuck by an obstacle not visible to ultrasound and will transition to the Backward state.

[0038] Step S304: if the current state of the swimming pool robot is the head-up state, it is detected whether the second pitch angle of the swimming pool robot meets the preset second head-up angle within the preset head-up time; if the second pitch angle meets the preset second head-up angle within the preset head-up time, the next state is determined from the head-up state to be the wall-climbing state, and the wall-climbing operation corresponding to the wall-climbing state is executed; if the second pitch angle does not meet the preset second head-up angle within the preset head-up time, the next state is determined from the head-up state to be the backward state, and the backward operation corresponding to the backward state is executed.

[0039] Optionally, if the current state of the swimming pool robot is the head-up state in step S304, the following steps may also be included: If a head-up operation corresponding to the head-up state is obtained, the negative pressure motor of the swimming pool robot used to adsorb the wall is reversed to obtain the reversed negative pressure, and the reversed negative pressure is used to control the swimming pool robot to head up.

[0040] In the head-up state, the pool robot applies a slight negative pressure reverse push (positive negative pressure pushes the robot to the pool bottom, offsetting the effects of buoyancy, allowing it to cling to the bottom for cleaning, or presses it against the pool wall. Correspondingly, reverse push causes the robot to raise its head) until the robot's second pitch angle reaches the preset second head-up angle, at which point it transitions to the wall-climbing state. However, if the preset head-up time is exceeded, the robot is considered to be stuck by an unseen obstacle above it and transitions to the wall-climbing state.

[0041] Step S305: If the current state of the pool robot is the wall climbing state, then within the preset wall climbing time, based on the first water outlet information and the second water outlet information, it is determined whether the pool robot has a water outlet signal. If the pool robot does not have a water outlet signal, the next state is determined from the wall climbing state to be the wall climbing down state, and the wall climbing down operation corresponding to the wall climbing down state is performed. If the pool robot has a water outlet signal, the next state is determined from the wall climbing state to be the water exit attempt state. Optionally, if the current state of the swimming pool robot is the wall climbing state, the angle change value of the swimming pool robot's pitch angle is detected to see if it meets the preset range of change. If it does not meet the preset range of change, the swimming pool robot confirms that the next state is the step retreat state from the wall climbing state, and executes the step retreat operation corresponding to the step retreat state.

[0042] Optionally, if the current state of the swimming pool robot is the wall climbing state in step S305, the following steps may be further included: If a wall climbing operation corresponding to a wall climbing state is obtained, the wall negative pressure of the swimming pool robot adsorbing the wall is continuously increased until the swimming pool robot moves on the swimming pool wall and a stable wall negative pressure is obtained. The stable wall negative pressure is used to control the swimming pool robot to climb the wall.

[0043] Among them, the swimming pool robot will turn on a larger wall negative pressure when it is in the wall climbing state, and make multiple attempts to climb the wall until it comes out of the water. Within the preset wall climbing time, based on the first water outlet information and the second water outlet information, it is judged whether the swimming pool robot has a water outlet signal. If the swimming pool robot does not have a water outlet signal, the next state is determined from the wall climbing state to be the wall climbing down state, and the wall climbing down operation corresponding to the wall climbing down state is executed. If the swimming pool robot has a water outlet signal, the next state is determined from the wall climbing state to be the water exit trial state.

[0044] In this embodiment, the swimming pool robot can flexibly switch between various preset states according to different sensor information and its own state to adapt to changes in the swimming pool environment and efficiently complete the waterline cleaning task.

[0045] like Figure 4 FIG. 2 is a flow chart of a waterline cleaning method according to a fourth embodiment of the present invention. In step S202, the method determines the next state from the preset state based on the first water output information, the first distance measurement information, the second water output information, and the second distance measurement information in combination with the current state. The method may further include the following steps: Step S401: If the current state of the swimming pool robot is the water exit trial state, then based on the first water exit information and the second water exit information, it is determined whether the swimming pool robot has a water entry signal within the preset water exit trial time; if the swimming pool robot does not have a water entry signal within the preset water exit trial time, then the next state is determined from the water exit trial state to be the water level line translation state, and the water level line translation operation of the water level line translation state is executed.

[0046] Optionally, if the current state of the swimming pool robot is the water exiting trial state in step S401, the following steps may be further included: If a water out test operation corresponding to the water out test state is obtained, the water out test negative pressure of the swimming pool robot adsorbed on the wall at the water level of the swimming pool is adjusted within the preset water out test time.

[0047] In the water-testing state, the pool robot adjusts the water-testing negative pressure to maintain the robot's water-testing state for the preset water-testing time. If the pool robot does not fall into the water, it transitions to the water-level translation state. If it does fall into the water within this time, the water-testing negative pressure is adjusted to maintain the water-testing state and the robot continues to attempt to maintain the water-level. Furthermore, if the second water-testing information does not contain a water entry signal during the expected water-level translation, this indicates that the robot is significantly above the water surface and is considered to be able to maintain the water level, resulting in a transition to the water-level translation state. If the second distance measurement information continuously shows small values during the water-testing state, indicating that there is an obstacle very close to the right of the robot, possibly a wall or other obstacle, the robot transitions to the wall-climbing state. Furthermore, if the water-testing state exceeds the preset water-testing time, the robot transitions to the wall-climbing state.

[0048] Step S402: If the current state of the swimming pool robot is the water level line translation state, a fixed time interval frequency is obtained, and according to the fixed time interval frequency, the swimming pool robot is controlled to switch from the water level line translation state to the downward exploration state, and perform the downward exploration operation corresponding to the downward exploration state.

[0049] Optionally, if the current state of the swimming pool robot is the water level line translation state, it is determined whether the swimming pool robot has a water entry signal based on the first water outlet information and the second water outlet information. If the swimming pool robot has a water entry signal, the next state is determined from the water level line translation state to the maintaining water outlet state, and the maintaining water outlet operation of maintaining the water outlet state is executed.

[0050] Optionally, if the current state of the swimming pool robot is the water level line translation state, the second ranging information is used to determine whether there is an obstacle on the right side of the swimming pool robot. If there is an obstacle, the swimming pool robot switches from the water level line translation state to the wall climbing state, and performs the wall climbing operation corresponding to the wall climbing state.

[0051] Optionally, if the current state of the swimming pool robot is the water level translation state in step S402, the following steps may also be included: If a water level line translation operation corresponding to the water level line translation state is obtained, the negative pressure on the left side of the test water negative pressure is increased, and the negative pressure on the right side of the test water negative pressure is reduced until the swimming pool robot translates along a fixed angle.

[0052] If the pool robot is in the water level translation state, it will test the water negative pressure. The preset value of 1 is added to the left negative pressure value during translation, and the preset value is subtracted from the right negative pressure value during translation, ensuring the pool robot's translation to the right. Both wheel speeds are set to the same preset value. At this time, due to the left-right negative pressure difference, the pool robot will translate at a fixed angle, and the pool robot will jump to the downward exploration state once every one minute.

[0053] If there is a water entry signal in the first water outflow information and the second water outflow information when the water level line is in the horizontal movement state, it is determined that the swimming pool robot has fallen into the water and jumps to the maintain water outflow state. If an obstacle is detected on the right side in the second ranging information, it jumps to the climbing down the wall state.

[0054] Step S403: If the current state of the swimming pool robot is the downward exploration state, the swimming pool robot is judged whether it meets the preset switching conditions based on the first water outlet information, the second water outlet information, the second ranging information, and the preset downward exploration time. If the preset switching conditions are met, the swimming pool robot confirms that the next state from the downward exploration state is to maintain the water outlet state.

[0055] If the current state of the swimming pool robot is the downward exploration state, the swimming pool robot is judged based on the second ranging information whether there is an obstruction. If there is an obstruction, the swimming pool robot confirms that the next state is the climbing down wall state from the downward exploration state, and executes the climbing down wall operation corresponding to the climbing down wall state.

[0056] Optionally, if the current state of the swimming pool robot is the downward state in step S403, the following steps may be further included: If a downward dive operation corresponding to the downward dive state is obtained, the left and right wheels of the swimming pool robot are differentially controlled until the swimming pool robot enters the water.

[0057] When the robot is in the Descent state, the left wheel is set to 0.1m / s, the right wheel to -0.1m / s, and the left and right negative pressures are both set to 30 (this value causes the robot to drop downward). The robot will then slowly tilt while falling. If the first and second water-out signals detect that the robot is in water, and the second distance measurement signals detect that the robot has retreated more than half its body length, or if the preset Descent time has expired, the robot will transition to the Maintain Water Level state. If the second distance measurement signals indicate an obstruction during the Descent state, the robot will transition to the Wall Climbing state.

[0058] Step S404: If the current state of the swimming pool robot is the maintaining out-of-water state, then within the preset maintaining out-of-water time, based on the first out-of-water information and the second out-of-water information, it is determined whether the swimming pool robot has a water entry signal within the preset maintaining out-of-water time; if there is no water entry signal within the preset maintaining out-of-water time, then the next state is determined to be the water level line translation state from the maintaining out-of-water state, and the water level line translation operation corresponding to the water level line translation state is executed.

[0059] Optionally, if the current state of the swimming pool robot is maintaining the out-of-water state, the swimming pool robot is judged based on the second ranging information whether it is above the water level line of the swimming pool. If the swimming pool robot is above the water level line of the swimming pool, the swimming pool robot determines that the next state is the water level translation state from the maintaining out-of-water state, and executes the water level translation operation corresponding to the water level translation state.

[0060] Optionally, if the current state of the swimming pool robot is maintaining the out-of-water state, it determines whether there is an obstacle on the right side based on the second ranging information. If there is an obstacle on the right side, the swimming pool robot determines that the next state from the maintaining out-of-water state is the climbing down the wall state, and executes the climbing down the wall operation corresponding to the climbing down the wall state.

[0061] Optionally, if the current state of the swimming pool robot is maintaining the water outlet state in step S404, the following steps may also be included: If a water-out maintaining operation corresponding to the water-out maintaining state is obtained, the stable upper wall negative pressure is used to control the swimming pool robot to climb the wall to above the water level line of the swimming pool, and the stable upper wall negative pressure is adjusted within the preset water-out maintaining time to obtain the adjusted waterline maintaining negative pressure, and the waterline maintaining negative pressure is used to control the swimming pool robot to move along the water level line of the swimming pool.

[0062] To maintain the out-of-water state, the pool robot uses the aforementioned stable wall-climbing negative pressure to climb the wall. The stable wall-climbing negative pressure is adjusted within the preset out-of-water maintenance time. The wheels move forward until either the first or second water-outlet information indicates a water-out signal, confirming the robot's exit from the water. The negative pressure is then adjusted to the water-out test negative pressure during the trial out-of-water test, and the preset out-of-water maintenance time is maintained. If the robot has not fallen into the water, the robot transitions to the water-level translation state. If it has, the trial out-of-water negative pressure is adjusted until the preset out-of-water maintenance time is maintained. Additionally, the second distance measurement information detects the robot's exit from the water, transitioning to the water-level translation state. If the second distance measurement information continuously detects small values during the out-of-water state, indicating an obstacle close to the right of the robot, possibly a wall or other obstacle, the robot transitions to the wall-climbing state. Furthermore, if the out-of-water state times out, the robot transitions to the wall-climbing state.

[0063] In this embodiment, the swimming pool robot can flexibly switch between various preset states according to different sensor information and the current state, thereby completing the task of cleaning the swimming pool waterline more efficiently and safely.

[0064] like Figure 5 FIG. 2 is a flow chart of a waterline cleaning method according to a fifth embodiment of the present invention. In step S202, based on the first water output information, the first distance measurement information, the second water output information, and the second distance measurement information, the next state is determined from the preset states in combination with the current state. The waterline cleaning method may further include the following steps: Step S501: If the current state of the swimming pool robot is the wall-climbing state, the third pitch angle of the swimming pool robot when descending the wall is detected within the preset head-lowering time to see whether it meets the preset first head-lowering angle. If the third pitch angle meets the preset first head-lowering angle within the preset head-lowering time, the swimming pool robot determines that the next state from the wall-climbing state is the backward state, and executes the backward operation corresponding to the backward state. If the third pitch angle does not meet the preset first head-lowering angle within the preset head-lowering time, the swimming pool robot determines that the next state from the wall-climbing state is the head-lowering state, and executes the head-lowering operation corresponding to the head-lowering state.

[0065] The preset head-down time is a pre-set period of time, for example, 2 seconds. During this period, the robot continuously monitors its third pitch angle as it descends the wall. This time is set to give the robot sufficient time to adjust its posture and complete the detection, while also avoiding inefficiencies caused by excessive detection time. The third pitch angle reflects the degree to which the robot's head is tilted relative to the horizontal during the descent. Think of it as the degree to which the robot is "lowering" or "raising its head." This angle is measured by the robot's internal posture sensor.

[0066] The preset first pitch angle is a standard value, predetermined based on the pool environment and the robot's design requirements. For example, it might be set to -20° (a negative angle indicates a downward tilt). When the robot's third pitch angle reaches this value, it indicates that the robot's posture meets the preset requirements.

[0067] If the third pitch angle meets the preset first pitch angle within the preset head-down time, this indicates that the robot is in a good posture when climbing down the wall and has reached the appropriate degree of inclination, and can smoothly proceed to the next action. At this time, the robot will switch from the climbing down the wall state to the backward state and perform the backward operation.

[0068] If the third pitch angle does not match the first pitch angle within the preset head-down time, this means the robot's current posture is not ideal, with the head tilted insufficiently or excessively. To adjust to the appropriate posture, the robot will transition from the wall-climbing state to the head-down state and perform the head-down operation.

[0069] Step S502: If the current state of the swimming pool robot is the backward state, it is determined whether the backward time of the swimming pool robot is greater than the preset backward time. If it meets the preset backward time, the swimming pool robot determines that the next state from the backward state is the right turn state, and executes the right turn operation corresponding to the right turn state.

[0070] Optionally, if the current state of the swimming pool robot is the backward state, the backward distance in the first distance measurement information is extracted to determine whether the backward distance meets the preset backward distance. If it meets the preset backward distance, the swimming pool robot determines that the next state is the right turn state from the backward state, and executes the right turn operation corresponding to the right turn state.

[0071] The logic for this step begins when the pool robot is in the reverse state. This state occurs after the robot has completed its climb down the wall, maintaining a safe distance from the pool wall and adjusting its position. While the robot is in reverse, the system continuously records the reverse time and compares it with the preset reverse time. The preset reverse time is a fixed duration set in advance based on factors such as the pool size, the robot's movement speed, and the cleaning path planning. For example, it might be set to 10 seconds.

[0072] If the reversal time exceeds the preset time, the robot has completed the reversal within the specified timeframe. At this point, the robot transitions from the reverse state to the right turn state and executes the right turn. The right turn allows the robot to change direction and begin a new path. The system extracts the robot's reversal distance from the first distance measurement information, acquired by a distance sensor (such as an ultrasonic sensor) installed on the robot. The system then compares this extracted distance with the preset reversal distance, which is also predetermined based on the actual pool conditions and cleaning requirements; for example, it can be set to 50 cm.

[0073] If the backward distance meets the preset backward distance, it means that the robot has retreated to the predetermined position. At this time, the robot will also switch from the backward state to the right turn state and execute the right turn operation to start a new path direction.

[0074] Step S503: If the current state of the swimming pool robot is the right turn state, the second yaw angle of the swimming pool robot's turning is detected within the preset right turn time to see if it meets the preset target right turn angle. If the second yaw angle meets the preset target right turn angle within the preset right turn time, the swimming pool robot determines that the next state is the forward state from the right turn state, and executes the forward operation corresponding to the forward state.

[0075] Optionally, if the current state of the swimming pool robot is the forward state, it is detected whether the fourth pitch angle of the swimming pool robot when moving forward exceeds the preset third head-up angle. If it exceeds the preset third head-up angle, the swimming pool robot determines that the next state is the wall-climbing state from the forward state, and executes the wall-climbing operation.

[0076] When the pool robot is currently in a right turn state, the detection logic for this step is activated. The right turn state is entered by the robot in order to change its direction of travel within the planned cleaning path. The yaw angle is used to measure the robot's rotation angle in the horizontal plane. The second yaw angle refers to the angle the robot turns relative to its initial direction during the right turn. This angle can be accurately measured using sensors such as the robot's built-in gyroscope. The sensor will sense the robot's rotation in real time and convert it into a specific angle value. The preset target right turn angle is a fixed angle value pre-set based on the layout of the swimming pool and the cleaning path planning. When the second yaw angle meets the preset target right turn angle within the preset right turn time, it means that the pool robot has successfully completed the right turn. At this time, the robot's control system will switch the robot's state from the right turn state to the forward state.

[0077] For example, the preset right turn time is 6 seconds, and the target right turn angle can be set to 90°, which means that the robot needs to turn right 90° within 6 seconds to change its direction of travel to adapt to subsequent cleaning tasks.

[0078] Step S504: If the current state of the swimming pool robot is the forward state, it is determined based on the first ranging information whether there is a forward obstacle within the preset detection distance. If there is a forward obstacle, the swimming pool robot determines that the next state is the head-up state from the forward state, and performs the head-up operation corresponding to the head-up state. If there is no forward obstacle within the preset detection distance, after the swimming pool robot reaches the preset forward distance or the swimming pool robot reaches the preset forward time, the swimming pool robot determines that the next state is the left turn state from the forward state, and performs the left turn operation corresponding to the left turn state.

[0079] The logic of this step comes into play when the pool robot is in the forward state. This state is common when the robot is cleaning a pool. In this state, the robot needs to continuously evaluate the environment ahead and its own forward progress to make appropriate decisions. The robot uses the first ranging information to determine whether there are any obstacles within the preset detection distance. This first ranging information is typically provided by a distance sensor (such as an ultrasonic sensor) installed on the robot. The preset detection distance is a pre-set range based on the actual conditions of the pool and the robot's operational safety requirements, for example, it might be set to 30 cm.

[0080] If an obstacle is detected within the preset detection distance, such as steps, protrusions, or other foreign objects in the pool, the robot will transition from the forward state to the head-up state and perform a head-up maneuver to avoid collision. This maneuver allows the robot to raise its head to overcome the obstacle or adjust its posture to better deal with it, ensuring its own safety and continuing the cleaning task.

[0081] If no obstacles are detected within the preset detection distance, the robot's path is clear. The robot will continue forward and determine its next move based on the preset distance or time it has traveled. The preset distance is predetermined based on the pool's cleaning path plan, for example, 2 meters. When the robot reaches this distance, it has completed its current cleaning task and needs to change direction. At this point, the robot transitions from the forward state to the left turn state, executing the left turn to begin a new cleaning area.

[0082] The preset forward time is also set according to the cleaning path planning, for example, 15 seconds. When the robot's forward time reaches this preset value, it will trigger a state transition from the forward state to the left turn state and execute the left turn operation.

[0083] Step S505: If the current state of the swimming pool robot is the left turn state, the left turning angle of the swimming pool robot is detected within the preset left turn time to see if it meets the preset left turn angle. If the left turning angle meets the preset left turn angle within the preset left turn time, the swimming pool robot determines that the next state is the forward state from the left turn state, and executes the forward operation corresponding to the forward state.

[0084] The system begins executing the logic for this step when the pool robot is in a left turn state. This state occurs when the robot changes direction to avoid obstacles while cleaning the pool. The system detects the pool robot's left turn angle. This left turn angle refers to the angle the robot turns relative to its initial direction during the turn, and can be accurately measured using the robot's internal angle sensor (such as a gyroscope). There is also a preset left turn angle and time limit, which are pre-set based on the pool layout and cleaning path planning. For example, the preset left turn angle can be set to 90°, and the left turn time can be set to 6 seconds.

[0085] If the pool robot detects that its left turn angle meets the preset left turn angle within the preset left turn time, it indicates that the robot has accurately completed the planned left turn and reached the appropriate direction. At this point, the robot will transition from the left turn state to the forward state and execute the forward operation. The forward operation allows the robot to continue moving in the pool in the new direction to carry out subsequent cleaning work. If the left turn angle does not meet the preset left turn angle within the preset left turn time, the robot will transition to the forward state.

[0086] Step S506: If the current state of the swimming pool robot is the head-down state, the fifth pitch angle of the swimming pool robot is detected to see if it meets the preset second head-down angle. If it meets the second head-down angle, the swimming pool robot determines that the next state from the head-down state is the backward state, and executes the backward operation corresponding to the backward state.

[0087] The detection and judgment mechanism in this step is activated when the pool robot is in the head-down state. This head-down state may have occurred during a previous operation, such as in step S501, when the robot's pitch angle did not meet the required value when descending a wall. The purpose of this state is to adjust its posture. The fifth pitch angle is a parameter used to measure the tilt of the pool robot's head relative to the horizontal. This value is obtained by the robot's internal posture sensor (e.g., an inertial measurement unit composed of an accelerometer and gyroscope). This sensor can sense changes in the robot's posture in space in real time and convert them into specific angle values.

[0088] The preset second pitch angle is a pre-set standard angle value, determined based on the actual pool environment, the robot's operating requirements, and subsequent operational requirements. For example, it might be set to -20° (negative angles typically indicate a pitch angle). When the robot's fifth pitch angle reaches this value, its posture meets the specified conditions.

[0089] If the pool robot's fifth pitch angle matches the preset second head-down angle, it indicates that the robot has successfully adjusted to the appropriate head-down posture. At this point, the robot will transition from its current head-down state to the backward state and execute the corresponding backward operation. The backward operation may allow the robot to leave its current position in an appropriate posture to prepare for subsequent actions (such as changing direction to continue cleaning). If the fifth pitch angle does not meet the preset second head-down angle, the robot will remain in the head-down state and continue adjusting its posture until the fifth pitch angle reaches the preset second head-down angle, at which point it will transition and execute the backward operation.

[0090] Step S507: If the current state of the swimming pool robot is the step retreat state, the sixth pitch angle of the swimming pool robot when step retreating is detected to see whether it exceeds the preset fourth head-up angle and the step retreating time is detected to see whether it exceeds the preset fourth head-up angle or the preset step retreating time. If it exceeds the preset fourth head-up angle or the preset step retreating time, the swimming pool robot determines that the next state is the wall climbing down state from the step retreat state.

[0091] The detection and judgment process in this step begins when the pool robot is in the step-back state. This step-back state typically occurs when the robot is performing cleaning or adjusting its position near pool steps, perhaps to avoid collisions with the steps or to adjust to the appropriate position for the next action. The sixth pitch angle measures the tilt of the pool robot's head relative to the horizontal during the step-back process. This angle is acquired in real time by an internal attitude sensor (such as an inertial measurement unit consisting of an accelerometer and gyroscope). The attitude sensor accurately senses changes in the robot's posture in space and converts them into specific angle values. The fourth head-up angle is a pre-set standard value determined based on the actual pool environment, the robot's operational requirements, and safety requirements. For example, it might be set to 15°. If the robot's sixth pitch angle exceeds this value, it indicates that the robot's head has been raised beyond its intended level, potentially indicating that the robot encountered a special condition during the step-back process, such as an obstruction at the edge of a step.

[0092] The stair-back time is the time it takes for the robot to enter the stair-back state, and the system records this time in real time. The preset stair-back time is a threshold set in advance based on the characteristics of the pool steps and the robot's operational plan. For example, it might be set to 10 seconds. If the robot's stair-back time exceeds this preset value, it indicates that the robot has been in the stair-back state for an extended period and may need to transition to another state to continue completing other tasks.

[0093] If the pool robot meets either of the following conditions: "exceeding the preset fourth head-up angle" or "exceeding the preset stair-backward time," the pool robot will transition from the stair-backward state to the wall-climbing state. Once the state transition conditions are met, the robot enters the wall-climbing state. The wall-climbing state involves a series of specific movements and operations, such as adjusting the robot's posture and controlling its speed and direction, so that the robot can safely and smoothly move from the pool steps to the pool wall and continue cleaning or other work.

[0094] In this embodiment, by focusing on the judgment and state transition of the swimming pool robot in different states, it is ensured that it can perform tasks such as cleaning in the swimming pool safely and orderly.

[0095] like Figure 6 The figure shows a schematic diagram of a waterline cleaning device provided in the sixth embodiment of the present invention. This waterline cleaning device corresponds one-to-one with the waterline cleaning method in the above embodiment. The waterline cleaning device is applied to a swimming pool robot. The head of the swimming pool robot is provided with a water entry and exit detection device and a front ranging sensor. The side of the swimming pool robot is provided with a lateral ranging sensor. The side provided with the lateral ranging sensor faces right during waterline cleaning. The waterline cleaning device includes an information acquisition module 61, a state determination module 62, and an operation execution module 63. The functional modules are described in detail as follows: An information collection module 61 is configured to collect first water outflow information and first ranging information in real time using a front ranging sensor, collect second water outflow information in real time using a water inlet and outlet detection device, and collect second ranging information in real time using a lateral ranging sensor; The state determination module 62 is used to obtain the current state of the swimming pool robot, and determine the next state from preset states based on the first water outlet information, the first distance measurement information, the second water outlet information, and the second distance measurement information in combination with the current state. The preset states include: self-rotation to find the wall state, turning to the wall state, advancing to the wall state, raising the head state, climbing up the wall state, retreating state, lowering the head state, attempting to exit the water state, water level translation state, maintaining the water outlet state, climbing down the wall state, exploring state, advancing state, step retreat state, turning left state, and turning right state. The operation execution module 63 is used to obtain the execution operation of the next state, control the movement of the swimming pool robot according to the execution operation, and return to execution to use the front ranging sensor to collect the first water outflow information and the first ranging information in real time, use the water inlet and outlet detection device to collect the second water outflow information in real time, and use the lateral ranging sensor to collect the second ranging information in real time until the cleaning is completed.

[0096] Optionally, the state determination module 62 includes: a self-rotation wall-finding state conversion unit, configured to, if the current state of the swimming pool robot is the self-rotation wall-finding state, detect whether a first pitch angle of the swimming pool robot is higher than a preset first head-up angle; if the first pitch angle is higher than the preset first head-up angle, determine that the next state in the self-rotation wall-finding state is a wall-climbing-down state, and execute a wall-climbing-down operation corresponding to the wall-climbing-down state; and if the first pitch angle is not higher than the preset first head-up angle, detect whether a first yaw angle of the swimming pool robot meets a preset self-rotation angle; if it meets the preset self-rotation angle, determine that the next state in the self-rotation wall-finding state is a wall-turning state, and execute a wall-turning operation corresponding to the wall-turning state; a turn-to-wall state conversion unit, configured to, if the current state of the pool robot is the turn-to-wall state, determine a target turn position based on the first ranging information, detect whether the turning direction of the pool robot conforms to the target turn position, and if the turning direction conforms to the target turn position, determine the next state from the turn-to-wall state as the advance-to-wall state, and execute a advance-to-wall operation corresponding to the advance-to-wall state; a forward-to-wall state conversion unit, configured to, if the current state of the swimming pool robot is the forward-to-wall state, detect whether a preset first relative distance exists in the first distance measurement information within a preset first detection time; if the preset first relative distance does not exist in the first distance measurement information within the preset first detection time, determine that the next state in the forward-to-wall state is the backward state, and perform a backward operation corresponding to the backward state; if the preset first relative distance exists, determine that the next state in the forward-to-wall state is the head-up state, and perform a head-up operation corresponding to the head-up state; a head-up state conversion unit, configured to, if the current state of the pool robot is the head-up state, detect whether a second pitch angle of the pool robot meets a preset second head-up angle within a preset head-up time; if the second pitch angle meets the preset second head-up angle within the preset head-up time, determine the next state from the head-up state as the wall-climbing state and execute the wall-climbing operation corresponding to the wall-climbing state; if the second pitch angle does not meet the preset second head-up angle within the preset head-up time, determine the next state from the head-up state as the backward state and execute the backward operation corresponding to the backward state; a first wall-climbing state conversion unit, configured to, if the current state of the swimming pool robot is the wall-climbing state, determine, within a preset wall-climbing time, based on the first water-outlet information and the second water-outlet information, whether the swimming pool robot has a water-outlet signal; if the swimming pool robot has no water-outlet signal, determine the next state from the wall-climbing state to be the wall-climbing state, and execute the wall-climbing operation corresponding to the wall-climbing state; if the swimming pool robot has a water-outlet signal, determine the next state from the wall-climbing state to be the water-outlet trial state; The second unit of the wall climbing state is used to detect whether the angle change value of the pitch angle of the swimming pool robot meets the preset change range if the current state of the swimming pool robot is the wall climbing state. If it does not meet the preset change range, the swimming pool robot confirms that the next state is the step retreat state from the wall climbing state, and executes the step retreat operation corresponding to the step retreat state.

[0097] Optionally, the operation execution module 63 includes: The self-rotation wall-finding operation unit is used to adjust the left and right wheel differentials of the swimming pool robot until the swimming pool robot performs the self-rotation motion if a self-rotation wall-finding operation corresponding to the self-rotation wall-finding state is obtained; A turning wall operation unit, configured to control the swimming pool robot to turn to a target turning position if a turning wall operation corresponding to a turning wall state is obtained; A forward-to-wall operation unit, configured to control the swimming pool robot to move forward if a forward-to-wall operation corresponding to a forward-to-wall state is obtained; a head-up operation unit, configured to, upon obtaining a head-up operation corresponding to the head-up state, reverse a negative pressure motor of the swimming pool robot for adsorbing the wall, thereby obtaining a reversed negative pressure, and use the reversed negative pressure to control the swimming pool robot to head up; The wall climbing operation unit is used to continuously increase the wall negative pressure of the swimming pool robot adsorbing the wall if a wall climbing operation corresponding to the wall climbing state is obtained, until the swimming pool robot moves on the swimming pool wall and obtains a stable wall negative pressure. The stable wall negative pressure is used to control the swimming pool robot to climb the wall.

[0098] Optionally, the state determination module 62 further includes: a water exit trial state conversion unit, configured to, if the current state of the swimming pool robot is the water exit trial state, determine, based on the first water exit information and the second water exit information, whether the swimming pool robot has a water entry signal within a preset water exit trial time; if the swimming pool robot has no water entry signal within the preset water exit trial time, determine the next state from the water exit trial state to be the water level shift state, and execute a water level shift operation in the water level shift state; The first water level translation state conversion unit is configured to obtain a fixed time interval frequency if the current state of the swimming pool robot is the water level translation state, and control the swimming pool robot to switch from the water level translation state to the downward exploration state according to the fixed time interval frequency, and perform the downward exploration operation corresponding to the downward exploration state; a second water level line translation state conversion unit, configured to, if the current state of the swimming pool robot is the water level line translation state, determine, based on the first water outlet information and the second water outlet information, whether the swimming pool robot has a water entry signal; and if the swimming pool robot has a water entry signal, determine the next state from the water level line translation state to the water outlet maintaining state, and execute a water outlet maintaining operation for maintaining the water outlet state; The third water level translation state conversion unit is configured to, if the current state of the swimming pool robot is the water level translation state, determine whether there is an obstacle on the right side of the swimming pool robot based on the second ranging information; if there is an obstacle, the swimming pool robot switches from the water level translation state to the wall climbing state and performs the wall climbing operation corresponding to the wall climbing state; The first switching unit for the downward diving state is configured to determine, if the current state of the swimming pool robot is the downward diving state, whether the swimming pool robot meets a preset switching condition based on the first water outlet information, the second water outlet information, the second distance measurement information, and a preset downward diving time; if the preset switching condition is met, the swimming pool robot determines that the next state from the downward diving state is the maintaining water outlet state; The second conversion unit for the downward exploration state is configured to determine whether there is an obstruction to the swimming pool robot based on the second ranging information when the current state of the swimming pool robot is the downward exploration state. If there is an obstruction, the swimming pool robot determines that the next state from the downward exploration state is the wall climbing state and performs the wall climbing operation corresponding to the wall climbing state. a first water-outlet-maintaining state conversion unit, configured to, if the current state of the swimming pool robot is the water-outlet-maintaining state, determine, based on the first water-outlet information and the second water-outlet information, whether a water entry signal is present within a preset water-outlet-maintaining time; and if no water entry signal is present within the preset water-outlet-maintaining time, determine that the next state in the water-outlet-maintaining state is the water level shifting state, and execute a water level shifting operation corresponding to the water level shifting state; a second conversion unit for maintaining the out-of-water state, configured to, if the current state of the pool robot is the maintaining out-of-water state, determine, based on the second ranging information, whether the pool robot is located above the water level line of the pool; if the pool robot is located above the water level line of the pool, determine that the next state from the maintaining out-of-water state is a water level translation state, and perform a water level translation operation corresponding to the water level translation state; The third conversion unit for maintaining the out-of-water state is configured to, if the current state of the swimming pool robot is the maintaining out-of-water state, determine, based on the second ranging information, whether there is an obstruction on the right side; if so, determine that the next state of the swimming pool robot from the maintaining out-of-water state is the climbing down the wall state, and perform a climbing down the wall operation corresponding to the climbing down the wall state.

[0099] Optionally, the operation execution module 63 further includes: The water out trial operation unit is used to adjust the water out negative pressure of the swimming pool robot adsorbed on the wall at the water level of the swimming pool within a preset water out trial time if a water out trial operation corresponding to the water out trial state is obtained; The water level translation operation unit is configured to, upon obtaining a water level translation operation corresponding to the water level translation state, increase the negative pressure on the left side of the test water negative pressure and reduce the negative pressure on the right side of the test water negative pressure until the swimming pool robot translates along a fixed angle; A diving operation unit, configured to control the differential movement of the left and right wheels of the swimming pool robot until the swimming pool robot enters the water if a diving operation corresponding to the diving state is obtained; The water outlet maintaining operation unit is used to control the swimming pool robot to climb the wall to above the water level line of the swimming pool by using the stable upper wall negative pressure if the water outlet maintaining operation corresponding to the water outlet maintaining state is obtained, and adjust the stable upper wall negative pressure within the preset water outlet maintaining time to obtain the adjusted water line maintaining negative pressure, and use the water line maintaining negative pressure to control the swimming pool robot to move along the water level line of the swimming pool.

[0100] Optionally, the state determination module 62 further includes: The first conversion unit for the wall climbing state is used to detect whether the third pitch angle of the swimming pool robot when climbing down the wall meets the preset first head-down angle within the preset head-down time when the swimming pool robot is currently in the wall climbing state; A first determination unit for the wall-climbing state is configured to determine that the swimming pool robot is in a backward state from the wall-climbing state if the third pitch angle meets the preset first head-down angle within the preset head-down time, and to perform a backward operation corresponding to the backward state; The second determination unit for the wall-climbing state is configured to determine that the swimming pool robot is in the head-down state after the wall-climbing state if the third pitch angle does not meet the preset first head-down angle within the preset head-down time, and to perform a head-down operation corresponding to the head-down state; The first backward state conversion unit is used to determine whether the backward time of the swimming pool robot is greater than a preset backward time if the current state of the swimming pool robot is the backward state. If the preset backward time is met, the swimming pool robot determines that the next state from the backward state is the right turn state and performs a right turn operation corresponding to the right turn state; a second backward state conversion unit, configured to, if the current state of the swimming pool robot is the backward state, extract the backward distance from the first distance measurement information, determine whether the backward distance meets a preset backward distance, and if so, determine that the next state of the swimming pool robot from the backward state is the right turn state, and execute a right turn operation corresponding to the right turn state; a right-turn state conversion unit, configured to detect, if the current state of the swimming pool robot is the right-turn state, whether the second yaw angle of the swimming pool robot's steering meets a preset target right-turn angle within a preset right-turn time; if the second yaw angle meets the preset target right-turn angle within the preset right-turn time, the swimming pool robot determines that the next state from the right-turn state is the forward state, and executes the forward operation corresponding to the forward state; a first forward state conversion unit, configured to detect, if the current state of the pool robot is the forward state, whether a fourth pitch angle of the pool robot when moving forward exceeds a preset third head-up angle; if so, determine that the next state of the pool robot from the forward state is the wall-climbing state and execute a wall-climbing operation; a second forward state conversion unit, configured to, if the current state of the swimming pool robot is the forward state, determine, based on the first ranging information, whether there is a forward obstacle within a preset detection distance; if there is a forward obstacle, determine that the next state of the swimming pool robot from the forward state is a head-up state, and perform a head-up operation corresponding to the head-up state; and if there is no forward obstacle within the preset detection distance, determine that the next state of the swimming pool robot from the forward state is a left turn state, and perform a left turn operation corresponding to the left turn state, after the swimming pool robot reaches a preset forward distance or a preset forward time; The left-turn state conversion unit is used to detect whether the left turning angle of the swimming pool robot meets the preset left turning angle within the preset left turning time if the current state of the swimming pool robot is the left-turn state. If the left turning angle meets the preset left turning angle within the preset left turning time, the swimming pool robot determines that the next state from the left-turn state is the forward state and performs the forward operation corresponding to the forward state; a head-down state conversion unit, configured to detect, if the current state of the swimming pool robot is the head-down state, whether the fifth pitch angle of the swimming pool robot meets a preset second head-down angle; if so, determine that the next state of the swimming pool robot from the head-down state is the backward state, and execute a backward operation corresponding to the backward state; The step-back state conversion unit is used to detect whether the sixth pitch angle of the swimming pool robot when step-backing exceeds the preset fourth head-up angle and whether the step-back running time exceeds the preset step-back time if the current state of the swimming pool robot is the step-back state. If it exceeds the preset fourth head-up angle or the preset step-back time, the swimming pool robot determines that the next state from the step-back state is the wall climbing state.

[0101] The specific definition of the waterline cleaning device can be found in the definition of the waterline cleaning method above and will not be repeated here. Each module in the waterline cleaning device described above can be implemented in whole or in part through software, hardware, or a combination thereof. Each of the modules described above can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a computer device memory in software form, so that the processor can call and execute the corresponding operations of each module.

[0102] like Figure 7The figure shows a schematic diagram of the structure of a computer device provided in Example 7 of the present invention. The computer device includes a processor, a memory, a network interface, and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a waterline cleaning method is implemented.

[0103] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the waterline cleaning method in the above embodiment is implemented, for example Figures 2 to 5 Alternatively, when the processor executes the computer program, the functions of each module / unit in the embodiment of the waterline cleaning device are realized, for example Figure 6 The functions of the information collection module 61 , the state determination module 62 , and the operation execution module 63 are not described here in detail to avoid repetition.

[0104] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the waterline cleaning method in the above embodiment is implemented, such as Figures 2 to 5 Alternatively, when the computer program is executed by the processor, the functions of each module / unit in the embodiment of the waterline cleaning device are realized, for example Figure 6 The functions of the information collection module 61, the state determination module 62, and the operation execution module 63 are not described here in detail to avoid repetition. The computer-readable storage medium may be non-volatile or volatile.

[0105] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0106] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0107] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.

Claims

1. A waterline cleaning method, characterized in that: The waterline cleaning method is applied to a swimming pool robot. The swimming pool robot is provided with a water entry and exit detection device and a front ranging sensor at the head position. A lateral ranging sensor is provided on the side of the swimming pool robot. The side provided with the lateral ranging sensor faces rightward during waterline cleaning. The waterline cleaning method includes: Using the front ranging sensor to collect the first water outflow information and the first ranging information in real time, using the water inlet and outlet detection device to collect the second water outflow information in real time, and using the lateral ranging sensor to collect the second ranging information in real time; Obtaining a current state of the swimming pool robot; determining a next state from preset states based on the first water outlet information, the first ranging information, the second water outlet information, and the second ranging information in combination with the current state, wherein the preset states include: self-rotation to find a wall state, turning to the wall state, advancing to the wall state, raising the head state, climbing up the wall state, retreating state, lowering the head state, attempting to exit the water state, water level line translation state, maintaining the water outlet state, climbing down the wall state, exploring state, advancing state, step-back state, turning left state, and turning right state; Obtain the execution operation of the next state, control the movement of the swimming pool robot according to the execution operation, and return to execute using the front ranging sensor to collect the first water outflow information and the first ranging information in real time, using the water inlet and outlet detection device to collect the second water outflow information in real time, and using the side ranging sensor to collect the second ranging information in real time until cleaning is completed.

2. The waterline cleaning method according to claim 1, characterized in that: The determining a next state from preset states based on the first water outlet information, the first distance measurement information, the second water outlet information, and the second distance measurement information in combination with the current state includes: If the current state of the swimming pool robot is the self-rotation wall-finding state, it is detected whether the first pitch angle of the swimming pool robot is higher than a preset first head-up angle. If the first pitch angle is higher than the preset first head-up angle, it is determined from the self-rotation wall-finding state that the next state is the wall-climbing state, and a wall-climbing operation corresponding to the wall-climbing state is performed. If the first pitch angle is not higher than the preset first head-up angle, it is detected whether the first yaw angle of the swimming pool robot meets the preset self-rotation angle. If it meets the preset self-rotation angle, the next state of the swimming pool robot is determined from the self-rotation wall-finding state to be the wall-turning state, and a wall-turning operation corresponding to the wall-turning state is performed. If the current state of the pool robot is the Turn to Wall state, determining a target turning position based on the first ranging information, detecting whether the turning direction of the pool robot meets the target turning position, and if the turning direction meets the target turning position, determining the next state from the Turn to Wall state as the Go to Wall state, and executing a Go to Wall operation corresponding to the Go to Wall state; If the current state of the swimming pool robot is the forward-to-wall state, then detecting whether a preset first relative distance exists in the first distance measurement information within a preset first detection time; if the preset first relative distance does not exist in the first distance measurement information within the preset first detection time, then determining that the next state is the backward state from the forward-to-wall state, and performing a backward operation corresponding to the backward state; if the preset first relative distance exists, then determining that the next state is the head-up state from the forward-to-wall state, and performing a head-up operation corresponding to the head-up state; If the current state of the pool robot is the head-up state, detecting whether the second pitch angle of the pool robot meets the preset second head-up angle within a preset head-up time; if the second pitch angle meets the preset second head-up angle within the preset head-up time, determining the next state as the wall-climbing state from the head-up state, and executing the wall-climbing operation corresponding to the wall-climbing state; if the second pitch angle does not meet the preset second head-up angle within the preset head-up time, determining the next state as the back-up state from the head-up state, and executing the back-up operation corresponding to the back-up state; If the current state of the swimming pool robot is the wall climbing state, then within the preset wall climbing time, based on the first water outlet information and the second water outlet information, it is determined whether the swimming pool robot has a water outlet signal; if the swimming pool robot does not have a water outlet signal, then the next state is determined from the wall climbing state to be the wall climbing down state, and a wall climbing down operation corresponding to the wall climbing down state is performed; if the swimming pool robot has a water outlet signal, then the next state is determined from the wall climbing state to be the water exit attempt state, and a water exit attempt operation corresponding to the water exit attempt state is performed; If the current state of the swimming pool robot is the wall climbing state, it is detected whether the angle change value of the pitch angle of the swimming pool robot meets the preset change range. If it does not meet the preset change range, the swimming pool robot determines that the next state is the step retreat state from the wall climbing state, and performs the step retreat operation corresponding to the step retreat state.

3. The waterline cleaning method according to claim 2, characterized in that: Obtaining an execution operation of the next state, and controlling the movement of the swimming pool robot according to the execution operation, including: If a self-rotation wall-finding operation corresponding to the self-rotation wall-finding state is obtained, adjusting the left and right wheel differentials of the swimming pool robot until the swimming pool robot performs a self-rotation motion; If a turning wall operation corresponding to the turning wall state is obtained, controlling the swimming pool robot to turn to the target turning position; If a forward-to-wall operation corresponding to the forward-to-wall state is obtained, controlling the swimming pool robot to move forward; If a head-up operation corresponding to the head-up state is obtained, the negative pressure motor of the swimming pool robot for adsorbing the wall is reversed to obtain a reversed negative pressure, and the reversed negative pressure is used to control the swimming pool robot to head up; If a wall-climbing operation corresponding to the wall-climbing state is obtained, the wall negative pressure of the swimming pool robot adsorbing the wall is continuously increased until the swimming pool robot moves on the swimming pool wall and a stable wall negative pressure is obtained. The stable wall negative pressure is used to control the swimming pool robot to climb the wall.

4. The waterline cleaning method according to claim 1, characterized in that: The determining of a next state from preset states based on the first water outlet information, the first distance measurement information, the second water outlet information, and the second distance measurement information in combination with the current state further includes: If the current state of the pool robot is the water exit trial state, determining whether the pool robot has a water entry signal within a preset water exit trial time based on the first water exit information and the second water exit information; if the pool robot has no water entry signal within the preset water exit trial time, determining that the next state in the water exit trial state is the water level shifting state, and executing a water level shifting operation in the water level shifting state; If the current state of the swimming pool robot is the water level line translation state, obtaining a fixed time interval frequency, and controlling the swimming pool robot to switch from the water level line translation state to the downward exploration state according to the fixed time interval frequency, and performing a downward exploration operation corresponding to the downward exploration state; If the current state of the swimming pool robot is the water level line translation state, determining whether the swimming pool robot has a water entry signal based on the first water outlet information and the second water outlet information; if the swimming pool robot has a water entry signal, determining the next state from the water level line translation state to the water outlet maintaining state, and executing the water outlet maintaining operation of the water outlet maintaining state; If the current state of the swimming pool robot is the water level translation state, determining whether there is an obstacle on the right side of the swimming pool robot based on the second ranging information; if there is an obstacle, switching the swimming pool robot from the water level translation state to the wall climbing state and performing a wall climbing operation corresponding to the wall climbing state; If the current state of the swimming pool robot is the downward diving state, then judging whether the swimming pool robot meets a preset switching condition based on the first water outlet information, the second water outlet information, the second distance measurement information, and a preset downward diving time; if the preset switching condition is met, the swimming pool robot determines that the next state from the downward diving state is the maintaining water outlet state; If the current state of the swimming pool robot is the downward exploration state, determining whether there is an obstruction to the swimming pool robot based on the second ranging information; if there is an obstruction, the swimming pool robot determines that the next state from the downward exploration state is the wall climbing state, and performs a wall climbing operation corresponding to the wall climbing state; If the current state of the swimming pool robot is the maintaining water out state, then within a preset maintaining water out time, based on the first water out information and the second water out information, it is determined whether the swimming pool robot has a water entry signal within the preset maintaining water out time; if the swimming pool robot has no water entry signal within the preset maintaining water out time, then the next state is determined to be a water level shifting state from the maintaining water out state, and a water level shifting operation corresponding to the water level shifting state is performed; If the current state of the pool robot is the maintaining out-of-water state, determining whether the pool robot is above the pool water level based on the second ranging information; if the pool robot is above the pool water level, determining that the next state from the maintaining out-of-water state is the water level translation state, and performing a water level translation operation corresponding to the water level translation state; If the current state of the swimming pool robot is the maintaining out-of-water state, it is determined based on the second ranging information whether there is an obstacle on the right side. If there is the obstacle on the right side, the swimming pool robot determines that the next state from the maintaining out-of-water state is the climbing down the wall state, and performs the climbing down the wall operation corresponding to the climbing down the wall state.

5. The waterline cleaning method according to claim 4, characterized in that: The step of obtaining the execution operation of the next state and controlling the movement of the swimming pool robot according to the execution operation further includes: If a water out test operation corresponding to the water out test state is obtained, adjusting the water out test negative pressure of the swimming pool robot adsorbed on the wall at the water level of the swimming pool within the preset water out test time; If a water level line translation operation corresponding to the water level line translation state is obtained, the left negative pressure of the test water negative pressure is increased, and the right negative pressure of the test water negative pressure is reduced until the swimming pool robot is translated along a fixed angle; If a downward dive operation corresponding to the downward dive state is obtained, differential movement of the left and right wheels of the swimming pool robot is controlled until the swimming pool robot enters the water; If a water-maintaining operation corresponding to the water-maintaining state is obtained, the stable upper wall negative pressure is used to control the swimming pool robot to climb the wall to above the water level line of the swimming pool, and the stable upper wall negative pressure is adjusted within the preset water-maintaining time to obtain the adjusted waterline maintaining negative pressure, and the waterline maintaining negative pressure is used to control the swimming pool robot to move along the water level line of the swimming pool.

6. The waterline cleaning method according to claim 1, characterized in that: The determining of a next state from preset states based on the first water outlet information, the first distance measurement information, the second water outlet information, and the second distance measurement information in combination with the current state further includes: If the current state of the swimming pool robot is the wall climbing state, detecting whether the third pitch angle of the swimming pool robot when climbing down the wall meets the preset first head-down angle within the preset head-down time; If the third pitch angle meets the preset first head-down angle within the preset head-down time, the swimming pool robot determines that the next state from the wall-climbing state is a backward state, and performs a backward operation corresponding to the backward state; If the third pitch angle does not meet the preset first head-down angle within the preset head-down time, the swimming pool robot determines that the next state from the wall-climbing state is a head-down state, and performs a head-down operation corresponding to the head-down state; If the current state of the swimming pool robot is a backward state, determining whether the backward time of the swimming pool robot is greater than a preset backward time; if the preset backward time is met, determining that the next state of the swimming pool robot from the backward state is a right turn state, and executing a right turn operation corresponding to the right turn state; If the current state of the swimming pool robot is a backward state, extracting the backward distance in the first distance measurement information, determining whether the backward distance meets a preset backward distance, and if so, determining that the next state of the swimming pool robot from the backward state is a right turn state, and executing a right turn operation corresponding to the right turn state; If the current state of the swimming pool robot is the right turn state, the second yaw angle of the swimming pool robot is detected within a preset right turn time to see whether it meets the preset target right turn angle. If the second yaw angle meets the preset target right turn angle within the preset right turn time, the swimming pool robot determines that the next state from the right turn state is the forward state, and performs a forward operation corresponding to the forward state. If the current state of the pool robot is the forward state, detecting whether a fourth pitch angle of the pool robot when moving forward exceeds a preset third head-up angle; if it exceeds the preset third head-up angle, determining that the next state of the pool robot from the forward state is the wall-climbing state, and executing the wall-climbing operation; If the current state of the swimming pool robot is the forward state, it is determined based on the first ranging information whether there is a forward obstacle within the preset detection distance. If there is a forward obstacle, the swimming pool robot determines that the next state is the head-up state from the forward state, and performs a head-up operation corresponding to the head-up state. If there is no forward obstacle within the preset detection distance, after the swimming pool robot reaches the preset forward distance or the swimming pool robot reaches the preset forward time, the swimming pool robot determines that the next state is the left turn state from the forward state, and performs a left turn operation corresponding to the left turn state. If the current state of the swimming pool robot is the left turn state, then the left turn angle of the swimming pool robot is detected within a preset left turn time to see whether it meets the preset left turn angle; if the left turn angle meets the preset left turn angle within the preset left turn time, then the swimming pool robot determines that the next state from the left turn state is the forward state, and performs a forward operation corresponding to the forward state; If the current state of the swimming pool robot is the head-down state, detecting whether the fifth pitch angle of the swimming pool robot meets a preset second head-down angle; if it meets the second head-down angle, determining that the next state of the swimming pool robot from the head-down state is the backward state, and executing a backward operation corresponding to the backward state; If the current state of the swimming pool robot is the step-back state, it is detected whether the sixth pitch angle of the swimming pool robot when step-back exceeds the preset fourth head-up angle and whether the step-back time exceeds the preset step-back time. If it exceeds the preset fourth head-up angle or exceeds the preset step-back time, the swimming pool robot determines that the next state from the step-back state is the wall-climbing state.

7. A waterline cleaning device, characterized in that: The waterline cleaning device is applied to a swimming pool robot. The head of the swimming pool robot is provided with a water entry and exit detection device and a front ranging sensor. The side of the swimming pool robot is provided with a lateral ranging sensor. The side provided with the lateral ranging sensor faces rightward during waterline cleaning. The waterline cleaning device comprises: an information acquisition module, configured to use the front ranging sensor to acquire the first water outflow information and the first ranging information in real time, use the water inlet and outlet detection device to acquire the second water outflow information in real time, and use the lateral ranging sensor to acquire the second ranging information in real time; a state determination module, configured to obtain a current state of the swimming pool robot, and determine a next state from preset states based on the first water outlet information, the first distance measurement information, the second water outlet information, and the second distance measurement information, in combination with the current state, wherein the preset states include: self-rotation to find a wall state, turning to the wall state, advancing to the wall state, raising the head state, climbing up the wall state, retreating state, lowering the head state, attempting to exit the water state, water level translation state, maintaining the water outlet state, climbing down the wall state, exploring state, advancing state, step-back state, turning left state, and turning right state; The operation execution module is used to obtain the execution operation of the next state, control the movement of the swimming pool robot according to the execution operation, and return to execute the real-time collection of the first water outflow information and the first ranging information by the front ranging sensor, the real-time collection of the second water outflow information by the water inlet and outlet detection device, and the real-time collection of the second ranging information by the side ranging sensor until the cleaning is completed.

8. The waterline cleaning device according to claim 7, characterized in that: The state determination module includes: a self-rotation wall-finding state conversion unit configured to, if the current state of the swimming pool robot is the self-rotation wall-finding state, detect whether a first pitch angle of the swimming pool robot is higher than a preset first head-up angle; if the first pitch angle is higher than the preset first head-up angle, determine that the next state in the self-rotation wall-finding state is the wall-climbing state, and execute a wall-climbing operation corresponding to the wall-climbing state; and if the first pitch angle is not higher than the preset first head-up angle, detect whether a first yaw angle of the swimming pool robot meets a preset self-rotation angle; if it meets the preset self-rotation angle, determine that the next state of the swimming pool robot in the self-rotation wall-finding state is the wall-turning state, and execute a wall-turning operation corresponding to the wall-turning state; a turn-to-wall state conversion unit, configured to, if the current state of the pool robot is the turn-to-wall state, determine a target turn position based on the first ranging information, detect whether the turning direction of the pool robot conforms to the target turn position, and if the turning direction conforms to the target turn position, determine the next state from the turn-to-wall state as the advance-to-wall state, and execute a advance-to-wall operation corresponding to the advance-to-wall state; a forward-to-wall state conversion unit, configured to, if the current state of the pool robot is the forward-to-wall state, detect whether a preset first relative distance exists in the first distance measurement information within a preset first detection time; if the preset first relative distance does not exist in the first distance measurement information within the preset first detection time, determine that the next state from the forward-to-wall state is the backward state, and perform a backward operation corresponding to the backward state; if the preset first relative distance exists, determine that the next state from the forward-to-wall state is the head-up state, and perform a head-up operation corresponding to the head-up state; a head-up state conversion unit, configured to, if the current state of the pool robot is the head-up state, detect whether a second pitch angle of the pool robot meets a preset second head-up angle within a preset head-up time; if the second pitch angle meets the preset second head-up angle within the preset head-up time, determine the next state from the head-up state to be the wall-climbing state, and execute a wall-climbing operation corresponding to the wall-climbing state; if the second pitch angle does not meet the preset second head-up angle within the preset head-up time, determine the next state from the head-up state to be the back-up state, and execute a back-up operation corresponding to the back-up state; a first wall-climbing state conversion unit, configured to, if the current state of the swimming pool robot is the wall-climbing state, determine, within the preset wall-climbing time, based on the first water-outlet information and the second water-outlet information, whether the swimming pool robot has a water-outlet signal; if the swimming pool robot does not have a water-outlet signal, determine, from the wall-climbing state, that the next state is the wall-climbing state, and execute a wall-climbing operation corresponding to the wall-climbing state; and if the swimming pool robot has a water-outlet signal, determine, from the wall-climbing state, that the next state is the water-out trial state, and execute a water-out trial operation corresponding to the water-out trial state; The second conversion unit for the wall-climbing state is used to detect whether the angle change value of the pitch angle of the swimming pool robot meets the preset change range if the current state of the swimming pool robot is the wall-climbing state. If it does not meet the preset change range, the swimming pool robot confirms that the next state from the wall-climbing state is the step retreat state, and performs the step retreat operation corresponding to the step retreat state.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the waterline cleaning method according to any one of claims 1 to 6 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the waterline cleaning method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Underwater robot motion path planning method and system

    CN108189031A

  • Swimming pool cleaning robot, control method, electronic equipment and storage medium

    CN115542922A

  • Swimming pool water line cleaning method and device, swimming pool robot and readable storage medium

    CN118226859A

  • Posture adjusting method for pool cleaning robot before wall climbing and pool cleaning robot

    CN119225358A

  • Pool cleaning robot having waterline movement capabilities

    US20140230168A1