Method and device for batch upgrading of equipment firmware, electronic equipment and storage medium

By setting up multiple broadcast stations within the activity range of the positioning device, determining their importance, and upgrading them in a coordinated manner, the problem of low efficiency in batch firmware upgrades is solved, achieving efficient and seamless firmware upgrades and ensuring that the positioning function is not affected during device movement.

CN120994230APending Publication Date: 2025-11-21NANJING BESTWAY AUTOMATION SYST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511069602.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-31
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

In the existing technology, the efficiency of batch firmware upgrades for electronic devices is low. Especially when the area where people are active is large and the number of devices is large, problems such as signal interruption and incomplete firmware information are likely to occur, affecting the normal use of the devices and the upgrade effect.

Method used

Multiple broadcast stations are set up within the activity range of the positioning device, the comprehensive importance coefficient of each broadcast station is determined, and firmware upgrades are performed in collaboration with Bluetooth and UWB. Differential packet allocation and prediction of the device's movement direction are used for seamless upgrades.

Benefits of technology

It enables efficient and seamless device firmware upgrades in complex environments, ensuring that the positioning function is not affected during device movement. It features convenient operation, low cost, high efficiency, and strong stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120994230A_ABST
    Figure CN120994230A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for upgrading equipment firmware in batches, electronic equipment and a storage medium, and the method comprises the steps: setting a plurality of broadcast sites in an activity range of positioning equipment, and determining a comprehensive importance coefficient of each broadcast site in transmitting a firmware upgrading task to the positioning equipment; sending a differential packet required by firmware upgrading to each broadcast site, wherein the size of the differential packet allocated to each broadcast site is positively correlated with the comprehensive importance coefficient; the broadcast site broadcasts firmware upgrade notification information through Bluetooth, and the positioning device sends an upgrade instruction to the broadcast site corresponding to the firmware upgrade notification information through UWB; and the broadcast station broadcasts the distributed differential packets through Bluetooth. According to the method and the device, the positioning equipment can be efficiently subjected to traceless batch upgrading in the moving process.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of batch upgrading of device firmware, and in particular to a method and device for batch upgrading of device firmware, an electronic device, and a storage medium. BACKGROUND

[0002] Many electronic devices are worn on the body of a person, and can locate the position of the person in real time, facilitating determination of the position and tracing of the trajectory of the person when necessary. With changes in application scenarios, these devices often need to adapt to new requirements, and firmware updates are often required for new function addition and iteration. In the prior art, devices can be manually retrieved for upgrading, but this approach is inefficient, and the person is not wearing a device during the retrieval period, lacking safety assurance. In the prior art, there is also a way of upgrading firmware over the air, but for a case where the area in which a person moves is large and the number of devices is large, this approach cannot well coordinate firmware upgrading of multiple devices in a moving situation, and problems such as interruption of firmware transmission signals due to device movement and incomplete firmware information, which result in failure to upgrade, are likely to occur.

[0003] Therefore, how to efficiently upgrade devices with reduced impact on work is a key problem to be considered for batch upgrading of such devices. SUMMARY

[0004] Embodiments of the present application provide a method and device for batch upgrading of device firmware, an electronic device, and a storage medium, to solve the technical problem of low efficiency of traceless upgrading of batch upgrading of devices in the prior art.

[0005] According to an aspect of the present application, a method for batch upgrading of device firmware is provided, comprising: a plurality of broadcast sites are set in an activity range of a positioning device, and a comprehensive importance coefficient of each broadcast site in transmitting an upgrading firmware task to the positioning device is determined; a difference package required for firmware upgrading is sent to each broadcast site, wherein the size of the difference package allocated to each broadcast site is positively correlated with the comprehensive importance coefficient; The broadcast site broadcasts firmware upgrading notification information through Bluetooth, so that the positioning device sends an upgrading instruction to the broadcast site corresponding to the firmware upgrading notification through UWB when the positioning device determines that the situation conforms to upgrading according to the received firmware upgrading notification information; The broadcast site broadcasts the difference package allocated thereto through Bluetooth in response to receiving the upgrading instruction.

[0006] Further, the plurality of broadcast sites set in the activity range of the positioning device comprises: a map in the activity range of the positioning device and a historical daily trajectory of each positioning device are obtained; selecting several of the intersection points formed by the historical daily trajectories of all positioning devices as broadcast sites and marking in the map, wherein the total area of the signal transmission areas of all the broadcast sites superimposed covers at least part of the historical daily trajectory of each positioning device, and at least part of the historical daily trajectory of each positioning device respectively passes through the coverage ranges of two broadcast sites; obtaining the topology between the respective broadcast sites in combination with the map and marking the respective nodes in accordance with the connection relationship on the topology, wherein the nodes of the topology represent the broadcast sites, and the connection lines between two nodes represent that the two broadcast sites are connected on the map and do not pass through other broadcast sites; setting the signal strengths of the broadcast sites corresponding to the two nodes of any connection line of the topology so that there is an overlapping area between the signal transmission areas of the two.

