Communication module remote upgrading method and system

By dividing the complete data packets of the communication module into sub-data packets, and partitioning and time window selections are made according to the network status and its own working status, the efficiency and reliability problems of large-scale remote upgrades of communication modules in the Internet of Things are solved, and an efficient and flexible upgrade process is achieved.

CN119892616AInactive Publication Date: 2025-04-25MICRONET UNION TECH (CHENGDU) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510361543.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-04-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the Internet of Things, how to quickly and accurately complete the remote upgrade of a large number of communication modules within the right time to ensure normal functions and reduce maintenance costs.

Method used

By acquiring the complete data packet and dividing it into multiple individually executable sub-packets, partitioning according to the networking status of the communication module, and selecting the seed device to download the sub-packet. The module to be upgraded determines the upgrade time window based on its own status to ensure that the upgrade is performed when the network connection is good and does not affect normal functions.

Benefits of technology

It realizes the efficiency, reliability and flexibility of remote upgrade of communication modules, improves firmware upgrade efficiency, enhances the system's fault tolerance capabilities, and reduces the impact on the normal operation of communication modules.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892616A_ABST
    Figure CN119892616A_ABST
Patent Text Reader

Abstract

The invention provides a remote upgrading method and system for a communication module, and relates to the technical field of communication, and the method comprises the steps: obtaining a complete data package needed for upgrading, and dividing the complete data package into a plurality of sub-data packages which can be independently executed; partitioning the communication module to be upgraded according to the networking state of the communication module to be upgraded; determining a seed device of each partition according to a network connection state between the communication module in each partition and the central server, and downloading all sub-data packets from the central server by the seed device; each to-be-upgraded communication module determines a sub-data packet required for completing upgrading according to the current equipment condition; each to-be-upgraded communication module determines an upgrading time window according to the working state of the to-be-upgraded communication module; and when the upgrading time window is reached, the communication module to be upgraded obtains a sub-data packet required by upgrading from the seed equipment according to the current network connection state. According to the invention, high efficiency, reliability and flexibility of the remote upgrading process of the communication module are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a communication module remote upgrade method and system. Background Art

[0002] A communication module refers to an integrated electronic component that is designed to enable data transmission between devices. Such modules usually contain the necessary hardware and software to support specific communication protocols or standards. In the Internet of Things (IoT), communication modules play a vital role. As a bridge connecting the physical world and the digital world, it enables different types of devices to communicate with each other and access the Internet. The demand for remote upgrades (OTA, Over-The-Air Updates) of communication modules mainly appears in scenarios where it is necessary to keep device software and firmware up to date and ensure security and functionality. By implementing a remote upgrade mechanism, not only can the system flexibility and responsiveness be improved, but maintenance costs can also be reduced and the service life of the equipment can be extended. In addition, remote upgrades are also one of the important means to ensure device security and can help resist new network security threats.

[0003] In the current Internet of Things, there are many large-scale deployment scenarios for the same type of online devices. When the communication modules of these large numbers of devices need to be upgraded at the same time, it is necessary to quickly and accurately complete the remote upgrade of all devices within a suitable time and while keeping the communication modules functioning normally.

[0004] Therefore, how to provide a more efficient communication module remote upgrade method is a problem that needs to be solved urgently. Summary of the invention

[0005] In order to improve the above problems, the present invention provides a communication module remote upgrade method and system.

[0006] According to a first aspect of an embodiment of the present invention, a communication module remote upgrade method is provided, the method comprising: Obtaining a complete data packet required for upgrading, and dividing the complete data packet into a plurality of sub-data packets that can be executed separately; Partition the communication modules to be upgraded according to their networking status; According to the network connection status between the communication module in each partition and the central server, the seed device of each partition is determined, and the seed device downloads all sub-data packets from the central server; Each communication module to be upgraded determines the sub-data package required to complete the upgrade according to the current device status; Each communication module to be upgraded determines the upgrade time window according to its own working status; When the upgrade time window is reached, the communication module to be upgraded obtains the sub-data packets required for the upgrade from the seed device according to the current network connection status.

[0007] Optionally, the step of dividing the complete data packet into a plurality of independently executable sub-data packets specifically includes: Get the functional units of the communication module involved in this upgrade; According to the division of functional units, the complete data packet is divided into multiple sub-data packets, and each sub-data packet can be used separately for upgrading the corresponding functional unit; Add metadata for identifying relevant information of each segmented sub-data packet.

[0008] Optionally, the step of adding metadata for identifying relevant information of each segmented sub-data packet specifically includes: For multiple sub-data packages that have a necessary execution order when performing the upgrade, metadata for identifying the execution order is added.

