Abnormality detection method of cleaning robot and electronic equipment

By distinguishing hard restart and soft restart in the cleaning robot, obtaining the cause of the failure, and automatically performing preset actions, the problem of low detection efficiency and accuracy of cleaning robots after crashes in the existing technology is solved, and more efficient abnormal detection and deal with.

CN119138804APending Publication Date: 2024-12-17HANGZHOU HUACHENG SOFTWARE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411096038.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

After the existing cleaning robots crash, they require user feedback to discover and solve abnormal problems, resulting in low detection efficiency and accuracy.

Method used

By introducing communication connections between the main control module and the microcontroller module in the cleaning robot, we distinguish between hard restart and soft restart, obtain the cause of the failure and automatically perform preset actions, reducing the duration of human intervention and abnormal states.

Benefits of technology

It improves the accuracy and efficiency of abnormal detection, reduces the duration of abnormal state of the cleaning robot, and reduces the need for users to intervene in processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119138804A_ABST
    Figure CN119138804A_ABST
Patent Text Reader

Abstract

The invention discloses an anomaly detection method of a cleaning robot and electronic equipment, the cleaning robot comprises a main control module and a single-chip microcomputer module which are in communication connection, and the anomaly detection method comprises the steps that after the main control module is restarted, the main control module judges whether hard restarting or soft restarting is carried out; if the response is hard restart, the main control module obtains a first target reason of hard restart of the single chip microcomputer module, and if the first target reason is a self fault reason, the main control module executes a preset action corresponding to the first target reason according to the first target reason; and responding to the soft restart, informing the single chip microcomputer module of the soft restart by the main control module, and executing a preset action corresponding to the abnormal crash of the process after the soft restart of the single chip microcomputer module is finished. According to the method and the device, whether the main control module is hard restarted or soft restarted is judged after the main control module is restarted, so that whether the main control module is abnormal or the single-chip microcomputer module is abnormal is distinguished, corresponding actions are adopted, and the accuracy of anomaly detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cleaning robots, and in particular to an abnormality detection method and electronic equipment of a cleaning robot. Background Art

[0002] Existing cleaning robots usually freeze during the cleaning process due to various reasons. Generally, after freezing, the cleaning robot will restart the device and stop in place. Active feedback from the user is required to discover and solve the abnormal problem of the cleaning robot. As a result, the efficiency and accuracy of this cleaning robot abnormality detection method that relies on user feedback is low. Summary of the invention

[0003] The main technical problem solved by the present application is to provide an abnormality detection method and electronic equipment for a cleaning robot, which can improve the efficiency of abnormality detection and the accuracy of abnormality detection.

[0004] In order to solve the above technical problems, the present application adopts a technical solution: providing an abnormality detection method of a cleaning robot, the cleaning robot comprising a main control module and a single-chip microcomputer module, the main control module and the single-chip microcomputer module are communicatively connected, and the method comprises:

[0005] After the main control module is restarted, the main control module determines whether it is a hard restart or a soft restart, wherein in response to the hard restart of the single-chip microcomputer module, the main control module performs a hard restart, and in response to an abnormal crash of any process on the main control module, the main control module performs a soft restart;

[0006] In response to a hard restart, the main control module obtains a first target reason for the hard restart of the single-chip computer module, and in response to the first target reason being a fault reason of the single-chip computer module, the main control module executes a preset action corresponding to the first target reason according to the first target reason;

[0007] In response to a soft restart, the main control module notifies the single-chip microcomputer module to soft restart, and after the single-chip microcomputer module is soft restarted, executes a preset action corresponding to the abnormal crash of the process.

[0008] In order to solve the above technical problems, the present application also provides a technical solution: a method for detecting anomalies of a cleaning robot, wherein the cleaning robot comprises a main control module and a single-chip microcomputer module, wherein the main control module and the single-chip microcomputer module are communicatively connected, and the method comprises:

[0009] After the single-chip microcomputer module hard restarts, the single-chip microcomputer module saves the first target reason for the hard restart;

[0010] The main control module is notified to perform a hard restart, so that after the hard restart, if the main control module detects that the first target cause of the hard restart of the single-chip microcomputer module is a fault of the main control module itself, a preset action corresponding to the first target cause is executed according to the first target cause.

[0011] To solve the above technical problems, the present application also provides a technical solution: an electronic device, comprising a processor and a memory, wherein the processor is coupled to the memory, wherein program data is stored in the memory, and the processor implements the steps in any one of the above methods by executing the program data in the memory.