[0007] Further, the determination of the comprehensive importance degree coefficient of each broadcast site in the task of transmitting the upgraded firmware to the positioning device includes: obtaining the historical daily stay time corresponding to each positioning device in the signal transmission area of each broadcast site and the total of the historical daily stay time of all positioning devices; assigning a first importance degree coefficient to each broadcast site in accordance with the positive correlation of the longest time in the historical daily stay time, and assigning a second importance degree coefficient to each broadcast site in accordance with the positive correlation of the total of the historical stay time; normalizing the first importance degree coefficient and the second importance degree coefficient, and obtaining the comprehensive importance degree coefficient of each broadcast site according to the sum of the first importance degree coefficient and the second importance degree coefficient after normalization.

[0008] Further, the sending of the differential package required for the firmware upgrade to the respective broadcast sites, wherein the size of the differential package allocated to each broadcast site is positively correlated with the comprehensive importance degree coefficient, includes: for the broadcast site with a comprehensive importance degree coefficient greater than or equal to a first threshold value, the number of allocated differential packages accounts for at least A1% of the total number of differential packages; for the broadcast site with a comprehensive importance degree coefficient greater than or equal to a second threshold value and less than the first threshold value, the number of allocated differential packages accounts for A3%-A2%; for the broadcast site with a comprehensive importance degree coefficient less than the second threshold value, the number of allocated differential packages is less than A4%; wherein A1>A2>A3>A4, and the content of the larger number of allocated differential packages includes the content of the smaller number of allocated differential packages.

[0009] Further, the broadcast site responds to the receipt of the upgrade instruction by broadcasting the differential package allocated thereto through Bluetooth, including: During the broadcasting process, position information of the positioning device is obtained; According to the position information, a subsequent moving direction of the positioning device is predicted in combination with historical daily trajectories, and another broadcasting station with a connection to the currently-interacted broadcasting station in the subsequent moving direction is determined as a standby broadcasting station; In response to the positioning device entering a signal transmission overlap area of the standby broadcasting station and the currently-interacted broadcasting station, if the positioning device has not completed receiving all the differential packages at this time, the positioning device sends an upgrade instruction to the standby broadcasting station.

[0010] Further, before the positioning device sends the upgrade instruction to the standby broadcasting station, the positioning device includes: identifying whether the differential package that has not been received by the positioning device exists in the currently-interacted broadcasting station and the standby broadcasting station; if only the currently-interacted broadcasting station has the differential package that has not been received, the currently-interacted broadcasting station shares the differential package that has not been received with the standby broadcasting station; if neither of them has the differential package that has not been received, the differential package that has not been received is sent to the standby broadcasting station through the cloud.

[0011] Further, the broadcasting of the differential package allocated by the broadcasting station includes: dividing the differential package to be broadcast into a plurality of data groups, and sending each data group for N times and then sending the next data group.

[0012] In a second aspect of the present application, a device for batch upgrading of device firmware is provided, including: an importance determination module for determining a comprehensive importance coefficient of each broadcasting station in transmitting an upgrade firmware task to a positioning device; wherein the broadcasting station is pre-set in an active range of the positioning device; a differential package allocation module for sending differential packages required for firmware upgrade to each broadcasting station, wherein the size of the differential package allocated to each broadcasting station is positively correlated with the comprehensive importance coefficient; an upgrade module for broadcasting firmware upgrade notification information by the broadcasting station through Bluetooth, so that the positioning device sends an upgrade instruction to the broadcasting station corresponding to the firmware upgrade notification through UWB when the positioning device determines that the conditions for upgrading are met according to the received firmware upgrade notification information; a broadcasting module for broadcasting the differential package allocated by the broadcasting station through Bluetooth by the broadcasting station in response to receiving the upgrade instruction.

[0013] In a third aspect of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to enable the electronic device to implement the method according to the first aspect of the present application.

[0014] In a fourth aspect of the present application, a computer readable storage medium is provided, for storing a computer program, which, when executed on a computer, causes the computer to implement the method according to the first aspect of the present application. Advantages

[0015] In the embodiments of the present application, a method for batch upgrading of device firmware is adopted, by setting multiple broadcast sites in the active range of the positioning device, and determining the comprehensive importance coefficient of each broadcast site in transmitting the upgrading firmware task to the positioning device; the differential package required for firmware upgrading is sent to each broadcast site, wherein the size of the differential package allocated to each broadcast site is positively correlated with the comprehensive importance coefficient; the broadcast site broadcasts firmware upgrading notification information through Bluetooth, so that the positioning device judges whether to upgrade according to the received firmware upgrading notification information, and sends an upgrading instruction to the corresponding broadcast site of the firmware upgrading notification through UWB when the positioning device meets the upgrading condition; the broadcast site broadcasts the differential package allocated thereto through Bluetooth in response to receiving the upgrading instruction.

[0016] Through the present application, the broadcast site can be determined according to the historical distribution of the positioning device in a complex and harsh working environment with strong interference, and the subsequent moving direction of the positioning device can be predicted during the upgrading process, thereby facilitating the connection of different broadcast sites, and realizing efficient traceless batch upgrading of the positioning device during movement.

