Task scheduling method and device for sweeping robot

文档序号:1175435 发布日期:2020-09-22 浏览:6次 中文

阅读说明:本技术 用于扫地机器人的任务调度方法及装置 (Task scheduling method and device for sweeping robot ) 是由 栾成志 谢晓佳 于 2019-03-15 设计创作,主要内容包括:本发明公开了一种用于扫地机器人的任务调度方法及装置,该装置包括:用于接收服务端发送的任务指令的指令接收模块;用于向服务端反馈扫地机器人的状态信息的状态反馈模块;用于根据任务指令和预设的任务调度逻辑,确定任务指令对应的任务状态,根据任务状态调度清扫任务的任务调度模块;用于采集扫地机器人的各个传感器的状态数据,创建清扫地图,确定扫地机器人在所述清扫地图中的位置;接收任务指令,规划得到清扫数据;依据清扫数据驱动扫地机器人完成清扫任务的底层固件模块。利用上述装置,由于任务调度模块与底层固件模块独立分开运行,接口也是独立的,这样大大降低了任务调度模块与底层固件模块的耦合性,提升任务调度与执行的效率。(The invention discloses a task scheduling method and a task scheduling device for a sweeping robot, wherein the device comprises the following steps: the instruction receiving module is used for receiving a task instruction sent by the server; the state feedback module is used for feeding back the state information of the sweeping robot to the server; the task scheduling module is used for determining a task state corresponding to the task instruction according to the task instruction and a preset task scheduling logic and scheduling and cleaning tasks according to the task state; the sweeping robot system comprises a sweeping robot, a sweeping map and a control module, wherein the sweeping robot is used for acquiring state data of each sensor of the sweeping robot, creating the sweeping map and determining the position of the sweeping robot in the sweeping map; receiving a task instruction, and planning to obtain cleaning data; and the bottom firmware module drives the sweeping robot to complete the sweeping task according to the sweeping data. By using the device, the task scheduling module and the bottom firmware module run independently and separately, and the interfaces are also independent, so that the coupling of the task scheduling module and the bottom firmware module is greatly reduced, and the task scheduling and executing efficiency is improved.)

1. A task scheduling device for a sweeping robot, comprising: the system comprises an instruction receiving module, a state feedback module, a task scheduling module and a bottom firmware module;

the instruction receiving module is used for receiving a task instruction sent by the server;

the state feedback module is used for feeding back the state information of the sweeping robot to the server;

the task scheduling module is used for determining a task state corresponding to the task instruction according to the task instruction and a preset task scheduling logic and scheduling a cleaning task according to the task state;

the bottom firmware module is used for acquiring state data of each sensor of the sweeping robot, creating a sweeping map and determining the position of the sweeping robot in the sweeping map; receiving the task instruction, and planning to obtain cleaning data; and driving the sweeping robot to complete the sweeping task according to the sweeping data.

2. The apparatus of claim 1, the task scheduling module comprising:

the system comprises a running unit and a task scheduling logic unit;

the operation unit is used for determining an event type corresponding to the task instruction according to the task instruction and a preset event type table, wherein the task instruction comprises an event;

and the task scheduling logic unit is used for determining a task state corresponding to the task instruction according to the event type and a preset task scheduling logic.

3. The apparatus of claim 1, the task state comprising: any one of a sleep state, a standby state, a shutdown state, a purge state, a pause state, an abnormal state, a recharge state, an in-charge state, or a charge complete state.

4. The apparatus of any of claims 1-3, the underlying firmware module comprising: the system comprises a system firmware unit, a control firmware unit, a planning firmware unit and a sensing firmware unit;

the system firmware unit is used for maintaining and reporting relevant information of system operation;

the control firmware unit is used for collecting and reporting state data of each sensor of the sweeping robot, acquiring sweeping data and driving the sweeping robot to complete the sweeping task according to the sweeping data;

the sensing firmware unit is used for creating a cleaning map according to the state data of each sensor of the cleaning robot and determining the position of the cleaning robot in the cleaning map;

and the planning firmware unit is used for receiving the task instruction and planning to obtain cleaning data according to the state data of each sensor of the cleaning robot, the cleaning map and the position of the cleaning robot in the cleaning map.