[0012] To solve the above technical problems, the present application also provides a technical solution: a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program can be executed by a processor to implement the steps in any of the above methods.

[0013] Beneficial effect: After the main control module of the present application is restarted, it determines whether the main control module is hard restarted or soft restarted to distinguish whether the abnormality occurs in the main control module or in the single-chip computer module, thereby improving the accuracy of abnormality detection, and automatically executes preset actions on the main control module or the single-chip computer module to solve the abnormality after obtaining the corresponding cause of the fault itself. While reducing human intervention in handling abnormalities, it can also reduce the duration of the abnormal state of the cleaning robot, thereby improving the efficiency of abnormality detection. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0015] Figure 1 A flowchart of an abnormality detection method for a cleaning robot provided in an embodiment of the present application;

[0016] Figure 2 This is a structural block diagram of a cleaning robot in one embodiment of the present application;

[0017] Figure 3 A flowchart of an abnormality detection method for a cleaning robot provided in another embodiment of the present application;

[0018] Figure 4 For this application Figure 2 The structural block diagram of the single-chip microcomputer module;

[0019] Figure 5 For this application Figure 2The structural block diagram of the main control module;

[0020] Figure 6 A schematic diagram of a process flow of soft restarting a main control module provided in an embodiment of the present application;

[0021] Figure 7 A flowchart of an abnormality detection method for a cleaning robot provided in another embodiment of the present application;

[0022] Figure 8 A schematic diagram of a process flow of hard restarting a single-chip microcomputer module provided in an embodiment of the present application;

[0023] Fig. 9 This is a schematic diagram of the structure of an embodiment of an electronic device of the present application;

[0024] Fig.10 This is a schematic diagram of the structure of another embodiment of the electronic device of the present application;

[0025] Fig.11 This is a schematic diagram of the structure of another embodiment of the electronic device of the present application;

[0026] Fig.12 This is a schematic diagram of the structure of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0028] The terms "first", "second", "third" in this application are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first", "second", "third" can expressly or implicitly include at least one of the features. In the description of this application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In the embodiments of this application, all directional indications (such as up, down, left, right, front, back...) are only used to explain the relative position relationship, movement, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication also changes accordingly. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the steps or units listed, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices.

[0029] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0030] Please also read Figure 1 and Figure 2In one embodiment of the present application, a method for detecting an abnormality of a cleaning robot 10 is provided. The cleaning robot 10 includes a main control module 11 and a single-chip microcomputer module 12, and the main control module 11 and the single-chip microcomputer module 12 are communicatively connected. Among them, the main control module 11 serves as a decision-making layer, and is used to formulate a cleaning strategy for the cleaning robot 10 according to global information. The main control module 11 includes a SOC (System on Chip, an integrated circuit including a processor, a memory, and on-chip logic) main control unit 111, and the SOC main control unit 111 is mainly used to control an audio unit 112, a linear laser obstacle avoidance unit 113, a laser radar unit 114, and a DTOF (Direct Time-of-F l ight, direct time of flight) unit 115 in the main control module 11. The single-chip microcomputer module 12 serves as an execution layer, and is used to quickly respond to real-time changes of the cleaning robot 10. The single-chip microcomputer module 12 includes an MCU (Microcontroller Unit) unit 121, and the MCU unit 121 communicates with the SOC main control unit 111 through a UART (Universal Asynchronous Receiver / Transmitter) interface 120. The MCU unit 121 is mainly used to control the button unit 122, the roller brush unit 123, the side brush unit 124, the charging unit 125, the infrared recharging unit 126, the water pump unit 127 and the I MU (Inertial Measurement Unit) unit 128 in the single-chip microcomputer module 12.

[0031] Please continue reading Figure 1 and Figure 2 Specifically, the abnormality detection method of the cleaning robot includes:

[0032] S200: After the main control module 11 is restarted, the main control module 11 determines whether it is a hard restart or a soft restart. In response to a hard restart of the single-chip microcomputer module 12, the main control module 11 performs a hard restart, and in response to an abnormal crash of any process 119 on the main control module 11, the main control module 11 performs a soft restart.

[0033] Among them, the abnormality detection method of the present application is executed by the main control module 11.

[0034] Specifically, hard restart refers to powering on and off again, which usually occurs after the cleaning robot 10 encounters a hardware problem or a power outage. After the main control module 11 is hard restarted, all hardware and all software need to be reloaded. Soft restart is usually triggered when a specific process 119 or service is abnormal. The main control module 11 or the single-chip microcomputer module 12 soft restart does not need to completely shut down the power of the cleaning robot 10, but only restarts a certain process 119 or service with a problem, thereby reducing the overall downtime of the cleaning robot 10.

