WO2021203384A1 - Device upgrade method and apparatus, and storage medium - Google Patents
Device upgrade method and apparatus, and storage medium Download PDFInfo
- Publication number
- WO2021203384A1 WO2021203384A1 PCT/CN2020/084052 CN2020084052W WO2021203384A1 WO 2021203384 A1 WO2021203384 A1 WO 2021203384A1 CN 2020084052 W CN2020084052 W CN 2020084052W WO 2021203384 A1 WO2021203384 A1 WO 2021203384A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- target
- local
- downstream
- upgrade
- directly connected
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 76
- 238000011144 upstream manufacturing Methods 0.000 claims description 114
- 230000005540 biological transmission Effects 0.000 claims description 69
- 238000004590 computer program Methods 0.000 claims description 57
- 238000004891 communication Methods 0.000 claims description 26
- 238000012546 transfer Methods 0.000 claims description 12
- 230000004044 response Effects 0.000 claims description 9
- 230000001960 triggered effect Effects 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 14
- 230000002093 peripheral effect Effects 0.000 description 8
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Definitions
- This application relates to the technical field of software upgrades, and in particular to a method, device and storage medium for equipment upgrade.
- the existing application APP upgrade plan is as follows: real-time monitoring of the connection status of the drone and the remote control and whether the status needs to be upgraded; when the upgrade conditions are met, each triggers the upgrade process in the module , That is, download the appropriate firmware upgrade package from the server, and transmit it to the corresponding drone and remote control in turn; after the transmission is completed, the drone and remote control are upgraded separately, and receive push notifications from the drone and remote control. Upgrade progress. If new devices are added to the drone or remote control, and multiple devices need to be upgraded at the same time, the APP needs to be transmitted and upgraded in sequence.
- the above APP upgrade solution is not suitable for the upgrade of devices with complex topologies, and cannot be selectively upgraded according to user needs, nor is it suitable for upgrading new requirements: the number of upgraded devices is large, the upgrade solution needs to maintain scalability, and it can be plugged and unplugged at any time. .
- this application provides a device upgrade method, device, and storage medium.
- this application provides a device upgrade method, which includes:
- the relevant upgrade information of the target device to be upgraded is obtained from the relevant upgrade information of the local downstream device.
- the relevant upgrade information includes the identity information of the device and the current version information of the device.
- the local downstream equipment includes equipment directly connected to the local and/or equipment connected indirectly;
- the upgrade package of the corresponding version of the target device and the identity information of the target device are transmitted to the local downstream device, so that the local downstream device can update the version corresponding to the target device according to the identity information of the target device
- the upgrade package is transmitted to the target device, so that the target device obtains the upgrade package of the corresponding version
- the target device After the target device obtains the upgrade package of the corresponding version, the target device is controlled to upgrade according to the upgrade package of the corresponding version of the target device.
- the present application provides an apparatus for upgrading equipment, the apparatus includes: a memory, a processor, and a communication circuit, the memory and the communication circuit are respectively connected to the processor;
- the memory is used to store a computer program
- the processor is used to execute the computer program and when executing the computer program, implement the following steps:
- the relevant upgrade information of the target device to be upgraded is obtained from the relevant upgrade information of the local downstream device.
- the relevant upgrade information includes the identity information of the device and the current version information of the device.
- the local downstream equipment includes equipment directly connected to the local and/or equipment connected indirectly;
- controlling the communication circuit to download the upgrade package of the corresponding version of the target device According to the current version information of the target device, controlling the communication circuit to download the upgrade package of the corresponding version of the target device;
- the target device After the target device obtains the upgrade package of the corresponding version, the target device is controlled to upgrade according to the upgrade package of the corresponding version of the target device.
- the present application 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 processor implements the method for upgrading the device as described above .
- the embodiments of the present application provide a method, a device and a storage medium for device upgrade.
- the relevant upgrade information of the target device to be upgraded is obtained from the relevant upgrade information of the local downstream device.
- the relevant upgrade information includes the identity information of the device and the current version information of the device, the local downstream device includes the device directly connected to the local and/or the device connected indirectly; according to the current version information of the target device, download all
- the upgrade package of the corresponding version of the target device; the upgrade package of the corresponding version of the target device and the identity information of the target device are transmitted to the local downstream device, so that the local downstream device is based on the identity of the target device
- the information transmits the upgrade package of the corresponding version of the target device to the target device, so that the target device obtains the upgrade package of the corresponding version; when the target device obtains the upgrade package of the corresponding version, the target device is controlled according to The upgrade package of the corresponding version of the target device is upgraded.
- the identity information and current version information of the target device to be upgraded are obtained from the relevant upgrade information of the local downstream device, and the upgrade of the corresponding version of the target device is downloaded according to the current version information of the target device Package, which transmits the upgrade package of the corresponding version of the target device and the identity information of the target device to the local downstream device, so that the local downstream device transmits the upgrade package of the corresponding version of the target device to the target device, so that the target device obtains the upgrade package of the corresponding version ;
- the target device obtains the upgrade package of the corresponding version, the target device is controlled to upgrade.
- the target device selected by the user and directly connected to the local and/or indirectly connected to the user can be upgraded according to the user’s needs. It is suitable for the upgrading of equipment with complex topological structure, and also provides technical support for the new requirements of upgrading "the number of upgraded equipment is large, the upgrade plan needs to maintain scalability, and the equipment can be plugged and unplugged at any time”.
- FIG. 1 is a schematic flowchart of an embodiment of a device upgrade method according to the present application
- FIG. 2 is a schematic diagram of an application scenario of the first method of device upgrade according to this application.
- FIG. 3 is a schematic diagram of another application scenario of the device upgrade method of this application.
- Figure 4 is a schematic diagram of the application process of the method for device upgrade of the present application in the remote control and UAV system;
- FIG. 5 is a schematic diagram of another application scenario of the device upgrade method of this application.
- FIG. 6 is a schematic diagram of a device registration and transmission registration in the method for device upgrade of this application.
- FIG. 7 is a schematic diagram of another application scenario of the device upgrade method of this application.
- FIG. 8 is a schematic diagram of another application scenario of the device upgrade method of this application.
- FIG. 9 is a schematic diagram of another application scenario of the device upgrade method of this application.
- FIG. 10 is a schematic diagram of another application scenario of the device upgrade method of this application.
- FIG. 11 is a schematic diagram of another application scenario of the device upgrade method of this application.
- FIG. 12 is a schematic structural diagram of an embodiment of an apparatus for upgrading equipment of the present application.
- Existing consumer drones have a simple topology, usually standard upgrade modules: drones and remote controls; the upgrade plan is: real-time monitoring of the connection status of drones and remote controls and whether they need to be upgraded; compliant When the condition is upgraded, the upgrade process of the drone and the remote control is triggered.
- the above-mentioned upgrade scheme is not suitable for the upgrading of equipment with complex topology, and cannot selectively upgrade the equipment according to the needs of users, nor is it suitable for upgrading new requirements. "The number of upgraded equipment is large, the upgrade scheme needs to maintain scalability, and can cope with the plugging and unplugging of equipment at any time.” .
- the embodiment of the application obtains the relevant upgrade information of the target device to be upgraded from the relevant upgrade information of the local downstream device.
- the relevant upgrade information includes the identity information of the device and the current status of the device.
- Version information, the local downstream devices include devices directly connected to the local device and/or devices connected indirectly; according to the current version information of the target device, download the upgrade package corresponding to the version of the target device;
- the upgrade package of the corresponding version and the identity information of the target device are transmitted to the local downstream device, so that the local downstream device transmits the upgrade package of the corresponding version of the target device to the local downstream device according to the identity information of the target device.
- the target device enables the target device to obtain the upgrade package of the corresponding version; when the target device obtains the upgrade package of the corresponding version, the target device is controlled to upgrade according to the upgrade package of the corresponding version of the target device.
- the identity information and current version information of the target device to be upgraded are obtained from the relevant upgrade information of the local downstream device, and the upgrade of the corresponding version of the target device is downloaded according to the current version information of the target device Package, which transmits the upgrade package of the corresponding version of the target device and the identity information of the target device to the local downstream device, so that the local downstream device transmits the upgrade package of the corresponding version of the target device to the target device, so that the target device obtains the upgrade package of the corresponding version ;
- the target device is controlled to upgrade.
- the target device selected by the user and directly connected to the local and/or indirectly connected to the user can be upgraded according to the user’s needs. It is suitable for the upgrading of equipment with complex topological structure, and also provides technical support for the new requirements of upgrading "the number of upgraded equipment is large, the upgrade plan needs to maintain scalability, and the equipment can be plugged and unplugged at any time”.
- Fig. 1 is a schematic flowchart of an embodiment of a device upgrade method according to the present application, and the method includes:
- Step S101 According to the detected user's target device selection operation, obtain relevant upgrade information of the target device to be upgraded from the relevant upgrade information of the local downstream device, the relevant upgrade information including the identity information of the device and the current version of the device Information, the local downstream device includes a device directly connected to the local device and/or a device connected indirectly.
- the local downstream device includes more than one device directly connected to the local device; also includes more than one device indirectly connected to the local device; also includes more than one device directly connected to the local device and the device indirectly connected to the local device.
- More than one device that is, the method of this embodiment may be suitable for upgrading a device with a simple topology, and also for upgrading a device with a complex topology.
- the target device to be upgraded includes the device directly connected to the local device and/or the device connected indirectly, that is, the target device may include more than one device directly connected to the local device; it also includes more than one device directly connected to the local device; It also includes more than one device directly connected to the local area and more than one device connected indirectly to the local area.
- the number of target devices is more than one, for example: one target device, two target devices, three target devices, and so on.
- a plurality of devices are organized into a tree structure according to the connection relationship to generate a device tree, the local (or client) is the root node of the device tree, and the devices on the device tree are divided into intermediate devices and /Or a leaf device, the intermediate device is downwardly connected to a downstream device (including a directly connected downstream device and/or an indirectly connected downstream device), and the leaf device has no downstream device downward.
- the application APP represents the local (user terminal) and is the root node of the device tree.
- the device tree also includes a remote control, an aircraft (drone) directly connected to the remote control, known peripherals, Unknown peripherals, known mount 1, known mount 2, unknown mount 1 directly connected to the aircraft; remote control and aircraft are intermediate devices, known peripherals, unknown peripherals, known mount 1, already Known mount 2 and unknown mount 1 are leaf devices;
- the remote control is an intermediate device directly connected to the local area, and the aircraft is an intermediate device directly connected to the local area;
- the directly connected upstream device is also the upstream device directly connected to the unknown peripheral;
- the aircraft is the upstream device directly connected to the known mount 1, and the upstream device directly connected to the known mount 2, and it is also the upstream device directly connected to the unknown mount.
- the remote control is an upstream device that is indirectly connected to a known mount 1, is also an upstream device that is indirectly connected to a known mount 2, and is also an upstream device that is indirectly connected to an unknown mount 1;
- unknown peripherals, known mount 1, known mount 2, and unknown mount 1 are leaf devices that are indirectly connected to the local device.
- the identity information of the device may be information used to identify the identity of the device, the type of the device, etc., to distinguish different devices and/or each device, such as a unique identification code, a device identification code, an IP address, and so on.
- the current version information of the device may be the version information of the application currently used by the device. According to the current version information of the device and the latest version information of the device, it can be preliminarily determined whether the device needs to be upgraded and the version information that needs to be downloaded. For example, the current version of the application of device 1 is V1, and the latest version of the application of device 1 is V2. It is preliminarily determined that device 1 needs to be upgraded. The final upgrade depends on whether the user chooses. Upgrade. If device 1 has been used more recently, you can choose to upgrade.
- the relevant upgrade information of the local downstream device (that is, the identity information of the device and the current version information of the device) is stored locally, and there are many ways to obtain it.
- the local user inputs the identity information of the device and the current version information of the device; or, locally The identity information and the starting version information of the device are pre-existing.
- the device is upgraded, the current version information of the device is correspondingly modified; or, the upgrade time is pre-appointed, and the connected device pushes its own identity information and current version information to the local at that time ; Or, pre-appoint the upgrade time and connect to the relevant device at the upgrade time; or, the connected device pushes its own identity information and current version information to the local at predetermined time intervals; etc.
- the user selects the target device that needs to be upgraded. In this way, the target device can be upgraded according to the user's needs.
- Step S102 Download an upgrade package of the corresponding version of the target device according to the current version information of the target device.
- the upgrade package of the corresponding version of the target device can be downloaded from the server.
- the version of the upgrade package of the application program of the device 1 on the server is V1 and V2, and according to the current version of the application program of the device 1 is V1, it is determined to download the upgrade package corresponding to the version V2 of the target device.
- the version of the upgrade package of the application program of the device 1 on the server is V1, V2, and V3.
- the current version of the application program of the device 1 is V1, it is determined to download the upgrade package corresponding to the version V3 of the target device.
- Step S103 The upgrade package of the corresponding version of the target device and the identity information of the target device are transmitted to the local downstream device, so that the local downstream device will transfer the target device to the target device according to the identity information of the target device.
- the upgrade package of the corresponding version is transmitted to the target device, so that the target device obtains the upgrade package of the corresponding version.
- the local downstream equipment includes equipment directly connected to the local and/or indirectly connected equipment
- the target equipment to be upgraded includes equipment directly connected to the local and/or indirectly connected equipment
- the upgrade package of the corresponding version of the target device is combined with
- the identity information of the target device is transmitted to the local downstream device, so that the local downstream device transmits the upgrade package of the corresponding version of the target device to the target device according to the identity information of the target device, and specifically transmits
- device 2 For example: if it is transferred from device 1 to device 2, and device 2 needs to be upgraded (that is, the identity information of the target device has device 2), then device 2 obtains the corresponding upgrade package (device 2 does not need to be upgraded, so this step is ignored), and then All interfaces of device 2 that can be connected to other devices send the upgrade package of the corresponding version of the target device and the identity information of the target device (because device 2 has already obtained the corresponding upgrade package, when device 2 continues to transmit, the upgrade package of the corresponding version of device 2 can be sent And the identity information of the device 2 is deleted), if the interface is connected to a downstream device, the downstream device can receive the upgrade package corresponding to the target device version and the identity information of the target device. If the interface is not connected to the downstream device, it will be transmitted to This ends.
- device 2 can detect which interfaces are connected to downstream devices, device 2 does not need to be upgraded, and sends the upgrade package of the target device's corresponding version to the interface where device 2 is connected to the downstream device.
- the identity information of the target device if you transfer from device 1 to device 2, device 2 can detect which interfaces are connected to downstream devices, device 2 does not need to be upgraded, and sends the upgrade package of the target device's corresponding version to the interface where device 2 is connected to the downstream device. The identity information of the target device.
- device 2 saves the identity information of the downstream device of device 2, and device 2 will send targeted information to the device according to the identity information of the downstream device of device 2 and the identity information of the target device.
- Directly connected downstream devices that is, downstream devices that have a direct or indirect connection with the target device transmit, but not to all directly connected downstream devices.
- Step S104 After the target device obtains the upgrade package of the corresponding version, control the target device to upgrade according to the upgrade package of the corresponding version of the target device.
- the embodiment of the application obtains the relevant upgrade information of the target device to be upgraded from the relevant upgrade information of the local downstream device.
- the relevant upgrade information includes the identity information of the device and the current status of the device.
- Version information the local downstream device includes devices directly connected to the local device and/or devices connected indirectly; according to the current version information of the target device, downloading the upgrade package corresponding to the target device's version; uploading the target device
- the upgrade package of the corresponding version and the identity information of the target device are transmitted to the local downstream device, so that the local downstream device transmits the upgrade package of the corresponding version of the target device to the local downstream device according to the identity information of the target device.
- the target device enables the target device to obtain the upgrade package of the corresponding version; when the target device obtains the upgrade package of the corresponding version, the target device is controlled to upgrade according to the upgrade package of the corresponding version of the target device.
- the identity information and current version information of the target device to be upgraded are obtained from the relevant upgrade information of the local downstream device, and the upgrade of the corresponding version of the target device is downloaded according to the current version information of the target device Package, which transmits the upgrade package of the corresponding version of the target device and the identity information of the target device to the local downstream device, so that the local downstream device transmits the upgrade package of the corresponding version of the target device to the target device, so that the target device obtains the upgrade package of the corresponding version ;
- the target device is controlled to upgrade.
- the target device selected by the user and directly connected to the local and/or indirectly connected to the user can be upgraded according to the user’s needs. It is suitable for the upgrading of equipment with complex topological structure, and also provides technical support for the new requirements of upgrading "the number of upgraded equipment is large, the upgrade plan needs to maintain scalability, and the equipment can be plugged and unplugged at any time”.
- the interface on the device may be connected to the downstream device, or may not be connected to the downstream device; it may be connected to the downstream device during this period of time, and the downstream device may not be connected to the downstream device in another period of time; it may be connected to the device locally.
- the distance is too far, and the user has no way to figure out the connection between the devices; it is possible that the situation is urgent or special equipment is plugged and unplugged at any time; etc., in order to enable the user to select the target device in a targeted manner when selecting the target device, steps Before S101, it also includes:
- Step S105 Obtain the relevant upgrade information of the local downstream device.
- the relevant upgrade information of the local downstream device can be obtained through a heartbeat packet.
- the heartbeat packet is a self-defined command word that is periodically notified to the other party of its own state between the device and the local, and is sent at a certain time interval, similar to a heartbeat, so it is called a heartbeat packet. That is, each connected device pushes a heartbeat packet to the local, so that the local device updates the relevant upgrade information of the local downstream device according to whether the heartbeat packet pushed by each device exists. In this way, the local does not need to pay attention to each device.
- the connection status of the equipment can meet the new requirements of the upgrade.
- each device can be organized to form an upgrade management list in the local APP, including the identity information of each device, whether each device needs to be upgraded, and the latest version that can be upgraded. And notify the user; update the upgrade management list according to the update pushed by the heartbeat package of each device; add a new heartbeat package, add the relevant upgrade information of the corresponding device, and delete the corresponding device when the heartbeat package expires. Relevant upgrade information); users can select the target device they need to upgrade to form a list of upgrades, and trigger the upgrade with one click.
- step S105 may specifically include: sub-step S1051 and sub-step S1052.
- Sub-step S1051 Obtain the registration command of the local downstream device, the registration command is sent by the local downstream device to register with the upstream device directly connected and/or indirectly connected with the local downstream device.
- Sub-step S1052 Obtain the relevant upgrade information of the local downstream device through the registration command of the local downstream device.
- the local downstream device may register with the upstream device directly connected to the local downstream device, for example: when the local downstream device is a leaf device, it may register directly with the local; another example: sequentially with the local
- the connected devices are device 1, device 2, and device 3.
- Device 3 registers with device 2, device 2 registers with device 1, and device 1 registers locally; among them, when device 2 registers with device 1, its registration command can be one And carry the relevant upgrade information of the device 3.
- its registration command can also carry the relevant upgrade information of the device 3 and the device 2.
- the local downstream device may also register with the upstream device indirectly connected with the local downstream device, for example: register with the upstream device indirectly connected with the local downstream device, if the upstream device is not local, no Send a response message and continue forwarding it directly to the upstream device until it is forwarded locally.
- the local feedback response message informs the downstream device that it has received the registration command locally and obtains the relevant upgrade information of the downstream device.
- the local downstream device may also register with the upstream device directly connected and indirectly connected with the local downstream device. For example: first register with the upstream device directly connected to the local downstream device, and after the registration is successful, register with the upstream device indirectly connected to the local downstream device until it is forwarded to the local, and the local feedback response message . In this way, each device can obtain relevant upgrade information of all its downstream devices, and provide technical support for subsequent purposeful and targeted forwarding.
- the registration command includes a device registration command and/or a transfer registration command
- the device registration command is the device registration of the local downstream device with the upstream device directly connected to the local downstream device.
- the registration command sent, the transmission registration command is a registration command sent by the local downstream device to transmit and register with the upstream device directly connected and indirectly connected with the local downstream device.
- it may further include: controlling the local downstream device to send the local downstream device to the upstream device directly connected to the local downstream device.
- the device registration command enables the upstream device directly connected to the local downstream device to obtain the relevant upgrade information of the local downstream device.
- the process of device registration may be: generating a registration data packet in a predetermined format; controlling the local downstream device to send the registration data packet to an upstream device directly connected to the local downstream device; controlling the and The upstream device directly connected to the local downstream device receives the registration data packet.
- controlling the local downstream device to send a device registration command to an upstream device directly connected to the local downstream device further includes: controlling the local downstream device to a downstream device connected to the local at a predetermined time interval.
- the upstream device directly connected to the device sends the device registration command.
- the upgrade solution needs to maintain scalability and be able to handle the plugging and unplugging of equipment at any time.
- the local downstream device before obtaining the registration command of the local downstream device in sub-step S1051, it may further include: controlling the local downstream device to directly connect to the upstream device directly connected to the local downstream device and indirectly The connected upstream device sends a transmission registration command, so that each of the local downstream devices obtains relevant upgrade information of all its downstream devices.
- the local downstream device is controlled to send a transmission registration command to the upstream device directly connected to the local downstream device and the upstream device indirectly connected at a predetermined time interval.
- controlling the local downstream device to send a transmission registration command to the upstream device directly connected to the local downstream device and the indirectly connected upstream device may also include: successfully registering with the device Then, the local downstream device is controlled to send a transmission registration command to the upstream device directly connected to the local downstream device and the upstream device indirectly connected.
- the process of transferring registration may be: generating a registration data packet in a predetermined format; controlling the local downstream device to send the registration data packet to the upstream device directly connected to the local downstream device and the upstream device indirectly connected Send until it is sent to the local; control the local to return a response data packet to the downstream device directly connected to the local.
- the data content of the registration data packet includes the command identification code, the device name, the device identification code, the device type, and the directly connected upstream device identification code.
- the command identification code includes a device registration command identification code or a transmission registration command identification code.
- step S102 may specifically include: downloading an upgrade package of the corresponding version of the target device according to the detected upgrade trigger operation of the user and the current version information of the target device. For example, after the user selects the target device to be upgraded and forms the list that needs to be upgraded, the upgrade is triggered with one click, and based on the detected upgrade trigger operation of the user and the current version information of the target device, download the corresponding version of the target device Upgrade package.
- step S103 it may further include: sending a transmission preparation command to the target device.
- the relevant upgrade information of the local downstream devices and the connection relationship between the local downstream devices are stored in the local in advance.
- the content of the preparation transmission command includes the identity information of the device, whether the device itself is upgraded, and whether the downstream device of the device is upgraded. In this way, on the one hand, the device can be prepared for upgrade, and on the other hand, the local downstream device can be targeted and purposefully transmitted to the target device with the upgrade package corresponding to the version of the target device.
- the content of the prepared transmission command is: device A, device A is upgraded (that is, device A is the target device), and the downstream device of device A is upgraded; device B , Device B is not upgraded, and the downstream device of device B is upgraded; Device C, device C is upgraded (ie, device C is the target device), and the downstream device of device C is not available; device D, device D is upgraded (ie, device D is the target device), No downstream equipment of equipment D.
- device A When the upgrade package of the corresponding version of the target device is transmitted to device A, because device A is upgraded, device A obtains the upgrade package of the corresponding version of device A, and then forwards the upgrade package of the corresponding version of the target device to devices B and C directly connected to device A ; After device B receives, because device B is not upgraded, but the downstream device of device B is upgraded, device B directly forwards device D connected to device B; after device C receives, because device C is upgraded, device C has no downstream device ( That is, device C is a leaf device), device C obtains the upgrade package of the corresponding version of device C, and no longer forwards it; after device D receives it, because device D is upgraded, device D has no downstream devices, and device D obtains the upgrade package of the corresponding version of device D , No longer repost.
- step S104 the controlling the target device to upgrade according to the upgrade package of the corresponding version of the target device may further include: sending an upgrade trigger command to the downstream device directly connected to the local device;
- the downstream devices directly connected to the local device respectively trigger the target device so that the target device is upgraded according to the upgrade package of the corresponding version of the target device.
- the method may further include: receiving the upgrade progress pushed by the downstream device directly connected to the local device until the upgrade of the target device is completed.
- the number of the target devices is more than two, and the details of step S103 are specifically described below.
- Step S103 the transmission of the upgrade package of the corresponding version of the target device and the identity information of the target device to the local downstream device may include: sub-step S1031 and sub-step S1032.
- Sub-step S1031 Parallel transmission of two or more upgrade packages of the corresponding versions of the target device and the identity information of the target device to the downstream device directly connected to the local device.
- Sub-step S1032 According to the identity information of the target device, control the downstream device directly connected to the local device to perform a matching operation, so that the target device obtains the upgrade package of the corresponding version, and each of the local downstream devices The device saves the identity information of the downstream device.
- the target device to be upgraded can be divided into the following situations: the first target device includes the target leaf device (the target device does not need to forward the upgrade package after receiving the corresponding version), and the second target device includes the target intermediate device (target After the device receives the upgrade package of the corresponding version, it determines whether it needs to be forwarded according to whether its downstream device needs to be upgraded), the third type of target device includes the target leaf device and the target intermediate device, and the above-mentioned first and second situations can be combined Carry out implementation.
- the target device includes a target leaf device, which can be divided into two situations: the first type of target device is a downstream device directly connected to the local device (the target device directly receives the upgrade package of the corresponding version of the local device), and the second type The target device is a downstream device indirectly connected to the local device (the intermediate device between the target device and the local device needs to be transferred to the target device so that the target device can receive the upgrade package of the corresponding version).
- the target device includes the target intermediate device, which can also be divided into four cases: the first is that the target device is a downstream device directly connected to the local, and the downstream device of the target device does not need to be upgraded (the target device directly receives the local The target device does not need to be transferred).
- the second is that the target device is a downstream device directly connected to the local device, and the downstream device of the target device needs to be upgraded (the target device directly receives the local corresponding version Upgrade package, the target device needs to continue to transfer to its downstream device),
- the third type of target device is the downstream device that is indirectly connected to the local, and the downstream device of the target device does not need to be upgraded (intermediate device transfer between the target device and the local is required To the target device, the target device can receive the upgrade package of the corresponding version, and the target device does not need to be transferred).
- the fourth type of target device is the downstream device indirectly connected to the local device. The downstream device of the target device needs to be upgraded (the target device and The intermediate device between the locals is transferred to the target device, the target device can receive the upgrade package of the corresponding version, and the target device needs to continue to transfer to its downstream device).
- the target device includes a target leaf device, and the target device is a downstream device directly connected to the local device.
- Sub-step S1032 may include: determining that the target device includes the target leaf device according to the identity information of the target device, and The target leaf device includes the downstream device directly connected to the local, and the downstream device that is not connected to the downstream device of the leaf device; controlling the downstream device directly connected to the local to obtain the upgrade package of the corresponding version, and stop forwarding.
- the target device includes a target leaf device, and the target device is a downstream device indirectly connected to the local device.
- Sub-step S1032 may include: determining that the target device includes the target leaf device according to the identity information of the target device, and An intermediate device is included between the target leaf device and the downstream device directly connected to the local device. The intermediate device is connected to the downstream device, and the leaf device is not connected to the downstream device; controls the downstream device directly connected to the local device. And the intermediate device forward the upgrade package of the corresponding version to the target leaf device; control the target leaf device to obtain the upgrade package of the corresponding version, and stop forwarding.
- the target device includes a target intermediate device, and the target device is a downstream device directly connected to the local device.
- Sub-step S1032 may include: determining that the target device includes the target intermediate device according to the identity information of the target device, and The target intermediate device is directly connected to the downstream device directly connected to the local device, and the intermediate device is downwardly connected to the downstream device; the downstream device directly connected to the local device is controlled to forward the upgrade package of the corresponding version to the target intermediate device ; Control the target intermediate device to obtain the upgrade package of the corresponding version.
- the downstream device of the target device does not need to be upgraded, and the controlling the target intermediate device to obtain the upgrade package of the corresponding version also includes: if the target device does not include the downstream device of the target intermediate device, controlling the target The intermediate device obtains the upgrade package of the corresponding version and stops forwarding it.
- the downstream device of the target device needs to be upgraded, and the controlling the target intermediate device to obtain the upgrade package of the corresponding version further includes: if the target device also includes the target downstream device of the target intermediate device, controlling the target The intermediate device obtains the upgrade package of the corresponding version, and forwards the upgrade package of the corresponding version to the downstream device of the target intermediate device until forwarding to the target downstream device; controls the target downstream device to obtain the upgrade package of the corresponding version.
- the target device includes a target intermediate device, and the target device is a downstream device indirectly connected to the local device.
- Sub-step S1032 may include: determining that the target device includes the target intermediate device according to the identity information of the target device, and The target intermediate device and the downstream device directly connected to the local area include an intermediate device, and the intermediate device is downwardly connected to the downstream device; the downstream device directly connected to the local area and the intermediate device are controlled to upgrade the corresponding version The package is forwarded to the target intermediate device; the target intermediate device is controlled to obtain the upgrade package of the corresponding version.
- the downstream device of the target device does not need to be upgraded.
- the controlling the target intermediate device to obtain the upgrade package of the corresponding version also includes: if the target device does not include the downstream device of the target intermediate device, controlling the target The intermediate device obtains the upgrade package of the corresponding version and stops forwarding it.
- the downstream device of the target device needs to be upgraded, and the controlling the target intermediate device to obtain the upgrade package of the corresponding version further includes: if the target device also includes the target downstream device of the target intermediate device, controlling the target The intermediate device obtains the upgrade package of the corresponding version, and forwards the upgrade package of the corresponding version to the downstream device of the target intermediate device until forwarding to the target downstream device; controls the target downstream device to obtain the upgrade package of the corresponding version.
- FIG. 4 is a schematic diagram of the application process of the device upgrade method of the present application in the remote control and UAV system, including the following steps:
- the device pushes the heartbeat package (including the related upgrade information of the device) to the local APP through registration, and organizes the devices of the drone locally to form an upgrade management list in the local APP.
- the content of the upgrade management list can include Whether each device needs to be upgraded (determined according to the current version information of the device and the latest upgradeable version corresponding to the device), the latest upgradeable version corresponding to the device, and notify the user of it;
- the local APP does not need to pay attention to the connection status of each device, but only needs to update the upgrade management list according to whether the heartbeat packet push of each device exists;
- the local APP After the local APP receives the user-triggered upgrade operation, it downloads the upgrade package of the corresponding version of the target device in the list according to the user's need to upgrade list;
- the local APP sends the preparation transmission command to the target devices in the list to be upgraded in parallel, and transmits the upgrade package to these target devices in parallel, without the need for sequential transmission and upgrade;
- the local APP After the transmission of the upgrade package of the corresponding version of all target devices to be upgraded is completed, the local APP sends an upgrade trigger command to the downstream device directly connected to the local (also called direct downstream device), and the direct downstream device triggers the upgrade list separately
- the target device in the device is upgraded internally, and the local APP receives the upgrade progress pushed by the direct downstream device until the upgrade of all target devices is completed.
- the device pushes heartbeat packets through registration, which can organize multiple devices to solve the new requirements of device upgrades.
- the number of upgrade devices is large, the upgrade plan needs to maintain scalability, and it can handle the plugging and unplugging of devices at any time.
- a typical upgrade scenario for consumer-grade drones is shown in Figure 5, and a typical upgrade scenario for industry-grade drones is shown in Figure 2.
- Both upgrade topological diagrams present a tree structure, and the embodiments of this application are collectively referred to as a device tree.
- the local APP is the root node of the device tree; each device is a tree node; the device without downstream devices is a leaf device (leaf node); the device with downstream devices is an intermediate device (intermediate node).
- the remote control is an intermediate device, and the aircraft is a leaf device.
- the remote control and the aircraft are both intermediate devices, and the peripherals and mounts are leaf devices.
- Device registration can be: the downstream device registers with the directly connected upstream device (direct upstream device), so that each device node knows the existence of its directly connected downstream device (direct downstream device); transmission registration can be: device registration is successful Later, the downstream device registers with the directly connected upstream device (direct upstream device) and indirectly connected upstream device (indirect upstream device), so that each device node knows the existence of all its downstream devices. Both of these registrations are sent by the downstream device to the upstream device in the form of a heartbeat packet, that is, at a frequency of 1 Hz.
- the device will be added to the local APP upgrade management list; if the heartbeat packet of a downstream device has timed out, it will exceed a certain period of time (for example: specific implementation) The time can be 5 seconds)
- the local APP has not received the heartbeat packet for registration of the downstream device, and the local APP considers that the device is not connected, and the local APP removes the device from the upgrade management list. Therefore, the method of "pushing the heartbeat package for registration" makes the local APP need not care about the connection status of each device, can achieve the scalability of the upgrade plan, and can cope with the plugging and unplugging of the device at any time.
- the contents of the local APP upgrade management list may include: device type, device ID, status of whether the device needs to be upgraded, and the latest version of the device on the server.
- the status of whether to upgrade is the comparison between the current version of the device and the latest version on the server. If the current version of the device is smaller, it needs to be upgraded, otherwise, it is not necessary to upgrade.
- the downstream device C After the downstream device C successfully registers with the device of the upstream device B, the downstream device C sends a registration data packet in the specified format to the upstream device B (the difference between the registration command id and the device Registered registration command id); after the upstream device B receives it, it only feeds back the response data packet to the downstream device C; at the same time, the upstream device B forwards the registration data packet of the downstream device C to the root node A; after the root node A receives it, Only the response data packet is fed back to device B. After this process is over, it is deemed that the downstream device C has successfully registered for transmission to the direct upstream device and the indirect upstream device.
- step 2 update the upgrade management list of the local APP according to the heartbeat package pushed for registration.
- step 3 the user can select the target device that he needs to upgrade to form a list to be upgraded, and trigger the upgrade with one click. It should be noted here that the user selects the target device that can be upgraded from the upgrade management list of the local APP. If the device is already the latest version of the device, the interface is grayed out and the user cannot select it. After forming the list to be upgraded, the user clicks one key to upgrade. In step 4, download the upgrade package of the corresponding version of the target device in the list to be upgraded.
- step 5 the local APP transfers the upgrade package corresponding to the target device in parallel to the target device in the list to be upgraded.
- the APP upgrades the devices one by one, and transmits and upgrades sequentially.
- the local APP sends a transmission preparation command in parallel to the target devices in the list to be upgraded, and then transmits the Upgrade package of the target device. If multiple target devices are included in the upgrade list, the above process is parallel.
- the specific implementation of sending the prepare transmission command can be seen in Figures 7-11.
- commonly used upgrade scenarios can include: scenario one, local APP upgrades a device alone; scenario two, local APP Upgrade all devices; Scenario 3: Local APP upgrades a certain leaf device in all devices; Scenario 4: Local APP upgrades an intermediate device in all devices; Scenario 5: Local APP upgrades a certain group of devices in all devices.
- the local APP serves as the root node of the device tree, and sends a transmission preparation command downward.
- the preparation transmission command in the embodiment of this application is different from the preparation transmission command of the consumer-grade UAV APP upgrade solution, and requires two more flag parameters. For the command format of the preparation transmission command in this embodiment, see Table 2.
- Table 2 The command data format of the command to be transmitted
- Scenario 1 The local APP upgrades a certain device alone (as shown in Figure 7, the target device to be upgraded includes the B device, the B device is a leaf device, and the B device is directly connected to the local device).
- the value of the prepared transmission command can be seen in Table 3.
- Scenario 2 Local APP upgrades all devices (as shown in Figure 8, the target devices to be upgraded include B device, C device, D device, E device, and F device; B device and C device are intermediate devices, D device, E device, and F device The device is a leaf device; the B device is directly connected to the local device, the C device is directly connected to the B device, the D device is directly connected to the B device; the E device and the F device are directly connected to the C device), the value of the prepared transmission command can be seen in Table 4 .
- Scenario 3 The local APP upgrades a certain leaf device in all devices (as shown in Figure 9, the target device to be upgraded includes the E device, which is a leaf device that is indirectly connected to the local device; the E device and the local device include intermediate devices, respectively It is B device and C device), the value of the command to be transmitted can be seen in Table 5.
- Scenario 4 The local APP upgrades an intermediate device in all devices (as shown in Figure 10, the target device to be upgraded includes the C device, which is an intermediate device that is indirectly connected to the local device; the intermediate device B device is included between the C device and the local device ), see Table 6 for the value of the command to be transmitted.
- Scenario 5 The local APP upgrades a certain group of devices in all devices (as shown in Figure 11, the target devices to be upgraded include C device, E device and F device.
- C device is an intermediate device that is indirectly connected to the local device, and E device and F device are Leaf devices that are indirectly connected to the local device; the E device and the F device are downstream devices directly connected to the C device, and the intermediate device B device is included between the C device and the local device.
- the value of the prepared transmission command can be seen in Table 7.
- Table 7 The value of the prepare transmission command in scenario 5
- the local APP After the preparation for transmission command is successfully sent, the local APP transmits the upgrade package to the target device that needs to be upgraded; the device that does not need to be upgraded only participates in the process of transferring the upgrade package. Since the actual physical link between the local APP and each target device that needs to be upgraded is different, the transmission method may also be different, so I won't repeat it here.
- step 6 The local APP sends an upgrade trigger command to the direct downstream device, and the direct downstream device will trigger the target device in the list to be upgraded to perform internal upgrade, and the local APP receives the direct downstream device. The upgrade progress pushed by the device until the end of the upgrade.
- the target device that needs to be upgraded becomes a node of the device tree by means of device registration and transmission registration, and the local APP is the root node of the device tree.
- the local APP will add the device to the upgrade management list according to the heartbeat packet used for registration of the device; if the device If it is removed, the local APP deletes the device from the upgrade management list according to the timeout of the heartbeat packet for registration of the device.
- the local APP can implement the upgrade of the device, and can conveniently handle the plugging and unplugging of the device, while maintaining the scalability of the upgrade solution.
- the local APP will send upgrade instructions to these target devices in the device tree in parallel and transmit upgrade packages to these target devices in parallel according to the upgrade list formed by the user's selection.
- the local APP also triggers the internal upgrade of these target devices. Therefore, users only need to select the target device that needs to be upgraded, and they can upgrade with one click.
- parallel transmission replaces the sequential transmission upgrade in the existing scheme, which can greatly reduce the upgrade time in the case of multiple devices.
- the local APP can well meet the new upgrade requirements "large number of upgraded equipment, maintain scalability, and be able to handle the plugging and unplugging of equipment at any time", so as to achieve the upgrade of industry-level drones.
- FIG 12 is a schematic structural diagram of an embodiment of the device upgrade apparatus of the present application. It should be noted that the device of this embodiment can execute the steps in the above device upgrade method. For a detailed description of related content, please refer to the above The relevant content of the equipment upgrade method will not be repeated here.
- the device 100 includes a memory 1, a processor 2, and a communication circuit 3, and the memory 1 and the communication circuit 3 are connected to the processor 2 respectively.
- the processor 2 may be a micro control unit, a central processing unit, or a digital signal processor, and so on.
- the memory 1 can be a Flash chip, a read-only memory, a magnetic disk, an optical disk, a U disk or a mobile hard disk, etc.
- the communication circuit 3 can be used for the device to communicate with the outside, and can also be used for the communication between itself and the processor 2 and the communication between the memory 1 and the processor 2.
- the memory 1 is used to store a computer program; the processor 2 is used to execute the computer program and when the computer program is executed, the following steps are implemented:
- the relevant upgrade information of the target device to be upgraded is obtained from the relevant upgrade information of the local downstream device.
- the relevant upgrade information includes the identity information of the device and the current version information of the device.
- the local downstream device includes a device directly connected to the local device and/or a device connected indirectly; according to the current version information of the target device, the communication circuit is controlled to download the upgrade package of the corresponding version of the target device; and the communication is controlled
- the circuit transmits the upgrade package of the corresponding version of the target device and the identity information of the target device to the local downstream device, so that the local downstream device converts the version corresponding to the target device according to the identity information of the target device
- the upgrade package is transmitted to the target device so that the target device obtains the upgrade package of the corresponding version; when the target device obtains the upgrade package of the corresponding version, the target device is controlled to upgrade according to the corresponding version of the target device The package is upgraded.
- the processor when the processor executes the computer program, it implements the following steps: acquiring the relevant upgrade information of the local downstream device.
- the processor executes the computer program, the following steps are implemented: obtaining the relevant upgrade information of the local downstream device through a heartbeat packet.
- the processor when the processor executes the computer program, it implements the following steps: obtaining a registration command of the local downstream device, where the registration command is that the local downstream device directly connects to the local downstream device And/or sent by an indirectly connected upstream device for registration; obtaining the relevant upgrade information of the local downstream device through the registration command of the local downstream device.
- the registration command includes a device registration command and/or a transfer registration command
- the device registration command is a registration command sent by the local downstream device to the upstream device directly connected to the local downstream device for device registration
- the transmission registration command is a registration command sent by the local downstream device to perform transmission registration to the upstream device directly connected and indirectly connected with the local downstream device.
- the processor when the processor executes the computer program, it implements the following steps: controlling the local downstream device to send the device registration command to the upstream device directly connected to the local downstream device, so that the The upstream device directly connected to the local downstream device obtains relevant upgrade information of the local downstream device.
- the processor when the processor executes the computer program, it implements the following steps: generating a registration data packet in a predetermined format; controlling the local downstream device to send the registration data packet to a device directly connected to the local downstream device Sent by an upstream device; controlling the upstream device directly connected to the local downstream device to receive the registration data packet.
- the processor when the processor executes the computer program, it implements the following steps: controlling the local downstream device to send a transmission registration command to the upstream device directly connected to the local downstream device and the upstream device indirectly connected to Make each of the local downstream devices obtain relevant upgrade information of all its own downstream devices.
- the processor when the processor executes the computer program, it implements the following steps: after the device is successfully registered, it controls the local downstream device to directly connect to the upstream device directly connected to the local downstream device and the indirect connected device.
- the upstream device sends a transfer registration command.
- the processor when the processor executes the computer program, it implements the following steps: generating a registration data packet in a predetermined format; controlling the local downstream device to send the registration data packet to a device directly connected to the local downstream device The upstream device and the indirectly connected upstream device send until it is sent to the local; control the local to return a response data packet to the downstream device directly connected to the local.
- the data content of the registration data packet includes the command identification code, the device name, the device identification code, the device type, and the directly connected upstream device identification code.
- the command identification code includes a device registration command identification code or a transmission registration command identification code.
- the processor when the processor executes the computer program, it implements the following steps: according to the detected upgrade trigger operation of the user and the current version information of the target device, control the communication circuit to download the corresponding target device Version upgrade package.
- the processor when the processor executes the computer program, it implements the following steps: controlling the communication circuit to send a transmission preparation command to the target device.
- the content of the preparation transmission command includes the identity information of the device, whether the device itself is upgraded, and whether the downstream device of the device is upgraded.
- the processor executes the computer program, the following steps are implemented: informing the communication circuit to send an upgrade trigger command to the downstream device directly connected to the local; and triggering respectively through the downstream device directly connected to the local.
- the target device enables the target device to upgrade according to the upgrade package of the corresponding version of the target device.
- the number of the target devices is more than two, and when the processor executes the computer program, the following steps are implemented: control the communication circuit to convert more than two upgrade packages of the corresponding versions of the target devices and all The identity information of the target device is transmitted in parallel to the downstream device directly connected to the local device; according to the identity information of the target device, the downstream device directly connected to the local device is controlled to perform a matching operation, so that the target device obtains Corresponding to the version of the upgrade package, each device in the local downstream device stores the identity information of the downstream device.
- the processor executes the computer program, the following steps are implemented: according to the identity information of the target device, it is determined that the target device includes a target leaf device, and the target leaf device includes a direct connection with the local The downstream device of the leaf device is not connected downstream; the downstream device directly connected to the local is controlled to obtain the upgrade package of the corresponding version and stop forwarding.
- the processor executes the computer program, the following steps are implemented: according to the identity information of the target device, it is determined that the target device includes a target leaf device, and the target leaf device is directly connected to the local
- the downstream devices include intermediate devices, the intermediate devices are connected downstream with downstream devices, and the leaf devices are not connected downstream; the downstream devices directly connected to the local device and the intermediate devices are controlled to convert the corresponding version
- the upgrade package of is forwarded to the target leaf device; the target leaf device is controlled to obtain the upgrade package of the corresponding version and stop forwarding.
- the processor executes the computer program, the following steps are implemented: according to the identity information of the target device, it is determined that the target device includes a target intermediate device, and the target intermediate device is directly connected to the local The downstream device is directly connected, and the intermediate device is downwardly connected to the downstream device; the downstream device directly connected to the local device is controlled to forward the upgrade package of the corresponding version to the target intermediate device; the target intermediate device is controlled to obtain the corresponding version Upgrade package.
- the processor executes the computer program, the following steps are implemented: according to the identity information of the target device, it is determined that the target device includes a target intermediate device, and the target intermediate device is directly connected to the local
- the downstream devices include intermediate devices, which are connected downstream with downstream devices; control the downstream devices directly connected to the local and the intermediate devices to forward the upgrade package of the corresponding version to the target intermediate device; control The target intermediate device obtains the upgrade package of the corresponding version.
- the processor implements the following steps when executing the computer program: if the target device also includes a target downstream device of the target intermediate device, control the target intermediate device to obtain the upgrade package of the corresponding version, and Forward the upgrade package of the corresponding version to the downstream device of the target intermediate device until it is forwarded to the target downstream device; control the target downstream device to obtain the upgrade package of the corresponding version.
- the processor implements the following steps when executing the computer program: if the target device does not include the downstream device of the target intermediate device, control the target intermediate device to obtain the upgrade package of the corresponding version, and stop Forward.
- the present application also 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 processor implements the method for upgrading the device as described in any one of the preceding items. .
- the relevant content please refer to the relevant content section above, which will not be repeated here.
- the computer-readable storage medium may be an internal storage unit of the above-mentioned device upgrading apparatus, such as a hard disk or a memory.
- the computer-readable storage medium may also be an external storage device, such as an equipped plug-in hard disk, a smart memory card, a secure digital card, a flash memory card, and so on.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
- Information Transfer Between Computers (AREA)
Abstract
A device upgrade method and apparatus, and a storage medium. The method comprises: obtaining identity information and current version information of a target device according to a detected target device selection operation of a user; downloading an upgrade package for the target device according to the current version information of the target device; transmitting the upgrade package for the target device and the identity information of the target device to a local downstream device, so that the local downstream device transmits the upgrade package for the target device to the target device, and the target device obtains the upgrade package; and controlling the target device to be subjected to upgradation according to the upgrade package.
Description
本申请涉及软件升级技术领域,尤其涉及一种设备升级的方法、装置及存储介质。This application relates to the technical field of software upgrades, and in particular to a method, device and storage medium for equipment upgrade.
现有消费级无人机,其拓扑结构十分简单,升级模块少,大多数是标准的升级模块:无人机和遥控器。Existing consumer drones have a very simple topology and few upgrade modules. Most of them are standard upgrade modules: drones and remote controls.
在这种简单的场景下,现有的应用程序APP升级方案如下:实时监测无人机和遥控器两者的连接状态和是否需要升级的状态;符合升级条件时,各自触发模块内的升级流程,即把合适的固件升级包从服务器上下载下来,依次传输给对应的无人机和遥控器;传输完成后,使无人机和遥控器分别升级,并接收无人机和遥控器推送的升级进度。若无人机或遥控器上新增设备,需要同时升级多个设备时,APP需要依次传输和升级。In this simple scenario, the existing application APP upgrade plan is as follows: real-time monitoring of the connection status of the drone and the remote control and whether the status needs to be upgraded; when the upgrade conditions are met, each triggers the upgrade process in the module , That is, download the appropriate firmware upgrade package from the server, and transmit it to the corresponding drone and remote control in turn; after the transmission is completed, the drone and remote control are upgraded separately, and receive push notifications from the drone and remote control. Upgrade progress. If new devices are added to the drone or remote control, and multiple devices need to be upgraded at the same time, the APP needs to be transmitted and upgraded in sequence.
上述APP升级方案不适合拓扑结构复杂的设备的升级,无法根据用户的需求使设备选择性升级,也不适合升级新需求:升级设备数量大、升级方案需要保持扩展性、能够应对设备随时插拔。The above APP upgrade solution is not suitable for the upgrade of devices with complex topologies, and cannot be selectively upgraded according to user needs, nor is it suitable for upgrading new requirements: the number of upgraded devices is large, the upgrade solution needs to maintain scalability, and it can be plugged and unplugged at any time. .
发明内容Summary of the invention
基于此,本申请提供一种设备升级的方法、装置及存储介质。Based on this, this application provides a device upgrade method, device, and storage medium.
第一方面,本申请提供了一种设备升级的方法,所述方法包括:In the first aspect, this application provides a device upgrade method, which includes:
根据检测到的用户的目标设备选择操作,从本地的下游设备的相关升级信息中获取待升级的目标设备的相关升级信息,所述相关升级信息包括设备的身份信息和设备的当前版本信息,所述本地的下游设备包括与本地直接连接的设备和/或间接连接的设备;According to the detected user's target device selection operation, the relevant upgrade information of the target device to be upgraded is obtained from the relevant upgrade information of the local downstream device. The relevant upgrade information includes the identity information of the device and the current version information of the device. The local downstream equipment includes equipment directly connected to the local and/or equipment connected indirectly;
根据所述目标设备的当前版本信息,下载所述目标设备对应版本的升级包;Downloading the upgrade package of the corresponding version of the target device according to the current version information of the target device;
将所述目标设备对应版本的升级包和所述目标设备的身份信息向所述本地的下游设备传输,使所述本地的下游设备根据所述目标设备的身份信息将所述目标设备对应版本的升级包传输至所述目标设备,使所述目标设备获取对应版本的升级包;The upgrade package of the corresponding version of the target device and the identity information of the target device are transmitted to the local downstream device, so that the local downstream device can update the version corresponding to the target device according to the identity information of the target device The upgrade package is transmitted to the target device, so that the target device obtains the upgrade package of the corresponding version;
当所述目标设备获取到对应版本的升级包后,控制所述目标设备根据所述目标设备对应版本的升级包进行升级。After the target device obtains the upgrade package of the corresponding version, the target device is controlled to upgrade according to the upgrade package of the corresponding version of the target device.
第二方面,本申请提供一种设备升级的装置,所述装置包括:存储器、处理器以及通信电路,所述存储器和所述通信电路分别与所述处理器连接;In a second aspect, the present application provides an apparatus for upgrading equipment, the apparatus includes: a memory, a processor, and a communication circuit, the memory and the communication circuit are respectively connected to the processor;
所述存储器用于存储计算机程序;The memory is used to store a computer program;
所述处理器用于执行所述计算机程序并在执行所述计算机程序时,实现如下步骤:The processor is used to execute the computer program and when executing the computer program, implement the following steps:
根据检测到的用户的目标设备选择操作,从本地的下游设备的相关升级信息中获取待升级的目标设备的相关升级信息,所述相关升级信息包括设备的身份信息和设备的当前版本信息,所述本地的下游设备包括与本地直接连接的设备和/或间接连接的设备;According to the detected user's target device selection operation, the relevant upgrade information of the target device to be upgraded is obtained from the relevant upgrade information of the local downstream device. The relevant upgrade information includes the identity information of the device and the current version information of the device. The local downstream equipment includes equipment directly connected to the local and/or equipment connected indirectly;
根据所述目标设备的当前版本信息,控制所述通信电路下载所述目标设备对应版本的升级包;According to the current version information of the target device, controlling the communication circuit to download the upgrade package of the corresponding version of the target device;
控制所述通信电路将所述目标设备对应版本的升级包和所述目标设备的身份信息向所述本地的下游设备传输,使所述本地的下游设备根据所述目标设备的身份信息将所述目标设备对应版本的升级包传输至所述目标设备,使所述目标设备获取对应版本的升级包;Control the communication circuit to transmit the upgrade package of the corresponding version of the target device and the identity information of the target device to the local downstream device, so that the local downstream device transmits the The upgrade package of the corresponding version of the target device is transmitted to the target device, so that the target device obtains the upgrade package of the corresponding version;
当所述目标设备获取到对应版本的升级包后,控制所述目标设备根据所述目标设备对应版本的升级包进行升级。After the target device obtains the upgrade package of the corresponding version, the target device is controlled to upgrade according to the upgrade package of the corresponding version of the target device.
第三方面,本申请提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如上所述的设备升级的方法。In a third aspect, the present application 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 processor implements the method for upgrading the device as described above .
本申请实施例提供了一种设备升级的方法、装置及存储介质,根据检测到 的用户的目标设备选择操作,从本地的下游设备的相关升级信息中获取待升级的目标设备的相关升级信息,所述相关升级信息包括设备的身份信息和设备的当前版本信息,所述本地的下游设备包括与本地直接连接的设备和/或间接连接的设备;根据所述目标设备的当前版本信息,下载所述目标设备对应版本的升级包;将所述目标设备对应版本的升级包和所述目标设备的身份信息向所述本地的下游设备传输,使所述本地的下游设备根据所述目标设备的身份信息将所述目标设备对应版本的升级包传输至所述目标设备,使所述目标设备获取对应版本的升级包;当所述目标设备获取到对应版本的升级包后,控制所述目标设备根据所述目标设备对应版本的升级包进行升级。由于根据检测到的用户的选择操作,从本地的下游设备的相关升级信息中获取待升级的目标设备的身份信息和当前版本信息,根据目标设备的当前版本信息下载所述目标设备对应版本的升级包,将目标设备对应版本的升级包和目标设备的身份信息向本地的下游设备传输,使本地的下游设备将目标设备对应版本的升级包传输至目标设备,使目标设备获取对应版本的升级包;当目标设备获取到对应版本的升级包后,控制目标设备进行升级,通过这种方式,能够按照用户的需求对用户选择的、与本地直接连接的和/或间接连接的目标设备进行升级,适合拓扑结构复杂的设备的升级,也为升级新需求“升级设备数量大、升级方案需要保持扩展性、能够应对设备随时插拔”提供技术支持。The embodiments of the present application provide a method, a device and a storage medium for device upgrade. According to the detected user's target device selection operation, the relevant upgrade information of the target device to be upgraded is obtained from the relevant upgrade information of the local downstream device. The relevant upgrade information includes the identity information of the device and the current version information of the device, the local downstream device includes the device directly connected to the local and/or the device connected indirectly; according to the current version information of the target device, download all The upgrade package of the corresponding version of the target device; the upgrade package of the corresponding version of the target device and the identity information of the target device are transmitted to the local downstream device, so that the local downstream device is based on the identity of the target device The information transmits the upgrade package of the corresponding version of the target device to the target device, so that the target device obtains the upgrade package of the corresponding version; when the target device obtains the upgrade package of the corresponding version, the target device is controlled according to The upgrade package of the corresponding version of the target device is upgraded. According to the detected user's selection operation, the identity information and current version information of the target device to be upgraded are obtained from the relevant upgrade information of the local downstream device, and the upgrade of the corresponding version of the target device is downloaded according to the current version information of the target device Package, which transmits the upgrade package of the corresponding version of the target device and the identity information of the target device to the local downstream device, so that the local downstream device transmits the upgrade package of the corresponding version of the target device to the target device, so that the target device obtains the upgrade package of the corresponding version ; When the target device obtains the upgrade package of the corresponding version, the target device is controlled to upgrade. In this way, the target device selected by the user and directly connected to the local and/or indirectly connected to the user can be upgraded according to the user’s needs. It is suitable for the upgrading of equipment with complex topological structure, and also provides technical support for the new requirements of upgrading "the number of upgraded equipment is large, the upgrade plan needs to maintain scalability, and the equipment can be plugged and unplugged at any time".
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the application.
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the following will briefly introduce the drawings used in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present application. Ordinary technicians can obtain other drawings based on these drawings without creative work.
图1是本申请设备升级的方法一实施例的流程示意图;FIG. 1 is a schematic flowchart of an embodiment of a device upgrade method according to the present application;
图2是本申请设备升级的方法一应用场景的示意图;FIG. 2 is a schematic diagram of an application scenario of the first method of device upgrade according to this application;
图3是本申请设备升级的方法另一应用场景的示意图;FIG. 3 is a schematic diagram of another application scenario of the device upgrade method of this application;
图4是本申请设备升级的方法在遥控器和无人机系统中的应用一流程示意图;Figure 4 is a schematic diagram of the application process of the method for device upgrade of the present application in the remote control and UAV system;
图5是本申请设备升级的方法又一应用场景的示意图;FIG. 5 is a schematic diagram of another application scenario of the device upgrade method of this application;
图6是本申请设备升级的方法中一设备注册和传输注册的示意图;FIG. 6 is a schematic diagram of a device registration and transmission registration in the method for device upgrade of this application;
图7是本申请设备升级的方法又一应用场景的示意图;FIG. 7 is a schematic diagram of another application scenario of the device upgrade method of this application;
图8是本申请设备升级的方法又一应用场景的示意图;FIG. 8 is a schematic diagram of another application scenario of the device upgrade method of this application;
图9是本申请设备升级的方法又一应用场景的示意图;FIG. 9 is a schematic diagram of another application scenario of the device upgrade method of this application;
图10是本申请设备升级的方法又一应用场景的示意图;FIG. 10 is a schematic diagram of another application scenario of the device upgrade method of this application;
图11是本申请设备升级的方法又一应用场景的示意图;FIG. 11 is a schematic diagram of another application scenario of the device upgrade method of this application;
图12是本申请设备升级的装置一实施例的结构示意图;FIG. 12 is a schematic structural diagram of an embodiment of an apparatus for upgrading equipment of the present application;
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
附图中所示的流程图仅是示例说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解、组合或部分合并,因此实际执行的顺序有可能根据实际情况改变。The flowchart shown in the drawings is only an example, and does not necessarily include all contents and operations/steps, nor does it have to be executed in the described order. For example, some operations/steps can also be decomposed, combined or partially combined, so the actual execution order may be changed according to actual conditions.
现有消费级无人机,其拓扑结构简单,通常是标准的升级模块:无人机和遥控器;升级方案是:实时监测无人机和遥控器的连接状态和是否需要升级的状态;符合升级条件时,触发无人机和遥控器的升级流程。上述升级方案不适合拓扑结构复杂的设备的升级,无法根据用户的需求使设备选择性升级,也不适合升级新需求“升级设备数量大、升级方案需要保持扩展性、能够应对设备随时插拔”。Existing consumer drones have a simple topology, usually standard upgrade modules: drones and remote controls; the upgrade plan is: real-time monitoring of the connection status of drones and remote controls and whether they need to be upgraded; compliant When the condition is upgraded, the upgrade process of the drone and the remote control is triggered. The above-mentioned upgrade scheme is not suitable for the upgrading of equipment with complex topology, and cannot selectively upgrade the equipment according to the needs of users, nor is it suitable for upgrading new requirements. "The number of upgraded equipment is large, the upgrade scheme needs to maintain scalability, and can cope with the plugging and unplugging of equipment at any time." .
本申请实施例根据检测到的用户的目标设备选择操作,从本地的下游设备的相关升级信息中获取待升级的目标设备的相关升级信息,所述相关升级信息包括设备的身份信息和设备的当前版本信息,所述本地的下游设备包括与本地直接连接的设备和/或间接连接的设备;根据所述目标设备的当前版本信息, 下载所述目标设备对应版本的升级包;将所述目标设备对应版本的升级包和所述目标设备的身份信息向所述本地的下游设备传输,使所述本地的下游设备根据所述目标设备的身份信息将所述目标设备对应版本的升级包传输至所述目标设备,使所述目标设备获取对应版本的升级包;当所述目标设备获取到对应版本的升级包后,控制所述目标设备根据所述目标设备对应版本的升级包进行升级。由于根据检测到的用户的选择操作,从本地的下游设备的相关升级信息中获取待升级的目标设备的身份信息和当前版本信息,根据目标设备的当前版本信息下载所述目标设备对应版本的升级包,将目标设备对应版本的升级包和目标设备的身份信息向本地的下游设备传输,使本地的下游设备将目标设备对应版本的升级包传输至目标设备,使目标设备获取对应版本的升级包;当目标设备获取到对应版本的升级包后,控制目标设备进行升级,通过这种方式,能够按照用户的需求对用户选择的、与本地直接连接的和/或间接连接的目标设备进行升级,适合拓扑结构复杂的设备的升级,也为升级新需求“升级设备数量大、升级方案需要保持扩展性、能够应对设备随时插拔”提供技术支持。According to the detected target device selection operation of the user, the embodiment of the application obtains the relevant upgrade information of the target device to be upgraded from the relevant upgrade information of the local downstream device. The relevant upgrade information includes the identity information of the device and the current status of the device. Version information, the local downstream devices include devices directly connected to the local device and/or devices connected indirectly; according to the current version information of the target device, download the upgrade package corresponding to the version of the target device; The upgrade package of the corresponding version and the identity information of the target device are transmitted to the local downstream device, so that the local downstream device transmits the upgrade package of the corresponding version of the target device to the local downstream device according to the identity information of the target device. The target device enables the target device to obtain the upgrade package of the corresponding version; when the target device obtains the upgrade package of the corresponding version, the target device is controlled to upgrade according to the upgrade package of the corresponding version of the target device. According to the detected user's selection operation, the identity information and current version information of the target device to be upgraded are obtained from the relevant upgrade information of the local downstream device, and the upgrade of the corresponding version of the target device is downloaded according to the current version information of the target device Package, which transmits the upgrade package of the corresponding version of the target device and the identity information of the target device to the local downstream device, so that the local downstream device transmits the upgrade package of the corresponding version of the target device to the target device, so that the target device obtains the upgrade package of the corresponding version ; When the target device obtains the upgrade package of the corresponding version, the target device is controlled to upgrade. In this way, the target device selected by the user and directly connected to the local and/or indirectly connected to the user can be upgraded according to the user’s needs. It is suitable for the upgrading of equipment with complex topological structure, and also provides technical support for the new requirements of upgrading "the number of upgraded equipment is large, the upgrade plan needs to maintain scalability, and the equipment can be plugged and unplugged at any time".
下面结合附图,对本申请的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Hereinafter, some embodiments of the present application will be described in detail with reference to the accompanying drawings. In the case of no conflict, the following embodiments and features in the embodiments can be combined with each other.
参见图1,图1是本申请设备升级的方法一实施例的流程示意图,所述方法包括:Referring to Fig. 1, Fig. 1 is a schematic flowchart of an embodiment of a device upgrade method according to the present application, and the method includes:
步骤S101:根据检测到的用户的目标设备选择操作,从本地的下游设备的相关升级信息中获取待升级的目标设备的相关升级信息,所述相关升级信息包括设备的身份信息和设备的当前版本信息,所述本地的下游设备包括与本地直接连接的设备和/或间接连接的设备。Step S101: According to the detected user's target device selection operation, obtain relevant upgrade information of the target device to be upgraded from the relevant upgrade information of the local downstream device, the relevant upgrade information including the identity information of the device and the current version of the device Information, the local downstream device includes a device directly connected to the local device and/or a device connected indirectly.
在本实施例中,本地的下游设备包括与本地直接连接的一个以上的设备;也包括与本地间接连接的一个以上的设备;也包括与本地直接连接的一个以上的设备、与本地间接连接的一个以上的设备,即本实施例的方法可以适用于拓扑结构简单的设备的升级,也适用于拓扑结构复杂的设备的升级。对应地,待升级的目标设备包括与本地直接连接的设备和/或间接连接的设备,即目标设备可以包括与本地直接连接的一个以上的设备;也包括与本地间接连接的一个以上的设备;也包括与本地直接连接的一个以上的设备、与本地间接连接的一 个以上的设备。目标设备的数量是一个以上,例如:一个目标设备,两个目标设备,三个目标设备,等等。In this embodiment, the local downstream device includes more than one device directly connected to the local device; also includes more than one device indirectly connected to the local device; also includes more than one device directly connected to the local device and the device indirectly connected to the local device. More than one device, that is, the method of this embodiment may be suitable for upgrading a device with a simple topology, and also for upgrading a device with a complex topology. Correspondingly, the target device to be upgraded includes the device directly connected to the local device and/or the device connected indirectly, that is, the target device may include more than one device directly connected to the local device; it also includes more than one device directly connected to the local device; It also includes more than one device directly connected to the local area and more than one device connected indirectly to the local area. The number of target devices is more than one, for example: one target device, two target devices, three target devices, and so on.
在一实施例中,多个设备根据连接关系被组织成树状结构而生成设备树,本地(或用户端)为所述设备树的根节点,所述设备树上的设备分为中间设备和/或叶子设备,所述中间设备向下连接有下游设备(包括直接连接的下游设备和/或间接连接的下游设备),所述叶子设备向下没有下游设备。In an embodiment, a plurality of devices are organized into a tree structure according to the connection relationship to generate a device tree, the local (or client) is the root node of the device tree, and the devices on the device tree are divided into intermediate devices and /Or a leaf device, the intermediate device is downwardly connected to a downstream device (including a directly connected downstream device and/or an indirectly connected downstream device), and the leaf device has no downstream device downward.
如图2所示,应用程序APP代表本地(用户端),且为设备树的根节点,该设备树还包括遥控器,与遥控器直接连接的飞机(无人机)、已知外设、未知外设,与飞机直接连接的已知挂载1、已知挂载2、未知挂载1;遥控器和飞机为中间设备,已知外设、未知外设、已知挂载1、已知挂载2、未知挂载1为叶子设备;遥控器是与本地直接连接的中间设备,飞机是与本地间接连接的中间设备;遥控器是与飞机直接连接的上游设备、也是与已知外设直接连接的上游设备、也是与未知外设直接连接的上游设备;飞机是与已知挂载1直接连接的上游设备、也是与已知挂载2直接连接的上游设备、也是与未知挂载1直接连接的上游设备;遥控器是与已知挂载1间接连接的上游设备、也是与已知挂载2间接连接的上游设备、也是与未知挂载1间接连接的上游设备;已知外设、未知外设、已知挂载1、已知挂载2、未知挂载1是与本地间接连接的叶子设备。As shown in Figure 2, the application APP represents the local (user terminal) and is the root node of the device tree. The device tree also includes a remote control, an aircraft (drone) directly connected to the remote control, known peripherals, Unknown peripherals, known mount 1, known mount 2, unknown mount 1 directly connected to the aircraft; remote control and aircraft are intermediate devices, known peripherals, unknown peripherals, known mount 1, already Known mount 2 and unknown mount 1 are leaf devices; the remote control is an intermediate device directly connected to the local area, and the aircraft is an intermediate device directly connected to the local area; Assume that the directly connected upstream device is also the upstream device directly connected to the unknown peripheral; the aircraft is the upstream device directly connected to the known mount 1, and the upstream device directly connected to the known mount 2, and it is also the upstream device directly connected to the unknown mount. 1 Directly connected upstream device; the remote control is an upstream device that is indirectly connected to a known mount 1, is also an upstream device that is indirectly connected to a known mount 2, and is also an upstream device that is indirectly connected to an unknown mount 1; Suppose, unknown peripherals, known mount 1, known mount 2, and unknown mount 1 are leaf devices that are indirectly connected to the local device.
设备的身份信息可以是用于标识设备身份、设备类型等,以区分不同设备和/或每个设备的信息,例如唯一识别码、设备识别码、IP地址,等等。例如:设备1、设备2、设备3。设备的当前版本信息可以是设备当前所使用的应用程序的版本信息。根据设备的当前版本信息和设备的最新版本信息,即可初步确定该设备是否需要升级以及需要下载的版本信息。例如,设备1的应用程序的当前版本是V1,设备1的应用程序的最新版本是V2,初步确定设备1需要升级,最终是否升级依据用户是否选择,如果设备1最近使用不多,可以暂且不升级,如果设备1最近使用较多,可以选择升级。The identity information of the device may be information used to identify the identity of the device, the type of the device, etc., to distinguish different devices and/or each device, such as a unique identification code, a device identification code, an IP address, and so on. For example: device 1, device 2, device 3. The current version information of the device may be the version information of the application currently used by the device. According to the current version information of the device and the latest version information of the device, it can be preliminarily determined whether the device needs to be upgraded and the version information that needs to be downloaded. For example, the current version of the application of device 1 is V1, and the latest version of the application of device 1 is V2. It is preliminarily determined that device 1 needs to be upgraded. The final upgrade depends on whether the user chooses. Upgrade. If device 1 has been used more recently, you can choose to upgrade.
本地的下游设备的相关升级信息(即设备的身份信息和设备的当前版本信息)保存在本地,其获取方式很多,例如:在本地用户输入设备的身份信息和设备的当前版本信息;或者,本地预先有设备的身份信息和开始的版本信息, 每当设备升级,对应修改该设备的当前版本信息;或者,预先约定升级时间,连接的设备在该时间向本地推送自己的身份信息和当前版本信息;或者,预先约定升级时间,在升级时间连接上相关设备;或者,连接的设备以预定的时间间隔向本地推送自己的身份信息和当前版本信息;等等。The relevant upgrade information of the local downstream device (that is, the identity information of the device and the current version information of the device) is stored locally, and there are many ways to obtain it. For example, the local user inputs the identity information of the device and the current version information of the device; or, locally The identity information and the starting version information of the device are pre-existing. Whenever the device is upgraded, the current version information of the device is correspondingly modified; or, the upgrade time is pre-appointed, and the connected device pushes its own identity information and current version information to the local at that time ; Or, pre-appoint the upgrade time and connect to the relevant device at the upgrade time; or, the connected device pushes its own identity information and current version information to the local at predetermined time intervals; etc.
用户对需要升级的目标设备进行选择,通过这种方式,能够按照用户的需求对目标设备进行升级。The user selects the target device that needs to be upgraded. In this way, the target device can be upgraded according to the user's needs.
步骤S102:根据所述目标设备的当前版本信息,下载所述目标设备对应版本的升级包。Step S102: Download an upgrade package of the corresponding version of the target device according to the current version information of the target device.
根据所述目标设备的当前版本信息,可以从服务器下载所述目标设备对应版本的升级包。According to the current version information of the target device, the upgrade package of the corresponding version of the target device can be downloaded from the server.
例如,服务器上设备1的应用程序的升级包的版本有V1和V2,根据设备1的应用程序的当前版本是V1,确定下载所述目标设备对应版本V2的升级包。For example, the version of the upgrade package of the application program of the device 1 on the server is V1 and V2, and according to the current version of the application program of the device 1 is V1, it is determined to download the upgrade package corresponding to the version V2 of the target device.
又如:服务器上设备1的应用程序的升级包的版本有V1、V2和V3,根据设备1的应用程序的当前版本是V1,确定下载所述目标设备对应版本V3的升级包。In another example, the version of the upgrade package of the application program of the device 1 on the server is V1, V2, and V3. According to the current version of the application program of the device 1 is V1, it is determined to download the upgrade package corresponding to the version V3 of the target device.
步骤S103:将所述目标设备对应版本的升级包和所述目标设备的身份信息向所述本地的下游设备传输,使所述本地的下游设备根据所述目标设备的身份信息将所述目标设备对应版本的升级包传输至所述目标设备,使所述目标设备获取对应版本的升级包。Step S103: The upgrade package of the corresponding version of the target device and the identity information of the target device are transmitted to the local downstream device, so that the local downstream device will transfer the target device to the target device according to the identity information of the target device. The upgrade package of the corresponding version is transmitted to the target device, so that the target device obtains the upgrade package of the corresponding version.
本地的下游设备包括与本地直接连接的设备和/或间接连接的设备,待升级的目标设备包括与本地直接连接的设备和/或间接连接的设备,将所述目标设备对应版本的升级包和所述目标设备的身份信息向所述本地的下游设备传输,使所述本地的下游设备根据所述目标设备的身份信息将所述目标设备对应版本的升级包传输至所述目标设备,具体传输方式和传输细节可以有很多种,只要最后使所述本地的下游设备将所述目标设备对应版本的升级包传输至所述目标设备,使所述目标设备获取对应版本的升级包即可。The local downstream equipment includes equipment directly connected to the local and/or indirectly connected equipment, the target equipment to be upgraded includes equipment directly connected to the local and/or indirectly connected equipment, and the upgrade package of the corresponding version of the target device is combined with The identity information of the target device is transmitted to the local downstream device, so that the local downstream device transmits the upgrade package of the corresponding version of the target device to the target device according to the identity information of the target device, and specifically transmits There are many ways and transmission details, as long as the local downstream device is finally made to transmit the upgrade package of the corresponding version of the target device to the target device, so that the target device can obtain the upgrade package of the corresponding version.
例如:如果从设备1传输到设备2,设备2需要升级(即目标设备的身份信息有设备2),则设备2获取对应的升级包(设备2不需要升级,则该步骤 忽略),然后向设备2所有可以连接其他设备的接口发送目标设备对应版本的升级包和所述目标设备的身份信息(因为设备2已经获取对应的升级包,设备2继续传输时可以将设备2对应版本的升级包和所述设备2的身份信息删除),如果接口连接有下游设备,该下游设备即可接收到目标设备对应版本的升级包和所述目标设备的身份信息,如果接口没有连接下游设备,传输到此结束。For example: if it is transferred from device 1 to device 2, and device 2 needs to be upgraded (that is, the identity information of the target device has device 2), then device 2 obtains the corresponding upgrade package (device 2 does not need to be upgraded, so this step is ignored), and then All interfaces of device 2 that can be connected to other devices send the upgrade package of the corresponding version of the target device and the identity information of the target device (because device 2 has already obtained the corresponding upgrade package, when device 2 continues to transmit, the upgrade package of the corresponding version of device 2 can be sent And the identity information of the device 2 is deleted), if the interface is connected to a downstream device, the downstream device can receive the upgrade package corresponding to the target device version and the identity information of the target device. If the interface is not connected to the downstream device, it will be transmitted to This ends.
又如:如果从设备1传输到设备2,设备2能够检测到哪些接口连接有下游设备,设备2不需要升级,向设备2连接有下游设备的接口发送目标设备对应版本的升级包和所述目标设备的身份信息。Another example: if you transfer from device 1 to device 2, device 2 can detect which interfaces are connected to downstream devices, device 2 does not need to be upgraded, and sends the upgrade package of the target device's corresponding version to the interface where device 2 is connected to the downstream device. The identity information of the target device.
又如:如果从设备1传输到设备2,设备2保存有设备2的下游设备的身份信息,设备2根据设备2的下游设备的身份信息、所述目标设备的身份信息,有针对性地向直接连接的下游设备(即与目标设备有直接或间接连接关系的下游设备)传输,而不会向所有直接连接的下游设备传输。Another example: if it is transmitted from device 1 to device 2, device 2 saves the identity information of the downstream device of device 2, and device 2 will send targeted information to the device according to the identity information of the downstream device of device 2 and the identity information of the target device. Directly connected downstream devices (that is, downstream devices that have a direct or indirect connection with the target device) transmit, but not to all directly connected downstream devices.
步骤S104:当所述目标设备获取到对应版本的升级包后,控制所述目标设备根据所述目标设备对应版本的升级包进行升级。Step S104: After the target device obtains the upgrade package of the corresponding version, control the target device to upgrade according to the upgrade package of the corresponding version of the target device.
本申请实施例根据检测到的用户的目标设备选择操作,从本地的下游设备的相关升级信息中获取待升级的目标设备的相关升级信息,所述相关升级信息包括设备的身份信息和设备的当前版本信息,所述本地的下游设备包括与本地直接连接的设备和/或间接连接的设备;根据所述目标设备的当前版本信息,下载所述目标设备对应版本的升级包;将所述目标设备对应版本的升级包和所述目标设备的身份信息向所述本地的下游设备传输,使所述本地的下游设备根据所述目标设备的身份信息将所述目标设备对应版本的升级包传输至所述目标设备,使所述目标设备获取对应版本的升级包;当所述目标设备获取到对应版本的升级包后,控制所述目标设备根据所述目标设备对应版本的升级包进行升级。由于根据检测到的用户的选择操作,从本地的下游设备的相关升级信息中获取待升级的目标设备的身份信息和当前版本信息,根据目标设备的当前版本信息下载所述目标设备对应版本的升级包,将目标设备对应版本的升级包和目标设备的身份信息向本地的下游设备传输,使本地的下游设备将目标设备对应版本的升级包传输至目标设备,使目标设备获取对应版本的升级包;当目标设备获取到对应版本的升级包后,控制目标设备进行升级,通过这种方式,能 够按照用户的需求对用户选择的、与本地直接连接的和/或间接连接的目标设备进行升级,适合拓扑结构复杂的设备的升级,也为升级新需求“升级设备数量大、升级方案需要保持扩展性、能够应对设备随时插拔”提供技术支持。According to the detected target device selection operation of the user, the embodiment of the application obtains the relevant upgrade information of the target device to be upgraded from the relevant upgrade information of the local downstream device. The relevant upgrade information includes the identity information of the device and the current status of the device. Version information, the local downstream device includes devices directly connected to the local device and/or devices connected indirectly; according to the current version information of the target device, downloading the upgrade package corresponding to the target device's version; uploading the target device The upgrade package of the corresponding version and the identity information of the target device are transmitted to the local downstream device, so that the local downstream device transmits the upgrade package of the corresponding version of the target device to the local downstream device according to the identity information of the target device. The target device enables the target device to obtain the upgrade package of the corresponding version; when the target device obtains the upgrade package of the corresponding version, the target device is controlled to upgrade according to the upgrade package of the corresponding version of the target device. According to the detected user's selection operation, the identity information and current version information of the target device to be upgraded are obtained from the relevant upgrade information of the local downstream device, and the upgrade of the corresponding version of the target device is downloaded according to the current version information of the target device Package, which transmits the upgrade package of the corresponding version of the target device and the identity information of the target device to the local downstream device, so that the local downstream device transmits the upgrade package of the corresponding version of the target device to the target device, so that the target device obtains the upgrade package of the corresponding version ; When the target device obtains the upgrade package of the corresponding version, the target device is controlled to upgrade. In this way, the target device selected by the user and directly connected to the local and/or indirectly connected to the user can be upgraded according to the user’s needs. It is suitable for the upgrading of equipment with complex topological structure, and also provides technical support for the new requirements of upgrading "the number of upgraded equipment is large, the upgrade plan needs to maintain scalability, and the equipment can be plugged and unplugged at any time".
通常情况下,设备上的接口可能连接有下游设备,也可能没有连接下游设备;有可能在这段时间内连接有下游设备,在另一时间段内没有连接下游设备;有可能本地与设备之间距离太远,用户也没有办法弄清楚设备之间的连接情况;有可能情况紧急或特殊设备随时插拔;等等,为了使用户选择目标设备时能够有针对性地选择到目标设备,步骤S101之前,还包括:Under normal circumstances, the interface on the device may be connected to the downstream device, or may not be connected to the downstream device; it may be connected to the downstream device during this period of time, and the downstream device may not be connected to the downstream device in another period of time; it may be connected to the device locally. The distance is too far, and the user has no way to figure out the connection between the devices; it is possible that the situation is urgent or special equipment is plugged and unplugged at any time; etc., in order to enable the user to select the target device in a targeted manner when selecting the target device, steps Before S101, it also includes:
步骤S105:获取所述本地的下游设备的相关升级信息。Step S105: Obtain the relevant upgrade information of the local downstream device.
具体地,可以通过心跳包获取所述本地的下游设备的相关升级信息。本实施例中,心跳包就是在设备和本地定时通知对方自己状态的一个自己定义的命令字,按照一定的时间间隔发送,类似于心跳,所以叫做心跳包。即每个连接的设备向本地推送心跳包,使本地根据每个设备推送的心跳包是否存在,来更新所述本地的下游设备的相关升级信息,通过这种方式,能够使本地无需关注每个设备的连接状态,能够满足升级新需求“升级方案需要保持扩展性、能够应对设备随时插拔”。Specifically, the relevant upgrade information of the local downstream device can be obtained through a heartbeat packet. In this embodiment, the heartbeat packet is a self-defined command word that is periodically notified to the other party of its own state between the device and the local, and is sent at a certain time interval, similar to a heartbeat, so it is called a heartbeat packet. That is, each connected device pushes a heartbeat packet to the local, so that the local device updates the relevant upgrade information of the local downstream device according to whether the heartbeat packet pushed by each device exists. In this way, the local does not need to pay attention to each device. The connection status of the equipment can meet the new requirements of the upgrade.
进一步,通过心跳包推送的方式,可以把各个设备组织起来,在本地APP形成一份升级管理列表,包括每个设备的身份信息、每个设备的是否需要升级的状态、可升级的最新版本,并且将之通知到用户;根据每个设备的心跳包推送的更新,来更新升级管理列表;新增心跳包,则新增对应的设备的相关升级信息,心跳包超时,则删除对应的设备的相关升级信息);用户可以从中选择自己需要升级的目标设备形成需升级列表,并且一键触发升级。Furthermore, through the heartbeat package push method, each device can be organized to form an upgrade management list in the local APP, including the identity information of each device, whether each device needs to be upgraded, and the latest version that can be upgraded. And notify the user; update the upgrade management list according to the update pushed by the heartbeat package of each device; add a new heartbeat package, add the relevant upgrade information of the corresponding device, and delete the corresponding device when the heartbeat package expires. Relevant upgrade information); users can select the target device they need to upgrade to form a list of upgrades, and trigger the upgrade with one click.
在一实施例中,步骤S105具体可以包括:子步骤S1051和子步骤S1052。In an embodiment, step S105 may specifically include: sub-step S1051 and sub-step S1052.
子步骤S1051:获取所述本地的下游设备的注册命令,所述注册命令是所述本地的下游设备向与所述本地的下游设备直接连接和/或间接连接的上游设备进行注册而发送的。Sub-step S1051: Obtain the registration command of the local downstream device, the registration command is sent by the local downstream device to register with the upstream device directly connected and/or indirectly connected with the local downstream device.
子步骤S1052:通过所述本地的下游设备的注册命令获取所述本地的下游设备的相关升级信息。Sub-step S1052: Obtain the relevant upgrade information of the local downstream device through the registration command of the local downstream device.
所述本地的下游设备可以向与所述本地的下游设备直接连接的上游设备 进行注册,例如:当所述本地的下游设备是叶子设备时,可以直接向本地进行注册;又如:与本地依次连接的设备分别是设备1、设备2以及设备3,设备3向设备2进行注册,设备2向设备1注册,设备1向本地注册;其中,设备2向设备1注册时,其注册命令可以一并携带上设备3的相关升级信息,同样设备1向本地注册时,其注册命令可以一并携带上设备3、设备2的相关升级信息。The local downstream device may register with the upstream device directly connected to the local downstream device, for example: when the local downstream device is a leaf device, it may register directly with the local; another example: sequentially with the local The connected devices are device 1, device 2, and device 3. Device 3 registers with device 2, device 2 registers with device 1, and device 1 registers locally; among them, when device 2 registers with device 1, its registration command can be one And carry the relevant upgrade information of the device 3. Similarly, when the device 1 registers locally, its registration command can also carry the relevant upgrade information of the device 3 and the device 2.
所述本地的下游设备也可以向与所述本地的下游设备间接连接的上游设备进行注册,例如:向与所述本地的下游设备间接连接的上游设备进行注册,如果该上游设备不是本地,不发响应消息,直接继续向上游设备转发,直到转发至本地,本地反馈响应消息,告知下游设备在本地已经收到注册命令,获得该下游设备的相关升级信息。The local downstream device may also register with the upstream device indirectly connected with the local downstream device, for example: register with the upstream device indirectly connected with the local downstream device, if the upstream device is not local, no Send a response message and continue forwarding it directly to the upstream device until it is forwarded locally. The local feedback response message informs the downstream device that it has received the registration command locally and obtains the relevant upgrade information of the downstream device.
所述本地的下游设备也可以向与所述本地的下游设备直接连接和间接连接的上游设备进行注册。例如:先向与所述本地的下游设备直接连接的上游设备进行注册,该注册成功后,再向与所述本地的下游设备间接连接的上游设备进行注册,直到转发至本地,本地反馈响应消息。通过这种方式,能够使每个设备获得自己所有下游设备的相关升级信息,为后续有目的性、有针对性的转发提供技术支持。The local downstream device may also register with the upstream device directly connected and indirectly connected with the local downstream device. For example: first register with the upstream device directly connected to the local downstream device, and after the registration is successful, register with the upstream device indirectly connected to the local downstream device until it is forwarded to the local, and the local feedback response message . In this way, each device can obtain relevant upgrade information of all its downstream devices, and provide technical support for subsequent purposeful and targeted forwarding.
在一实施方式中,所述注册命令包括设备注册命令和/或传输注册命令,所述设备注册命令是所述本地的下游设备向与所述本地的下游设备直接连接的上游设备进行设备注册而发送的注册命令,所述传输注册命令所述本地的下游设备向与所述本地的下游设备直接连接和间接连接的上游设备进行传输注册而发送的注册命令。In an embodiment, the registration command includes a device registration command and/or a transfer registration command, and the device registration command is the device registration of the local downstream device with the upstream device directly connected to the local downstream device. The registration command sent, the transmission registration command is a registration command sent by the local downstream device to transmit and register with the upstream device directly connected and indirectly connected with the local downstream device.
在一实施方式中,子步骤S1051所述获取所述本地的下游设备的注册命令之前,还可以包括:控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备发送所述设备注册命令,以使与所述本地的下游设备直接连接的上游设备获取所述本地的下游设备的相关升级信息。In an embodiment, before obtaining the registration command of the local downstream device in sub-step S1051, it may further include: controlling the local downstream device to send the local downstream device to the upstream device directly connected to the local downstream device. The device registration command enables the upstream device directly connected to the local downstream device to obtain the relevant upgrade information of the local downstream device.
具体地,设备注册的过程可以是:生成预定格式的注册数据包;控制所述本地的下游设备将所述注册数据包向与所述本地的下游设备直接连接的上游设备发送;控制所述与所述本地的下游设备直接连接的上游设备接收所述注册 数据包。Specifically, the process of device registration may be: generating a registration data packet in a predetermined format; controlling the local downstream device to send the registration data packet to an upstream device directly connected to the local downstream device; controlling the and The upstream device directly connected to the local downstream device receives the registration data packet.
其中,所述控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备发送设备注册命令,还包括:以预定时间间隔控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备发送所述设备注册命令。Wherein, the controlling the local downstream device to send a device registration command to an upstream device directly connected to the local downstream device further includes: controlling the local downstream device to a downstream device connected to the local at a predetermined time interval. The upstream device directly connected to the device sends the device registration command.
通过上述方式,能够满足升级新需求“升级方案需要保持扩展性、能够应对设备随时插拔”。Through the above method, it is possible to meet the new requirements of the upgrade "the upgrade solution needs to maintain scalability and be able to handle the plugging and unplugging of equipment at any time".
在另一实施方式中,子步骤S1051所述获取所述本地的下游设备的注册命令之前,还可以包括:控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备和间接连接的上游设备发送传输注册命令,以使所述本地的下游设备中每个设备获取自己所有下游设备的相关升级信息。其中,以预定时间间隔控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备和间接连接的上游设备发送传输注册命令。In another embodiment, before obtaining the registration command of the local downstream device in sub-step S1051, it may further include: controlling the local downstream device to directly connect to the upstream device directly connected to the local downstream device and indirectly The connected upstream device sends a transmission registration command, so that each of the local downstream devices obtains relevant upgrade information of all its downstream devices. Wherein, the local downstream device is controlled to send a transmission registration command to the upstream device directly connected to the local downstream device and the upstream device indirectly connected at a predetermined time interval.
在一具体实施方式中,所述控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备和间接连接的上游设备发送传输注册命令,还可以包括:在所述设备注册成功后,控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备和间接连接的上游设备发送传输注册命令。In a specific implementation manner, the controlling the local downstream device to send a transmission registration command to the upstream device directly connected to the local downstream device and the indirectly connected upstream device may also include: successfully registering with the device Then, the local downstream device is controlled to send a transmission registration command to the upstream device directly connected to the local downstream device and the upstream device indirectly connected.
具体地,传输注册的过程可以是:生成预定格式的注册数据包;控制所述本地的下游设备将所述注册数据包向与所述本地的下游设备直接连接的上游设备和间接连接的上游设备发送,直到发送至所述本地;控制所述本地向与所述本地直接连接的下游设备返回应答数据包。Specifically, the process of transferring registration may be: generating a registration data packet in a predetermined format; controlling the local downstream device to send the registration data packet to the upstream device directly connected to the local downstream device and the upstream device indirectly connected Send until it is sent to the local; control the local to return a response data packet to the downstream device directly connected to the local.
其中,所述注册数据包的数据内容包括命令识别码、设备名称、设备识别码、设备类型以及直接连接的上游设备识别码。Wherein, the data content of the registration data packet includes the command identification code, the device name, the device identification code, the device type, and the directly connected upstream device identification code.
其中,所述命令识别码包括设备注册命令识别码或传输注册命令识别码。Wherein, the command identification code includes a device registration command identification code or a transmission registration command identification code.
在一实施例中,步骤S102具体可以包括:根据检测到的所述用户的升级触发操作和所述目标设备的当前版本信息,下载所述目标设备对应版本的升级包。例如用户选择好待升级的目标设备,形成需升级列表后,一键触发升级,根据检测到的所述用户的升级触发操作和所述目标设备的当前版本信息,下载所述目标设备对应版本的升级包。In an embodiment, step S102 may specifically include: downloading an upgrade package of the corresponding version of the target device according to the detected upgrade trigger operation of the user and the current version information of the target device. For example, after the user selects the target device to be upgraded and forms the list that needs to be upgraded, the upgrade is triggered with one click, and based on the detected upgrade trigger operation of the user and the current version information of the target device, download the corresponding version of the target device Upgrade package.
在一实施例中,步骤S103之前,还可以包括:向所述目标设备发送准备 传输命令。所述本地预先保存有所述本地的下游设备的相关升级信息、所述本地的下游设备之间的连接关系。其中,所述准备传输命令的内容包括设备的身份信息、所述设备本身是否升级、所述设备的下游设备是否升级。通过这种方式,一方面能够使设备做好升级准备,另一方面能够使本地的下游设备有针对性、有目的地将所述目标设备对应版本的升级包传输至所述目标设备。In an embodiment, before step S103, it may further include: sending a transmission preparation command to the target device. The relevant upgrade information of the local downstream devices and the connection relationship between the local downstream devices are stored in the local in advance. Wherein, the content of the preparation transmission command includes the identity information of the device, whether the device itself is upgraded, and whether the downstream device of the device is upgraded. In this way, on the one hand, the device can be prepared for upgrade, and on the other hand, the local downstream device can be targeted and purposefully transmitted to the target device with the upgrade package corresponding to the version of the target device.
例如:如图3所示,当前与本地连接的下游设备供4个,按照与本地的连接由近及远分别是设备A(与本地直接连接)、设备B(与设备A直接连接)、设备C(与设备A直接连接)以及设备D(与设备B直接连接);准备传输命令的内容是:设备A,设备A升级(即设备A为目标设备),设备A的下游设备升级;设备B,设备B不升级,设备B的下游设备升级;设备C,设备C升级(即设备C为目标设备),设备C的下游设备无;设备D,设备D升级(即设备D为目标设备),设备D的下游设备无。当目标设备对应版本的升级包传输至设备A时,由于设备A升级,设备A获取设备A对应版本的升级包,然后向与设备A直接连接的设备B、C转发目标设备对应版本的升级包;设备B收到后,由于设备B不升级,但设备B的下游设备升级,设备B直接转发与设备B连接的设备D;设备C收到后,由于设备C升级,设备C没有下游设备(即设备C为叶子设备),设备C获取设备C对应版本的升级包,不再转发;设备D收到后,由于设备D升级,设备D没有下游设备,设备D获取设备D对应版本的升级包,不再转发。For example: as shown in Figure 3, there are currently 4 downstream devices connected to the local area. According to the connection with the local area, they are device A (directly connected to the local), device B (directly connected to the device A), and device C (directly connected to device A) and device D (directly connected to device B); the content of the prepared transmission command is: device A, device A is upgraded (that is, device A is the target device), and the downstream device of device A is upgraded; device B , Device B is not upgraded, and the downstream device of device B is upgraded; Device C, device C is upgraded (ie, device C is the target device), and the downstream device of device C is not available; device D, device D is upgraded (ie, device D is the target device), No downstream equipment of equipment D. When the upgrade package of the corresponding version of the target device is transmitted to device A, because device A is upgraded, device A obtains the upgrade package of the corresponding version of device A, and then forwards the upgrade package of the corresponding version of the target device to devices B and C directly connected to device A ; After device B receives, because device B is not upgraded, but the downstream device of device B is upgraded, device B directly forwards device D connected to device B; after device C receives, because device C is upgraded, device C has no downstream device ( That is, device C is a leaf device), device C obtains the upgrade package of the corresponding version of device C, and no longer forwards it; after device D receives it, because device D is upgraded, device D has no downstream devices, and device D obtains the upgrade package of the corresponding version of device D , No longer repost.
在一实施例中,步骤S104中,所述控制所述目标设备根据所述目标设备对应版本的升级包进行升级,还可以包括:向与所述本地直接连接的下游设备发送升级触发命令;通过与所述本地直接连接的下游设备分别触发所述目标设备,使所述目标设备根据所述目标设备对应版本的升级包进行升级。In an embodiment, in step S104, the controlling the target device to upgrade according to the upgrade package of the corresponding version of the target device may further include: sending an upgrade trigger command to the downstream device directly connected to the local device; The downstream devices directly connected to the local device respectively trigger the target device so that the target device is upgraded according to the upgrade package of the corresponding version of the target device.
此时,所述方法还可以包括:接收与所述本地直接连接的下游设备推送的升级进度,直到所述目标设备升级结束。At this time, the method may further include: receiving the upgrade progress pushed by the downstream device directly connected to the local device until the upgrade of the target device is completed.
大多数情况下,所述目标设备的数量为两个以上,下面具体说明步骤S103的细节内容。In most cases, the number of the target devices is more than two, and the details of step S103 are specifically described below.
步骤S103,所述将所述目标设备对应版本的升级包和所述目标设备的身份信息向本地的下游设备传输,可以包括:子步骤S1031和子步骤S1032。Step S103, the transmission of the upgrade package of the corresponding version of the target device and the identity information of the target device to the local downstream device may include: sub-step S1031 and sub-step S1032.
子步骤S1031:将两个以上的所述目标设备对应版本的升级包和所述目标设备的身份信息并行向与所述本地直接连接的下游设备传输。Sub-step S1031: Parallel transmission of two or more upgrade packages of the corresponding versions of the target device and the identity information of the target device to the downstream device directly connected to the local device.
子步骤S1032:根据所述目标设备的身份信息,控制与所述本地直接连接的下游设备执行匹配的操作,以使所述目标设备获取对应版本的升级包,所述本地的下游设备中每个设备保存有下游设备的身份信息。Sub-step S1032: According to the identity information of the target device, control the downstream device directly connected to the local device to perform a matching operation, so that the target device obtains the upgrade package of the corresponding version, and each of the local downstream devices The device saves the identity information of the downstream device.
当所述目标设备的数量为两个以上,并行向与所述本地直接连接的下游设备传输,能够避免依次传输因升级设备多而过多延长升级时间,能够满足升级新需求“升级设备数量大”。When the number of the target device is more than two, parallel transmission to the downstream device directly connected to the local device can avoid the sequential transmission due to the large number of upgrade devices and excessively prolong the upgrade time, and can meet the new requirements of the upgrade. "The number of upgrade devices is large. ".
待升级的目标设备可以分为以下几种情况:第一种目标设备包括目标叶子设备(目标设备接收到对应版本的升级包后,不需要转发),第二种目标设备包括目标中间设备(目标设备接收到对应版本的升级包后,根据其下游设备是否需要升级来确定是否需要转发),第三种目标设备包括目标叶子设备和目标中间设备,可以结合上述第一种和第二种的情况进行实施。The target device to be upgraded can be divided into the following situations: the first target device includes the target leaf device (the target device does not need to forward the upgrade package after receiving the corresponding version), and the second target device includes the target intermediate device (target After the device receives the upgrade package of the corresponding version, it determines whether it needs to be forwarded according to whether its downstream device needs to be upgraded), the third type of target device includes the target leaf device and the target intermediate device, and the above-mentioned first and second situations can be combined Carry out implementation.
其中,目标设备包括目标叶子设备,可以分为两种情况:第一种目标设备是与所述本地直接连接的下游设备(目标设备直接接收所述本地的对应版本的升级包),第二种目标设备是与所述本地间接连接的下游设备(需要目标设备与本地之间的中间设备中转至目标设备,目标设备才能接收到对应版本的升级包)。Among them, the target device includes a target leaf device, which can be divided into two situations: the first type of target device is a downstream device directly connected to the local device (the target device directly receives the upgrade package of the corresponding version of the local device), and the second type The target device is a downstream device indirectly connected to the local device (the intermediate device between the target device and the local device needs to be transferred to the target device so that the target device can receive the upgrade package of the corresponding version).
其中,目标设备包括目标中间设备,也可以分为四种情况:第一种是目标设备是与所述本地直接连接的下游设备、目标设备的下游设备不需要升级(目标设备直接接收所述本地的对应版本的升级包,目标设备不需要中转),第二种是目标设备是与所述本地直接连接的下游设备、目标设备的下游设备需要升级(目标设备直接接收所述本地的对应版本的升级包,目标设备需要继续向其下游设备中转),第三种目标设备是与所述本地间接连接的下游设备、目标设备的下游设备不需要升级(需要目标设备与本地之间的中间设备中转至目标设备,目标设备才能接收到对应版本的升级包,目标设备不需要中转),第四种目标设备是与所述本地间接连接的下游设备、目标设备的下游设备需要升级(需要目标设备与本地之间的中间设备中转至目标设备,目标设备才能接收到对应版本的升级包,目标设备需要继续向其下游设备中转)。Among them, the target device includes the target intermediate device, which can also be divided into four cases: the first is that the target device is a downstream device directly connected to the local, and the downstream device of the target device does not need to be upgraded (the target device directly receives the local The target device does not need to be transferred). The second is that the target device is a downstream device directly connected to the local device, and the downstream device of the target device needs to be upgraded (the target device directly receives the local corresponding version Upgrade package, the target device needs to continue to transfer to its downstream device), the third type of target device is the downstream device that is indirectly connected to the local, and the downstream device of the target device does not need to be upgraded (intermediate device transfer between the target device and the local is required To the target device, the target device can receive the upgrade package of the corresponding version, and the target device does not need to be transferred). The fourth type of target device is the downstream device indirectly connected to the local device. The downstream device of the target device needs to be upgraded (the target device and The intermediate device between the locals is transferred to the target device, the target device can receive the upgrade package of the corresponding version, and the target device needs to continue to transfer to its downstream device).
具体说明如下:The specific instructions are as follows:
A、目标设备包括目标叶子设备,目标设备是与所述本地直接连接的下游设备,子步骤S1032可以包括:根据所述目标设备的身份信息,确定所述目标设备包括目标叶子设备,且所述目标叶子设备包括与所述本地直接连接的下游设备,叶子设备向下没有连接的下游设备;控制与所述本地直接连接的下游设备获取对应版本的升级包,并停止转发。A. The target device includes a target leaf device, and the target device is a downstream device directly connected to the local device. Sub-step S1032 may include: determining that the target device includes the target leaf device according to the identity information of the target device, and The target leaf device includes the downstream device directly connected to the local, and the downstream device that is not connected to the downstream device of the leaf device; controlling the downstream device directly connected to the local to obtain the upgrade package of the corresponding version, and stop forwarding.
B、目标设备包括目标叶子设备,目标设备是与所述本地间接连接的下游设备,子步骤S1032可以包括:根据所述目标设备的身份信息,确定所述目标设备包括目标叶子设备,且所述目标叶子设备和与所述本地直接连接的下游设备之间包括中间设备,所述中间设备向下连接有下游设备,叶子设备向下没有连接的下游设备;控制与所述本地直接连接的下游设备和所述中间设备将所述对应版本的升级包转发至所述目标叶子设备;控制所述目标叶子设备获取对应版本的升级包,并停止转发。B. The target device includes a target leaf device, and the target device is a downstream device indirectly connected to the local device. Sub-step S1032 may include: determining that the target device includes the target leaf device according to the identity information of the target device, and An intermediate device is included between the target leaf device and the downstream device directly connected to the local device. The intermediate device is connected to the downstream device, and the leaf device is not connected to the downstream device; controls the downstream device directly connected to the local device. And the intermediate device forward the upgrade package of the corresponding version to the target leaf device; control the target leaf device to obtain the upgrade package of the corresponding version, and stop forwarding.
C、目标设备包括目标中间设备,目标设备是与所述本地直接连接的下游设备,子步骤S1032可以包括:根据所述目标设备的身份信息,确定所述目标设备包括目标中间设备,且所述目标中间设备和与所述本地直接连接的下游设备直接连接,中间设备向下连接有下游设备;控制与所述本地直接连接的下游设备将所述对应版本的升级包转发至所述目标中间设备;控制所述目标中间设备获取对应版本的升级包。C. The target device includes a target intermediate device, and the target device is a downstream device directly connected to the local device. Sub-step S1032 may include: determining that the target device includes the target intermediate device according to the identity information of the target device, and The target intermediate device is directly connected to the downstream device directly connected to the local device, and the intermediate device is downwardly connected to the downstream device; the downstream device directly connected to the local device is controlled to forward the upgrade package of the corresponding version to the target intermediate device ; Control the target intermediate device to obtain the upgrade package of the corresponding version.
C1、目标设备的下游设备不需要升级,所述控制所述目标中间设备获取对应版本的升级包,还包括:若所述目标设备不包括所述目标中间设备的下游设备,则控制所述目标中间设备获取对应版本的升级包,并停止转发。C1. The downstream device of the target device does not need to be upgraded, and the controlling the target intermediate device to obtain the upgrade package of the corresponding version also includes: if the target device does not include the downstream device of the target intermediate device, controlling the target The intermediate device obtains the upgrade package of the corresponding version and stops forwarding it.
C2、目标设备的下游设备需要升级,所述控制所述目标中间设备获取对应版本的升级包,还包括:若所述目标设备还包括所述目标中间设备的目标下游设备,则控制所述目标中间设备获取对应版本的升级包,并向所述目标中间设备的下游设备转发对应版本的升级包,直到转发至所述目标下游设备;控制所述目标下游设备获取对应版本的升级包。C2. The downstream device of the target device needs to be upgraded, and the controlling the target intermediate device to obtain the upgrade package of the corresponding version further includes: if the target device also includes the target downstream device of the target intermediate device, controlling the target The intermediate device obtains the upgrade package of the corresponding version, and forwards the upgrade package of the corresponding version to the downstream device of the target intermediate device until forwarding to the target downstream device; controls the target downstream device to obtain the upgrade package of the corresponding version.
D、目标设备包括目标中间设备,目标设备是与所述本地间接连接的下游设备,子步骤S1032可以包括:根据所述目标设备的身份信息,确定所述目标 设备包括目标中间设备,且所述目标中间设备和与所述本地直接连接的下游设备之间包括中间设备,中间设备向下连接有下游设备;控制与所述本地直接连接的下游设备和所述中间设备将所述对应版本的升级包转发至所述目标中间设备;控制所述目标中间设备获取对应版本的升级包。D. The target device includes a target intermediate device, and the target device is a downstream device indirectly connected to the local device. Sub-step S1032 may include: determining that the target device includes the target intermediate device according to the identity information of the target device, and The target intermediate device and the downstream device directly connected to the local area include an intermediate device, and the intermediate device is downwardly connected to the downstream device; the downstream device directly connected to the local area and the intermediate device are controlled to upgrade the corresponding version The package is forwarded to the target intermediate device; the target intermediate device is controlled to obtain the upgrade package of the corresponding version.
D1、目标设备的下游设备不需要升级,所述控制所述目标中间设备获取对应版本的升级包,还包括:若所述目标设备不包括所述目标中间设备的下游设备,则控制所述目标中间设备获取对应版本的升级包,并停止转发。D1. The downstream device of the target device does not need to be upgraded. The controlling the target intermediate device to obtain the upgrade package of the corresponding version also includes: if the target device does not include the downstream device of the target intermediate device, controlling the target The intermediate device obtains the upgrade package of the corresponding version and stops forwarding it.
D2、目标设备的下游设备需要升级,所述控制所述目标中间设备获取对应版本的升级包,还包括:若所述目标设备还包括所述目标中间设备的目标下游设备,则控制所述目标中间设备获取对应版本的升级包,并向所述目标中间设备的下游设备转发对应版本的升级包,直到转发至所述目标下游设备;控制所述目标下游设备获取对应版本的升级包。D2. The downstream device of the target device needs to be upgraded, and the controlling the target intermediate device to obtain the upgrade package of the corresponding version further includes: if the target device also includes the target downstream device of the target intermediate device, controlling the target The intermediate device obtains the upgrade package of the corresponding version, and forwards the upgrade package of the corresponding version to the downstream device of the target intermediate device until forwarding to the target downstream device; controls the target downstream device to obtain the upgrade package of the corresponding version.
下面以遥控器和无人机系统为例,来详细说明本申请实施例的方法。The following uses a remote controller and an unmanned aerial vehicle system as an example to illustrate the method of the embodiment of the present application in detail.
参见图4,图4是本申请设备升级的方法在遥控器和无人机系统中的应用一流程示意图,包括如下步骤:Refer to Figure 4, which is a schematic diagram of the application process of the device upgrade method of the present application in the remote control and UAV system, including the following steps:
1.设备通过注册的方式向本地APP推送心跳包(包括设备的相关升级信息),本地把无人机的各设备组织起来,在本地APP形成一份升级管理列表,升级管理列表的内容可以包括每个设备的是否需要升级(根据设备的当前版本信息与该设备对应的可升级的最新版本来确定)、该设备对应的可升级的最新版本,并且将之通知到用户;1. The device pushes the heartbeat package (including the related upgrade information of the device) to the local APP through registration, and organizes the devices of the drone locally to form an upgrade management list in the local APP. The content of the upgrade management list can include Whether each device needs to be upgraded (determined according to the current version information of the device and the latest upgradeable version corresponding to the device), the latest upgradeable version corresponding to the device, and notify the user of it;
2.本地APP无需关注每个设备的连接状态,只需要根据每个设备的心跳包推送是否存在,来更新升级管理列表;2. The local APP does not need to pay attention to the connection status of each device, but only needs to update the upgrade management list according to whether the heartbeat packet push of each device exists;
3.用户可以从中选择自己需要升级的设备形成需升级列表,并且一键触发升级;3. Users can select the equipment they need to upgrade to form an upgrade list, and trigger the upgrade with one click;
4.本地APP收到用户触发升级的操作后,根据用户的需升级列表,下载列表中的目标设备对应版本的升级包;4. After the local APP receives the user-triggered upgrade operation, it downloads the upgrade package of the corresponding version of the target device in the list according to the user's need to upgrade list;
5.下载完成后,本地APP并行向需升级列表中的目标设备发送准备传输命令、并行向这些目标设备传输升级包,而无需依次传输和升级;5. After the download is complete, the local APP sends the preparation transmission command to the target devices in the list to be upgraded in parallel, and transmits the upgrade package to these target devices in parallel, without the need for sequential transmission and upgrade;
6.所有需升级的目标设备对应版本的升级包传输完成后,本地APP向与 本地直接连接的下游设备(也可以称为直接下游设备)发送升级触发命令,该直接下游设备分别触发需升级列表中的目标设备进行内部升级,本地APP接收该直接下游设备推送过来的升级进度,直到所有目标设备升级结束。6. After the transmission of the upgrade package of the corresponding version of all target devices to be upgraded is completed, the local APP sends an upgrade trigger command to the downstream device directly connected to the local (also called direct downstream device), and the direct downstream device triggers the upgrade list separately The target device in the device is upgraded internally, and the local APP receives the upgrade progress pushed by the direct downstream device until the upgrade of all target devices is completed.
在第1步中,设备通过注册的方式进行心跳包推送的方式,能够把多设备组织起来,为解决设备升级新需求“升级设备数量大、升级方案需要保持扩展性、能够应对设备随时插拔”打下基础。消费级无人机典型的升级场景如图5,行业级无人机典型的升级场景如图2,两者的升级拓扑图均呈现树状结构,本申请实施例统称为设备树。本地APP是设备树的根节点;每一个设备就是一个树节点;向下无下游设备的设备就是一个叶子设备(叶子节点);向下有下游设备的设备就是一个中间设备(中间节点)。对于消费级无人机典型的设备树来说(如图5),遥控器是一个中间设备,飞机是一个叶子设备。对于行业级无人机典型的设备树来说(如图2),遥控器和飞机都是中间设备,外设和挂载是叶子设备。In the first step, the device pushes heartbeat packets through registration, which can organize multiple devices to solve the new requirements of device upgrades. "The number of upgrade devices is large, the upgrade plan needs to maintain scalability, and it can handle the plugging and unplugging of devices at any time. "lay the foundation. A typical upgrade scenario for consumer-grade drones is shown in Figure 5, and a typical upgrade scenario for industry-grade drones is shown in Figure 2. Both upgrade topological diagrams present a tree structure, and the embodiments of this application are collectively referred to as a device tree. The local APP is the root node of the device tree; each device is a tree node; the device without downstream devices is a leaf device (leaf node); the device with downstream devices is an intermediate device (intermediate node). For a typical device tree for consumer drones (see Figure 5), the remote control is an intermediate device, and the aircraft is a leaf device. For a typical device tree of an industry-level UAV (see Figure 2), the remote control and the aircraft are both intermediate devices, and the peripherals and mounts are leaf devices.
为把物理上的设备树,转化为逻辑上能够处理的设备树,本申请实施例使用“设备注册”和“传输注册”。设备注册可以是:下游设备向直接连接的上游设备(直接上游设备)注册,让每个设备节点都知道自己的直接连接的下游设备(直接下游设备)的存在;传输注册可以是:设备注册成功后,下游设备向直接连接的上游设备(直接上游设备)和间接连接的上游设备(间接上游设备)进行注册,让每个设备节点都知道自己的所有下游设备的存在。这两者注册,都是下游设备以心跳包的方式,即1Hz的频率向上游设备推送。若第一次收到某个下游设备的用于注册的心跳包,即把该设备加入到本地APP升级管理列表;若某个下游设备的心跳包超时,即超过一定时间内(例如:具体实现时可以为5秒)本地APP一直没有收到该下游设备的用于注册的心跳包,本地APP则认为该设备不在连接状态,本地APP把该设备从升级管理列表中移除。所以,“推送用于注册的心跳包”这种方式,让本地APP无需关心每个设备的连接状态,能够实现升级方案的扩展性、能够应对设备的随时插拔。In order to transform the physical device tree into a logically processable device tree, the embodiment of this application uses "device registration" and "transmission registration". Device registration can be: the downstream device registers with the directly connected upstream device (direct upstream device), so that each device node knows the existence of its directly connected downstream device (direct downstream device); transmission registration can be: device registration is successful Later, the downstream device registers with the directly connected upstream device (direct upstream device) and indirectly connected upstream device (indirect upstream device), so that each device node knows the existence of all its downstream devices. Both of these registrations are sent by the downstream device to the upstream device in the form of a heartbeat packet, that is, at a frequency of 1 Hz. If the heartbeat packet for registration of a downstream device is received for the first time, the device will be added to the local APP upgrade management list; if the heartbeat packet of a downstream device has timed out, it will exceed a certain period of time (for example: specific implementation) The time can be 5 seconds) The local APP has not received the heartbeat packet for registration of the downstream device, and the local APP considers that the device is not connected, and the local APP removes the device from the upgrade management list. Therefore, the method of "pushing the heartbeat package for registration" makes the local APP need not care about the connection status of each device, can achieve the scalability of the upgrade plan, and can cope with the plugging and unplugging of the device at any time.
另外,本地APP升级管理列表包括的内容可以是:设备类型、设备ID、设备是否需要升级的状态、设备在服务器上的最新版本。其中,是否需要升级的状态,是设备当前版本和服务器上的最新版本比较,若本设备当前版本较小, 则需要升级,否则不需要升级。In addition, the contents of the local APP upgrade management list may include: device type, device ID, status of whether the device needs to be upgraded, and the latest version of the device on the server. Among them, the status of whether to upgrade is the comparison between the current version of the device and the latest version on the server. If the current version of the device is smaller, it needs to be upgraded, otherwise, it is not necessary to upgrade.
在本实施例中,设备注册的具体实现请参见图6:下游设备C连接上游设备B后,C需要发送规定格式的注册数据包,上发到上游设备B;上游设备B收到后,回发同样格式的注册数据包,下发到下游设备C。此过程结束后,视为下游设备C向上游设备B的设备注册成功。其中,注册命令数据格式可以参见表1。In this embodiment, the specific implementation of device registration is shown in Figure 6: After downstream device C connects to upstream device B, C needs to send a registration data packet in the specified format and upload it to upstream device B; after upstream device B receives it, it returns Send the registration data packet in the same format and deliver it to the downstream device C. After this process is over, it is deemed that the downstream device C has successfully registered with the upstream device B's device. Among them, the register command data format can be seen in Table 1.
表1注册命令数据格式Table 1 Register command data format
数据内容Data content | 备注Remark |
命令idCommand id | 设备注册命令id,或传输注册命令idDevice registration command id, or transfer registration command id |
设备名称Equipment name | 该设备的名字,字符串The name of the device, string |
设备idDevice id | 该设备本身的idThe id of the device itself |
设备类型Equipment type | 该设备的类型,枚举值The type of the device, enumerated value |
通信idCommunication id | 此次设备注册中,上游设备idIn this device registration, the upstream device id |
在本实施例中,传输注册的具体实现请参见图6,下游设备C向上游设备B的设备注册成功后,下游设备C向上游设备B发送规定格式的注册数据包(注册命令id区别与设备注册的注册命令id);上游设备B收到后,给下游设备C仅反馈应答数据包;同时,上游设备B向根节点A,转发下游设备C的注册数据包;根节点A收到后,给设备B仅反馈应答数据包。此过程结束后,视为下游设备C向直接上游设备和间接上游设备的传输注册成功。In this embodiment, refer to Figure 6 for the specific implementation of the transmission registration. After the downstream device C successfully registers with the device of the upstream device B, the downstream device C sends a registration data packet in the specified format to the upstream device B (the difference between the registration command id and the device Registered registration command id); after the upstream device B receives it, it only feeds back the response data packet to the downstream device C; at the same time, the upstream device B forwards the registration data packet of the downstream device C to the root node A; after the root node A receives it, Only the response data packet is fed back to device B. After this process is over, it is deemed that the downstream device C has successfully registered for transmission to the direct upstream device and the indirect upstream device.
在第2步中,根据用来注册而推送的心跳包来更新本地APP的升级管理列表。在第3步中,用户可以从中选择自己需要升级的目标设备形成需升级列表,并且一键触发升级。这里需要注意的是,用户从本地APP的升级管理列表中,选择可升级的目标设备,如果该设备已是最新版本的设备,在界面显示灰色,用户无法选择。形成需升级列表后,用户点击一键升级。在第4步中,下载需升级列表中的目标设备对应版本的升级包。In the second step, update the upgrade management list of the local APP according to the heartbeat package pushed for registration. In the third step, the user can select the target device that he needs to upgrade to form a list to be upgraded, and trigger the upgrade with one click. It should be noted here that the user selects the target device that can be upgraded from the upgrade management list of the local APP. If the device is already the latest version of the device, the interface is grayed out and the user cannot select it. After forming the list to be upgraded, the user clicks one key to upgrade. In step 4, download the upgrade package of the corresponding version of the target device in the list to be upgraded.
在第5步中,本地APP并行传输目标设备对应的升级包至需升级列表中的目标设备。现有消费级无人机APP升级方案中,APP是逐个升级设备,依次传输和升级,而本申请实施例的方案,本地APP向需升级列表内的目标设备并行发送准备传输命令,然后传输该目标设备的升级包。如果需升级列表里面包括多个目标设备,上述过程是并行的。在本实施例中,发送准备传输命令的具体实现可以参见图7-图11,对于行业级无人机,常用的升级场景可以包 括:场景一、本地APP单独升级一个设备;场景二、本地APP升级全部设备;场景三、本地APP升级全部设备中的某一个叶子设备;场景四、本地APP升级全部设备中的某一个中间设备;场景五、本地APP升级全部设备中的某一群设备。本地APP作为设备树的根节点,向下发送准备传输命令。本申请实施例中的准备传输命令,不同于消费级无人机APP升级方案的准备传输命令,要多两个标志参数,本实施例中的准备传输命令的命令格式可以参见表2。In step 5, the local APP transfers the upgrade package corresponding to the target device in parallel to the target device in the list to be upgraded. In the existing consumer-grade UAV APP upgrade solution, the APP upgrades the devices one by one, and transmits and upgrades sequentially. In the solution of the embodiment of this application, the local APP sends a transmission preparation command in parallel to the target devices in the list to be upgraded, and then transmits the Upgrade package of the target device. If multiple target devices are included in the upgrade list, the above process is parallel. In this embodiment, the specific implementation of sending the prepare transmission command can be seen in Figures 7-11. For industry-level drones, commonly used upgrade scenarios can include: scenario one, local APP upgrades a device alone; scenario two, local APP Upgrade all devices; Scenario 3: Local APP upgrades a certain leaf device in all devices; Scenario 4: Local APP upgrades an intermediate device in all devices; Scenario 5: Local APP upgrades a certain group of devices in all devices. The local APP serves as the root node of the device tree, and sends a transmission preparation command downward. The preparation transmission command in the embodiment of this application is different from the preparation transmission command of the consumer-grade UAV APP upgrade solution, and requires two more flag parameters. For the command format of the preparation transmission command in this embodiment, see Table 2.
表2准备传输命令的命令数据格式Table 2 The command data format of the command to be transmitted
数据内容Data content | 备注Remark |
命令idCommand id | 传输准备命令idTransmission preparation command id |
设备idDevice id | To |
设备本身是否升级flag1Whether the device itself is upgraded with flag1 | 用于标志是否跳过该设备本身的升级Used to mark whether to skip the upgrade of the device itself |
设备的下游设备是否升级flag2Whether the downstream device of the device is upgraded with flag2 | 用于标志是否触发该设备的下游设备的升级Used to mark whether to trigger the upgrade of the downstream equipment of the equipment |
场景一、本地APP单独升级某个设备(如图7,该待升级的目标设备包括B设备,B设备为叶子设备,B设备与本地直接连接),准备传输命令的值可以参见表3。Scenario 1: The local APP upgrades a certain device alone (as shown in Figure 7, the target device to be upgraded includes the B device, the B device is a leaf device, and the B device is directly connected to the local device). The value of the prepared transmission command can be seen in Table 3.
表3场景一的准备传输命令的值Table 3 Values of Ready-to-Transmit Commands in Scenario One
设备idDevice id | 设备本身是否升级flag1Whether the device itself is upgraded with flag1 | 设备的下游设备是否升级flag2Whether the downstream device of the device is upgraded with flag2 |
BB | yesyes | --- |
场景二、本地APP升级全部设备(如图8,待升级的目标设备包括B设备、C设备、D设备、E设备以及F设备;B设备和C设备为中间设备,D设备、E设备以及F设备为叶子设备;B设备与本地直接连接,C设备与B设备直接连接,D设备与B设备直接连接;E设备以及F设备分别与C设备直接连接),准备传输命令的值可以参见表4。Scenario 2: Local APP upgrades all devices (as shown in Figure 8, the target devices to be upgraded include B device, C device, D device, E device, and F device; B device and C device are intermediate devices, D device, E device, and F device The device is a leaf device; the B device is directly connected to the local device, the C device is directly connected to the B device, the D device is directly connected to the B device; the E device and the F device are directly connected to the C device), the value of the prepared transmission command can be seen in Table 4 .
表4场景二的准备传输命令的值Table 4 The value of the read-to-transmit command in scenario 2
设备idDevice id | 设备本身是否升级flag1Whether the device itself is upgraded with flag1 | 设备的下游设备是否升级flag2Whether the downstream device of the device is upgraded with flag2 |
BB | yesyes | yesyes |
CC | yesyes | yesyes |
DD | yesyes | --- |
EE | yesyes | --- |
FF | yesyes | --- |
场景三、本地APP升级全部设备中的某一个叶子设备(如图9,待升级的目标设备包括E设备,E设备为与本地间接连接的叶子设备;E设备与本地之间包括中间设备,分别是B设备和C设备),准备传输命令的值可以参见表5。Scenario 3: The local APP upgrades a certain leaf device in all devices (as shown in Figure 9, the target device to be upgraded includes the E device, which is a leaf device that is indirectly connected to the local device; the E device and the local device include intermediate devices, respectively It is B device and C device), the value of the command to be transmitted can be seen in Table 5.
表5场景三的准备传输命令的值Table 5 The value of the prepared transmission command in scenario 3
设备idDevice id | 设备本身是否升级flag1Whether the device itself is upgraded with flag1 | 设备的下游设备是否升级flag2Whether the downstream device of the device is upgraded with flag2 |
BB | nono | yesyes |
CC | nono | yesyes |
DD | nono | --- |
EE | yesyes | --- |
FF | nono | --- |
场景四、本地APP升级全部设备中的某一个中间设备(如图10,待升级的目标设备包括C设备,C设备为与本地间接连接的中间设备;C设备与本地之间包括中间设备B设备),准备传输命令的值可以参见表6。Scenario 4: The local APP upgrades an intermediate device in all devices (as shown in Figure 10, the target device to be upgraded includes the C device, which is an intermediate device that is indirectly connected to the local device; the intermediate device B device is included between the C device and the local device ), see Table 6 for the value of the command to be transmitted.
表6场景四的准备传输命令的值Table 6: The value of the prepared transmission command in scenario 4
设备idDevice id | 设备本身是否升级flag1Whether the device itself is upgraded with flag1 | 设备的下游设备是否升级flag2Whether the downstream device of the device is upgraded with flag2 |
BB | nono | yesyes |
CC | yesyes | nono |
DD | nono | --- |
EE | --- | --- |
FF | --- | --- |
场景五、本地APP升级全部设备中的某一群设备(如图11,待升级的目标设备包括C设备、E设备以及F设备,C设备为与本地间接连接的中间设备,E设备和F设备为与本地间接连接的叶子设备;E设备和F设备为与C设备直接连接的下游设备,C设备与本地之间包括中间设备B设备),准备传输命令的值可以参见表7。Scenario 5: The local APP upgrades a certain group of devices in all devices (as shown in Figure 11, the target devices to be upgraded include C device, E device and F device. C device is an intermediate device that is indirectly connected to the local device, and E device and F device are Leaf devices that are indirectly connected to the local device; the E device and the F device are downstream devices directly connected to the C device, and the intermediate device B device is included between the C device and the local device. The value of the prepared transmission command can be seen in Table 7.
表7场景五的准备传输命令的值Table 7: The value of the prepare transmission command in scenario 5
设备idDevice id | 设备本身是否升级flag1Whether the device itself is upgraded with flag1 | 设备的下游设备是否升级flag2Whether the downstream device of the device is upgraded with flag2 |
BB | nono | yesyes |
CC | yesyes | yesyes |
DD | nono | --- |
EE | yesyes | --- |
FF | yesyes | --- |
准备传输命令发送成功后,本地APP向需要升级的目标设备传输升级包;不需要升级的设备仅仅参与中转升级包的过程。由于本地APP和每一个需要升级的目标设备的实际物理链路不一样,所以传输方式也可不一样,这里不赘述。等所有的升级包传输成功结束后,进行第6步:本地APP向直接下游设备发送升级触发命令,该直接下游设备会分别触发需升级列表中的目标设备进 行内部升级,本地APP接收该直接下游设备推送过来的升级进度,直到升级结束。After the preparation for transmission command is successfully sent, the local APP transmits the upgrade package to the target device that needs to be upgraded; the device that does not need to be upgraded only participates in the process of transferring the upgrade package. Since the actual physical link between the local APP and each target device that needs to be upgraded is different, the transmission method may also be different, so I won't repeat it here. After all the upgrade package transmissions are completed successfully, proceed to step 6: The local APP sends an upgrade trigger command to the direct downstream device, and the direct downstream device will trigger the target device in the list to be upgraded to perform internal upgrade, and the local APP receives the direct downstream device. The upgrade progress pushed by the device until the end of the upgrade.
本申请实施例通过设备注册与传输注册的方式,让需要升级的目标设备成为设备树的一个节点,而本地APP是该设备树的根节点。每插上一种设备(无论是遥控器上的外设,还是飞机上的挂载),本地APP根据该设备的用于注册的心跳包,把该设备加入到升级管理列表内;若该设备被移除,本地APP根据该设备的用于注册的心跳包超时,把该设备从升级管理列表中删除。只要所有接入本申请实施例设备树的设备,满足注册的实现与数据标准,本地APP就能实现该设备的升级,并能够方便地处理该设备的插拔,同时保持升级方案的扩展性。用户触发升级后,本地APP根据用户选择形成的需升级列表,并行向设备树的这些目标设备发送升级指令、并行向这些目标设备传输升级包,所有需升级的目标设备的升级包传输完成后,本地APP同时触发这些目标设备的内部升级。所以用户只需要选择需要升级的目标设备,就能一键升级,同时并行传输替代现有方案中的依次传输升级,能够较大减少多设备情况下的升级时间。In the embodiment of the present application, the target device that needs to be upgraded becomes a node of the device tree by means of device registration and transmission registration, and the local APP is the root node of the device tree. Every time a device is plugged in (whether it is a peripheral on the remote control or mounted on an airplane), the local APP will add the device to the upgrade management list according to the heartbeat packet used for registration of the device; if the device If it is removed, the local APP deletes the device from the upgrade management list according to the timeout of the heartbeat packet for registration of the device. As long as all devices connected to the device tree of the embodiment of the present application meet the registration implementation and data standards, the local APP can implement the upgrade of the device, and can conveniently handle the plugging and unplugging of the device, while maintaining the scalability of the upgrade solution. After the user triggers the upgrade, the local APP will send upgrade instructions to these target devices in the device tree in parallel and transmit upgrade packages to these target devices in parallel according to the upgrade list formed by the user's selection. After the upgrade package transmission of all target devices that need to be upgraded is completed, The local APP also triggers the internal upgrade of these target devices. Therefore, users only need to select the target device that needs to be upgraded, and they can upgrade with one click. At the same time, parallel transmission replaces the sequential transmission upgrade in the existing scheme, which can greatly reduce the upgrade time in the case of multiple devices.
综上所述,通过本申请实施例的方案,本地APP能够很好地满足升级新要求“升级设备数量大、保持扩展性、能够应对设备随时插拔”,从而达到行业级无人机的升级目标:用户可以在多设备中选择自己需要升级的目标设备,进行一键升级。In summary, through the solutions of the embodiments of this application, the local APP can well meet the new upgrade requirements "large number of upgraded equipment, maintain scalability, and be able to handle the plugging and unplugging of equipment at any time", so as to achieve the upgrade of industry-level drones. Goal: Users can select the target device they need to upgrade from among multiple devices, and perform one-click upgrade.
参见图12,图12是本申请设备升级的装置一实施例的结构示意图,需要说明的是,本实施例的装置能够执行上述设备升级的方法中的步骤,相关内容的详细说明,请参见上述设备升级的方法的相关内容,在此不再赘叙。Refer to Figure 12, which is a schematic structural diagram of an embodiment of the device upgrade apparatus of the present application. It should be noted that the device of this embodiment can execute the steps in the above device upgrade method. For a detailed description of related content, please refer to the above The relevant content of the equipment upgrade method will not be repeated here.
所述装置100包括:存储器1、处理器2以及通信电路3,所述存储器1和所述通信电路3分别与所述处理器2连接。The device 100 includes a memory 1, a processor 2, and a communication circuit 3, and the memory 1 and the communication circuit 3 are connected to the processor 2 respectively.
其中,处理器2可以是微控制单元、中央处理单元或数字信号处理器,等等。Among them, the processor 2 may be a micro control unit, a central processing unit, or a digital signal processor, and so on.
其中,存储器1可以是Flash芯片、只读存储器、磁盘、光盘、U盘或者移动硬盘等等。Among them, the memory 1 can be a Flash chip, a read-only memory, a magnetic disk, an optical disk, a U disk or a mobile hard disk, etc.
其中,通信电路3可以用于该装置与外部通信,也可以用于自身与处理器 2的通信、以及存储器1与处理器2之间的通信。Among them, the communication circuit 3 can be used for the device to communicate with the outside, and can also be used for the communication between itself and the processor 2 and the communication between the memory 1 and the processor 2.
所述存储器1用于存储计算机程序;所述处理器2用于执行所述计算机程序并在执行所述计算机程序时,实现如下步骤:The memory 1 is used to store a computer program; the processor 2 is used to execute the computer program and when the computer program is executed, the following steps are implemented:
根据检测到的用户的目标设备选择操作,从本地的下游设备的相关升级信息中获取待升级的目标设备的相关升级信息,所述相关升级信息包括设备的身份信息和设备的当前版本信息,所述本地的下游设备包括与本地直接连接的设备和/或间接连接的设备;根据所述目标设备的当前版本信息,控制所述通信电路下载所述目标设备对应版本的升级包;控制所述通信电路将所述目标设备对应版本的升级包和所述目标设备的身份信息向所述本地的下游设备传输,使所述本地的下游设备根据所述目标设备的身份信息将所述目标设备对应版本的升级包传输至所述目标设备,使所述目标设备获取对应版本的升级包;当所述目标设备获取到对应版本的升级包后,控制所述目标设备根据所述目标设备对应版本的升级包进行升级。According to the detected user's target device selection operation, the relevant upgrade information of the target device to be upgraded is obtained from the relevant upgrade information of the local downstream device. The relevant upgrade information includes the identity information of the device and the current version information of the device. The local downstream device includes a device directly connected to the local device and/or a device connected indirectly; according to the current version information of the target device, the communication circuit is controlled to download the upgrade package of the corresponding version of the target device; and the communication is controlled The circuit transmits the upgrade package of the corresponding version of the target device and the identity information of the target device to the local downstream device, so that the local downstream device converts the version corresponding to the target device according to the identity information of the target device The upgrade package is transmitted to the target device so that the target device obtains the upgrade package of the corresponding version; when the target device obtains the upgrade package of the corresponding version, the target device is controlled to upgrade according to the corresponding version of the target device The package is upgraded.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:获取所述本地的下游设备的相关升级信息。Wherein, when the processor executes the computer program, it implements the following steps: acquiring the relevant upgrade information of the local downstream device.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:通过心跳包获取所述本地的下游设备的相关升级信息。Wherein, when the processor executes the computer program, the following steps are implemented: obtaining the relevant upgrade information of the local downstream device through a heartbeat packet.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:获取所述本地的下游设备的注册命令,所述注册命令是所述本地的下游设备向与所述本地的下游设备直接连接和/或间接连接的上游设备进行注册而发送的;通过所述本地的下游设备的注册命令获取所述本地的下游设备的相关升级信息。Wherein, when the processor executes the computer program, it implements the following steps: obtaining a registration command of the local downstream device, where the registration command is that the local downstream device directly connects to the local downstream device And/or sent by an indirectly connected upstream device for registration; obtaining the relevant upgrade information of the local downstream device through the registration command of the local downstream device.
其中,所述注册命令包括设备注册命令和/或传输注册命令,所述设备注册命令是所述本地的下游设备向与所述本地的下游设备直接连接的上游设备进行设备注册而发送的注册命令,所述传输注册命令所述本地的下游设备向与所述本地的下游设备直接连接和间接连接的上游设备进行传输注册而发送的注册命令。The registration command includes a device registration command and/or a transfer registration command, and the device registration command is a registration command sent by the local downstream device to the upstream device directly connected to the local downstream device for device registration The transmission registration command is a registration command sent by the local downstream device to perform transmission registration to the upstream device directly connected and indirectly connected with the local downstream device.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备发送所述设备注册命令,以使与所述本地的下游设备直接连接的上游设备获取所述本地的下游 设备的相关升级信息。Wherein, when the processor executes the computer program, it implements the following steps: controlling the local downstream device to send the device registration command to the upstream device directly connected to the local downstream device, so that the The upstream device directly connected to the local downstream device obtains relevant upgrade information of the local downstream device.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:生成预定格式的注册数据包;控制所述本地的下游设备将所述注册数据包向与所述本地的下游设备直接连接的上游设备发送;控制所述与所述本地的下游设备直接连接的上游设备接收所述注册数据包。Wherein, when the processor executes the computer program, it implements the following steps: generating a registration data packet in a predetermined format; controlling the local downstream device to send the registration data packet to a device directly connected to the local downstream device Sent by an upstream device; controlling the upstream device directly connected to the local downstream device to receive the registration data packet.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:以预定时间间隔控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备发送所述设备注册命令。Wherein, when the processor executes the computer program, the following steps are implemented: controlling the local downstream device to send the device registration command to an upstream device directly connected to the local downstream device at a predetermined time interval.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备和间接连接的上游设备发送传输注册命令,以使所述本地的下游设备中每个设备获取自己所有下游设备的相关升级信息。Wherein, when the processor executes the computer program, it implements the following steps: controlling the local downstream device to send a transmission registration command to the upstream device directly connected to the local downstream device and the upstream device indirectly connected to Make each of the local downstream devices obtain relevant upgrade information of all its own downstream devices.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:在所述设备注册成功后,控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备和间接连接的上游设备发送传输注册命令。Wherein, when the processor executes the computer program, it implements the following steps: after the device is successfully registered, it controls the local downstream device to directly connect to the upstream device directly connected to the local downstream device and the indirect connected device. The upstream device sends a transfer registration command.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:生成预定格式的注册数据包;控制所述本地的下游设备将所述注册数据包向与所述本地的下游设备直接连接的上游设备和间接连接的上游设备发送,直到发送至所述本地;控制所述本地向与所述本地直接连接的下游设备返回应答数据包。Wherein, when the processor executes the computer program, it implements the following steps: generating a registration data packet in a predetermined format; controlling the local downstream device to send the registration data packet to a device directly connected to the local downstream device The upstream device and the indirectly connected upstream device send until it is sent to the local; control the local to return a response data packet to the downstream device directly connected to the local.
其中,所述注册数据包的数据内容包括命令识别码、设备名称、设备识别码、设备类型以及直接连接的上游设备识别码。Wherein, the data content of the registration data packet includes the command identification code, the device name, the device identification code, the device type, and the directly connected upstream device identification code.
其中,所述命令识别码包括设备注册命令识别码或传输注册命令识别码。Wherein, the command identification code includes a device registration command identification code or a transmission registration command identification code.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:以预定时间间隔控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备和间接连接的上游设备发送传输注册命令。Wherein, when the processor executes the computer program, the following steps are implemented: controlling the local downstream device to send transmissions to the upstream device directly connected to the local downstream device and the upstream device indirectly connected at a predetermined time interval Register the command.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:根据检测到的所述用户的升级触发操作和所述目标设备的当前版本信息,控制所述通信电路下载所述目标设备对应版本的升级包。Wherein, when the processor executes the computer program, it implements the following steps: according to the detected upgrade trigger operation of the user and the current version information of the target device, control the communication circuit to download the corresponding target device Version upgrade package.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:控制所述通 信电路向所述目标设备发送准备传输命令。Wherein, when the processor executes the computer program, it implements the following steps: controlling the communication circuit to send a transmission preparation command to the target device.
其中,所述准备传输命令的内容包括设备的身份信息、所述设备本身是否升级、所述设备的下游设备是否升级。Wherein, the content of the preparation transmission command includes the identity information of the device, whether the device itself is upgraded, and whether the downstream device of the device is upgraded.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:通知所述通信电路向与所述本地直接连接的下游设备发送升级触发命令;通过与所述本地直接连接的下游设备分别触发所述目标设备,使所述目标设备根据所述目标设备对应版本的升级包进行升级。Wherein, when the processor executes the computer program, the following steps are implemented: informing the communication circuit to send an upgrade trigger command to the downstream device directly connected to the local; and triggering respectively through the downstream device directly connected to the local The target device enables the target device to upgrade according to the upgrade package of the corresponding version of the target device.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:控制所述通信电路接收与所述本地直接连接的下游设备推送的升级进度,直到所述目标设备升级结束。Wherein, when the processor executes the computer program, the following steps are implemented: controlling the communication circuit to receive the upgrade progress pushed by the downstream device directly connected to the local device until the upgrade of the target device is completed.
其中,所述目标设备的数量为两个以上,所述处理器在执行所述计算机程序时,实现如下步骤:控制所述通信电路将两个以上的所述目标设备对应版本的升级包和所述目标设备的身份信息并行向与所述本地直接连接的下游设备传输;根据所述目标设备的身份信息,控制与所述本地直接连接的下游设备执行匹配的操作,以使所述目标设备获取对应版本的升级包,所述本地的下游设备中每个设备保存有下游设备的身份信息。Wherein, the number of the target devices is more than two, and when the processor executes the computer program, the following steps are implemented: control the communication circuit to convert more than two upgrade packages of the corresponding versions of the target devices and all The identity information of the target device is transmitted in parallel to the downstream device directly connected to the local device; according to the identity information of the target device, the downstream device directly connected to the local device is controlled to perform a matching operation, so that the target device obtains Corresponding to the version of the upgrade package, each device in the local downstream device stores the identity information of the downstream device.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:根据所述目标设备的身份信息,确定所述目标设备包括目标叶子设备,且所述目标叶子设备包括与所述本地直接连接的下游设备,叶子设备向下没有连接的下游设备;控制与所述本地直接连接的下游设备获取对应版本的升级包,并停止转发。Wherein, when the processor executes the computer program, the following steps are implemented: according to the identity information of the target device, it is determined that the target device includes a target leaf device, and the target leaf device includes a direct connection with the local The downstream device of the leaf device is not connected downstream; the downstream device directly connected to the local is controlled to obtain the upgrade package of the corresponding version and stop forwarding.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:根据所述目标设备的身份信息,确定所述目标设备包括目标叶子设备,且所述目标叶子设备和与所述本地直接连接的下游设备之间包括中间设备,所述中间设备向下连接有下游设备,叶子设备向下没有连接的下游设备;控制与所述本地直接连接的下游设备和所述中间设备将所述对应版本的升级包转发至所述目标叶子设备;控制所述目标叶子设备获取对应版本的升级包,并停止转发。Wherein, when the processor executes the computer program, the following steps are implemented: according to the identity information of the target device, it is determined that the target device includes a target leaf device, and the target leaf device is directly connected to the local The downstream devices include intermediate devices, the intermediate devices are connected downstream with downstream devices, and the leaf devices are not connected downstream; the downstream devices directly connected to the local device and the intermediate devices are controlled to convert the corresponding version The upgrade package of is forwarded to the target leaf device; the target leaf device is controlled to obtain the upgrade package of the corresponding version and stop forwarding.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:根据所述目标设备的身份信息,确定所述目标设备包括目标中间设备,且所述目标中间设备和与所述本地直接连接的下游设备直接连接,中间设备向下连接有下游设 备;控制与所述本地直接连接的下游设备将所述对应版本的升级包转发至所述目标中间设备;控制所述目标中间设备获取对应版本的升级包。Wherein, when the processor executes the computer program, the following steps are implemented: according to the identity information of the target device, it is determined that the target device includes a target intermediate device, and the target intermediate device is directly connected to the local The downstream device is directly connected, and the intermediate device is downwardly connected to the downstream device; the downstream device directly connected to the local device is controlled to forward the upgrade package of the corresponding version to the target intermediate device; the target intermediate device is controlled to obtain the corresponding version Upgrade package.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:根据所述目标设备的身份信息,确定所述目标设备包括目标中间设备,且所述目标中间设备和与所述本地直接连接的下游设备之间包括中间设备,中间设备向下连接有下游设备;控制与所述本地直接连接的下游设备和所述中间设备将所述对应版本的升级包转发至所述目标中间设备;控制所述目标中间设备获取对应版本的升级包。Wherein, when the processor executes the computer program, the following steps are implemented: according to the identity information of the target device, it is determined that the target device includes a target intermediate device, and the target intermediate device is directly connected to the local The downstream devices include intermediate devices, which are connected downstream with downstream devices; control the downstream devices directly connected to the local and the intermediate devices to forward the upgrade package of the corresponding version to the target intermediate device; control The target intermediate device obtains the upgrade package of the corresponding version.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:若所述目标设备还包括所述目标中间设备的目标下游设备,则控制所述目标中间设备获取对应版本的升级包,并向所述目标中间设备的下游设备转发对应版本的升级包,直到转发至所述目标下游设备;控制所述目标下游设备获取对应版本的升级包。Wherein, the processor implements the following steps when executing the computer program: if the target device also includes a target downstream device of the target intermediate device, control the target intermediate device to obtain the upgrade package of the corresponding version, and Forward the upgrade package of the corresponding version to the downstream device of the target intermediate device until it is forwarded to the target downstream device; control the target downstream device to obtain the upgrade package of the corresponding version.
其中,所述处理器在执行所述计算机程序时,实现如下步骤:若所述目标设备不包括所述目标中间设备的下游设备,则控制所述目标中间设备获取对应版本的升级包,并停止转发。Wherein, the processor implements the following steps when executing the computer program: if the target device does not include the downstream device of the target intermediate device, control the target intermediate device to obtain the upgrade package of the corresponding version, and stop Forward.
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如上任一项所述的设备升级的方法。相关内容的详细说明请参见上述相关内容部分,在此不再赘叙。The present application also 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 processor implements the method for upgrading the device as described in any one of the preceding items. . For a detailed description of the relevant content, please refer to the relevant content section above, which will not be repeated here.
其中,该计算机可读存储介质可以是上述设备升级的装置的内部存储单元,例如硬盘或内存。该计算机可读存储介质也可以是外部存储设备,例如配备的插接式硬盘、智能存储卡、安全数字卡、闪存卡,等等。Wherein, the computer-readable storage medium may be an internal storage unit of the above-mentioned device upgrading apparatus, such as a hard disk or a memory. The computer-readable storage medium may also be an external storage device, such as an equipped plug-in hard disk, a smart memory card, a secure digital card, a flash memory card, and so on.
应当理解,在本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。It should be understood that the terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit the application.
还应当理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It should also be understood that the term "and/or" used in the specification and appended claims of this application refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
以上所述,仅为本申请的具体实施例,但本申请的保护范围并不局限于此, 任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above are only specific embodiments of this application, but the protection scope of this application is not limited to this. Anyone familiar with the technical field can easily think of various equivalents within the technical scope disclosed in this application. Modifications or replacements, these modifications or replacements shall be covered within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.
Claims (53)
- 一种设备升级的方法,其特征在于,所述方法包括:A method for upgrading equipment, characterized in that the method includes:根据检测到的用户的目标设备选择操作,从本地的下游设备的相关升级信息中获取待升级的目标设备的相关升级信息,所述相关升级信息包括设备的身份信息和设备的当前版本信息,所述本地的下游设备包括与本地直接连接的设备和/或间接连接的设备;According to the detected user's target device selection operation, the relevant upgrade information of the target device to be upgraded is obtained from the relevant upgrade information of the local downstream device. The relevant upgrade information includes the identity information of the device and the current version information of the device. The local downstream equipment includes equipment directly connected to the local and/or equipment connected indirectly;根据所述目标设备的当前版本信息,下载所述目标设备对应版本的升级包;Downloading the upgrade package of the corresponding version of the target device according to the current version information of the target device;将所述目标设备对应版本的升级包和所述目标设备的身份信息向所述本地的下游设备传输,使所述本地的下游设备根据所述目标设备的身份信息将所述目标设备对应版本的升级包传输至所述目标设备,使所述目标设备获取对应版本的升级包;The upgrade package of the corresponding version of the target device and the identity information of the target device are transmitted to the local downstream device, so that the local downstream device can update the version corresponding to the target device according to the identity information of the target device The upgrade package is transmitted to the target device, so that the target device obtains the upgrade package of the corresponding version;当所述目标设备获取到对应版本的升级包后,控制所述目标设备根据所述目标设备对应版本的升级包进行升级。After the target device obtains the upgrade package of the corresponding version, the target device is controlled to upgrade according to the upgrade package of the corresponding version of the target device.
- 根据权利要求1所述的方法,其特征在于,所述根据检测到的用户的目标设备选择操作,从本地的下游设备的相关升级信息中获取待升级的目标设备的相关升级信息之前,还包括:The method according to claim 1, characterized in that, before obtaining the relevant upgrade information of the target device to be upgraded from the relevant upgrade information of the local downstream device according to the detected target device selection operation of the user, the method further comprises :获取所述本地的下游设备的相关升级信息。Obtain the relevant upgrade information of the local downstream device.
- 根据权利要求2所述的方法,其特征在于,所述获取所述本地的下游设备的相关升级信息,包括:The method according to claim 2, wherein the obtaining the relevant upgrade information of the local downstream device comprises:通过心跳包获取所述本地的下游设备的相关升级信息。Obtain the relevant upgrade information of the local downstream device through the heartbeat packet.
- 根据权利要求2所述的方法,其特征在于,所述获取所述本地的下游设备的相关升级信息,包括:The method according to claim 2, wherein the obtaining the relevant upgrade information of the local downstream device comprises:获取所述本地的下游设备的注册命令,所述注册命令是所述本地的下游设备向与所述本地的下游设备直接连接和/或间接连接的上游设备进行注册而发送的;Acquiring a registration command of the local downstream device, the registration command being sent by the local downstream device to register with the upstream device directly connected and/or indirectly connected with the local downstream device;通过所述本地的下游设备的注册命令获取所述本地的下游设备的相关升级信息。Obtain the relevant upgrade information of the local downstream device through the registration command of the local downstream device.
- 根据权利要求4所述的方法,其特征在于,所述注册命令包括设备注册命令和/或传输注册命令,所述设备注册命令是所述本地的下游设备向与所述本地的下游设备直接连接的上游设备进行设备注册而发送的注册命令,所述传输注册命令所述本地的下游设备向与所述本地的下游设备直接连接和间接连接的上游设备进行传输注册而发送的注册命令。The method according to claim 4, wherein the registration command includes a device registration command and/or a transfer registration command, and the device registration command is the direct connection of the local downstream device to the local downstream device A registration command sent by the upstream device for device registration, and the transmission registration command is a registration command sent by the local downstream device for transmission and registration to the upstream device directly connected and indirectly connected with the local downstream device.
- 根据权利要求5所述的方法,其特征在于,所述获取所述本地的下游设备的注册命令之前,包括:The method according to claim 5, wherein before the obtaining the registration command of the local downstream device, the method comprises:控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备发送所述设备注册命令,以使与所述本地的下游设备直接连接的上游设备获取所述本地的下游设备的相关升级信息。Control the local downstream device to send the device registration command to the upstream device directly connected to the local downstream device, so that the upstream device directly connected to the local downstream device obtains the relevant information of the local downstream device Upgrade information.
- 根据权利要求6所述的方法,其特征在于,所述控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备发送所述设备注册命令,包括:The method according to claim 6, wherein the controlling the local downstream device to send the device registration command to an upstream device directly connected to the local downstream device comprises:生成预定格式的注册数据包;Generate registration data packets in a predetermined format;控制所述本地的下游设备将所述注册数据包向与所述本地的下游设备直接连接的上游设备发送;Controlling the local downstream device to send the registration data packet to an upstream device directly connected to the local downstream device;控制所述与所述本地的下游设备直接连接的上游设备接收所述注册数据包。Controlling the upstream device directly connected to the local downstream device to receive the registration data packet.
- 根据权利要求6所述的方法,其特征在于,所述控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备发送设备注册命令,包括:The method according to claim 6, wherein the controlling the local downstream device to send a device registration command to an upstream device directly connected to the local downstream device comprises:以预定时间间隔控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备发送所述设备注册命令。Control the local downstream device to send the device registration command to the upstream device directly connected to the local downstream device at a predetermined time interval.
- 根据权利要求5所述的方法,其特征在于,所述获取所述本地的下游设备的注册命令之前,包括:The method according to claim 5, wherein before the obtaining the registration command of the local downstream device, the method comprises:控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备和间接连接的上游设备发送传输注册命令,以使所述本地的下游设备中每个设备获取自己所有下游设备的相关升级信息。Control the local downstream device to send a transmission registration command to the upstream device directly connected to the local downstream device and the upstream device indirectly connected to it, so that each device in the local downstream device obtains the relevant information of all its downstream devices Upgrade information.
- 根据权利要求9所述的方法,其特征在于,所述控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备和间接连接的上游设备发 送传输注册命令,包括:The method according to claim 9, wherein the controlling the local downstream device to send a transmission registration command to the upstream device directly connected to the local downstream device and the indirectly connected upstream device comprises:在所述设备注册成功后,控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备和间接连接的上游设备发送传输注册命令。After the device is successfully registered, the local downstream device is controlled to send a transmission registration command to the upstream device directly connected to the local downstream device and the upstream device connected indirectly.
- 根据权利要求9所述的方法,其特征在于,所述控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备和间接连接的上游设备发送传输注册命令,包括:The method according to claim 9, wherein the controlling the local downstream device to send a transmission registration command to an upstream device directly connected to the local downstream device and an upstream device indirectly connected to the local downstream device comprises:生成预定格式的注册数据包;Generate registration data packets in a predetermined format;控制所述本地的下游设备将所述注册数据包向与所述本地的下游设备直接连接的上游设备和间接连接的上游设备发送,直到发送至所述本地;Controlling the local downstream device to send the registration data packet to the upstream device directly connected to the local downstream device and the indirectly connected upstream device until it is sent to the local;控制所述本地向与所述本地直接连接的下游设备返回应答数据包。Control the local device to return a response data packet to the downstream device directly connected to the local device.
- 根据权利要求7或11所述的方法,其特征在于,所述注册数据包的数据内容包括命令识别码、设备名称、设备识别码、设备类型以及直接连接的上游设备识别码。The method according to claim 7 or 11, wherein the data content of the registration data packet includes a command identification code, a device name, a device identification code, a device type, and a directly connected upstream device identification code.
- 根据权利要求12所述的方法,其特征在于,所述命令识别码包括设备注册命令识别码或传输注册命令识别码。The method according to claim 12, wherein the command identification code comprises a device registration command identification code or a transmission registration command identification code.
- 根据权利要求9所述的方法,其特征在于,控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备和间接连接的上游设备发送传输注册命令,包括:The method according to claim 9, wherein controlling the local downstream device to send a transmission registration command to an upstream device directly connected to the local downstream device and an upstream device indirectly connected to the local downstream device comprises:以预定时间间隔控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备和间接连接的上游设备发送传输注册命令。Control the local downstream device to send a transmission registration command to the upstream device directly connected to the local downstream device and the upstream device indirectly connected at a predetermined time interval.
- 根据权利要求1所述的方法,其特征在于,所述根据所述目标设备的当前版本信息,下载所述目标设备对应版本的升级包,包括:The method according to claim 1, wherein the downloading an upgrade package of the corresponding version of the target device according to the current version information of the target device comprises:根据检测到的所述用户的升级触发操作和所述目标设备的当前版本信息,下载所述目标设备对应版本的升级包。Downloading the upgrade package of the corresponding version of the target device according to the detected upgrade trigger operation of the user and the current version information of the target device.
- 根据权利要求1所述的方法,其特征在于,所述将所述目标设备对应版本的升级包和所述目标设备的身份信息向本地的下游设备传输之前,包括:The method according to claim 1, wherein before transmitting the upgrade package of the corresponding version of the target device and the identity information of the target device to a local downstream device, the method comprises:向所述目标设备发送准备传输命令。Send a prepare transmission command to the target device.
- 根据权利要求16所述的方法,其特征在于,所述准备传输命令的内容包括设备的身份信息、所述设备本身是否升级、所述设备的下游设备是否升 级。The method according to claim 16, wherein the content of the prepared transmission command includes the identity information of the device, whether the device itself is upgraded, and whether the downstream device of the device is upgraded.
- 根据权利要求1所述的方法,其特征在于,所述控制所述目标设备根据所述目标设备对应版本的升级包进行升级,包括:The method according to claim 1, wherein the controlling the target device to upgrade according to an upgrade package of the corresponding version of the target device comprises:向与所述本地直接连接的下游设备发送升级触发命令;Sending an upgrade trigger command to the downstream device directly connected to the local;通过与所述本地直接连接的下游设备分别触发所述目标设备,使所述目标设备根据所述目标设备对应版本的升级包进行升级。The target device is triggered by the downstream device directly connected to the local device, so that the target device is upgraded according to the upgrade package of the corresponding version of the target device.
- 根据权利要求18所述的方法,其特征在于,所述方法还包括:The method according to claim 18, wherein the method further comprises:接收与所述本地直接连接的下游设备推送的升级进度,直到所述目标设备升级结束。Receive the upgrade progress pushed by the downstream device directly connected to the local until the upgrade of the target device ends.
- 根据权利要求1所述的方法,其特征在于,所述目标设备的数量为两个以上,所述将所述目标设备对应版本的升级包和所述目标设备的身份信息向本地的下游设备传输,包括:The method according to claim 1, wherein the number of the target device is more than two, and the upgrade package of the corresponding version of the target device and the identity information of the target device are transmitted to a local downstream device ,include:将两个以上的所述目标设备对应版本的升级包和所述目标设备的身份信息并行向与所述本地直接连接的下游设备传输;Transmitting two or more upgrade packages of corresponding versions of the target device and the identity information of the target device to the downstream device directly connected to the local device in parallel;根据所述目标设备的身份信息,控制与所述本地直接连接的下游设备执行匹配的操作,以使所述目标设备获取对应版本的升级包,所述本地的下游设备中每个设备保存有下游设备的身份信息。According to the identity information of the target device, the downstream device directly connected to the local device is controlled to perform matching operations, so that the target device obtains the upgrade package of the corresponding version, and each device in the local downstream device saves the downstream device. The identity information of the device.
- 根据权利要求20所述的方法,其特征在于,所述根据所述目标设备的身份信息,控制与所述本地直接连接的下游设备执行匹配的操作,以使所述目标设备获取对应版本的升级包,包括:The method according to claim 20, wherein the downstream device directly connected to the local device is controlled to perform a matching operation according to the identity information of the target device, so that the target device obtains the upgrade of the corresponding version The package includes:根据所述目标设备的身份信息,确定所述目标设备包括目标叶子设备,且所述目标叶子设备包括与所述本地直接连接的下游设备,叶子设备向下没有连接的下游设备;According to the identity information of the target device, it is determined that the target device includes a target leaf device, and the target leaf device includes a downstream device directly connected to the local device, and a downstream device to which the leaf device is not connected downward;控制与所述本地直接连接的下游设备获取对应版本的升级包,并停止转发。Control the downstream device directly connected to the local to obtain the upgrade package of the corresponding version, and stop forwarding.
- 根据权利要求20所述的方法,其特征在于,所述根据所述目标设备的身份信息,控制与所述本地直接连接的下游设备执行匹配的操作,以使所述目标设备获取对应版本的升级包,包括:The method according to claim 20, wherein the downstream device directly connected to the local device is controlled to perform a matching operation according to the identity information of the target device, so that the target device obtains the upgrade of the corresponding version The package includes:根据所述目标设备的身份信息,确定所述目标设备包括目标叶子设备,且 所述目标叶子设备和与所述本地直接连接的下游设备之间包括中间设备,所述中间设备向下连接有下游设备,叶子设备向下没有连接的下游设备;According to the identity information of the target device, it is determined that the target device includes a target leaf device, and an intermediate device is included between the target leaf device and the downstream device directly connected to the local device, and the intermediate device is downwardly connected to the downstream device. Devices, downstream devices that are not connected to the leaf device downwards;控制与所述本地直接连接的下游设备和所述中间设备将所述对应版本的升级包转发至所述目标叶子设备;Controlling the downstream device and the intermediate device directly connected to the local device to forward the upgrade package of the corresponding version to the target leaf device;控制所述目标叶子设备获取对应版本的升级包,并停止转发。Control the target leaf device to obtain the upgrade package of the corresponding version and stop forwarding.
- 根据权利要求20所述的方法,其特征在于,所述根据所述目标设备的身份信息,控制与所述本地直接连接的下游设备执行匹配的操作,以使所述目标设备获取对应版本的升级包,包括:The method according to claim 20, wherein the downstream device directly connected to the local device is controlled to perform a matching operation according to the identity information of the target device, so that the target device obtains the upgrade of the corresponding version The package includes:根据所述目标设备的身份信息,确定所述目标设备包括目标中间设备,且所述目标中间设备和与所述本地直接连接的下游设备直接连接,中间设备向下连接有下游设备;According to the identity information of the target device, it is determined that the target device includes a target intermediate device, and the target intermediate device is directly connected to a downstream device directly connected to the local device, and the intermediate device is downwardly connected to a downstream device;控制与所述本地直接连接的下游设备将所述对应版本的升级包转发至所述目标中间设备;Controlling the downstream device directly connected to the local device to forward the upgrade package of the corresponding version to the target intermediate device;控制所述目标中间设备获取对应版本的升级包。Control the target intermediate device to obtain the upgrade package of the corresponding version.
- 根据权利要求20所述的方法,其特征在于,所述根据所述目标设备的身份信息,控制与所述本地直接连接的下游设备执行匹配的操作,以使所述目标设备获取对应版本的升级包,包括:The method according to claim 20, wherein the downstream device directly connected to the local device is controlled to perform a matching operation according to the identity information of the target device, so that the target device obtains the upgrade of the corresponding version The package includes:根据所述目标设备的身份信息,确定所述目标设备包括目标中间设备,且所述目标中间设备和与所述本地直接连接的下游设备之间包括中间设备,中间设备向下连接有下游设备;According to the identity information of the target device, it is determined that the target device includes a target intermediate device, and the target intermediate device and the downstream device directly connected to the local device include an intermediate device, and the intermediate device is downwardly connected to the downstream device;控制与所述本地直接连接的下游设备和所述中间设备将所述对应版本的升级包转发至所述目标中间设备;Controlling the downstream device directly connected to the local device and the intermediate device to forward the upgrade package of the corresponding version to the target intermediate device;控制所述目标中间设备获取对应版本的升级包。Control the target intermediate device to obtain the upgrade package of the corresponding version.
- 根据权利要求23或24所述的方法,其特征在于,所述控制所述目标中间设备获取对应版本的升级包,还包括:The method according to claim 23 or 24, wherein the controlling the target intermediate device to obtain the upgrade package of the corresponding version further comprises:若所述目标设备还包括所述目标中间设备的目标下游设备,则控制所述目标中间设备获取对应版本的升级包,并向所述目标中间设备的下游设备转发对应版本的升级包,直到转发至所述目标下游设备;If the target device also includes the target downstream device of the target intermediate device, control the target intermediate device to obtain the upgrade package of the corresponding version, and forward the upgrade package of the corresponding version to the downstream device of the target intermediate device, until forwarding To the target downstream device;控制所述目标下游设备获取对应版本的升级包。Control the target downstream device to obtain the upgrade package of the corresponding version.
- 根据权利要求23或24所述的方法,其特征在于,所述控制所述目标中间设备获取对应版本的升级包,还包括:The method according to claim 23 or 24, wherein the controlling the target intermediate device to obtain the upgrade package of the corresponding version further comprises:若所述目标设备不包括所述目标中间设备的下游设备,则控制所述目标中间设备获取对应版本的升级包,并停止转发。If the target device does not include the downstream device of the target intermediate device, control the target intermediate device to obtain the upgrade package of the corresponding version, and stop forwarding.
- 一种设备升级的装置,其特征在于,所述装置包括:存储器、处理器以及通信电路,所述存储器和所述通信电路分别与所述处理器连接;A device for upgrading equipment, wherein the device includes a memory, a processor, and a communication circuit, and the memory and the communication circuit are respectively connected to the processor;所述存储器用于存储计算机程序;The memory is used to store a computer program;所述处理器用于执行所述计算机程序并在执行所述计算机程序时,实现如下步骤:The processor is used to execute the computer program and when executing the computer program, implement the following steps:根据检测到的用户的目标设备选择操作,从本地的下游设备的相关升级信息中获取待升级的目标设备的相关升级信息,所述相关升级信息包括设备的身份信息和设备的当前版本信息,所述本地的下游设备包括与本地直接连接的设备和/或间接连接的设备;According to the detected user's target device selection operation, the relevant upgrade information of the target device to be upgraded is obtained from the relevant upgrade information of the local downstream device. The relevant upgrade information includes the identity information of the device and the current version information of the device. The local downstream equipment includes equipment directly connected to the local and/or equipment connected indirectly;根据所述目标设备的当前版本信息,控制所述通信电路下载所述目标设备对应版本的升级包;According to the current version information of the target device, controlling the communication circuit to download the upgrade package of the corresponding version of the target device;控制所述通信电路将所述目标设备对应版本的升级包和所述目标设备的身份信息向所述本地的下游设备传输,使所述本地的下游设备根据所述目标设备的身份信息将所述目标设备对应版本的升级包传输至所述目标设备,使所述目标设备获取对应版本的升级包;Control the communication circuit to transmit the upgrade package of the corresponding version of the target device and the identity information of the target device to the local downstream device, so that the local downstream device transmits the The upgrade package of the corresponding version of the target device is transmitted to the target device, so that the target device obtains the upgrade package of the corresponding version;当所述目标设备获取到对应版本的升级包后,控制所述目标设备根据所述目标设备对应版本的升级包进行升级。After the target device obtains the upgrade package of the corresponding version, the target device is controlled to upgrade according to the upgrade package of the corresponding version of the target device.
- 根据权利要求27所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 27, wherein the processor implements the following steps when executing the computer program:获取所述本地的下游设备的相关升级信息。Obtain the relevant upgrade information of the local downstream device.
- 根据权利要求28所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 28, wherein the processor implements the following steps when executing the computer program:通过心跳包获取所述本地的下游设备的相关升级信息。Obtain the relevant upgrade information of the local downstream device through the heartbeat packet.
- 根据权利要求28所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 28, wherein the processor implements the following steps when executing the computer program:获取所述本地的下游设备的注册命令,所述注册命令是所述本地的下游设备向与所述本地的下游设备直接连接和/或间接连接的上游设备进行注册而发送的;Acquiring a registration command of the local downstream device, the registration command being sent by the local downstream device to register with the upstream device directly connected and/or indirectly connected with the local downstream device;通过所述本地的下游设备的注册命令获取所述本地的下游设备的相关升级信息。Obtain the relevant upgrade information of the local downstream device through the registration command of the local downstream device.
- 根据权利要求30所述的装置,其特征在于,所述注册命令包括设备注册命令和/或传输注册命令,所述设备注册命令是所述本地的下游设备向与所述本地的下游设备直接连接的上游设备进行设备注册而发送的注册命令,所述传输注册命令所述本地的下游设备向与所述本地的下游设备直接连接和间接连接的上游设备进行传输注册而发送的注册命令。The apparatus according to claim 30, wherein the registration command includes a device registration command and/or a transfer registration command, and the device registration command is the direct connection of the local downstream device to the local downstream device A registration command sent by the upstream device for device registration, and the transmission registration command is a registration command sent by the local downstream device for transmission and registration to the upstream device directly connected and indirectly connected with the local downstream device.
- 根据权利要求31所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 31, wherein the processor implements the following steps when executing the computer program:控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备发送所述设备注册命令,以使与所述本地的下游设备直接连接的上游设备获取所述本地的下游设备的相关升级信息。Control the local downstream device to send the device registration command to the upstream device directly connected to the local downstream device, so that the upstream device directly connected to the local downstream device obtains the relevant information of the local downstream device Upgrade information.
- 根据权利要求32所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 32, wherein the processor implements the following steps when executing the computer program:生成预定格式的注册数据包;Generate registration data packets in a predetermined format;控制所述本地的下游设备将所述注册数据包向与所述本地的下游设备直接连接的上游设备发送;Controlling the local downstream device to send the registration data packet to an upstream device directly connected to the local downstream device;控制所述与所述本地的下游设备直接连接的上游设备接收所述注册数据包。Controlling the upstream device directly connected to the local downstream device to receive the registration data packet.
- 根据权利要求32所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 32, wherein the processor implements the following steps when executing the computer program:以预定时间间隔控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备发送所述设备注册命令。Control the local downstream device to send the device registration command to the upstream device directly connected to the local downstream device at a predetermined time interval.
- 根据权利要求31所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 31, wherein the processor implements the following steps when executing the computer program:控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备 和间接连接的上游设备发送传输注册命令,以使所述本地的下游设备中每个设备获取自己所有下游设备的相关升级信息。Control the local downstream device to send a transmission registration command to the upstream device directly connected to the local downstream device and the upstream device indirectly connected to it, so that each device in the local downstream device obtains the relevant information of all its downstream devices Upgrade information.
- 根据权利要求35所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 35, wherein the processor implements the following steps when executing the computer program:在所述设备注册成功后,控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备和间接连接的上游设备发送传输注册命令。After the device is successfully registered, the local downstream device is controlled to send a transmission registration command to the upstream device directly connected to the local downstream device and the upstream device connected indirectly.
- 根据权利要求35所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 35, wherein the processor implements the following steps when executing the computer program:生成预定格式的注册数据包;Generate registration data packets in a predetermined format;控制所述本地的下游设备将所述注册数据包向与所述本地的下游设备直接连接的上游设备和间接连接的上游设备发送,直到发送至所述本地;Controlling the local downstream device to send the registration data packet to the upstream device directly connected to the local downstream device and the indirectly connected upstream device until it is sent to the local;控制所述本地向与所述本地直接连接的下游设备返回应答数据包。Control the local device to return a response data packet to the downstream device directly connected to the local device.
- 根据权利要求33或37所述的装置,其特征在于,所述注册数据包的数据内容包括命令识别码、设备名称、设备识别码、设备类型以及直接连接的上游设备识别码。The device according to claim 33 or 37, wherein the data content of the registration data packet includes a command identification code, a device name, a device identification code, a device type, and a directly connected upstream device identification code.
- 根据权利要求38所述的装置,其特征在于,所述命令识别码包括设备注册命令识别码或传输注册命令识别码。The apparatus according to claim 38, wherein the command identification code comprises an equipment registration command identification code or a transmission registration command identification code.
- 根据权利要求35所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 35, wherein the processor implements the following steps when executing the computer program:以预定时间间隔控制所述本地的下游设备向与所述本地的下游设备直接连接的上游设备和间接连接的上游设备发送传输注册命令。Control the local downstream device to send a transmission registration command to the upstream device directly connected to the local downstream device and the upstream device indirectly connected at a predetermined time interval.
- 根据权利要求27所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 27, wherein the processor implements the following steps when executing the computer program:根据检测到的所述用户的升级触发操作和所述目标设备的当前版本信息,控制所述通信电路下载所述目标设备对应版本的升级包。According to the detected upgrade trigger operation of the user and the current version information of the target device, control the communication circuit to download the upgrade package of the corresponding version of the target device.
- 根据权利要求27所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 27, wherein the processor implements the following steps when executing the computer program:控制所述通信电路向所述目标设备发送准备传输命令。Controlling the communication circuit to send a transmission preparation command to the target device.
- 根据权利要求42所述的装置,其特征在于,所述准备传输命令的内 容包括设备的身份信息、所述设备本身是否升级、所述设备的下游设备是否升级。The apparatus according to claim 42, wherein the content of the preparation for transmission command includes the identity information of the device, whether the device itself is upgraded, and whether the downstream device of the device is upgraded.
- 根据权利要求27所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 27, wherein the processor implements the following steps when executing the computer program:通知所述通信电路向与所述本地直接连接的下游设备发送升级触发命令;Notifying the communication circuit to send an upgrade trigger command to the downstream device directly connected to the local;通过与所述本地直接连接的下游设备分别触发所述目标设备,使所述目标设备根据所述目标设备对应版本的升级包进行升级。The target device is triggered by the downstream device directly connected to the local device, so that the target device is upgraded according to the upgrade package of the corresponding version of the target device.
- 根据权利要求44所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 44, wherein the processor implements the following steps when executing the computer program:控制所述通信电路接收与所述本地直接连接的下游设备推送的升级进度,直到所述目标设备升级结束。Control the communication circuit to receive the upgrade progress pushed by the downstream device directly connected to the local until the upgrade of the target device ends.
- 根据权利要求27所述的装置,其特征在于,所述目标设备的数量为两个以上,所述处理器在执行所述计算机程序时,实现如下步骤:The apparatus according to claim 27, wherein the number of the target devices is more than two, and the processor implements the following steps when executing the computer program:控制所述通信电路将两个以上的所述目标设备对应版本的升级包和所述目标设备的身份信息并行向与所述本地直接连接的下游设备传输;Controlling the communication circuit to concurrently transmit two or more upgrade packages of the corresponding versions of the target device and the identity information of the target device to the downstream device directly connected to the local device;根据所述目标设备的身份信息,控制与所述本地直接连接的下游设备执行匹配的操作,以使所述目标设备获取对应版本的升级包,所述本地的下游设备中每个设备保存有下游设备的身份信息。According to the identity information of the target device, the downstream device directly connected to the local device is controlled to perform matching operations, so that the target device obtains the upgrade package of the corresponding version, and each device in the local downstream device saves the downstream device. The identity information of the device.
- 根据权利要求46所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 46, wherein the processor implements the following steps when executing the computer program:根据所述目标设备的身份信息,确定所述目标设备包括目标叶子设备,且所述目标叶子设备包括与所述本地直接连接的下游设备,叶子设备向下没有连接的下游设备;According to the identity information of the target device, it is determined that the target device includes a target leaf device, and the target leaf device includes a downstream device directly connected to the local device, and a downstream device to which the leaf device is not connected downward;控制与所述本地直接连接的下游设备获取对应版本的升级包,并停止转发。Control the downstream device directly connected to the local to obtain the upgrade package of the corresponding version, and stop forwarding.
- 根据权利要求46所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 46, wherein the processor implements the following steps when executing the computer program:根据所述目标设备的身份信息,确定所述目标设备包括目标叶子设备,且所述目标叶子设备和与所述本地直接连接的下游设备之间包括中间设备,所述 中间设备向下连接有下游设备,叶子设备向下没有连接的下游设备;According to the identity information of the target device, it is determined that the target device includes a target leaf device, and an intermediate device is included between the target leaf device and the downstream device directly connected to the local device, and the intermediate device is downwardly connected to the downstream device. Devices, downstream devices that are not connected to the leaf device;控制与所述本地直接连接的下游设备和所述中间设备将所述对应版本的升级包转发至所述目标叶子设备;Controlling the downstream device and the intermediate device directly connected to the local device to forward the upgrade package of the corresponding version to the target leaf device;控制所述目标叶子设备获取对应版本的升级包,并停止转发。Control the target leaf device to obtain the upgrade package of the corresponding version and stop forwarding.
- 根据权利要求46所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 46, wherein the processor implements the following steps when executing the computer program:根据所述目标设备的身份信息,确定所述目标设备包括目标中间设备,且所述目标中间设备和与所述本地直接连接的下游设备直接连接,中间设备向下连接有下游设备;According to the identity information of the target device, it is determined that the target device includes a target intermediate device, and the target intermediate device is directly connected to a downstream device directly connected to the local device, and the intermediate device is downwardly connected to a downstream device;控制与所述本地直接连接的下游设备将所述对应版本的升级包转发至所述目标中间设备;Controlling the downstream device directly connected to the local device to forward the upgrade package of the corresponding version to the target intermediate device;控制所述目标中间设备获取对应版本的升级包。Control the target intermediate device to obtain the upgrade package of the corresponding version.
- 根据权利要求46所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 46, wherein the processor implements the following steps when executing the computer program:根据所述目标设备的身份信息,确定所述目标设备包括目标中间设备,且所述目标中间设备和与所述本地直接连接的下游设备之间包括中间设备,中间设备向下连接有下游设备;According to the identity information of the target device, it is determined that the target device includes a target intermediate device, and the target intermediate device and the downstream device directly connected to the local device include an intermediate device, and the intermediate device is downwardly connected to the downstream device;控制与所述本地直接连接的下游设备和所述中间设备将所述对应版本的升级包转发至所述目标中间设备;Controlling the downstream device directly connected to the local device and the intermediate device to forward the upgrade package of the corresponding version to the target intermediate device;控制所述目标中间设备获取对应版本的升级包。Control the target intermediate device to obtain the upgrade package of the corresponding version.
- 根据权利要求49或50所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 49 or 50, wherein the processor implements the following steps when executing the computer program:若所述目标设备还包括所述目标中间设备的目标下游设备,则控制所述目标中间设备获取对应版本的升级包,并向所述目标中间设备的下游设备转发对应版本的升级包,直到转发至所述目标下游设备;If the target device also includes the target downstream device of the target intermediate device, control the target intermediate device to obtain the upgrade package of the corresponding version, and forward the upgrade package of the corresponding version to the downstream device of the target intermediate device, until forwarding To the target downstream device;控制所述目标下游设备获取对应版本的升级包。Control the target downstream device to obtain the upgrade package of the corresponding version.
- 根据权利要求49或50所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 49 or 50, wherein the processor implements the following steps when executing the computer program:若所述目标设备不包括所述目标中间设备的下游设备,则控制所述目标中 间设备获取对应版本的升级包,并停止转发。If the target device does not include the downstream device of the target intermediate device, control the target intermediate device to obtain the upgrade package of the corresponding version and stop forwarding.
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如权利要求1-26任一项所述的设备升级的方法。A computer-readable storage medium, characterized in that, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor realizes any one of claims 1-26 The method of equipment upgrade.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202080005231.5A CN112771497A (en) | 2020-04-09 | 2020-04-09 | Method and device for upgrading equipment and storage medium |
PCT/CN2020/084052 WO2021203384A1 (en) | 2020-04-09 | 2020-04-09 | Device upgrade method and apparatus, and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2020/084052 WO2021203384A1 (en) | 2020-04-09 | 2020-04-09 | Device upgrade method and apparatus, and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021203384A1 true WO2021203384A1 (en) | 2021-10-14 |
Family
ID=75699516
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/084052 WO2021203384A1 (en) | 2020-04-09 | 2020-04-09 | Device upgrade method and apparatus, and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112771497A (en) |
WO (1) | WO2021203384A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115525064A (en) * | 2022-08-30 | 2022-12-27 | 一飞(海南)科技有限公司 | Method, system, equipment and application for processing restart critical phase of formation airplane |
CN118642740A (en) * | 2024-08-15 | 2024-09-13 | 浙江大华技术股份有限公司 | Firmware upgrade method and related devices, equipment and media |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114461240B (en) * | 2021-06-30 | 2023-04-14 | 荣耀终端有限公司 | Software upgrading method, software upgrading system and electronic equipment |
CN114428626A (en) * | 2022-01-24 | 2022-05-03 | 海能电子(深圳)有限公司 | A kind of upgrade method, device, computer equipment and storage medium of type-C docking station |
CN116074391B (en) * | 2022-12-31 | 2025-05-02 | 海尔优家智能科技(北京)有限公司 | Information transmission method and device, storage medium and electronic device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101083537A (en) * | 2006-05-31 | 2007-12-05 | 华为技术有限公司 | Method, apparatus and system for realizing device management |
CN102937904A (en) * | 2012-10-24 | 2013-02-20 | 华为技术有限公司 | Multi-node firmware updating method and device |
US20130219030A1 (en) * | 2012-02-21 | 2013-08-22 | F5 Networks, Inc. | In service upgrades for a hypervisor or hardware manager hosting virtual traffic managers |
CN106775841A (en) * | 2016-11-29 | 2017-05-31 | 广州广电运通金融电子股份有限公司 | The method, system and device of plug-in unit upgrading |
CN107465539A (en) * | 2017-07-25 | 2017-12-12 | 北京康得新创科技股份有限公司 | The upgrade-system of the upgrade method of firmware, terminal and firmware |
CN110768817A (en) * | 2018-07-27 | 2020-02-07 | 视联动力信息技术股份有限公司 | Upgrading method and device for video networking terminal |
-
2020
- 2020-04-09 WO PCT/CN2020/084052 patent/WO2021203384A1/en active Application Filing
- 2020-04-09 CN CN202080005231.5A patent/CN112771497A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101083537A (en) * | 2006-05-31 | 2007-12-05 | 华为技术有限公司 | Method, apparatus and system for realizing device management |
US20130219030A1 (en) * | 2012-02-21 | 2013-08-22 | F5 Networks, Inc. | In service upgrades for a hypervisor or hardware manager hosting virtual traffic managers |
CN102937904A (en) * | 2012-10-24 | 2013-02-20 | 华为技术有限公司 | Multi-node firmware updating method and device |
CN106775841A (en) * | 2016-11-29 | 2017-05-31 | 广州广电运通金融电子股份有限公司 | The method, system and device of plug-in unit upgrading |
CN107465539A (en) * | 2017-07-25 | 2017-12-12 | 北京康得新创科技股份有限公司 | The upgrade-system of the upgrade method of firmware, terminal and firmware |
CN110768817A (en) * | 2018-07-27 | 2020-02-07 | 视联动力信息技术股份有限公司 | Upgrading method and device for video networking terminal |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115525064A (en) * | 2022-08-30 | 2022-12-27 | 一飞(海南)科技有限公司 | Method, system, equipment and application for processing restart critical phase of formation airplane |
CN118642740A (en) * | 2024-08-15 | 2024-09-13 | 浙江大华技术股份有限公司 | Firmware upgrade method and related devices, equipment and media |
Also Published As
Publication number | Publication date |
---|---|
CN112771497A (en) | 2021-05-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021203384A1 (en) | Device upgrade method and apparatus, and storage medium | |
CN102136934B (en) | Method, device and network system for realizing remote upgrading of Zigbee equipment | |
CN106462424A (en) | Method for updating terminal system, terminal and system | |
CN111324363A (en) | Equipment upgrading method, upgrading terminal, equipment and storage medium | |
CN112838940B (en) | Network controller frame and data processing method | |
CN115335803B (en) | Equipment upgrading method, intelligent equipment and computer readable storage medium | |
CN111142905B (en) | OTA upgrading method, OTA server and OTA upgrading system | |
CN108199931A (en) | A kind of household electric appliance control method and system | |
CN112202877B (en) | Gateway linkage method, gateway, cloud server and user terminal | |
CN118541669A (en) | Method, device, chip, storage medium and program product for upgrading equipment | |
CN108153561B (en) | Ethernet loading method and signal processing system for DSP and FPGA | |
CN109936609B (en) | Terminal chain type upgrading method and device and upgrading management server | |
CN115567388A (en) | Network slice configuration automatic update method, system, device and storage medium | |
CN115514667A (en) | Access service processing method, system, device, electronic device, and storage medium | |
CN102130786B (en) | Method and device for updating characteristics of single board | |
CN110661850A (en) | Edge calculation method, system, computer equipment and storage medium | |
CN107710681A (en) | Upgrade the method and apparatus of multitenant unit | |
CN111585795B (en) | Software storing, loading and upgrading method and system for communication equipment | |
WO2023151372A1 (en) | Module upgrade method and system | |
WO2010124567A1 (en) | Method and server for transferring large object | |
CN114978906B (en) | Intelligent device firmware upgrading method based on local area network and storage medium | |
US10785285B2 (en) | File uploading and downloading method based on a smart device | |
KR102054144B1 (en) | Method and Apparatus for Control Terminals in IoT Service | |
CN118350620B (en) | Automatic production, test, upgrading and after-sale intelligent management system for AI (advanced technology) camera | |
CN116232889B (en) | Data processing method and device based on network topology structure |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20930403 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20930403 Country of ref document: EP Kind code of ref document: A1 |