5. The apparatus of claim 4, the perceptual firmware unit to further: determining a sweeping track of the sweeping robot;

the cleaning data planned by the planning firmware unit comprises: cleaning pattern and/or cleaning area.

6. The device of claim 2, wherein the running unit is further configured to acquire monitoring data of the sweeping robot uploaded by the bottom firmware module, and determine an event type corresponding to the monitoring data according to the monitoring data and a preset event type table;

and the task scheduling logic unit is further configured to determine a task state corresponding to the monitoring data according to the event type corresponding to the monitoring data and a preset task scheduling logic.

7. The apparatus of claim 2, the task scheduling module further comprising:

and the reading-writing unit is used for writing the task instruction into a cache and a fixed file before the operation unit determines the event type corresponding to the task instruction according to the task instruction and a preset event type table.

8. A task scheduling method for a sweeping robot comprises the following steps:

receiving a task instruction sent by a server;

according to the task instruction and a preset task scheduling logic, determining a task state corresponding to the task instruction, and scheduling a cleaning task according to the task state;

collecting state data of each sensor of the sweeping robot, creating a sweeping map, and determining the position of the sweeping robot in the sweeping map; receiving the task instruction, and planning to obtain cleaning data; driving the sweeping robot to complete the sweeping task according to the sweeping data;

and feeding back the state information of the sweeping robot to the server.

9. The method according to claim 8, wherein determining a task state corresponding to the task instruction according to the task instruction and a preset task scheduling logic specifically comprises:

determining an event type corresponding to the task instruction according to the task instruction and a preset event type table;

and determining a task state corresponding to the task instruction according to the event type and a preset task scheduling logic.

10. The method of claim 8, the task state comprising: any one of a sleep state, a standby state, a shutdown state, a purge state, a pause state, an abnormal state, a recharge state, an in-charge state, or a charge complete state.

11. The method according to any one of claims 8 to 10, wherein status data of each sensor of the sweeping robot is collected, a sweeping map is created, and the position of the sweeping robot in the sweeping map is determined; receiving the task instruction, and planning to obtain cleaning data; drive according to cleaning data the robot of sweeping the floor accomplishes clean the task specifically includes:

maintaining and reporting relevant information of system operation;

collecting and reporting state data of each sensor of the sweeping robot;

according to the state data of each sensor of the sweeping robot, a sweeping map is created, and the position of the sweeping robot in the sweeping map is determined;

receiving the task instruction, and planning to obtain cleaning data according to the state data of each sensor of the cleaning robot, the cleaning map and the position of the cleaning robot in the cleaning map;

and driving the sweeping robot to complete the sweeping task according to the sweeping data.

12. The method of claim 11, the method further comprising: determining a sweeping track of the sweeping robot;

the cleaning data includes: cleaning pattern and/or cleaning area.

13. The method of claim 9, the method further comprising:

acquiring monitoring data of the sweeping robot;

determining an event type corresponding to the monitoring data according to the monitoring data and a preset event type table;

determining a task state corresponding to the monitoring data according to an event type corresponding to the monitoring data and a preset task scheduling logic;

and executing the task state corresponding to the monitoring data.

14. The method according to claim 9, before determining an event type corresponding to the task instruction according to the task instruction and a preset event type table, the method further comprising:

and writing the task instruction into a cache and a fixed file.

15. A sweeping robot comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;

the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the task scheduling method for the sweeping robot in any one of claims 8-14.

16. A storage medium having stored therein at least one executable instruction for causing a processor to perform operations corresponding to the task scheduling method for a sweeping robot according to any one of claims 8-14.

Technical Field

The invention relates to the technical field of intelligent household appliances, in particular to a task scheduling method and device for a sweeping robot, the sweeping robot and a storage medium.

Background

With the continuous development of artificial intelligence technology, intelligent household appliances based on the artificial intelligence technology are gradually applied to daily life of people, such as a floor sweeping robot.

At present, the sweeping robot can face complex and changeable sweeping conditions in the actual sweeping process, for example, the sweeping process is suddenly powered off, or a sensor is in fault, and the like.

Furthermore, in order to control the sweeping robot to use corresponding task modes according to complex and variable sweeping conditions, the invention needs to provide a set of complete task scheduling method and device.