[0017] The upgrading process uses UWB to send upgrading instructions, is compatible with existing positioning devices, has the characteristics of convenient operation, low cost, high efficiency, strong stability, and anti-interference, and does not affect the normal positioning and use of the device during the upgrading process, that is, the personnel safety is not affected on the premise of fast upgrading. BRIEF DESCRIPTION OF DRAWINGS

[0018] The accompanying drawings, which form a part of the present application, are intended to provide further understanding of the present application, and the illustrative embodiments of the present application and their description serve the purpose of explaining the present application. The accompanying drawings should not be construed as an inappropriate limitation on the present application. In the drawings: Figure 1 FIG. 1 is a flowchart of a method for batch upgrading of device firmware according to an embodiment of the present application.

[0019] Figure 2 FIG. 2 is a schematic diagram of an apparatus for batch upgrading of device firmware according to an embodiment of the present application.

[0020] Figure 3 is a schematic diagram of an electronic device according to an embodiment of the application. DETAILED DESCRIPTION

[0021] It should be noted that the embodiments and features of the embodiments in the present application can be combined with each other without conflict. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0022] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown herein.

[0023] Device Firmware Update, abbreviated as DFU, is a way to upgrade device firmware through Over The Air, abbreviated as OTA. This way is to upgrade the device firmware through wireless communication, and the specific wireless way includes 2G / 3G / 4G / WiFi / Bluetooth / NFC / Zigbee, etc., which all support OTA. DFU can be upgraded through wireless way, but also can be upgraded through wired way, such as through UART, USB or SPI communication interface to upgrade the device firmware.

[0024] The differential package is an upgrade file generated by calculating the difference between the target version and the source version through a differential algorithm, mainly used for incremental upgrade in embedded systems, mobile applications and other scenarios, with the advantages of saving space and improving download efficiency. The core of differential upgrade is to compare the binary differences of new and old version files through algorithm (such as bsdiff+lzma), and only extract the changing part to generate differential package, which has the characteristics of high efficiency and safety.

[0025] In the mine, the working conditions are poor, there are many staff and mobile devices, and it is usually 7*24 hours continuous operation, each underground staff and mobile device will be equipped with relevant electronic equipment to provide functions including but not limited to positioning, communication, etc., but the activity area, activity route, underground time of each staff, mobile device are not the same, when facing the demand of device batch upgrade, it is difficult to achieve without trace in the case of not affecting the work. In the prior art, the device is recycled, which will affect the normal work during the recycling period, and in the prior art, the firmware upgrade is realized by broadcasting at the gate and other places where the device enters and exits more frequently, but because the time of different devices entering and exiting the gate is indefinite, and the residence time of each device is different, therefore, it is difficult to ensure that such upgrade method will not exist the situation that part of the devices fail to receive the differential package or the differential package is not received completely, resulting in upgrade failure.

[0026] Based on the above situation, the embodiment of the present application provides a method for batch upgrading device firmware, a plurality of broadcast sites are used in the entire activity area, the broadcast sites are configured with Bluetooth modules, and the relevant devices to be upgraded are configured with UWB modules and Bluetooth modules, in the case of dynamic movement of the devices, the real-time position of the devices is combined, and the OTA upgrade is realized by using suitable broadcast sites or broadcast sites in cooperation.

[0027] Specifically, the method for batch upgrading device firmware of the embodiment comprises the following steps: Step S101, a plurality of broadcast sites are set in the activity range of the positioning device, and the comprehensive importance coefficient of each broadcast site in transmitting the upgrade firmware task to the positioning device is determined.

[0028] Because the activity route of each positioning device is different, the number of positioning devices passing through different positions and the residence time are different, therefore, the comprehensive importance coefficient is set for different broadcast sites to represent the importance of the broadcast site in transmitting the upgrade firmware task to the positioning device, and the important site undertakes more transmission tasks in the whole task process.

[0029] Step S102, the differential package required for firmware upgrade is sent to each broadcast site, wherein the size of the differential package allocated to each broadcast site is positively correlated with the comprehensive importance coefficient.

[0030] The importance of different broadcast sites is divided by using the comprehensive importance coefficient, and the broadcast sites are caused to undertake different number of broadcast tasks of the differential package. The broadcast site allocated to the complete differential package is more likely to complete the upgrade of certain positioning devices independently, and the broadcast site allocated to more differential packages is more likely to complete the upgrade of certain positioning devices in cooperation with fewer remaining broadcast sites.

[0031] Step S103, the broadcast station broadcasts firmware upgrade notification information through Bluetooth, so that the positioning device judges whether to upgrade according to the received firmware upgrade notification information, and sends an upgrade instruction to the corresponding broadcast station through UWB when the positioning device judges to upgrade.

[0032] The underground roadway environment is complex and has more shielding, and the effective transmission range of Bluetooth is limited. Therefore, in the embodiment, multiple broadcast stations are needed to upgrade the positioning devices entering their signal coverage area. Under the cooperation of multiple broadcast stations, the upgrade of all positioning devices can be completed.

