Software updating method and device, robot, base station and storage medium

Software updates are carried out through infrared communication methods, and the robot base station does not need to install wireless network communication modules, which solves the problem of high cost and reliability dependence on wireless networks in traditional methods, and achieves reliable and economical software update effects.

CN120104167APending Publication Date: 2025-06-06ANKER INNOVATIONS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311653653.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-04
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

Traditional robot base stations download firmware data through wireless network communication modules for software updates. The cost is high and the reliability depends on the wireless network. If the wireless network is not used, the reliability of software updates is difficult to guarantee.

Method used

The software update is performed using infrared communication method. The robot sends infrared communication data and the first data synchronization packet to the robot base station by obtaining the data segment sequence of the target software. The robot base station updates the first data synchronization packet based on the integrity information of the received data segment sequence, generates a second data synchronization packet, and feeds it back to the robot. The robot controls the robot base station to perform software updates based on the second data synchronization packet.

Benefits of technology

It realizes that the robot base station can perform reliable software updates without installing the wireless network communication module, reducing the cost of software updates and improving the reliability of the update process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120104167A_ABST
    Figure CN120104167A_ABST
Patent Text Reader

Abstract

The invention relates to a software updating method and device, a robot, a robot base station and a computer readable storage medium. The method comprises the steps that a data segment sequence of target software is obtained to serve as infrared communication data, the data segment sequence is obtained by splitting all data packages, and all the data packages are obtained by splitting firmware data of the target software; executing a data sending step: sending infrared communication data and a first data synchronization packet to the robot base station; and controlling the robot base station to update the target software according to a second data synchronization packet fed back by the robot base station based on the first data synchronization packet. By adopting the method, the reliability of software updating of the robot base station can be ensured, and the cost of software updating of the robot base station can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a software updating method, device, robot, robot base station and computer-readable storage medium. Background Art

[0002] With the development of computer technology, software update technology has emerged. Using the software update technology, a terminal can download firmware data of the software to be updated and use the firmware data to update the software.

[0003] In traditional technology, a robot base station is usually installed with a wireless network communication module, such as a WiFi module, etc. The wireless network communication module can be used to directly download firmware data from the cloud, and the robot base station can further use the firmware data to perform software updates.

[0004] However, on the one hand, wireless network communication modules are relatively expensive. If the robot base station is installed with a wireless network communication module only for software updates, this will greatly increase the software update cost of the robot base station. On the other hand, since wireless network communication is relatively stable and reliable, it is more reliable to use wireless network communication to update software. If software updates are not performed using wireless network communication, the reliability of software updates is difficult to guarantee. Summary of the invention

[0005] Based on this, it is necessary to provide a software update method, device, robot, robot base station and computer-readable storage medium that can balance ensuring the reliability of software updates of the robot base station and reducing the cost of software updates of the robot base station in response to the above technical problems.

[0006] In a first aspect, the present application provides a software update method. Applied to a robot, the robot and a robot base station communicate via infrared communication, the method comprising:

[0007] Acquire a data segment sequence of the target software as infrared communication data, wherein the data segment sequence is obtained by splitting each data packet, and each data packet is obtained by splitting firmware data of the target software;

[0008] Execute a data sending step: send infrared communication data and a first data synchronization packet to the robot base station, wherein the robot base station is used to update the first data synchronization packet according to the integrity information of the received data segment sequence to generate a second data synchronization packet;

[0009] According to the second data synchronization packet fed back by the robot base station, the robot base station is controlled to update the target software.

[0010] In one of the embodiments, controlling the robot base station to update the target software according to the second data synchronization packet fed back by the robot base station includes:

[0011] According to the second data synchronization packet fed back by the robot base station, it is detected whether the data segment sequence received by the robot base station is synchronized with the firmware data; if synchronized, a software update start instruction is sent to the robot base station, wherein the software update start instruction is used to instruct the robot base station to update the target software according to the received data segment sequence.

[0012] In one embodiment, the detecting, according to the second data synchronization packet fed back by the robot base station, whether the data segment sequence received by the robot base station is synchronized with the firmware data comprises:

[0013] According to the second data synchronization package fed back by the robot base station, the first data synchronization package is updated; according to the data segment identifiers in the updated first data synchronization package, it is detected whether the data segment sequence received by the robot base station is synchronized with the firmware data.

[0014] In one of the embodiments, after detecting whether the data segment sequence received by the robot base station is synchronized with the firmware data according to the second data synchronization packet fed back by the robot base station, the method further includes:

[0015] If not synchronized, detect whether the data segments in the data segment sequence need to be retransmitted; if the data segments in the data segment sequence need to be retransmitted, select the target data segments that need to be retransmitted in the data segment sequence according to the data segment identifiers in the updated first data synchronization package; use the data segment sequence composed of the target data segments as new infrared communication data, and return to execute the data sending step.

[0016] In one embodiment, the software update method further includes:

[0017] In response to a task execution instruction, the robot is controlled to detach from the robot base station to perform a corresponding work task, wherein infrared communication of the data segment sequence of the target software is interrupted after the robot detaches from the robot base station; if it is detected that the robot reconnects to the robot base station, the robot is controlled to continue transmitting the data segment sequence of the target software.

[0018] In one embodiment, if it is detected that the robot reconnects to the robot base station, controlling the robot to continue transmitting the data segment sequence of the target software includes:

[0019] Send a breakpoint resume instruction to the robot base station, wherein the breakpoint resume instruction is used to instruct the robot base station to feedback a second data synchronization package; update the first data synchronization package according to the second data synchronization package fed back by the robot base station; select a resume data segment sequence from the data segment sequence according to the updated first data synchronization packet; use the resume data segment sequence as new infrared communication data, and return to execute the data sending step.

[0020] In one of the embodiments, determining the resumed transmission data segment sequence in the data segment sequence according to the updated first data synchronization packet includes:

[0021] According to the data segment identifiers and data packet identifiers in the updated first data synchronization package, the breakpoint resume sequence position is located in the data segment sequence; according to the breakpoint resume sequence position, the resume data segment sequence is intercepted in the data segment sequence; the resume data segment sequence is used as new infrared communication data, and the data sending step is returned to be executed.

[0022] In one of the embodiments, after controlling the robot base station to update the target software according to the second data synchronization packet fed back by the robot base station, the method further includes:

[0023] If the feedback information sent by the robot base station is received within the preset time period, it is determined that the target software is updated successfully; if the feedback information sent by the robot base station is not received within the preset time period, it is determined that the target software is updated unsuccessfully.

[0024] In a second aspect, the present application provides a software update method. Applied to a robot base station, the robot base station and the robot communicate via infrared communication, the method comprising:

[0025] Receiving infrared communication data and a first data synchronization packet sent by the robot, wherein the infrared communication data is a sequence of data segments obtained by splitting each data packet, and each data packet is obtained by splitting the firmware of the target software;

[0026] updating the first data synchronization packet according to the integrity information of the received data segment sequence to generate a second data synchronization packet;

[0027] The generated second data synchronization package is fed back to the robot, wherein the robot is used to control the robot base station to update the target software according to the second data synchronization package.

[0028] In one of the embodiments, after feeding back the generated second data synchronization package to the robot, the method further includes:

[0029] If a software update start instruction is received from the robot, the target software is updated according to each of the data segments, wherein the robot is used to issue a software update start instruction after determining that the data segment sequence received by the robot base station is synchronized with the firmware data, and the second data synchronization package is used to indicate whether the data segment sequence received by the robot base station is synchronized with the firmware data.

[0030] In one embodiment, the updating of the first data synchronization packet to generate the second data synchronization packet according to the integrity information of the received data segment sequence includes:

[0031] Check whether each data segment in the received data segment sequence is complete to obtain integrity information; and adjust the data segment identifier of each data segment in the first data synchronization packet according to the integrity information to obtain a second data synchronization packet.

[0032] In one embodiment, the method further comprises:

[0033] In response to the breakpoint resume instruction sent by the robot, the current second data synchronization packet is fed back to the robot base station, wherein the second data synchronization packet is used to instruct the robot to update the first data synchronization packet, select the resume data segment sequence in the data segment sequence as the new infrared communication data, and resend the infrared communication data and the first data synchronization packet.

