Distributed upgrading method and device, computer equipment and storage medium

By using the upgraded device as the upgrade server, the device to be upgraded obtains upgrade firmware package fragments or complete packages from multiple upgraded devices, which solves the problem of insufficient cloud server bandwidth and improves remote OTA upgrade speed and system reliability.

CN118784471APending Publication Date: 2024-10-15ICARVISIONS SHENZHEN TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410835716.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

When embedded devices are upgraded remotely, the bandwidth of the cloud server cannot bear the data transmission requirements of a large number of devices, causing the upgrade to take a long time.

Method used

By using the upgraded device as a node, the cloud server determines the upgraded device corresponding to the device to be upgraded. The device to be upgraded obtains upgrade firmware package fragments or complete packages from multiple upgraded devices for upgrade, using the storage and bandwidth resources of the upgraded device. Reduce the load on cloud servers.

Benefits of technology

Significantly improves the speed of remote OTA upgrades, reduces resource consumption and costs, and enhances the scalability and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118784471A_ABST
    Figure CN118784471A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a distributed upgrading method and device, computer equipment and a storage medium, and relates to the technical field of communication. The method comprises the following steps: a cloud server determines at least one upgraded device corresponding to a to-be-upgraded device; the to-be-upgraded device and the upgraded device are located in the same network, and the version of the to-be-upgraded device needs to be upgraded to the version of the upgraded device; when the number of the upgraded devices is smaller than or equal to the number of the to-be-upgraded devices, the cloud server determines a first target device from the at least one upgraded device, and the to-be-upgraded device obtains an upgrading firmware package from the first target device for upgrading; and when the number of the upgraded devices is greater than the number of the to-be-upgraded devices, the cloud server determines a plurality of second target devices from the at least one upgraded device, and the to-be-upgraded devices respectively obtain the upgrade firmware package fragments from the plurality of second target devices and upgrade according to the upgrade firmware package fragments. Therefore, the upgrading speed of the equipment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communications, and in particular to a distributed upgrading method, device, computer equipment and storage medium. Background Art

[0002] When an embedded device is upgraded remotely, it needs to connect to a cloud server to download the upgrade package to the local device. However, the bandwidth of a cloud server is generally fixed, and the bandwidth speed is not particularly high. When the number of devices that need to be upgraded is particularly large, reaching thousands, tens of thousands, or even hundreds of thousands, the bandwidth of the cloud server cannot withstand such a large amount of data transmission, resulting in a long upgrade time. Summary of the invention

[0003] In view of this, the purpose of the present invention is to overcome the shortcomings of the prior art and provide a distributed upgrade method, device, computer equipment and storage medium, which balances the load pressure of the upgraded devices and allows as many networked devices as possible to become nodes in the network to provide upgrade servers, thereby significantly improving the remote (Over-the-Air Technology, OTA) upgrade speed.

[0004] The present invention provides the following technical solutions:

[0005] In a first aspect, the present invention provides a distributed upgrade method, the method comprising:

[0006] The cloud server determines at least one upgraded device corresponding to the device to be upgraded; the device to be upgraded and the upgraded device are located in the same network, and the version of the device to be upgraded needs to be upgraded to the version of the upgraded device;

[0007] When the number of the upgraded devices is less than or equal to the number of the devices to be upgraded, the cloud server determines a first target device from at least one of the upgraded devices, and the device to be upgraded obtains an upgrade firmware package from the first target device for upgrading;

[0008] When the number of upgraded devices is greater than the number of devices to be upgraded, the cloud server determines multiple second target devices from at least one of the upgraded devices, and the devices to be upgraded respectively obtain upgrade firmware package fragments from the multiple second target devices and perform upgrades according to each of the upgrade firmware package fragments.

[0009] In one embodiment, the cloud server determines at least one upgraded device corresponding to the device to be upgraded, including:

[0010] Obtaining the network status of the device to be upgraded;

[0011] Determine the network to which the device to be upgraded belongs according to the network status;

[0012] Determine at least one upgraded device corresponding to the device to be upgraded in the network.

[0013] In one embodiment, the cloud server determines the first target device or the plurality of the second target devices from at least one of the upgraded devices, including:

[0014] When there is at least one upgraded device corresponding to the device to be upgraded in the network, determining at least one first device storing the upgrade firmware package in each of the upgraded devices;

[0015] Determining at least one second device that can communicate with the device to be upgraded from at least one of the first devices;