[0035] The single-chip microcomputer module 12 is responsible for the power control of the main control module 11, that is, when the single-chip microcomputer module 12 performs a hard restart, it also drives the main control module 11 to perform a synchronous hard restart. Therefore, in step S100, by distinguishing whether the main control module 11 is hard restarted or soft restarted, it can be further inferred whether the single-chip microcomputer module 12 or the main control module 11 has an abnormality, so that it is easier to locate the abnormality of the cleaning robot 10, thereby shortening the time of abnormality detection and improving detection efficiency.

[0036] If it is a hard restart, execute step S210, and if it is a soft restart, execute step S220.

[0037] S210: The main control module 11 obtains a first target reason for the hard restart of the single-chip computer module 12, and in response to the first target reason being a fault reason of the single-chip computer module 12, the main control module 11 executes a preset action corresponding to the first target reason according to the first target reason.

[0038] Specifically, the cause of the inherent fault refers to a fault in the single-chip microcomputer module 12 itself, including but not limited to a power failure or a hardware failure, both of which may cause a hard restart of the single-chip microcomputer module 12. At this time, the single-chip microcomputer module 12 is abnormally restarted.

[0039] Correspondingly, when the MCU module 12 itself has no faults but a hard restart occurs, it is generally caused by an external trigger that causes the MCU module 12 to hard restart, such as a user manually pressing a button to restart the MCU module 12. At this time, the first target cause is the external trigger cause, and the MCU module 12 restarts normally.

[0040] After the main control module 11 hard restarts, the main control module 11 obtains the first target reason for the hard restart of the single-chip computer module 12. When the first target reason is the fault reason itself, the main control module 11 executes the corresponding preset action according to the first target reason to solve the abnormality, thereby improving the efficiency of abnormality detection.

[0041] S220: The main control module 11 notifies the single-chip microcomputer module 12 to soft-restart, and after the single-chip microcomputer module 12 is soft-restarted, executes a preset action corresponding to the abnormal crash of the process 119 .

[0042] Specifically, when it is detected that the main control module 11 is soft-restarted, it is determined that any process 119 on the main control module 11 has crashed abnormally, and at this time, the main control module 11 obtains the second target reason for the abnormality of any process 119. At the same time, the main control module 11 notifies the single-chip computer module 12 to also perform a soft restart, so that the status of the main control module 11 and the single-chip computer module 12 are synchronized, the frequency of abnormality is reduced, and the product reliability of the cleaning robot 10 is improved. And the main control module 11 executes the corresponding preset action according to the second target reason to solve the abnormality, further improving the efficiency of abnormality detection.

[0043] In the above-mentioned abnormality detection method of the cleaning robot, after the main control module 11 is restarted, the main control module 11 is judged as a hard restart or a soft restart to distinguish whether the abnormality occurs in the main control module 11 or the single-chip computer module 12, thereby improving the accuracy of abnormality detection, and after obtaining the corresponding cause of the fault itself, the main control module 11 or the single-chip computer module 12 is automatically executed. Preset actions are performed to solve the abnormality. While reducing the user's manual intervention in handling abnormalities, it can also reduce the duration of the abnormal state of the cleaning robot 10, thereby improving the efficiency of abnormality detection.

[0044] Please also read Figure 1 , Figure 3 and Figure 4 In one embodiment, step S210 includes:

[0045] S211: The main control module 11 reads the restart reason corresponding to the hard restart stored in the second memory unit 129, and uses the read restart reason as the first target reason.

[0046] Among them, the second memory unit 129 exists in the single-chip computer module 12, and after the single-chip computer module 12 is triggered by a key and hard restarts, the hard restart reason is saved in the second memory unit 129 as an external trigger reason. After the single-chip computer module 12 is hard restarted due to an abnormal crash of a hardware failure (such as the watchdog 130), the hard restart reason is saved in the second memory unit 129 as the self-failure reason. By setting the second memory unit 129, the restart reason of the hard restart of the single-chip computer module 12 can be retained, so that the main control module 11 can actively read the restart reason saved in the second memory unit 129 after the hard restart, that is, the first target reason.

[0047] It is understandable that, in other embodiments, after the main control module 11 is hard restarted, the single-chip microcomputer module 12 may actively send the restart reason, that is, the first target reason, to the main control module 11 .