[0034] In a third aspect, the present application further provides a software updating device, which is applied to a robot, wherein the robot communicates with a robot base station via infrared communication, and the device comprises:

[0035] An acquisition module, used for acquiring a data segment sequence of the target software as infrared communication data, wherein the data segment sequence is obtained by splitting each data packet, and each data packet is obtained by splitting firmware data of the target software;

[0036] A data sending module, used to execute a data sending step: sending infrared communication data and a first data synchronization packet to the robot base station, wherein the robot base station is used to update the first data synchronization packet according to the integrity information of the received data segment sequence to generate a second data synchronization packet;

[0037] The software update control module is used to control the robot base station to update the target software according to the second data synchronization package fed back by the robot base station.

[0038] In a fourth aspect, the present application further provides a software updating device, which is applied to a robot base station, wherein the robot base station and the robot communicate via infrared communication, and the device comprises:

[0039] A receiving module, used for receiving infrared communication data and a first data synchronization packet sent by the robot, wherein the infrared communication data is a sequence of data segments obtained by splitting each data packet, and each data packet is obtained by splitting the firmware of the target software;

[0040] A synchronization package updating module, configured to update the first data synchronization package according to the integrity information of the received data segment sequence to generate a second data synchronization package;

[0041] A feedback module is used to feed back the generated second data synchronization package to the robot, wherein the robot is used to control the robot base station to update the target software according to the second data synchronization package.

[0042] In a fifth aspect, the present application further provides a robot, wherein the robot communicates with a robot base station via infrared communication. The robot comprises an infrared communication module, a navigation module, a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0043] Acquire a data segment sequence of the target software as infrared communication data, wherein the data segment sequence is obtained by splitting each data packet, and each data packet is obtained by splitting the firmware data of the target software; execute a data sending step: send the infrared communication data and the first data synchronization packet to the robot base station, wherein the robot base station is used to update the first data synchronization packet according to the integrity information of the received data segment sequence and generate a second data synchronization packet; according to the second data synchronization packet fed back by the robot base station, control the robot base station to update the target software.

[0044] In a sixth aspect, the present application further provides a robot base station, wherein the robot base station and the robot communicate via infrared communication. The robot base station comprises an infrared communication module, a charging module, a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0045] Receive infrared communication data and a first data synchronization packet sent by the robot, wherein the infrared communication data is a data segment sequence obtained by splitting each data packet, and each data packet is obtained by splitting the firmware of the target software; update the first data synchronization package according to the integrity information of the received data segment sequence to generate a second data synchronization package; feed back the generated second data synchronization package to the robot, wherein the robot is used to control the robot base station to update the target software according to the second data synchronization packet.

[0046] In a seventh aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0047] Acquire a data segment sequence of the target software as infrared communication data, wherein the data segment sequence is obtained by splitting each data packet, and each data packet is obtained by splitting the firmware data of the target software; execute a data sending step: send the infrared communication data and a first data synchronization packet to a robot base station, wherein the robot base station is used to update the first data synchronization packet according to the integrity information of the received data segment sequence and generate a second data synchronization packet; control the robot base station to update the target software according to the second data synchronization packet fed back by the robot base station; or

[0048] Receive infrared communication data and a first data synchronization packet sent by the robot, wherein the infrared communication data is a data segment sequence obtained by splitting each data packet, and each data packet is obtained by splitting the firmware of the target software; update the first data synchronization package according to the integrity information of the received data segment sequence to generate a second data synchronization package; feed back the generated second data synchronization packet to the robot, wherein the robot is used to control the robot base station to update the target software according to the second data synchronization packet.

[0049] In an eighth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0050] Acquire a data segment sequence of the target software as infrared communication data, wherein the data segment sequence is obtained by splitting each data packet, and each data packet is obtained by splitting the firmware data of the target software; execute a data sending step: send the infrared communication data and a first data synchronization packet to a robot base station, wherein the robot base station is used to update the first data synchronization packet according to the integrity information of the received data segment sequence and generate a second data synchronization packet; control the robot base station to update the target software according to the second data synchronization packet fed back by the robot base station; or

[0051] Receive infrared communication data and a first data synchronization packet sent by the robot, wherein the infrared communication data is a data segment sequence obtained by splitting each data packet, and each data packet is obtained by splitting the firmware of the target software; update the first data synchronization package according to the integrity information of the received data segment sequence to generate a second data synchronization package; feed back the generated second data synchronization packet to the robot, wherein the robot is used to control the robot base station to update the target software according to the second data synchronization packet.

[0052] In the software updating method, device, robot, robot base station and computer-readable storage medium, the robot obtains a data segment sequence of the target software as infrared communication data, wherein the data segment sequence is obtained by splitting each data packet, and each data packet is obtained by splitting the firmware data of the target software; the robot sends infrared communication data to the robot base station, so that the robot base station can obtain the data segment sequence of the target software from the robot by infrared communication. In addition, the robot also sends a first data synchronization packet to the robot base station, and the robot base station is used to update the first data synchronization packet according to the integrity information of the received data segment sequence to generate a second data synchronization packet. In this way, the firmware data at the robot and the infrared communication data received by the robot base station can be synchronized by exchanging data synchronization packets between the robot and the robot base station, so that the firmware data at the robot can be reliably transmitted to the robot base station by infrared communication, which is helpful for the reliability of the robot base station to perform software updates, and then control the robot base station to update the target software, so that the robot base station can realize reliable software updates by infrared communication, and the robot base station can realize software updates without configuring a wireless network communication module, thereby reducing the cost of software updates. Therefore, the present application can take into account both ensuring the reliability of the robot base station to perform software updates and reducing the cost of the robot base station to perform software updates. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 An application environment diagram of a software updating method in one embodiment;

[0054] Figure 2 is a flowchart of a software update method applied to a robot in one embodiment;

[0055] Figure 3 It is a schematic diagram of a flow chart of detecting whether each data segment received by the robot base station is synchronized with the firmware data in one embodiment;

[0056] Figure 4 A schematic diagram of a process of performing breakpoint resume in one embodiment;

[0057] Figure 5is a flowchart of a software update method applied to a robot base station in one embodiment;

[0058] Figure 6 is a structural block diagram of a software updating device applied to a robot in one embodiment;

[0059] Figure 7 is a structural block diagram of a software updating device applied to a robot base station in one embodiment;

[0060] Figure 8 is a diagram of the internal structure of a robot in one embodiment;

[0061] Fig. 9 FIG. 4 is a diagram showing the internal structure of a robot base station in one embodiment. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0063] At present, wireless network communication modules are installed on robots and robot base stations. Based on the wireless network communication modules, robots and robot base stations can communicate with remote servers via remote networks. Therefore, the robot base station can directly download the firmware data of the software to be updated from the remote server, and then perform software updates based on the firmware data. However, on the one hand, wireless network communication modules are relatively expensive. If the robot base station only installs the wireless network communication module for software updates, this will greatly increase the software update cost of the robot base station. On the other hand, since wireless network communication is relatively stable and reliable, it is more reliable to perform software updates using wireless network communication. If, in order to reduce software update costs, software updates are not performed using wireless network communication, the reliability of software updates is difficult to guarantee.

[0064] The software update method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. The robot 102 communicates with the robot base station 104 by infrared communication. The robot 102 obtains the data segment sequence of the target software as infrared communication data, wherein the data segment sequence is obtained by splitting each data packet, and each data packet is obtained by splitting the firmware data of the target software; the robot 102 sends the infrared communication data and the first data synchronization packet to the robot base station 104; the robot base station 104 updates the first data synchronization packet according to the integrity information of the received data segment sequence and generates a second data synchronization packet; the robot 102 controls the robot base station 104 to update the target software according to the second data synchronization packet fed back by the robot base station 104.

[0065] As an example, the robot may be a cleaning robot, a food delivery robot, or a sweeper, and the robot base station is a docking base station for the robot. The robot may dock at the robot base station to sleep or charge.

[0066] In one embodiment, Figure 2 As shown, a software update method is provided, which is applied to Figure 1 Taking the robot 102 in the example as an example, the robot and the robot base station communicate via infrared communication, including the following steps:

[0067] Step 202 , obtaining a data segment sequence of the target software as infrared communication data, wherein the data segment sequence is obtained by splitting each data packet, and each data packet is obtained by splitting firmware data of the target software.

[0068] Among them, the target software is the software that needs to be updated on the robot base station; the robot will first download the firmware data of the target software from the remote server through network communication, and then split the firmware data into multiple data packets. Since the amount of data that can be transmitted each time infrared communication is performed is limited, the robot will split each data packet into multiple data segments, and then the data segments obtained by splitting each data packet can form a data segment sequence according to the order of data transmission.

[0069] As an example, a robot can download firmware data from a remote server via Over-the-Air (OTA) technology.

[0070] Before step 202, the robot will first shake hands with the robot base station. After the handshake is successful, an infrared communication connection is successfully established between the robot and the robot base station.

[0071] Step 204, execute the data sending step: send infrared communication data and the first data synchronization packet to the robot base station, wherein the robot base station is used to update the first data synchronization packet according to the integrity information of the received data segment sequence to generate a second data synchronization packet.

[0072] Among them, since the stability of infrared communication is not high, data loss is prone to occur, which will cause incomplete data received by the robot base station. Therefore, in this embodiment, the robot will also send a first data synchronization package to the robot base station. The first data synchronization package is used to verify the integrity of the data segment sequence received by the robot base station, which can ensure that the robot base station can receive a complete data segment sequence, that is, it can ensure that the data segment sequence that the robot base station can receive will be synchronized with the firmware data.

[0073] As an example, the first data synchronization packet may be a data segment identification sequence, which includes data segment identifications corresponding to each data segment in the data segment sequence, and the data segment identification is used to identify whether the data segment is complete. For example, the data segment identification can be set to 1 to identify that the data segment is complete, and the data segment identification can be set to 0 to identify that the data segment is incomplete; the sequence order of the data segment identification sequence and the data segment sequence can be set to be consistent. For example, the sequence order of the data segment identification sequence can also be the order in which the data segments in the data segment sequence are transmitted.

[0074] As an example, step 204 includes: sending each data segment in the data segment sequence to the robot base station in sequence according to the sequence order of the data segment sequence; after the data segment sequence is sent, sending the first data synchronization package to the robot base station; the robot base station verifies the integrity of each data segment respectively to obtain a verification result, and the robot base station adjusts and updates the data segment identifiers in the first data synchronization package according to the verification result to obtain a second data synchronization package.

[0075] As an example, the robot may also first transmit a first data synchronization packet to the robot base station, and then send each data segment in the data segment sequence to the robot base station in sequence according to the sequence order of the data segment sequence.

[0076] As an example, according to the sequence order of the data segment sequence, each data segment in the data segment sequence is sent to the robot base station in sequence, including:

[0077] The robot sends a data segment to the robot base station every preset time period according to the sequence order of the data segment sequence. For example, the preset time period can be set to 1 second, and the robot sends a data segment to the robot base station every 1 second.

[0078] As an example, the robot base station may verify the integrity of the data segment by byte length verification or CRC (Cyclic redundancy check).

[0079] As an example, the robot base station adjusts and updates the identifiers of each data segment in the first data synchronization package according to the verification result to obtain a second data synchronization package, including:

[0080] The robot base station performs a data identifier adjustment step for each data segment identifier in the first data synchronization package: if the verification result of the data segment is that the data segment is complete, the robot base station adjusts the data segment identifier corresponding to the data segment in the first data synchronization package to a first preset identifier, wherein the first preset identifier is used to identify that the data segment is complete; if the verification result of the data segment is that the data segment is incomplete, the robot base station adjusts the data segment identifier corresponding to the data segment in the first data synchronization package to a second preset identifier, wherein the second preset identifier is used to identify that the data segment is incomplete; the first data synchronization package after each data segment identifier is adjusted is used as the second data synchronization package.

[0081] As an example, after receiving the data segment sequence, the robot base station will first store the data segment sequence in a backup area, which is an area in the memory for storing firmware data. The backup area can be set in the Flash of the robot base station.

[0082] Step 206: Control the robot base station to update the target software according to the second data synchronization package fed back by the robot base station.

[0083] As an example, step 206 includes: determining whether the data segment sequence received by the robot base station is complete based on the second data synchronization packet fed back by the robot base station; if the data segment sequence received by the robot base station is complete, sending a software update start instruction to the robot base station, wherein the software update start instruction is used to instruct the robot base station to update the target software according to the received data segment sequence.

[0084] As an example, controlling the robot base station to update the target software according to the second data synchronization package includes:

[0085] According to the second data synchronization packet fed back by the robot base station, it is detected whether the data segment sequence received by the robot base station is synchronized with the firmware data; if synchronized, a software update start instruction is sent to the robot base station, wherein the software update start instruction is used to instruct the robot base station to update the target software according to the received data segment sequence.

[0086] Among them, if the data segment sequence received by the robot base station is synchronized with the firmware data, it means that the robot base station has completely received the data segment sequence obtained by splitting all data packets of the firmware data.

[0087] Specifically, the robot sends a synchronization packet feedback message to the robot base station, wherein the synchronization packet feedback message is used to instruct the robot base station to feedback a second data synchronization packet; receives the second data synchronization packet fed back by the robot base station in response to the synchronization packet feedback message; detects whether there is a second preset identifier in the second data synchronization packet, and if there is a second preset identifier in the second data synchronization packet, determines that the data segment sequence received by the robot base station is not synchronized with the firmware data, indicating that the data segment sequence received by the robot base station is incomplete; if there is no second preset identifier in the second data synchronization packet, determines whether all data segment sequences of the target software have been sent, and if all have been sent, determines that the data segment sequence received by the robot base station is synchronized with the firmware data, indicating that the data segment sequence received by the robot base station is complete, and if not all have been sent, determines that the data segment sequence received by the robot base station is not synchronized with the firmware data, and returns to the execution step: obtains the data segment sequence of the target software as infrared communication data, and sends the data segment sequence obtained by splitting the next data packet in the firmware data of the target software.

[0088] Furthermore, if the data segment sequence received by the robot base station is synchronized with the firmware data, a software update start instruction is sent to the robot base station; if the robot base station receives the software update start instruction, it will update the target software in the application area based on the data segment sequence stored in the backup area, wherein the application area is the area in the memory of the robot base station where the application running code is stored, and the application area can be set in the Flash of the robot base station. In this way, after the robot has confirmed that the robot base station has received the complete firmware data, the robot can control the robot base station to perform software updates, rather than the robot base station directly performing software updates autonomously, which can ensure that the robot base station performs software updates based on the complete firmware data, thereby improving the reliability of the robot base station performing software updates.

[0089] In the above software update method, the robot obtains the data segment sequence of the target software as infrared communication data, wherein the data segment sequence is obtained by splitting each data packet, and each data packet is obtained by splitting the firmware data of the target software; the robot sends the infrared communication data to the robot base station, so that the robot base station can obtain the data segment sequence of the target software from the robot by infrared communication. In addition, the robot also sends a first data synchronization packet to the robot base station, and the robot base station is used to update the first data synchronization packet according to the integrity information of the received data segment sequence and generate a second data synchronization packet, so that the robot detects the data segment sequence received by the robot base station and the second data synchronization packet fed back by the robot base station. Whether the firmware data has been synchronized, this can be done by exchanging data synchronization packages between the robot and the robot base station to ensure that the firmware data at the robot and the infrared communication data received by the robot base station are synchronized, so that the firmware data at the robot can be reliably transmitted to the robot base station by infrared communication, which helps to ensure the reliability of the robot base station in software updates, and then control the robot base station to update the target software, so that the robot base station can reliably perform software updates by infrared communication, and the robot base station can implement software updates without configuring a wireless network communication module, reducing the cost of software updates. Therefore, this embodiment can take into account both ensuring the reliability of the robot base station in software updates and reducing the cost of the robot base station in software updates.

[0090] In one embodiment, Figure 3 As shown, according to the second data synchronization packet fed back by the robot base station, detecting whether the data segment sequence received by the robot base station is synchronized with the firmware data includes:

[0091] Step 302: Update the first data synchronization package according to the second data synchronization package fed back by the robot base station.

[0092] Among them, the robot maintains a first data synchronization package locally, and the robot base station maintains a second data synchronization package locally. When the robot receives the second data synchronization package fed back by the robot base station, it will update the first data synchronization package according to the second data synchronization package to synchronize the data segment identifiers in the second data synchronization package and the first data synchronization package.

[0093] As an example, if there is a data packet identifier in the first data synchronization package and the second data synchronization package, the robot will also synchronize the data packet identifiers in the second data synchronization package and the first data synchronization package, wherein the data packet identifier is used to characterize the integrity of the data packet obtained by splitting the firmware data. If the data segments obtained by splitting the data packet have been completely sent to the robot base station, the data packet in the robot base station is considered to be complete; if the data segments obtained by splitting the data packet have not been completely sent to the robot base station, the data packet in the robot base station is considered to be incomplete.

[0094] Step 304: Detect whether the data segment sequence received by the robot base station is synchronized with the firmware data according to the data segment identifiers in the updated first data synchronization packet.

[0095] As an example, step 304 includes: detecting whether there is a second preset identifier in each data segment identifier in the updated first data synchronization package, wherein the second preset identifier is used to characterize that the data segment is incomplete; if the second preset identifier does not exist in each data segment identifier in the updated first data synchronization package, it means that the robot base station has completely received the data segment sequence transmitted this time, thereby determining whether all data segment sequences of the target software have been sent, and if they have been sent, it is considered that the data segment sequence received by the robot base station is synchronized with the firmware data; if they have not been sent, it is considered that the data segment sequence received by the robot base station is not synchronized with the firmware data; if the second preset identifier exists in each data segment identifier in the updated first data synchronization package, it is considered that the data segment sequence received by the robot base station is not synchronized with the firmware data.

[0096] In this embodiment, by setting a first data synchronization package at the robot and a second data synchronization package at the robot base station respectively, and synchronizing the data segment identifier in the second data synchronization package with the data segment identifier in the first data synchronization package, the first data synchronization package is updated. It can be detected whether there is a second preset identifier in the updated first data synchronization package that identifies an incomplete data segment, which helps to accurately detect whether the data segment sequence received by the robot base station is synchronized with the firmware data, thereby improving the reliability of software updates of the robot base station.

[0097] In one embodiment, after detecting whether the data segment sequence received by the robot base station is synchronized with the firmware data according to the second data synchronization packet fed back by the robot base station, the software update method further includes:

[0098] If not synchronized, check whether the data segments in the data segment sequence need to be retransmitted; if the data segments in the data segment sequence need to be retransmitted, select the target data segments that need to be retransmitted in the data segment sequence according to the data segment identifiers in the updated first data synchronization package; use the data segment sequence composed of the target data segments as new infrared communication data, and return to execute the data sending step.

[0099] In order to ensure that the data segment sequence is complete when the robot base station is used for software update, the robot provides a data segment retransmission function, which can retransmit incomplete data segments to the robot base station.

[0100] Specifically, if the data segment sequence received by the robot base station is not synchronized with the firmware data, it is determined whether there is a second preset identifier in the updated first data synchronization package. If there is no second preset identifier in the updated first data synchronization package, it means that the robot base station has completely received the data segment sequence transmitted this time, and there is no need to resend the data segments in the data segment sequence at this time, so as to return to the execution step: obtain the data segment sequence of the target software as infrared communication data to transmit the data segment sequence corresponding to the next data packet to the robot base station; if there is a second preset identifier in the updated first data synchronization package, it means that the robot base station has not completely received the data segment sequence transmitted this time, and it is necessary to resend the data segments in the data segment sequence, so as to extract each second preset identifier from the data segment identifier of the updated first data synchronization package, and use the data segment corresponding to each extracted second preset identifier in the data segment sequence as the target data segment that needs to be resent; use the data segment sequence composed of each target data segment as the new infrared communication data, and return to the execution of the data sending step until there is no second preset identifier in the second data synchronization package returned by the robot base station, that is, the robot base station has completely received the data segment sequence transmitted this time.

[0101] In this embodiment, when it is necessary to resend a data segment in the data segment accumulation process, the target data segment that needs to be resent can be accurately located in the data segment sequence based on the data segment identifiers in the first data synchronization package updated by the second data synchronization package. The robot can then send the data segment sequence composed of the target data segments as new infrared communication data to the robot base station, thereby achieving accurate resending of data lost during infrared communication between the robot and the robot base station, ensuring the integrity of the data segment sequence in the robot base station that is finally used for software updates, and helping to improve the reliability of software updates in the robot base station.

[0102] It should be noted that since infrared communication is easily interfered by the outside world, in order to reduce external infrared interference, the robot is usually controlled to communicate with the robot base station by infrared only when the robot is docked at the robot base station. However, since the robot must be ready to perform sweeping tasks at any time, infrared communication data transmission between the robot and the robot base station is prone to interruption.

[0103] In one embodiment, the software update method further includes:

[0104] In response to the task execution instruction, the robot is controlled to detach from the robot base station to perform the corresponding work task, wherein the infrared communication of the data segment sequence of the target software is interrupted after the robot detaches from the robot base station; if it is detected that the robot reconnects to the robot base station, the robot is controlled to continue transmitting the data segment sequence of the target software.

[0105] Among them, in this embodiment, when the robot is communicating with the robot base station by infrared, if it receives a task execution instruction, it will give priority to controlling the robot to leave the robot base station to perform the corresponding work task. However, after the robot leaves the robot base station, the infrared communication between the robot and the robot base station is easily affected by external interference. In order to ensure the reliability of infrared communication, an infrared communication interruption will occur between the robot and the robot base station, that is, the robot will interrupt the data segment sequence being transmitted.

[0106] Specifically, in response to the task execution instruction, the robot is controlled to detach from the robot base station to perform the corresponding work task, wherein the infrared communication of the data segment sequence of the target software is interrupted after the robot detaches from the robot base station; if it is detected that the robot reconnects to the robot base station, it means that the robot has completed the work task, and the data segment sequence of the target software that was not previously transmitted can be continued, so that the robot sends a breakpoint resume transmission instruction to the robot base station, and the breakpoint resume transmission instruction is used to instruct the robot base station to feed back a second data synchronization package to the robot; the robot receives the second data synchronization package fed back by the robot base station, and according to the second data synchronization packet, determines the resumed data segment sequence in the previously transmitted data segment sequence as new infrared communication data, and returns to execute the data sending step.

[0107] In this embodiment, when the robot is communicating with the robot base station by infrared, it can still directly respond to the task execution instruction, interrupt the infrared communication, and execute the corresponding work task as a priority. After the work task is completed, it can resume the data segment sequence according to the second data synchronization package fed back by the robot base station. While completing the transmission of the data segment sequence, it does not affect the use of the robot. Therefore, the silent upgrade of the target software in the robot base station can be achieved, thereby improving the user experience.

[0108] In one embodiment, referring to Figure 4 If it is detected that the robot reconnects to the robot base station, the robot is controlled to continue transmitting the data segment sequence of the target software, including:

[0109] Step 402: Send a breakpoint resume transmission instruction to the robot base station, wherein the breakpoint resume transmission instruction is used to instruct the robot base station to feed back a second data synchronization packet.

[0110] Wherein, each time the robot base station receives a data segment sequence, it will update the first data synchronization package corresponding to the data segment sequence to generate a second data synchronization package.

[0111] As an example, assuming that the first preset identifier is 1, used to identify that the data segment is complete, and the second preset identifier is 0, used to identify that the data segment is incomplete, the robot needs to transmit 10 data segments to the robot base station. The second data synchronization packet of the robot base station between the unreceived data segments is the field 0000000000. At this time, the robot is interrupted when transmitting the 5th data segment to the robot base station. At this time, the second data synchronization packet in the robot base station is the field 1111000000.

[0112] Step 404: Update the first data synchronization package according to the second data synchronization package fed back by the robot base station.