Disclosure of Invention

In view of the above problems, the present invention is proposed to provide a task scheduling method and apparatus for a sweeping robot, and a storage medium, which overcome the above problems or at least partially solve the above problems.

According to one aspect of the invention, a task scheduling method for a sweeping robot comprises the following steps:

receiving a task instruction sent by a server;

according to the task instruction and a preset task scheduling logic, determining a task state corresponding to the task instruction, and scheduling a cleaning task according to the task state;

collecting state data of each sensor of the sweeping robot, creating a sweeping map, and determining the position of the sweeping robot in the sweeping map; receiving the task instruction, and planning to obtain cleaning data; driving the sweeping robot to complete the sweeping task according to the sweeping data;

and feeding back the state information of the sweeping robot to the server.

According to another aspect of the present invention, there is provided a task scheduling apparatus for a sweeping robot, the apparatus including:

the system comprises an instruction receiving module, a state feedback module, a task scheduling module and a bottom firmware module;

the instruction receiving module is used for receiving a task instruction sent by the server;

the state feedback module is used for feeding back the state information of the sweeping robot to the server;

the task scheduling module is used for determining a task state corresponding to the task instruction according to the task instruction and a preset task scheduling logic and scheduling a cleaning task according to the task state;

the bottom firmware module is used for acquiring state data of each sensor of the sweeping robot, creating a sweeping map and determining the position of the sweeping robot in the sweeping map; receiving the task instruction, and planning to obtain cleaning data; and driving the sweeping robot to complete the sweeping task according to the sweeping data.

According to another aspect of the present invention, there is provided a sweeping robot comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;

the memory is configured to store at least one executable instruction that causes the processor to:

receiving a task instruction sent by a server;

according to the task instruction and a preset task scheduling logic, determining a task state corresponding to the task instruction, and scheduling a cleaning task according to the task state;

collecting state data of each sensor of the sweeping robot, creating a sweeping map, and determining the position of the sweeping robot in the sweeping map; receiving the task instruction, and planning to obtain cleaning data; driving the sweeping robot to complete the sweeping task according to the sweeping data;

and feeding back the state information of the sweeping robot to the server.

According to yet another aspect of the present invention, there is provided a storage medium having stored therein at least one executable instruction, the executable instruction causing a processor to:

receiving a task instruction sent by a server;

according to the task instruction and a preset task scheduling logic, determining a task state corresponding to the task instruction, and scheduling a cleaning task according to the task state;

collecting state data of each sensor of the sweeping robot, creating a sweeping map, and determining the position of the sweeping robot in the sweeping map; receiving the task instruction, and planning to obtain cleaning data; driving the sweeping robot to complete the sweeping task according to the sweeping data;

and feeding back the state information of the sweeping robot to the server.

According to the task scheduling method and device for the sweeping robot provided by the invention, the device comprises the following steps: the system comprises an instruction receiving module, a state feedback module, a task scheduling module and a bottom firmware module; the instruction receiving module is used for receiving a task instruction sent by the server; the state feedback module is used for feeding back the state information of the sweeping robot to the server; the task scheduling module is used for determining a task state corresponding to the task instruction according to the task instruction and a preset task scheduling logic and scheduling a cleaning task according to the task state; the bottom firmware module is used for acquiring state data of each sensor of the sweeping robot, creating a sweeping map and determining the position of the sweeping robot in the sweeping map; receiving the task instruction, and planning to obtain cleaning data; and driving the sweeping robot to complete the sweeping task according to the sweeping data. By using the device, the task scheduling module and the bottom firmware module run independently and separately, and the interfaces are also independent, so that the coupling of the task scheduling module and the bottom firmware module is greatly reduced, and the task scheduling and executing efficiency of the sweeping robot is improved.

The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.

Drawings

Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:

fig. 1 shows a flowchart of a task scheduling method for a sweeping robot according to an embodiment of the present invention;

figure 2 illustrates a system framework architecture diagram for task scheduling for a sweeping robot in accordance with one embodiment of the present invention;

fig. 3 shows a schematic diagram of a task scheduling device for a sweeping robot according to an embodiment of the present invention;