[0048] Specifically, the situations of hard restart of the microcontroller mainly include the following: external trigger (such as user manually pressing a button) restarts the cleaning robot 10, at this time the cleaning robot 10 restarts normally; or there is a power failure or hardware failure in the microcontroller module 12, at this time the cleaning robot 10 restarts abnormally.

[0049] In this embodiment, the hardware failure of the single-chip microcomputer module 12 is mainly due to abnormal hardware (such as the watchdog 130) crash, wherein the program running in the single-chip microcomputer module 12 will feed the watchdog regularly to inform the hardware watchdog 130 that it is in normal operation. When a program in the single-chip microcomputer module 12 unexpectedly terminates or the program runs beyond the expected time, that is, after the watchdog cannot be fed normally, the watchdog 130 will trigger a reset signal and restart the single-chip microcomputer module 12, so that the single-chip microcomputer module 12 returns to normal. Therefore, the main control module 11 can execute the preset action corresponding to the cause of its own failure after obtaining the cause of its own failure in the second memory unit 129.

[0050] S212: Determine whether the first target cause is a self-failure cause or an external trigger cause.

[0051] Among them, by judging whether the first target cause is the cause of its own failure or the cause of external triggering, it is possible to distinguish whether the hard restart of the single-chip microcomputer module 12 is due to an external triggering cause (such as a user manually pressing a button) resulting in a normal restart, or an abnormal restart due to its own failure (such as a hardware failure), thereby further accurately locating the cause of the hard restart of the single-chip microcomputer module 12 and improving the accuracy and efficiency of abnormal detection.

[0052] If the first target reason is an external trigger reason, the main control module does not perform any processing and ends the process. If the first target reason is a self-fault reason, step S213 is executed.

[0053] Specifically, after the main control module 11 reads that the first target reason is an external trigger reason, it is concluded that no abnormality is found in the single-chip computer module 12. It may be that the user manually presses a button to cause the main control module 11 and the single-chip computer module 12 to perform a hard restart. At this time, the main control module 11 can directly end the abnormality detection process and allow the cleaning robot 10 to continue to work normally.

[0054] S213: The main control module 11 executes a preset action corresponding to the first target reason according to the first target reason.

[0055] Specifically, when the first target reason is determined to be the cause of the self-failure, it can be determined that the hardware in the single-chip microcomputer module 12 fails, resulting in a hard restart of the single-chip microcomputer module 12. At this time, the main control module 11 executes an action to handle the exception according to the failed hardware, so that the abnormal problem is handled in time, thereby reducing the risk of the cleaning robot 10 not being able to work normally due to the abnormality.

[0056] Please also read Figure 1 , Figure 3 and Figure 5 In one embodiment, step S220 includes:

[0057] S221 : The main control module 11 reads the restart reason corresponding to the soft restart stored in the first memory unit 116 , where the first memory unit 116 exists in the main control module 11 .

[0058] Specifically, when it is detected that the main control module 11 is soft restarted, that is, it is determined that any process 119 on the main control module 11 has an abnormal crash, and at this time, the main control module 11 obtains the second target reason for the abnormal crash of any process 119. The second target reason is retained in the first memory unit 116. By setting the first memory unit 116, the restart reason of the soft restart of the main control module 11 can be retained, so that the main control module 11 actively reads the restart reason saved in the first memory unit 116 after the soft restart, that is, the second target reason, to know which process 119 has an abnormality, thereby improving the efficiency of abnormality detection and the accuracy of the abnormality detection process.

[0059] S222: Determine whether the restart reason read is caused by the internal fault or by an external trigger.

[0060] Specifically, by judging whether the read restart reason, that is, the second target reason is the reason of its own failure or the external trigger reason, it is possible to distinguish whether the soft restart of the main control module 11 is caused by the abnormal crash of a certain process 119 being triggered, resulting in the soft restart of the main control module 11, or the soft restart of the main control module 11 due to a certain process 119 being misjudged as abnormal, thereby further accurately locating the reason for the soft restart of the main control module 11 and improving the accuracy and efficiency of abnormality detection.

[0061] If it is caused by its own fault, step S223 is executed; if it is caused by an external trigger, the main control module 11 does not perform any processing and ends the process.

[0062] After the main control module 11 reads the restart reason in the first memory unit 116, it is concluded that no process 119 in the main control module 11 finds an abnormality. At this time, the main control module 11 can directly end the abnormality detection process to allow the cleaning robot 10 to continue to work normally.

[0063] S223: The main control module 11 notifies the single-chip microcomputer module 12 to soft-restart.