[0113] The second data synchronization packet may include a data segment identifier and a data packet identifier, or may only include a data segment identifier, wherein the data segment identifier is used to characterize the integrity of the data segment, and the data packet identifier is used to characterize the integrity of the data packet composed of multiple data segments.

[0114] As an example, step 404 includes: updating the first data synchronization package by adjusting the data segment identifiers in the first data synchronization package and the second data synchronization package to be consistent according to the data segment identifiers in the second data synchronization package fed back by the robot base station.

[0115] As an example, step 404 includes: updating the first data synchronization package by adjusting the data segment identifiers in the first data synchronization package and the second data synchronization package to be consistent, and adjusting the data packet identifiers in the first data synchronization package and the second data synchronization package to be consistent, based on the data segment identifiers and the data packet identifiers in the second data synchronization package fed back by the robot base station.

[0116] Step 406: Select a resumed transmission data segment sequence from the data segment sequence according to the updated first data synchronization packet.

[0117] As an example, step 406 includes: locating the breakpoint resume sequence position where data transmission interruption occurs in the data segment sequence according to the data segment identifier in the updated first data synchronization packet; and selecting a resume data segment sequence in the data segment sequence according to the breakpoint resume sequence position.

[0118] As an example, assuming that the updated first data synchronization package is field 1111000, 1 indicates that the data segment in the robot base station is complete, and 0 indicates that the data segment in the robot base station is incomplete, then the breakpoint resume sequence position is 5, that is, the data segment ranked 5th in the data segment sequence has a transmission interruption.

[0119] Step 408, taking the continued transmission data segment sequence as new infrared communication data, and returning to execute the data sending step.

[0120] Among them, the robot base station can transmit the continued data segment sequence as a new infrared communication data transmission and a first data synchronization package to the robot base station, that is, execute the data sending step until the second preset identifier does not exist in the second data synchronization package returned by the robot base station, that is, there is a complete data segment sequence synchronized with the firmware data in the robot base station.

[0121] In this embodiment, a breakpoint resume transmission instruction is sent to the robot base station, wherein the breakpoint resume transmission instruction is used to instruct the robot base station to feedback the second data synchronization package; according to the second data synchronization package fed back by the robot base station, the first data synchronization package is updated; according to the updated first data synchronization package, a resume transmission data segment sequence is selected in the data segment sequence; the resume transmission data segment sequence is used as new infrared communication data, and the data sending step is returned to be executed. In this way, when data transmission is interrupted between the robot and the robot base station, the position of the breakpoint resume transmission sequence where the transmission interruption occurs can be accurately located in the data segment sequence according to the second data synchronization package fed back by the robot base station, so that the resume transmission data segment sequence can be reselected from the data segment sequence according to the breakpoint resume transmission sequence position for breakpoint resume transmission, so that even if infrared data transmission is interrupted between the robot and the robot base station, breakpoint resume transmission can be accurately performed during the next infrared communication, which helps to improve the reliability of infrared communication between the robot and the robot base station.

[0122] In one embodiment, determining a resumed transmission data segment sequence in a data segment sequence according to the updated first data synchronization packet includes:

[0123] According to the data segment identifiers and data packet identifiers in the updated first data synchronization package, the breakpoint resume sequence position is located in the data segment sequence; according to the breakpoint resume sequence position, the resume data segment sequence is intercepted in the data segment sequence; the resume data segment sequence is used as the new infrared communication data, and the data sending step is returned to execute.

[0124] Specifically, according to the identifiers of each data packet in the updated first data synchronization package, the sequence fragment position corresponding to the data packet where the transmission is interrupted is located in the data segment sequence; according to the identifiers of each data segment in the updated first data synchronization package, the breakpoint-resume sequence position corresponding to the data segment where the transmission is interrupted is located in the sequence fragment position; according to the breakpoint-resume position, the data segment sequence fragment that is not successfully transmitted to the robot base station is intercepted in the data segment sequence as the resume data segment sequence; the resume data segment sequence is used as the new infrared communication data, and the data sending step is returned. In this way, the breakpoint-resume position can be located in the data segment sequence more quickly and accurately through the identifiers of each data packet and the data segment in the updated first data synchronization package, so that the resume data segment sequence is intercepted in the data segment sequence according to the breakpoint-resume position for breakpoint-resume transmission, which helps to improve the efficiency and accuracy of breakpoint-resume transmission between the robot and the robot base station.

[0125] In one embodiment, after controlling the robot base station to update the target software according to the second data synchronization packet fed back by the robot base station, the software update method further includes:

[0126] If the feedback information sent by the robot base station is received within the preset time period, it is determined that the target software is updated successfully; if the feedback information sent by the robot base station is not received within the preset time period, it is determined that the target software is updated unsuccessfully.

[0127] Among them, the feedback information is used to indicate that the target software at the robot base station has been successfully upgraded. The feedback information can be an ACK (Acknowledgement) instruction; the length of the preset time period is greater than the time length required for the target software upgrade. For example, the length of the preset time period can be set to 1.5 times the time length required for the target software upgrade.

[0128] Specifically, if an ACK instruction sent by the robot base station is received within the preset time period, it is determined that the target software at the robot base station has been updated successfully; if the ACK instruction sent by the robot base station is not received within the preset time period, it is determined that the target software at the robot base station has failed to update. In this way, the robot can promptly determine the update status of the target software at the robot base station, that is, whether the update is successful.

[0129] In one embodiment, Figure 5 As shown, a software update method is provided, which is applied to Figure 1 Taking the robot base station 104 in the example as an example, the robot base station and the robot communicate through infrared communication, including the following steps:

[0130] Step 502, receiving infrared communication data and a first data synchronization packet sent by the robot, wherein the infrared communication data is a sequence of data segments obtained by splitting each data packet, and each data packet is obtained by splitting the firmware of the target software.

[0131] Among them, the target software is the software that needs to be updated on the robot base station; the robot will first download the firmware data of the target software from the remote server through network communication, and then split the firmware data into multiple data packets. Since the amount of data that can be transmitted each time infrared communication is performed is limited, the robot will split each data packet into multiple data segments, which can form a data segment sequence according to the order of data transmission.

[0132] It should be noted that due to the low stability of infrared communication, data loss is prone to occur, which will cause incomplete data received by the robot base station. Therefore, in this embodiment, the robot will also send a first data synchronization package to the robot base station. The first data synchronization package is used to verify the integrity of the data segment sequence received by the robot base station. It can ensure that the robot base station can receive a complete data segment sequence, that is, it can ensure that the data segment sequence that the robot base station can receive will be synchronized with the firmware data.

[0133] As an example, the first data synchronization package can be a data segment identification sequence, which includes data segment identifications corresponding to each data segment in the data segment sequence, and the data segment identification is used to identify whether the data segment is complete. For example, the data segment identification can be set to 1 to identify that the data segment is complete, and the data segment identification can be set to 0 to identify that the data segment is incomplete; the sequence order of the data segment identification sequence and the data segment sequence can be set to be consistent. For example, the sequence order of the data segment identification sequence can also be the order of transmission of the data segments in the data segment sequence.

[0134] Step 504: Update the first data synchronization package according to the integrity information of the received data segment sequence to generate a second data synchronization package.

[0135] As an example, step 504 includes: respectively verifying the integrity of each data segment in the received data segment sequence to obtain a verification result; and adjusting and updating the identifier of each data segment in the first data synchronization packet according to the verification result to obtain a second data synchronization packet.

[0136] As an example, the robot base station may verify the integrity of the data segment by byte length verification or CRC (Cyclic redundancy check).

[0137] In one embodiment, updating the first data synchronization packet according to the integrity information of the received data segment sequence to generate the second data synchronization packet includes:

[0138] Check whether each data segment in the received data segment sequence is complete to obtain integrity information; adjust the data segment identifier of each data segment in the first data synchronization packet according to the integrity information to obtain a second data synchronization packet.

[0139] Among them, the integrity information can be used to identify whether the data segment in the robot base station is complete. The integrity identification can be used to set character A to indicate that the data segment in the robot base station is complete, and set character B to indicate that the data segment in the robot base station is incomplete.