[0009] Optionally, the step of partitioning the communication module to be upgraded according to the networking state of the communication module to be upgraded specifically includes: Obtain the network connection information of the communication module to be upgraded, and determine the subnet or routing node to which each communication module belongs; Group devices belonging to the same subnet or routing node into the same partition.

[0010] Optionally, the network connection status includes uplink and downlink bandwidth, network delay and packet loss rate, and the step of determining the seed device of each partition according to the network connection status between the communication module in each partition and the central server specifically includes: Obtain the storage space of the device where the communication module is located, and filter out the device whose storage space is greater than the sum of the sizes of all sub-packets; For the selected devices, score the uplink and downlink bandwidth, network delay and packet loss rate between their communication modules and the central server according to the preset scoring rules; According to the total number of communication modules included in the partition, one or more devices with the highest scores are selected as seed devices of the partition.

[0011] Optionally, the step of each communication module to be upgraded determining an upgrade time window according to its own working state specifically includes: Obtaining the historical working status of the communication module to be upgraded, wherein the historical working status includes historical network traffic conditions, historical signal strength, and historical key task periods; A time period in which the signal strength reaches a signal strength threshold, the available flow is greater than the sub-packet required for the upgrade, and does not overlap with the critical task period is determined as the upgrade time window.

[0012] Optionally, the step of the communication module to be upgraded acquiring the sub-data package required for the upgrade from the seed device according to the current network connection state specifically includes: The communication module to be upgraded obtains metadata of all sub-data packages and determines the sub-data packages required for the upgrade according to the current firmware version; The communication module to be upgraded obtains the network connection status between the seed device in the partition where it is located, and determines whether it supports downloading the sub-data package required for the upgrade; If supported, the sub-data package required for the upgrade is obtained from the current seed device; If not supported, continue to search for other seed devices that support downloading the sub-data packages required for the upgrade.

[0013] Optionally, the step of the communication module to be upgraded acquiring the sub-data package required for the upgrade from the seed device according to the current network connection state specifically includes: If no other seed device that supports downloading all sub-packets required for the upgrade can be found, the number of sub-packets that can be downloaded is calculated based on the network connection status with the current seed device, and the corresponding number of sub-packets are obtained from the current seed device.

[0014] Optionally, the step of the communication module to be upgraded acquiring the sub-data package required for the upgrade from the seed device according to the current network connection state specifically includes: If no other seed device that supports downloading the sub-data package required for the upgrade can be found, then the communication module in the partition that has completed the sub-data package download is searched; Download the sub-data package required for the upgrade from the device where the communication module is located.

[0015] A second aspect of an embodiment of the present invention provides a communication module remote upgrade system, including: A data segmentation unit, used for obtaining a complete data packet required for upgrading, and segmenting the complete data packet into a plurality of sub-data packets that can be executed separately; A module partitioning unit, used to partition the communication modules to be upgraded according to the networking status of the communication modules to be upgraded; A seed determination unit, used to determine the seed device of each partition according to the network connection status between the communication module in each partition and the central server, and the seed device downloads all sub-data packets from the central server; A difference determination unit, used for each communication module to be upgraded to determine the sub-data package required to complete the upgrade according to the current device status; A window determination unit, used for each communication module to be upgraded to determine an upgrade time window according to its own working state; The data acquisition unit is used for obtaining the sub-data packets required for the upgrade from the seed device according to the current network connection status when the upgrade time window is reached.

[0016] In summary, the present invention provides a communication module remote upgrade method and system, which ensures the efficiency, reliability and flexibility of the communication module remote upgrade process through scientific and reasonable partitioning strategy, efficient seed device selection, flexible time window arrangement and reliable sub-packet acquisition method. This method not only improves the efficiency of firmware upgrade, but also enhances the fault tolerance of the system, minimizes the impact on the normal operation of the communication module, and is particularly suitable for batch remote upgrade of communication modules in large-scale deployment scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0018] Figure 1 A method flow chart of a remote upgrade method for a communication module according to an embodiment of the present invention; Figure 2 The figure is a functional module block diagram of a remote upgrade system for a communication module according to an embodiment of the present invention.

[0019] Reference numerals: Data segmentation unit 110; module partitioning unit 120; seed determination unit 130; difference determination unit 140; window determination unit 150; data acquisition unit 160. DETAILED DESCRIPTION

[0020] In the current Internet of Things, there are many large-scale deployment scenarios for the same type of online devices. When the communication modules of these large numbers of devices need to be upgraded at the same time, it is necessary to quickly and accurately complete the remote upgrade of all devices within a suitable time and while keeping the communication modules functioning normally.

[0021] Therefore, how to provide a more efficient communication module remote upgrade method is a problem that needs to be solved urgently.

[0022] In view of this, the designers of the present invention have designed a communication module remote upgrade method and system.

[0023] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0024] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. 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.

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