[0064] Among them, after each soft restart, the main control module 11 saves the restart reason corresponding to the soft restart in the first memory unit 116, and after the main control module 11 is soft restarted, the content saved in the first memory unit 116 does not change. After the main control module 11 is soft restarted, the restart reason is retained in the first memory unit 116 as the second target reason to ensure that the record of the restart reason will not be overwritten, which is convenient for subsequent abnormal detection actions. At the same time, saving the restart reason can assist the main control module 11 to quickly locate the cause of the soft restart, thereby finding and solving the problem of the soft restart more quickly, and further improving the efficiency and accuracy of detecting abnormalities.

[0065] In one embodiment, the first memory unit 116 exists in the main control module 11, and when a process 119 in the main control module 11 crashes abnormally and is triggered, causing the main control module 11 to softly restart, the soft restart reason is saved as the self-fault reason in the first memory unit 116. Conversely, when a process 119 is misjudged abnormal and causes the main control module 11 to softly restart, the soft restart reason is saved as the external trigger reason in the first memory unit 116. Therefore, the main control module 11 can execute a preset action corresponding to the restart reason after obtaining the restart reason in the first memory unit 116.

[0066] S224: Determine whether the single-chip microcomputer module 12 has completed the soft restart.

[0067] It is necessary to confirm whether the single-chip microcomputer module 12 has completed the soft restart, so that the states of the single-chip microcomputer module 12 and the main control module 11 are synchronized, so as to reduce the frequency of abnormal occurrence.

[0068] If the single-chip microcomputer module 12 has completed the soft restart, step S225 is executed, otherwise step S224 is continuously executed, that is, it is always determined whether the single-chip microcomputer module 12 has completed the soft restart to ensure that the single-chip microcomputer module 12 has completed the soft restart, so that the status of the single-chip microcomputer module 12 and the main control module 11 are synchronized.

[0069] S225: Execute a preset action corresponding to the abnormal crash of process 119.

[0070] Specifically, when it is determined that the restart reason is due to its own fault, it can be determined that the process 119 in the main control module 11 is abnormal, resulting in a soft restart of the main control module 11. At this time, the main control module 11 executes an action to handle the abnormality according to the abnormal process 119, so that the abnormal problem is handled in time, thereby reducing the risk of the cleaning robot 10 not being able to work normally due to the abnormality.

[0071] See also Figure 5In one embodiment, the main control module 11 further includes a process management unit 117 and a communication driving unit 118. Any process 119 on the main control module 11 (for example, the first process 1191, the second process 1192...) is registered with the process management unit 117 through the communication driving unit 118. When any process 119 on the main control module 11 crashes abnormally, the communication driving unit 118 notifies the process management unit 117 to write the reason for the abnormal crash of the process 119 in the first memory unit 116, and then the main control module 11 performs a soft restart. The process management unit 117 is responsible for detecting and managing the status of all processes 119 on the main control module 11 to ensure that each process 119 can operate normally. When any process 119 crashes abnormally, the communication drive unit 118 can detect this situation and notify the process management unit 117 so that the process management unit 117 can take immediate measures, such as writing the cause of the failure in the first memory unit 116 and triggering the main control module 11 to perform a soft restart to restore the normal operation of the system as soon as possible, effectively improving the stability and reliability of the system, and reducing the maintenance cost of the cleaning robot 10 and the interruption time when an abnormality occurs.

[0072] Please also read Figure 5 and Figure 6 In one embodiment, the working process of the main control module 11 includes:

[0073] S300: Initialize the process management unit 117, the communication driving unit 118 and the first memory unit 116, and set the restart reason of the first memory unit 116 to normal restart.

[0074] The process management unit 117 , the communication driving unit 118 and the first memory unit 116 are initialized to reduce the risk of misjudgment in the subsequent abnormality detection process of the main control module 11 , thereby improving the accuracy of the abnormality detection of the main control module 11 .

[0075] S310 : Register multiple processes 119 to the process management unit 117 through the communication driving unit 118 .

[0076] Multiple processes 119 are registered to the process management unit 117 through the communication driving unit 118, so that when a process 119 crashes abnormally, the abnormal situation can be fed back to the process management unit 117 through the communication driving unit 118.

[0077] S320: Determine whether the communication driving unit 118 triggers an exception.

[0078] When an exception occurs in the communication driving unit 118, that is, a certain process 119 crashes abnormally, feedback can be given to the process management unit 117 in a timely manner, thereby improving the efficiency of abnormality detection.