[0140] Specifically, check whether each data segment in the received data segment sequence is complete, and obtain the integrity identifier corresponding to each data segment in the data segment sequence; perform a data identifier adjustment step for each data segment identifier in the first data synchronization package: if the integrity identifier is a first preset integrity identifier, then in the first data synchronization package, the data segment identifier corresponding to the data segment is adjusted to the first preset identifier, and the first preset identifier is used to identify that the data segment is complete; if the integrity identifier is a second preset integrity identifier, then in the first data synchronization package, the data segment identifier corresponding to the data segment is adjusted to the second preset identifier, and the second preset identifier is used to identify that the data segment is incomplete; the first data synchronization package after each data segment identifier is adjusted is used as the second data synchronization package.

[0141] Step 506, feeding back the generated second data synchronization package to the robot, wherein the robot is used to control the robot base station to update the target software according to the second data synchronization package.

[0142] As an example, step 506 includes: the robot base station feeds back a generated second data synchronization package to the robot; the robot determines whether the data segment sequence received by the robot base station is complete based on the second data synchronization package fed back by the robot base station; if the data segment sequence received by the robot base station is complete, the robot sends a software update start instruction to the robot base station; if the robot base station receives the software update start instruction, it updates the target software based on the received data segments.

[0143] As an example, the robot base station will respond to the synchronization package feedback message sent by the robot and feedback the generated second data synchronization package to the robot.

[0144] Among them, after receiving the second data synchronization package, the robot will detect whether there is a second preset identifier in the second data synchronization package. If the second preset identifier exists in the second data synchronization package, it is determined that the data segment sequence received by the robot base station is not synchronized with the firmware data; if the second preset identifier does not exist in the second data synchronization package, it is determined that the data segment sequence received by the robot base station is synchronized with the firmware data, wherein the second preset identifier is a data segment identifier that characterizes an incomplete data segment in the robot base station.

[0145] In one embodiment, after feeding back the generated second data synchronization package to the robot, the software update method further includes:

[0146] If a software update start instruction is received from the robot, the target software is updated according to each data segment. The robot is used to issue the software update start instruction after determining that the data segment sequence received by the robot base station is synchronized with the firmware data. The second data synchronization package is used to indicate whether the data segment sequence received by the robot base station is synchronized with the firmware data.

[0147] Among them, after the robot determines that the data segment sequence received by the robot base station is synchronized with the firmware data, it will send a software update startup instruction to the robot base station; after receiving the data segment sequence, the robot base station will first store the data segment sequence in the backup area, and then after receiving the software update startup instruction feedback from the robot, the robot base station will update the software running software in the application area according to the data segment sequence stored in the backup area.

[0148] Specifically, if a software update start instruction is received from the robot, the robot base station updates the target software in the application area based on the data segment sequence stored in the backup area, wherein the application area is the area where the application running code is stored in the memory of the robot base station, and the application area can be set in the Flash of the robot base station.

[0149] As an example, if a software update start instruction is received from the robot, the robot base station performs a CRC check on the entire data segment sequence. If the check passes, the robot base station updates the target software in the application area based on the data segment sequence stored in the backup area.

[0150] In the above software update method, the robot base station receives infrared communication data sent by the robot, and the infrared communication data is a data segment sequence of the target software, wherein the data segment sequence is obtained by splitting each data packet, and each data packet is obtained by splitting the firmware data of the target software, so that the robot base station can obtain the data segment sequence of the target software from the robot in the form of infrared communication; in addition, the robot base station will also receive the first data synchronization packet sent by the robot, so that the robot base station can update the first data synchronization packet according to the integrity information of the received data segment sequence, generate a second data synchronization packet, and feed back the second data synchronization packet to the robot, so that data synchronization can be exchanged between the robot and the robot base station. The step package ensures that the firmware data at the robot is synchronized with the infrared communication data received by the robot base station, so that the firmware data at the robot can be reliably transmitted to the robot base station by infrared communication, which helps to improve the reliability of the robot base station in performing software updates; after determining that the infrared communication data received by the robot base station is synchronized with the firmware data, the robot can control the robot base station to update the target software, so that the robot base station can reliably perform software updates by infrared communication, and the robot base station can perform software updates without configuring a wireless network communication module, thereby reducing the cost of software updates. Therefore, this embodiment can take into account both ensuring the reliability of the robot base station in performing software updates and reducing the cost of the robot base station in performing software updates.

[0151] In one embodiment, the software update method further includes:

[0152] In response to the breakpoint resume instruction sent by the robot, the current second data synchronization package is fed back to the robot base station, wherein the second data synchronization package is used to instruct the robot to update the first data synchronization package, select the resume data segment sequence in the data segment sequence as the new infrared communication data, and resend the infrared communication data and the first data synchronization package.

[0153] Among them, the robot base station can respond to the breakpoint resume transmission instruction sent by the robot, and feed back the current second data synchronization package to the robot base station, so that the robot updates the first data synchronization package according to the second data synchronization package fed back by the robot base station, updates the first data synchronization package according to the second data synchronization package fed back by the robot base station, selects the resume transmission data segment sequence in the data segment sequence according to the updated first data synchronization package, uses the resume transmission data segment sequence as the new infrared communication data, and returns to execute the data sending step. In this way, when data transmission is interrupted between the robot and the robot base station, the robot can also accurately locate the breakpoint resume transmission sequence position where the transmission interruption occurs in the data segment sequence according to the second data synchronization package fed back by the robot base station, so that the robot can re-select the resume transmission data segment sequence from the data segment sequence according to the breakpoint resume transmission sequence position for breakpoint resume transmission, and even if infrared data transmission is interrupted between the robot and the robot base station, breakpoint resume transmission can be accurately performed during the next infrared communication, which helps to improve the reliability of infrared communication between the robot and the robot base station.

[0154] After updating the target software according to each data segment, the software updating method further includes:

[0155] If the target software is updated successfully, feedback information is sent to the robot, wherein the feedback information is used to indicate that the target software has been updated successfully.

[0156] The feedback information may be an ACK command. The robot base station sends an ACK command to the robot, which can promptly notify the robot that the target software has been successfully updated.

[0157] In one embodiment, after a successful handshake between the robot and the robot base station, the robot first obtains a data segment sequence of the target software as infrared communication data, wherein the data segment sequence is obtained by splitting each data packet, and each data packet is obtained by splitting the firmware data of the target software; the robot sends each data segment in the data segment sequence to the robot base station in sequence according to a preset time period interval, and sends a first data synchronization packet to the robot base station, so that the robot base station verifies the integrity of each data segment respectively to obtain a verification result, and the robot base station adjusts and updates the data segment identifiers in the first data synchronization package according to the verification result to obtain a second data synchronization package.

[0158] Furthermore, the robot sends a synchronization package feedback message to the robot base station, and the synchronization includes a feedback message for instructing the robot base station to feedback a second data synchronization package; after receiving the second data synchronization package sent by the robot base station, the robot will update the first data synchronization package according to the second data synchronization package to synchronize the data segment identifiers in the second data synchronization package and the first data synchronization package; by detecting whether the data segment identifiers in the updated first data synchronization package have a second preset identifier, it is detected whether the data segment sequence received by the robot base station is synchronized with the firmware data, wherein the second preset identifier is used to indicate that the data segment is incomplete. In this way, it is possible to accurately detect whether the data segment sequence received by the robot base station is synchronized with the firmware data, which helps to improve the reliability of the robot base station in software updates.

[0159] Furthermore, if the data segment sequence received by the robot base station is not synchronized with the firmware data, it is determined whether there is a second preset identifier in the updated first data synchronization package. If there is no second preset identifier in the updated first data synchronization package, it means that the robot base station has completely received the data segment sequence transmitted this time, and there is no need to resend the data segments in the data segment sequence at this time, thereby returning to the execution step: obtaining the data segment sequence of the target software as infrared communication data to transmit the data segment sequence corresponding to the next data packet to the robot base station; if there is a second preset identifier in the updated first data synchronization package, it means that the robot base station has not completely received the data segment sequence transmitted this time, and it is necessary to resend the data segments in the data segment sequence at this time, thereby extracting each second preset identifier from each data segment identifier of the updated first data synchronization package, and taking the data segment corresponding to each extracted second preset identifier in the data segment sequence as the target data segment that needs to be resent; taking the data segment sequence composed of each target data segment as the new infrared communication data, and returning to the execution of the data sending step until there is no second preset identifier in the second data synchronization package returned by the robot base station, that is, the robot base station has completely received the data segment sequence transmitted this time. This can achieve accurate retransmission of data lost during infrared communication between the robot and the robot base station, thereby ensuring the integrity of the last data segment sequence used for software updates in the robot base station, and helping to improve the reliability of software updates in the robot base station.