[0016] The first target device or a plurality of the second target devices are determined from at least one of the second devices.

[0017] In one embodiment, the determining, from at least one of the first devices, at least one second device that can communicate with the device to be upgraded includes:

[0018] Determine whether the first device has a public IP;

[0019] If the first device has a public IP, determining the first device as the second device;

[0020] If the first device does not have a public IP, determine whether the first device and the device to be upgraded successfully perform network address translation penetration;

[0021] If the first device and the device to be upgraded successfully perform network address translation penetration, the first device is determined as the second device.

[0022] In one implementation, the device to be upgraded obtains an upgrade firmware package from the first target device for upgrading, including:

[0023] After the cloud server determines the first target device, the cloud server sends a first instruction to the device to be upgraded according to the first target device;

[0024] The device to be upgraded obtains the upgrade firmware package from the first target device according to the first instruction;

[0025] The device to be upgraded is upgraded according to the upgrade firmware package.

[0026] In one embodiment, the device to be upgraded obtains upgrade firmware package fragments from multiple second target devices respectively for upgrading, including:

[0027] After the cloud server determines a plurality of the second target devices, the cloud server sends a first instruction to the device to be upgraded according to each of the second target devices;

[0028] The device to be upgraded obtains upgrade firmware package fragments from the plurality of second target devices respectively according to the first instruction;

[0029] The device to be upgraded splices all upgrade firmware package fragments into the upgrade firmware package;

[0030] The device to be upgraded is upgraded according to the upgrade firmware package.

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

[0032] If the device to be upgraded fails to successfully obtain the upgrade firmware package from the first target device, or fails to successfully obtain the upgrade firmware package fragments from multiple second target devices respectively, the upgrade firmware package is obtained from the cloud server.

[0033] In a second aspect, the present invention provides a distributed upgrade device, the device comprising:

[0034] A determination module, used for the cloud server to determine at least one upgraded device corresponding to the device to be upgraded; the device to be upgraded and the upgraded device are located in the same network, and the version of the device to be upgraded needs to be upgraded to the version of the upgraded device;

[0035] A first upgrade module, configured to, when the number of the upgraded devices is less than or equal to the number of the devices to be upgraded, cause the cloud server to determine a first target device from at least one of the upgraded devices, and for the device to be upgraded to obtain an upgrade firmware package from the first target device for upgrading;

[0036] The second upgrade module is used for, when the number of the upgraded devices is greater than the number of the devices to be upgraded, the cloud server determines multiple second target devices from at least one of the upgraded devices, and the devices to be upgraded respectively obtain upgrade firmware package fragments from the multiple second target devices for upgrading.

[0037] In a third aspect, the present invention proposes a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the distributed upgrade method as described in the first aspect is implemented.

[0038] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the distributed upgrade method as described in the first aspect.

[0039] The distributed upgrade method, device, computer equipment and storage medium disclosed in the present invention, the cloud server determines at least one upgraded device corresponding to the device to be upgraded; the device to be upgraded and the upgraded device are located in the same network, and the version of the device to be upgraded needs to be upgraded to the version of the upgraded device; when the number of the upgraded devices is less than or equal to the number of the devices to be upgraded, the cloud server determines a first target device from at least one of the upgraded devices, and the device to be upgraded obtains an upgrade firmware package from the first target device for upgrading; when the number of the upgraded devices is greater than the number of the devices to be upgraded, the cloud server determines multiple second target devices from at least one of the upgraded devices, and the device to be upgraded obtains upgrade firmware package fragments from multiple second target devices respectively, and upgrades according to each of the upgrade firmware package fragments. In this way, during the upgrade process, by selecting a specific upgraded device as the upgrade server, the device to be upgraded can directly obtain the upgrade firmware package fragment or the complete upgrade firmware package from the device for upgrading, and the upgraded device not only serves as a firmware storage node, but also as a data transmission node. This method makes full use of the storage and bandwidth resources of the upgraded device, reduces the bandwidth consumption and load of the cloud server, and improves the upgrade speed of the device. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solution of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope of protection of the present invention. In each of the drawings, similar components are numbered similarly.

[0041] Figure 1 A first flow chart of the distributed upgrade method proposed by the present invention is shown;

[0042] Figure 2 A second flow chart of the distributed upgrade method proposed by the present invention is shown;