[0033] The positioning function of the underground positioning device is obtained by periodically performing UWB ranging with the positioning beacons arranged in the underground space. Therefore, when the positioning device judges to upgrade, the positioning device can send an upgrade instruction to the broadcast station through UWB in the gap of UWB ranging, which does not affect the normal work of the positioning device.

[0034] In some optional embodiments, for the broadcast station with a large comprehensive importance coefficient, because there are usually more mobile devices in a communication state at the same time, the width and power of the channel of the broadcast station can be set to be larger than those of the broadcast station with a small comprehensive importance coefficient, so that the data transmission of the broadcast station with a large comprehensive importance coefficient can be completed more quickly.

[0035] Step S104, the broadcast station broadcasts the differential package allocated to it through Bluetooth in response to receiving the upgrade instruction.

[0036] Through the above method, multiple broadcast stations are arranged in the active area of the positioning device, and different importance degrees are configured for the broadcast stations, and the broadcast stations with different importance degrees undertake different numbers of differential package broadcast tasks. Under the cooperation of the broadcast stations, all positioning devices can be fully covered, so that the broadcast of the differential package can be realized without affecting the work.

[0037] Specifically, the firmware to be upgraded is made into a differential package. The size of the differential package is generally several K to tens of K, and the differential package is loaded into an upgrade tool. Then, the information of the firmware is configured through an instruction, including the type of the device to be upgraded, the start and end card number of the device to be upgraded, the device model, the firmware number, the firmware version, and other information. After the information is set, the upgrade tool located at the broadcast station broadcasts the firmware information in the UUID (Universal Unique Identifier) through Bluetooth.

[0038] The positioning device keeps scanning the Bluetooth information around it. When the Bluetooth information and signal strength released by the upgrading tool meet the threshold, the positioning device checks whether the information parameters are consistent with its own device. If the device type, the starting and ending addresses of the upgrade, the device model, the firmware number, and the firmware version are not consistent, the positioning device will not enter the upgrade step.

[0039] If the positioning device meets the upgrade requirements after comparing the upgrade parameters, it will start the upgrade process. Since the positioning device needs to periodically measure the distance with the surrounding positioning beacons, it needs to wait until the idle time to interact with the upgrading tool. The positioning device notifies the upgrading tool that it needs to broadcast the upgrade firmware. After receiving the request, the upgrading tool sends a broadcast message. In some preferred embodiments, each frame of upgrade message is sent for 3 times continuously. After the 3 times of sending, the next frame of upgrade message is sent. The entire differential package upgrade message is sent in multiple rounds. Since the upgrading tool sends the firmware in a broadcast manner, the positioning devices within the broadcast signal coverage range will receive the upgrade message.

[0040] The positioning device judges whether each frame of received upgrade message has been received and stored in its own storage such as FLASH. If the message has been stored, it will not be stored again. If the message has not been stored, it will be stored in the storage. In this embodiment, a 300-byte array is configured in the FLASH storage with an initial value of 0. The bit position is marked. If the first frame is received, the bit0 position of the 0 index of the array is set to 1, indicating that the first data has been received. The length of each frame of upgrade message is 1K, so the address of each frame of upgrade message in the FLASH can be calculated according to the current frame number. After receiving each frame, the positioning device judges whether it has received all the upgrade frames. According to the total number of frames and the 300-byte array, if the bit positions of the total number of frames are set to 1, it means that all the upgrade packages have been received.

[0041] After receiving the complete differential package, the positioning device performs firmware verification. After successful verification, the differential firmware and the old firmware are combined into a new firmware. The new firmware after upgrade is subjected to CRC verification again. After passing the verification, the restored new firmware is moved to the program running area, and then the new firmware is run.

[0042] In some optional embodiments, if the differential package is not received and no differential package is received for a certain period of time, it is considered that the upgrading tool has stopped sending the upgrade firmware. At this time, the positioning device can request the upgrade again.

[0043] In some preferred embodiments, since the work of personnel and equipment in the mine is highly repetitive, the selection of suitable locations in the mine as broadcast sites can fully consider the locations passed by the positioning equipment in actual work, thereby facilitating the determined broadcast sites to more efficiently perform the broadcast upgrade work. Therefore, in step S101, the setting of multiple broadcast sites in the activity range of the positioning equipment includes: In step S1011, a map in the activity range of the positioning equipment and a historical daily trajectory of each positioning equipment are obtained.

[0044] According to the daily work tasks of personnel or equipment to which different positioning equipment belongs, the positioning equipment can record a set of position data formed by the corresponding personnel or equipment when performing the daily work tasks. From these sets of position data, at least the running route, the boundary of each positioning equipment, and the overlapping positions between the positioning equipment can be known.

[0045] In step S1012, a number of the overlapping points formed by the historical daily trajectories of all positioning equipment are selected as broadcast sites and marked in the map, wherein the total area of the signal transmission areas of all the broadcast sites superimposed covers at least part of the historical daily trajectory of each positioning equipment, and at least part of the historical daily trajectory of each positioning equipment respectively passes through the coverage range of two broadcast sites.