[0026] In the description of the present invention, it should be noted that the terms "top", "bottom", "inside", "outside", etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the invented product is usually placed when in use, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.

[0027] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0028] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.

[0029] A communication module remote upgrade method provided in this embodiment will be specifically described below.

[0030] See also Figure 1 , this embodiment provides a communication module remote upgrade method, the method comprising: Step S101, obtaining a complete data packet required for upgrading, and dividing the complete data packet into a plurality of sub-data packets that can be executed separately.

[0031] When the communication module needs to upgrade its firmware, the development team usually uploads the complete data packet to the central server first, and then the central server distributes the complete data packet to the devices where each communication module is located to complete the corresponding upgrade operation. The purpose of the communication module's firmware upgrade mainly includes fixing vulnerabilities, adding new functions or improving performance, etc. The size of the corresponding complete data packet is related to the specific upgrade operation performed. When there are many upgrade contents involved, the file size of the complete data packet required for the upgrade may be large, which will cause the device where the communication module is located to download the complete data packet from the central server. It needs to occupy sufficient bandwidth or traffic resources. Therefore, the complete data packet can be divided into multiple separately executable sub-data packets. Different communication modules to be upgraded have different current firmware versions, so the sub-data packets required for the upgrade are also different. The communication modules to be upgraded can only download the required sub-data packets according to the needs.

[0032] Specifically, as a preferred embodiment of the present invention, step S101 specifically includes: Get the functional units of the communication module involved in this upgrade; According to the division of functional units, the complete data packet is divided into multiple sub-data packets, and each sub-data packet can be used separately for upgrading the corresponding functional unit; Add metadata for identifying relevant information of each segmented sub-data packet.

[0033] The complete data packet is divided into multiple sub-data packets according to the functional units involved in the upgrade, so that each sub-data packet corresponds to the upgrade of a functional unit. After downloading a sub-data packet, the communication module can upgrade the corresponding functional unit based on the downloaded sub-data packet.

[0034] It should be noted that in order to ensure that each sub-packet obtained by segmentation can be executed independently, each sub-packet should contain sufficient information to enable independent execution when segmenting, and this information can be added in the form of metadata. Specifically, the metadata may include: version number, which identifies which firmware version the sub-packet belongs to; offset, which indicates the starting position of the sub-packet in the complete firmware package; length, which indicates the length (number of bytes) of the sub-packet; hash value, which is used to verify the integrity of the sub-packet.

[0035] At the same time, in order to improve the integrity of the transmission of the sub-data packet, as a preferred approach, a check code may be added to each sub-data packet so that the receiving device can verify its integrity after receiving the sub-data packet.

[0036] It should be noted that when performing an upgrade, the upgrade operation of the functional unit may not be completely independent, that is, the upgrade operation of some functional units must rely on other functional units, which requires that these functional units must be upgraded in a certain order. Specifically, as a preferred embodiment of the present invention, for multiple sub-data packets that have a necessary order of execution when performing the upgrade, metadata for identifying the order of execution is added.

[0037] In actual implementation, mature differential upgrade tools currently on the market can be used to split the complete data packet, such as bsdiff, bspatch or xdelta.

[0038] After the segmentation is completed, a sub-data package list file can be generated to list the information of all sub-data packages, and the generated list file can be uploaded to the central server for the device to download and parse. At the same time, an upgrade notification is sent to all target devices configured with the communication module to be upgraded, including the version number of the new firmware, the URL of the list file and other information.

[0039] Step S102: partitioning the communication module to be upgraded according to the networking status of the communication module to be upgraded.

[0040] Executing the partitioning strategy helps improve data transmission efficiency and reduce delays and bandwidth consumption caused by cross-zone transmission. Since the communication module is usually in a networking state during operation, partitioning is performed based on the networking state of the communication module to be upgraded.

[0041] Specifically, as a preferred embodiment of the present invention, step S102 specifically includes: Obtain the network connection information of the communication module to be upgraded, and determine the subnet or routing node to which each communication module belongs; Group devices belonging to the same subnet or routing node into the same partition.

[0042] By obtaining the network connection information of the communication module to be upgraded, the network topology (such as subnet, router, etc.) between the communication modules to be upgraded is obtained, and then partitioning is performed according to the network topology. Through this partitioning method, local network resources are utilized, cross-network data transmission is reduced, and transmission efficiency is improved.

[0043] It should be noted that, as other implementations of the present invention, partitioning can also be performed by means of geographic information, device status, etc., or by combining multiple partitioning methods and comprehensively considering multiple factors to perform partitioning.