[0043] Figure 3 A third flow chart of the distributed upgrade method proposed in the present invention is shown;

[0044] Figure 4 A fourth flow chart of the distributed upgrade method proposed in the present invention is shown;

[0045] Figure 5 A structural schematic diagram of a distributed upgrading device proposed by the present invention is shown.

[0046] Figure ID:

[0047] 500 - distributed upgrade device; 501 - determination module; 502 - first upgrade module; 503 - second upgrade module. DETAILED DESCRIPTION

[0048] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0049] The components of the embodiments of the present invention generally described and shown in the drawings herein may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0050] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present invention, are intended only to indicate specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.

[0051] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.

[0052] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present invention belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present invention.

[0053] Example 1

[0054] The disclosed embodiment provides a distributed upgrade method, which balances the load pressure of upgraded devices, allowing as many networked devices as possible to become nodes in the network to provide upgrade servers, thereby significantly improving the upgrade speed of remote OTA.

[0055] See also Figure 1 The distributed upgrade method includes steps S101 to S103, and each step is described in detail below.

[0056] Step S101, the cloud server determines at least one upgraded device corresponding to the device to be upgraded; the device to be upgraded and the upgraded device are located in the same network, and the version of the device to be upgraded needs to be upgraded to the version of the upgraded device.

[0057] In this embodiment, the cloud server needs to determine an upgraded device that is in the same network as the device to be upgraded, and the version of the device to be upgraded needs to be upgraded to the version of the upgraded device. The device to be upgraded and the upgraded device may be embedded devices.

[0058] See also Figure 2 In a specific embodiment, the cloud server determines at least one upgraded device corresponding to the device to be upgraded, including steps S1011 to S1013, and each step is described in detail below.

[0059] Step S1011, obtaining the network status of the device to be upgraded.

[0060] In this embodiment, the device to be upgraded reports 4G information to the cloud server through the 4G network, and the cloud server determines the network status of the device to be upgraded according to the reported 4G information, where the network status includes the network type and the address type.

[0061] Step S1012: determining the network to which the device to be upgraded belongs according to the network status.

[0062] In this embodiment, the cloud server determines the network to which the device to be upgraded belongs according to the acquired network status.

[0063] Step S1013: determining at least one upgraded device corresponding to the device to be upgraded in the network.

[0064] In this embodiment, the cloud server determines at least one upgraded device corresponding to the device to be upgraded in the network to which the device to be upgraded belongs. In this way, communication between devices is possible only when there is an upgraded device belonging to the same network type as the device to be upgraded.

[0065] Step S102, when the number of the upgraded devices is less than or equal to the number of the devices to be upgraded, the cloud server determines a first target device from at least one of the upgraded devices, and the device to be upgraded obtains an upgrade firmware package from the first target device for upgrading.

[0066] In this embodiment, when the number of upgraded devices in the same network is less than or equal to the number of devices to be upgraded, the cloud server determines a first target device from at least one upgraded device. The first target device is used as a node to provide an upgrade firmware package to the device to be upgraded, thereby reducing the data transmission pressure of the cloud server and improving the upgrade speed of remote OTA. When there are a large number of devices to be upgraded in the network, by distributing the upgrade firmware package to the corresponding first target device, a large number of concurrent requests can be more flexibly responded to, thereby enhancing the scalability of the system. At the same time, since the transmission of the upgrade firmware package does not depend on a single node of the cloud server, the reliability of the system is improved.

[0067] Step S103, when the number of upgraded devices is greater than the number of devices to be upgraded, the cloud server determines multiple second target devices from at least one of the upgraded devices, and the devices to be upgraded respectively obtain upgrade firmware package fragments from the multiple second target devices and perform upgrades according to each of the upgrade firmware package fragments.

[0068] In this embodiment, when the number of upgraded devices is greater than the number of devices to be upgraded, the cloud server determines multiple second target devices from at least one upgraded device, and each second target device is used as a node to simultaneously transmit upgrade firmware package fragments to the device to be upgraded, and the device to be upgraded is upgraded according to the upgrade firmware package spliced ​​from the upgrade firmware package fragments. In this way, in the middle and late stages of the upgrade, the ratio of the number of upgraded devices to the number of devices to be upgraded will become larger and larger, and the successfully upgraded devices will be used as upgrade servers, and the size of data transmission will be reduced by distributing upgrade firmware package fragments, so that the overall upgrade speed will become faster and faster, greatly shortening the upgrade time of all devices (the number of upgraded devices is in the tens of thousands to hundreds of thousands), further improving the upgrade efficiency, and reducing resource consumption and costs during the upgrade process.