fig. 4 shows a schematic structural diagram of a sweeping robot according to an embodiment of the present invention.

Detailed Description

Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

Fig. 1 shows a flowchart of a task scheduling method for a sweeping robot according to an embodiment of the present invention. The method is used for scheduling the cleaning mode set by the sweeping robot. As shown in fig. 1, the method comprises the steps of:

s101: and receiving a task instruction sent by the server.

In practical application, the sweeping robot can face complex and variable sweeping conditions in an actual sweeping process, for example, the sweeping process is suddenly powered off, or a sensor fails, and in order to deal with different sweeping conditions, the sweeping robot with different types of task modes is usually developed for different sweeping conditions, so as to meet the requirements of users.

Therefore, in the embodiment of the present application, in order to control the sweeping robot to use a corresponding task mode according to a complex and variable sweeping situation, task scheduling is required.

Further, in the process of implementing task scheduling, the embodiment of the application first needs to receive a task instruction sent by the server.

It should be noted that, as shown in fig. 2, the whole system framework structure for task scheduling of the sweeping robot is that a client establishes a communication connection with a server, the server then establishes a communication connection with the sweeping robot, a user can select a corresponding task mode through the client, the client generates a task instruction according to the task mode selected by the user and sends the generated task instruction to the server, and the server sends the task instruction to the sweeping robot, where the task instruction carries the task mode.

It should be further noted that the received task instruction may be written into the cache, so that the task instruction may be efficiently read from the cache and executed, and in addition, the task instruction also needs to be written into the fixed file, so that the task instruction may be directly recovered from the fixed file when the data in the cache is lost, and the task instruction that becomes effective in time needs to become effective in time after being written into the cache and the fixed file.

S102: and determining a task state corresponding to the task instruction according to the task instruction and a preset task scheduling logic, and scheduling a cleaning task according to the task state.

Furthermore, after receiving a task instruction sent by a server, it is necessary to know what task the task instruction needs to execute, and therefore, a task state corresponding to the task instruction needs to be determined according to the task instruction and a preset task scheduling logic.

The embodiment of the application provides a method for determining a task state corresponding to a task instruction according to the task instruction and a preset task scheduling logic, which includes the following specific steps:

and determining an event type corresponding to the task instruction according to the task instruction and a preset event type table, and determining a task state corresponding to the task instruction according to the event type and a preset task scheduling logic.

It should be noted that the event type table includes specific events, such as a wake-up event, a start event, a pause event, a charging event, a full event, a movement error event, a main brush fault event, a dust box fault event, and the like, each task mode corresponds to a specific event, and if the task mode is the start mode, the event corresponding to the start mode is the start event. Task scheduling logic refers to rules for what task states (i.e., operations) are performed for the events that occur, one for each event type, e.g., a cleaning state is performed according to the task scheduling logic, assuming a start event has occurred.

In addition, the embodiment of the application provides several task states, which specifically include: a sleep state, a standby state, a shutdown state, a purge state, a pause state, an abnormal state, a recharge state, a charging state, or a charge complete state.

S103: collecting state data of each sensor of the sweeping robot, creating a sweeping map, and determining the position of the sweeping robot in the sweeping map; receiving the task instruction, and planning to obtain cleaning data; and driving the sweeping robot to complete the sweeping task according to the sweeping data.

In the embodiment of the present invention, in order to completely embody the implementation process of the present invention, it is assumed that the task state of the execution completion step S102 is a cleaning state, and subsequently, state data of each sensor of the sweeping robot needs to be collected, a cleaning map is created, and a position of the sweeping robot in the cleaning map is determined; receiving the task instruction, and planning to obtain cleaning data; and driving the sweeping robot to complete the sweeping task according to the sweeping data.

Further, the embodiment of the application provides a method for collecting state data of each sensor of the sweeping robot, creating a sweeping map, and determining the position of the sweeping robot in the sweeping map; receiving the task instruction, and planning to obtain cleaning data; the implementation mode that the sweeping robot is driven to complete the sweeping task according to the sweeping data is as follows:

maintaining and reporting relevant information of system operation, collecting and reporting state data of each sensor of the sweeping robot, creating a sweeping map according to the state data of each sensor of the sweeping robot, determining the position of the sweeping robot in the sweeping map, receiving the task instruction, planning to obtain sweeping data according to the state data of each sensor of the sweeping robot, the sweeping map and the position of the sweeping robot in the sweeping map, and driving the sweeping robot to complete the sweeping task according to the sweeping data.

It should be noted that the relevant information of the maintenance and reporting system operation may be time information, power information, serial number information, wireless network information, cleaning map information, key information, dust box information, cleaning status information, and the like.

In addition, the planned cleaning data comprises a cleaning mode and/or a cleaning area and a cleaning track of the sweeping robot.

In practical application, in addition to that a user changes a task state of the sweeping robot through a client, the sweeping robot can adjust the task state of the sweeping robot according to data of the sweeping robot, such as time information, electric quantity information, wireless network information, sweeping map information, key information, dust-proof box information, sweeping state information, main brushing information, side brushing information, wind motor information, sensor information and the like, specifically, obtain monitoring data of the sweeping robot, determine an event type corresponding to the monitoring data according to the monitoring data and a preset event type table, determine a task state corresponding to the monitoring data according to the event type corresponding to the monitoring data and a preset task scheduling logic, and execute the task state corresponding to the monitoring data.

S104: and feeding back the state information of the sweeping robot to the server.

In the embodiment of the application, the state information of the sweeping robot needs to be fed back to the server, and the server displays the state information to the user through the client.

Here, the state information includes: time information, power information, serial number information, wireless network information, cleaning map information, cleaning state information, and the like.

Based on the above, the method for task scheduling of a sweeping robot provided in the embodiment of the present application provides a device for task scheduling of a sweeping robot, and as shown in fig. 3, the device includes:

an instruction receiving module 301, a state feedback module 302, a task scheduling module 303 and a bottom firmware module 304;

the instruction receiving module 301 is configured to receive a task instruction sent by a server;

the state feedback module 302 is configured to feed back state information of the sweeping robot to the server;

the task scheduling module 303 is configured to determine a task state corresponding to the task instruction according to the task instruction and a preset task scheduling logic, and schedule a cleaning task according to the task state;

the bottom firmware module 304 is configured to collect status data of each sensor of the sweeping robot, create a sweeping map, and determine a position of the sweeping robot in the sweeping map; receiving the task instruction, and planning to obtain cleaning data; and driving the sweeping robot to complete the sweeping task according to the sweeping data.

It should be noted that the instruction receiving module 301, the state feedback module 302, the task scheduling module 303, and the bottom firmware module 304 operate independently, the instruction receiving module 301 and the state feedback module 302 establish a communication connection with the task scheduling module 303, and the task scheduling module 303 establishes a communication connection with the bottom firmware module 304.

The task scheduling module 303 includes:

a running unit 3031 and a task scheduling logic unit 3032;

the operation unit 3031 is configured to determine an event type corresponding to the task instruction according to the task instruction and a preset event type table, where the task instruction includes an event;

and the task scheduling logic unit 3032 is configured to determine a task state corresponding to the task instruction according to the event type and a preset task scheduling logic.

It should be noted that the execution unit 3031 and the task scheduling logic unit 3032 are located in the task scheduling module 303, the execution unit 3031 needs to determine what an event that a task instruction wants to execute is, that is, what an operation that the task instruction wants to execute is, after the execution unit 3031 determines an event type corresponding to the task instruction, the event type is transmitted to the task scheduling logic unit 3032, a preset task scheduling logic is stored in the task scheduling logic unit 3032, and a task state corresponding to the task instruction is determined according to the event type, where the task state includes: any one of a sleep state, a standby state, a shutdown state, a purge state, a pause state, an abnormal state, a recharge state, an in-charge state, or a charge complete state.

The running unit 3031 may receive not only the task instruction from the server received by the instruction receiving module 301, but also the task instruction transmitted from the floor of the robot cleaner. For example, the sweeping robot has many keys (such as a power-on key, a recharge key, a restart key, etc.) on the host, and a user can directly operate the keys of the host, and generate a corresponding task instruction based on the user operation of the sweeping robot, and the task instruction is also submitted to the operation unit for processing.

The underlying firmware module 304 includes: a system firmware unit 3041, a control firmware unit 3042, a planning firmware unit 3043, and a perception firmware unit 3044;