[0079] If it is determined that the communication driver unit 118 triggers an exception, step S330 is executed, otherwise, step S320 is continuously executed, that is, it is continuously determined whether the communication driver unit triggers an exception, and step S330 is executed only when the communication driver unit 118 triggers an exception. The above can enable the communication driver unit 118 to monitor the operation status of multiple processes 119 in real time, and after monitoring that a process 119 has an abnormal crash, timely feedback is given to the process management unit 117.

[0080] S330: The communication driving unit 118 notifies the process management unit 117 to write the reason why the process 119 crashed abnormally into the first memory unit 116.

[0081] The process management unit 117 writes its own fault cause to the first memory unit 116 according to the exception feedback from the communication driving unit 118 to ensure that the record of the restart cause will not be overwritten, so as to facilitate the subsequent abnormality detection action of the main control module 11.

[0082] S340: The main control module 11 performs a soft restart.

[0083] After a process 119 crashes abnormally, the main control module 11 can minimize the interruption of the user's use of the cleaning robot 10 by quickly responding to the abnormal process 119 and performing a soft restart, thereby improving the user experience.

[0084] See also Figure 4 and Figure 7 , Figure 7 Another embodiment of the present application provides a cleaning robot abnormality detection method. Different from the above embodiment, the method is executed by the single chip microcomputer module 12. The method includes:

[0085] S400: After the single-chip microcomputer module 12 hard reboots, the single-chip microcomputer module 12 saves the first target reason of the hard reboot.

[0086] The situations in which the single-chip microcomputer module 12 hard restarts mainly include the following: external triggers (such as manual key presses by the user) restart the cleaning robot 10, in which case the cleaning robot 10 restarts normally; or power failure or hardware failure in the single-chip microcomputer module 12, in which case the cleaning robot 10 restarts abnormally. Whether it is a normal restart or an abnormal restart, it is directly saved in the single-chip microcomputer module 12 as the first target reason.

[0087] In one embodiment, the single-chip microcomputer module 12 is provided with a second memory unit 129. After the single-chip microcomputer module 12 hard restarts, the single-chip microcomputer module 12 can save the first target reason of the hard restart in the second memory unit 129, so that the main control module 11 can directly read the first target reason through the second memory unit 129.

[0088] S410: Notify the main control module 11 to perform a hard reboot, so that after the hard reboot, if the main control module 11 detects that the first target cause of the hard reboot of the single-chip computer module 12 is a fault of the single-chip computer module 12 itself, the main control module 11 executes a preset action corresponding to the first target cause.

[0089] Specifically, after the single-chip microcomputer module 12 performs a hard restart, it also notifies the main control module 11 to perform a hard restart. After the hard restart, the main control module 11 will read the first target reason. If the first target reason read is the cause of its own failure, the main control module 11 will execute the preset action corresponding to the first target. If the first target reason read is an external trigger reason, it is concluded that no abnormality is found in the single-chip microcomputer module 12. It may be that the user manually presses a button to make the single-chip microcomputer module 12 perform a hard restart. At this time, the main control module 11 can directly end the abnormality detection process and allow the cleaning robot 10 to continue to work normally.

[0090] In one embodiment, step S400 includes:

[0091] S401 : After the single-chip microcomputer is hard-restarted, the single-chip microcomputer module 12 saves the hard-restart reason in the second memory unit 129 .

[0092] Among them, the second memory unit 129 exists in the single-chip computer module 12, and after the single-chip computer module 12 is hard restarted due to external triggering (such as manual key pressing by the user), the hard restart reason is saved in the second memory unit 129 as the external trigger reason, and after the single-chip computer module 12 is hard restarted due to abnormal hardware (such as the watchdog 130) The reason for the hard restart is saved in the second memory unit 129 as the reason for its own failure. By setting the second memory unit 129, the restart reason of the hard restart of the single-chip computer module 12 can be retained, so that the main control module 11 can actively read the restart reason saved in the second memory unit 129 after the hard restart, that is, the first target reason.

[0093] It is understandable that, in other embodiments, after the main control module 11 is hard restarted, the single-chip microcomputer module 12 may actively send the restart reason, that is, the first target reason, to the main control module 11 .

[0094] Please also read Figure 4 and Figure 8 In one embodiment, the process of the single chip microcomputer module 12 includes:

[0095] S500: After the single-chip microcomputer module 12 is hard-restarted, it is determined whether the restart is triggered by an external factor.

[0096] The situations where the MCU module 12 hard restarts include externally triggered restarts (such as a manual button pressed by a user) or hardware (such as a watchdog 130) abnormalities. Therefore, by distinguishing whether the restart is triggered by an external source to determine whether the MCU module 12 is restarted normally or abnormally, the abnormal direction of the MCU module 12 can be located, thereby improving the efficiency of abnormality detection.

