Carousel-based Device Batch Upgrade Method, System, Upgrader and Medium
Through the carousel-based batch upgrade method, the problems of cumbersome operation and high labor costs of traditional update methods are solved, and efficient equipment firmware and data packet updates are achieved, reducing the risk of product damage.
Patent Information
- Application Number
- CN202510286624.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-03-12
AI Technical Summary
Traditional firmware programs and data content data packet update methods require connections one by one, which are cumbersome and inefficient, and even require disassembly operations, resulting in increased labor costs and risk of product damage.
The carousel-based batch upgrade method is adopted to obtain the upgrade mode and target channel related to the round, and control the target channel to broadcast the target data packets to the equipment to be upgraded according to the unicast or mixed broadcast strategy, avoiding the connection and disassembly of the device one by one.
It improves the efficiency of updating equipment firmware programs and data content data packets, reduces labor costs and product damage risks, and achieves rapid and efficient batch equipment upgrades.
Smart Images

Figure CN119806600B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of device upgrade, and in particular to a method, system, upgrader and medium for batch upgrading of devices based on carousel. Background Art
[0002] In the current business scenarios of B-end customers (enterprises or commercial customers), whether it is a product in the form of a PCBA (printed circuit board assembly) or a product that has been assembled into a finished product, there is a need to update the firmware program and / or data content data package (for example, voice data package).
[0003] As far as B-side customers are concerned, there are many inconveniences in the traditional way of updating firmware programs and / or data content data packages. When the product is in the PCBA or finished product state, the existing update method often requires connecting devices one by one for updating, and some even require disassembly operations. This method of updating devices one by one is cumbersome, inefficient, and requires a lot of manpower costs. Disassembly operations have many disadvantages. It is not only time-consuming and labor-intensive, but may also put the product at risk of damage, such as damage to the product appearance and affecting the stability of internal line connections. This method of updating firmware programs and / or data content data packages, which requires connecting devices one by one or even requires disassembly operations, greatly reduces the update efficiency and increases labor costs. Summary of the invention
[0004] Based on this, it is necessary to update each device online one by one according to the needs of the existing technology, and some even need to disassemble the device to update the firmware program and / or data content data packet, which greatly reduces the technical problem of update efficiency. A carousel-based device batch upgrade method is proposed.
[0005] In a first aspect, a method for batch upgrading devices based on a carousel is provided, the method comprising:
[0006] Get the i-th round upgrade mode and the i-th round target channel;
[0007] If the upgrade mode of the i-th round is the first mode, then according to the i-th round of data to be updated, the target channel of the i-th round is controlled according to the unicast strategy to broadcast the i-th round of target data packets to each device to be upgraded;
[0008] If the upgrade mode of the i-th round is the second mode, then according to the i-th round of data to be updated, the target channel of the i-th round is controlled according to the mixed broadcast strategy to broadcast the i-th round of handshake signals and the i-th round of target data packets to each device to be upgraded;
[0009] Here, i is an integer greater than 0.
[0010] Furthermore, the step of controlling the target channel of the i-th round to broadcast the target data packet of the i-th round to each device to be upgraded according to the unicast strategy according to the data to be updated of the i-th round includes:
[0011] Control the target channel of the i-th round and broadcast the i-th round handshake signal to each of the devices to be upgraded;
[0012] Obtaining handshake success information corresponding to the handshake signal of the i-th round sent by the device to be upgraded;
[0013] The device to be upgraded corresponding to the handshake success information is used as the target device;
[0014] According to the data to be updated in the i-th round, the target channel in the i-th round is controlled to broadcast the target data packet in the i-th round to each target device.
[0015] Furthermore, the step of controlling the target channel of the i-th round to broadcast the i-th round handshake signal and the i-th round target data packet to each device to be upgraded according to the i-th round of data to be updated and the mixed broadcast strategy includes:
[0016] Controlling the target channel of the i-th round to broadcast the i-th round handshake signal to each of the devices to be upgraded;
[0017] Obtaining handshake success information corresponding to the handshake signal of the i-th round sent by the device to be upgraded;
[0018] The device to be upgraded corresponding to the handshake success information is used as the target device;
[0019] According to the data to be updated in the i-th round, controlling the target channel in the i-th round to broadcast the target data packet in the i-th round to each of the target devices, wherein in the process of broadcasting the target data packet in the i-th round to each of the target devices, the method further includes:
[0020] According to the preset configuration, the step from the step of controlling the target channel of the i-th round to broadcast the i-th round handshake signal to each of the devices to be upgraded to the step of taking the device to be upgraded corresponding to the handshake success information as the target device is re-executed.
[0021] Furthermore, the handshake signal of the i-th round includes the i-th key, and the target data packet of the i-th round is an encrypted data packet corresponding to the i-th key.
[0022] Furthermore, the i-th key and the i+k-th key are different, and k is an integer greater than 0.
[0023] Further, the step of obtaining the i-th round upgrade mode and the i-th round target channel includes:
[0024] Get the start signal of round i;
[0025] In response to the start signal of the i-th round, the counter is initialized to 1;
[0026] Acquire a signal-to-noise ratio of a channel corresponding to the counter as a target signal-to-noise ratio;
[0027] If the target signal-to-noise ratio is less than or equal to the preset signal-to-noise ratio, if the counter is equal to the total number of channels, the counter is initialized to 1 and the step of jumping to the step of obtaining the signal-to-noise ratio of the channel corresponding to the counter as the target signal-to-noise ratio is continued; if the counter is less than the total number of channels, the counter is incremented by 1 and the step of jumping to the step of obtaining the signal-to-noise ratio of the channel corresponding to the counter as the target signal-to-noise ratio is continued;
[0028] If the target signal-to-noise ratio is greater than a preset signal-to-noise ratio, the channel corresponding to the target signal-to-noise ratio is used as the target channel of the i-th round, and the upgrade mode of the i-th round is obtained.
[0029] Furthermore, the method further comprises:
[0030] Obtaining reception feedback data corresponding to the target data packet of the i-th round;
[0031] Analyze each of the received feedback data to determine the resend data;
[0032] Get the i+nth round upgrade mode and i+nth round target channel;
[0033] If the upgrade mode of the i+nth round is the first mode, then according to the i-th round to-be-updated data and the reissued data, the i+nth round target channel is controlled according to the unicast strategy to broadcast the i+nth round target data packet to each of the to-be-upgraded devices corresponding to the reissued data;
[0034] If the upgrade mode of the i+nth round is the second mode, then according to the i-th round to-be-updated data and the reissued data, the i+nth round target channel is controlled to broadcast the i+nth round target data packet to each of the to-be-upgraded devices corresponding to the reissued data according to the mixed broadcast strategy;
[0035] Here, n is an integer greater than 1.
[0036] Furthermore, the step of controlling the target channel of the i-th round to broadcast the target data packet of the i-th round to each device to be upgraded according to the unicast strategy according to the data to be updated of the i-th round also includes:
[0037] Get the i-th round breakpoint data;
[0038] If the breakpoint data in the i-th round is empty, then according to the data to be updated in the i-th round, the target channel in the i-th round is controlled according to the unicast strategy to broadcast the target data packet in the i-th round to each device to be upgraded;
[0039] If the breakpoint data in the i-th round is not empty, determine the resumed data according to the data to be updated in the i-th round and the breakpoint data, and control the target channel in the i-th round to broadcast the target data packet in the i-th round to each device to be upgraded according to the unicast strategy according to the resumed data;
[0040] The step of controlling the target channel of the i-th round to broadcast the i-th round handshake signal and the i-th round target data packet to each device to be upgraded according to the i-th round of data to be updated and the mixed broadcast strategy also includes:
[0041] Get the i-th round breakpoint data;
[0042] If the breakpoint data in the i-th round is empty, then according to the data to be updated in the i-th round, the target channel in the i-th round is controlled according to the mixed broadcast strategy to broadcast the i-th round handshake signal and the i-th round target data packet to each device to be upgraded;
[0043] If the breakpoint data in the i-th round is not empty, the resumed data is determined according to the data to be updated in the i-th round and the breakpoint data. According to the resumed data, the target channel in the i-th round is controlled to broadcast the i-th round handshake signal and the i-th round target data packet to each device to be upgraded according to the mixed broadcast strategy.
[0044] In a second aspect, a carousel-based device batch upgrade system is provided, the system comprising: a group device upgrader and each device to be upgraded;
[0045] The group device upgrader is configured to implement the following steps:
[0046] Get the i-th round upgrade mode and the i-th round target channel;
[0047] If the upgrade mode of the i-th round is the first mode, then according to the i-th round of data to be updated, the target channel of the i-th round is controlled according to the unicast strategy to broadcast the i-th round of target data packets to each device to be upgraded;
[0048] If the upgrade mode of the i-th round is the second mode, then according to the i-th round of data to be updated, the target channel of the i-th round is controlled according to the mixed broadcast strategy to broadcast the i-th round of handshake signals and the i-th round of target data packets to each device to be upgraded;
[0049] Here, i is an integer greater than 0.
[0050] Furthermore, the storage space of the device to be upgraded is provided with a first partition and a second partition;
[0051] The device to be upgraded is configured as follows:
[0052] Receiving the target data packet of the i-th round;
[0053] Storing the target data packet of the i-th round into the first partition;
[0054] Determine whether the version of each i-th round of the target data packet in the first partition is an upgraded version of the data in the second partition;
[0055] If yes, determine the data to be updated in the i-th round according to each target data packet in the i-th round in the first partition, and perform an upgrade according to the data to be updated in the i-th round;
[0056] Get the upgrade completion signal;
[0057] In response to the upgrade completion signal, the data in the second partition is replaced and updated according to the i-th round of data to be updated.
[0058] In a third aspect, a group device upgrader is provided, the group device upgrader comprising a communication component, a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor being electrically connected to the communication component, the communication component being used to broadcast the i-th round of target data packets to each device to be upgraded, and the processor implementing the steps of the above-mentioned carousel-based device batch upgrade method when executing the computer program.
[0059] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned carousel-based device batch upgrade method are implemented.
[0060] The carousel-based batch upgrade method, system, upgrader and medium of the present application, by obtaining the upgrade mode and target channel related to the round, controls the target channel to broadcast the target data packet to the device to be upgraded according to the unicast strategy when the upgrade mode is the first mode, and according to the mixed broadcast strategy when it is the second mode. This method does not require cumbersome connection operations for each device, and avoids the complex and high-risk operation of disassembling the machine, thereby greatly improving the update efficiency of the device's firmware program and / or data content data packet, reducing the consumption of labor costs, and also reducing the risk of damage to the product caused by the disassembly operation, and can quickly and efficiently upgrade batch devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0062] in:
[0063] Figure 1 This is an application environment diagram of a method for batch upgrading devices based on carousel in one embodiment;
[0064] Figure 2 A flowchart of a method for batch upgrading devices based on carousel in one embodiment;
[0065] Figure 3 Another flow chart of a method for batch upgrading devices based on carousel in one embodiment;
[0066] Figure 4 The structure block diagram of a carousel-based device batch upgrade system in one embodiment. DETAILED DESCRIPTION
[0067] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0068] The device batch upgrade method based on carousel provided in the embodiment of the present invention can be applied to Figure 1 In the application environment, the application environment includes: a host computer 3, a group device upgrader 1 and each device to be upgraded 2, and the number of the device to be upgraded 2 can be one or more.
[0069] The group device upgrader is configured to implement the device batch upgrade method of the present application, and the device batch upgrade method includes: obtaining the i-th round upgrade mode and the i-th round target channel; if the i-th round upgrade mode is the first mode, then according to the i-th round of data to be updated, the i-th round target data packet is controlled to be broadcast to each device to be upgraded according to the unicast strategy; if the i-th round upgrade mode is the second mode, then according to the i-th round of data to be updated, the i-th round target channel is controlled to broadcast the i-th round handshake signal and the i-th round target data packet to each device to be upgraded according to the mixed broadcast strategy; wherein i is an integer greater than 0.
[0070] The device batch upgrade method of the present application obtains the upgrade mode and target channel related to the round, and controls the target channel to broadcast the target data packet to the device to be upgraded according to the unicast strategy when the upgrade mode is the first mode, and according to the mixed broadcast strategy when it is the second mode. This method does not require cumbersome connection operations for each device, and avoids the complex and high-risk operation of disassembling the device, thereby greatly improving the update efficiency of the device's firmware program and / or data content data packet, reducing the consumption of labor costs, and also reducing the risk of damage to the product caused by the disassembly operation, and can quickly and efficiently upgrade batch devices.
[0071] Optionally, the group device upgrader 1 includes a communication component 33, a memory 31, a processor 32, and a computer program stored in the memory 31 and executable on the processor 32, the processor 32 is electrically connected to the communication component 33, and the communication component 33 is used to broadcast the i-th round of target data packets to each device 2 to be upgraded.
[0072] Optionally, the group device upgrader 1 further includes: a USB component 34 , which is electrically connected to the processor 32 , and the host computer 3 sends the data to be updated through the USB component 34 of the group device upgrader 1 , and the group device upgrader 1 stores the received data to be updated in the memory 31 .
[0073] Optionally, the device to be upgraded 2 includes a communication component 23, a memory 21, a processor 22, and a computer program stored in the memory 21 and executable on the processor 22, the processor 22 is electrically connected to the communication component 23, and the communication component 23 is used to receive the i-th round of target data packets broadcast by the group device upgrader 1.
[0074] Optionally, the communication component 23 is further used to broadcast data to the communication component 33 , and the communication component 33 is further used to receive the data broadcast by the communication component 23 .
[0075] Optionally, the communication component 23 and the communication component 33 are both components that communicate based on 2.4G technology. 2.4G technology is a wireless communication technology that uses a frequency band of 2.4 - 2.485 GHz.
[0076] USB components are components that implement data transmission based on USB (Universal Serial Bus) technology.
[0077] The host computer 3 may be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, and portable wearable devices.
[0078] The present invention is described in detail below through specific embodiments.
[0079] See also Figure 2 As shown, Figure 2 A flow chart of a method for batch upgrading devices based on carousel provided in an embodiment of the present invention includes the following steps:
[0080] S1: Obtain the i-th round upgrade mode and the i-th round target channel, where i is an integer greater than 0;
[0081] The i-th round upgrade mode is the broadcast mode used for batch upgrade of devices in the i-th round. The upgrade mode value is the first mode or the second mode. The user can input the upgrade mode through the buttons or touch screen on the group device upgrader.
[0082] The target channel of the i-th round refers to the channel used when performing the broadcast operation in the i-th round. A channel is a channel for signal transmission. It can be understood that the group device upgrader is provided with one or more channels.
[0083] Optionally, an i-th round start signal is obtained, and in response to the obtained i-th round start signal, an i-th round upgrade mode and an i-th round target channel are obtained.
[0084] The i-th round start signal can be a signal triggered by a user through a button or touch screen on the group device upgrader, or a signal actively triggered by the program file implementing the present application according to preset conditions. For example, after completing the i-1 round (the number of rounds after the first round) of device batch upgrade, the program file implementing the present application will determine whether breakpoint resume is required. If so, the program file will actively trigger the i-th round start signal.
[0085] S2: If the upgrade mode of the i-th round is the first mode, according to the i-th round of data to be updated, the target channel of the i-th round is controlled according to the unicast strategy to broadcast the i-th round of target data packets to each device to be upgraded;
[0086] The device to be upgraded is a device that needs to be upgraded.
[0087] The data to be updated in the i-th round is the data to be updated that the group device upgrader needs to send to the device to be upgraded in the i-th round. The data to be updated includes: firmware program and / or data content data package. The firmware program is a program file used to upgrade the software in the device to be upgraded.
[0088] The i-th round handshake signal is a signal sent by the group device upgrader to the device to be upgraded in the i-th round and is used to establish the i-th round handshake between the group device upgrader and the device to be upgraded.
[0089] The data to be updated in the i-th round is split, and each data packet obtained by the split is used as a target data packet in the i-th round.
[0090] First, the i-th round of data to be updated is segmented into individual segments according to the preset byte length, and then the CRC value of the segment is calculated, and the CRC value is attached to the end of the packet of the segment, and finally the segment is used as an i-th round target data packet. It is understandable that the present application also sets the start packet (including version number, total number of packets, encryption key index) as an i-th round target data packet, and the end packet (including checksum) as an i-th round target data packet. When broadcasting, the broadcast is carried out in the order of the i-th round target data packet corresponding to the start packet, the i-th round target data packets corresponding to the i-th round of data to be updated, and the i-th round target data packet corresponding to the end packet.
[0091] Optionally, if the upgrade mode of the i-th round is the first mode, it means that in the i-th round, the broadcast of the i-th round handshake signal does not need to be inserted in the middle of broadcasting each i-th round target data packet (that is, the unicast strategy). Therefore, the target channel of the i-th round is controlled to broadcast the i-th round handshake signal to each device to be upgraded, wherein the device to be upgraded establishes the handshake relationship between the group device upgrader of the i-th round and the device to be upgraded after receiving the i-th round handshake signal; then the target channel of the i-th round is controlled to broadcast all the i-th round target data packets to the devices to be upgraded that have successfully handshaked. In other words, the handshake signal needs to be rebroadcast at the beginning of each round.
[0092] Optionally, if the upgrade mode in the i-th round is the first mode, it means that in the i-th round, the broadcast of the i-th round handshake signal does not need to be inserted in the middle of broadcasting each i-th round target data packet (that is, unicast strategy). Therefore, the target channel in the i-th round is controlled to broadcast all the i-th round target data packets to the devices to be upgraded that have successfully handshaked, and the i-th round handshake signal is not broadcast during the whole process. In other words, there is no need to broadcast the handshake signal again at the beginning of each round.
[0093] The i-th round of data to be updated may be encapsulated in a target data packet when broadcasting is required, or the target data packet may be encapsulated in advance and stored in the local storage space of the group device upgrader.
[0094] S3: If the upgrade mode of the i-th round is the second mode, according to the i-th round of data to be updated, the target channel of the i-th round is controlled to broadcast the i-th round handshake signal and the i-th round target data packet to each device to be upgraded according to the mixed broadcast strategy.
[0095] Optionally, if the upgrade mode of the i-th round is the second mode, it means that in the i-th round, the broadcast of the i-th round handshake signal (that is, the mixed broadcast strategy) needs to be inserted in the middle of broadcasting each i-th round target data packet. Therefore, the target channel of the i-th round is controlled to broadcast the i-th round handshake signal to each device to be upgraded, wherein the device to be upgraded establishes the handshake relationship between the group device upgrader of the i-th round and the device to be upgraded after receiving the i-th round handshake signal; then the target channel of the i-th round is controlled to broadcast the i-th round target data packet to the device to be upgraded that has successfully handshaked, and in the interval of broadcasting the i-th round target data packet, the target channel of the i-th round is controlled to broadcast the i-th round handshake signal to each device to be upgraded according to the mixed broadcast strategy to establish a connection with the device to be upgraded that has not successfully handshaked, and then continue to broadcast the i-th round target data packet to the device to be upgraded that has successfully handshaked. The order of broadcasting at least one i-th round target data packet and broadcasting the i-th round handshake signal is alternated until the broadcast of all i-th round target data packets is completed. After all i-th round target data packets are broadcast, the broadcast operation of the i-th round is terminated. In other words, the handshake signal needs to be broadcast again at the beginning of each round.
[0096] Optionally, if the upgrade mode of the i-th round is the second mode, it means that in the i-th round, the broadcast of the i-th round handshake signal needs to be inserted in the middle of broadcasting each i-th round target data packet (that is, the mixed broadcast strategy). Therefore, the target channel of the i-th round is controlled to broadcast the i-th round target data packet to the device to be upgraded that has successfully shaken hands, and in the interval of broadcasting the i-th round target data packet, the target channel of the i-th round is controlled according to the mixed broadcast strategy to broadcast the i-th round handshake signal to each device to be upgraded to establish a connection with the device to be upgraded that has not successfully shaken hands, and then continue to broadcast the i-th round target data packet to the device to be upgraded that has successfully shaken hands. The order of broadcasting at least one i-th round target data packet and broadcasting the i-th round handshake signal is alternated until the broadcast of all i-th round target data packets is completed. After all i-th round target data packets are broadcast, the broadcast operation of the i-th round is terminated. In other words, there is no need to rebroadcast the handshake signal at the beginning of each round.
[0097] This embodiment obtains the upgrade mode and target channel related to the round, and controls the target channel to broadcast the target data packet to the device to be upgraded according to the unicast strategy when the upgrade mode is the first mode, and according to the mixed broadcast strategy when the upgrade mode is the second mode. This method does not require cumbersome connection operations for each device, and avoids the complex and high-risk operation of disassembling the device, thereby greatly improving the update efficiency of the device's firmware program and / or data content data packet, reducing the consumption of labor costs, and also reducing the risk of damage to the product caused by disassembly operations, and can quickly and efficiently upgrade batches of devices.
[0098] In one embodiment, the step of controlling the target channel of the i-th round to broadcast the target data packet of the i-th round to each device to be upgraded according to the unicast strategy according to the data to be updated in the i-th round includes:
[0099] S211: Control the target channel of the i-th round to broadcast the i-th round handshake signal to each device to be upgraded;
[0100] Specifically, the handshake signal is first encapsulated according to a preset handshake signal encapsulation method, and the encapsulated handshake signal is used as the i-th round handshake signal. Then, the group device upgrader is controlled to broadcast to each of the devices to be upgraded through the i-th round target channel.
[0101] Optionally, the handshake signal encapsulation method includes: adding protocol-related headers, such as identifying the protocol version, device type identification, and serial number; in terms of data encryption and verification, an encryption algorithm may be used to encrypt key information and add a checksum; specific information related to the device to be upgraded may also be added, such as the target device identification range.
[0102] S212: Acquire handshake success information corresponding to the handshake signal of the i-th round sent by the device to be upgraded;
[0103] Specifically, the device to be upgraded establishes a handshake relationship after receiving the handshake signal in the i-th round, and if the handshake relationship is established successfully, a handshake success message is sent to the group device upgrader.
[0104] S213: taking the device to be upgraded corresponding to the handshake success information as the target device;
[0105] Specifically, the device to be upgraded corresponding to the handshake success information is a device to be upgraded that has established a handshake relationship with the group device upgrader. The device to be upgraded can receive the target data packet, so the device to be upgraded is used as the target device.
[0106] S214: According to the data to be updated in the i-th round, control the target channel in the i-th round to broadcast the target data packet in the i-th round to each target device.
[0107] Specifically, according to the data to be updated in the i-th round, the target channel in the i-th round is controlled to broadcast all the target data packets in the i-th round to each target device.
[0108] This embodiment uses broadcasting to avoid tedious connection operations for each device, and avoids the complex and high-risk operation of disassembling the device, thereby greatly improving the update efficiency of the device's firmware program and / or data content data packet, reducing the consumption of labor costs, and also reducing the risk of damage to the product due to disassembly operations, and can quickly and efficiently upgrade batches of devices; a specific broadcasting method is adopted, that is, the i-th round handshake signal is no longer broadcast in the middle of broadcasting the i-th round of target data packets. Since there is no need to insert the broadcast link of the handshake signal in the process of broadcasting the target data packet, the steps in the broadcast process are reduced. Each step takes a certain amount of time, and the reduction in steps means saving time in a round of broadcasting, thereby directly shortening the cycle of the i-th round of broadcasting.
[0109] In one embodiment, the step of controlling the target channel of the i-th round to broadcast the i-th round handshake signal and the i-th round target data packet to each device to be upgraded according to the i-th round of data to be updated and the mixed broadcast strategy includes:
[0110] S311: Control the target channel of the i-th round to broadcast the i-th round handshake signal to each device to be upgraded;
[0111] Specifically, the handshake signal is first encapsulated according to a preset handshake signal encapsulation method, and the encapsulated handshake signal is used as the i-th round handshake signal. Then, the group device upgrader is controlled to broadcast to each of the devices to be upgraded through the i-th round target channel.
[0112] S312: Acquire handshake success information corresponding to the handshake signal of the i-th round sent by the device to be upgraded;
[0113] Specifically, the device to be upgraded establishes a handshake relationship after receiving the handshake signal in the i-th round, and if the handshake relationship is established successfully, a handshake success message is sent to the group device upgrader.
[0114] S313: taking the device to be upgraded corresponding to the handshake success information as the target device;
[0115] Specifically, the device to be upgraded corresponding to the handshake success information is a device to be upgraded that has established a handshake relationship with the group device upgrader. The device to be upgraded can receive the target data packet, so the device to be upgraded is used as the target device.
[0116] S314: According to the data to be updated in the i-th round, controlling the target channel in the i-th round to broadcast the target data packet in the i-th round to each of the target devices, wherein in the process of broadcasting the target data packet in the i-th round to each of the target devices, the method further includes:
[0117] S3141: according to the preset configuration, re-execute the step from the step of controlling the target channel of the i-th round to broadcast the i-th round handshake signal to each of the devices to be upgraded to the step of taking the device to be upgraded corresponding to the handshake success information as the target device.
[0118] Optionally, the preset configuration uses a preset time interval.
[0119] Optionally, the preset configuration uses a preset interval of the number of data packets, for example, broadcasting 10 target data packets of the i-th round and broadcasting the i-th round handshake signal once.
[0120] Specifically, at the execution time corresponding to the preset configuration, the broadcasting of the target data packet of the i-th round is stopped, and then the handshake signal of the i-th round is broadcast once, and then the broadcasting of the target data packet of the i-th round is continued.
[0121] Optionally, at the execution time corresponding to the preset configuration (such as the end time of each cycle of the preset time interval), the target data packet of the i-th round is stopped from being broadcast, and then the handshake signal of the i-th round is broadcast once, and the target data packet of the i-th round is continued to be broadcast after the preset time length. In other words, the preset time length is used to receive the handshake success information.
[0122] Optionally, at the execution time corresponding to the preset configuration, the broadcasting of the target data packet of the i-th round is stopped, and then the i-th round handshake signal is broadcast once, and the broadcasting of the target data packet of the i-th round is continued immediately after the i-th round handshake signal is broadcast once.
[0123] Re-execute the step from controlling the target channel of the i-th round to broadcast the i-th round handshake signal to each of the devices to be upgraded to the step of taking the device to be upgraded corresponding to the handshake success information as the target device, that is, re-execute steps S311 to S313.
[0124] This embodiment uses broadcasting to avoid tedious connection operations for each device, and avoids the complex and high-risk operation of disassembling the device, thereby greatly improving the update efficiency of the device's firmware program and / or data content data packet, reducing the consumption of labor costs, and also reducing the risk of damage to the product caused by disassembly operations, and can quickly and efficiently upgrade batch devices; in this broadcasting process, according to the preset configuration, a series of steps from broadcasting the i-th round handshake signal to determining the device to be upgraded corresponding to the handshake success information as the target device are re-executed, breaking the traditional limitation of having to wait for the start of a new round. Since the relevant steps can be re-executed without waiting for a new round, the broadcast rounds are effectively reduced. This is like in a cyclic process, originally one round should be completed before starting the next round, but now in the middle of a round, some starting steps can be re-performed according to demand, thereby shortening the upgrade waiting time of the device to be upgraded.
[0125] In one embodiment, the handshake signal of the i-th round includes the i-th key, and the target data packet of the i-th round is an encrypted data packet corresponding to the i-th key.
[0126] Specifically, the AES-256 encryption algorithm is used to generate the key.
[0127] The device to be upgraded uses the ith key to decrypt the target data packet of the ith round, thereby obtaining a decrypted data packet. The decrypted data packet is used to upgrade the device to be upgraded.
[0128] Optionally, the group device upgrader generates a key once each time it is powered on using the AES-256 encryption algorithm.
[0129] Optionally, the group device upgrader generates a one-time key using an AES-256 encryption algorithm according to a preset period or preset rounds.
[0130] In this embodiment, the handshake signal of the i-th round includes the i-th key, and the target data packet of the i-th round is an encrypted data packet corresponding to the i-th key, thereby improving data security.
[0131] In one embodiment, the i-th key and the i+k-th key are different, and k is an integer greater than 0.
[0132] In this embodiment, the handshake signal of the i-th round contains the i-th key, and the target data packet of the i-th round is the encrypted data packet corresponding to this specific i-th key, and the i-th key is different from the i+k-th key. Since each round has an independent key, it means that it is difficult for an attacker to obtain a universal decryption method by analyzing the encrypted data packets of a certain round. If the key is fixed, once the attacker obtains this key, all data packets encrypted using the key can be decrypted. However, under this mechanism in which the keys of each round are different, even if the attacker cracks the key of a certain round, it can only decrypt the data packets of this round, and the encrypted data packets of other rounds cannot be decrypted. As the rounds increase, the keys are continuously updated. This dynamic key corresponds to the dynamic encrypted data packet mode, which greatly increases the confidentiality, integrity and availability of the data, thereby effectively improving data security.
[0133] In one embodiment, the step of obtaining the i-th round upgrade mode and the i-th round target channel includes:
[0134] S11: Get the i-th round start signal;
[0135] Specifically, the i-th round start signal can be a signal triggered by a user through a button or touch screen on the group device upgrader, or a signal actively triggered by the program file implementing the present application according to a preset condition. For example, after completing the i-1 round (the number of rounds after the first round) of device batch upgrade, the program file implementing the present application will determine whether breakpoint resume is required. If so, the program file will actively trigger the i-th round start signal.
[0136] S12: In response to the start signal of the i-th round, the counter is initialized to 1;
[0137] S13: Acquire the signal-to-noise ratio of the channel corresponding to the counter as a target signal-to-noise ratio;
[0138] It is understandable that the channels are sorted and labeled with serial numbers.
[0139] Specifically, the signal-to-noise ratio of the channel whose sequence number corresponds to the value in the counter is obtained, and the signal-to-noise ratio is used as the target signal-to-noise ratio.
[0140] S14: if the target signal-to-noise ratio is less than or equal to the preset signal-to-noise ratio, then if the counter is equal to the total number of channels, the counter is initialized to 1 and the step of jumping to the step of obtaining the signal-to-noise ratio of the channel corresponding to the counter as the target signal-to-noise ratio is continued; if the counter is less than the total number of channels, the counter is incremented by 1 and the step of jumping to the step of obtaining the signal-to-noise ratio of the channel corresponding to the counter as the target signal-to-noise ratio is continued;
[0141] Optionally, the preset signal-to-noise ratio is 20 dB.
[0142] Total Channels is the total number of channels.
[0143] Specifically, if the target signal-to-noise ratio is less than or equal to the preset signal-to-noise ratio, it means that the signal quality of the channel is poor, which is not conducive to the effective broadcast of the target data packet, and the channel needs to be switched. Therefore, if the counter is equal to the total number of channels, it means that this is the evaluation of the last channel with the last sequence number (that is, whether the target signal-to-noise ratio is greater than the preset signal-to-noise ratio), the counter is initialized to 1, and the step of jumping to the step of obtaining the signal-to-noise ratio of the channel corresponding to the counter as the target signal-to-noise ratio continues to be executed (that is, jumping to S13 and re-executing S13), and jumping to the first channel for evaluation is realized by re-executing S13. If the counter is less than the total number of channels, it means that this is not the evaluation of the last channel with the last sequence number, the counter is increased by 1, and the step of jumping to the step of obtaining the signal-to-noise ratio of the channel corresponding to the counter as the target signal-to-noise ratio continues to be executed (that is, jumping to S13 and re-executing S13), and the evaluation of the channel with the next sequence number is realized by re-executing S13.
[0144] S15: If the target signal-to-noise ratio is greater than a preset signal-to-noise ratio, taking the channel corresponding to the target signal-to-noise ratio as the target channel of the i-th round, and acquiring the upgrade mode of the i-th round.
[0145] Specifically, if the target signal-to-noise ratio is greater than the preset signal-to-noise ratio, it means that the signal quality of the channel is relatively good, which is conducive to the effective broadcast of the target data packet. Therefore, the channel corresponding to the target signal-to-noise ratio is used as the target channel of the i-th round, and the i-th round upgrade mode is obtained from the preset storage space (for example, the local storage space of the i-th round upgrade mode).
[0146] In this multi-channel processing mechanism of this embodiment, the selection of the channel is determined by comparing the target signal-to-noise ratio with the preset signal-to-noise ratio. When the target signal-to-noise ratio is less than or equal to the preset signal-to-noise ratio, it means that the signal quality of the current channel may not meet the requirements. If the counter is equal to the total number of channels, this means that all channels have been traversed. At this time, the counter is initialized to 1 and the step of obtaining the signal-to-noise ratio is restarted to traverse and check the channel conditions again to ensure that no channels that may meet the requirements are missed. If the counter is less than the total number of channels, the counter is increased by 1 and the signal-to-noise ratio is obtained again, so that the next channel can be checked. When the target signal-to-noise ratio is greater than the preset signal-to-noise ratio, it means that the signal quality of the channel has met the requirements, and this channel is used as the target channel of the i-th round, and the corresponding upgrade mode is obtained. This multi-channel switching method can systematically screen out channels that meet the signal-to-noise ratio requirements, thereby ensuring that operations such as data transmission or communication can be performed under better signal quality, reducing errors or performance degradation caused by poor channel quality (such as high bit error rate caused by low signal-to-noise ratio) and effectively improving the reliability and effectiveness of this application.
[0147] See also Figure 3 As shown, in one embodiment, the method further includes:
[0148] S41: Obtaining reception feedback data corresponding to the target data packet in the i-th round;
[0149] Specifically, the device to be upgraded analyzes the received target data packet of the i-th round to determine the data packet identifier of the data packet that needs to be resent (for example, the data packet that is missed or not completely received), and then generates the receiving feedback data corresponding to the target data packet of the i-th round according to the data packet identifiers of all the data packets that need to be resent. The group device upgrader obtains the receiving feedback data corresponding to the target data packet of the i-th round sent by the device to be upgraded.
[0150] The packet identifier is data that uniquely identifies a packet.
[0151] S42: parsing each of the received feedback data to determine the resending data;
[0152] Specifically, a preset parsing method is adopted to parse the data packet identifier of each of the received feedback data packets that need to be resent, and the data packet identifier obtained by the parsing is used as the resent data.
[0153] Optionally, the data packet identifier is a data packet sequence number, and the data packet identifier has been encapsulated into the target data packet.
[0154] S43: Obtaining the i+nth round upgrade mode and the i+nth round target channel;
[0155] Specifically, after the reissued data is determined, the step of acquiring the i+nth round upgrade mode and the i+nth round target channel is automatically triggered. It can be understood that the step of acquiring the i+nth round upgrade mode and the i+nth round target channel is executed in the same manner as the step of acquiring the i-th round upgrade mode and the i-th round target channel.
[0156] S44: if the upgrade mode of the i+nth round is the first mode, according to the i-th round to-be-updated data and the reissued data, the i+nth round target channel is controlled to broadcast the i+nth round target data packet to each of the to-be-upgraded devices corresponding to the reissued data according to the unicast strategy;
[0157] Specifically, if the upgrade mode of the i+nth round is the first mode, it means that in the i+nth round, there is no need to insert the broadcast of the i+nth round handshake signal (that is, the unicast strategy) in the middle of broadcasting each i+nth round target data packet. Therefore, each i+nth round target data packet is determined according to the i-th round data to be updated and the reissued data, and the i+nth round target channel is controlled according to the unicast strategy to broadcast all i+nth round target data packets corresponding to the reissued data to the upgraded devices that have successfully handshaked.
[0158] S45: if the upgrade mode of the i+nth round is the second mode, according to the i-th round to-be-updated data and the reissued data, the i+nth round target channel is controlled to broadcast the i+nth round target data packet to each of the to-be-upgraded devices corresponding to the reissued data according to the mixed broadcast strategy;
[0159] Here, n is an integer greater than 1.
[0160] Specifically, if the upgrade mode of the i+nth round is the second mode, it means that in the i+nth round, the broadcast of the i+nth round handshake signal (that is, the mixed broadcast strategy) needs to be inserted in the middle of broadcasting each i+nth round target data packet. Therefore, each i+nth round target data packet is determined according to the i+nth round to-be-updated data and the reissued data, and the i+nth round target data packet is controlled to be broadcast to the i+nth round target data packet to the upgraded device that has successfully shaken hand, and in the interval of broadcasting the i+nth round target data packet, the i+nth round target channel is controlled to broadcast the i+nth round handshake signal to each upgraded device according to the mixed broadcast strategy to establish a connection with the upgraded device that has not successfully shaken hand, and then continue to broadcast the i+nth round target data packet corresponding to the reissued data to the upgraded device that has successfully shaken hand. The order of broadcasting at least one i+nth round target data packet and broadcasting the i+nth round handshake signal is alternated until the broadcasting of all i+nth round target data packets corresponding to the reissued data is completed. After all i+nth round target data packets are broadcasted, the i+nth round broadcast operation is terminated.
[0161] In this embodiment, first, the received feedback data is parsed to determine the reissued data, which is the basis of the entire reissue process. When the upgrade mode of the i+nth round is the first mode, the target data packet is broadcast to the corresponding device to be upgraded according to the unicast strategy based on the reissued data and the target channel. The use of the unicast strategy enables the data to be accurately sent to each device to be upgraded corresponding to the reissued data, avoiding unnecessary data diffusion, ensuring the accuracy and pertinence of data transmission, and ensuring that each device that needs to reissue data can obtain an accurate data packet. When the upgrade mode is the second mode, the reissued data is broadcast according to the mixed broadcast strategy. The mixed broadcast strategy may be more suitable for certain specific network environments or device layouts. It can broadcast data to the corresponding device to be upgraded in a mixed manner, and while ensuring data reissue, it may have advantages in efficiency or compatibility. This method of using different broadcast strategies according to different upgrade modes realizes reissue, which can not only meet the needs of reissuing data to the device to be upgraded in different scenarios, but also flexibly adapt to various network conditions and device characteristics, thereby improving the success rate of reissued data and the reliability of the entire upgrade process.
[0162] In one embodiment, the step of controlling the target channel in the i-th round to broadcast the target data packet in the i-th round to each device to be upgraded according to the unicast strategy based on the data to be updated in the i-th round further includes:
[0163] S221: Obtain the i-th round breakpoint data;
[0164] The i-th round breakpoint data is description data that needs to be resumed during the i-th round of broadcasting.
[0165] Breakpoint data is the description data of the interrupted broadcast stored by the group device upgrader based on the preset emergency mechanism when the broadcast process is interrupted due to an abnormality (such as power failure). It may contain a variety of information, such as the identification of the target data packet being transmitted when the broadcast is interrupted, which helps to determine which target data packets have been sent and which have not yet been sent.
[0166] S222: If the breakpoint data in the i-th round is empty, then according to the data to be updated in the i-th round, the target channel in the i-th round is controlled according to the unicast strategy to broadcast the target data packet in the i-th round to each device to be upgraded;
[0167] Specifically, if the breakpoint data in the i-th round is empty, it means that the i-th round is not a breakpoint resume. Therefore, all the i-th round target data packets are determined according to the data to be updated in the i-th round, and the target channel in the i-th round is controlled according to the unicast strategy to broadcast the i-th round target data packets to each device to be upgraded.
[0168] S223: If the breakpoint data in the i-th round is not empty, determine the resumed data according to the data to be updated in the i-th round and the breakpoint data, and control the target channel in the i-th round to broadcast the target data packet in the i-th round to each device to be upgraded according to the unicast strategy according to the resumed data;
[0169] Specifically, if the breakpoint data in the i-th round is not empty, it means that the i-th round is breakpoint-resumed transmission. Therefore, all the i-th round target data packets that need to be broadcast are determined according to the data to be updated in the i-th round and the breakpoint data. Then, according to each determined i-th round target data packet, the target channel in the i-th round is controlled according to the unicast strategy to broadcast the i-th round target data packet to each device to be upgraded.
[0170] Optionally, according to the breakpoint data, the target data packet is searched from each target data packet corresponding to the data to be updated in the i-th round (the target data packet originally packaged and needed to be broadcast in the broadcast round corresponding to the breakpoint data in the i-th round), and the found target data packet is used as the target data packet for the i-th round.
[0171] Optionally, based on the breakpoint data, untransmitted data is determined from the data to be updated in the i-th round, the untransmitted data is packaged into target data packets, and each packaged target data packet is used as a target data packet in the i-th round.
[0172] Optionally, after completing the broadcast of each target data packet of the i-th round that needs to be broadcasted according to the data to be updated and the breakpoint data of the i-th round, the breakpoint data is cleared.
[0173] Optionally, the user triggers a clear signal through a button or touch screen on the group device upgrader, so that the program file of the present application clears the breakpoint data by responding to the clear signal.
[0174] The step of controlling the target channel of the i-th round to broadcast the i-th round handshake signal and the i-th round target data packet to each device to be upgraded according to the i-th round of data to be updated and the mixed broadcast strategy also includes:
[0175] S321: Obtain the i-th round breakpoint data;
[0176] S322: if the breakpoint data in the i-th round is empty, then according to the data to be updated in the i-th round, the target channel in the i-th round is controlled according to the mixed broadcast strategy to broadcast the i-th round handshake signal and the i-th round target data packet to each device to be upgraded;
[0177] Specifically, if the breakpoint data in the i-th round is empty, it means that the i-th round is not breakpoint resume. Therefore, according to the data to be updated in the i-th round, the target channel in the i-th round is controlled according to the mixed broadcast strategy to broadcast the i-th round handshake signal and the i-th round target data packet to each device to be upgraded.
[0178] S323: If the breakpoint data in the i-th round is not empty, determine the resumed data according to the data to be updated in the i-th round and the breakpoint data, and control the target channel in the i-th round to broadcast the i-th round handshake signal and the i-th round target data packet to each device to be upgraded according to the resumed data and the mixed broadcast strategy.
[0179] Specifically, if the breakpoint data in the i-th round is not empty, it means that the i-th round is breakpoint resume. Therefore, the i-th round target data packets to be broadcast are determined according to the data to be updated in the i-th round and the breakpoint data. Then, according to the determined i-th round target data packets, the target channel in the i-th round is controlled according to the mixed broadcast strategy to broadcast the i-th round target data packets to each device to be upgraded.
[0180] In this embodiment, when the breakpoint data is not empty, it indicates that there is an interruption in the previous transmission process. By combining the i-th round of data to be updated and the breakpoint data to determine the resumed data, this operation cleverly integrates the unfinished transmission part of the i-th round. Then, when the upgrade mode of the i-th round is the first mode, the i-th round target channel is controlled according to the unicast strategy to broadcast the i-th round target data packet to each device to be upgraded, and when the upgrade mode of the i-th round is the second mode, the i-th round target channel is controlled according to the mixed broadcast strategy to broadcast the i-th round target data packet to each device to be upgraded, ensuring that each device to be upgraded can accurately receive the target data packet containing the resumed data customized specifically for it. The technical effect of implementing breakpoint resume transmission in this way is that it can efficiently utilize the existing data information (breakpoint data) and continue data transmission at the interruption point, avoiding the waste of resources caused by retransmitting all data, such as network bandwidth, time, etc. At the same time, accurate unicast transmission is performed to each device to be upgraded, ensuring that each device can obtain complete and correct update data, improving the efficiency and accuracy of the entire upgrade process, and enhancing the reliability of data transmission, so that the entire system can quickly recover and continue to work normally when encountering a transmission interruption.
[0181] See also Figure 4 As shown, in one embodiment, a carousel-based device batch upgrade system is provided, the system comprising: a group device upgrader and each device to be upgraded;
[0182] The group device upgrader is configured to implement the following steps:
[0183] Get the i-th round upgrade mode and the i-th round target channel;
[0184] If the upgrade mode of the i-th round is the first mode, then according to the i-th round of data to be updated, the target channel of the i-th round is controlled according to the unicast strategy to broadcast the i-th round of target data packets to each device to be upgraded;
[0185] If the upgrade mode of the i-th round is the second mode, then according to the i-th round of data to be updated, the target channel of the i-th round is controlled according to the mixed broadcast strategy to broadcast the i-th round of handshake signals and the i-th round of target data packets to each device to be upgraded;
[0186] Here, i is an integer greater than 0.
[0187] This embodiment obtains the upgrade mode and target channel related to the round, and controls the target channel to broadcast the target data packet to the device to be upgraded according to the unicast strategy when the upgrade mode is the first mode, and according to the mixed broadcast strategy when the upgrade mode is the second mode. This method does not require cumbersome connection operations for each device, and avoids the complex and high-risk operation of disassembling the device, thereby greatly improving the update efficiency of the device's firmware program and / or data content data packet, reducing the consumption of labor costs, and also reducing the risk of damage to the product caused by disassembly operations, and can quickly and efficiently upgrade batches of devices.
[0188] In one embodiment, the storage space of the device to be upgraded is provided with a first partition and a second partition;
[0189] The device to be upgraded is configured as follows:
[0190] S51: receiving the target data packet of the i-th round;
[0191] Specifically, the target data packet of the i-th round broadcasted by the group device upgrader is received.
[0192] S52: storing the target data packet of the i-th round into the first partition;
[0193] S53: Determine whether the version of each i-th round of the target data packet in the first partition is an upgraded version of the data in the second partition;
[0194] Specifically, based on a preset version judgment rule, it is judged whether the version of each i-th round of the target data packet in the first partition is an upgraded version of the version of the data in the second partition.
[0195] It can be understood that step S53 can be performed after all the target data packets in the i-th round are received, or step S53 can be performed when part of the target data packets in the i-th round are received.
[0196] S54: If yes, determine the i-th round of data to be updated according to each i-th round of target data packets in the first partition, and perform an upgrade according to the i-th round of data to be updated;
[0197] Specifically, if the version of each i-th round of target data packets in the first partition is an upgraded version of the data in the second partition, it means that an upgrade is required. Therefore, the i-th round of target data packets in the first partition are parsed to obtain the i-th round of data to be updated, and the device to be upgraded is upgraded according to the i-th round of data to be updated.
[0198] It can be understood that if the version of each i-th round of target data packets in the first partition is not an upgraded version of the data in the second partition, it means that no upgrade is required. Therefore, each i-th round of target data packets in the first partition is cleared.
[0199] S55: Obtaining an upgrade completion signal;
[0200] Specifically, the device to be upgraded is upgraded and an upgrade completion signal is generated.
[0201] S56: In response to the upgrade completion signal, the data in the second partition is replaced and updated according to the i-th round of data to be updated.
[0202] Specifically, when the upgrade completion signal is obtained, the data in the second partition is replaced and updated.
[0203] Optionally, after replacing and updating the data in the second partition according to the i-th round of data to be updated, each i-th round of target data packets in the first partition may be cleared.
[0204] In this embodiment, when the device receives the target data packet of the i-th round and stores it in the first partition, it is like making a temporary cache area for data update. By judging whether the target data packet version in the first partition is an upgraded version of the data version of the second partition, the data that is really needed for the upgrade can be accurately screened out. If it is an upgraded version, the i-th round of data to be updated is determined based on these data and upgraded. This ensures that only newer and better version data will be used for the upgrade operation of the device, effectively avoiding wrong versions or unnecessary data updates, and the setting of dual partitions (that is, the first partition and the second partition) is also conducive to version rollback.
[0205] In one embodiment, a group device upgrader is provided, the group device upgrader comprising a communication component, a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor being electrically connected to the communication component, the communication component being used to broadcast an i-th round of target data packets to each device to be upgraded, and the processor implementing the following steps when executing the computer program:
[0206] Get the i-th round upgrade mode and the i-th round target channel;
[0207] If the upgrade mode of the i-th round is the first mode, then according to the i-th round of data to be updated, the target channel of the i-th round is controlled according to the unicast strategy to broadcast the i-th round of target data packets to each device to be upgraded;
[0208] If the upgrade mode of the i-th round is the second mode, then according to the i-th round of data to be updated, the target channel of the i-th round is controlled according to the mixed broadcast strategy to broadcast the i-th round of handshake signals and the i-th round of target data packets to each device to be upgraded;
[0209] Here, i is an integer greater than 0.
[0210] This embodiment obtains the upgrade mode and target channel related to the round, and controls the target channel to broadcast the target data packet to the device to be upgraded according to the unicast strategy when the upgrade mode is the first mode, and according to the mixed broadcast strategy when the upgrade mode is the second mode. This method does not require cumbersome connection operations for each device, and avoids the complex and high-risk operation of disassembling the device, thereby greatly improving the update efficiency of the device's firmware program and / or data content data packet, reducing the consumption of labor costs, and also reducing the risk of damage to the product caused by disassembly operations, and can quickly and efficiently upgrade batches of devices.
[0211] In one embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0212] Get the i-th round upgrade mode and the i-th round target channel;
[0213] If the upgrade mode of the i-th round is the first mode, then according to the i-th round of data to be updated, the target channel of the i-th round is controlled according to the unicast strategy to broadcast the i-th round of target data packets to each device to be upgraded;
[0214] If the upgrade mode of the i-th round is the second mode, then according to the i-th round of data to be updated, the target channel of the i-th round is controlled according to the mixed broadcast strategy to broadcast the i-th round of handshake signals and the i-th round of target data packets to each device to be upgraded;
[0215] Here, i is an integer greater than 0.
[0216] This embodiment obtains the upgrade mode and target channel related to the round, and controls the target channel to broadcast the target data packet to the device to be upgraded according to the unicast strategy when the upgrade mode is the first mode, and according to the mixed broadcast strategy when the upgrade mode is the second mode. This method does not require cumbersome connection operations for each device, and avoids the complex and high-risk operation of disassembling the device, thereby greatly improving the update efficiency of the device's firmware program and / or data content data packet, reducing the consumption of labor costs, and also reducing the risk of damage to the product caused by disassembly operations, and can quickly and efficiently upgrade batches of devices.
[0217] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0218] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0219] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above.
[0220] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A method for batch upgrading of devices based on carousel, characterized in that: The method comprises: Get the i-th round upgrade mode and the i-th round target channel; If the upgrade mode of the i-th round is the first mode, then according to the i-th round of data to be updated, the target channel of the i-th round is controlled according to the unicast strategy to broadcast the i-th round of target data packets to each device to be upgraded, wherein the unicast strategy means that in the i-th round, the broadcast of each i-th round of target data packets does not need to be inserted in the middle of broadcasting the i-th round of handshake signals; If the upgrade mode of the i-th round is the second mode, then according to the i-th round of data to be updated, the target channel of the i-th round is controlled to broadcast the i-th round handshake signal and the i-th round target data packet to each device to be upgraded according to the mixed broadcast strategy, wherein the mixed broadcast strategy means that in the i-th round, the broadcast of the i-th round handshake signal needs to be inserted in the middle of broadcasting each i-th round target data packet; Wherein, i is an integer greater than 0; The step of controlling the target channel of the i-th round to broadcast the target data packet of the i-th round to each device to be upgraded according to the unicast strategy according to the data to be updated in the i-th round includes: Control the target channel of the i-th round and broadcast the i-th round handshake signal to each of the devices to be upgraded; Obtaining handshake success information corresponding to the handshake signal of the i-th round sent by the device to be upgraded; The device to be upgraded corresponding to the handshake success information is used as the target device; According to the data to be updated in the i-th round, controlling the target channel in the i-th round to broadcast the target data packet in the i-th round to each target device; The step of controlling the target channel of the i-th round to broadcast the i-th round handshake signal and the i-th round target data packet to each device to be upgraded according to the i-th round of data to be updated and the mixed broadcast strategy comprises: Controlling the target channel of the i-th round to broadcast the i-th round handshake signal to each of the devices to be upgraded; Obtaining handshake success information corresponding to the handshake signal of the i-th round sent by the device to be upgraded; The device to be upgraded corresponding to the handshake success information is used as the target device; According to the data to be updated in the i-th round, controlling the target channel in the i-th round to broadcast the target data packet in the i-th round to each of the target devices, wherein in the process of broadcasting the target data packet in the i-th round to each of the target devices, the method further includes: According to the preset configuration, the step from the step of controlling the target channel of the i-th round to broadcast the i-th round handshake signal to each of the devices to be upgraded to the step of taking the device to be upgraded corresponding to the handshake success information as the target device is re-executed.
2. The method for batch upgrading devices based on carousel according to claim 1 is characterized in that: The handshake signal of the i-th round includes the i-th key, and the target data packet of the i-th round is an encrypted data packet corresponding to the i-th key.
3. The method for batch upgrading devices based on carousel according to claim 2 is characterized in that: The i-th key and the i+k-th key are different, and k is an integer greater than 0.
4. The method for batch upgrading devices based on carousel according to claim 1, characterized in that: The step of obtaining the i-th round upgrade mode and the i-th round target channel includes: Get the start signal of round i; In response to the start signal of the i-th round, the counter is initialized to 1; Acquire a signal-to-noise ratio of a channel corresponding to the counter as a target signal-to-noise ratio; If the target signal-to-noise ratio is less than or equal to the preset signal-to-noise ratio, if the counter is equal to the total number of channels, the counter is initialized to 1 and the step of jumping to the step of obtaining the signal-to-noise ratio of the channel corresponding to the counter as the target signal-to-noise ratio is continued; if the counter is less than the total number of channels, the counter is incremented by 1 and the step of jumping to the step of obtaining the signal-to-noise ratio of the channel corresponding to the counter as the target signal-to-noise ratio is continued; If the target signal-to-noise ratio is greater than a preset signal-to-noise ratio, the channel corresponding to the target signal-to-noise ratio is used as the target channel of the i-th round, and the upgrade mode of the i-th round is obtained.
5. The method for batch upgrading devices based on carousel according to claim 1, characterized in that: The method further comprises: Obtaining reception feedback data corresponding to the target data packet of the i-th round; Analyze each of the received feedback data to determine the resend data; Get the i+nth round upgrade mode and i+nth round target channel; If the upgrade mode of the i+nth round is the first mode, then according to the i-th round to-be-updated data and the reissued data, the i+nth round target channel is controlled according to the unicast strategy to broadcast the i+nth round target data packet to each of the to-be-upgraded devices corresponding to the reissued data; If the upgrade mode of the i+nth round is the second mode, then according to the i-th round to-be-updated data and the reissued data, the i+nth round target channel is controlled to broadcast the i+nth round target data packet to each of the to-be-upgraded devices corresponding to the reissued data according to the mixed broadcast strategy; Here, n is an integer greater than 1.
6. The method for batch upgrading devices based on carousel according to claim 1, characterized in that: The step of controlling the target channel of the i-th round to broadcast the target data packet of the i-th round to each device to be upgraded according to the unicast strategy according to the data to be updated in the i-th round also includes: Get the breakpoint data of round i; If the breakpoint data in the i-th round is empty, then according to the data to be updated in the i-th round, the target channel in the i-th round is controlled according to the unicast strategy to broadcast the target data packet in the i-th round to each device to be upgraded; If the breakpoint data in the i-th round is not empty, determine the resumed data according to the data to be updated in the i-th round and the breakpoint data, and control the target channel in the i-th round to broadcast the target data packet in the i-th round to each device to be upgraded according to the unicast strategy according to the resumed data; The step of controlling the target channel of the i-th round to broadcast the i-th round handshake signal and the i-th round target data packet to each device to be upgraded according to the i-th round of data to be updated according to the mixed broadcast strategy also includes: Get the breakpoint data of round i; If the breakpoint data in the i-th round is empty, then according to the data to be updated in the i-th round, the target channel in the i-th round is controlled according to the mixed broadcast strategy to broadcast the i-th round handshake signal and the i-th round target data packet to each device to be upgraded; If the breakpoint data in the i-th round is not empty, the resumed data is determined according to the data to be updated in the i-th round and the breakpoint data. According to the resumed data, the target channel in the i-th round is controlled to broadcast the i-th round handshake signal and the i-th round target data packet to each device to be upgraded according to the mixed broadcast strategy.
7. A carousel-based device batch upgrade system, characterized in that: The system comprises: a group device upgrader and each device to be upgraded; The group device upgrader is configured to implement the following steps: Get the i-th round upgrade mode and the i-th round target channel; If the upgrade mode of the i-th round is the first mode, then according to the i-th round of data to be updated, the target channel of the i-th round is controlled according to the unicast strategy to broadcast the i-th round of target data packets to each device to be upgraded, wherein the unicast strategy means that in the i-th round, the broadcast of each i-th round of target data packets does not need to be inserted in the middle of broadcasting the i-th round of handshake signals; If the upgrade mode of the i-th round is the second mode, then according to the i-th round of data to be updated, the target channel of the i-th round is controlled to broadcast the i-th round handshake signal and the i-th round target data packet to each device to be upgraded according to the mixed broadcast strategy, wherein the mixed broadcast strategy means that in the i-th round, the broadcast of the i-th round handshake signal needs to be inserted in the middle of broadcasting each i-th round target data packet; Wherein, i is an integer greater than 0; The step of controlling the target channel of the i-th round to broadcast the target data packet of the i-th round to each device to be upgraded according to the unicast strategy according to the data to be updated in the i-th round includes: Control the target channel of the i-th round and broadcast the i-th round handshake signal to each of the devices to be upgraded; Obtaining handshake success information corresponding to the handshake signal of the i-th round sent by the device to be upgraded; The device to be upgraded corresponding to the handshake success information is used as the target device; According to the data to be updated in the i-th round, controlling the target channel in the i-th round to broadcast the target data packet in the i-th round to each target device; The step of controlling the target channel of the i-th round to broadcast the i-th round handshake signal and the i-th round target data packet to each device to be upgraded according to the i-th round of data to be updated and the mixed broadcast strategy comprises: Controlling the target channel of the i-th round to broadcast the i-th round handshake signal to each of the devices to be upgraded; Obtaining handshake success information corresponding to the handshake signal of the i-th round sent by the device to be upgraded; The device to be upgraded corresponding to the handshake success information is used as the target device; According to the data to be updated in the i-th round, the target channel in the i-th round is controlled to broadcast the target data packet in the i-th round to each of the target devices, wherein the process of broadcasting the target data packet in the i-th round to each of the target devices further includes: According to the preset configuration, the step from the step of controlling the target channel of the i-th round to broadcast the i-th round handshake signal to each of the devices to be upgraded to the step of taking the device to be upgraded corresponding to the handshake success information as the target device is re-executed.
8. The carousel-based device batch upgrade system according to claim 7, characterized in that: The storage space of the device to be upgraded is divided into a first partition and a second partition; The device to be upgraded is configured as follows: Receiving the target data packet of the i-th round; Storing the target data packet of the i-th round into the first partition; Determine whether the version of each i-th round of the target data packet in the first partition is an upgraded version of the data in the second partition; If yes, determine the data to be updated in the i-th round according to each target data packet in the i-th round in the first partition, and perform an upgrade according to the data to be updated in the i-th round; Get the upgrade completion signal; In response to the upgrade completion signal, the data in the second partition is replaced and updated according to the i-th round of data to be updated.
9. A group device upgrader, characterized in that: The group device upgrader includes a communication component, a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor is electrically connected to the communication component. The communication component is used to broadcast the i-th round of target data packets to each device to be upgraded. When the processor executes the computer program, the steps of the device batch upgrade method based on carousel are implemented as described in any one of claims 1 to 6.
10. 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 steps of the device batch upgrade method based on carousel according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Upgrading method, device, system and equipment based on Bluetooth and storage medium
CN117221116A
Equipment upgrading method and device, storage medium and electronic equipment
CN119149069A
Single-chip microcomputer upgrading method based on CAN communication
CN119292640A