the system firmware unit 3041 is configured to maintain and report information related to system operation;

the control firmware unit 3042 is configured to collect and report status data of each sensor of the sweeping robot, acquire sweeping data, and drive the sweeping robot to complete the sweeping task according to the sweeping data;

the sensing firmware unit 3044 is configured to create a cleaning map according to the status data of each sensor of the cleaning robot, and determine the position of the cleaning robot in the cleaning map;

the planning firmware unit 3043 is configured to receive the task instruction, and plan to obtain cleaning data according to the status data of each sensor of the cleaning robot, the cleaning map, and the position of the cleaning robot in the cleaning map.

The perceptual firmware unit 3044 is further to: determining a sweeping track of the sweeping robot;

the cleaning data planned by the planning firmware unit 3043 includes: cleaning pattern and/or cleaning area.

The system firmware unit 3041 monitors relevant information of the system operation in real time, including but not limited to: the battery power, the wireless network information, the time information and the serial number information are monitored, and the monitored battery power, the monitored wireless network information, the monitored time information and the monitored serial number information are transmitted to the task scheduling module 303 and the state feedback module 302 through an uplink channel, and the state feedback module 302 can transmit the information to the client through the server so that the client can display relevant information of system operation to a user. In addition, optionally, the floor-sweeping robot supports a voice interaction function, and the system firmware unit 3041 may receive a user voice interaction instruction issued by the task scheduling module through the downlink channel, and submit the voice interaction instruction to the system for operation.

The control firmware unit 3042 is in communication connection with each sensor of the floor sweeping robot, and monitors the status data and the error information of each sensor in real time, and transmits the monitored status and error information of the sensor to the operation unit in the task scheduling module 303 through the uplink channel, and the operation unit can determine the task status according to the status data of each sensor. The control firmware unit 3042 also needs to receive a control instruction issued by the operation unit through the downlink channel, and control the corresponding hardware unit to execute respective actions according to the control instruction, such as controlling left and right wheel speeds, light interaction, fan action, rolling brush action, and the like.

The planning firmware unit 3043 receives a task instruction issued by an upper layer through a downlink channel, and performs a corresponding cleaning plan for the task instruction. And aiming at the fixed point cleaning instruction and/or the fixed area cleaning instruction, the planning firmware unit also receives a specified area issued by an upper layer. The planning firmware unit acquires the state data of each sensor transmitted by the control firmware unit, acquires the cleaning map transmitted by the sensing firmware unit and the position of the cleaning robot in the cleaning map, and plans to obtain cleaning data according to the data, wherein the cleaning data at least comprises a cleaning mode and/or a cleaning area, and the cleaning data also comprises error information under some abnormal conditions. The planning firmware unit 3043 uploads the planned cleaning data to the operation unit 3031 through an uplink channel, so that the operation unit issues a corresponding control instruction according to the cleaning data.

The sensing firmware unit 3044 obtains the status data of each sensor transmitted by the control firmware unit, creates a cleaning map according to the data, and determines the position of the cleaning robot in the cleaning map. Optionally, the sensing firmware unit further stores a cleaning track, a charging pile position and error information of the sweeping robot, and the sensing firmware unit uploads the cleaning map, the sweeping robot position, the cleaning track, the charging pile position and the error information to the operation unit 3031 through an uplink channel.

The operation unit 3031 is further configured to acquire various monitoring data of the sweeping robot uploaded by the bottom firmware module 304 through the uplink channel, where the monitoring data includes status data of each sensor, cleaning data obtained by planning, a cleaning map, a position of the sweeping robot, a cleaning track, a position of a charging pile, and various error information, and determine an event type corresponding to the monitoring data according to the monitoring data and a preset event type table. In addition, the operation unit carries out state self-checking, regularly detects the monitoring data of the sweeping robot, and comprises whether a user presses a key, whether the sweeping robot is held up, whether a sensor reports error information and the like.

The task scheduling logic unit 3032 is further configured to determine a task state corresponding to the monitoring data according to an event type corresponding to the monitoring data and a preset task scheduling logic.

The task scheduling module 303 further includes:

a read-write unit 3033, configured to write the task instruction into a cache and a fixed file before the operation unit 3031 determines, according to the task instruction and a preset event type table, an event type corresponding to the task instruction.

It should be noted that the received task instruction may be written into the cache, so that the task instruction may be efficiently read from the cache and executed, and in addition, the task instruction also needs to be written into the fixed file, so that the task instruction may be directly recovered from the fixed file when the data in the cache is lost, and the task instruction that becomes effective in time needs to become effective in time after being written into the cache and the fixed file.

In addition, the device is positioned inside the sweeping robot.

By using the device, the task scheduling module 303 and the bottom firmware module 304 run independently and separately, and the interfaces are also independent, so that the coupling between the task scheduling module and the bottom firmware module is greatly reduced, and the task scheduling and executing efficiency of the sweeping robot is improved.

The embodiment of the application also provides a nonvolatile computer storage medium, wherein the computer storage medium stores at least one executable instruction, and the computer executable instruction can execute the task scheduling method for the sweeping robot in any method embodiment.

Fig. 4 is a schematic structural diagram of a sweeping robot according to an embodiment of the present invention, and the specific implementation of the sweeping robot is not limited in the embodiment of the present invention.

As shown in fig. 4, the sweeping robot may include: a processor (processor)402, a Communications Interface 404, a memory 406, and a Communications bus 408.

Wherein:

the processor 402, communication interface 404, and memory 406 communicate with each other via a communication bus 408.

A communication interface 404 for communicating with network elements of other devices, such as clients or other servers.

The processor 402 is configured to execute the program 410, and may specifically execute relevant steps in the embodiment of the task scheduling method for the sweeping robot.

In particular, program 410 may include program code comprising computer operating instructions.

The processor 402 may be a central processing unit CPU, or an application specific Integrated circuit asic, or one or more Integrated circuits configured to implement an embodiment of the present invention. The sweeping robot comprises one or more processors which can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.

And a memory 406 for storing a program 410. Memory 406 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.

The program 410 may specifically be configured to cause the processor 402 to perform the following operations:

receiving a task instruction sent by a server;

according to the task instruction and a preset task scheduling logic, determining a task state corresponding to the task instruction, and scheduling a cleaning task according to the task state;

collecting state data of each sensor of the sweeping robot, creating a sweeping map, and determining the position of the sweeping robot in the sweeping map; receiving the task instruction, and planning to obtain cleaning data; driving the sweeping robot to complete the sweeping task according to the sweeping data;

and feeding back the state information of the sweeping robot to the server.

Optionally, the program 410 may also be for causing the processor 402 to:

determining an event type corresponding to the task instruction according to the task instruction and a preset event type table;

and determining a task state corresponding to the task instruction according to the event type and a preset task scheduling logic.

The task states include: any one of a sleep state, a standby state, a shutdown state, a purge state, a pause state, an abnormal state, a recharge state, an in-charge state, or a charge complete state.

Optionally, the program 410 may also be for causing the processor 402 to:

maintaining and reporting relevant information of system operation;

collecting and reporting state data of each sensor of the sweeping robot;

according to the state data of each sensor of the sweeping robot, a sweeping map is created, and the position of the sweeping robot in the sweeping map is determined;

receiving the task instruction, and planning to obtain cleaning data according to the state data of each sensor of the cleaning robot, the cleaning map and the position of the cleaning robot in the cleaning map;

and driving the sweeping robot to complete the sweeping task according to the sweeping data.

Optionally, the program 410 may also be for causing the processor 402 to:

determining a sweeping track of the sweeping robot;

the cleaning data includes: cleaning pattern and/or cleaning area.

Optionally, the program 410 may also be for causing the processor 402 to:

acquiring monitoring data of the sweeping robot;

determining an event type corresponding to the monitoring data according to the monitoring data and a preset event type table;

determining a task state corresponding to the monitoring data according to an event type corresponding to the monitoring data and a preset task scheduling logic;

and executing the task state corresponding to the monitoring data.

Optionally, the program 410 may also be for causing the processor 402 to:

and writing the task instruction into a cache and a fixed file.

The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.

In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.

Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.

Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.

Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.

The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of the task scheduling apparatus for a sweeping robot in accordance with embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.

It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种信息交互的控制方法及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!