[0097] If it is a hard restart, step S510 and step S520 are executed in sequence. If the restart is not triggered by an external factor, step S530 is executed.

[0098] S510: The restart reason is saved in the second memory unit 129 as a normal restart.

[0099] Generally, a restart triggered by external factors is usually caused by the user manually pressing a button to restart, so it is a normal restart.

[0100] S520: Notify the main control module 11 to perform a hard reboot.

[0101] When the single-chip microcomputer module 12 is hard-restarted, the main control module 11 is controlled to also be hard-restarted, so as to synchronize the hard-restart states of the main control module 11 and the single-chip microcomputer module 12 .

[0102] S530: Determine whether the hardware restarts abnormally.

[0103] When it is determined that the restart is not triggered by the outside, it is checked whether the single-chip microcomputer module 12 hard restart is caused by an abnormality in the hardware (such as the watchdog 130), so as to further refine the cause of the single-chip microcomputer module 12 hard restart.

[0104] If the judgment result is yes, then execute step S540 and step S520 in sequence; otherwise, return to execute step S500.

[0105] S540: Save the restart reason as abnormal restart in the second memory unit 129.

[0106] When it is confirmed that the hardware (such as the watchdog 130) is abnormal, the reason for the hard restart of the single-chip microcomputer module 12 is an abnormal restart, and the reason for the abnormal restart is saved in the second memory unit 129 so that the main control module 11 after the hard restart can read its own fault reason.

[0107] After confirming that no hardware abnormality occurs, returning to step S500 allows the MCU module 12 to detect again whether the hard restart of the MCU module 12 is caused by an external trigger or a hardware abnormality, thereby further improving the accuracy of abnormality detection.

[0108] See also Fig. 9 , Fig. 96 is a schematic diagram of the structure of an embodiment of an electronic device of the present application. The electronic device 600 includes a processor 610, a memory 620 and a communication circuit 630, the processor is coupled to the memory 620 and the communication circuit 630 respectively, the memory 620 stores program data, and the processor 610 implements the steps in any of the above implementation methods by executing the program data in the memory 620, wherein the detailed steps can be referred to the above implementation, and will not be repeated here.

[0109] The electronic device 600 may be any device with algorithm processing capability, such as a computer or a mobile phone, and is not limited here.

[0110] Please also read Figure 4 , Figure 5 and Fig.10 ,in Fig.10 1 is a schematic diagram of the structure of an embodiment of the main control module 11 of the present application. The main control module 11 comprises a judgment unit 710, an acquisition unit 720 and an execution unit 730 connected in sequence.

[0111] The judgment unit 710 is used to judge whether it is a hard restart or a soft restart after the main control module 11 is restarted. In response to the hard restart of the single-chip microcomputer module 12, the main control module 11 performs a hard restart, and in response to an abnormal crash of any process 119 on the main control module 11, the main control module 11 performs a soft restart.

[0112] The acquisition unit 720 is used to obtain the first target reason for the hard restart of the single-chip microcomputer module 12 in response to a hard restart, and in response to the first target reason being the fault reason itself, the main control module 11 executes a preset action corresponding to the first target reason according to the first target reason.

[0113] The execution unit 730 is used to notify the single-chip microcomputer module 12 to softly restart in response to a soft restart, and execute a preset action corresponding to the abnormal crash of the process 119 after the single-chip microcomputer module 12 has softly restarted.

[0114] Among them, the main control module 11 implements the method steps executed by the main control module 11 in any of the above-mentioned implementation modes when working. The detailed steps can be found in the above-mentioned implementation modes and will not be repeated here.

[0115] Please also read Figure 4 , Figure 5 and Fig.11 ,in Fig.11 1 is a schematic diagram of the structure of an embodiment of the single chip microcomputer module 12 of the present application. The single chip microcomputer module 12 includes a storage unit 810 and a notification unit 820 connected in sequence.

[0116] The saving unit 810 is used to enable the single-chip microcomputer module 12 to save the first target reason of the hard reboot after the single-chip microcomputer module 12 hard reboots.

[0117] The notification unit 820 is used to notify the main control module 11 to perform a hard reboot, so that after the hard reboot, if the main control module 11 detects that the first target cause of the hard reboot of the single-chip microcomputer module 12 is a fault of itself, the preset action corresponding to the first target cause is executed according to the first target cause.

