WO2025152911A1 - Control method and apparatus for cleaning robot, device, and medium - Google Patents
Control method and apparatus for cleaning robot, device, and mediumInfo
- Publication number
- WO2025152911A1 WO2025152911A1 PCT/CN2025/072169 CN2025072169W WO2025152911A1 WO 2025152911 A1 WO2025152911 A1 WO 2025152911A1 CN 2025072169 W CN2025072169 W CN 2025072169W WO 2025152911 A1 WO2025152911 A1 WO 2025152911A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- cleaning robot
- instruction
- code
- instruction block
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
- G06F3/0482—Interaction with lists of selectable items, e.g. menus
-
- A—HUMAN NECESSITIES
- A47—FURNITURE; DOMESTIC ARTICLES OR APPLIANCES; COFFEE MILLS; SPICE MILLS; SUCTION CLEANERS IN GENERAL
- A47L—DOMESTIC WASHING OR CLEANING; SUCTION CLEANERS IN GENERAL
- A47L11/00—Machines for cleaning floors, carpets, furniture, walls, or wall coverings
- A47L11/24—Floor-sweeping machines, motor-driven
-
- A—HUMAN NECESSITIES
- A47—FURNITURE; DOMESTIC ARTICLES OR APPLIANCES; COFFEE MILLS; SPICE MILLS; SUCTION CLEANERS IN GENERAL
- A47L—DOMESTIC WASHING OR CLEANING; SUCTION CLEANERS IN GENERAL
- A47L11/00—Machines for cleaning floors, carpets, furniture, walls, or wall coverings
- A47L11/28—Floor-scrubbing machines, motor-driven
-
- A—HUMAN NECESSITIES
- A47—FURNITURE; DOMESTIC ARTICLES OR APPLIANCES; COFFEE MILLS; SPICE MILLS; SUCTION CLEANERS IN GENERAL
- A47L—DOMESTIC WASHING OR CLEANING; SUCTION CLEANERS IN GENERAL
- A47L11/00—Machines for cleaning floors, carpets, furniture, walls, or wall coverings
- A47L11/40—Parts or details of machines not provided for in groups A47L11/02 - A47L11/38, or not restricted to one of these groups, e.g. handles, arrangements of switches, skirts, buffers, levers
- A47L11/4002—Installations of electric equipment
-
- A—HUMAN NECESSITIES
- A47—FURNITURE; DOMESTIC ARTICLES OR APPLIANCES; COFFEE MILLS; SPICE MILLS; SUCTION CLEANERS IN GENERAL
- A47L—DOMESTIC WASHING OR CLEANING; SUCTION CLEANERS IN GENERAL
- A47L11/00—Machines for cleaning floors, carpets, furniture, walls, or wall coverings
- A47L11/40—Parts or details of machines not provided for in groups A47L11/02 - A47L11/38, or not restricted to one of these groups, e.g. handles, arrangements of switches, skirts, buffers, levers
- A47L11/4011—Regulation of the cleaning machine by electric means; Control systems and remote control systems therefor
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
-
- A—HUMAN NECESSITIES
- A47—FURNITURE; DOMESTIC ARTICLES OR APPLIANCES; COFFEE MILLS; SPICE MILLS; SUCTION CLEANERS IN GENERAL
- A47L—DOMESTIC WASHING OR CLEANING; SUCTION CLEANERS IN GENERAL
- A47L2201/00—Robotic cleaning machines, i.e. with automatic control of the travelling movement or the cleaning operation
- A47L2201/04—Automatic control of the travelling movement; Automatic obstacle detection
-
- A—HUMAN NECESSITIES
- A47—FURNITURE; DOMESTIC ARTICLES OR APPLIANCES; COFFEE MILLS; SPICE MILLS; SUCTION CLEANERS IN GENERAL
- A47L—DOMESTIC WASHING OR CLEANING; SUCTION CLEANERS IN GENERAL
- A47L2201/00—Robotic cleaning machines, i.e. with automatic control of the travelling movement or the cleaning operation
- A47L2201/06—Control of the cleaning action for autonomous devices; Automatic detection of the surface condition before, during or after cleaning
Definitions
- the present application relates to the field of robot technology, and in particular to a control method and device, equipment and medium for a cleaning robot.
- the primary instruction block includes at least one secondary instruction block.
- One or more target instruction blocks selected from the primary instruction blocks and/or secondary instruction blocks of the instruction block panel are received in the instruction editor.
- formulating a target control logic for controlling the cleaning robot through the one or more target instruction blocks includes:
- a target control logic for controlling the cleaning robot is formulated through the one or more target instruction blocks.
- 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, 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, the interface includes the instruction block panel and the instruction editor, and the instruction block panel includes at least one instruction block;
- the cleaning robot includes a code snippet manager and a code executor
- the code segment manager stores the target control code
- Executing the target control code to control the cleaning robot includes:
- the code snippet manager loads the target control code into the code executor
- the cleaning robot further includes a function server;
- the code executor executes the target control code to control the cleaning robot, including:
- the code executor customizes the functional service to the functional server when a functional service is involved, and the functional server subscribes to an event corresponding to the functional service from an IoT event bus;
- the code executor executes the target control code to control the cleaning robot, including:
- the thread does not exist, an exception occurs in the control code of the event response, the execution time 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.
- the code snippet manager loads the target control code into the code executor, including:
- the code executor executes the target control code in the sandbox to control the cleaning robot.
- a formulation unit configured 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;
- a control unit is used to control the cleaning robot according to the formulated target control logic.
- a receiving unit configured to receive 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, 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, 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 is used to execute the target control code to control the cleaning robot.
- a configuration end 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 control methods of the cleaning robot described above.
- a cleaning robot 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.
- FIG1 is a flow chart showing a control method for a cleaning robot applied to a configuration end provided in an embodiment of the present application
- FIG3A shows a graphical interface provided by an embodiment of the present application
- FIG3B is a schematic diagram showing the interaction between the graphical interface and the cleaning robot provided in an embodiment of the present application.
- FIG5 shows another schematic diagram of a graphical interface provided in an embodiment of the present application.
- FIG6 shows another schematic diagram of a graphical interface provided in an embodiment of the present application.
- FIG9 is a schematic diagram showing a control logic corresponding to the third function provided in an embodiment of the present application.
- FIG10 is a schematic diagram showing a control logic corresponding to the fourth function provided in an embodiment of the present application.
- FIG11 is a schematic diagram showing a corresponding event of a sweeping machine function server subscribing to a function service provided in an embodiment of the present application;
- FIG13 shows a structural diagram of a control device for a cleaning robot provided in an embodiment of the present application and applied to a cleaning robot.
- 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 on the configuration end, and the user can formulate the target control logic according to his or her own diverse and personalized needs to achieve the corresponding target function requirements, thereby enriching the use scenarios of the cleaning robot and improving the work efficiency of the cleaning robot.
- the various first-level instruction blocks mentioned in this embodiment may include one or more of artificial intelligence instruction blocks, cleaning instruction blocks, judgment instruction blocks, action instruction blocks, function instruction blocks, loop and branch instruction blocks, event instruction blocks, and other instruction blocks, and this embodiment does not limit this.
- Step A1 obtaining description information of functions to be achieved by controlling the cleaning robot.
- the code executor executes the target control code, converts the high-level instruction program based on user intention into a command sequence executable by the cleaning robot, realizes the control of the cleaning robot, enriches the usage scenarios of the cleaning robot, and improves the work efficiency of the cleaning robot.
- Step B21 when the code executor is executing the target control code and involves a functional service, it can customize the functional service to the functional server, and the functional server subscribes to the event corresponding to the functional service to the IoT event bus.
- step B2 the code executor executes the target control code to control the cleaning robot, which may specifically include the following steps B23:
- the thread does not exist, an exception occurs in the control code of the event response, the execution time 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 will be stopped.
- 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.
- step B1 the code snippet manager loads the target control code to the code executor, which may specifically be the code snippet manager loading the target control code to 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.
- a linkage mechanism is needed between different smart devices to accomplish tasks such as setting the cleaning robot function to security mode when the smart door lock detects that the user has closed the door and left the room.
- the configuration terminal may be a smart phone, a tablet computer, a personal computer, etc., which is not limited in this embodiment.
- the cleaning robot may be a sweeping robot, a mopping robot, etc., which is not limited in this embodiment.
- FIG3A shows a graphical interface provided by an embodiment of the present application.
- FIG3A provides a graphical interface, which includes an instruction block panel and an instruction editor.
- the instruction block panel includes at least one instruction block, such as AI instructions, cleaning instructions, judgment instructions, action instructions, function instructions, loops and branches, event instructions, other instructions, etc.
- One or more target instruction blocks selected from the instruction block panel can be received in the instruction editor, and the target control logic for controlling the cleaning robot can be formulated through one or more target instruction blocks.
- Figure 3B shows a schematic diagram of the interaction between the graphical interface and the cleaning robot provided in the embodiment of the present application.
- the left part is a graphical interface, and AI instructions, cleaning instructions, judgment instructions, action instructions, function instructions, loops and branches, event instructions, other instructions, etc. can be provided on the instruction block panel of the interface.
- the right part on the left is the instruction editor.
- the start in the instruction editor -> 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) -> Charge back to the pile (set slow charging) -> End of the program is the target control logic edited by the user, which is executed sequentially. Subsequently, the target control code is generated according to the formulated target control logic, and the target control code is sent to the cleaning robot.
- the right part is the processing logic of the cleaning robot.
- the configuration end uploads the code snippet (i.e., the target control code generated by the configuration end according to the formulated target control logic) to the cleaning robot;
- the cleaning robot's instruction code snippet manager i.e., the code snippet manager
- the robot instruction executor i.e., the code executor
- the instruction code snippet manager, robot instruction executor, and robot function server are implemented based on the robot operating system.
- Figure 5 shows another schematic diagram of a graphical interface provided in an embodiment of the present application.
- the cleaning command is a first-level command block
- 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 according to these command blocks.
- 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.
- FIG6 shows another schematic diagram of a graphical interface provided by an embodiment of the present application.
- the event command is a first-level command block
- the first-level command block also includes a second-level command block, such as when the smart door lock closes the door, other IoT device events, etc., custom programming can be implemented based on these command blocks.
- the control logic edited in the command editor shown in FIG6 is, when the smart door lock is monitored to close the door -> call the whole house cleaning function -> program ends, thereby realizing 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, which is that when the sweeper finds that no one is at home, it switches to security mode and triggers an alarm when a stranger enters the house.
- the edited control logic is that when the smart door lock is monitored to close the door -> the sweeper moves near the door -> switches to security mode.
- the security mode means that when the AI module recognizes a stranger, the camera is switched to video recording mode, and the recognized face is recognized. If a stranger is recognized, an alarm message is pushed to the APP.
- FIG9 shows a schematic diagram of the control logic corresponding to the third function provided in the embodiment of the present application, which is to clean at 8 a.m. every day on weekdays and at 9 a.m. every day on non-working days.
- the edited control logic is: set at 8 a.m. every morning -> determine whether it is a weekday -> if not, wait for 1 hour and then call the whole house cleaning function; if so, call the whole house cleaning function.
- FIG10 shows a schematic diagram of the control logic corresponding to the fourth function provided in an embodiment of the present application, which is that the sweeping robot roams in the room, and when a pet is found, the pet's location is pushed to the APP.
- the edited control logic is, start->switch the sweeping robot to room roaming mode->set the AI recognition module to pet recognition mode->when a pet is recognized->push the sweeping robot's coordinates in the SLAM (Simultaneous Localization And Mapping) map to the APP->end.
- SLAM Simultaneous Localization And Mapping
- Figure 11 shows a schematic diagram of the sweeping machine function server subscribing to the corresponding events of the function service provided by the embodiment of the present application.
- the cleaning robot is a sweeping machine
- 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.
- the function service is customized to the sweeping machine function server, and the function server subscribes to the event corresponding to the function service to the IOT event bus, that is, publishes sweeping machine 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 listening 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 to control the sweeping machine.
- the main functions of the code snippet manager are to store and load user code snippets to the sweeper file system.
- Python a programming language
- the code executor is a fixed Python code that loads the Python code snippet and then starts a dedicated thread to execute the main function in the code module. The code executor then checks the execution of the user code every tens of milliseconds:
- the control unit 1203 is used to control the cleaning robot according to the formulated target control logic.
- formulation unit 1202 is further configured to:
- One or more target instruction blocks selected from the primary instruction blocks and/or secondary instruction blocks of the instruction block panel are received in the instruction editor.
- 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.
- 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.
- Fig. 13 is a structural diagram of a control device for a cleaning robot provided in an embodiment of the present application.
- the control device for a cleaning robot provided in an embodiment of the present application may specifically include a receiving unit 1301 and an executing unit 1302 .
- the code snippet manager loads the target control code into the code executor
- the code executor customizes the functional service to the functional server when a functional service is involved, and the functional server subscribes to an event corresponding to the functional service from an IoT event bus;
- 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.
- a possible implementation method wherein the code executor starts a 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 a set duration:
- the thread does not exist, an exception occurs in the control code of the event response, the execution time 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.
- An embodiment of the present application provides a possible implementation method, 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.
- 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-mentioned embodiments of the control method of the cleaning robot applied to the configuration end.
- 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, when running, a control method for a cleaning robot applied to a configuration end of any of the above embodiments.
- 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 a control method of the cleaning robot applied to the cleaning robot of any one of the above embodiments.
- 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, when running, a control method for a cleaning robot applied to a cleaning robot of any of the above embodiments.
- the technical solution of the present application can be essentially or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, which includes a number of program instructions, so that an electronic device (such as a personal computer, a server, or a network device, etc.) executes all or part of the steps of the method described in each embodiment of the present application when running the program instructions.
- the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
- all or part of the steps of implementing the aforementioned method embodiments may be accomplished by hardware associated with 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.
- program instructions such as electronic devices such as personal computers, servers, or network devices
- the program instructions may be stored in a computer-readable storage medium.
- the program instructions When executed by a processor of an electronic device, the electronic device executes all or part of the steps of the methods described in the embodiments of the present application.
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Human Computer Interaction (AREA)
- Electric Vacuum Cleaner (AREA)
- Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)
- Manipulator (AREA)
Abstract
Description
本申请要求于2024年01月16日提交中国专利局、申请号为202410063920.1,发明名称为“清洁机器人的控制方法和装置、设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of 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 of cleaning robot”, all contents of which are incorporated by reference in this application.
本申请涉及机器人技术领域,尤其涉及一种清洁机器人的控制方法和装置、设备及介质。The present application relates to the field of robot technology, and in particular to a control method and device, equipment and medium for a cleaning robot.
随着计算机技术和嵌入式技术的发展,各种清洁机器人如扫地机器人、拖地机器人等应运而生。目前,用户可以在APP(应用程序)上通过虚拟按键或语音等方式与清洁机器人进行交互,清洁机器人可以按照交互指令在指定区域自行行进并进行清洁或清除等操作。With the development of computer technology and embedded technology, various cleaning robots such as sweeping robots and mopping robots have emerged. At present, users can interact with cleaning robots through virtual buttons or voice on APP (application), and the cleaning robots can move in the designated area and perform cleaning or removal operations according to the interactive instructions.
然而,目前只能向清洁机器人发送固定指令,对于用户而言,固定指令不能满足用户多样化和个性化的配置功能需求。因而,亟待解决这一技术问题。However, currently only fixed instructions can be sent to the cleaning robot, and for users, the fixed instructions 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 and 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 comprising an instruction block panel and an instruction editor, the instruction block panel comprising 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 the cleaning robot through the one or more target instruction blocks;
根据制定的所述目标控制逻辑对所述清洁机器人进行控制。The cleaning robot is controlled 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 primary instruction block includes at least one secondary instruction block.
在一种可能的实现方式中,在所述指令编辑器中接收从所述指令块面板选取的一个或多个目标指令块,包括:In a possible implementation manner, receiving, in the instruction editor, one or more target instruction blocks selected from the instruction block panel includes:
在所述指令编辑器中接收从所述指令块面板的一级指令块和/或二级指令块选取的一个或多个目标指令块。One or more target instruction blocks selected from the primary instruction blocks and/or secondary instruction blocks of the instruction block panel are received 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 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.
在一种可能的实现方式中,若所述一级指令块包括人工智能指令块,所述一级指令块下的至少一个二级指令块包括语音识别、物体识别、污渍识别、语言识别唤醒中的一种或多种。In one possible implementation, 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.
在一种可能的实现方式中,若所述一级指令块包括清扫指令块,所述一级指令块下的至少一个二级指令块包括清扫位置、清扫模式、吸力中的一种或多种。In a possible implementation, 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 a cleaning position, a cleaning mode, and a suction force.
在一种可能的实现方式中,通过所述一个或多个目标指令块制定对清洁机器人进行控制的目标控制逻辑,包括:In a possible implementation, formulating a target control logic for controlling the cleaning robot through the one or more target instruction blocks includes:
获取对清洁机器人进行控制所要实现的功能的说明信息;Obtaining information describing functions to be achieved by controlling the cleaning robot;
基于所述功能的说明信息,通过所述一个或多个目标指令块制定对清洁机器人进行控制的目标控制逻辑。Based on the description information of the function, a target control logic for controlling the cleaning robot is formulated 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 comprises:
接收来自配置端发送的目标控制代码;其中,所述目标控制代码是所述配置端根据制定的目标控制逻辑生成的,所述配置端在指令编辑器中接收从指令块面板选取的一个或多个目标指令块,通过所述一个或多个目标指令块制定对清洁机器人进行控制的目标控制逻辑;所述配置端提供图形化的界面,所述界面上包括所述指令块面板和所述指令编辑器,所述指令块面板包括至少一个指令块;Receive 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, 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, the interface includes the instruction block panel and the instruction editor, and the instruction block panel includes at least one instruction block;
执行所述目标控制代码对所述清洁机器人进行控制。The target control code is executed to control the cleaning robot.
在一种可能的实现方式中,所述清洁机器人包括代码片段管理器和代码执行器;In a 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 further includes:
所述代码片段管理器存储所述目标控制代码;The code segment manager stores the target control code;
执行所述目标控制代码对所述清洁机器人进行控制,包括:Executing the target control code to control the cleaning robot includes:
所述代码片段管理器加载所述目标控制代码至所述代码执行器;The code snippet manager loads the target control code into the code executor;
所述代码执行器执行所述目标控制代码,对所述清洁机器人进行控制。The code executor executes the target control code to control the cleaning robot.
在一种可能的实现方式中,所述清洁机器人还包括功能服务器;In a possible implementation, the cleaning robot further includes a function server;
所述代码执行器执行所述目标控制代码,对所述清洁机器人进行控制,包括:The code executor executes the target control code to control the cleaning robot, including:
所述代码执行器在执行所述目标控制代码的过程中,在涉及功能服务时,向所述功能服务器定制所述功能服务,所述功能服务器向物联网IOT事件总线订阅所述功能服务对应的事件;In the process of executing the target control code, the code executor customizes the functional service to the functional server when a functional service is involved, and the functional server subscribes to an event corresponding to the functional service from an IoT event bus;
所述代码执行器监听到所述功能服务对应的事件时,执行所述功能服务对应的事件的控制代码,对所述清洁机器人进行控制。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 a possible implementation, the code executor executes the target control code to control the cleaning robot, including:
所述代码执行器启动线程执行所述目标控制代码,并在执行所述目标控制代码的过程中,按照设定时长检查下列一项或多项的所述目标控制代码的执行情况:The code executor starts a 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 a set duration:
线程是否存在;Whether the thread exists;
事件响应的控制代码是否有异常发生;Whether the control code of the event response has any abnormality;
所述目标控制代码的执行时长是否超出预设阈值;Whether the execution time 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 thread does not exist, an exception occurs in the control code of the event response, the execution time 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 a 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.
第三方面,提供了一种清洁机器人的控制装置,应用于配置端,所述装置包括:In 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, used 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, configured 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;
控制单元,用于根据制定的所述目标控制逻辑对所述清洁机器人进行控制。A control unit is used to control 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 comprises:
接收单元,用于接收来自配置端发送的目标控制代码;其中,所述目标控制代码是所述配置端根据制定的目标控制逻辑生成的,所述配置端在指令编辑器中接收从指令块面板选取的一个或多个目标指令块,通过所述一个或多个目标指令块制定对清洁机器人进行控制的目标控制逻辑;所述配置端提供图形化的界面,所述界面上包括所述指令块面板和所述指令编辑器,所述指令块面板包括至少一个指令块;A receiving unit, configured to receive 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, 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, 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 is used to execute 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 control methods of the cleaning robot described above.
第六方面,提供了一种存储介质,所述存储介质存储有计算机程序,其中,所述计算机程序被配置为运行时执行上述任一项所述的清洁机器人的控制方法。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 technical solution, the control method, device, equipment 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 one or more target instruction blocks; 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 users can formulate target control logic according to their own diverse and personalized needs, realize corresponding target function requirements, enrich the use scenarios of the cleaning robot, and improve the working efficiency of the cleaning robot.
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例描述中所需要使用的附图作简单地介绍。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.
图1示出了本申请实施例提供的应用于配置端的清洁机器人的控制方法的流程图;FIG1 is a flow chart showing a control method for a cleaning robot applied to a configuration end provided in an embodiment of the present application;
图2示出了本申请实施例提供的应用于清洁机器人的清洁机器人的控制方法的流程图;FIG2 is a flow chart showing a control method for a cleaning robot provided in an embodiment of the present application;
图3A示出了本申请实施例提供的图形化的界面;FIG3A shows a graphical interface provided by an embodiment of the present application;
图3B示出了本申请实施例提供的图形化的界面和清洁机器人交互的示意图;FIG3B is a schematic diagram showing the interaction between the graphical interface and the cleaning robot provided in an embodiment of the present application;
图4示出了本申请实施例提供的图形化的界面的一种示意图;FIG4 shows a schematic diagram of a graphical interface provided by an embodiment of the present application;
图5示出了本申请实施例提供的图形化的界面的另一种示意图;FIG5 shows another schematic diagram of a graphical interface provided in an embodiment of the present application;
图6示出了本申请实施例提供的图形化的界面的又一种示意图;FIG6 shows another schematic diagram of a graphical interface provided in an embodiment of the present application;
图7示出了本申请实施例提供的第一种功能对应的控制逻辑的示意图;FIG7 is a schematic diagram showing a control logic corresponding to the first function provided in an embodiment of the present application;
图8示出了本申请实施例提供的第二种功能对应的控制逻辑的示意图;FIG8 is a schematic diagram showing a control logic corresponding to the second function provided in an embodiment of the present application;
图9示出了本申请实施例提供的第三种功能对应的控制逻辑的示意图;FIG9 is a schematic diagram showing a control logic corresponding to the third function provided in an embodiment of the present application;
图10示出了本申请实施例提供的第四种功能对应的控制逻辑的示意图;FIG10 is a schematic diagram showing a control logic corresponding to the fourth function provided in an embodiment of the present application;
图11示出了本申请实施例提供的扫地机功能服务器订阅功能服务对应事件的示意图;FIG11 is a schematic diagram showing a corresponding event of a sweeping machine function server subscribing to a function service provided in an embodiment of the present application;
图12示出了本申请实施例提供的应用于配置端的清洁机器人的控制装置的结构图;FIG12 shows a structural diagram of a control device for a cleaning robot applied to a configuration end provided in an embodiment of the present application;
图13示出了本申请实施例提供的应用于清洁机器人的清洁机器人的控制装置的结构图。FIG13 shows a structural diagram of a control device for a cleaning robot provided in an embodiment of the present application and applied to a cleaning robot.
下面将参照附图更详细地描述本申请的示例性实施例。虽然附图中显示了本申请的示例性实施例,然而应当理解,可以以各种形式实现本申请而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本申请,并且能够将本申请的范围完整的传达给本领域的技术人员。The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the 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. On the contrary, these embodiments are provided in order 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", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such use is interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the term "including" and its variants are to be interpreted as open-ended terms meaning "including but not limited to".
为了解决上述技术问题,本申请实施例提供了一种应用于配置端的清洁机器人的控制方法,如图1所示,该应用于配置端的清洁机器人的控制方法可以包括以下步骤S101至S103: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 FIG1 , the control method for a cleaning robot applied to a configuration end may include the following steps S101 to S103:
步骤S101,提供图形化的界面,该界面上包括指令块面板和指令编辑器,指令块面板包括至少一个指令块;Step S101, 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;
步骤S102,在指令编辑器中接收从指令块面板选取的一个或多个目标指令块,通过一个或多个目标指令块制定对清洁机器人进行控制的目标控制逻辑;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 the one or more target instruction blocks;
步骤S103,根据制定的目标控制逻辑对清洁机器人进行控制。Step S103, controlling the cleaning robot according to the established 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 on the configuration end, and the user can formulate the target control logic according to his or her own diverse and personalized needs to achieve the 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 are intuitively and clearly integrated into a graphical interface, and at least one instruction block is displayed in the instruction block panel of the interface.
本申请实施例中提供了一种可能的实现方式,在界面的指令块面板展示的至少一个指令块,具体可以包括一级指令块,各个一级指令块下包括二级指令块。例如,一级指令块可以是AI(Artificial Intelligence,人工智能)指令块,AI指令块下包括二级指令块,如语音识别、物体识别、污渍识别、语言识别唤醒等。In an embodiment of the present application, a possible implementation method is provided, in which at least one instruction block displayed in the instruction block panel of the interface may specifically include a first-level instruction block, and each first-level instruction block includes a second-level instruction block. For example, the first-level instruction block may be an AI (Artificial Intelligence) instruction block, and the AI instruction block includes a second-level instruction block, such as speech recognition, object recognition, stain recognition, language recognition wake-up, etc.
可选地,各个二级指令块下还可以包括三级指令块,如第一摄像头、第二摄像头等,本实施例对此不作限制。Optionally, each secondary instruction block may also 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 may 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, etc. This embodiment does not impose any restrictions on this.
本申请实施例中提供了一种可能的实现方式,上面步骤S102在指令编辑器中接收从指令块面板选取的一个或多个目标指令块,具体可以是在指令编辑器中接收从指令块面板的一级指令块和/或二级指令块选取的一个或多个目标指令块,这样使得选取更加灵活和高效。这里,可以通过点击、拖拽或者双击等方式从指令块面板选取的一个或多个目标指令块,本实施例对此不作限制。In the embodiment of the present application, a possible implementation method is provided. In the above step S102, one or more target instruction blocks selected from the instruction block panel are received in the instruction editor. Specifically, one or more target instruction blocks selected from the primary instruction block and/or the secondary instruction block of the instruction block panel are received in the instruction editor, so that the selection is more flexible and efficient. Here, 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 multiple levels of instruction blocks, such as primary instruction blocks, secondary instruction blocks, tertiary instruction blocks, etc., one or more target instruction blocks can be selected from these multi-level instruction blocks, making the selection more flexible and efficient.
本申请实施例中提供了一种可能的实现方式,本实施例提及的各个一级指令块可以包括人工智能指令块、清扫指令块、判断指令块、动作指令块、函数指令块、循环和分支指令块、事件指令块、其他指令块中的一种或多种,本实施例对此不作限制。A possible implementation method is provided in an embodiment of the present application. The various first-level instruction blocks mentioned in this embodiment may include one or more of artificial intelligence instruction blocks, cleaning instruction blocks, judgment instruction blocks, action instruction blocks, function instruction blocks, loop and branch instruction blocks, event instruction blocks, and other instruction blocks, and this embodiment does not limit this.
可选地,若一级指令块包括人工智能指令块,该一级指令块下的至少一个二级指令块可以包括语音识别、物体识别、污渍识别、语言识别唤醒中的一种或多种,本实施例对此不作限制。Optionally, 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 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 first-level instruction block includes a cleaning instruction block, at least one second-level instruction block under the first-level instruction block may include one or more of the cleaning position, cleaning mode, and suction force, which is not limited in this embodiment. The cleaning position instruction block here may also include a third-level instruction block, such as master bedroom, living room, second bedroom, balcony, bathroom, etc.; the cleaning mode instruction block may also include a third-level instruction block, such as cleaning only, mopping only, moving only, sweeping and mopping, etc.; the suction force instruction block may also include a third-level instruction block, such as strong, normal, etc., which is not limited in this embodiment.
可选地,若一级指令块包括事件指令块,可以将清洁机器人的红外传感器、距离传感器、加速度传感器等传感器功能定义为事件指令,例如当清洁机器人的传感器采集到清洁机器人与墙壁或虚拟墙发生碰撞时,产生碰撞事件,那么可以将碰撞事件指令块作为事件指令块下的二级指令块。需要说明的是,此处例举仅是示意性的,并不对本实施例进行限制。Optionally, if the primary instruction block includes an event instruction block, the sensor functions of the cleaning robot, such as the infrared sensor, distance sensor, acceleration sensor, etc., can be defined as event instructions. For example, when the sensor of the cleaning robot detects that the cleaning robot collides with a wall or a virtual wall, a collision event is generated. Then, 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 given here are only illustrative and do not limit this embodiment.
本申请实施例中提供了一种可能的实现方式,上面步骤S102通过一个或多个目标指令块制定对清洁机器人进行控制的目标控制逻辑,具体可以包括以下步骤A1和A2:A possible implementation method is provided in the embodiment of the present application. In the above step S102, a target control logic for controlling the cleaning robot is formulated through one or more target instruction blocks, which may specifically include the following steps A1 and A2:
步骤A1,获取对清洁机器人进行控制所要实现的功能的说明信息。Step A1, obtaining description information of functions to be achieved by controlling the cleaning robot.
该步骤中,功能的说明信息是对清洁机器人进行控制所要实现的功能的详细描述,例如,功能的说明信息可以是扫地机发现家中无人时,切换为安防模式,并在检测到陌生人进入房屋时触发报警;又如,功能的说明信息可以是工作日每天早8点清扫,非工作日早9点开始清扫,等等。需要说明的是,此处例举仅是示意性的,并不对本实施例进行限制。In this step, the function description information is a detailed description of the function to be achieved by controlling the cleaning robot. For example, the function description information may be that when the sweeping robot finds that no one is at home, it switches to the security mode and triggers an alarm when a stranger enters the house; for another example, the function description information may be that the sweeping robot starts cleaning at 8 am every weekday and at 9 am every non-workday, etc. It should be noted that the examples here are only illustrative and do not limit this embodiment.
步骤A2,基于功能的说明信息,通过一个或多个目标指令块制定对清洁机器人进行控制的目标控制逻辑。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 the target control logic for controlling the cleaning robot through one or more target instruction blocks based on the function description information, which is more accurate and efficient, enriches the usage scenarios of the cleaning robot, and improves the working efficiency of the cleaning robot.
基于同一发明构思,本申请实施例还提供了一种应用于清洁机器人的清洁机器人的控制方法,如图2所示,该应用于清洁机器人的清洁机器人的控制方法可以包括以下步骤S201至S202:Based on the same inventive concept, the embodiment of the present application further provides a control method for a cleaning robot applied to a cleaning robot. As shown in FIG. 2 , the control method for a cleaning robot applied to a cleaning robot may include the following steps S201 to S202:
步骤S201,接收来自配置端发送的目标控制代码;其中,目标控制代码是配置端根据制定的目标控制逻辑生成的,配置端在指令编辑器中接收从指令块面板选取的一个或多个目标指令块,通过一个或多个目标指令块制定对清洁机器人进行控制的目标控制逻辑;配置端提供图形化的界面,界面上包括指令块面板和指令编辑器,指令块面板包括至少一个指令块;Step S201, 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, 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, the interface includes an instruction block panel and an instruction editor, and the instruction block panel includes at least one instruction block;
步骤S202,执行目标控制代码对清洁机器人进行控制。Step S202, executing the target control code to control the cleaning robot.
本实施例接收来自配置端发送的目标控制代码,这里的目标控制代码是配置端根据制定的目标控制逻辑生成的,这样将高层次的基于用户意图的指令程序转化成清洁机器人可执行的命令序列,实现对清洁机器人进行控制,使得清洁机器人的使用场景更加丰富,提升清洁机器人的工作效率。This embodiment receives a 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. In this way, the high-level instruction program based on user intention is converted into an executable command sequence for 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.
本申请实施例中提供了一种可能的实现方式,清洁机器人可以包括代码片段管理器和代码执行器;在步骤S201接收来自配置端发送的目标控制代码之后,还可以由代码片段管理器存储目标控制代码;这样,步骤S202执行目标控制代码对清洁机器人进行控制具体可以包括以下步骤B1和B2:A possible implementation method is provided in an embodiment of the present application. 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. Thus, step S202 executes the target control code to control the cleaning robot, which may specifically include the following steps B1 and B2:
步骤B1,代码片段管理器加载目标控制代码至代码执行器;Step B1, the code snippet manager loads the target control code into the code executor;
步骤B2,代码执行器执行目标控制代码,对清洁机器人进行控制。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, converts the high-level instruction program based on user intention into a command sequence executable by the cleaning robot, realizes the control of the cleaning robot, enriches the usage scenarios of the cleaning robot, and improves the work efficiency of the cleaning robot.
本申请实施例中提供了一种可能的实现方式,清洁机器人还可以包括功能服务器;那么上面步骤B2中代码执行器执行目标控制代码,对清洁机器人进行控制,具体可以包括以下步骤B21和B22:A possible implementation method is provided in an embodiment of the present application. The cleaning robot may further include a functional server. Then, 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 B21 and B22:
步骤B21,代码执行器在执行目标控制代码的过程中,在涉及功能服务时,可以向功能服务器定制功能服务,功能服务器向物联网IOT事件总线订阅功能服务对应的事件。Step B21, when the code executor is executing the target control code and involves a functional service, it can customize the functional service to the functional server, and the functional server subscribes to the event corresponding to the functional service to the IoT event bus.
该步骤中,IOT(Internet Of Things,物联网)是指通过信息传感设备,按约定的协议,将任何物体与网络相连接,物体通过信息传播媒介进行信息交换和通信,以实现智能化识别、定位、跟踪、监管等功能。IOT事件总线对IOT设备(如智能门锁、智能空调、智能灯具等)进行管理,监听IOT设备相关的事件。In this step, IOT (Internet of Things) refers to connecting any object to the network through information sensing devices according to the agreed protocol, and the objects exchange and communicate information through information transmission media to achieve intelligent identification, positioning, tracking, supervision and other functions. The IOT event bus manages IOT devices (such as smart door locks, smart air conditioners, smart lamps, etc.) and monitors events related to IOT devices.
步骤B22,代码执行器监听到功能服务对应的事件时,执行功能服务对应的事件的控制代码,对清洁机器人进行控制。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 Internet of Things event system, listens 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.
本申请实施例中提供了一种可能的实现方式,上面步骤B2中代码执行器执行目标控制代码,对清洁机器人进行控制,具体可以包括以下步骤B23:A possible implementation method is provided in the embodiment of the present application. 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:
步骤B23,代码执行器启动线程执行目标控制代码,并在执行目标控制代码的过程中,按照设定时长检查下列一项或多项的目标控制代码的执行情况:Step B23: the code executor starts a 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 thread exists;
事件响应的控制代码是否有异常发生;Whether the control code of the event response has any abnormality;
目标控制代码的执行时长是否超出预设阈值;Whether the execution time of the target control code exceeds the preset threshold;
清洁机器人是否有报错;Whether the cleaning robot reports an error;
是否收到来自配置端发送的停止命令;Whether the stop command sent from the configuration end is received;
当出现线程不存在、事件响应的控制代码有异常发生、目标控制代码的执行时长超出预设阈值、清洁机器人有报错、收到来自配置端发送的停止命令中的一种或多种,则停止执行目标控制代码。When one or more of the following occurs: the thread does not exist, an exception occurs in the control code of the event response, the execution time 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 will be 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.
本申请实施例中提供了一种可能的实现方式,上面步骤B1中代码片段管理器加载目标控制代码至代码执行器,具体可以是代码片段管理器加载目标控制代码至沙箱化的代码执行器;上面步骤B2中代码执行器执行目标控制代码,对清洁机器人进行控制,具体可以是代码执行器在沙箱中执行目标控制代码,对清洁机器人进行控制。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 to the code executor, which may specifically be the code snippet manager loading the target control code to 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 according to the target control logic, can also be called user code, may have some problems (such as dead loops, execution of malicious code, etc.), this embodiment deploys the user code in a secure sandbox for execution, so that 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.
以上介绍了图1和图2所示实施例的各个环节的多种实现方式,下面将通过具体实施例对本申请实施例的应用于配置端和应用于清洁机器人的清洁机器人的控制方法做进一步说明。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.
由于现有交互元素的限制,用户与机器人的交互无法或难以实现一些高度灵活的配置功能需求,如在白天(例如早8点到下午6点)识别到家中无人后,可以自主完成一次深度清扫功能;或在房间内漫游,识别到宠物或特定物体后,拍照然后发送到用户邮箱中或发送APP消息到用户账号内。Due to the limitations of existing interactive elements, the interaction between users and robots cannot or is difficult to achieve some highly flexible configuration function requirements, such as independently completing a deep cleaning function after recognizing that no one is at home during the day (for example, 8 am to 6 pm); or roaming in the room, recognizing pets or specific objects, taking photos and sending them to the user's mailbox or sending APP messages 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 accomplish tasks such as setting the cleaning robot function to security mode when the smart door lock detects that the user has closed the door and left the room.
为解决上述问题或类似的复杂且灵活的用户交互问题,需要一种高度可定制化的交互技术。To solve the above problems or similar complex and flexible user interaction problems, a highly customizable interaction technology is needed.
在相关技术中,将清洁机器人硬件功能直接通过SDK(Software Development Kit,软件开发包)提供出来,通过编程语句调用硬件功能,进而控制清洁机器人的各种行为。In related technologies, the hardware functions of the cleaning robot are directly provided through SDK (Software Development Kit), and the hardware functions are called through programming statements to control the various behaviors of the cleaning robot.
然而,如果直接将清洁机器人的硬件功能通过SDK提供出来,用户难以进行定制化编程,主要原因在于嵌入式系统编程的复杂性,其涉及到硬件、软件、控制理论等相关的知识,而每个门类的知识又需要大量的专业训练才能掌握。举例来说,如果允许用户直接控制清洁机器人的电机,那么很有可能出现在用户调试程序的过程中,因为电流参数过大,而将清洁机器人马达损坏;并且从底层细节API(Application Programming Interface,应用程序编程接口)到完成具体的定制化需求,需要大量的编程以及调试工作,普通用户几乎不可能完成这样的代码编写工作。However, if the hardware functions of the cleaning robot are directly provided through the SDK, it is difficult for users to perform customized programming. The main reason is the complexity of embedded system programming, which involves knowledge related to hardware, software, control theory, etc., and each category of knowledge requires a lot of professional training to master. For example, if the user is allowed to directly control the motor of the cleaning robot, it is very likely that the motor of the cleaning robot will be damaged during the user's debugging of the program due to excessive current parameters; and from the underlying details API (Application Programming Interface) to the completion of specific customization requirements, a lot of programming and debugging work is required, and it is almost impossible for ordinary users to complete such code writing work.
本实施例提供一种清洁机器人的图形化、程序化操作的交互方法,可以实现对清洁机器人功能的高度自定义。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 functions of the cleaning robot.
在具体实施例中,配置端可以是智能手机、平板电脑、个人电脑等,本实施例对此不作限制。清洁机器人可以是扫地机器人、拖地机器人等,本实施例对此不作限制。In a specific embodiment, the configuration terminal may be a smart phone, a tablet computer, a personal computer, etc., which is not limited in this embodiment. The cleaning robot may be a sweeping robot, a mopping robot, etc., which is not limited in this embodiment.
图3A示出了本申请实施例提供的图形化的界面。在图3A中提供图形化的界面,该界面上包括指令块面板和指令编辑器,指令块面板包括至少一个指令块,如AI指令、清扫指令、判断指令、动作指令、函数指令、循环和分支、事件指令、其他指令等;可以在指令编辑器中接收从指令块面板选取的一个或多个目标指令块,通过一个或多个目标指令块制定对清洁机器人进行控制的目标控制逻辑。FIG3A shows a graphical interface provided by an embodiment of the present application. FIG3A provides a graphical interface, which includes an instruction block panel and an instruction editor. The instruction block panel includes at least one instruction block, such as AI instructions, cleaning instructions, judgment instructions, action instructions, function instructions, loops and branches, event instructions, other instructions, etc. One or more target instruction blocks selected from the instruction block panel can be received in the instruction editor, and the target control logic for controlling the cleaning robot can be formulated through one or more target instruction blocks.
图3B示出了本申请实施例提供的图形化的界面和清洁机器人交互的示意图。在图3B中,左侧部分为图形化的界面,在界面的指令块面板上可以提供如AI指令、清扫指令、判断指令、动作指令、函数指令、循环和分支、事件指令、其他指令等,左侧右边的部分为指令编辑器,指令编辑器中的开始->清扫主卧(设置普通吸力)->清扫客厅(设置地毯模式)->清扫厨房(设置拖地模式)->清扫卫生间(设置普通吸力)->回桩充电(设置慢速充电)->程序结束,是用户编辑的目标控制逻辑,顺序执行。随后,根据制定的目标控制逻辑生成目标控制代码,并将目标控制代码发送给清洁机器人。Figure 3B shows a schematic diagram of the interaction between the graphical interface and the cleaning robot provided in the embodiment of the present application. In Figure 3B, the left part is a graphical interface, and AI instructions, cleaning instructions, judgment instructions, action instructions, function instructions, loops and branches, event instructions, other instructions, etc. can be provided on the instruction block panel of the interface. The right part on the left is the instruction editor. The start in the instruction editor -> 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) -> Charge back to the pile (set slow charging) -> End of the program is the target control logic edited by the user, which is executed sequentially. Subsequently, the target control code is generated according to the formulated target control logic, and the target control code is sent to the cleaning robot.
在图3B中,右侧部分为清洁机器人的处理逻辑,具体地,配置端上传代码片段(即配置端根据制定的目标控制逻辑生成的目标控制代码)给清洁机器人;清洁机器人的指令代码片段管理器(即代码片段管理器)存储和加载用户的代码片段到清洁机器人文件系统;机器人指令执行器(即代码执行器)执行代码片段,并向机器人功能服务器(即功能服务器)订阅功能服务的事件,监听IOT事件总线。这里的指令代码片段管理器、机器人指令执行器和机器人功能服务器基于机器人操作系统来实现。In Figure 3B, the right part is the processing logic of the cleaning robot. Specifically, the configuration end uploads the code snippet (i.e., the target control code generated by the configuration end according to the formulated target control logic) to the cleaning robot; the cleaning robot's instruction code snippet manager (i.e., the code snippet manager) stores and loads the user's code snippet to the cleaning robot file system; the robot instruction executor (i.e., the code executor) executes the code snippet, and subscribes to the event of the function service from the robot function server (i.e., the function server), and listens to the IOT event bus. Here, the instruction code snippet manager, robot instruction executor, and robot function server are implemented based on the robot operating system.
图4示出了本申请实施例提供的图形化的界面的一种示意图。在图4所示的指令块面板中,AI指令为一级指令块,一级指令块下还包括二级指令块,例如语音识别、物体识别、污渍识别以及语言识别唤醒等,可以根据这些指令块来实现自定义编程。例如,在图4所示的指令编辑器中编辑的控制逻辑是,语言识别唤醒->语音识别->清扫语言识别出的区域->程序结束。FIG4 shows a schematic diagram of a graphical interface provided by an embodiment of the present application. In the instruction block panel shown in FIG4, the AI instruction is a first-level instruction block, and the first-level instruction block also includes a second-level instruction block, such as voice recognition, object recognition, stain recognition, and language recognition wake-up, etc., and custom programming can be implemented according to these instruction blocks. For example, the control logic edited in the instruction editor shown in FIG4 is language recognition wake-up -> voice recognition -> clean the area recognized by the language -> program ends.
图5示出了本申请实施例提供的图形化的界面的另一种示意图。在图5所示的指令块面板中,清扫指令为一级指令块,一级指令块下还包括二级指令块,例如位置(主卧、客厅、次卧、阳台、卫生间等),吸力(强力、普通等),模式(仅清扫、仅拖、仅移动、扫拖等),可以根据这些指令块来实现自定义编程。例如,在图5所示的指令编辑器中编辑的控制逻辑是,开始->清扫主卧(普通吸力)->清扫客厅(地毯模式)->清扫厨房(拖地模式)->清扫卫生间(普通吸力)->回桩充电(慢速充电)->程序结束。Figure 5 shows another schematic diagram of a graphical interface provided in an embodiment of the present application. In the command block panel shown in Figure 5, 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 according to these command blocks. For example, the control logic edited in the command editor shown in Figure 5 is, start->clean the master bedroom (normal suction)->clean the living room (carpet mode)->clean the kitchen (mopping mode)->clean the bathroom (normal suction)->return to the pile for charging (slow charging)->program ends.
图6示出了本申请实施例提供的图形化的界面的又一种示意图,在图6所示的指令块面板中,事件指令为一级指令块,一级指令块下还包括二级指令块,例如当智能门锁门锁关门、其他物联网设备事件等,可以根据这些指令块来实现自定义编程。例如,在图6所示的指令编辑器中编辑的控制逻辑是,当监听到智能门锁关门时->调用全屋清扫函数->程序结束,从而实现与智能门锁的联动。FIG6 shows another schematic diagram of a graphical interface provided by an embodiment of the present application. In the command block panel shown in FIG6, the event command is a first-level command block, and the first-level command block also includes a second-level command block, such as when the smart door lock closes the door, 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 FIG6 is, when the smart door lock is monitored to close the door -> call the whole house cleaning function -> program ends, thereby realizing linkage with the smart door lock.
图7示出了本申请实施例提供的第一种功能对应的控制逻辑的示意图,将图7所示的全屋清扫功能组合函数定义为可复用的函数。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.
图8示出了本申请实施例提供的第二种功能对应的控制逻辑的示意图,该功能为扫地机发现家中无人时,切换为安防模式,并在检测到陌生人进入房屋时触发报警。编辑的控制逻辑是,当监听到智能门锁关门时->扫地机移动到大门附近->切换为安防模式。其中,安防模式是指当AI模块识别到陌生人时,将摄像头切换为视频录制模式,并对识别到的人脸进行识别,如果识别到陌生人,则向APP推送报警信息。Figure 8 shows a schematic diagram of the control logic corresponding to the second function provided in an embodiment of the present application, which is that when the sweeper finds that no one is at home, it switches to security mode and triggers an alarm when a stranger enters the house. The edited control logic is that when the smart door lock is monitored to close the door -> the sweeper moves near the door -> switches to security mode. Among them, the security mode means that when the AI module recognizes a stranger, the camera is switched to video recording mode, and the recognized face is recognized. If a stranger is recognized, an alarm message is pushed to the APP.
图9示出了本申请实施例提供的第三种功能对应的控制逻辑的示意图,该功能为工作日每天早8点清扫,非工作日早9点开始清扫。编辑的控制逻辑是,每日清晨早8点定时->判断是否为工作日->若否,等待1小时后调用全屋清扫函数;若是,调用全屋清扫函数。FIG9 shows a schematic diagram of the control logic corresponding to the third function provided in the embodiment of the present application, which is to clean at 8 a.m. every day on weekdays and at 9 a.m. every day on non-working days. The edited control logic is: set at 8 a.m. every morning -> determine whether it is a weekday -> if not, wait for 1 hour and then call the whole house cleaning function; if so, call the whole house cleaning function.
图10示出了本申请实施例提供的第四种功能对应的控制逻辑的示意图,该功能为扫地机器人在房间内漫游,当查找到宠物后,向APP推送宠物所在位置。编辑的控制逻辑是,开始->切换扫地机为房间漫游模式->设置AI识别模块为宠物识别模式->当识别到宠物->将扫地机在SLAM(Simultaneous Localization And Mapping,同步定位与建图)地图中的坐标推送到APP->结束。FIG10 shows a schematic diagram of the control logic corresponding to the fourth function provided in an embodiment of the present application, which is that the sweeping robot roams in the room, and when a pet is found, the pet's location is pushed to the APP. The edited control logic is, start->switch the sweeping robot to room roaming mode->set the AI recognition module to pet recognition mode->when a pet is recognized->push the sweeping robot's coordinates in the SLAM (Simultaneous Localization And Mapping) map to the APP->end.
图11示出了本申请实施例提供的扫地机功能服务器订阅功能服务对应事件的示意图。在图11中,清洁机器人为扫地机,配置端的用户自定义代码片段上传到代码片段执行器(即代码执行器),代码片段执行器逐指令执行,在涉及功能服务时,向扫地机功能服务器定制功能服务,功能服务器向IOT事件总线订阅功能服务对应的事件,即发布扫地机相关事件。IOT事件总线监听IOT设备的设备事件,并将IOT设备事件发送给代码片段执行器的监听IOT事件,并发送给查找事件响应代码片段,代码片段执行器查找到对应的代码片段继续执行,对扫地机进行控制。Figure 11 shows a schematic diagram of the sweeping machine function server subscribing to the corresponding events of the function service provided by the embodiment of the present application. In Figure 11, the cleaning robot is a sweeping machine, 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 the function service, the function service is customized to the sweeping machine function server, and the function server subscribes to the event corresponding to the function service to the IOT event bus, that is, publishes sweeping machine 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 listening 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 to control the sweeping machine.
代码片段管理器主要功能有,存储和加载用户的代码片段到扫地机文件系统。The main functions of the code snippet manager are to store and load user code snippets to the sweeper file system.
基于Blockly(一种图形化编程框架)的代码生成能力,根据用户代码片段生成如下的Python(一种编程语言)代码片段,扫地机功能细节均已封装为可调用的Python函数。Based on the code generation capability of Blockly (a graphical programming framework), the following Python (a programming language) code snippet is generated according to the user code snippet. The functional details of the sweeper have been encapsulated as callable Python functions.
代码执行器是一段固定的Python代码,加载Python代码片段,然后启动专用的线程执行代码模块中的main函数,代码执行器随后每个数十毫秒检查用户代码的执行情况:The code executor is a fixed Python code that loads the Python code snippet and then starts a dedicated thread to execute the main function in the code module. The code executor then checks the execution of the user code every tens of milliseconds:
1)用户代码线程是否存在;1) Whether the user code thread exists;
2)事件响应的Python代码是否有异常发生;2) Whether any exception occurs in the Python code of the event response;
3)用户代码是否执行超出预设阈值;3) Whether the user code execution exceeds the preset threshold;
4)扫地机功能模块是否有报错;4) Whether there is an error in the sweeper function module;
5)是否收到APP发送的停止命令。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, and the user can formulate a more convenient, efficient and intelligent way of using the cleaning robot based on their own needs.
需要说明的是,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。实际应用中,上述所有可能的实施方式可以采用结合的方式任意组合,形成本申请的可能的实施例,在此不再一一赘述。It should be noted that the size of the sequence number of each step in the above embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. In practical applications, all the above possible implementation methods can be combined in any way to form possible embodiments of the present application, which will not be described one by one 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.
图12是本申请实施例提供的应用于配置端的清洁机器人的控制装置的结构图。如图12所示,该应用于配置端的清洁机器人的控制装置具体可以包括显示单元1201、制定单元1202以及控制单元1203。Fig. 12 is a structural diagram of a control device for a cleaning robot applied to a configuration end provided by an embodiment of the present application. As shown in Fig. 12, the control device for a cleaning robot applied to a configuration end may specifically include a display unit 1201, a formulation unit 1202, and a control unit 1203.
显示单元1201,用于提供图形化的界面,所述界面上包括指令块面板和指令编辑器,所述指令块面板包括至少一个指令块;A display unit 1201 is used to provide a graphical interface, wherein the interface includes an instruction block panel and an instruction editor, wherein the instruction block panel includes at least one instruction block;
制定单元1202,用于在所述指令编辑器中接收从所述指令块面板选取的一个或多个目标指令块,通过所述一个或多个目标指令块制定对清洁机器人进行控制的目标控制逻辑;A formulation unit 1202, configured 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;
控制单元1203,用于根据制定的所述目标控制逻辑对所述清洁机器人进行控制。The control unit 1203 is used to control the cleaning robot according to the formulated target control logic.
本申请实施例中提供了一种可能的实现方式,控制单元1203还用于:A possible implementation method is provided in an embodiment of the present application, where the control unit 1203 is further configured to:
根据制定的目标控制逻辑生成目标控制代码,并将目标控制代码发送给清洁机器人,以执行目标控制代码对清洁机器人进行控制。A target control code is generated according to the formulated target control logic, and the target control code is sent to the cleaning robot so as to execute the target control code to control the cleaning robot.
本申请实施例中提供了一种可能的实现方式,所述指令块包括至少一个一级指令块。A possible implementation method is provided in an embodiment of the present application, wherein the instruction block includes at least one first-level instruction block.
本申请实施例中提供了一种可能的实现方式,所述一级指令块下包括至少一个二级指令块。A possible implementation method is provided in an embodiment of the present application, wherein the first-level instruction block includes at least one second-level instruction block.
本申请实施例中提供了一种可能的实现方式,所述制定单元1202还用于:A possible implementation method is provided in an embodiment of the present application, wherein the formulation unit 1202 is further configured to:
在所述指令编辑器中接收从所述指令块面板的一级指令块和/或二级指令块选取的一个或多个目标指令块。One or more target instruction blocks selected from the primary instruction blocks and/or secondary instruction blocks of the instruction block panel are received in the instruction editor.
本申请实施例中提供了一种可能的实现方式,至少一个所述一级指令块包括人工智能指令块、清扫指令块、判断指令块、动作指令块、函数指令块、循环和分支指令块、事件指令块、其他指令块中的一种或多种。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 cleaning 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.
本申请实施例中提供了一种可能的实现方式,所述制定单元1202还用于:A possible implementation method is provided in an embodiment of the present application, wherein the formulation unit 1202 is further configured to:
获取对清洁机器人进行控制所要实现的功能的说明信息;Obtaining information describing functions to be achieved by controlling the cleaning robot;
基于所述功能的说明信息,通过所述一个或多个目标指令块制定对清洁机器人进行控制的目标控制逻辑。Based on the description information of the function, a target control logic for controlling the cleaning robot is formulated through the one or more target instruction blocks.
图13是本申请实施例提供的应用于清洁机器人的清洁机器人的控制装置的结构图。如图13所示,该应用于清洁机器人的清洁机器人的控制装置具体可以包括接收单元1301和执行单元1302。Fig. 13 is a structural diagram of a control device for a cleaning robot provided in an embodiment of the present application. As shown in Fig. 13 , the control device for a cleaning robot provided in an embodiment of the present application may specifically include a receiving unit 1301 and an executing unit 1302 .
接收单元1301,用于接收来自配置端发送的目标控制代码;其中,所述目标控制代码是所述配置端根据制定的目标控制逻辑生成的,所述配置端在指令编辑器中接收从指令块面板选取的一个或多个目标指令块,通过所述一个或多个目标指令块制定对清洁机器人进行控制的目标控制逻辑;所述配置端提供图形化的界面,所述界面上包括所述指令块面板和所述指令编辑器,所述指令块面板包括至少一个指令块;The receiving unit 1301 is used to receive 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, 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, the interface includes the instruction block panel and the instruction editor, and the instruction block panel includes at least one instruction block;
执行单元1302,用于执行所述目标控制代码对所述清洁机器人进行控制。The execution unit 1302 is used to execute the target control code to control the cleaning robot.
本申请实施例中提供了一种可能的实现方式,所述清洁机器人的执行单元1302可以包括代码片段管理器和代码执行器;A possible implementation is provided in an embodiment of the present application, where the execution unit 1302 of the cleaning robot may include a code snippet manager and a code executor;
所述代码片段管理器存储所述目标控制代码;The code segment manager stores the target control code;
所述代码片段管理器加载所述目标控制代码至所述代码执行器;The code snippet manager loads the target control code into the code executor;
所述代码执行器执行所述目标控制代码,对所述清洁机器人进行控制。The code executor executes the target control code to control the cleaning robot.
本申请实施例中提供了一种可能的实现方式,所述清洁机器人的执行单元1302还包括功能服务器;A possible implementation method is provided in an embodiment of the present application, wherein the execution unit 1302 of the cleaning robot further includes a function server;
所述代码执行器在执行所述目标控制代码的过程中,在涉及功能服务时,向所述功能服务器定制所述功能服务,所述功能服务器向物联网IOT事件总线订阅所述功能服务对应的事件;In the process of executing the target control code, the code executor customizes the functional service to the functional server when a functional service is involved, and the functional server subscribes to an event corresponding to the functional service from an IoT event bus;
所述代码执行器监听到所述功能服务对应的事件时,执行所述功能服务对应的事件的控制代码,对所述清洁机器人进行控制。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 an embodiment of the present application, a possible implementation method is provided, wherein the code executor starts a 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 a set duration:
线程是否存在;Whether the thread exists;
事件响应的控制代码是否有异常发生;Whether the control code of the event response has any abnormality;
所述目标控制代码的执行时长是否超出预设阈值;Whether the execution time 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 thread does not exist, an exception occurs in the control code of the event response, the execution time 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.
本申请实施例中提供了一种可能的实现方式,所述代码片段管理器加载所述目标控制代码至沙箱化的所述代码执行器;An embodiment of the present application provides a possible implementation method, 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-mentioned 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, when running, a control method for a cleaning robot applied to a configuration end of any of the above embodiments.
基于同一发明构思,本申请实施例还提供了一种清洁机器人,包括处理器和存储器,存储器中存储有计算机程序,处理器被设置为运行计算机程序以执行上述任意一个实施例的应用于清洁机器人的清洁机器人的控制方法。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 a 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, in which a computer program is stored, wherein the computer program is configured to execute, when running, a control method for a cleaning robot applied to a cleaning robot of any of the above embodiments.
所属领域的技术人员可以清楚地了解到,上述描述的系统、装置、模块的具体工作过程,可以参考前述方法实施例中的对应过程,为简洁起见,在此不另赘述。Those skilled in the art can clearly understand that the specific working processes of the systems, devices, and modules described above can refer to the corresponding processes in the aforementioned method embodiments, and for the sake of brevity, they are not further described here.
本领域普通技术人员可以理解:本申请的技术方案本质上或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,其包括若干程序指令,用以使得一电子设备(例如个人计算机,服务器,或者网络设备等)在运行所述程序指令时执行本申请各实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM)、随机存取存储器(RAM)、磁碟或者光盘等各种可以存储程序代码的介质。Those skilled in the art can understand that the technical solution of the present application can be essentially or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, which includes a number of program instructions, so that an electronic device (such as a personal computer, a server, or a network device, etc.) executes all or part of the steps of the method described in each embodiment of the present application when running the program instructions. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
或者,实现前述方法实施例的全部或部分步骤可以通过程序指令相关的硬件(诸如个人计算机,服务器,或者网络设备等的电子设备)来完成,所述程序指令可以存储于一计算机可读取存储介质中,当所述程序指令被电子设备的处理器执行时,所述电子设备执行本申请各实施例所述方法的全部或部分步骤。Alternatively, all or part of the steps of implementing the aforementioned method embodiments may be accomplished by hardware associated with 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 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.
Claims (18)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410063920.1 | 2024-01-16 | ||
| CN202410063920.1A CN117982065A (en) | 2024-01-16 | 2024-01-16 | Control method, device, equipment and medium of cleaning robot |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025152911A1 true WO2025152911A1 (en) | 2025-07-24 |
Family
ID=90888098
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2025/072169 Pending WO2025152911A1 (en) | 2024-01-16 | 2025-01-14 | Control method and apparatus for cleaning robot, device, and medium |
Country Status (3)
| Country | Link |
|---|---|
| CN (1) | CN117982065A (en) |
| TW (1) | TW202530903A (en) |
| WO (1) | WO2025152911A1 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN120742899A (en) * | 2025-08-26 | 2025-10-03 | 追觅科技(苏州)有限公司 | Control method of cleaning equipment, data processing method and cleaning equipment |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117982065A (en) * | 2024-01-16 | 2024-05-07 | 北京石头创新科技有限公司 | Control method, device, equipment and medium of cleaning robot |
Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20110071674A1 (en) * | 2009-09-18 | 2011-03-24 | Sungyunkwan University Foundation For Corporate Collaboration | Intelligent user interface apparatus and control method for control of service robots |
| CN104199449A (en) * | 2014-09-16 | 2014-12-10 | 湖南格兰博智能科技有限责任公司 | Smart phone based remote control system and method of automatic ground cleaning robot |
| CN104407610A (en) * | 2014-07-21 | 2015-03-11 | 东莞市万锦电子科技有限公司 | Ground cleaning robot system and control method thereof |
| US20170265703A1 (en) * | 2014-08-19 | 2017-09-21 | Samsung Electronics Co., Ltd. | Robot cleaner, control apparatus, control system, and control method of robot cleaner |
| CN111580806A (en) * | 2020-04-10 | 2020-08-25 | 天津大学 | Collaborative robot graphical programming system |
| CN112698823A (en) * | 2020-12-31 | 2021-04-23 | 佛山冠湾智能科技有限公司 | Graphical robot programming interaction system and method |
| CN116407008A (en) * | 2021-12-31 | 2023-07-11 | 追觅创新科技(苏州)有限公司 | Method, system and control terminal for interaction between user and cleaning robot |
| CN117982065A (en) * | 2024-01-16 | 2024-05-07 | 北京石头创新科技有限公司 | Control method, device, equipment and medium of cleaning robot |
-
2024
- 2024-01-16 CN CN202410063920.1A patent/CN117982065A/en active Pending
-
2025
- 2025-01-14 TW TW114101508A patent/TW202530903A/en unknown
- 2025-01-14 WO PCT/CN2025/072169 patent/WO2025152911A1/en active Pending
Patent Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20110071674A1 (en) * | 2009-09-18 | 2011-03-24 | Sungyunkwan University Foundation For Corporate Collaboration | Intelligent user interface apparatus and control method for control of service robots |
| CN104407610A (en) * | 2014-07-21 | 2015-03-11 | 东莞市万锦电子科技有限公司 | Ground cleaning robot system and control method thereof |
| US20170265703A1 (en) * | 2014-08-19 | 2017-09-21 | Samsung Electronics Co., Ltd. | Robot cleaner, control apparatus, control system, and control method of robot cleaner |
| CN104199449A (en) * | 2014-09-16 | 2014-12-10 | 湖南格兰博智能科技有限责任公司 | Smart phone based remote control system and method of automatic ground cleaning robot |
| CN111580806A (en) * | 2020-04-10 | 2020-08-25 | 天津大学 | Collaborative robot graphical programming system |
| CN112698823A (en) * | 2020-12-31 | 2021-04-23 | 佛山冠湾智能科技有限公司 | Graphical robot programming interaction system and method |
| CN116407008A (en) * | 2021-12-31 | 2023-07-11 | 追觅创新科技(苏州)有限公司 | Method, system and control terminal for interaction between user and cleaning robot |
| CN117982065A (en) * | 2024-01-16 | 2024-05-07 | 北京石头创新科技有限公司 | Control method, device, equipment and medium of cleaning robot |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN120742899A (en) * | 2025-08-26 | 2025-10-03 | 追觅科技(苏州)有限公司 | Control method of cleaning equipment, data processing method and cleaning equipment |
Also Published As
| Publication number | Publication date |
|---|---|
| CN117982065A (en) | 2024-05-07 |
| TW202530903A (en) | 2025-08-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2025152911A1 (en) | Control method and apparatus for cleaning robot, device, and medium | |
| Lacerda et al. | Optimal and dynamic planning for Markov decision processes with co-safe LTL specifications | |
| Tranquillini et al. | Process-based design and integration of wireless sensor network applications | |
| Braberman et al. | Controller synthesis: From modelling to enactment | |
| CN113268352B (en) | Multi-instruction responsive task collaborative management method for universal service robot | |
| CN102833120B (en) | The abnormal method and system of NM server are processed in a kind of rapid automatized test | |
| CN109271223A (en) | Windows switching method, device, terminal and computer readable storage medium | |
| EP1934725B1 (en) | Stage evaluation of a state machine | |
| Mallozzi et al. | A runtime monitoring framework to enforce invariants on reinforcement learning agents exploring complex environments | |
| CN114578727B (en) | Business logic control method for cleaning robot | |
| David et al. | Compositional verification of real-time systems using ECDAR | |
| De Paoli et al. | On the complementary nature of event-driven and time-driven models | |
| CN112155485B (en) | Control method, control device, cleaning robot and storage medium | |
| CN115047826B (en) | Method for realizing general information physical fusion system component model framework | |
| Flake et al. | Agent-based modeling for holonic manufacturing systems with fuzzy control | |
| CN116755360A (en) | Device control method, computer device and storage medium based on behavior tree | |
| CN117499454A (en) | RPA robot control system and method | |
| Nigro | Modelling and analysis of cyber-physical systems using Deterministic Theatre | |
| Cirillo et al. | A framework for human-aware robot planning | |
| Sánchez et al. | An approach to modeling and developing teleo-reactive systems considering timing constraints | |
| Mühlig et al. | A knowledge-based multi-entity and cooperative system architecture | |
| CN117260688B (en) | Robot and control method, device and storage medium thereof | |
| Babaei et al. | Solving the RoboSoccer challenge problem with UML-RT and Papyrus-RT | |
| CN120972667A (en) | A method and system for multi-scene switching and scheduling of embodied intelligent robots | |
| CN119987740A (en) | A behavioral intention self-identification method, system, device and storage medium for code generation large model |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 25741472 Country of ref document: EP Kind code of ref document: A1 |