[0044] Specifically, in the geographic location-based zoning method, devices are divided into different geographic areas according to their geographic locations. For example, they can be divided by city, block or building complex. In the device status-based method, devices are divided into different priority groups according to the device's workload, power status and key task priority. Ensure that high-priority devices are upgraded first to avoid affecting key businesses. For example, based on the device's load, power and task priority, devices are divided into high-priority group, medium-priority group and low-priority group. Devices in the high-priority group are upgraded first, followed by the medium-priority group, and finally the low-priority group. In the comprehensive factor zoning method, devices can be initially partitioned according to geographic location and network topology. Within each partition, priority groups can be further subdivided according to device status. Finally, partition boundaries are dynamically adjusted to optimize according to real-time network conditions and device status changes.

[0045] After the partitioning is completed, the partitioning results are also published to the central server for the devices to download and analyze. At the same time, the central server sends the partitioning information to all target devices configured with the communication module to be upgraded, informing them of the partitions they belong to.

[0046] Step S103, determining the seed device of each partition according to the network connection status between the communication module in each partition and the central server, and having the seed device download all sub-data packets from the central server.

[0047] The network connection status includes upstream and downstream bandwidth, network delay, and packet loss rate.

[0048] Identifying the seed device within each partition is a key step to ensure efficient batch upgrades of communication modules. The seed device will download all sub-data packets from the central server and share these data blocks with other devices in the P2P network, thereby reducing the pressure on the central server and speeding up the entire upgrade process.

[0049] As a preferred embodiment of the present invention, step S103 specifically includes: Obtain the storage space of the device where the communication module is located, and filter out the device whose storage space is greater than the sum of the sizes of all sub-packets; For the selected devices, score the uplink and downlink bandwidth, network delay and packet loss rate between their communication modules and the central server according to the preset scoring rules; According to the total number of communication modules included in the partition, one or more devices with the highest scores are selected as seed devices of the partition.

[0050] The selection of seed devices is mainly considered from two aspects. One aspect is the basic properties of the device, that is, whether the device has enough storage space to cache all sub-data packets. The other is the network connection status between the communication module on the device and the central server. Devices with better network quality are selected as seed devices. When evaluating the network connection status, you can consider the uplink and downlink bandwidth, network delay, and packet loss rate. Devices with higher uplink bandwidth are preferred as seed devices so that they can quickly distribute data blocks to other devices; devices with lower network delays with the central server and other devices are preferred to reduce the time of data transmission; devices with stable network connections and low packet loss rates are preferred to ensure the reliability of data transmission. When comprehensively considering these three factors, the weighted equal division method can be used. Based on the specific situation of each factor, different weights are assigned according to the importance of each factor, and each device is scored separately, and the device with the highest score is selected as the seed device.

[0051] It should be noted that, since the bandwidth of each communication module is limited to a certain extent, when the total number of communication modules included in a partition is large, multiple devices with the highest scores can be selected as seed devices of the partition.

[0052] As a preferred implementation, when selecting a seed device, the continuous online time may also be considered as one of the factors, and devices that can remain online for a long time are given priority to ensure that sufficient upgrade time windows can be provided for other devices.

[0053] As a preferred implementation, in order to improve reliability, a certain number of seed devices can be additionally selected in each partition as redundant backups. If a seed device in a partition fails or goes offline, the redundant backup seed devices can continue to provide support.

[0054] As a preferred implementation, the selection results of the seed devices can be evaluated regularly, especially when the number of devices, locations or network topology changes. Based on the evaluation results, the seed devices can be reselected if necessary to adapt to the new network environment and device status.

[0055] After determining the seed device for each partition, the selected seed device information is published to the central server for the device to download and parse. The central server sends a list of seed devices to all target devices to inform them of the seed devices corresponding to the partition they belong to.

[0056] Step S104: Each communication module to be upgraded determines the sub-data package required to complete the upgrade according to the current device status.

[0057] The communication module to be upgraded determines the sub-data package required to complete the upgrade by comparing the difference between the local firmware version and the target version.

[0058] Specifically, after obtaining the sub-data package list file through the central server, the difference between the current functional unit of the communication module and the upgrade target is compared to determine which functional units need to be upgraded, and then confirm the sub-data packages and metadata information of the sub-data packages required to complete the upgrade.

[0059] Step S105: Each communication module to be upgraded determines an upgrade time window according to its own working status.

[0060] Each device determines a suitable upgrade time window based on its own network traffic, signal strength, and critical mission time period. This approach ensures that the upgrade can be performed without affecting the normal function of the device.

[0061] Specifically, the above step S105 specifically includes: Obtaining the historical working status of the communication module to be upgraded, wherein the historical working status includes historical network traffic conditions, historical signal strength, and historical key task periods; A time period in which the signal strength reaches a signal strength threshold, the available flow is greater than the sub-packet required for the upgrade, and does not overlap with the critical task period is determined as the upgrade time window.

[0062] The historical network traffic can be used to understand the time periods when the communication module to be upgraded has sufficient available traffic for obtaining sub-packets. The available traffic can be calculated based on the instantaneous idle traffic and the length of the time period.

