Unmanned aerial vehicle system upgrading method and device, equipment and storage medium
By obtaining the identification and version information of the drone device and slave device, requesting differentiated software packages from the server, and adopting dual-partition storage and differential package upgrades, the problem of low upgrade efficiency of the drone system is solved, and an efficient and reliable upgrade process is achieved.
Patent Information
- Application Number
- CN202410366522.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-28
- Publication Date
- 2025-09-30
AI Technical Summary
The existing drone system upgrade method is inefficient and usually uses a full upgrade package, resulting in low disassembly and upgrade efficiency and the risk of upgrade failure.
The drone obtains the device identification and slave device identification and software version information, sends and receives differential software packages to the server, and only upgrades the software of the slave devices that need to be upgraded, using a dual-partition storage architecture and differential package upgrade method.
It achieves differentiated upgrades of drone systems, reduces transmission resource consumption, improves upgrade efficiency, and reduces the risk of upgrade failure.
Smart Images

Figure CN120723263A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to, but is not limited to, the field of artificial intelligence technology, and in particular to a method and apparatus, equipment, and storage medium for upgrading an unmanned aerial vehicle system. Background Art
[0002] At present, with the development of UAV technology, UAVs have gradually evolved from single flight operations to flight platform systems; their hardware single payload has gradually developed into multi-payload terminal systems.
[0003] Upgrading the entire drone system usually involves both wired and wireless methods. The wired method requires staff to arrive on-site and disassemble the drone. The wireless method generally uses a ground station or remote control link to upgrade the drone, which can solve the problem of disassembly.
[0004] However, whether it is a wired or wireless method, the upgrade of the drone system is carried out in the form of a full upgrade package, that is, the software package of the entire drone system is upgraded; such upgrade efficiency is relatively low. Summary of the Invention
[0005] In view of this, an embodiment of the present invention provides a method and apparatus, device and storage medium for upgrading a drone system to solve the above technical problems.
[0006] The technical solution of the present invention is achieved as follows:
[0007] In a first aspect, an embodiment of the present invention provides a method for upgrading a drone system, which is performed by a drone and includes:
[0008] Acquire first information, where the first information includes: a device identifier of the drone, first identifiers of a first number of slave devices in the drone, and software version information corresponding to the first identifiers;
[0009] Sending first information to the server;
[0010] Receiving second information sent by the server, wherein the second information includes: a second identifier and a software package corresponding to the second identifier; the second information is determined based on the first information, and the first number of first identifiers includes the second identifier;
[0011] Based on the second information, software is upgraded for a second number of slave devices; wherein the second number is less than or equal to the first number.
[0012] In the above solution, performing software upgrade on the second number of slave devices based on the second information includes:
[0013] Based on the second identifier, sending the software package corresponding to the second identifier to the slave device corresponding to the second identifier;
[0014] Software upgrades are performed from the device based on software packages.
[0015] In the above solution, based on the second identifier, sending the software package corresponding to the second identifier to the slave device corresponding to the second identifier includes:
[0016] Splitting the software package corresponding to the second identifier to obtain a predetermined number of data frames;
[0017] A predetermined number of data frames are sent to the slave device corresponding to the second identifier in a predetermined order.
[0018] In the above solution, the slave device includes a first application and a second application; performing a software upgrade on the slave device based on the software package includes:
[0019] When it is determined that the first application program of the slave device is running, performing a software upgrade based on the software package by using the second application program of the slave device;
[0020] Alternatively, when it is determined that the second application program of the slave device is running, the software upgrade is performed based on the software package through the first application program of the slave device.
[0021] In a second aspect, an embodiment of the present invention provides a method for upgrading a drone system, which is executed by a server and includes:
[0022] Receive first information sent by at least one drone, wherein the first information includes a device identifier of the drone, a first number of first identifiers corresponding to the device identifier, and software version information corresponding to the first identifier; one first identifier is used to identify a slave device in the drone;
[0023] Determine second information based on the first information; wherein the second information includes: a second identifier and a software package corresponding to the second identifier; and the first number of first identifiers includes the second identifier;
[0024] Sending second information to the drone; wherein the second information is used by the drone to perform software upgrade on a second number of slave devices; wherein the second number is less than or equal to the first number.
[0025] In the above solution, determining the second information based on the first information includes:
[0026] Comparing software version information corresponding to at least one first identifier under the same drone with software version information corresponding to a second identifier that matches the first identifier; wherein the software version information corresponding to the second identifier and the second identifier is stored in the server;
[0027] When the software version information corresponding to the first identifier is different from the software version information corresponding to the second identifier, it is determined that the second information includes the second identifier and the software package corresponding to the second identifier.
[0028] In a third aspect, an embodiment of the present invention provides a drone system upgrade device, comprising:
[0029] an acquisition module, configured to acquire first information, wherein the first information includes: a device identifier of the drone, first identifiers of a first number of slave devices in the drone, and software version information corresponding to the first identifiers;
[0030] A first sending module, configured to send first information to a server;
[0031] a first receiving module configured to receive second information sent by the server, wherein the second information includes: a second identifier and a software package corresponding to the second identifier; the second information is determined based on the first information, and the first number of first identifiers includes the second identifier;
[0032] The first processing module is configured to perform software upgrade on a second number of slave devices based on the second information; wherein the second number is less than or equal to the first number.
[0033] In a fourth aspect, an embodiment of the present invention provides a drone system upgrade device, comprising:
[0034] A second receiving module is configured to receive first information sent by at least one drone, wherein the first information includes a device identifier of the drone, a first number of first identifiers corresponding to the device identifier, and software version information corresponding to the first identifier; one first identifier is used to identify a slave device in the drone;
[0035] A second processing module is configured to determine second information based on the first information; wherein the second information includes: a second identifier and a software package corresponding to the second identifier; and the first number of first identifiers includes the second identifier;
[0036] The second sending module is used to send second information to the drone; wherein the second information is used by the drone to upgrade the software of a second number of slave devices; wherein the second number is less than or equal to the first number.
[0037] In a fifth aspect, an embodiment of the present invention provides a device comprising a processor and a memory for storing a computer program that can be run on the processor; wherein, when the processor is used to run the computer program, the drone system upgrade method described in any embodiment of the present invention is implemented.
[0038] In a sixth aspect, an embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium contains computer executable instructions, and the computer executable instructions are executed by a processor to implement the drone system upgrade method described in any embodiment of the present invention.
[0039] In the seventh aspect, an embodiment of the present invention further provides a computer program product, including a computer program or instructions. When the computer program is executed by a processor, it implements the drone system upgrade method described in any embodiment of the present invention.
[0040] In an embodiment of the present invention, a drone obtains first information, wherein the first information includes: a drone device identifier, first identifiers of a first number of slave devices in the drone, and software version information corresponding to the first identifiers; and transmits the first information to a server; and receives second information from the server, wherein the second information includes: a second identifier and a software package corresponding to the second identifier; the second information is determined based on the first information, wherein the first number of first identifiers includes the second identifier; and based on the second information, performs a software upgrade on the second number of slave devices, wherein the second number is less than or equal to the first number. In this manner, the drone obtains the drone identifier, the identifiers of the slave devices in the drone, and the corresponding software version information, and transmits the drone identifier, the identifiers of the slave devices in the drone, and the corresponding software version information to the server, so that the server generates corresponding software packages based on the information and transmits them to the drone. This allows the drone to generate software for the corresponding slave devices based on the software packages, thereby meeting the differentiated upgrade requirements of each slave device in the drone. Furthermore, since the drone and the server only need to interact and upgrade the software packages of the slave devices that need to be upgraded, rather than the software packages of the entire drone system, this can reduce transmission resource consumption and improve upgrade efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A schematic diagram of the flow of the first drone system upgrade method provided in an embodiment of the present invention.
[0042] Figure 2 A schematic diagram of a drone system and server provided in an embodiment of the present invention.
[0043] Figure 3 A schematic diagram of a flow chart of a second drone system upgrade method provided in an embodiment of the present invention.
[0044] Figure 4 A schematic diagram of a slave device storage space of a drone provided in an embodiment of the present invention.
[0045] Figure 5 A schematic diagram of the current running program status provided by an embodiment of the present invention.
[0046] Figure 6 A schematic diagram of a flow chart of a third drone system upgrade method provided in an embodiment of the present invention.
[0047] Figure 7 A schematic diagram of a drone system upgrade method provided in an embodiment of the present invention.
[0048] Figure 8 A flowchart of a method for collecting slave device information of a drone system provided by an embodiment of the present invention.
[0049] Figure 9 A flowchart of a method for creating a software package provided by an embodiment of the present invention.
[0050] Figure 10 A schematic diagram of a software package downloading method provided by an embodiment of the present invention.
[0051] Figure 11 A flowchart of a method for upgrading software of a slave device provided by an embodiment of the present invention.
[0052] Figure 12 A flowchart of another method for upgrading software of a slave device provided by an embodiment of the present invention.
[0053] Figure 13 This is a schematic structural diagram of the first drone system upgrade device provided by an embodiment of the present invention.
[0054] Figure 14 This is a schematic structural diagram of a second drone system upgrade device provided in an embodiment of the present invention.
[0055] Figure 15 A schematic diagram of the hardware structure of a device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0056] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0057] In the subsequent description, the use of suffixes such as "module," "component," or "unit" to indicate components is merely to facilitate the description of the present invention and does not have any specific meaning in itself. Therefore, "module," "component," or "unit" may be used interchangeably. Furthermore, in the subsequent description, the use of prefixes such as "first" or "second" to identify information is merely to facilitate the description of the present invention and does not have any specific meaning in itself. Furthermore, in the subsequent description, "at least one" refers to one or more, and "a plurality" refers to two or more. "At least one" means one or more, and "a plurality" means two or more.
[0058] In some embodiments, drone system upgrades are performed using a full upgrade package, which is inefficient. The upgrade process typically uses a primary partition and a backup partition. The downloaded upgrade package is stored in the backup partition and then copied to the primary partition after the download is complete. This copying process is prone to errors, increasing the risk of upgrade failure.
[0059] like Figure 1 As shown, an embodiment of the present invention provides a method for upgrading a drone system, comprising the following steps:
[0060] Step S11: Acquire first information, wherein the first information includes: a device identifier of the drone, first identifiers of a first number of slave devices in the drone, and software version information corresponding to the first identifiers;
[0061] Step S12: Sending first information to the server;
[0062] Step S13: receiving second information sent by the server, wherein the second information includes: a second identifier and a software package corresponding to the second identifier; the second information is determined based on the first information, and the first number of first identifiers includes the second identifier;
[0063] Step S14: Based on the second information, perform software upgrade on a second number of slave devices; wherein the second number is less than or equal to the first number.
[0064] The drone system upgrade method provided in embodiments of the present invention can be performed by a drone; the drone includes or is provided with a terminal. Optionally, the terminal can be any device or module having a processor, processing chip, or processing functionality; or it can be any mobile or fixed device. For example, the terminal can be, but is not limited to, at least one of the following: a mobile communication device, a computer, a server, and / or a tablet computer.
[0065] In some embodiments, the drone also includes at least one slave device; each slave device performs different functions. The terminal in the drone establishes a communication connection with at least one slave device; at least one slave device may or may not establish a communication connection with each other. Optionally, the slave device can be a device, module, or module that performs a certain function; for example, the slave device can be used to perform functions such as flight, image acquisition, image processing, and / or charging. For example, the slave device can be a flight module, a camera module, and / or a charger. Here, the communication connection can be through a hardware interface connection or a wireless communication connection.
[0066] In some embodiments, the server may be a cloud server or a local server; the server establishes a communication connection with the drone. Alternatively, the server may be a computer, etc.
[0067] For example, Figure 2 As shown, a schematic diagram of a drone system and server is provided; the drone system (i.e., the drone) includes a communication terminal, a flight control terminal, a gimbal payload, and an image processing terminal, etc.; the communication terminal establishes communication connections with the flight control terminal, the gimbal terminal, and the image processing terminal respectively; and a communication connection is established between the drone and the server. Optionally, the communication terminal can be a 5G airborne communication terminal; and the server can be a drone upgrade server. Here, the flight control terminal, gimbal payload, and image processing terminal can all be the slave devices in the above embodiments.
[0068] In some embodiments, the device identifier can be used to uniquely identify the drone. Optionally, the device identifier can be any string, number, index, or name. For example, the device identifier can be a device model or device number.
[0069] In some embodiments, the first identifier can be used to uniquely identify a slave device in the drone. Optionally, the first identifier can be any string, number, index, or name. For example, the first identifier can be a slave device model or slave device number.
[0070] In some embodiments, software version information can be used to identify the software version. Optionally, the software version information can be a version number or information describing the content of the software. Optionally, the version number can be used to uniquely identify the software version; for example, the version number can be any string, number, index, or name.
[0071] In some embodiments, both the first number and the second number can be one or more; a plurality refers to two or more.
[0072] In some embodiments, step S11 may further include obtaining the device model of the drone, the version number of the drone, the device model of the slave device, and / or the version number of the slave device. Here, the first information may further include obtaining the device model of the drone, the version number of the drone, the device model of the slave device, and / or the version number of the slave device. Here, the version number of the drone may represent the software version of the entire drone.
[0073] For example, as shown in Table 1, information about a slave device is provided. In Table 1, the "Device Identifier" may be the first identifier in the above embodiment; the "Device Number" may be the serial number of the slave device in the drone; and the "Name" may include the first identifier, device model, and version number of the slave device.
[0074]
[0075] Table 1
[0076] For example, as shown in Table 2, information of a drone and its slave devices is provided. In Table 2, "device unique identifier" can be the device identifier in the above embodiment.
[0077]
[0078] Table 2
[0079] In some embodiments, obtaining the first information in step S11 may be: the terminal in the drone obtains the first identifier of the slave device and / or software version information corresponding to the first identifier through a hardware interface corresponding to the slave device.
[0080] For example, after the drone system is powered on, each slave device performs its own system initialization. Simultaneously, each slave device (e.g., device 1 and / or device 2) reports data to the 5G airborne communication terminal via a hardware interface. The 5G airborne communication terminal aggregates the data received from each slave device (e.g., into a table) and reports the aggregated data to the drone upgrade server via the 5G cellular network. Alternatively, the hardware interface may be a serial port, an Ethernet port, and / or a controller area network (CAN).
[0081] In some embodiments, the software package is used for software upgrade. In the embodiments of the present invention, the software package can be called an upgrade package or a differential package.
[0082] In some embodiments, the second identifier may be one or more of the first number of first identifiers. For example, after receiving the first information, the server determines the first identifier included in the first information; searches for an identifier identical to the first identifier from stored identifiers; if it is determined that the software version information corresponding to the first identifier is different from the software version information of the identifier stored in the server, the first identifier is determined to be the identifier; and the server sends the second identifier and the software package corresponding to the second identifier to the drone.
[0083] In some embodiments, one drone sends the first information to the server; or, multiple drones send the first information to the server. Here, if only one drone sends the first information to the server, the first information in step S12 may not include the device identifier; or, if the first identifier of a slave device can be used to distinguish the drone to which the slave device belongs, the first information in step S12 may not include the device identifier.
[0084] In an embodiment of the present invention, a drone can obtain first information, including the drone's identifier, the identifiers of slave devices within the drone, and corresponding software version information. This first information is then reported to a server, allowing the server to generate a corresponding software package based on this information and transmit it to the drone. This allows the drone to generate software for the corresponding slave devices based on the software package, thereby meeting the differentiated upgrade requirements of each slave device within the drone. Furthermore, because the drone and server only need to interact and upgrade the software packages of the slave devices that require upgrading, rather than interacting and upgrading the software packages of the entire drone system, this can reduce transmission resource consumption and improve upgrade efficiency.
[0085] like Figure 3 As shown, in some embodiments, step S14 includes:
[0086] Step S141: Based on the second identifier, the software package corresponding to the second identifier is sent to the slave device corresponding to the second identifier;
[0087] Step S142: Perform software upgrade based on the software package by the slave device.
[0088] Optionally, if the drone determines that the second identifier is one, it performs a software upgrade on the slave device corresponding to the one second identifier.
[0089] Optionally, if the drone determines that there are multiple second identifiers, it can perform software upgrades on the slave devices corresponding to the multiple second identifiers respectively. Exemplarily, performing software upgrades on multiple slave devices can be: performing software upgrades on multiple slave devices at the same time, or performing software upgrades on multiple slave devices in a predetermined order. The predetermined order can be: the order of the proportion of the software packages of the multiple slave devices from small to large, the order of the numbers of the first identifiers of the multiple slave devices from small to large, the order of the time when the multiple slave devices receive the software packages, or the order of the user input operation instructions, etc. In this way, when multiple slave devices need software upgrades, the software upgrades can be performed in a certain order, thereby minimizing the impact of the upgraded slave devices on the non-upgraded slave devices; or the software upgrades can be performed on multiple slave devices at the same time, thereby completing the software upgrade as soon as possible.
[0090] Optionally, step S141 includes: splitting the software package corresponding to the second identifier to obtain a predetermined number of data frames; and sending the predetermined number of data frames to the slave devices corresponding to the second identifier in a predetermined order.
[0091] Optionally, the predetermined number is the ratio of the number of bits in the software package to the number of bits in a data frame, or the predetermined number is the ratio of the number of bytes in the software package to the number of bytes in a data frame. Here, the number of bits or bytes in a data frame may be the number of bits or bytes of the maximum payload of a data frame, respectively. Exemplarily, the predetermined number of data frames may be: Wherein, B is a predetermined number, u is the bytes of the maximum payload of a data frame, and f is the bytes of the software package of the slave device.
[0092] In other embodiments, the predetermined number may also be the ratio of the number of bits in the software package to the number of bits in the multi-frame data frame; the multi-frame may be predefined, such as 2 frames, 3 frames, or 4 frames.
[0093] Optionally, the predetermined number can be determined based on user input, pre-set, or determined based on the number of bits occupied by the software package. For example, if the predetermined number is determined based on the number of bits occupied by the software package, the number of bits occupied by the software package can be positively correlated with the predetermined number.
[0094] In an embodiment of the present invention, the software package of the slave device can be split into a predetermined number of data frames for transmission, so that the data package can be sent from the terminal device in the drone to each slave device to facilitate the software package upgrade of each slave device; thereby greatly improving the download efficiency of the software package and improving the upgrade efficiency.
[0095] In some embodiments, the slave device includes a first application and a second application; step S142 includes:
[0096] When it is determined that the first application program of the slave device is running, performing a software upgrade based on the software package through the second application program of the slave device; or
[0097] When it is determined that the second application program of the slave device is running, the software upgrade is performed based on the software package through the first application program of the slave device.
[0098] Optionally, the slave device may include multiple applications, which may be the 1st to Nth applications; N is an integer greater than 1; when any number of the multiple applications are running, other applications that are not running can be upgraded based on the software package.
[0099] Optionally, the storage space in the slave device of the drone can be partitioned into system partitions, which may include a firmware boot area, a flag area, a differential packet area, a first application and / or a second application. Figure 4 As shown, the storage space of the slave device includes a firmware boot area, a flag bit area, a differential package area, application 1, and application 2; application 1 can be the first application in the above embodiment, and application 2 can be the second application in the above embodiment. The fixed boot area is the area that the entire system enters first after power-on and boots the application to be executed. The flag bit area contains relevant tags of the slave device system (such as device identification, device model, or first identification, etc.), and different relevant tags are used to indicate that different applications are running. The differential package area represents the storage area where the slave device stores software packages or differential packages. Application 1 and Application 2 are the main programs running in the system. When the slave device needs to be upgraded and is running application 1 at the same time, the software package is downloaded from the slave device and the software upgrade is performed through application 2 to obtain the upgraded application 2. Alternatively, when the slave device needs to be upgraded and is running application 2 at the same time, the software package is downloaded from the slave device and the software upgrade is performed through application 1 to obtain the upgraded application 1. This upgrade method in the embodiment of the present invention can have low requirements for the storage space of the slave device and can quickly download the software package; at the same time, the master-slave mode of application 1 and application 2 does not require program copying, which can reduce the probability of upgrade errors and facilitate rollback, so that when a problem occurs in the upgrade of one of the applications, other applications can be used to work.
[0100] For example, Figure 5 As shown, if the current running program flag is 1, it indicates that application 1 is running; or if the current running program flag is 2, it indicates that application 2 is running. Here, by having applications 1 and 2 serve as the primary and backup for each other, the firmware can be isolated, which can reduce the probability of upgrade errors and facilitate rollback.
[0101] As shown in Table 3, the flags of a slave device n of a drone are provided, where n is a positive integer. The flags include a device identifier, device model, version number, upgrade status identifier, integrity check identifier, storage space size identifier, and upgrade software space size identifier. The upgrade status identifier, when taking different values, indicates different software upgrade states. For example, a 1 indicates the software is being upgraded; a 2 indicates a successful upgrade; a 3 indicates a failed upgrade; or a 4 indicates the software is pending an upgrade. The integrity check identifier, when taking different values, indicates the software package verification state. For example, a 1 indicates the software package is pending verification; a 2 indicates the software package verification is successful; or a 3 indicates the software package verification failed. The storage space size identifier indicates the slave device's storage space size; the upgrade software space size identifier indicates the actual size of the software package being obtained remotely. The currently running program flag indicates the currently running application.
[0102]
[0103] Table 3
[0104] In an embodiment of the present invention, a dual-partition architecture may be adopted, that is, the storage space of the slave device is partitioned into partitions including at least a first application and a second application, thereby facilitating software package upgrades through the second application while the first application is running, or software package upgrades through the first application while the second application is running; in this way, the problems of continued downloading and software version rollback can be solved during the upgrade process of the slave device.
[0105] Furthermore, the slave device in the embodiment of the present invention is provided with a flag bit area, and the flag bit value can indicate the running application, and does not need to fix the original system firmware space and the original system firmware backup package space, so the operation is more flexible.
[0106] It should be noted that the following description of the drone system upgrade method executed by a server is similar to the description of the drone system upgrade method executed by a drone described above. The beneficial effects of the drone system upgrade method executed by a drone are not described in detail here. For technical details not disclosed in the embodiment of the drone system upgrade method executed by a server of the present invention, please refer to the description of the embodiment of the drone system upgrade method executed by a drone of the present invention.
[0107] like Figure 6 As shown, an embodiment of the present invention provides a method for upgrading a drone system, comprising:
[0108] Step S21: receiving first information sent by at least one drone, wherein the first information includes a device identifier of the drone, a first number of first identifiers corresponding to the device identifier, and software version information corresponding to the first identifier; one first identifier is used to identify a slave device in the drone;
[0109] Step S22: Determine second information based on the first information; wherein the second information includes: a second identifier and a software package corresponding to the second identifier; and the first number of first identifiers includes the second identifier;
[0110] Step S23: Send the second information to the drone; wherein the second information is used by the drone to perform software upgrade on a second number of slave devices; wherein the second number is less than or equal to the first number.
[0111] The drone system upgrade method provided in the embodiment of the present invention can be executed by a server. The server can be a cloud server or a local server.
[0112] In an embodiment of the present invention, the drone, slave device and server may respectively be the drone, slave device and server in the above-mentioned embodiment; the first information and the second information may respectively be the first information and the second information in the above-mentioned embodiment; the first identifier, the second identifier and the device identifier may respectively be the first identifier, the second identifier and the device identifier in the above-mentioned embodiment; the software version information may be the software version information in the above-mentioned embodiment.
[0113] In some embodiments, determining the second information based on the first information in step S22 includes:
[0114] Comparing software version information corresponding to at least one first identifier under the same drone with software version information corresponding to a second identifier that matches the first identifier; wherein the software version information corresponding to the second identifier and the second identifier is stored in the server;
[0115] When the software version information corresponding to the first identifier is different from the software version information corresponding to the second identifier, it is determined that the second information includes the second identifier and the software package corresponding to the second identifier.
[0116] Optionally, the server stores software version information of at least one slave device of at least one drone.
[0117] Optionally, the software version information corresponding to at least one first identifier under the same drone is compared with the software version information corresponding to the first matching second identifier, which can be: searching for the second identifier that matches the first identifier from the server in a polling manner, and then comparing the software version information corresponding to the first identifier with the software version information of the second identifier to see if they are the same. For example, the first identifier includes identifier 1, identifier 2, and identifier 3; after receiving the first identifier, the server searches for an identifier that is identical to identifier 1 from at least one second identifier based on identifier 1. If there is an identifier that is identical to identifier 1 in the second identifier, the software version information of the identifier in the second identifier is compared with the software version information of identifier 1 in the first identifier; and so on. The server also determines whether the software version information corresponding to other identifiers in the first identifier (such as identifier 2 and identifier 3) is the same as the software version information of the identifier that matches the second identifier.
[0118] In an embodiment of the present invention, the software version information of the first identifier of the drone obtained by the server can be compared with the software version information corresponding to the second identifier to determine the software package of the slave device that needs to upgrade the software, that is, a differential package is produced by differential means; in this way, the software package of the slave device is sent to the drone, thereby eliminating the need to send the entire drone software package to the drone, which can reduce the consumption of transmission resources and improve the efficiency of subsequent drone software upgrades.
[0119] Moreover, when the server determines that the software version information corresponding to the first identifier is different from the software version information corresponding to the second identifier, it determines that the software version information corresponding to the slave device corresponding to the first identifier is not the latest software version information; in this way, it is determined that the second information includes the second identifier and the software package corresponding to the second identifier, so that the drone can obtain the software package that needs to be updated from the slave device, so that the slave device can implement software upgrade.
[0120] It should be noted that those skilled in the art will understand that the method provided in the embodiment of the present invention may be executed alone or together with some methods in the embodiment of the present invention or some methods in related technologies.
[0121] In order to further explain any embodiment of the present invention, a specific embodiment is provided below.
[0122] like Figure 7As shown, the drone system upgrade method provided by the embodiment of the present invention is mainly divided into three parts: the first part, the second part and the third part; wherein, the first part includes the collection of drone system equipment information; the second part includes the creation and downloading of software packages; the third part includes firmware upgrades; here, the drone's slave device reports information to the drone's communication terminal (such as a 5G communication terminal), and the drone's communication terminal reports the collected information to the server; the server creates a software package for software upgrades and sends the software package to the drone's communication terminal; the drone's communication terminal obtains the software package and sends the software package to the slave device; the slave device performs firmware upgrades, such as performing software upgrades. Optionally, the communication terminal (such as a 5G communication terminal) can be the drone or drone's terminal in the above embodiment; the server can be an upgrade server.
[0123] like Figure 8 As shown, a method for collecting slave device information of a drone system is provided, comprising the following steps: Step S301, powering on the drone system; Step S302, the drone's communication terminal obtaining information such as software version information and a first identifier of each slave device; Step S303, the drone's communication terminal summarizing drone information (including the drone's device identifier, the slave device's software version information, and the first identifier); Step S304, the drone's communication terminal reporting the drone information to a server. Optionally, the drone information may be the first information in the above-mentioned embodiment.
[0124] Optionally, after the drone is powered on, each slave device performs system initialization, and each slave device (for example, device 1 and / or device 2, etc.) reports information to the drone's communication terminal through a hardware interface (for example, a serial port, a network port and / or a CAN, etc.) in accordance with Table 1 above; the drone's communication terminal summarizes the information received from each slave device into a general representation, as shown in Table 2 above, and reports it to the server through the network (for example, a 5G cellular network).
[0125] Optionally, after the drone is powered on using a network (e.g., a 5G network), it automatically collects software version information for each slave device in the drone. A server creates different software packages for different drones, downloads the software packages over the network, and then upgrades each device in the drone separately. This improves upgrade efficiency. Software packages can also be referred to as firmware packages, upgrade packages, or differential packages. The upgrade method provided by the embodiments of the present invention can upgrade multiple slave devices on different drones. By identifying each slave device in the system and adopting a dual-partition architecture for the slave devices, each slave device is provided with an abnormal upgrade method, solving the problems of continued transmission during the upgrade process and version rollback. Conventional drones use ground stations or remote controllers to upgrade drones. The solution of the embodiments of the present invention obtains drone system software version information in real time through a remote server and upgrades the drone over the network (e.g., a 5G network), making the operation very convenient and improving production efficiency. The drone's communication terminal can obtain software version information for different modules (i.e., slave devices) within the drone in real time and report it to the server. The server generates different software packages based on the supported upgrades and sends them to the drone's communication terminal, thus supporting the differentiated upgrade requirements of different drones' communication terminals.
[0126] like Figure 9 As shown, an embodiment of the present invention provides a software package production method, which is executed by a server. The software package may be an upgrade package. The software package production method may be: the server receives information about the slave devices of the drone sent by the communication terminal of the drone (such as a summary table); the server polls the slave device according to the device identifier (such as the first identifier) in the table, and compares it with the corresponding version number in the server (such as software version information). If there is any inconsistency, it is necessary to produce a software package (i.e., a differential package or an upgrade package), and finally produce a software package for the slave device of the drone; the software package production method includes the following steps:
[0127] Step S401, initialize i=j=k=n=x=0.
[0128] Optionally, after the server's software package creation module begins, it initializes relevant flags, such as flags i, j, k, and n. Here, x represents the number of drones that need to be upgraded; k represents the kth drone system; i represents the i-th slave device in the drone system; j represents the software version information (such as differential information) of the j-th slave device in the upgrade service, and n and x are intermediate marking symbols. Each drone slave device system compiles and generates a firmware package to be upgraded (such as the first information) and uploads it to the server. Here, x, i, j, k, and n can all be integers; upon initialization, x, i, j, k, and n can all be 0.
[0129] Step S402: Obtain the latest software packages of M slave devices and denote them as upgrade_service_pack_list{j}.
[0130] Optionally, the server records the latest software packages upgrade_service_pack_list{i} (0 <= i <= M) of M slave devices.
[0131] Step S403: The server receives the information reported by the communication terminal of the drone and records the corresponding list, which is List{SN(k)list{i}}, and at the same time determines whether SN exists. If not, update the device quantity P of the upgrade server.
[0132] Optionally, after the drone is powered on, the communication terminal of the drone collects software version information of each slave device in the drone (see Table 2 for details), and the communication terminal of the drone sends the collected information to the server; after the server receives the information, it is recorded as List{SN(k)list{i}} (0 <= k <= M, 0 <= i <= P); where, SN(K) represents the identifier of the Kth drone, SN is the unique identifier of the communication terminal of the drone; list{i} represents the information list of each slave device in the drone, and P is the number of different SN numbers reported by the communication terminals of different drones received by the server.
[0133] Step S404: Determine whether List{SN(k)list{i.Vesrsion}} == upgrade_service_pack_list(j.Version)?, and execute i++, j++; if not, execute Step S405, if so, execute Step S406.
[0134] Optionally, the server polls each drone and compares the software version information of the slave devices in each drone; that is, determine whether the software version information (List{SN(k)list{i.Vesrsion}}) of the ith slave device of the kth drone sent by the communication terminal of the drone is equal to the software version information (upgrade_service_pack_list(j.Version)) of the ith slave device of the kth drone in the server (List{SN(k)list{i.Vesrsion}} == upgrade_service_pack_list(j.Version)?); and execute i++, j++; if not, execute Step S405, if so, execute Step S406. Here, i++ means adding 1 to the value of i; j++ means adding 1 to the value of j. i++, that is, i = i + 1; j++, that is, j = j + 1.
[0135] Step S405, generate the software package for slave device i and execute n++. Here, n++ means adding 1 to the value of n.
[0136] Optionally, if the server determines that the software version information of the i-th slave device of the k-th drone sent by the communication terminal of the drone is not equal to the latest software version information of the i-th slave device of the k-th drone in the server, it means that a software package (i.e., upgrade package or differential package) for slave device i needs to be made; the server generates the software package for slave device i and executes n++.
[0137] Step S406, determine whether i is less than M; if so, execute step S404; if not, execute step S407.
[0138] Optionally, if the server determines that the software version information of the i-th slave device of the k-th drone sent by the communication terminal of the drone is equal to the latest software version information of the i-th slave device of the k-th drone in the server, or i is greater than M, it is determined that there is no need to make a software package for slave device i.
[0139] Here, determine whether i is less than or equal to M. If the result is yes, it means that the software version of the slave devices of one drone has not been compared completely, and return to the process of comparing the software version information of the slave devices in each drone; or, if the result is no, it means that the software version information of the slave devices of this drone has been compared completely.
[0140] Step S407, determine whether n is greater than 0; if so, execute step S408, if not, execute step S410.
[0141] Step S408, generate the software package for each slave device and execute x++. Here, x++ means adding 1 to the value of x; the software package can refer to an upgrade package or a differential package.
[0142] Step S409, execute k++. Here, k++ means adding 1 to the value of k.
[0143] Step S410, determine that there is no need to upgrade.
[0144] Optionally, the server determines whether n is greater than 0. If the result is yes, it means that the slave devices of this drone need to be upgraded, make the software package denoted as Diff_list{n} (0 < n <= M), and execute k++; or, if the result is no, it means that the slave devices of this drone do not need to be upgraded.
[0145] Step S411, determine whether k is less than P; if so, execute step S404, if not, execute step S412.
[0146] Optionally, the server determines whether k is less than P; if so, it means that all online drones have not been compared, and the process returns to step S404; if not, it means that all online drones have been compared, and then it is determined whether x is greater than 0.
[0147] Step S412, determine whether x is greater than 0; if so, execute step S413, if not, execute step S414.
[0148] Step S413: Generate a software package for each drone, recorded as Diff_list{SN(k)Diff_list{n}}.
[0149] Step S414: Determine that no upgrade is required.
[0150] Optionally, the server determines whether x is greater than 0. If so, it indicates that there is a drone that needs to be upgraded, and the corresponding information can be marked as Diff_list{SN(k)Diff_list{n}}; otherwise, if the result is no, it indicates that there is no drone that needs to be upgraded in the entire drone list. SN(k) represents the SN corresponding to the k-th drone, and Diff_list{n} represents the software packages of n slave devices.
[0151] Step S415, end the process.
[0152] In an embodiment of the present invention, the server can create a differential software package for at least one drone, thereby supporting differentiated upgrade requirements of different drones.
[0153] like Figure 10 As shown, an embodiment of the present invention provides a software package downloading method, which is executed by a communication terminal of a drone (i.e., the drone in the above embodiment); the software package downloading method includes the following steps:
[0154] Step S501, initialize a=b=0.
[0155] Optionally, after the drone is powered on, the drone's communication terminal initializes the a and b marks to 0, where a is the number of response instructions; b is the number of data frames, b is greater than or equal to 0 and less than or equal to B; and B is the maximum number of data frames.
[0156] Step S502: reporting information and waiting for the server to respond.
[0157] Optionally, the communication terminal of the drone reports information (for example, first information including a device identifier, a first identifier and / or software version information corresponding to the first identifier), and waits for a server response instruction.
[0158] Step S503, determine whether k is less than or equal to 5; if not, execute step S504; if so, execute step S505.
[0159] Step S504: Determine if the response times out.
[0160] Optionally, the communication terminal of the UAV determines whether the received response instruction appears 5 times in a row, and if so, determines that the response has timed out; or, if not, determines whether the response exceeds 10 seconds (s).
[0161] Here, whether the response instruction appears five times consecutively can also be determined by whether the response instruction appears once or multiple times consecutively. For example, if the communication terminal of the drone determines that the number of received response instructions is greater than or equal to a predetermined number, it determines that the response has timed out. Here, the predetermined number can be any number, such as 2, 3, 4, 5, 6, or 8 times.
[0162] Step S505, determine whether the response instruction exceeds 10 seconds; if so, execute step S503, if not, execute step S506;
[0163] Optionally, the communication terminal of the drone determines whether the response instruction has timed out for five consecutive times. If the result is yes, it means that the server has no response and the process ends; or, if the result is no, it determines whether an upgrade instruction has been received.
[0164] Here, whether the response instruction exceeds 10 seconds can also be replaced by whether the response instruction exceeds a predetermined time. For example, if the drone's communication terminal determines whether the response instruction exceeds a first predetermined time, it determines that the response has timed out. Here, the first predetermined time can be any time, such as 3 seconds, 5 seconds, 10 seconds, or 15 seconds. Here, the response instruction exceeds the first predetermined time, which means that the response instruction appears for a period exceeding the first predetermined time; for example, the response instruction appears for more than 10 seconds.
[0165] Step S506, based on the response instruction, determine whether an upgrade is required; if so, execute step S507; if not, execute step S516.
[0166] Step S507: Download the software package from the server and record the number of upgraded slave devices as N, which is recorded as Diff_list{n}.
[0167] Optionally, the drone's communication terminal receives the response instruction and determines whether the response instruction is an upgrade instruction (e.g., whether the response instruction indicates that an upgrade is required). If it is not an upgrade instruction, the drone does not need to be upgraded, and the process ends. Alternatively, if it is an upgrade instruction, the drone needs to be upgraded, and a file transfer is performed between the drone's communication terminal and the server. For example, the drone's communication terminal downloads and obtains the software package for each slave device that needs to be upgraded, where the number of upgraded slave devices is N, and the slave device information is recorded as Diff_list{n}.
[0168] Step S508: Send an upgrade instruction to the slave device n.
[0169] Optionally, the communication terminal of the drone communicates with the slave device n of the drone via (serial port / network port / CAN, etc.), and interacts in sequence using the first identifier; the communication terminal of the drone sends an upgrade instruction to the slave device n;
[0170] Step S509 , the slave device n determines whether a response frame is received within 10 seconds; if not, execute step S504 ; if so, execute step S510 .
[0171] Step S510: Split the software package of slave device n into B data packages.
[0172] Optionally, the slave device of the drone determines whether it has received a response frame sent by the communication terminal of the drone within 10 seconds. If the result is no, it is determined that the response has timed out, and the process ends; or, if the result is yes, the communication terminal of the drone splits the software package of the slave device n in the following manner: Wherein, B is the predetermined number or the number of data frames in the above embodiment, u is the bytes of the maximum payload of a data frame, and f is the bytes of the software package of the slave device.
[0173] Here, the drone's slave device determines whether it has received a response frame from the drone's communication terminal within 10 seconds. Alternatively, the drone's slave device can determine whether it has received a response frame from the drone's communication terminal within a second predetermined time. Here, the second predetermined time can be any time, such as 3 seconds, 6 seconds, 10 seconds, or 15 seconds.
[0174] Step S511: Send a data frame to slave device n and execute b++. Here, b++ means the value of b is increased by 1; b++ means b=b+1.
[0175] Optionally, the communication terminal of the drone sends data to the slave device n through a data frame and executes b++.
[0176] Step S512, determine whether the slave device n responds within 10 seconds; if so, execute step S513, if not, execute step S504.
[0177] Step S513, determine whether b is less than or equal to B; if so, execute step S514, if not, execute step S511.
[0178] Step S514: The software package download from device n is completed, and n++ is executed.
[0179] Optionally, the communication terminal of the drone waits for a response from the slave device within 10 seconds. If no response occurs, the response times out and the process ends. Alternatively, if no timeout occurs, the drone determines whether b is less than or equal to B. If the result of the drone communication terminal determining whether b is less than or equal to B is no, it indicates that the data in the software package of slave device n has not been fully transmitted and the transmission continues. Alternatively, if the result is yes, it indicates that the download of the software package of slave device n is complete.
[0180] Here, the communication terminal of the drone waits for a response from the device within 10s, and the communication terminal of the drone waits for a response from the device within a third predetermined time; the third predetermined time can be any time, for example, 3 seconds, 6 seconds, 8 seconds, 10 seconds or 15 seconds, etc.
[0181] Step S515, determine whether n is less than or equal to N; if so, execute step S508, if not, execute step S516.
[0182] Step S516, end the process.
[0183] Optionally, the communication terminal of the drone determines whether n is less than or equal to N. If the result is yes, it is necessary to return to step S508; or, if the result is no, it indicates that the software package of the slave device that needs to be upgraded of the drone has been downloaded, and the process ends.
[0184] In an embodiment of the present invention, after the communication terminal of the drone receives the software package for upgrading the drone from the server, it can split the software package and send it to each slave device of the drone that needs to be upgraded, so that each slave device of the drone can complete the software upgrade independently, thereby meeting the differentiated upgrade requirements of different slave devices in the drone.
[0185] like Figure 11 As shown, an embodiment of the present invention provides a method for upgrading software of a slave device, which is executed by the slave device of the drone, comprising the following steps:
[0186] Step S601: read the flag bit of the slave device and report the information of the slave device.
[0187] Optionally, after the slave device of the drone is powered on, it first enters the firmware boot mode, and reads the flag bit of the slave device in Table 3 above, and reports the information represented by the device identification, device model, version number, upgrade status table identification, storage space size identification, etc. to the communication terminal of the drone; the communication terminal of the drone will obtain the version number of the slave device, and compare the version number of the slave device with the corresponding version number in the server. If it is determined that the version number in the server is inconsistent with the version number of the slave device (for example, the version number obtained from the server is greater than the version number of the slave device), the slave device needs to be upgraded; at this time, the communication terminal of the drone can send a frame of upgrade instruction whether to start the upgrade within the fourth predetermined time; or, if it is determined that the version number in the server is consistent with the version number of the slave device, the communication terminal of the drone does not send an upgrade instruction.
[0188] Optionally, the fourth predetermined time may be any time; for example, the fourth predetermined time may be 5 seconds, 8 seconds, 10 seconds or 15 seconds, etc.
[0189] In step S602, the slave device determines whether it receives an upgrade instruction within 10 seconds of powering on; if not, execute step S603; if so, execute step S604.
[0190] Here, the slave device determining whether an upgrade instruction is received within 10 seconds after power-on may be replaced by the slave device determining whether an upgrade instruction is received within a fourth predetermined time after power-on.
[0191] Step S603: Return a data frame indicating that no upgrade is required, and run the program according to the flag of the currently running program.
[0192] Optionally, the upgrade instruction may be an upgrade data frame. If the slave device does not receive the upgrade instruction (or upgrade data frame), it jumps to the corresponding running application; or, if it receives the upgrade instruction (or upgrade data frame), it enters the upgrade mode.
[0193] Step S604, determine whether the software upgrade space is smaller than the software package size; if not, execute step S605; if so, execute step S620.
[0194] Step S605, determine whether the drone is flying; if not, execute step S606; if so, execute step S620.
[0195] Optionally, the slave device or the drone determines whether the drone is in flight. If the result is no, it indicates that the drone is in a non-operating state, and the upgrade is allowed; or, if the result is yes, the upgrade is not allowed.
[0196] Step S606, determine whether the last upgrade is completed; if so, execute step S607, if not, execute step S608.
[0197] Step S607: record the upgrade serial number flag bit as 0 and the upgrade flag bit as 1.
[0198] Step S608: read the value of the upgrade sequence number flag and continue the upgrade from where the last upgrade ended.
[0199] Optionally, the slave device determines whether the last upgrade is completed. If the last upgrade is completed, it means that the slave device needs to be upgraded again, and the upgrade sequence number flag (upgrade_sequence_flag used to count the number of upgrade data packets) is set to 0; and the upgrade status flag (upgrade_success) is set to 1; or, if the system did not complete the upgrade last time (such as due to a sudden power outage, communication abnormality, etc.), the system will read the value of upgrade_sequence_flag and resume the transmission of the previous software package.
[0200] Step S609, determine whether the received data frame exceeds 10 seconds; if not, execute step S610; if so, execute step S613.
[0201] Here, determining whether the slave device receives the data frame for more than 10 seconds may be replaced by determining whether the slave device receives the data frame for more than a second predetermined time.
[0202] Optionally, after the slave device enters the upgrade mode, it will wait for the communication terminal of the drone to send a data frame (the data frame is the data of the software package); there is a timeout mechanism for the slave device when waiting to receive data. If the slave device does not receive a data frame within a second predetermined time (for example, within 10 seconds) after a frame start frame, the system exits the upgrade mode; or, if a frame of data frame is received after a frame start frame, step S610 is executed.
[0203] Step S610, determine whether the data packet in the data frame is complete; if so, execute step S611, if not, execute step S612.
[0204] Optionally, if a data frame is received after a start frame, it is determined whether the data packet of the frame is complete; if the data is complete, step S611 is executed, or if the data frame is incomplete, step S612 is executed.
[0205] Step S611, determine whether it is an end frame; if not, execute step S614, if so, execute step S617;
[0206] Step S612, determine whether the error occurs five times in a row; if not, execute step S609; if so, execute step S613.
[0207] Optionally, if the data frame is incomplete and the incomplete data frame error occurs five times in a row, it means that there is physical interference on the bus, or the upgrade protocol does not match, and the upgrade will be stopped. It will then be determined whether this frame of data packet is complete.
[0208] Step S613: Exit the upgrade mode and return an error frame.
[0209] Optionally, the drone exits the upgrade mode, records upgrade_success as 3, and prompts an upgrade error and / or returns an error frame, etc. Here, when the data packet is not an upgraded data frame, the data frame is an error frame.
[0210] Step S614, determining whether it is an upgraded data frame; if so, executing step S615, if not, executing step S616;
[0211] Step S615: Write the data of the data frame into the differential packet space and set upgrade_sequence_flag++. Here, upgrade_sequence_flag++ means adding 1 to the value of upgrade_sequence_flag. Here, the data of the data frame can be at least part of the software package or the differential packet.
[0212] Alternatively, if the data packet in the data frame is complete, the data packet can be parsed to extract at least part of the content of the software package in the data frame and write at least part of the content of the upgrade package (i.e., the data in the data frame) into the differential packet space. The slave device continues to wait for a data frame.
[0213] Step S616: prompt that the data type is wrong and return an error frame.
[0214] Optionally, the slave device exits the upgrade mode, records upgrade_success as 3, and prompts a data type error and / or returns an error frame.
[0215] Step S617: determine that the upgrade status indicator is 2.
[0216] Optionally, if the drone determines that the data frame is an end frame, it indicates that the communication terminal of the drone actively initiates the end, indicating that the upgrade is completed, and the upgrade status flag is updated to upgrade_success=2.
[0217] Step S618, returning to the end frame, and performing an upgrade based on the software package; switching the flag of the currently running program.
[0218] Optionally, an end frame is returned from the device and the upgrade is performed based on the software package; the current running program flag is switched, for example, if the current running program flag is 1, it is changed to 2; if the current running program flag is 2, it is changed to 1.
[0219] Step S619: running the application program according to the currently running program flag.
[0220] Optionally, the slave device runs the application according to the current running program flag; for example, if the current running program flag is 1, the slave device runs application 1, or if the current running program flag is 2, the slave device runs application 2.
[0221] Step S620, end the process.
[0222] In an embodiment of the present invention, the slave device identifies each flag bit and adopts a dual-partition architecture to perform software upgrades, thereby restoring the software package content of the data frame that has not been upgraded locally on the device, solving the problems of resuming the upgrade process and version rollback, and providing a differential upgrade method, such as allowing one application to run normally while another application is being upgraded.
[0223] like Figure 12 As shown, an embodiment of the present invention provides a method for upgrading slave device software, which is executed by a slave device of a drone, comprising the following steps:
[0224] Step S701: Determine whether the software package download is complete.
[0225] Optionally, the slave device of the drone determines that the download of the software package is complete.
[0226] Step S702, determine whether the current running program flag is 1; if so, execute step S703, if not, execute step S704.
[0227] Step S703: Read the data in the application 1 and restore the completed software package.
[0228] Optionally, after the software package is downloaded, the slave device of the drone determines whether the value of the current running program flag (current_run_program_flag) is 1. If the value of the current running program flag is 1 (i.e., current_run_program_flag = 1), it indicates that the currently running application is application 1, then the data in the storage space of application 1 (such as the differential package space in the above embodiment) is read and restored with the downloaded software package to obtain a complete software package; or, if the value of the current running program flag is not 1, execute step S704.
[0229] Step S704, determine whether the current running program flag is 2; if so, execute step S705, if not, execute step S710.
[0230] Step S705: Read the data in the application 2 and restore the completed software package.
[0231] Optionally, the slave device of the drone determines whether the value of the current running program flag (current_run_program_flag) is 2. If the value of the current running program flag is 2 (i.e., current_run_program_flag=2), it indicates that the currently running application is application 2, then the data in the storage space of application 2 (such as the differential package space in the above embodiment) is read and restored with the downloaded software package to obtain a complete software package; or, if the value of the current running program flag is not 2, execute step S710.
[0232] Step S706: Write into the space of application 2 and set the value of the currently running program flag to 2.
[0233] Optionally, the slave device of the drone writes the complete software package into the storage space of application 2 and sets the value of the current running program flag to 2 (ie, current_run_program_flag=2).
[0234] Step S707: run application 2.
[0235] Step S708: Write into the space of application 1 and set the value of the currently running program flag to 1.
[0236] Optionally, the slave device of the drone writes the complete software package into the storage space of application 1 and sets the value of the current running program flag to 1 (ie, current_run_program_flag=1).
[0237] Step S709: run application 1.
[0238] Step S710, end the process.
[0239] Here, application 1 may be the first application in the above embodiment; application 2 may be the second application in the above embodiment.
[0240] In an embodiment of the present invention, a slave device can perform a software upgrade while another application is running, thereby isolating the firmware, reducing the probability of software upgrade errors, and facilitating firmware rollback; and can also improve the acquisition of a complete software package for upgrade through differential packets, thereby improving the rate of transmitting software packages and the efficiency of slave device upgrades.
[0241] It should be noted that those skilled in the art will understand that the method provided in the embodiment of the present invention may be executed alone or together with some methods in the embodiment of the present invention or some methods in related technologies.
[0242] It should be noted that the following description of the drone system upgrade device is similar to the description of the drone system upgrade method described above, and the beneficial effects of the same method will not be repeated here. For technical details not disclosed in the drone system upgrade device embodiment of the present invention, please refer to the description of the drone system upgrade method embodiment of the present invention.
[0243] like Figure 13 As shown, an embodiment of the present invention provides a drone system upgrade device, comprising:
[0244] An acquisition module 81 is configured to acquire first information, wherein the first information includes: a device identifier of the drone, first identifiers of a first number of slave devices in the drone, and software version information corresponding to the first identifiers;
[0245] A first sending module 82, configured to send first information to a server;
[0246] A first receiving module 83 is configured to receive second information sent by the server, wherein the second information includes: a second identifier and a software package corresponding to the second identifier; the second information is determined based on the first information, and the first number of first identifiers includes the second identifier;
[0247] The first processing module 84 is configured to perform software upgrade on a second number of slave devices based on the second information; wherein the second number is less than or equal to the first number.
[0248] In an embodiment of the present invention, the drone system upgrade device is applied in a drone or a terminal of the drone.
[0249] In some embodiments, the first processing module 84 is configured to send the software package corresponding to the second identifier to the slave device corresponding to the second identifier based on the second identifier; and perform software upgrade based on the software package on the slave device.
[0250] In some embodiments, the first processing module 84 is configured to split the software package corresponding to the second identifier to obtain a predetermined number of data frames; and send the predetermined number of data frames to the slave device corresponding to the second identifier in a predetermined order.
[0251] In some embodiments, the slave device includes a first application and a second application;
[0252] The first processing module 84 is configured to, when determining that the first application program of the slave device is running, perform a software upgrade based on the software package via the second application program of the slave device; or
[0253] The first processing module 84 is configured to perform a software upgrade based on the software package via the first application of the slave device when it is determined that the second application of the slave device is running.
[0254] like Figure 14 As shown, an embodiment of the present invention provides a drone system upgrade device, comprising:
[0255] A second receiving module 91 is configured to receive first information sent by at least one drone, wherein the first information includes a device identifier of the drone, a first number of first identifiers corresponding to the device identifier, and software version information corresponding to the first identifier; one first identifier is used to identify a slave device in the drone;
[0256] The second processing module 92 is configured to determine second information based on the first information; wherein the second information includes: a second identifier and a software package corresponding to the second identifier; and the first number of first identifiers includes the second identifier;
[0257] The second sending module 93 is used to send second information to the drone; wherein the second information is used by the drone to perform software upgrade on at least one second number of slave devices; wherein the second number is less than or equal to the first number.
[0258] In an embodiment of the present invention, the drone system upgrading device is applied in a server.
[0259] In some embodiments, the second processing module 92 is configured to compare software version information corresponding to at least one first identifier under the same drone with software version information corresponding to a second identifier that matches the first identifier; wherein the software version information corresponding to the second identifier and the second identifier is stored in the server;
[0260] The second processing module 982 is configured to determine that the second information includes the second identifier and the software package corresponding to the second identifier when the software version information corresponding to the first identifier is different from the software version information corresponding to the second identifier.
[0261] like Figure 15As shown, an embodiment of the present invention further provides a device comprising a processor 104 and a memory 102 for storing a computer program executable by the processor 102. The processor 101 is configured to execute the computer program to implement the drone system upgrade method of any embodiment of the present invention. Alternatively, the device may be a drone or a slave device within a drone, a terminal, or a server, etc., as described in the previous embodiments.
[0262] In some embodiments, the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDRSDRAM), enhanced synchronous DRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DRRAM). The memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0263] The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in the processor or by software instructions. The above processor may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The methods, steps, and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.
[0264] In some embodiments, the embodiments described herein may be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, or other electronic units or combinations thereof for performing the functions of the invention.
[0265] For software implementation, the techniques described herein can be implemented by modules (e.g., procedures, functions, etc.) that perform the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or external to the processor.
[0266] An embodiment of the present invention provides a computer storage medium, which stores an executable program. When the executable program is executed by a processor, the steps of the drone system upgrade method of any embodiment of the present invention can be implemented.
[0267] An embodiment of the present invention provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the steps of the drone system upgrade method of any embodiment of the present invention are implemented.
[0268] In some embodiments, the computer storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., various media that can store program codes.
[0269] It should be noted that the technical solutions described in the embodiments of the present invention can be arbitrarily combined without conflict.
[0270] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A method for upgrading a drone system, characterized in that: Performed by drones, including: Acquire first information, wherein the first information includes: a device identifier of the drone, first identifiers of a first number of slave devices in the drone, and software version information corresponding to the first identifiers; sending the first information to the server; receiving second information sent by the server, wherein the second information includes: a second identifier and a software package corresponding to the second identifier; the second information is determined based on the first information, and the first identifiers in the first number include the second identifier; Based on the second information, software is upgraded for a second number of the slave devices; wherein the second number is less than or equal to the first number.
2. The method according to claim 1, characterized in that The performing software upgrade on the second number of the slave devices based on the second information includes: Based on the second identifier, sending the software package corresponding to the second identifier to the slave device corresponding to the second identifier; Software is upgraded by the slave device based on the software package.
3. The method according to claim 2, characterized in that The sending, based on the second identifier, the software package corresponding to the second identifier to the slave device corresponding to the second identifier includes: Splitting the software package corresponding to the second identifier to obtain a predetermined number of data frames; The predetermined number of data frames are sent to the slave device corresponding to the second identifier in a predetermined order.
4. The method according to claim 2, characterized in that The slave device includes a first application and a second application; and performing software upgrade based on the software package by the slave device includes: When it is determined that the first application of the slave device is running, performing a software upgrade based on the software package by the second application of the slave device; or, When it is determined that the second application program of the slave device is running, the first application program of the slave device performs a software upgrade based on the software package.
5. A method for upgrading a drone system, characterized in that: Executed by the server, including: Receive first information sent by at least one drone, wherein the first information includes a device identifier of the drone, a first number of first identifiers corresponding to the device identifier, and software version information corresponding to the first identifier; one first identifier is used to identify a slave device in the drone; Determine second information based on the first information; wherein the second information includes: a second identifier and a software package corresponding to the second identifier; the first number of first identifiers includes the second identifier; The second information is sent to the drone; wherein the second information is used by the drone to perform software upgrade on a second number of the slave devices; wherein the second number is less than or equal to the first number.
6. The method according to claim 5, characterized in that The determining the second information based on the first information includes: Comparing the software version information corresponding to at least one of the first identifiers under the same drone with the software version information corresponding to the second identifier that matches the first identifier; wherein the second identifier and the software version information corresponding to the second identifier are stored in the server; When the software version information corresponding to the first identifier is different from the software version information corresponding to the second identifier, it is determined that the second information includes the second identifier and the software package corresponding to the second identifier.
7. A drone system upgrade device, characterized in that: include: an acquisition module, configured to acquire first information, wherein the first information includes: a device identifier of the drone, first identifiers of a first number of slave devices in the drone, and software version information corresponding to the first identifiers; A first sending module, configured to send the first information to a server; a first receiving module configured to receive second information sent by the server, wherein the second information includes: a second identifier and a software package corresponding to the second identifier; the second information is determined based on the first information, and the first number of first identifiers includes the second identifier; The first processing module is configured to perform software upgrade on a second number of the slave devices based on the second information; wherein the second number is less than or equal to the first number.
8. A drone system upgrade device, characterized in that: include: a second receiving module, configured to receive first information sent by at least one drone, wherein the first information includes a device identifier of the drone, a first number of first identifiers corresponding to the device identifier, and software version information corresponding to the first identifier; one first identifier is used to identify a slave device in the drone; a second processing module configured to determine second information based on the first information; wherein the second information includes: a second identifier and a software package corresponding to the second identifier; and the first number of first identifiers includes the second identifier; The second sending module is used to send the second information to the drone; wherein the second information is used by the drone to upgrade the software of a second number of the slave devices; wherein the second number is less than or equal to the first number.
9. A device, characterized in that The device includes a processor and a memory for storing a computer program that can be run on the processor; wherein, when the processor is used to run the computer program, it implements the drone system upgrade method described in any one of claims 1 to 6 or claims 7 to 8.
10. A computer storage medium, characterized in that The computer storage medium contains computer executable instructions, characterized in that the computer executable instructions are executed by a processor to implement the drone system upgrade method described in any one of claims 1 to 6 or claims 7 to 8.
11. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the drone upgrading method according to any one of claims 1 to 7 is implemented.