[0069] Exemplarily, when the ratio of the number of upgraded devices to the number of devices to be upgraded is 5:1, the device to be upgraded can simultaneously download five different upgrade firmware package fragments from five second target devices; when the ratio of the number of upgraded devices to the number of devices to be upgraded is 10:1, the device to be upgraded can simultaneously download ten different upgrade package fragments from five second target devices.

[0070] See also Figure 3 In a specific embodiment, the cloud server determines the first target device or multiple second target devices from at least one of the upgraded devices, including steps S301 to S303, and each step is described in detail below.

[0071] Step S301: when there is at least one upgraded device corresponding to the device to be upgraded in the network, at least one first device storing the upgrade firmware package is determined in each of the upgraded devices.

[0072] In this embodiment, when there is at least one upgraded device corresponding to the device to be upgraded in the network, at least one first device storing the upgrade firmware package locally is determined in each upgraded device, so that the first target device or the second target device provides upgrade data to the device to be upgraded.

[0073] Step S302: determining at least one second device that can communicate with the device to be upgraded from at least one of the first devices.

[0074] In this embodiment, a second device capable of establishing communication with the device to be upgraded is determined from the first device storing the upgrade firmware package locally, thereby realizing the transmission of upgrade data between the first target device or the second target device and the device to be upgraded.

[0075] Step S303: determine the first target device or multiple second target devices from at least one of the second devices.

[0076] In this embodiment, any first target device or multiple second target devices are randomly determined in the second device that has the upgrade firmware package stored locally and can establish communication with the device to be upgraded, and are used to transmit the upgrade data to the device to be upgraded.

[0077] See also Figure 4 In a specific embodiment, determining at least one second device that can communicate with the device to be upgraded from at least one of the first devices includes steps S3021 to S3024, and each step is described in detail below.

[0078] Step S3021, determine whether the first device has a public IP.

[0079] In this embodiment, it is determined whether the first device has a public IP address. If the first device has a public IP address, it can directly communicate with the public network.

[0080] Step S3022: If the first device has a public IP, the first device is determined as the second device.

[0081] In this embodiment, the first device having a public IP address may be determined as the second device for subsequent selection of the first target device or the second target device.

[0082] Step S3023: If the first device does not have a public IP, determine whether the first device and the device to be upgraded have successfully performed network address translation penetration.

[0083] In this embodiment, if a first device does not have a public IP, it is determined whether the first device can successfully perform network address translation penetration (NAT) with the device to be upgraded.

[0084] Step S3024: If the first device and the device to be upgraded successfully perform network address translation penetration, the first device is determined as the second device.

[0085] In this embodiment, if the first device can successfully perform NAT penetration with the device to be upgraded, the first device is determined as the second device. NAT penetration technology makes communication between devices more convenient and reliable.

[0086] In a specific embodiment, the device to be upgraded obtains the upgrade firmware package from the first target device for upgrading, including: after the cloud server determines the first target device, sending a first instruction to the device to be upgraded according to the first target device; the device to be upgraded obtains the upgrade firmware package from the first target device according to the first instruction; the device to be upgraded is upgraded according to the upgrade firmware package.

[0087] In this embodiment, after the cloud server determines the first target device, it sends a first instruction to the address and other information of the device to be upgraded according to the first target device; the device to be upgraded determines the object (first target device) to obtain the upgrade firmware package according to the first instruction, and obtains the upgrade firmware package from the first target device; the device to be upgraded is upgraded directly according to the upgrade firmware package. In this way, the device to be upgraded directly obtains the upgrade firmware package from the first target device, which has a faster transmission speed than downloading from the cloud server, reduces the waiting time during the upgrade process, and improves the upgrade efficiency.

[0088] In a specific embodiment, the device to be upgraded obtains upgrade firmware package fragments from multiple second target devices respectively for upgrading, including: after the cloud server determines multiple second target devices, it sends a second instruction to the device to be upgraded according to each second target device; the device to be upgraded obtains upgrade firmware package fragments from the multiple second target devices respectively according to the second instruction; the device to be upgraded splices all the upgrade firmware package fragments into the upgrade firmware package; the device to be upgraded is upgraded according to the upgrade firmware package.