[0046] The overlapping points are usually important passages, sites, etc., such as gates for entering and leaving the mine, rest areas, and merging sections of roadways, etc. In order to ensure that the broadcast signal can cover each positioning equipment, when selecting the broadcast sites, the signal coverage area formed when the broadcast sites work simultaneously needs to be simulated, which covers at least part of the historical trajectory of each positioning equipment, so as to ensure that each positioning equipment can enter the broadcast signal coverage area. In order to prevent some broadcast sites from failing to work, etc., it is further limited that at least part of the historical daily trajectory of each positioning equipment respectively passes through the coverage area of two broadcast sites, so that for each positioning equipment, if it cannot complete the upgrade in the signal coverage range of one broadcast site, it can continue to complete the upgrade in another site. The above-mentioned manner can take into account the setting efficiency of the broadcast sites and the success rate of synchronous upgrade. If the cost allows, more broadcast sites can be set on the basis of the above-mentioned manner, thereby ensuring the success rate of upgrade.

[0047] In some optional embodiments, by simulation, N1 broadcast stations are set at N1 specific positions to obtain an all-device upgrade success rate of greater than 99%, and on this basis, M broadcast stations with high comprehensive importance coefficients are redundantly set, each of which is configured as a backup broadcast station at a position corresponding to the broadcast station. The backup broadcast station at the same position has the same configuration as the non-backup broadcast station, so as to replace the non-backup broadcast station in case of failure or the like.

[0048] In step S1013, the topology between the broadcast stations is obtained in combination with the map, and each node is marked according to the connection relationship on the topology, wherein the nodes of the topology represent the broadcast stations, and the connection between two nodes represents that the two broadcast stations are connected on the map without passing through other broadcast stations. In this way, the positional relationship between the broadcast stations in accordance with the tunnel connection relationship can be clearly obtained, so that the signal strength of each broadcast station can be conveniently configured.

[0049] In step S1014, the signal strengths of the broadcast stations corresponding to the two nodes of any connection are set according to the topology, so that the signal transmission areas of the two broadcast stations have an overlapping area.

[0050] In this way, the broadcast stations corresponding to the two nodes of any connection have an overlap, so that the positioning device moving in the tunnel will not be located outside the signal coverage range of any broadcast station at a certain time period.

[0051] In some preferred embodiments, in step S102, the comprehensive importance coefficient of each broadcast station in the task of transmitting the upgrade firmware to the positioning device is determined, including: In step S1021, the historical daily stay time of each positioning device in the signal transmission area of each broadcast station and the total historical daily stay time of all positioning devices are obtained.

[0052] For example, for the broadcast station numbered 5, the historical daily stay time of the positioning device numbered 1 in the signal transmission area of the broadcast station numbered 5 includes three segments, i.e., 9:00:00-9:00:15 for a total of 15 seconds, 10:25:30-10:25:50 for a total of 20 seconds, and 13:10:10-13:11:00 for a total of 40 seconds. Therefore, the historical daily stay time of the positioning device numbered 1 in the signal transmission area of the broadcast station numbered 5 is 75 seconds. In this way, the historical daily stay time of all positioning devices in the signal transmission area of the broadcast station numbered 5 is obtained, and the total historical daily stay time of all positioning devices in the signal transmission area of the broadcast station numbered 5 is further obtained.

[0053] Step S1022, according to the longest time in the historical daily stay time, a positive correlation is given to each broadcast site a first importance coefficient, and according to the historical stay time sum, a positive correlation is given to each broadcast site a second importance coefficient.

[0054] For a broadcast site, the longest time in the historical daily stay time represents the longest transmittable time of the broadcast site to a single positioning device, the longer the data, the longer the positioning device corresponding to the data stays around the broadcast site, that is, the more important the broadcast site is to the positioning device.

[0055] For a broadcast site, the historical stay time sum represents the transmittable time of the broadcast site to all positioning devices to be upgraded as a whole, the longer the data, the more important the broadcast site is to the positioning devices as a whole, and the data usually appears in the broadcast site with more passing or staying positioning devices and / or longer stay time.

[0056] Since different positioning devices correspond to personnel or devices with different tasks, their activity trajectories have a large gap, for example, some stay in a certain position for a long time and rarely move, for such positioning devices, as long as there is a usable broadcast site nearby, the historical daily stay time of such broadcast site will be longer, for example, if the positioning device works for 24 hours without interruption, the historical daily stay time of the broadcast site serving it is 24 hours. For some positioning devices, they are in a moving state for a long time, and for such positioning devices, they often pass through multiple broadcast sites, so in this case, the time that the broadcast site can serve all positioning devices can be used as an index to evaluate its importance to the upgrade of the positioning devices as a whole. In summary, neither the historical daily stay time nor the historical stay time sum can represent the comprehensive importance coefficient of a broadcast site, and both parameters should be considered comprehensively.