[0160] If the data segment sequence received by the robot base station is synchronized with the firmware data, a software update start instruction is sent to the robot base station; if the robot base station receives the software update start instruction, it will update the target software in the application area based on the data segment sequence stored in the backup area, where the application area is the area in the memory of the robot base station where the application running code is stored, and the application area can be set in the Flash of the robot base station. In this way, after the robot has confirmed that the robot base station has received the complete firmware data, the robot can control the robot base station to update the software, rather than the robot base station directly updating the software autonomously, which can ensure that the robot base station is updated based on the complete firmware data, thereby improving the reliability of the robot base station software update.

[0161] In the above embodiment, by exchanging data synchronization packets between the robot and the robot base station, it is ensured that the firmware data at the robot can be reliably transmitted to the robot base station by infrared communication, which helps to ensure the reliability of the robot base station in performing software updates. Furthermore, if synchronization has been achieved, the robot can send a software update start instruction to the robot base station, instructing the robot base station to perform software updates. In this way, the robot base station can reliably perform software updates by infrared communication. The robot base station can perform software updates without configuring a wireless network communication module, thereby reducing the cost of software updates. Therefore, this embodiment can take into account both ensuring the reliability of the robot base station in performing software updates and reducing the cost of the robot base station in performing software updates.

[0162] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0163] Based on the same inventive concept, the embodiment of the present application also provides a software update device for implementing the software update method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more software update device embodiments provided below can refer to the limitations on the software update method above, and will not be repeated here.

[0164] In one embodiment, Figure 6As shown, a software update device is provided, which is applied to a robot, wherein the robot communicates with a robot base station via infrared communication, and includes: an acquisition module 602, a data sending module 604 and a software update control module 606, wherein:

[0165] The acquisition module is used to acquire a data segment sequence of the target software as infrared communication data, wherein the data segment sequence is obtained by splitting each data packet, and each data packet is obtained by splitting the firmware data of the target software.

[0166] A data sending module is used to execute the data sending step: sending infrared communication data and a first data synchronization packet to the robot base station, wherein the robot base station is used to update the first data synchronization packet according to the integrity information of the received data segment sequence to generate a second data synchronization packet.

[0167] The software update control module is used to control the robot base station to update the target software according to the second data synchronization package fed back by the robot base station.

[0168] In one embodiment, the software update control module is further used to:

[0169] According to the second data synchronization packet fed back by the robot base station, it is detected whether the data segment sequence received by the robot base station is synchronized with the firmware data; if synchronized, a software update start instruction is sent to the robot base station, wherein the software update start instruction is used to instruct the robot base station to update the target software according to the received data segment sequence.

[0170] In one embodiment, the software update control module is further used to:

[0171] According to the second data synchronization package fed back by the robot base station, the first data synchronization package is updated; according to the data segment identifiers in the updated first data synchronization package, it is detected whether the data segment sequence received by the robot base station is synchronized with the firmware data.

[0172] In one embodiment, the software updating device comprises:

[0173] The data retransmission module is used to detect whether the data segments in the data segment sequence need to be retransmitted if synchronization is not achieved; if the data segments in the data segment sequence need to be retransmitted, the target data segments that need to be retransmitted are selected from the data segment sequence according to the data segment identifiers in the updated first data synchronization package; the data segment sequence composed of the target data segments is used as new infrared communication data, and the data sending step is returned to be executed.

[0174] In one embodiment, the software updating device further includes:

[0175] The breakpoint resume module controls the robot to detach from the robot base station to perform the corresponding work task in response to the task execution instruction, wherein the infrared communication of the data segment sequence of the target software is interrupted after the robot detaches from the robot base station; if it is detected that the robot reconnects to the robot base station, the robot is controlled to resume transmitting the data segment sequence of the target software according to the second data synchronization packet fed back by the robot base station.

[0176] In one embodiment, the breakpoint resume module is used to:

[0177] Send a breakpoint resume instruction to the robot base station, wherein the breakpoint resume instruction is used to instruct the robot base station to feedback a second data synchronization package; update the first data synchronization package according to the second data synchronization package fed back by the robot base station; select a resume data segment sequence from the data segment sequence according to the updated first data synchronization packet; use the resume data segment sequence as new infrared communication data, and return to execute the data sending step.

[0178] In one embodiment, the breakpoint resume module is further used for:

[0179] According to the data segment identifiers and data packet identifiers in the updated first data synchronization package, the breakpoint resume sequence position is located in the data segment sequence; according to the breakpoint resume sequence position, the resume data segment sequence is intercepted in the data segment sequence; the resume data segment sequence is used as new infrared communication data, and the data sending step is returned to be executed.

[0180] In one embodiment, the software updating device further includes:

[0181] A determination module is used to determine that the target software is successfully updated if feedback information sent by the robot base station is received within a preset time period; if feedback information sent by the robot base station is not received within the preset time period, determine that the target software is failed to be updated.

[0182] Each module in the above software update device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of the processor in the robot in the form of hardware, or can be stored in the memory in the robot in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0183] In one embodiment, Figure 7As shown, a software update device is provided, which is applied to a robot base station, and the robot base station and the robot communicate via infrared communication, including: a receiving module 702, a synchronization package update module 704 and a feedback module 706, wherein:

[0184] The receiving module is used to receive the infrared communication data and the first data synchronization packet sent by the robot, wherein the infrared communication data is a sequence of data segments obtained by splitting each data packet, and each data packet is obtained by splitting the firmware of the target software.

[0185] The synchronization package updating module is used to update the first data synchronization package according to the integrity information of the received data segment sequence to generate a second data synchronization package.

[0186] A feedback module is used to feed back the generated second data synchronization package to the robot, wherein the robot is used to control the robot base station to update the target software according to the second data synchronization package.

[0187] In one embodiment, the software updating device further includes:

[0188] A software update module is used to update the target software according to each of the data segments if a software update start instruction is received from the robot. The robot is used to issue a software update start instruction after determining that the data segment sequence received by the robot base station is synchronized with the firmware data. The second data synchronization packet is used to indicate whether the data segment sequence received by the robot base station is synchronized with the firmware data.

[0189] In one embodiment, the synchronization package update module is further used to:

[0190] Check whether each data segment in the received data segment sequence is complete to obtain integrity information; and adjust the data segment identifier of each data segment in the first data synchronization packet according to the integrity information to obtain a second data synchronization packet.

[0191] In one embodiment, the software updating device comprises:

[0192] A breakpoint resume response module is used to respond to the breakpoint resume instruction sent by the robot and feedback the current second data synchronization packet to the robot base station, wherein the second data synchronization packet is used to instruct the robot to update the first data synchronization packet, select the resume data segment sequence in the data segment sequence as the new infrared communication data, and resend the infrared communication data and the first data synchronization packet.

[0193] In one embodiment, the software updating device comprises:

[0194] The software update confirmation module is used to send feedback information to the robot if the target software is updated successfully, wherein the feedback information is used to indicate that the target software has been updated successfully.

[0195] Each module in the above software update device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of the processor in the robot in the form of hardware, or can be stored in the memory in the robot in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0196] In one embodiment, a robot is provided, which communicates with a robot base station via infrared communication. The internal structure diagram of the robot can be shown as follows: Figure 8 As shown. The robot includes an infrared communication module, a navigation module, a processor and a memory connected through a system bus. Among them, the infrared communication module is used to realize infrared communication between the robot and the robot base station, the navigation module is used to navigate the robot, and the processor of the robot is used to provide computing and control capabilities. The memory of the robot includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the robot is used to communicate with an external remote server in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a software update method is implemented.