[0063] The historical signal strength can be used to understand the time periods when the communication module to be upgraded has better data transmission stability. The historical critical task time periods can be used to understand the time periods when the communication module to be upgraded is performing critical tasks, so that the upgrade can be performed during the critical task period to ensure that the critical tasks are not interfered with.

[0064] As a preferred implementation, factors such as the load condition and power status of the device where the communication module to be upgraded is located may also be used as selection conditions for the upgrade time window.

[0065] When determining the upgrade time window, based on the selection conditions to be considered and the historical data obtained, the situation of the communication module to be upgraded in the future is predicted, and a dynamic scheduling algorithm (such as a greedy algorithm, a genetic algorithm, etc.) or a weighted average scoring method is used to determine the appropriate time period as the upgrade time window.

[0066] It should be noted that there may be multiple upgrade time windows obtained through the above process. Usually, the upgrade time window closest to the current time point is used for upgrading. However, in actual applications, in addition to considering the upgrade time window of the communication module to be upgraded, the actual situation of the seed device must also be considered. Only when both conditions are met at the same time, the acquisition of sub-data packets will be started.

[0067] Step S106: When the upgrade time window is reached, the communication module to be upgraded obtains the sub-data package required for the upgrade from the seed device according to the current network connection status.

[0068] When the time reaches the scheduled upgrade time window, the communication module to be upgraded will start to obtain the sub-data packets required for the upgrade from the seed device. At this time, the communication module needs to make a judgment again on whether the current conditions support the upgrade. The specific judgment includes two aspects: one is to judge whether the seed device is in a normal online state, and the other is to judge whether the sub-data packets required for the upgrade can be successfully downloaded based on the current network connection status with the seed device.

[0069] Specifically, as a preferred method, the above step S106 specifically includes: The communication module to be upgraded obtains metadata of all sub-data packages and determines the sub-data packages required for the upgrade according to the current firmware version; The communication module to be upgraded obtains the network connection status between the seed device in the partition where it is located, and determines whether it supports downloading the sub-data package required for the upgrade; If supported, the sub-data package required for the upgrade is obtained from the current seed device; If not supported, continue to search for other seed devices that support downloading the sub-data packages required for the upgrade.

[0070] When it is determined that the sub-data package required for the upgrade can be obtained from the current seed device, a sub-data package request is sent to the seed device. The request should contain the file name and hash value of the required sub-data package so that the seed device can confirm and provide the correct sub-data package. After receiving the request, the seed device starts to transmit the data blocks of the required sub-data package to the communication module. The communication module gradually receives these data blocks and stores them locally. After receiving each data block, the communication module uses the pre-provided hash value for integrity verification to ensure that the data has not been tampered with.

[0071] When a partition has multiple seed devices, if the current seed device is unavailable, then find other seed devices that can support downloading the sub-data packages required for the upgrade based on the seed device status and network connection status. If found, then download from the found seed device.

[0072] If it cannot be found, as a preferred implementation, the above step S106 specifically further includes: If no other seed device that supports downloading all sub-packets required for the upgrade can be found, the number of sub-packets that can be downloaded is calculated based on the network connection status with the current seed device, and the corresponding number of sub-packets are obtained from the current seed device.

[0073] If all required sub-packets cannot be downloaded within the current upgrade time window, the number of sub-packets that can actually be downloaded and the corresponding sub-packet information can be estimated based on the current network connection status, and these sub-packets can be downloaded within the current upgrade time window. Other sub-packets will wait until the next upgrade time window arrives, and continue to select appropriate seed devices for download until all required sub-packets are downloaded. It should be noted that if there are sub-packets with a clear upgrade order among all required sub-packets, the sub-packets in front will be downloaded first in this order.

[0074] In addition to the above situation, in actual application, there may be a situation where there is no available seed device in the current partition. In this case, the download of the required sub-data package can be continued from other communication modules that have completed the download of all sub-data packages. Specifically, as a preferred implementation, the above step S106 specifically includes: If no other seed device that supports downloading the sub-data package required for the upgrade can be found, then the communication module in the partition that has completed the sub-data package download is searched; Download the sub-data package required for the upgrade from the device where the communication module is located.

[0075] It should be noted that, since the sub-data packages required for upgrading each communication module may be different, it may be necessary to find multiple different communication modules at the same time and download different sub-data packages from them respectively.

[0076] After downloading the sub-data packets, the communication module can be upgraded in two different ways. One is to wait for all the sub-data packets required for the upgrade to be downloaded, and then wait for the current device to enter a low-load period before executing the upgrade operation of all the sub-data packets. The other is to first determine whether the downloaded sub-data packets need to wait for other sub-data packets to complete the upgrade operation before they can be executed after each sub-data packet is downloaded. If it does not need to wait for other sub-data packets to be downloaded, then after the current device enters a low-load period, the downloaded sub-data packets are upgraded first, and then executed in sequence until all the sub-data packets required for the upgrade are completed.