[0057] Suppose there are three broadcast sites numbered 001, 002 and 003.

[0058] For example, for the broadcast site numbered 001, the positioning device numbered 1 has the longest historical daily stay time of 25 minutes in all devices at the broadcast site, for the broadcast site numbered 002, the positioning device numbered 2 has the longest historical daily stay time of 16 minutes in all positioning devices at the broadcast site, and for the broadcast site numbered 003, the positioning device numbered 3 has the longest historical daily stay time of 4 minutes in all positioning devices at the broadcast site, then the first importance coefficients of the broadcast sites numbered 001, 002 and 003, α001, α002 and α003, are the square roots of the time in minutes, which are 5, 4 and 2, respectively, decreasing in turn.

[0059] For example, for the broadcast site numbered 001, the total historical daily stay time of all positioning devices at the broadcast site is 4 hours, for the broadcast site numbered 002, the total historical daily stay time of all positioning devices at the broadcast site is 9 hours, and for the broadcast site numbered 003, the total historical daily stay time of all positioning devices at the broadcast site is 1 hour, then the second importance coefficients β002, β001, β003 of the broadcast sites numbered 002, 001, 003 are the square roots of the time in hours, i.e. 3, 2, and 1, which decrease in turn.

[0060] Step S1023, normalize the first importance coefficients and the second importance coefficients, and obtain the comprehensive importance coefficients of each broadcast site according to the sum of the normalized first importance coefficients and second importance coefficients.

[0061] The normalization is performed in the minimum-maximum normalization manner. Taking the broadcast site numbered 001 as an example, the minimum value of the first importance coefficients is 2 and the maximum value is 5, and a001 is normalized to 1; the minimum value of the second importance coefficients is 1 and the maximum value is 3, and β001 is normalized to 0.5. Therefore, the comprehensive importance coefficient of the broadcast site numbered 001 is a001+β001=1.5.

[0062] According to the above method, the comprehensive importance coefficients of each broadcast site are obtained to allocate the differential package, which can take into account the upgrade needs of the single positioning device and all the positioning devices.

[0063] In some preferred embodiments, in order to reasonably allocate the differential package, in the step S102, the differential package required for the firmware upgrade is sent to each broadcast site, wherein the size of the differential package allocated to each broadcast site is positively correlated with the comprehensive importance coefficient, and the method comprises: For the broadcast site with a comprehensive importance coefficient greater than or equal to a first threshold value, the number of allocated differential packages accounts for at least A1% of the total number of differential packages; preferably, the broadcast site is a first type of broadcast site, and the number accounts for 25%.

[0064] For the broadcast site with a comprehensive importance coefficient greater than or equal to a second threshold value and less than the first threshold value, the number of allocated differential packages accounts for A3%-A2%; preferably, the broadcast site is a second type of broadcast site, and the number accounts for 50%. For the broadcast site with a comprehensive importance coefficient less than the second threshold value, the number of allocated differential packages is less than A4%; preferably, the broadcast site is a third type of broadcast site, and the number accounts for 25%.

[0065] Wherein, A1>A2>A3>A4, and the content of the larger number of differential packets includes the content of the smaller number of differential packets.

[0066] In some preferred embodiments, A1 is 100, A2 is 75, A3 is 50, and A4 is 25. That is, the first type of broadcast site that obtains complete differential packets accounts for 25% of all broadcast sites, the second type of broadcast site that obtains more than half, i.e., 50%-75%, of the differential packets accounts for 50% of all broadcast sites, and the third type of broadcast site that obtains fewer differential packets accounts for 25% of all broadcast sites. In this way, the first type of broadcast site can ideally complete the transmission of differential packets independently, the second type of broadcast site is slightly inferior to the first type of broadcast site in terms of comprehensive importance, and the allocation of more than half of the differential packets is generally sufficient to serve as a supplement to the first type of broadcast site. The third type of broadcast site has the lowest comprehensive importance in theory, and the allocation of fewer differential packets serves as a source of differential packets when the first type of broadcast site and the second type of broadcast site fail to complete the upgrade.

[0067] In some preferred embodiments, in step S104, the broadcast site, in response to receiving the upgrade instruction, broadcasts the differential packets allocated thereto through Bluetooth, including: In step S1041, during the broadcasting process, the position information of the positioning device is obtained. In step S1042, the subsequent movement direction of the positioning device is predicted according to the position information combined with the historical daily trajectory, and another broadcast site connected with the currently interacting broadcast site in the subsequent movement direction is determined as a standby broadcast site. In step S1043, in response to the positioning device entering the overlapping area of the signal transmission of the standby broadcast site and the currently interacting broadcast site, if the positioning device has not completed the reception of all differential packets at this time, the positioning device sends an upgrade instruction to the standby broadcast site.

[0068] Through the above method, the broadcast site can be switched in time in the case of the movement of the positioning device receiving differential packets, and transmission interruption can be avoided.