[0197] Those skilled in the art will understand that Figure 8 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the robot to which the scheme of the present application is applied. The specific robot may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0198] In one embodiment, a robot is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0199] In one embodiment, a robot base station is provided. The robot base station communicates with the robot via infrared communication. The internal structure diagram thereof can be shown as follows: Fig. 9As shown. The robot base station includes an infrared communication module, a charging module, a processor and a memory connected through a system bus. Among them, the infrared communication module is used to realize infrared communication between the robot and the robot base station, the charging module is used to charge the robot, and the processor of the robot base station is used to provide computing and control capabilities. The memory of the robot base station includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. When the computer program is executed by the processor, a software update method is implemented.

[0200] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present application, and does not constitute a limitation on the robot base station to which the scheme of the present application is applied. The specific robot base station may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0201] In one embodiment, a robot is provided, including an infrared communication module, a navigation module, a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0202] In one embodiment, a robot base station is also provided, including an infrared communication module, a charging module, a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0203] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0204] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0205] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0206] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0207] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A software updating method, It is characterized in that Applied to a robot, the robot and the robot base station communicate via infrared communication, and the method comprises: Acquire a data segment sequence of the target software as infrared communication data, wherein the data segment sequence is obtained by splitting each data packet, and each data packet is obtained by splitting firmware data of the target software; Execute a data sending step: send infrared communication data and a first data synchronization packet to the robot base station, wherein the robot base station is used to update the first data synchronization packet according to the integrity information of the received data segment sequence to generate a second data synchronization packet; According to the second data synchronization packet fed back by the robot base station, the robot base station is controlled to update the target software.

2. The method according to claim 1, It is characterized in that The controlling the robot base station to update the target software according to the second data synchronization package includes: According to the second data synchronization packet fed back by the robot base station, detecting whether the data segment sequence received by the robot base station is synchronized with the firmware data; If synchronization has been achieved, a software update start instruction is sent to the robot base station, wherein the software update start instruction is used to instruct the robot base station to update the target software according to the received data segment sequence.

3. The method according to claim 2, It is characterized in that The detecting, according to the second data synchronization packet fed back by the robot base station, whether the data segment sequence received by the robot base station is synchronized with the firmware data comprises: Update the first data synchronization package according to the second data synchronization package fed back by the robot base station; According to the data segment identifiers in the updated first data synchronization packet, it is detected whether the data segment sequence received by the robot base station is synchronized with the firmware data.

4. The method according to claim 3, It is characterized in that After detecting whether the data segment sequence received by the robot base station is synchronized with the firmware data according to the second data synchronization packet fed back by the robot base station, the method further includes: If not synchronized, detecting whether the data segments in the data segment sequence need to be retransmitted; If the data segments in the data segment sequence need to be retransmitted, then the target data segments that need to be retransmitted are selected from the data segment sequence according to the data segment identifiers in the updated first data synchronization packet; The data segment sequence composed of the target data segments is used as new infrared communication data, and the step of sending data is executed again.

5. The method according to claim 1, It is characterized in that The method further comprises: In response to the task execution instruction, the robot is controlled to separate from the robot base station to perform the corresponding work task, wherein the infrared communication of the data segment sequence of the target software is interrupted after the robot separates from the robot base station; If it is detected that the robot reconnects to the robot base station, the robot is controlled to continue transmitting the data segment sequence of the target software according to the second data synchronization packet fed back by the robot base station.

6. The method according to claim 5, It is characterized in that If it is detected that the robot reconnects to the robot base station, controlling the robot to continue transmitting the data segment sequence of the target software includes: Sending a breakpoint resume transmission instruction to the robot base station, wherein the breakpoint resume transmission instruction is used to instruct the robot base station to feed back a second data synchronization packet; According to the second data synchronization package fed back by the robot base station, the first data synchronization package is updated; According to the updated first data synchronization packet, selecting a continued transmission data segment sequence from the data segment sequence; The continued transmission data segment sequence is used as new infrared communication data, and the process returns to execute the data sending step.

7. The method according to claim 6, It is characterized in that The step of determining a resumed transmission data segment sequence in the data segment sequence according to the updated first data synchronization packet includes: Locating the breakpoint resume sequence position in the data segment sequence according to each data segment identifier and each data packet identifier in the updated first data synchronization packet; According to the position of the breakpoint resume transmission sequence, intercepting the resume transmission data segment sequence in the data segment sequence; The continued transmission data segment sequence is used as new infrared communication data, and the process returns to execute the data sending step.

8. The method according to claim 6, It is characterized in that After controlling the robot base station to update the target software according to the second data synchronization packet fed back by the robot base station, the method further includes: If feedback information sent by the robot base station is received within a preset time period, it is determined that the target software is updated successfully; If no feedback information sent by the robot base station is received within the preset time period, it is determined that the target software update has failed.

9. A software updating method, It is characterized in that Applied to a robot base station, the robot base station and the robot communicate via infrared communication, the method comprising: Receiving infrared communication data and a first data synchronization packet sent by the robot, wherein the infrared communication data is a sequence of data segments obtained by splitting each data packet, and each data packet is obtained by splitting the firmware of the target software; updating the first data synchronization packet according to the integrity information of the received data segment sequence to generate a second data synchronization packet; The generated second data synchronization package is fed back to the robot, wherein the robot is used to control the robot base station to update the target software according to the second data synchronization package.

10. The method according to claim 9, It is characterized in that After feeding back the generated second data synchronization package to the robot, the method further includes: If a software update start instruction is received from the robot, the target software is updated according to each of the data segments, wherein the robot is used to issue a software update start instruction after determining that the data segment sequence received by the robot base station is synchronized with the firmware data, and the second data synchronization package is used to indicate whether the data segment sequence received by the robot base station is synchronized with the firmware data.

11. The method according to claim 9, It is characterized in that The updating of the first data synchronization package according to the integrity information of the received data segment sequence to generate the second data synchronization package includes: Check whether each data segment in the received data segment sequence is complete to obtain integrity information; According to the integrity information, the data segment identifier of each data segment in the first data synchronization packet is adjusted to obtain a second data synchronization packet.

12. The method according to claim 9, It is characterized in that The method further comprises: In response to the breakpoint resume instruction sent by the robot, the current second data synchronization packet is fed back to the robot base station, wherein the second data synchronization packet is used to instruct the robot to update the first data synchronization packet, select the resume data segment sequence in the data segment sequence as the new infrared communication data, and resend the infrared communication data and the first data synchronization packet.

13. The method according to claim 10, It is characterized in that After updating the target software according to each of the data segments, the method further includes: If the target software is updated successfully, feedback information is sent to the robot, wherein the feedback information is used to indicate that the target software has been updated successfully.

14. A software updating device, It is characterized in that Applied to a robot, the robot and the robot base station communicate via infrared communication, and the software updating device comprises: An acquisition module, used for acquiring a data segment sequence of the target software as infrared communication data, wherein the data segment sequence is obtained by splitting each data packet, and each data packet is obtained by splitting firmware data of the target software; A data sending module, used to execute a data sending step: sending infrared communication data and a first data synchronization packet to the robot base station, wherein the robot base station is used to update the first data synchronization packet according to the integrity information of the received data segment sequence to generate a second data synchronization packet; The software update control module is used to control the robot base station to update the target software according to the second data synchronization package fed back by the robot base station.

15. A software updating device, It is characterized in that Applied to a robot base station, the robot base station and the robot communicate via infrared communication, and the software updating device comprises: A receiving module, used for receiving infrared communication data and a first data synchronization packet sent by the robot, wherein the infrared communication data is a sequence of data segments obtained by splitting each data packet, and each data packet is obtained by splitting the firmware of the target software; A synchronization package updating module, configured to update the first data synchronization package according to the integrity information of the received data segment sequence to generate a second data synchronization package; A feedback module is used to feed back the generated second data synchronization package to the robot, wherein the robot is used to control the robot base station to update the target software according to the second data synchronization package.

16. A robot comprising an infrared communication module, a navigation module, a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

17. A robot base station, comprising an infrared communication module, a charging module, a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 9 to 13 are implemented.