[0077] It should be noted that in order to ensure that the upgrade operation is carried out without affecting the normal operation of the communication module, a dual-zone storage and hot upgrade mechanism can be used to ensure that even if the data upgrade of this part fails, it can be quickly rolled back to a stable version without affecting normal operation.

[0078] The communication module remote upgrade method provided by the present invention is specifically described below through a specific case.

[0079] Suppose there is a large smart city project, which includes 100 smart street light controllers distributed in different areas. Each smart street light controller is equipped with a communication module. These controllers are distributed in multiple areas of the city, some areas use Wi-Fi, and some areas use cellular networks. These communication modules need to be regularly upgraded to fix vulnerabilities, add new features or improve performance. The remote upgrade method for the communication modules of all smart street light controllers is as follows: 1. Get the complete data packet and split it into sub-data packets; 1.1 The development team uploads the complete data package to the central server.

[0080] 1.2 Split the complete data packet; Use the tool to split the complete data package into multiple sub-data packages (such as network_module.bin, data_processing_module.bin, etc.) according to the upgraded content, and generate a unique hash value for each sub-data package.

[0081] Generates a manifest file that adds metadata information for all subpackets, including filename, hash, offset, and length.

[0082] 2. Partition the communication modules to be upgraded according to their networking status; 2.1 Collect network topology information; Geographic location: Collects the geographic location information (such as longitude and latitude) of all controllers.

[0083] Network Connection Status: Collects information about each controller's network connection status (Wi-Fi or cellular), bandwidth, latency, and stability.

[0084] 2.2 Divide into zones; The controllers are divided into different zones based on geographical location and network topology. The 100 controllers are divided into two zones (Zone A and Zone B), with 50 controllers in each zone.

[0085] 3. Determine the seed device for each partition based on the network connection status between the communication module in each partition and the central server; 3.1 Collect seed device information; Network performance evaluation: Network performance evaluation is performed on the controllers in each partition, including uplink and downlink bandwidth, latency, packet loss rate, etc.

[0086] Select a seed device: Based on the network performance evaluation results, select a controller with a stable network connection and high bandwidth as the seed device.

[0087] In area A, five controllers with stable network connections and high bandwidth were selected as seed devices; five seed devices were also selected in area B.

[0088] 3.2 Release the list of seed devices; Seed device list: Publish the selected seed device information to the central server for download and analysis by the communication modules of other controllers.

[0089] Notify controller: Send a list of seed devices to all target controllers through the central server, informing them of the partitions they belong to and their corresponding seed devices.

[0090] 4. Each communication module to be upgraded determines the upgrade time window according to its own working status; 4.1 Collect work status information; Network connection status: Get the current network connection status of the communication module (signal strength, packet loss rate, etc.).

[0091] Data transmission load: Monitors the current data transmission load of the communication module (uplink and downlink bandwidth usage).

[0092] Task queue length: Understand the current task queue length of the communication module and evaluate its processing pressure.

[0093] 4.2 Select the upgrade time window; Priority is given to low-load periods: Priority is given to upgrading during periods when the communication module data transmission load is low to avoid affecting normal communication services.

[0094] Priority is given to non-critical mission periods: Priority is given to upgrading during periods when the communication module has no critical tasks to be processed, ensuring that critical business is not disturbed.

[0095] Each communication module selects a different upgrade time window based on its own network connection status and data transmission load. For example, communication modules 1-10 in area A are upgraded at night from 23:00 to 23:20, and communication modules 11-20 are upgraded at night from 23:20 to 23:40; communication modules 51-60 in area B are upgraded at 02:30 to 02:50 in the morning.

[0096] 5. When the upgrade time window arrives, the communication module to be upgraded obtains the sub-data packets required for the upgrade from the available seed devices according to the current network connection status; 5.1 Get the list file; Download the manifest file: The communication module first downloads the manifest file containing all sub-packet information from the central server.

[0097] Analyze local firmware version: The communication module analyzes its current firmware version and compares it with the version in the manifest file to determine which sub-data packages need to be downloaded to complete the upgrade.

[0098] 5.2 Select the best seed equipment; Test network connection: The communication module performs a network connection test (such as a ping test) on each device in the seed device list to evaluate its network latency and stability.

[0099] Select the best seed device: According to the network connection test results, select the best seed device to download the sub-data package.

[0100] 5.3 Initiate a request and receive a sub-data packet; Establish connection: The communication module uses the IP address and port number of the selected seed device to establish a connection with the seed device.

