Control method, device, equipment, and medium for a cleaning robot
Patent Information
- Application Number
- TW114101508
- Authority / Receiving Office
- TW · TW
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2024-01-16
- Filing Date
- 2025-01-14
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2045-01-13
AI Technical Summary
Current cleaning robots lack the ability to receive diverse and personalized user instructions beyond fixed commands, limiting their functionality and adaptability.
A control method and device for cleaning robots that provide a graphical interface with an instruction block panel and editor, allowing users to select and formulate target control logic through various instruction blocks, including AI, cleaning, and event instructions, which are converted into executable code to control the robot.
Enables users to customize cleaning robot functions according to their needs, enriching use scenarios and improving efficiency by allowing flexible and personalized control logic formulation.
Smart Images

Figure TWG2TB001910340_001 
Figure TWG2TB001910340_002 
Figure TWG2TB001910340_003
Abstract
Description
Control method, device, equipment and medium of cleaning robot The present application relates to the field of robotics technology, and in particular to a control method and device, equipment, and medium for a cleaning robot. With the development of computer and embedded technologies, various cleaning robots, such as sweepers and mops, have emerged. Currently, users can interact with cleaning robots through apps (apps) using virtual buttons or voice commands. Following these commands, the robots autonomously navigate designated areas and perform cleaning or evacuation operations. However, currently only fixed instructions can be sent to the cleaning robot, which cannot meet the user's diverse and personalized configuration function requirements. Therefore, this technical problem needs to be solved urgently. In view of the above problems, the present application is proposed to provide a control method, device, equipment and medium for a cleaning robot that overcomes the above problems or at least partially solves the above problems. The technical solution is as follows: In a first aspect, a control method for a cleaning robot is provided, which is applied to a configuration end, and the method includes: providing a graphical interface, the interface including an instruction block panel and an instruction editor, the instruction block panel including at least one instruction block; receiving one or more target instruction blocks selected from the instruction block panel in the instruction editor, and formulating a target control logic for controlling the cleaning robot through the one or more target instruction blocks; and controlling the cleaning robot according to the formulated target control logic. In a possible implementation, the instruction block includes at least one level one instruction block. In a possible implementation, the first-level instruction block includes at least one second-level instruction block. In one possible implementation, receiving one or more target instruction blocks selected from the instruction block panel in the instruction editor includes: receiving one or more target instruction blocks selected from the primary instruction block and / or secondary instruction block of the instruction block panel in the instruction editor. In one possible implementation, at least one of the first-level instruction blocks includes one or more of an artificial intelligence instruction block, a sweep instruction block, a judgment instruction block, an action instruction block, a function instruction block, a loop and branch instruction block, an event instruction block, and other instruction blocks. In one possible implementation, if the primary instruction block includes an artificial intelligence instruction block, at least one secondary instruction block under the primary instruction block includes one or more of speech recognition, object recognition, stain recognition, and language recognition wake-up. In one possible implementation, if the first-level instruction block includes a cleaning instruction block, at least one second-level instruction block under the first-level instruction block includes one or more of a cleaning position, a cleaning mode, and a suction force. In one possible implementation, the target control logic for controlling the cleaning robot is formulated through the one or more target instruction blocks, including: obtaining descriptive information of the functions to be achieved by controlling the cleaning robot; and based on the descriptive information of the functions, formulating the target control logic for controlling the cleaning robot through the one or more target instruction blocks. In a second aspect, a control method for a cleaning robot is provided, which is applied to the cleaning robot, and the method includes: receiving a target control code sent from a configuration end; wherein, the target control code is generated by the configuration end according to a formulated target control logic, and the configuration end receives one or more target instruction blocks selected from an instruction block panel in an instruction editor, and formulates a target control logic for controlling the cleaning robot through the one or more target instruction blocks; the configuration end provides a graphical interface, and the interface includes the instruction block panel and the instruction editor, and the instruction block panel includes at least one instruction block; executing the target control code to control the cleaning robot. In one possible implementation, the cleaning robot includes a code snippet manager and a code executor; after receiving the target control code sent from the configuration end, the method also includes: the code snippet manager stores the target control code; executing the target control code to control the cleaning robot, including: the code snippet manager loads the target control code to the code executor; the code executor executes the target control code to control the cleaning robot. In one possible implementation, the cleaning robot also includes a function server; the code executor executes the target control code to control the cleaning robot, including: in the process of executing the target control code, the code executor customizes the function service to the function server when it involves a function service, and the function server subscribes to the event corresponding to the function service to the Internet of Things (IOT) event bus; when the code executor monitors the event corresponding to the function service, it executes the control code of the event corresponding to the function service to control the cleaning robot. In one possible implementation, the code executor executes the target control code to control the cleaning robot, including: the code executor starts an execution thread to execute the target control code, and in the process of executing the target control code, checks the execution status of one or more of the following target control codes according to a set duration: whether the execution thread exists; whether an exception occurs in the control code of the event response; whether the execution duration of the target control code exceeds a preset threshold; whether the cleaning robot reports an error; whether a stop command sent from the configuration end is received; when one or more of the following occurs: the execution thread does not exist, the control code of the event response has an exception, the execution duration of the target control code exceeds the preset threshold, the cleaning robot reports an error, or a stop command is received from the configuration end, the execution of the target control code is stopped. In one possible implementation, the code snippet manager loads the target control code into the code executor, including: the code snippet manager loads the target control code into the sandboxed code executor; the code executor executes the target control code to control the cleaning robot, including: the code executor executes the target control code in the sandbox to control the cleaning robot. According to a third aspect, a control device for a cleaning robot is provided, which is applied to a configuration end, and the device includes: a display unit for providing a graphical interface, the interface including an instruction block panel and an instruction editor, the instruction block panel including at least one instruction block; a formulation unit for receiving one or more target instruction blocks selected from the instruction block panel in the instruction editor, and formulating a target control logic for controlling the cleaning robot through the one or more target instruction blocks; and a control unit for controlling the cleaning robot according to the formulated target control logic. In a fourth aspect, a control device for a cleaning robot is provided, which is applied to the cleaning robot, and the device includes: a receiving unit for receiving a target control code sent from a configuration end; wherein the target control code is generated by the configuration end according to a formulated target control logic, and the configuration end receives one or more target instruction blocks selected from an instruction block panel in an instruction editor, and formulates a target control logic for controlling the cleaning robot through the one or more target instruction blocks; the configuration end provides a graphical interface, and the interface includes the instruction block panel and the instruction editor, and the instruction block panel includes at least one instruction block; an execution unit for executing the target control code to control the cleaning robot. In a fifth aspect, a configuration end is provided, comprising a processor and a memory, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute any one of the above-described control methods for the cleaning robot. In a sixth aspect, a storage medium is provided, wherein the storage medium stores a computer program, wherein the computer program is configured to execute any of the above-mentioned control methods for the cleaning robot when running. In a seventh aspect, a cleaning robot is provided, comprising a processor and a memory, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute any one of the above-described control methods for the cleaning robot. In an eighth aspect, a storage medium is provided, wherein the storage medium stores a computer program, wherein the computer program is configured to execute any one of the above-mentioned control methods for the cleaning robot when running. By means of the above-mentioned technical solution, the control method, apparatus, device and medium of the cleaning robot provided in the embodiment of the present application can provide a graphical interface on the configuration end, which includes an instruction block panel and an instruction editor, and the instruction block panel includes at least one instruction block; one or more target instruction blocks selected from the instruction block panel are received in the instruction editor, and a target control logic for controlling the cleaning robot is formulated through the one or more target instruction blocks; and the cleaning robot is controlled according to the formulated target control logic. It can be seen that this embodiment can provide a graphical interface on the configuration end, and the user can formulate the target control logic according to their own diverse and personalized needs, realize the corresponding target function requirements, make the use scenarios of the cleaning robot more diverse, and improve the working efficiency of the cleaning robot. This application claims priority to the Chinese patent application filed with the China Patent Office on January 16, 2024, with application number 202410063920.1, and invention name “Control method, device, equipment and medium for cleaning robot”, the entire contents of which are incorporated by reference into this application. The following describes exemplary embodiments of the present application in more detail with reference to the accompanying drawings. Although exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art. It should be noted that the terms "first," "second," and the like in the specification and claims of this application and in the accompanying drawings are used to distinguish similar items and are not necessarily used to describe a particular order or precedence. It should be understood that such usage is interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the term "including" and its variations are to be interpreted as open-ended terms meaning "including but not limited to." In order to solve the above technical problems, an embodiment of the present application provides a control method for a cleaning robot applied to a configuration end. As shown in Figure 1, the control method for a cleaning robot applied to a configuration end may include the following steps S101 to S103: Step S101, providing a graphical interface, which includes an instruction block panel and an instruction editor, and the instruction block panel includes at least one instruction block; Step S102, receiving one or more target instruction blocks selected from the instruction block panel in the instruction editor, and formulating a target control logic for controlling the cleaning robot through one or more target instruction blocks; Step S103, controlling the cleaning robot according to the formulated target control logic. In this step, a target control code may be generated according to the established target control logic, and the target control code may be sent to the cleaning robot so that the target control code is executed to control the cleaning robot. This embodiment can provide a graphical interface at the configuration end, and users can formulate target control logic according to their own diverse and personalized needs to achieve corresponding target function requirements, thereby enriching the use scenarios of the cleaning robot and improving the work efficiency of the cleaning robot. In this embodiment, the functional points of the cleaning robot and the configurable parameters and modes of each functional point can be specifically sorted out, and these functional points, configurable parameters and modes of each functional point can be encapsulated into programming instructions, which can be intuitively and clearly integrated into a graphical interface, and at least one instruction block can be displayed in the instruction block panel of the interface. In one embodiment of the present application, a possible implementation method is provided. Specifically, the at least one command block displayed in the command block panel of the interface may include a first-level command block, each of which includes a second-level command block. For example, the first-level command block may be an AI (Artificial Intelligence) command block, which includes second-level command blocks such as speech recognition, object recognition, stain recognition, and language recognition wake-up. Optionally, each secondary instruction block may further include a tertiary instruction block, such as a first camera, a second camera, etc., which is not limited in this embodiment. In addition, each third-level instruction block can also include a fourth-level instruction block, and so on. Specifically, the hierarchy can be set based on programming instructions encapsulated based on function points, configurable parameters of each function point, and modes. This embodiment does not limit this. In one embodiment of the present application, a possible implementation is provided. Step S102 above, in the instruction editor, receives one or more target instruction blocks selected from the instruction block panel. Specifically, the instruction editor may receive one or more target instruction blocks selected from the primary instruction blocks and / or secondary instruction blocks in the instruction block panel. This makes selection more flexible and efficient. The one or more target instruction blocks can be selected from the instruction block panel by clicking, dragging, or double-clicking, and this embodiment does not limit this. Optionally, if the instruction block panel includes multi-level instruction blocks, such as first-level instruction blocks, second-level instruction blocks, third-level instruction blocks, etc., one or more target instruction blocks can be selected from these multi-level instruction blocks, which makes the selection more flexible and efficient. The embodiments of the present application provide a possible implementation method. The various first-level instruction blocks mentioned in this embodiment may include one or more of an artificial intelligence instruction block, a sweep instruction block, a judgment instruction block, an action instruction block, a function instruction block, a loop and branch instruction block, an event instruction block, and other instruction blocks, and this embodiment does not impose any restrictions on this. Optionally, if the primary instruction block includes an artificial intelligence instruction block, at least one secondary instruction block under the primary instruction block may include one or more of speech recognition, object recognition, stain recognition, and language recognition wake-up, which is not limited in this embodiment. Optionally, if the primary instruction block includes a cleaning instruction block, at least one secondary instruction block under that primary instruction block may include one or more of cleaning location, cleaning mode, and suction force, though this embodiment does not impose any restrictions on this. The cleaning location instruction block may also include tertiary instruction blocks, such as master bedroom, living room, second bedroom, balcony, and bathroom; the cleaning mode instruction block may also include tertiary instruction blocks, such as cleaning only, mopping only, moving only, and sweep and mop; and the suction force instruction block may also include tertiary instruction blocks, such as strong and normal, though this embodiment does not impose any restrictions on this. Optionally, if the primary instruction block includes an event instruction block, sensor functions of the cleaning robot, such as the infrared sensor, distance sensor, and acceleration sensor, can be defined as event instructions. For example, when the cleaning robot's sensor detects a collision between the cleaning robot and a wall or a virtual wall, a collision event is generated. In this case, the collision event instruction block can be used as a secondary instruction block under the event instruction block. It should be noted that the examples listed here are merely illustrative and do not limit this embodiment. A possible implementation method is provided in an embodiment of the present application. The above step S102 formulates the target control logic for controlling the cleaning robot through one or more target instruction blocks, which can specifically include the following steps A1 and A2: Step A1, obtains description information of the functions to be achieved by controlling the cleaning robot. In this step, the function description information is a detailed description of the functions to be achieved by controlling the cleaning robot. For example, the function description information may be that when the robot detects that no one is home, it switches to security mode and triggers an alarm when a stranger enters the house; another example is that the function description information may be that the robot cleans at 8:00 a.m. every weekday and at 9:00 a.m. every weekday, etc. It should be noted that the examples here are only illustrative and do not limit this embodiment. Step A2: Based on the functional description information, formulate a target control logic for controlling the cleaning robot through one or more target instruction blocks. This embodiment can formulate target control logic for controlling the cleaning robot based on the functional description information through one or more target instruction blocks, which is more accurate and efficient, making the use scenarios of the cleaning robot richer and improving the working efficiency of the cleaning robot. Based on the same inventive concept, an embodiment of the present application also provides a control method for a cleaning robot applied to a cleaning robot. As shown in Figure 2, the control method for a cleaning robot applied to a cleaning robot may include the following steps S201 to S202: Step S201, receiving a target control code sent from the configuration end; wherein, the target control code is generated by the configuration end according to the formulated target control logic, and the configuration end receives one or more target instruction blocks selected from the instruction block panel in the instruction editor, and formulates the target control logic for controlling the cleaning robot through one or more target instruction blocks; the configuration end provides a graphical interface, the interface includes an instruction block panel and an instruction editor, and the instruction block panel includes at least one instruction block; Step S202, executing the target control code to control the cleaning robot. This embodiment receives the target control code sent from the configuration end. The target control code here is generated by the configuration end according to the established target control logic, so that the high-level instruction program based on the user's intention is converted into an executable command sequence for the cleaning robot, thereby controlling the cleaning robot, enriching the use scenarios of the cleaning robot, and improving the work efficiency of the cleaning robot. A possible implementation method is provided in an embodiment of the present application, and the cleaning robot may include a code snippet manager and a code executor; after receiving the target control code sent from the configuration end in step S201, the code snippet manager may also store the target control code; in this way, step S202 executes the target control code to control the cleaning robot, which may specifically include the following steps B1 and B2: Step B1, the code snippet manager loads the target control code to the code executor; Step B2, the code executor executes the target control code to control the cleaning robot. In this implementation, the code executor executes the target control code, converting the high-level instruction program based on user intention into a command sequence executable by the cleaning robot, thereby controlling the cleaning robot, enriching the usage scenarios of the cleaning robot, and improving the work efficiency of the cleaning robot. In an embodiment of the present application, a possible implementation is provided. The cleaning robot may further include a functional server. Then, in step B2 above, the code executor executes the target control code to control the cleaning robot, which may specifically include the following steps B21 and B22: In step B21 , when executing the target control code, the code executor may customize the function service from the function server when it involves the function service, and the function server subscribes to the event corresponding to the function service from the IoT event bus. In this step, the Internet of Things (IoT) refers to the connection of any object to the internet through information sensing devices and agreed-upon protocols. Objects exchange and communicate information through information media to achieve intelligent identification, positioning, tracking, and monitoring. The IoT event bus manages IoT devices (such as smart door locks, smart air conditioners, and smart lighting) and monitors events related to these devices. Step B22: When the code executor monitors the event corresponding to the functional service, it executes the control code of the event corresponding to the functional service to control the cleaning robot. In this embodiment, the code executor connects to the IoT event system, monitors in the cleaning robot's graphical program, triggers specific device events, and combines and configures more complex and flexible functions that meet actual needs, such as triggering the cleaning process after the smart door lock is closed. The embodiment of the present application provides a possible implementation method. In the above step B2, the code executor executes the target control code to control the cleaning robot, which may specifically include the following steps B23: In step B23, the code executor starts the execution thread to execute the target control code, and during the execution of the target control code, checks the execution status of one or more of the following target control codes according to the set duration: whether the execution thread exists; whether an exception occurs in the control code of the event response; whether the execution duration of the target control code exceeds a preset threshold; whether the cleaning robot reports an error; whether a stop command is received from the configuration end; if one or more of the following occurs: the execution thread does not exist, an exception occurs in the control code of the event response, the execution duration of the target control code exceeds a preset threshold, the cleaning robot reports an error, or a stop command is received from the configuration end, the execution of the target control code is stopped. In the process of executing the target control code, this embodiment checks the execution status of the target control code according to the set time period, which can improve the accuracy and efficiency of code execution. A possible implementation method is provided in an embodiment of the present application. In the above step B1, the code snippet manager loads the target control code into the code executor, which may specifically be the code snippet manager loading the target control code into the sandboxed code executor; in the above step B2, the code executor executes the target control code to control the cleaning robot, which may specifically be the code executor executing the target control code in the sandbox to control the cleaning robot. Since the target control logic formulated by the user and the target control code generated based on the target control logic can also be called user code, there may be some problems (such as closed loop, execution of malicious code, etc.). In this embodiment, the user code is deployed in a secure sandbox for execution. In this way, the user code can only call limited functions and modules, and the code executor acts as a monitor. When executing the user code, it can actively terminate the executing code; when the code execution times out or an error occurs, the user code is actively terminated to ensure the safe operation of the cleaning robot. The above introduces various implementation methods of each link of the embodiments shown in Figures 1 and 2. The control method of the cleaning robot applied to the configuration end and the cleaning robot in the embodiments of the present application will be further explained through specific embodiments. Due to the limitations of existing interactive elements, user-robot interaction cannot or is difficult to achieve some highly flexible configuration function requirements. For example, after recognizing that no one is home during the day (for example, from 8 am to 6 pm), the robot can independently complete a deep cleaning function; or after roaming around the room, recognizing pets or specific objects, taking a photo and sending it to the user's email or sending an app message to the user's account. At the same time, with the increase in smart home devices, a linkage mechanism is needed between different smart devices to achieve something like when a smart door lock detects that the user has closed the door and left the room, it can also set the cleaning robot function to security mode. To solve the above problems or similar complex and flexible user interaction problems, a highly customizable interaction technology is needed. In related technologies, the hardware functions of the cleaning robot are directly provided through an SDK (Software Development Kit), and the hardware functions are called through programming statements to control various behaviors of the cleaning robot. However, if the cleaning robot's hardware functions are directly provided through an SDK, users will find it difficult to customize the program. This is primarily due to the complexity of embedded system programming, which involves knowledge of hardware, software, control theory, and other related areas, each of which requires extensive professional training to master. For example, if the user is allowed to directly control the cleaning robot's motor, there is a high probability that the motor will be damaged during debugging due to excessive current parameters. Furthermore, from the low-level API (Application Programming Interface) details to completing specific customization requirements, a large amount of programming and debugging is required, making such coding nearly impossible for the average user. This embodiment provides an interactive method for graphical and programmed operation of a cleaning robot, which can achieve a high degree of customization of the cleaning robot's functions. In a specific embodiment, the configuration terminal can be a smart phone, a tablet computer, a personal computer, etc., which is not limited in this embodiment. The cleaning robot can be a sweeping robot, a mopping robot, etc., which is not limited in this embodiment. Figure 3A illustrates a graphical interface provided by an embodiment of the present application. Figure 3A provides a graphical interface that includes an instruction block panel and an instruction editor. The instruction block panel includes at least one instruction block, such as an AI instruction, a cleaning instruction, a judgment instruction, an action instruction, a function instruction, a loop and branch instruction, an event instruction, and other instructions. The instruction editor can receive one or more target instruction blocks selected from the instruction block panel and formulate target control logic for controlling the cleaning robot using the one or more target instruction blocks. FIG3B shows a schematic diagram of the interaction between the graphical interface provided by an embodiment of the present application and the cleaning robot. In FIG3B , the left part is a graphical interface. The instruction block panel of the interface can provide instructions such as AI instructions, cleaning instructions, judgment instructions, action instructions, function instructions, loops and branches, event instructions, and other instructions. The right part on the left is the instruction editor. The start in the instruction editor is to clean the master bedroom (set normal suction) -> clean the living room (set carpet mode) -> clean the kitchen (set mopping mode) -> clean the bathroom (set normal suction) -> return to the charging pile (set slow charging) -> end of program. This is the target control logic edited by the user and executed sequentially. Subsequently, the target control code is generated according to the formulated target control logic and sent to the cleaning robot. In Figure 3B, the right side shows the cleaning robot's processing logic. Specifically, the configuration end uploads code snippets (i.e., target control codes generated by the configuration end based on the specified target control logic) to the cleaning robot. The cleaning robot's command snippet manager (i.e., code snippet manager) stores and loads user code snippets into the cleaning robot's file system. The robot command executor (i.e., code executor) executes the code snippets and subscribes to function service events from the robot function server (i.e., function server), monitoring the IoT event bus. The command snippet manager, robot command executor, and robot function server are implemented based on the robot operating system. Figure 4 shows a schematic diagram of a graphical interface provided by an embodiment of the present application. In the command block panel shown in Figure 4, AI commands are first-level command blocks. The first-level command block also includes second-level command blocks, such as voice recognition, object recognition, stain recognition, and language recognition wake-up. Custom programming can be implemented based on these command blocks. For example, the control logic edited in the command editor shown in Figure 4 is: language recognition wake-up -> voice recognition -> clean the area identified by the language -> program ends. FIG5 shows another schematic diagram of a graphical interface provided by an embodiment of the present application. In the command block panel shown in FIG5 , the cleaning command is a first-level command block, and the first-level command block also includes a second-level command block, such as location (master bedroom, living room, second bedroom, balcony, bathroom, etc.), suction (strong, normal, etc.), mode (only cleaning, only dragging, only moving, sweeping and mopping, etc.), and custom programming can be implemented based on these command blocks. For example, the control logic edited in the command editor shown in FIG5 is: Start->Cleaning the master bedroom (normal suction)->Cleaning the living room (carpet mode)->Cleaning the kitchen (mopping mode)->Cleaning the bathroom (normal suction)->Returning to the charging pile (slow charging)->End of program. Figure 6 shows another schematic diagram of a graphical interface provided by an embodiment of the present application. In the command block panel shown in Figure 6, event commands are first-level command blocks, which also include second-level command blocks. For example, when a smart door lock closes, other IoT device events, etc., custom programming can be implemented based on these command blocks. For example, the control logic edited in the command editor shown in Figure 6 is: when monitoring the smart door lock closing -> call the whole house cleaning function -> end the program, thereby achieving linkage with the smart door lock. FIG7 shows a schematic diagram of the control logic corresponding to the first function provided in an embodiment of the present application, and the whole-house cleaning function combination function shown in FIG7 is defined as a reusable function. Figure 8 shows a schematic diagram of the control logic corresponding to the second function provided in an embodiment of the present application. This function is that when the sweeper finds that no one is at home, it switches to security mode and triggers an alarm when a stranger is detected entering the house. The edited control logic is that when the smart door lock is monitored to close the door-> the sweeper moves to the vicinity of the door-> switches to security mode. Among them, security mode means that when the AI module recognizes a stranger, the camera switches to video recording mode and recognizes the recognized face. If a stranger is recognized, an alarm information is pushed to the APP. Figure 9 shows a schematic diagram of the control logic corresponding to the third function provided in an embodiment of the present application, which is to clean the house at 8:00 a.m. every morning on weekdays and 9:00 a.m. on non-weekdays. The edited control logic is: set the timer at 8:00 a.m. every morning -> determine whether it is a weekday -> if not, wait 1 hour and then call the whole house cleaning function; if so, call the whole house cleaning function. Figure 10 shows a schematic diagram of the control logic for the fourth function provided in an embodiment of the present application, which allows the robot vacuum to roam around the room and, upon finding a pet, push the pet's location to the app. The edited control logic is as follows: Start -> Switch the robot vacuum to room roaming mode -> Set the AI recognition module to pet recognition mode -> Upon identifying a pet -> Push the robot vacuum's coordinates on the SLAM (Simultaneous Localization and Mapping) map to the app -> End. FIG11 is a schematic diagram showing a vacuum cleaner function server subscribing to corresponding events of function services provided by an embodiment of the present application. In FIG11 , the cleaning robot is a vacuum cleaner, and the user-defined code snippet on the configuration end is uploaded to the code snippet executor (i.e., the code executor). The code snippet executor executes each instruction one by one. When it comes to function services, the function service is customized to the vacuum cleaner function server, and the function server subscribes to the event corresponding to the function service to the IOT event bus, that is, publishes vacuum cleaner-related events. The IOT event bus monitors the device events of the IOT device, and sends the IOT device events to the code snippet executor's monitoring IOT events, and sends them to the search event response code snippet. The code snippet executor finds the corresponding code snippet and continues to execute it to control the vacuum cleaner. The main functions of the code snippet manager are to store and load the user's code snippets into the sweeper file system. Based on the code generation capabilities of Blockly (a graphical programming framework), the following Python (a programming language) code snippet is generated based on the user's code snippet. The details of the robot vacuum's functions are encapsulated as callable Python functions. The code executor is a fixed piece of Python code. It loads the Python code snippet and then starts a dedicated execution thread to execute the main function in the code module. The code executor then checks the execution status of the user code every tens of milliseconds: 1) Whether the user code execution thread exists; 2) Whether any exceptions occur in the Python code that responds to events; 3) Whether the user code execution exceeds the preset threshold; 4) Whether the vacuum cleaner function module reports an error; 5) Whether the stop command sent by the app is received. When any error occurs, the execution of the user program is stopped and the sweeper is switched to a user-interactive state, that is, the user can interact with the configuration end and adjust the target instruction block through the graphical interface of the configuration end. This embodiment can be used to enhance the customizability of the sweeping robot. Users can develop a more convenient, efficient, and intelligent way of using the cleaning robot based on their own needs. It should be noted that the order of execution of the steps in the above embodiments does not necessarily imply a specific order of execution. The order of execution of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. In practical applications, all possible implementation methods described above can be combined in any manner to form possible embodiments of the present application, and will not be described in detail here. Based on the control methods of the cleaning robot provided in the above embodiments and based on the same inventive concept, an embodiment of the present application also provides a control device for a cleaning robot. Figure 12 is a structural diagram of a control device for a cleaning robot applied to a configuration end provided in an embodiment of the present application. As shown in Figure 12, the control device for the cleaning robot applied to the configuration end may specifically include a display unit 1201, a formulation unit 1202, and a control unit 1203. The display unit 1201 is used to provide a graphical interface, and the interface includes an instruction block panel and an instruction editor, and the instruction block panel includes at least one instruction block; the formulation unit 1202 is used to receive one or more target instruction blocks selected from the instruction block panel in the instruction editor, and formulate a target control logic for controlling the cleaning robot through the one or more target instruction blocks; the control unit 1203 is used to control the cleaning robot according to the formulated target control logic. A possible implementation method is provided in an embodiment of the present application, where the control unit 1203 is further configured to: generate a target control code according to a formulated target control logic, and send the target control code to the cleaning robot to execute the target control code to control the cleaning robot. A possible implementation method is provided in an embodiment of the present application, where the instruction block includes at least one first-level instruction block. A possible implementation method is provided in an embodiment of the present application, where the first-level instruction block includes at least one second-level instruction block. A possible implementation method is provided in an embodiment of the present application, where the formulation unit 1202 is further configured to: receive, in the instruction editor, one or more target instruction blocks selected from the primary instruction blocks and / or secondary instruction blocks of the instruction block panel. A possible implementation method is provided in an embodiment of the present application, wherein at least one of the first-level instruction blocks includes one or more of an artificial intelligence instruction block, a sweeping instruction block, a judgment instruction block, an action instruction block, a function instruction block, a loop and branch instruction block, an event instruction block, and other instruction blocks. A possible implementation method is provided in an embodiment of the present application. If the first-level instruction block includes an artificial intelligence instruction block, at least one second-level instruction block under the first-level instruction block includes one or more of speech recognition, object recognition, stain recognition, and language recognition wake-up. A possible implementation method is provided in an embodiment of the present application. If the first-level instruction block includes a cleaning instruction block, at least one second-level instruction block under the first-level instruction block includes one or more of a cleaning position, a cleaning mode, and a suction force. A possible implementation method is provided in an embodiment of the present application, and the formulation unit 1202 is also used to: obtain description information of the functions to be achieved by controlling the cleaning robot; based on the description information of the functions, formulate the target control logic for controlling the cleaning robot through the one or more target instruction blocks. FIG13 is a structural diagram of a control device for a cleaning robot provided by an embodiment of the present application. As shown in FIG13 , the control device for a cleaning robot may specifically include a receiving unit 1301 and an executing unit 1302 . The receiving unit 1301 is used to receive the target control code sent from the configuration end; wherein, the target control code is generated by the configuration end according to the formulated target control logic, and the configuration end receives one or more target instruction blocks selected from the instruction block panel in the instruction editor, and formulates the target control logic for controlling the cleaning robot through the one or more target instruction blocks; the configuration end provides a graphical interface, which includes the instruction block panel and the instruction editor, and the instruction block panel includes at least one instruction block; the execution unit 1302 is used to execute the target control code to control the cleaning robot. A possible implementation method is provided in an embodiment of the present application. The execution unit 1302 of the cleaning robot may include a code snippet manager and a code executor; the code snippet manager stores the target control code; the code snippet manager loads the target control code to the code executor; the code executor executes the target control code to control the cleaning robot. A possible implementation method is provided in an embodiment of the present application, where the execution unit 1302 of the cleaning robot also includes a function server; when the code executor is executing the target control code, when a function service is involved, the code executor customizes the function service to the function server, and the function server subscribes to the event corresponding to the function service to the Internet of Things (IOT) event bus; when the code executor monitors the event corresponding to the function service, it executes the control code of the event corresponding to the function service to control the cleaning robot. A possible implementation method is provided in an embodiment of the present application, wherein the code executor starts an execution thread to execute the target control code, and in the process of executing the target control code, checks the execution status of one or more of the following target control codes according to a set duration: whether the execution thread exists; whether an exception occurs in the control code of the event response; whether the execution duration of the target control code exceeds a preset threshold; whether the cleaning robot reports an error; whether a stop command sent from the configuration end is received; when one or more of the following occurs: the execution thread does not exist, the control code of the event response has an exception, the execution duration of the target control code exceeds the preset threshold, the cleaning robot reports an error, or a stop command is received from the configuration end, the execution of the target control code is stopped. A possible implementation method is provided in an embodiment of the present application, wherein the code snippet manager loads the target control code into the sandboxed code executor; the code executor executes the target control code to control the cleaning robot, including: the code executor executes the target control code in the sandbox to control the cleaning robot. Based on the same inventive concept, an embodiment of the present application also provides a configuration end, including a processor and a memory, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute any one of the above embodiments of the control method of the cleaning robot applied to the configuration end. Based on the same inventive concept, an embodiment of the present application further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the control method of the cleaning robot applied to the configuration end of any one of the above embodiments when running. Based on the same inventive concept, an embodiment of the present application also provides a cleaning robot, including a processor and a memory, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the control method of the cleaning robot applied to the cleaning robot of any one of the above embodiments. Based on the same inventive concept, an embodiment of the present application further provides a storage medium storing a computer program, wherein the computer program is configured to execute the control method of a cleaning robot applied to a cleaning robot according to any one of the above embodiments when running. Those skilled in the art will clearly understand that the specific working processes of the above-described systems, devices, and modules can refer to the corresponding processes in the aforementioned method embodiments, and for the sake of brevity, they will not be further described here. Those skilled in the art will appreciate that the technical solution of this application, in essence, or in whole or in part, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes a number of program instructions for causing an electronic device (e.g., a personal computer, server, or network device) to execute all or part of the steps of the methods described in the various embodiments of this application when the program instructions are executed. The aforementioned storage medium includes various media capable of storing program code, such as USB, removable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks. Alternatively, all or part of the steps of the aforementioned method embodiments may be implemented by hardware related to program instructions (such as electronic devices such as personal computers, servers, or network devices), and the program instructions may be stored in a computer-readable storage medium. When the program instructions are executed by a processor of an electronic device, the electronic device executes all or part of the steps of the methods described in the various embodiments of the present application. The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that, within the spirit and principles of the present application, they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not deviate from the protection scope of the present application. S101~S103, S201~S202: Step 1201: Display unit 1202: Formulating unit 1203: Control unit 1301: Receiving unit 1302: Execution unit In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments of the present application. Figure 1 shows a flow chart of a control method for a cleaning robot applied to a configuration end provided by an embodiment of the present application; Figure 2 shows a flow chart of a control method for a cleaning robot applied to a cleaning robot provided by an embodiment of the present application; Figure 3A shows a graphical interface provided by an embodiment of the present application; Figure 3B shows a schematic diagram of the interaction between the graphical interface provided by an embodiment of the present application and a cleaning robot; Figure 4 shows a schematic diagram of a graphical interface provided by an embodiment of the present application; Figure 5 shows another schematic diagram of a graphical interface provided by an embodiment of the present application; Figure 6 shows another schematic diagram of a graphical interface provided by an embodiment of the present application; Figure 7 shows a schematic diagram of control logic corresponding to a first function provided by an embodiment of the present application; Figure 8 shows a schematic diagram of control logic corresponding to a second function provided by an embodiment of the present application; Figure 9 shows a schematic diagram of control logic corresponding to a third function provided by an embodiment of the present application; Figure 10 shows a schematic diagram of control logic corresponding to a fourth function provided by an embodiment of the present application; Figure 11 shows a schematic diagram of an event corresponding to a subscription function service of a sweeping machine function server provided by an embodiment of the present application; Figure 12 shows a structural diagram of a control device for a cleaning robot applied to a configuration end provided by an embodiment of the present application; Figure 13 shows a structural diagram of a control device for a cleaning robot applied to a cleaning robot provided by an embodiment of the present application. S101~S103: Steps
Claims
1. A control method for a cleaning robot, applied to a configuration end, wherein, The method includes: providing a graphical interface, the interface including an instruction block panel and an instruction editor, the instruction block panel including at least one instruction block; receiving one or more target instruction blocks selected from the instruction block panel in the instruction editor, and formulating target control logic for controlling a cleaning robot through the one or more target instruction blocks; controlling the cleaning robot according to the formulated target control logic; wherein, the instruction block includes at least one primary instruction block, and the primary instruction block includes at least one secondary instruction block; if the primary instruction block includes an artificial intelligence instruction block, the at least one secondary instruction block under the primary instruction block includes one or more of voice recognition, object recognition, stain recognition, and speech recognition wake-up.
2. The method as described in request item 1, wherein, Receiving one or more target instruction blocks selected from the instruction block panel in the instruction editor includes: receiving one or more target instruction blocks selected from the first-level instruction block and / or the second-level instruction block in the instruction block panel in the instruction editor.
3. The method as described in request item 1, wherein, At least one of the first-level instruction blocks includes one or more of the following: artificial intelligence instruction block, cleaning instruction block, judgment instruction block, action instruction block, function instruction block, loop and branch instruction block, event instruction block, and other instruction blocks.
4. The method as described in request item 1, wherein, If the primary instruction block includes a cleaning instruction block, at least one secondary instruction block under the primary instruction block includes one or more of cleaning position, cleaning mode, and suction power.
5. The method as described in any one of claims 1 to 4, wherein, The target control logic for controlling the cleaning robot is formulated through one or more target instruction blocks, including: obtaining descriptive information about the functions to be implemented by controlling the cleaning robot; and formulating the target control logic for controlling the cleaning robot based on the descriptive information about the functions through the one or more target instruction blocks.
6. A control method for a cleaning robot, applied to the cleaning robot, wherein, The method includes: receiving target control code sent from a configuration terminal; wherein the target control code is generated by the configuration terminal according to a defined target control logic, the configuration terminal receives one or more target instruction blocks selected from an instruction block panel in an instruction editor, and defines target control logic for controlling the cleaning robot through the one or more target instruction blocks; the configuration terminal provides a graphical interface, the interface including the instruction block panel and the instruction editor, the instruction block panel including at least one instruction block; executing the target control code to control the cleaning robot; wherein the instruction block includes at least one primary instruction block, and the primary instruction block includes at least one secondary instruction block; if the primary instruction block includes an artificial intelligence instruction block, the at least one secondary instruction block under the primary instruction block includes one or more of voice recognition, object recognition, stain recognition, and speech recognition wake-up.
7. The method as described in claim 6, wherein, The cleaning robot includes a code snippet manager and a code executor; after receiving the target control code sent from the configuration terminal, the method further includes: the code snippet manager storing the target control code; executing the target control code to control the cleaning robot, including: the code snippet manager loading the target control code into the code executor; the code executor executing the target control code to control the cleaning robot.
8. The method as described in request item 7, wherein, The cleaning robot also includes a function server; the code executor executes the target control code to control the cleaning robot, including: during the execution of the target control code, when a function service is involved, the code executor customizes the function service with the function server, and the function server subscribes to the events corresponding to the function service from the Internet of Things (IoT) event bus; when the code executor listens to the event corresponding to the function service, it executes the control code for the event corresponding to the function service to control the cleaning robot.
9. The method as described in claim 8, wherein, The code executor executes the target control code to control the cleaning robot, including: the code executor starts an execution thread to execute the target control code, and during the execution of the target control code, checks the execution status of the target control code for one or more of the following according to a set time interval: whether the execution thread exists; whether the event response control code has an anomaly; whether the execution time of the target control code exceeds a preset threshold; whether the cleaning robot has an error; whether a stop command has been received from the configuration terminal; if one or more of the following occurs, such as the execution thread not existing, the event response control code having an anomaly, the execution time of the target control code exceeding the preset threshold, the cleaning robot having an error, or a stop command being received from the configuration terminal, then the execution of the target control code is stopped.
10. The method as described in claim 7, wherein, The code snippet manager loads the target control code into the code executor, including: the code snippet manager loads the target control code into the sandboxed code executor; the code executor executes the target control code to control the cleaning robot, including: the code executor executes the target control code in the sandbox to control the cleaning robot.
11. A control device for a cleaning robot, used in the configuration end, wherein, The control device includes: a display unit for providing a graphical interface, the interface including an instruction block panel and an instruction editor, the instruction block panel including at least one instruction block; a formulation unit for receiving one or more target instruction blocks selected from the instruction block panel in the instruction editor, and formulating target control logic for controlling the cleaning robot through the one or more target instruction blocks; and a control unit for controlling the cleaning robot according to the formulated target control logic; wherein, the instruction block includes at least one primary instruction block, and the primary instruction block includes at least one secondary instruction block; if the primary instruction block includes an artificial intelligence instruction block, the at least one secondary instruction block under the primary instruction block includes one or more of voice recognition, object recognition, stain recognition, and speech recognition wake-up.
12. A control device for a cleaning robot, applied to the cleaning robot, wherein, The control device includes: a receiving unit, configured to receive target control code sent from a configuration terminal; wherein the target control code is generated by the configuration terminal according to a defined target control logic, and the configuration terminal receives one or more target instruction blocks selected from an instruction block panel in an instruction editor, and defines the target control logic for controlling the cleaning robot through the one or more target instruction blocks; the configuration terminal provides a graphical interface, the interface including the instruction block panel and the instruction editor, the instruction block panel including at least one instruction block; and an execution unit, configured to execute the target control code to control the cleaning robot; wherein the instruction block includes at least one primary instruction block, and the primary instruction block includes at least one secondary instruction block; if the primary instruction block includes an artificial intelligence instruction block, the at least one secondary instruction block under the primary instruction block includes one or more of voice recognition, object recognition, stain recognition, and speech recognition wake-up.
13. A configuration terminal, wherein, It includes a processor and memory, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform a control method for a cleaning robot as described in any one of claims 1 to 5.
14. A storage medium, wherein, The storage medium stores a computer program, wherein the computer program is configured to execute the control method of the cleaning robot as described in any one of requests 1 to 10 when it is run.
15. A cleaning robot, wherein, It includes a processor and memory, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform a control method for a cleaning robot as described in any one of claims 6 to 10.
Citation Information
Patent Citations
Method and system for interaction between user and cleaning robot, and control terminal
CN116407008A
Managing cleaning robot behavior
TW202008086A
Cleaning robot and control method thereof
TW202228590A
Cleaning robot capable of obtaining map of indoor space and operating method thereof
US20230061444A1