[0069] In some preferred embodiments, before the positioning device sends an upgrade instruction to the standby broadcast site in step S1043, it includes: Identifying whether the differential packets that the positioning device has not received exist in the currently interacting broadcast site and the standby broadcast site: If they exist only in the currently interacting broadcast site, the currently interacting broadcast site shares the differential packets that have not been received to the standby broadcast site. If they do not exist in both, the differential packets that have not been received are sent to the standby broadcast site through the cloud.

[0070] The above situation is for some positioning devices with high moving speed, which cannot independently complete the reception of all differential packages at any broadcast station, and needs to switch the broadcast station during the moving process, especially the situation of switching from the first type of broadcast station to the second type of broadcast station or the third type of broadcast station, or switching from the second type of broadcast station to the third type of broadcast station, and the differential packages in the standby broadcast station are less than the current interactive broadcast station at the initial allocation. For example, in an ideal case, if the first type of broadcast station fails to complete the transmission of all differential packages, the second type of broadcast station and the third type of broadcast station can more accurately continue to broadcast the missing differential packages according to the above method.

[0071] Based on the same inventive concept as the above method embodiments, the embodiments of the present application also provide a device for batch positioning device firmware, as shown in Figure 2 The device comprises: An importance determination module is configured to determine a comprehensive importance coefficient of each broadcast station in transmitting the upgrade firmware task to the positioning device; wherein the broadcast station is pre-set in the active range of the positioning device; A differential package allocation module is configured to send the differential packages required for the firmware upgrade to each broadcast station, wherein the size of the differential packages allocated to each broadcast station is positively correlated with the comprehensive importance coefficient; An upgrade module is configured to broadcast firmware upgrade notification information by the broadcast station through Bluetooth, so that the positioning device sends an upgrade instruction to the corresponding broadcast station of the firmware upgrade notification through UWB according to the received firmware upgrade notification information when the positioning device judges that the upgrade condition is met; A broadcast module is configured to broadcast the differential packages allocated to the broadcast station through Bluetooth in response to receiving the upgrade instruction.

[0072] It should be noted that although several units or sub-units of the device are mentioned in the above detailed description, such division is only exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided into multiple units.

[0073] Based on the same inventive concept as the above method embodiments, the embodiments of the present application also provide an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to enable the electronic device to implement the control method in the above embodiments.

[0074] In an embodiment, the electronic device can be a server, and in this embodiment, the structure of the electronic device can be as shown inFigure 3 As shown, the server includes a memory 2001, a communication module 2003, and one or more processors 2002.

[0075] The memory 2001 is configured to store computer programs executed by the processor 2002. The memory 2001 can mainly include a program storage area and a data storage area. The program storage area can store an operating system and programs required for running instant messaging functions, etc. The data storage area can store various instant messaging information and operation instruction sets, etc.

[0076] The memory 2001 can be a volatile memory such as a random-access memory (RAM), or a non-volatile memory such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or any other medium capable of carrying or storing desired computer programs in the form of instructions or data structures and capable of being accessed by a computer, but is not limited thereto. The memory 2001 can be a combination of the above memories.

[0077] The processor 2002 can include one or more central processing units (CPUs) or digital processing units, etc. The processor 2002 is configured to invoke the computer programs stored in the memory 2001 to implement the above-mentioned audio data processing method.

[0078] The communication module 2003 is configured to communicate with terminal devices and other servers.

[0079] The specific connection medium between the above-mentioned memory 2001, communication module 2003 and processor 2002 is not limited in the embodiments of the present application. In the embodiments of the present application, Figure 3 the memory 2001 and the processor 2002 are connected through a bus 2004. The bus 2004 is described by an arrow in Figure 3 the embodiments of the present application, and the connection mode between other components is only schematically described and is not limited thereto. The bus 2004 can be divided into an address bus, a data bus, a control bus, etc. For the convenience of description, Figure 3 only one arrow is described in the embodiments of the present application, but it is not described that there is only one bus or only one type of bus.

[0080] Based on the same inventive concept as the above-described method embodiments, embodiments of the present invention also provide a computer-readable storage medium for storing a computer program. When the computer program is run on a computer, it enables the electronic device to implement the control method described in the above embodiments. The computer-readable storage medium can be a readable signal medium or a readable storage medium. A readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.

[0081] Based on the same inventive concept as the above-described method embodiments, embodiments of the present invention also provide a computer program product, which includes a computer program that, when run on an electronic device, causes the electronic device to perform the steps of the control methods described above according to various exemplary embodiments of this application. The program product may take the form of any combination of one or more readable media. These computer program commands can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the commands executed by the processor of the computer or other programmable data processing device generate a process for implementing... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0082] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

Claims

1. A method for batch upgrading device firmware, characterized in that, a plurality of broadcast sites are set in the active range of the positioning device, and the comprehensive importance coefficient of each broadcast site in transmitting the upgrading firmware task to the positioning device is determined; the differential package required for firmware upgrading is sent to each broadcast site, wherein the size of the differential package allocated to each broadcast site is positively correlated with the comprehensive importance coefficient; the broadcast site broadcasts firmware upgrade notification information through Bluetooth, so that the positioning device judges whether to send an upgrade instruction to the corresponding broadcast site of the firmware upgrade notification through UWB according to the received firmware upgrade notification information when it meets the upgrading condition; the broadcast site broadcasts the differential package allocated to it through Bluetooth in response to receiving the upgrade instruction.