[0089] In this embodiment, after the cloud server determines multiple second target devices, it sends a second instruction to the device to be upgraded according to the address and other information of each second target device; the device to be upgraded determines the object (multiple second target devices) to obtain the upgrade firmware package according to the second instruction, and obtains the upgrade firmware package fragments from each second target device respectively; then, the device to be upgraded splices all the upgrade firmware package fragments into a complete upgrade firmware package; the device to be upgraded is upgraded according to the spliced ​​upgrade firmware package. In this way, by splitting the upgrade firmware package into multiple fragments and splicing them after receiving them, it can be ensured that each fragment is transmitted to the device to be upgraded completely and accurately. Compared with transmitting the entire firmware package at one time, this method can better resist unstable factors in network transmission, such as data packet loss, transmission interruption, etc., thereby improving the reliability of the upgrade process; at the same time, the segmented transmission and splicing method can significantly improve the upgrade efficiency. The device can receive the complete upgrade firmware package faster and complete the upgrade operation faster, thereby improving the efficiency of the entire upgrade process.

[0090] It should be noted that during the upgrade process, if a certain segment is wrong or damaged, only the segment needs to be retransmitted instead of the entire firmware package, which greatly reduces the upgrade risk. In addition, a verification step can be set when each upgrade firmware package segment is transmitted to ensure that the final upgrade firmware package is complete and correct, further reducing the risk of upgrade failure.

[0091] In a specific embodiment, if the device to be upgraded fails to successfully obtain the upgrade firmware package from the first target device, or fails to successfully obtain the upgrade firmware package fragments from multiple second target devices respectively, the upgrade firmware package is obtained from the cloud server.

[0092] In this embodiment, when the device to be upgraded cannot successfully obtain the upgrade firmware package from the first target device due to network problems or other reasons, or cannot successfully obtain the upgrade firmware package fragments from each second target device, the upgrade firmware package can be directly obtained from the cloud server to upgrade the device to be upgraded. In this way, when the local device cannot provide the upgrade firmware package, it automatically switches to the cloud server as a backup source, which can ensure the smooth progress of the upgrade process, reduce the user's waiting time and operation complexity, and optimize the user experience.

[0093] In the distributed upgrade method proposed in this embodiment, the cloud server determines at least one upgraded device corresponding to the device to be upgraded; the device to be upgraded and the upgraded device are located in the same network, and the version of the device to be upgraded needs to be upgraded to the version of the upgraded device; when the number of the upgraded devices is less than or equal to the number of the devices to be upgraded, the cloud server determines a first target device from at least one of the upgraded devices, and the device to be upgraded obtains an upgrade firmware package from the first target device for upgrading; when the number of the upgraded devices is greater than the number of the devices to be upgraded, the cloud server determines multiple second target devices from at least one of the upgraded devices, and the device to be upgraded obtains upgrade firmware package fragments from the multiple second target devices respectively, and upgrades according to each of the upgrade firmware package fragments. In this way, during the upgrade process, by selecting a specific upgraded device as the upgrade server, the device to be upgraded can directly obtain the upgrade firmware package fragment or the complete upgrade firmware package from the device for upgrading, and the upgraded device serves not only as a firmware storage node, but also as a data transmission node. This method makes full use of the storage and bandwidth resources of the upgraded device, reduces the bandwidth consumption and load of the cloud server, and improves the upgrade speed of the device.

[0094] Example 2

[0095] In addition, the present disclosure provides a distributed upgrade device 500, see Figure 5 , the device comprises:

[0096] The determination module 501 is used for the cloud server to determine at least one upgraded device corresponding to the device to be upgraded; the device to be upgraded and the upgraded device are located in the same network, and the version of the device to be upgraded needs to be upgraded to the version of the upgraded device;

[0097] A first upgrade module 502, configured to, when the number of the upgraded devices is less than or equal to the number of the devices to be upgraded, determine by the cloud server a first target device from at least one of the upgraded devices, and obtain an upgrade firmware package from the first target device for upgrading by the device to be upgraded;

[0098] The second upgrade module 503 is used for, when the number of upgraded devices is greater than the number of devices to be upgraded, the cloud server determines multiple second target devices from at least one of the upgraded devices, and the devices to be upgraded respectively obtain upgrade firmware package fragments from the multiple second target devices for upgrading.