[0101] Send Request: Send a sub-data package request to the seed device. The request should contain the file name and hash value of the required sub-data package.

[0102] Receiving data blocks: After receiving the request, the seed device starts to transmit the data blocks of the required sub-packets to the communication module. The communication module gradually receives these data blocks and stores them in a local temporary directory.

[0103] Verify integrity: After receiving each data block, the communication module uses the pre-provided hash value to perform integrity verification to ensure that the data has not been tampered with.

[0104] 6. Perform the upgrade; Back up old firmware: Before applying new firmware, the controller backs up the current old firmware so that it can roll back to a stable version if the upgrade fails.

[0105] Apply new firmware: The controller applies the new firmware package to the system, completing the firmware upgrade process.

[0106] Based on the above cases, it can be seen that the communication module remote upgrade method provided by the present invention has the following advantages: 1. Efficient data distribution; Partitioning and seed devices: The communication modules are partitioned according to the network topology and device status, and the optimal seed device is selected, which reduces the pressure on the central server and improves data transmission efficiency.

[0107] Intra-partition data exchange: Data is exchanged within the partition, making full use of local network resources and reducing the latency and bandwidth consumption caused by cross-zone transmission.

[0108] 2. Flexible time window selection; Time window selection based on working status: Select the best upgrade time window based on the working status of the communication module (such as network connection status, data transmission load, etc.) to avoid upgrading during high load or critical tasks to ensure that the business is not affected.

[0109] Dynamic adjustment: Real-time monitoring of the status of the communication module and dynamic adjustment of the upgrade time window enhance the flexibility and adaptability of the system.

[0110] 3. Reliable sub-packet acquisition; Manifest file and hash verification: Use the manifest file to record the information of all sub-data packets and generate a unique hash value for each sub-data packet to ensure data integrity and consistency.

[0111] 4. Optimized network resource utilization; Prioritize low latency and high stability: Select seed devices with low network latency and high stability for data transmission, which reduces transmission time and failure rate and optimizes the utilization of network resources.

[0112] Load balancing: Through reasonable partitioning and seed device selection, load balancing is achieved, avoiding data transmission bottlenecks caused by overloading of certain devices.

[0113] In summary, the communication module remote upgrade method provided by the present invention ensures the efficiency, reliability and flexibility of the communication module remote upgrade process through scientific and reasonable partitioning strategy, efficient seed device selection, flexible time window arrangement and reliable sub-packet acquisition method. This method not only improves the efficiency of firmware upgrade, but also enhances the fault tolerance of the system, minimizes the impact on the normal operation of the communication module, and is particularly suitable for batch remote upgrade of communication modules in large-scale deployment scenarios.

[0114] like Figure 2 As shown, the communication module remote upgrade system provided by the present invention comprises: The data segmentation unit 110 is used to obtain a complete data packet required for the upgrade and segment the complete data packet into a plurality of sub-data packets that can be executed separately; The module partitioning unit 120 is used to partition the communication modules to be upgraded according to the networking status of the communication modules to be upgraded; The seed determination unit 130 is used to determine the seed device of each partition according to the network connection status between the communication module in each partition and the central server, and the seed device downloads all sub-data packets from the central server; The difference determination unit 140 is used for each communication module to be upgraded to determine the sub-data package required to complete the upgrade according to the current device status; The window determination unit 150 is used for each communication module to be upgraded to determine the upgrade time window according to its own working state; The data acquisition unit 160 is used for the communication module to be upgraded to acquire the sub-data packets required for upgrading from the seed device according to the current network connection status when the upgrading time window is reached.

[0115] The communication module remote upgrade system provided in the embodiment of the present invention is used to implement the above-mentioned communication module remote upgrade method, so the specific implementation method is the same as the above-mentioned method and will not be repeated here.

[0116] In summary, the present invention provides a communication module remote upgrade method and system, which ensures the efficiency, reliability and flexibility of the communication module remote upgrade process through scientific and reasonable partitioning strategy, efficient seed device selection, flexible time window arrangement and reliable sub-packet acquisition method. This method not only improves the efficiency of firmware upgrade, but also enhances the fault tolerance of the system, minimizes the impact on the normal operation of the communication module, and is particularly suitable for batch remote upgrade of communication modules in large-scale deployment scenarios.

[0117] In several embodiments disclosed in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and a module, a program segment or a part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0118] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0119] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

Claims

1. A communication module remote upgrade method, characterized in that: The method comprises: Obtaining a complete data packet required for upgrading, and dividing the complete data packet into a plurality of sub-data packets that can be executed separately; Partition the communication modules to be upgraded according to their networking status; According to the network connection status between the communication module in each partition and the central server, the seed device of each partition is determined, and the seed device downloads all sub-data packets from the central server; Each communication module to be upgraded determines the sub-data package required to complete the upgrade according to the current device status; Each communication module to be upgraded determines the upgrade time window according to its own working status; When the upgrade time window is reached, the communication module to be upgraded obtains the sub-data packets required for the upgrade from the seed device according to the current network connection status.