2. The method of claim 1, wherein, The plurality of broadcast sites are set in the active range of the positioning device, comprising: obtaining a map in the active range of the positioning device and the historical daily trajectory of each positioning device; selecting several as broadcast sites in the overlapping points formed by the historical daily trajectories of all positioning devices and marking them on the map, wherein the total area of the signal transmission areas of all broadcast sites superimposed covers at least part of the historical daily trajectory of each positioning device, and at least part of the historical daily trajectory of each positioning device respectively passes through the coverage ranges of two broadcast sites; obtaining the topological structure between each broadcast site in combination with the map and marking each node according to the connection relationship on the topological structure, wherein the nodes of the topological structure represent the broadcast sites, and the connection lines between two nodes represent that the two broadcast sites are connected on the map without passing through other broadcast sites; According to the topological structure, the signal strength of the broadcast sites corresponding to the two nodes of any connection line is set so that there is an overlapping area in the signal transmission areas of the two broadcast sites.

3. The method of claim 2, wherein, The comprehensive importance coefficient of each broadcast site in transmitting the upgrading firmware task to the positioning device is determined, comprising: obtaining the historical daily stay time corresponding to each positioning device in the signal transmission area of each broadcast site and the total historical daily stay time of all positioning devices; According to the longest time in the historical daily stay time, a first importance coefficient is positively assigned to each broadcast site, and a second importance coefficient is positively assigned to each broadcast site according to the total historical stay time; The first importance coefficient and the second importance coefficient are normalized, and the comprehensive importance coefficient of each broadcast site is obtained according to the sum of the normalized first importance coefficient and second importance coefficient.

4. The method of claim 3, wherein, The differential package required for firmware upgrading is sent to each broadcast site, wherein the size of the differential package allocated to each broadcast site is positively correlated with the comprehensive importance coefficient, comprising: For broadcast sites with a comprehensive importance coefficient greater than or equal to a first threshold value, the number of differential packages allocated is at least A1% of the total number of differential packages; For broadcast sites with a comprehensive importance coefficient greater than or equal to a second threshold value and less than the first threshold value, the number of differential packages allocated is A3%-A2%; For broadcast sites with a comprehensive importance coefficient less than the second threshold value, the number of differential packages allocated is less than A4%. Wherein, A1>A2>A3>A4, and the content of the larger number of differential packets includes the content of the smaller number of differential packets.

5. The method of claim 4, wherein, The broadcast station, in response to receiving the upgrade instruction, broadcasts the differential packets allocated thereto through Bluetooth, including: During the broadcasting, obtaining position information of the positioning device; According to the position information and historical daily trajectory, predicting the subsequent moving direction of the positioning device, and determining another broadcast station having a connection with the currently-interacted broadcast station in the subsequent moving direction as a standby broadcast station; In response to the positioning device entering the overlapping area of signal transmission of the standby broadcast station and the currently-interacted broadcast station, if the positioning device has not completed the reception of all differential packets at this time, the positioning device sends an upgrade instruction to the standby broadcast station.

6. The method of claim 5, wherein, Before the positioning device sends the upgrade instruction to the standby broadcast station, including: Identifying whether the differential packets not received by the positioning device exist in the currently-interacted broadcast station and the standby broadcast station: If only the currently-interacted broadcast station has the differential packets not received, the currently-interacted broadcast station shares the differential packets not received to the standby broadcast station; If neither of them has the differential packets not received, the differential packets not received are sent to the standby broadcast station through the cloud.

7. The method according to any one of claims 1 to 6, characterized in that, The broadcasting of the differential packets allocated thereto through Bluetooth, including: Dividing the differential packets to be broadcast into a plurality of data groups, and sending each data group for N times before sending the next data group.

8. An apparatus for batch upgrading of device firmware, characterized in that, an importance determination module for determining a comprehensive importance coefficient of each broadcast station in transmitting an upgrade firmware task to a positioning device; wherein the broadcast station is pre-set in an active range of the positioning device; a differential packet allocation module for sending differential packets required for firmware upgrade to each broadcast station, wherein the size of the differential packets allocated to each broadcast station is positively correlated with the comprehensive importance coefficient; an upgrade module for broadcasting firmware upgrade notification information through Bluetooth by the broadcast station, so that the positioning device sends an upgrade instruction to the broadcast station corresponding to the firmware upgrade notification through UWB according to the received firmware upgrade notification information when the positioning device judges that the upgrade condition is met; a broadcast module for the broadcast station to broadcast the differential packets allocated thereto through Bluetooth in response to receiving the upgrade instruction.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program, so that the electronic device implements the method of any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium is used to store a computer program, when the computer program runs on a computer, so that the computer executes the method of any one of claims 1 to 7.