[0099] Optionally, the determination module 501 is further used to obtain a network status of the device to be upgraded; determine a network to which the device to be upgraded belongs according to the network status; and determine at least one upgraded device corresponding to the device to be upgraded in the network.

[0100] Optionally, the determination module 501 is further configured to, when there is at least one upgraded device corresponding to the device to be upgraded in the network, determine at least one first device storing the upgrade firmware package in each of the upgraded devices; and determine at least one second device that can communicate with the device to be upgraded from at least one of the first devices;

[0101] The first upgrade module 502 is further configured to determine the first target device from at least one of the second devices;

[0102] The second upgrading module 503 is further configured to determine a plurality of second target devices from at least one of the second devices.

[0103] Optionally, the determination module 501 is also used to determine whether the first device has a public IP; if the first device has a public IP, the first device is determined to be the second device; if the first device does not have a public IP, it is determined whether the first device and the device to be upgraded have successfully performed network address translation penetration; if the first device and the device to be upgraded have successfully performed network address translation penetration, the first device is determined to be the second device.

[0104] Optionally, the first upgrade module 502 is also used for sending a first instruction to the device to be upgraded according to the first target device after the cloud server determines the first target device; the device to be upgraded obtains the upgrade firmware package from the first target device according to the first instruction; and the device to be upgraded is upgraded according to the upgrade firmware package.

[0105] Optionally, the second upgrade module 503 is also used for sending a first instruction to the device to be upgraded according to each second target device after the cloud server determines multiple second target devices; the device to be upgraded obtains upgrade firmware package fragments from multiple second target devices according to the first instruction; the device to be upgraded splices all the upgrade firmware package fragments into the upgrade firmware package; and the device to be upgraded is upgraded according to the upgrade firmware package.

[0106] Optionally, the first upgrade module 502 is further configured to obtain the upgrade firmware package from the cloud server if the device to be upgraded fails to successfully obtain the upgrade firmware package from the first target device;

[0107] The second upgrade module 503 is further configured to obtain the upgrade firmware package from the cloud server if the device to be upgraded fails to successfully obtain the upgrade firmware package fragments from the plurality of second target devices respectively.

[0108] The device provided in the embodiment of the present disclosure can execute the steps of the distributed upgrade method provided in Example 1, which will not be described again to avoid repetition.

[0109] In the distributed upgrade device proposed in this embodiment, the cloud server determines at least one upgraded device corresponding to the device to be upgraded; the device to be upgraded and the upgraded device are located in the same network, and the version of the device to be upgraded needs to be upgraded to the version of the upgraded device; when the number of the upgraded devices is less than or equal to the number of the devices to be upgraded, the cloud server determines a first target device from at least one of the upgraded devices, and the device to be upgraded obtains an upgrade firmware package from the first target device for upgrading; when the number of the upgraded devices is greater than the number of the devices to be upgraded, the cloud server determines multiple second target devices from at least one of the upgraded devices, and the device to be upgraded obtains upgrade firmware package fragments from the multiple second target devices respectively, and upgrades according to each of the upgrade firmware package fragments. In this way, during the upgrade process, by selecting a specific upgraded device as the upgrade server, the device to be upgraded can directly obtain the upgrade firmware package fragment or the complete upgrade firmware package from the device for upgrading, and the upgraded device serves not only as a firmware storage node, but also as a data transmission node. This method makes full use of the storage and bandwidth resources of the upgraded device, reduces the bandwidth consumption and load of the cloud server, and improves the upgrade speed of the device.

[0110] Example 3

[0111] In addition, an embodiment of the present disclosure provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the distributed upgrade method described in Embodiment 1 is implemented.

[0112] The device provided in the embodiment of the present disclosure can execute the steps of the distributed upgrade method provided in Example 1, which will not be described again to avoid repetition.

[0113] Example 4

[0114] The embodiment of the present disclosure provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the distributed upgrade method described in Embodiment 1 is implemented.

[0115] In this embodiment, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0116] The computer-readable storage medium provided in this embodiment can implement the distributed upgrade method provided in Embodiment 1, and will not be described again here to avoid repetition.

[0117] In all examples shown and described herein, any specific values ​​should be interpreted as merely exemplary and not as limiting, and thus other examples of the exemplary embodiments may have different values.

[0118] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0119] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the present invention. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.

Claims