2. The communication module remote upgrade method according to claim 1, characterized in that: The step of dividing the complete data packet into a plurality of independently executable sub-data packets specifically includes: Get the functional units of the communication module involved in this upgrade; According to the division of functional units, the complete data packet is divided into multiple sub-data packets, and each sub-data packet can be used separately for upgrading the corresponding functional unit; Add metadata for identifying relevant information of each segmented sub-data packet.

3. The communication module remote upgrade method according to claim 2, characterized in that: The step of adding metadata for identifying relevant information to each segmented sub-data packet specifically includes: For multiple sub-data packages that have a necessary execution order when performing the upgrade, metadata for identifying the execution order is added.

4. The communication module remote upgrade method according to any one of claims 2 or 3, characterized in that: The step of partitioning the communication module to be upgraded according to the networking state of the communication module to be upgraded specifically includes: Obtain the network connection information of the communication module to be upgraded, and determine the subnet or routing node to which each communication module belongs; Group devices belonging to the same subnet or routing node into the same partition.

5. The communication module remote upgrade method according to claim 4, characterized in that: The network connection status includes uplink and downlink bandwidth, network delay and packet loss rate. The step of determining the seed device of each partition according to the network connection status between the communication module in each partition and the central server specifically includes: Obtain the storage space of the device where the communication module is located, and filter out the device whose storage space is greater than the sum of the sizes of all sub-packets; For the selected devices, score the uplink and downlink bandwidth, network delay and packet loss rate between their communication modules and the central server according to the preset scoring rules; According to the total number of communication modules included in the partition, one or more devices with the highest scores are selected as seed devices of the partition.

6. The communication module remote upgrade method according to claim 5, characterized in that: The step of each communication module to be upgraded determining an upgrade time window according to its own working state specifically includes: Obtaining the historical working status of the communication module to be upgraded, wherein the historical working status includes historical network traffic conditions, historical signal strength, and historical key task periods; A time period in which the signal strength reaches a signal strength threshold, the available flow is greater than the sub-packet required for the upgrade, and does not overlap with the critical task period is determined as the upgrade time window.

7. The communication module remote upgrade method according to claim 6, characterized in that: The step of the communication module to be upgraded acquiring the sub-data package required for the upgrade from the seed device according to the current network connection state specifically includes: The communication module to be upgraded obtains metadata of all sub-data packages and determines the sub-data packages required for the upgrade according to the current firmware version; The communication module to be upgraded obtains the network connection status between the seed device in the partition where it is located, and determines whether it supports downloading the sub-data package required for the upgrade; If supported, the sub-data package required for the upgrade is obtained from the current seed device; If not supported, continue to search for other seed devices that support downloading the sub-data packages required for the upgrade.

8. The communication module remote upgrade method according to claim 7, characterized in that: The step of the communication module to be upgraded acquiring the sub-data package required for the upgrade from the seed device according to the current network connection state specifically includes: If no other seed device that supports downloading all sub-packets required for the upgrade can be found, the number of sub-packets that can be downloaded is calculated based on the network connection status with the current seed device, and the corresponding number of sub-packets are obtained from the current seed device.

9. The communication module remote upgrade method according to claim 7, characterized in that: The step of the communication module to be upgraded acquiring the sub-data package required for the upgrade from the seed device according to the current network connection state specifically includes: If no other seed device that supports downloading the sub-data package required for the upgrade can be found, then the communication module in the partition that has completed the sub-data package download is searched; Download the sub-data package required for the upgrade from the device where the communication module is located.

10. A communication module remote upgrade system, characterized in that: include: A data segmentation unit, used for obtaining a complete data packet required for upgrading, and segmenting the complete data packet into a plurality of sub-data packets that can be executed separately; A data segmentation unit, used for partitioning the communication module to be upgraded according to the networking status of the communication module to be upgraded; A seed determination unit, used to determine the seed device of each partition according to the network connection status between the communication module in each partition and the central server, and the seed device downloads all sub-data packets from the central server; A difference determination unit, used for each communication module to be upgraded to determine the sub-data package required to complete the upgrade according to the current device status; A window determination unit, used for each communication module to be upgraded to determine an upgrade time window according to its own working state; The data acquisition unit is used for obtaining the sub-data packets required for the upgrade from the seed device according to the current network connection status when the upgrade time window is reached.

Citation Information

Patent Citations

  • Router upgrading method and system

    CN107172206A

  • Electronic equipment upgrading method, electronic equipment and upgrading system

    CN115640026A

  • Electric energy meter modular upgrading method, medium and electronic device

    CN118381788A