[0118] See also Fig.12 , Fig.12 The computer-readable storage medium 900 stores a computer program 910, which can be executed by a processor to implement the steps in any of the above methods.

[0119] Among them, the computer-readable storage medium 900 can specifically be a device that can store the computer program 910, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or it can also be a server that stores the computer program 910. The server can send the stored computer program 910 to other devices for execution, or it can also execute the stored computer program 910 by itself.

[0120] The above are only implementation methods of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A cleaning robot anomaly detection method, characterized in that: The cleaning robot comprises a main control module and a single-chip microcomputer module, the main control module and the single-chip microcomputer module are in communication connection, and the method comprises: After the main control module is restarted, the main control module determines whether it is a hard restart or a soft restart, wherein in response to the hard restart of the single-chip microcomputer module, the main control module performs a hard restart, and in response to an abnormal crash of any process on the main control module, the main control module performs a soft restart; In response to a hard restart, the main control module obtains a first target reason for the hard restart of the single-chip computer module, and in response to the first target reason being a fault reason of the single-chip computer module, the main control module executes a preset action corresponding to the first target reason according to the first target reason; In response to a soft restart, the main control module notifies the single-chip microcomputer module to soft restart, and after the single-chip microcomputer module is soft restarted, executes a preset action corresponding to the abnormal crash of the process.

2. The detection method according to claim 1, characterized in that: The response is a soft restart, and the main control module notifies the single-chip microcomputer module to soft restart, including: In response to a soft restart, the main control module reads a restart reason corresponding to the soft restart stored in a first memory unit, wherein the first memory unit exists in the main control module; In response to the read restart reason being the self-fault reason, the main control module notifies the single-chip microcomputer module to soft-restart; Wherein, each time after the soft restart of the main control module, the restart reason corresponding to the soft restart is saved in the first memory unit, and after the soft restart of the main control module, the content saved in the first memory unit does not change.

3. The method according to claim 2, characterized in that The method further comprises: In response to the read restart reason being an external trigger reason, the main control module does not perform any processing.

4. The method according to claim 2, characterized in that: The main control module further includes a process management unit and a communication driving unit. Any process on the main control module is registered with the process management unit through the communication driving unit. When any process on the main control module crashes abnormally, the communication driving unit notifies the process management unit to write the reason for the abnormal crash of the process in the first memory unit, and then the main control module performs a soft restart.

5. The method according to claim 1, characterized in that The method further comprises: In response to the first target reason being an external trigger reason, the main control module does not perform any processing.

6. The method according to claim 1, characterized in that The response is a hard restart, and the step in which the main control module obtains the first target reason for the restart of the single-chip computer module includes: In response to a hard restart, the main control module reads a restart reason corresponding to the hard restart stored in the second memory unit, and uses the read restart reason as the first target reason; Among them, the second memory unit exists in the single-chip microcomputer module, and after the single-chip microcomputer module is hard restarted due to a key being triggered, the hard restart reason is saved in the second memory unit as an external trigger reason, and after the single-chip microcomputer module is hard restarted due to a hardware abnormality, the hard restart reason is saved in the second memory unit as an internal fault reason.

7. A cleaning robot anomaly detection method, characterized in that: The cleaning robot comprises a main control module and a single-chip microcomputer module, the main control module and the single-chip microcomputer module are in communication connection, and the method comprises: After the single-chip microcomputer module hard restarts, the single-chip microcomputer module saves the first target reason for the hard restart; The main control module is notified to perform a hard restart, so that after the hard restart, if the main control module detects that the first target cause of the hard restart of the single-chip microcomputer module is a fault of the main control module itself, a preset action corresponding to the first target cause is executed according to the first target cause.

8. The method according to claim 7, characterized in that After the single-chip microcomputer module hard restarts, the step of the single-chip microcomputer module saving the first target reason for the hard restart comprises: After the single-chip microcomputer module hard restarts, the single-chip microcomputer module saves the hard restart reason in the second memory unit; Among them, the second memory unit exists in the single-chip microcomputer module, and after the single-chip microcomputer module is hard restarted due to a key being triggered, the hard restart reason is saved in the second memory unit as an external trigger reason, and after the single-chip microcomputer module is hard restarted due to a hardware abnormality, the hard restart reason is saved in the second memory unit as an internal fault reason.

9. An electronic device, characterized in that: The electronic device includes a processor and a memory, the processor is coupled to the memory, program data is stored in the memory, and the processor implements the steps in the method according to any one of claims 1 to 8 by executing the program data in the memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program can be executed by a processor to implement the steps in the method according to any one of claims 1 to 8.