1. A distributed upgrade method, characterized in that: The method comprises: The cloud server determines at least one upgraded device corresponding to the device to be upgraded; the device to be upgraded and the upgraded device are located in the same network, and the version of the device to be upgraded needs to be upgraded to the version of the upgraded device; When the number of the upgraded devices is less than or equal to the number of the devices to be upgraded, the cloud server determines a first target device from at least one of the upgraded devices, and the device to be upgraded obtains an upgrade firmware package from the first target device for upgrading; When the number of upgraded devices is greater than the number of devices to be upgraded, the cloud server determines multiple second target devices from at least one of the upgraded devices, and the devices to be upgraded respectively obtain upgrade firmware package fragments from the multiple second target devices and perform upgrades according to each of the upgrade firmware package fragments.

2. The distributed upgrade method according to claim 1, characterized in that: The cloud server determines at least one upgraded device corresponding to the device to be upgraded, including: Obtaining the network status of the device to be upgraded; Determine the network to which the device to be upgraded belongs according to the network status; Determine at least one upgraded device corresponding to the device to be upgraded in the network.

3. The distributed upgrade method according to claim 2, characterized in that: The cloud server determines the first target device or the plurality of the second target devices from at least one of the upgraded devices, including: When there is at least one upgraded device corresponding to the device to be upgraded in the network, determining at least one first device storing the upgrade firmware package in each of the upgraded devices; Determining at least one second device that can communicate with the device to be upgraded from at least one of the first devices; The first target device or a plurality of the second target devices are determined from at least one of the second devices.

4. The distributed upgrade method according to claim 3, characterized in that: The determining, from at least one of the first devices, at least one second device that can communicate with the device to be upgraded comprises: Determine whether the first device has a public IP; If the first device has a public IP, determining the first device as the second device; If the first device does not have a public IP, determine whether the first device and the device to be upgraded successfully perform network address translation penetration; If the first device and the device to be upgraded successfully perform network address translation penetration, the first device is determined as the second device.

5. The distributed upgrade method according to any one of claims 1 to 4, characterized in that: The device to be upgraded obtains an upgrade firmware package from the first target device for upgrading, including: After the cloud server determines the first target device, the cloud server sends a first instruction to the device to be upgraded according to the first target device; The device to be upgraded obtains the upgrade firmware package from the first target device according to the first instruction; The device to be upgraded is upgraded according to the upgrade firmware package.

6. The distributed upgrade method according to any one of claims 1 to 4, characterized in that: The device to be upgraded obtains upgrade firmware package fragments from a plurality of second target devices respectively for upgrading, including: After the cloud server determines a plurality of the second target devices, the cloud server sends a first instruction to the device to be upgraded according to each of the second target devices; The device to be upgraded obtains upgrade firmware package fragments from the plurality of second target devices respectively according to the first instruction; The device to be upgraded splices all upgrade firmware package fragments into the upgrade firmware package; The device to be upgraded is upgraded according to the upgrade firmware package.

7. The distributed upgrade method according to claim 1, characterized in that: The method further comprises: If the device to be upgraded fails to successfully obtain the upgrade firmware package from the first target device, or fails to successfully obtain the upgrade firmware package fragments from multiple second target devices respectively, the upgrade firmware package is obtained from the cloud server.

8. A distributed upgrade device, characterized in that: The device comprises: A determination module, used for the cloud server to determine at least one upgraded device corresponding to the device to be upgraded; the device to be upgraded and the upgraded device are located in the same network, and the version of the device to be upgraded needs to be upgraded to the version of the upgraded device; A first upgrade module, configured to, when the number of the upgraded devices is less than or equal to the number of the devices to be upgraded, cause the cloud server to determine a first target device from at least one of the upgraded devices, and for the device to be upgraded to obtain an upgrade firmware package from the first target device for upgrading; The second upgrade module is used for, when the number of the upgraded devices is greater than the number of the devices to be upgraded, the cloud server determines multiple second target devices from at least one of the upgraded devices, and the devices to be upgraded respectively obtain upgrade firmware package fragments from the multiple second target devices for upgrading.

9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the distributed upgrade method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: It stores a computer program, which, when executed by a processor, implements the distributed upgrade method according to any one of claims 1 to 7.

Citation Information

Cited By

  • OTA firmware upgrading method and system, terminal equipment and storage medium

    CN119383081A

  • Firmware upgrading method and device for laser radar equipment and electronic equipment

    CN121364872A