Breakpoint resuming method and system for batch upgrading of near-field equipment based on Bluetooth Mesh
By selecting relay nodes and generating compressed state summaries in a Bluetooth Mesh network, constructing an ordered path priority queue, and dynamically selecting retransmission sources, the problem of unstable data transmission and high power consumption in traditional Bluetooth Mesh upgrade solutions is solved, achieving efficient and low-power breakpoint resume transmission.
Patent Information
- Application Number
- CN202511549164.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-28
- Publication Date
- 2026-02-06
AI Technical Summary
In Bluetooth Mesh networks, traditional firmware upgrade solutions suffer from problems such as unstable data transmission links, accidental activation of non-target devices, significant bandwidth waste, and the inability to dynamically assess communication quality and select the optimal path. This results in low efficiency of resuming interrupted transmissions and high energy consumption, which is particularly prominent in scenarios with dense deployment of low-power devices.
By listening to near-field Bluetooth signals and combining signal strength and neighbor number thresholds to determine device activation status, devices with relay capabilities are selected as relay nodes, compressed status summaries are generated for low-overhead sharing, ordered path priority queues and cooperative identifier broadcast fields are constructed, and the optimal retransmission source is dynamically selected for breakpoint resumption.
It achieves highly reliable and adaptive breakpoint resume in Bluetooth Mesh networks, improving the robustness and efficiency of near-field batch device upgrades, and is particularly suitable for resource-constrained power, industrial and IoT terminal scenarios.
Smart Images

Figure CN121486798A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of Bluetooth Mesh technology, and particularly relates to a method and system for batch upgrade of near-field devices based on Bluetooth Mesh and resume transmission after interruption. Background Technology
[0002] With the widespread adoption of IoT and smart terminal devices, Bluetooth Mesh networks, with their low power consumption, self-organization, and scalability, have gradually become one of the core communication architectures in critical scenarios such as industry, smart homes, and power maintenance. Their multi-hop broadcasting and node autonomy capabilities provide the foundation for near-field upgrades of multiple devices. However, in practical applications, traditional Mesh firmware upgrade solutions still suffer from multiple bottlenecks. First, the Mesh network topology changes frequently due to node additions, departures, and signal fluctuations, leading to unstable data transmission links and making interruptions highly likely during the upgrade process. Second, existing breakpoint resumption mechanisms largely rely on a central node for centralized state management and retransmission control; if the central node malfunctions or experiences performance bottlenecks, it can result in state loss, data duplication, or version confusion. Third, Mesh network node performance varies significantly, and existing broadcast-based upgrade strategies do not differentiate between node caching capabilities, neighbor density, and signal coverage, often leading to problems such as unintended activation of non-target devices and significant bandwidth waste. Furthermore, traditional solutions often lack dynamic evaluation of communication quality and cannot select the optimal path for recovery based on real-time link characteristics in multi-hop environments, resulting in low breakpoint resumption efficiency and high energy consumption. The above problems are particularly prominent in scenarios where low-power devices such as power monitoring terminals and industrial controllers are densely deployed.
[0003] Therefore, how to build a highly reliable, collaborative, and adaptive breakpoint resume mechanism for near-field batch devices under the Bluetooth Mesh architecture has become a key technical direction for realizing low-power firmware upgrades and intelligent maintenance. Summary of the Invention
[0004] The purpose of this invention is to design a method and system for batch upgrades of near-field devices based on Bluetooth Mesh, and to effectively solve the above-mentioned problems.
[0005] To achieve the above objectives, a method for batch upgrade and resume transmission of near-field devices based on Bluetooth Mesh is provided in a first aspect of the present invention, the method comprising the following steps: S1. Listen to near-field Bluetooth signals, obtain local status, determine the activation status of devices by combining signal strength threshold and neighbor number threshold, and determine devices with relay capabilities based on free memory capacity, and use them as relay nodes. S2. The device with an active state is taken as the target device. Each target device records the data fragments it receives to update the reception confidence and generates a compressed state digest in combination with the relay node. The state digest is used to broadcast in the Mesh network to share its fragment reception progress with low overhead. S3. Each target device evaluates the ability of each neighboring device to complete its missing fragments and the reliability of the link based on the received state summary of the corresponding neighboring device, so as to construct a local ordered path priority queue and a cooperative identifier broadcast field. S4. Each target device selects the optimal retransmission source for each missing data fragment based on the local ordered path priority queue and the real-time load of the neighboring devices, and initiates a request to complete the breakpoint resume transmission.
[0006] Furthermore, S1 specifically includes: After the device is powered on, it enters the near-field upgraded monitoring mode and collects the local status within a set window time; wherein, the local status includes the current signal strength and neighbor density; The current signal strength and neighbor density are obtained, and the activation status of the device is determined by combining the signal strength threshold and the neighbor number threshold, so as to identify the activated device. Based on the activated device, its free memory capacity is obtained to determine the relay node.
[0007] Furthermore, the current signal strength is obtained by averaging multiple RSSI values using a sliding window method, representing the near-field signal strength sensed by the device; the neighbor density is calculated based on the number of unique device IDs counted within the window period, representing the number of direct Mesh neighbors identified by the device.
[0008] Furthermore, S2 specifically includes: Obtain the activated device as the target device; The target device will divide the received upgrade package into... Each data segment is used to maintain the device's receiving status, and its length is [length missing]. The target device received the number as After data is fragmented, the confidence level of the i-th data fragment is set to 1, otherwise it is kept at 0. When the confidence level of the i-th data fragment is approximately equal to 1, it indicates reliable reception. If the confidence level of the i-th data fragment gradually approaches 0, it indicates that the reception of this fragment may be outdated. A sparse segment labeling method based on the receiving order structure is introduced to construct a state summary.
[0009] Furthermore, the sparse segment marking method based on the receiving order structure is specifically as follows: The device's received state is converted into several continuous segments, where each segment represents a completed fragmented continuous segment. Combined with the relay node, a state summary is constructed.
[0010] Furthermore, S3 specifically includes: Obtain the state summary received by the current device from neighboring devices within the time window and restore it to the Boolean vector of the neighboring devices; Combine the Boolean vectors of the neighboring devices with the current device's own current receiving state; The proportion of supplementable segments is determined based on the current reception confidence of the device itself and the reception confidence of neighboring devices; The path stability penalty term is calculated based on the actual number of digests received by the current device from neighboring devices and the theoretically expected number of times it should receive them. This term represents the path stability penalty term for the current device's reception of digests from neighboring devices in the past. The efficiency of broadcasting summaries within seconds is used to dynamically adjust the credibility of each path; The capability score of each neighboring device is calculated by combining the compensable segment ratio index and the path stability penalty term; A local ordered path priority queue is constructed based on the capability scores of all neighboring devices.
[0011] Furthermore, the collaborative identifier broadcast field is calculated and generated based on the proportion of supplementable fragments. If the proportion of available replacement fragments is greater than the collaborative capability threshold, the fragment is considered a high-value replacement fragment. If the current device is regarded as a source of high-value replacement fragments by multiple neighbors and is itself a relay node, the collaborative identifier broadcast field is set to 1. This value will be carried in subsequent broadcasts to prompt other devices to regard it as a high-priority replacement node.
[0012] Furthermore, S4 specifically includes: The target device first extracts the set of missing fragments that are currently missing but have not yet been requested based on the confidence value in the reception status of its own receiving device; Based on the missing fragment set, for each fragment, the data fragment with the highest score and receiving confidence of 1 from the local ordered path priority queue is searched. For each missing fragment, the device calculates the scheduling priority by combining the capability score and load information; wherein, the higher the scheduling priority, the higher the resending value of the current missing fragment by the neighboring device, and the device selects the neighboring device corresponding to the maximum value to initiate a request. After receiving the request, the receiving device of the neighboring device first determines whether it is a relay node. If it is, it directly extracts the target fragment from its local cache and sends it according to the fixed Mesh short data packet structure. If it is not a relay node, but the fragment is still in the short-term buffer, it forwards it through a one-time broadcast. After receiving the target segment, the target device updates the corresponding segment position and the corresponding reception confidence in its device reception status; When all received confidence levels are greater than the preset threshold, the target device will perform a local image integrity verification process. After all verifications pass, the Flash upgrade will proceed. After a successful Flash upgrade, the device will broadcast a status frame via Mesh broadcast.
[0013] Furthermore, the request is encapsulated in MeshVendorModel format, containing data fragment numbers and expected response window time.
[0014] In another embodiment of the present invention, a batch upgrade and resume system for near-field devices based on Bluetooth Mesh is provided, the system comprising: The device initialization unit is used to listen to near-field Bluetooth signals, obtain local status, determine the activation status of the device by combining the signal strength threshold and the neighbor number threshold, and determine the devices with relay role capabilities as relay nodes based on the free memory capacity. The status recording and summary generation unit is used to select devices with an active state as target devices. Each target device records the data fragments it receives to update the reception confidence and generates a compressed status summary in combination with the relay node. The status summary is used to broadcast in the Mesh network to share its fragment reception progress with low overhead. The neighbor capability graph construction unit is used to evaluate the ability of each neighbor device to complete its missing fragments and the reliability of the link based on the state digest received by each target device according to the corresponding neighbor device, so as to construct a local ordered path priority queue and a cooperative identifier broadcast field. The differentiated retransmission scheduling unit is used by each target device to select the optimal retransmission source for each missing data fragment and initiate a request based on the local ordered path priority queue and the real-time load of the neighboring devices, so as to complete the breakpoint resume transmission.
[0015] The beneficial technical effects of the present invention are at least as follows: To address the aforementioned issues, this invention proposes a method and apparatus for batch upgrades and breakpoint resumption of near-field devices based on Bluetooth Mesh, forming a complete closed-loop mechanism from device activation, status recording, capability mapping to differentiated retransmission execution. This scheme first achieves locally controlled device group initialization through near-field signal triggering and neighbor density determination, strictly limiting the upgrade scope to the target near-field area. Furthermore, it achieves dynamic relay role allocation through dual determination of device memory and network density.
[0016] Subsequently, this invention constructs a fragmented receive state recording mechanism with time decay weights, utilizing sparse segment compression and relay weight terms to generate lightweight digests, achieving state sharing and recoverable synchronization under low bandwidth conditions. Furthermore, the system introduces a neighbor capability graph construction method, integrating fragment complementarity and link stability into a joint evaluation index, and implementing self-organizing path optimization through a cooperative identifier broadcast mechanism, ensuring the network can automatically locate the optimal retransmission source after a breakpoint. Finally, this invention proposes a differentiated retransmission scheduling algorithm, dynamically calculating scheduling priorities based on neighbor load, path score, and fragment ownership state, ensuring efficient recovery while avoiding relay congestion and duplicate requests.
[0017] The entire solution does not rely on central coordination, but achieves intelligent breakpoint recovery of the Mesh locality through node autonomy. It is particularly suitable for resource-constrained scenarios such as power, industry and IoT terminals, and effectively improves the robustness, efficiency and success rate of near-field batch device upgrades. Attached Figure Description
[0018] The present invention will be further described with reference to the accompanying drawings, but the embodiments in the drawings do not constitute any limitation on the present invention. For those skilled in the art, other drawings can be obtained based on the following drawings without creative effort.
[0019] Figure 1 This is a flowchart of a batch upgrade and resume transmission method for near-field devices based on Bluetooth Mesh, according to an embodiment of the present invention. Detailed Implementation
[0020] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0021] In one or more embodiments, such as Figure 1 As shown, the present invention discloses a method for batch upgrade and resume transmission of near-field devices based on Bluetooth Mesh, the method comprising the following steps: S1. Listen to near-field Bluetooth signals, obtain local status, determine the activation status of devices by combining signal strength threshold and neighbor number threshold, and determine devices with relay capabilities based on free memory capacity, and use them as relay nodes.
[0022] Specifically, this step aims to build a controlled set of near-field upgrade devices in the Bluetooth Mesh network, and automatically complete role declarations (regular nodes or relay nodes) during the device initialization phase. The activation mechanism is based on the device's ability to sense near-field signal strength, the density of local Mesh neighbors, and the device's available caching capacity. This mechanism ensures that upgrade behavior is limited to the target area, improving the selectivity and energy efficiency of upgrade behavior.
[0023] Furthermore, after startup, the device enters near-field upgrade monitoring mode and collects local status within a set window time (e.g., 10 seconds). First, the device continuously receives near-field Bluetooth broadcasts (e.g., ADV_IND) via the Bluetooth hardware interface and extracts the RSSI value from them. To enhance the stability of the judgment, the device uses a sliding window averaging method to calculate the average of multiple RSSI values to determine the current signal strength. This value represents the device. The sensed near-field signal strength has been normalized to a dimensionless ratio at the underlying level. Secondly, the device listens to the Bluetooth MeshBeacon and counts the number of unique device IDs within a window period to calculate the neighbor density. equipment The number of direct mesh neighbors identified. This count is obtained from the neighbor device list maintained by the protocol stack, only counting nodes with a TTL value of 1 to ensure they are 1-hop neighbors. Signal strength threshold. Number of neighbors threshold All settings are configured via control broadcast from the near-field trigger, for example, setting... , .
[0024] Whether a device is eligible for an upgrade is determined by the following criteria: ; in, Indicates device The activation status, with a value of 1 indicating activation. Function It is a standard 0-1 step function, when If the value is 1, then the value is 0; otherwise, the value is 0. Greater than the threshold and Not less than the threshold If the device is determined to be within the effective near-field range and the Mesh local collaborative area, it will proceed to the subsequent upgrade process.
[0025] To determine whether a device has relay capability, its free memory capacity must be considered. Mesh Neighbor Density Free memory Obtained through an interface provided by the device's operating system, typically as an integer value in KB. The system's default minimum relay memory requirement is... For example, when each fragment is 512 bytes and 20 fragments need to be cached, then KB. The relay determination formula is as follows: ; in, Indicates device Whether the device possesses relay capability is indicated by a value of 1, meaning it can subsequently buffer fragments from other devices and participate in coordinated forwarding. This condition requires the device to have sufficient memory and be located in a sufficiently dense neighbor network to ensure that the relaying behavior is meaningful and has transmission value.
[0026] Furthermore, the device broadcasts its device information via the Mesh. Activation status With equipment Does it have the ability to act as a relay? The value forms the upgrade collaboration group topology within the Mesh. All calculations are based on actual quantities that can be measured locally on the device, without the need for external sensing mechanisms, and are highly reproducible. Taking a certain device as an example, if the sampled value is... , ,set up , Then the activation condition is met. If the device memory KB, and KB, then The device is declared as a relay node in the network.
[0027] This step outputs two variables: This indicates whether the device is activated as an upgrade participant, which will be used for subsequent steps to screen target devices. Indicates whether to declare it as a relay node for subsequent collaborative path construction.
[0028] S2. The device with an active state is designated as the target device. Each target device records the data fragments it receives to update the reception confidence and generates a compressed state digest in conjunction with the relay node. The state digest is used to broadcast in the Mesh network to share its fragment reception progress with low overhead.
[0029] Specifically, this step is taken after the device activation process was completed in the previous step. and relay capability status After the judgment, for only The node performs state management operations to record the data fragmentation status received during the upgrade process, and generates and broadcasts its state as a compressed digest to achieve efficient collaborative state sharing in low-power, weak-connectivity environments in Bluetooth Mesh networks. This step is the foundation for subsequent construction of the neighbor capability graph and implementation of differentiated breakpoint resume scheduling.
[0030] Furthermore, since we are addressing batch upgrade tasks in a near-field environment, the target devices are often simultaneously located within the controlled area. To ensure that the states of each device are aware of each other and to avoid broadcast congestion, this step introduces a receive state summary generation strategy that integrates a fragmented sparsity compression mechanism and a time-gated regularization term. This strategy takes into account the severely sparse nature of fragmented data in the early stages of upgrade transmission, dynamically adjusts the compression strength, and uses a broadcast period adjustment term to control the network impact caused by frequent updates. This approach is significantly different from traditional data modeling methods for mesh synchronization scenarios.
[0031] Furthermore, the upgrade package received by the device is divided into There are 1 data partition, numbered as follows: The device maintains a device receiving status. , length is Upon receiving the number After data fragmentation, the received confidence level will be determined. Set to 1 otherwise, keep it at 0. To avoid invalid bit expansion, a time decay factor is introduced in this step. This is used to adjust the frequency of broadcast digest generation, delaying the merging of state updates when the receive interval is short. The device receives fragments... The subsequent state update rules are as follows: ; in, To receive confidence level, Indicates the current timestamp. Indicates fragmentation The actual timestamp received, The preset time decay coefficient is used to control the freshness of state updates; a decrease in the update amplitude per unit time can suppress frequent broadcasts. This formula is designed to improve the receiver confidence level. The actual storage is a floating-point value, representing the probability weight of "recently successfully received". The value indicates reliable reception; if it gradually approaches 0, it indicates that the segment reception may be outdated. The system performs [further checks / checks] before generating the broadcast digest. Perform binarization processing to retain high-confidence fragments.
[0032] To further reduce broadcast load, this step does not involve direct broadcasting. Instead, it constructs a compressed state summary. Traditional methods often directly use Bloom filters or sparse indexes. This step, combined with the breakpoint resume scenario, introduces a sparse segment marking method based on the receiving order structure. This involves setting the device's receiving status... Converted into several continuous segments Each segment represents a completed, continuous segment. and They represent the first The start and end numbers of each segment. The state summary is defined as: ; in The compression factor for each segment represents the coding efficiency evaluation value of the segment length, and can be dynamically assigned based on the loss rate within the segment; This indicates whether the device is a relay node. This is a relay offset constant used to increase the weight of relay nodes in state broadcasting, thereby increasing their credibility in neighbor capability graph construction. This structure avoids the digest distortion problem caused by fragmented fragmentation and improves synchronization efficiency within the Mesh.
[0033] For example, if the device The received fragment index is It can then be divided into two sections. and They have lengths of 3 and 3 respectively; if given And the device is a relay node. ,set up Then there is The system encodes this value into a set of sparse segment information structures and broadcasts it. Other devices can then infer the approximate receiving status and relay capability of device n.
[0034] The output variable for this step is the device reception status. and state summary .in It is a floating-point fragment status bitmap maintained by the device itself, used only for local determination of missing fragments; It is a broadcastable compressed summary representing the device's availability status information for use by neighboring nodes. Both variables are generated by explicit computation within this step, requiring no external samplers or relying on prediction models, thus ensuring engineering implementation integrity.
[0035] S3. Each target device evaluates the ability of each neighboring device to complete its missing fragments and the reliability of the link based on the received state summary of the corresponding neighboring device, so as to construct a local ordered path priority queue and a cooperative identifier broadcast field.
[0036] Specifically, after the device completes the reception status recording and compressed digest generation, each activated node in the Bluetooth Mesh network (i.e., A "neighbor capability graph" needs to be established for local breakpoint resume tasks to determine which neighboring devices have the ability to assist in recovering missing fragments and which path should be prioritized for requesting missing data. Due to the dynamic structure of the Mesh network, the heterogeneous node states, and the significant differences in reception progress between nodes in near-field batch upgrade scenarios, traditional static routing or simple path selection strategies based on reception rate cannot meet the requirements for accurate breakpoint resume. This step proposes a joint capability evaluation mechanism with "data contribution" and "link reliability penalty," combined with broadcast compressed digest. ( ) and device receiving status Construct local capability graphs to achieve more refined data collaboration path assessment.
[0037] Furthermore, the input for this step consists of the two variables output from the previous step: This represents the current receiving status of the device itself, indicating the confidence level of the received fragments; For equipment From neighboring devices within the time window The received compressed status digest needs to be first converted back into a Boolean vector using a difference decoder. Due to the abstract It cannot express the full confidence level on its own; this step only uses the recovered confidence level. The device performs data loss compensation judgment based on its location structure. The neighbor set is defined as That is, all those successfully received within the window The set of device numbers.
[0038] Furthermore, for calculating neighboring devices For equipment To assess the effective recovery capability, an indicator called "percentage of repairable fragments" is introduced. Defined as a neighbor owned, equipment The number of missing fragments accounts for a certain percentage of the device's total. The ratio of the total number of missing fragments: ; in Let be a Boolean discriminant function. It is equipment For the fragment The confidence level of the receiver It is a set state threshold (such as...) The numerator represents the number of fragments that have been successfully received. The number of segments that satisfy "I don't have, but he does" is the denominator of the device. The current total number of missing segments, The larger the value, the more likely it is to be a neighbor. The greater the value of my current supplementary lenses.
[0039] However, in Bluetooth Mesh networks, links are highly susceptible to physical interference and path switching. Relying solely on data state compatibility for path selection can lead to high packet loss and duplicate requests. Therefore, this step introduces a "path stability penalty term". It is used to dynamically adjust the reliability of each path. Defined as a device Receive neighbors in the past The effectiveness of broadcasting digests within seconds is calculated as follows: ; in It is equipment Actual received from neighbor Number of abstracts This is the theoretically expected number of times (calculated based on the broadcast cycle). It is a small constant to prevent division by zero. This formula measures the broadcast success rate of a path by comparing the number of broadcasts "should have been received" with the number "actually received," and mitigates the extreme upward trend of high-quality paths through logarithmic compression. This penalty term is practically significant: the more unstable the path (…). much smaller ), When the score approaches 0, the corresponding path score decreases, thus preventing unreliable nodes from entering the scheduling priority.
[0040] Based on the above two indicators, the equipment Construct its neighbor capability graph , each neighbor Ability score Set in the following format: ; This joint scoring function integrates state difference compensation capability and link reliability, completing the evaluation through a one-multiplication term, thus retaining the dual advantages of computational simplicity and discrimination accuracy. In actual implementation, the device updates all neighbors every 5 seconds. of And construct a local ordered path priority queue. This allows the next step to request missing data fragments according to priority.
[0041] In addition, this step also defines an extended collaborative identifier broadcast field. Its value is: ; in For collaborative capability threshold (e.g.) If a device is considered a high-value patch source by multiple neighbors and is itself a relay node ( ), then set This value will be carried in subsequent broadcasts to alert other devices to regard it as a high-priority retransmission node.
[0042] Finally, the output of this step is a queue of ability scores. With collaborative capability identifier All calculations are based on the output of step two. and and step one There are no redundant variables or external model dependencies.
[0043] S4. Each target device selects the optimal retransmission source for each missing data fragment based on the local ordered path priority queue and the real-time load of the neighboring devices, and initiates a request to complete the breakpoint resume transmission.
[0044] Specifically, after the neighbor capability graph was constructed in the previous stage... and collaborative identifiers Subsequently, each device has obtained an assessment of the fragment retransmission capabilities and path reliability of its surrounding devices. Based on these structural outputs, this step completes the core execution of the breakpoint resume task—differentiated retransmission scheduling. In near-field batch upgrade scenarios for Bluetooth Mesh, node states vary greatly, and network links are unstable, especially when the number of devices is dense and the upgrade task spans multiple hops. Ensuring reliable and efficient retransmission of missing data is a key challenge in implementing a breakpoint resume mechanism. This step proposes a request scheduling mechanism based on fragment granularity, capability awareness, and load control. Driven by device state, it triggers retransmission requests on demand, avoiding redundant broadcasts and transmission congestion, and achieving system-level synchronous recovery.
[0045] Furthermore, equipment First, determine the reception status of your receiving device. Extract the set of missing fragments that are currently missing but have not yet been requested, based on the confidence value in the data. To avoid duplicate requests, it is necessary to include a set of requests that have been requested but not yet confirmed. Perform a difference operation. This process requires no complex calculations; it can be achieved simply by comparing Boolean bits with the request status flag bits. In actual deployments, This can be implemented as a fixed-length circular buffer, where a corresponding number is written and a timestamp is recorded each time a request is issued, for subsequent timeout retry control. For each segment... The system from Search for fragments And the neighbor with the highest rating This process is based on the neighbor state mapping table built in the previous step, and the device performs this locally through caching. Determine if the conditions are met. .
[0046] Furthermore, in order to prevent certain relay nodes (such as...) The node (of the node) became a bottleneck due to excessive concentration of fragment requests; this step introduces a real-time load record item. The current responsiveness of a device can be assessed by maintaining the number of responses or packet loss rate received from that neighbor. This value can be obtained from the receive log of the Mesh stack, for example, by setting a maximum of 5 request windows per neighbor, and entering a fallback waiting state if this is exceeded.
[0047] equipment Finally, for each missing segment Based on the aforementioned path score and load information, the scheduling priority is calculated: ; in The neighbor path capability score is output from step three; The suppression coefficient controls the magnitude of the load penalty. Neighbors recorded locally The current estimated receiving pressure; We guarantee that only neighboring nodes that actually possess the target data will be considered. The larger the value, the more likely the neighbor is to have a stake in the shard. The higher the reissue value, the more likely the device will select the maximum value. Initiate a request. The request is encapsulated in MeshVendorModel format and includes the fragment number. and expected response window time It is dynamically set by the system based on the network status.
[0048] For example, if the equipment Missing fragment , In the neighbor capability graph, three neighbors possess this fragment, namely: Their scores were respectively , , However, the currently recorded received payloads are respectively , , Substituting into the above formula, calculate... They are respectively , , Final choice Initiate a request. This mechanism ensures that even if the strongest path is busy, opportunities can be dynamically relinquished to other suboptimal neighbors, enhancing overall collaboration.
[0049] After receiving the request, the receiving device first determines whether it is a relay node (i.e., If so, the target fragment is directly retrieved from the local cache and sent according to the fixed Mesh short packet structure; if it is not a relay node, but the fragment is still in the short-term buffer (e.g., not yet overwritten), it can be forwarded via a one-time broadcast. Device Upon receiving the target fragment, update the corresponding fragment position in its state bitmap. To maintain consistency with the confidence update method in step two, this step defines the following update formula: ; in The received increment set for the system (e.g.) This value is used to gradually increase the reception confidence of a segment, avoiding premature confirmation of status due to occasional reception failures. If a segment is received successfully multiple times, this value will eventually approach 1. When all reception confidence levels are... (like When the upgrade is successful, the device will perform a local image integrity verification process, including checksum verification and version number confirmation. Only after all verifications are successful will the Flash write and upgrade proceed. Upon successful upgrade, the device will broadcast a "Upgrade Complete" status frame via Mesh. The format follows the MeshProvisioning standard's extended fields, including the device ID, completion timestamp, and whether it is a relay node. All surrounding devices will listen for this status frame and then update their corresponding device... of The flag is set to 1, serving as a reference for the consistency of the local network state.
[0050] In another embodiment of the present invention, a batch upgrade and resume system for near-field devices based on Bluetooth Mesh is provided, the system comprising: The device initialization unit is used to listen to near-field Bluetooth signals, obtain local status, determine the activation status of the device by combining the signal strength threshold and the neighbor number threshold, and determine the devices with relay role capabilities as relay nodes based on the free memory capacity. The status recording and summary generation unit is used to select devices with an active state as target devices. Each target device records the data fragments it receives to update the reception confidence and generates a compressed status summary in combination with the relay node. The status summary is used to broadcast in the Mesh network to share its fragment reception progress with low overhead. The neighbor capability graph construction unit is used to evaluate the ability of each neighbor device to complete its missing fragments and the reliability of the link based on the state digest received by each target device according to the corresponding neighbor device, so as to construct a local ordered path priority queue and a cooperative identifier broadcast field. The differentiated retransmission scheduling unit is used by each target device to select the optimal retransmission source for each missing data fragment and initiate a request based on the local ordered path priority queue and the real-time load of the neighboring devices, so as to complete the breakpoint resume transmission.
[0051] These are merely some preferred embodiments of the present invention, and should not be construed as limiting the scope of the invention. Those skilled in the art will understand that implementing all or part of the processes of the above embodiments and making equivalent changes in accordance with the claims of the present invention are still within the scope of the invention.
Claims
1. A method for batch upgrade and resume transmission of near-field devices based on Bluetooth Mesh, characterized in that, The method includes the following steps: S1. Listen to near-field Bluetooth signals, obtain local status, determine the activation status of devices by combining signal strength threshold and neighbor number threshold, and determine devices with relay capabilities based on free memory capacity, and use them as relay nodes. S2. The device with an active state is taken as the target device. Each target device records the data fragments it receives to update the reception confidence and generates a compressed state digest in combination with the relay node. The state digest is used to broadcast in the Mesh network to share its fragment reception progress with low overhead. S3. Each target device evaluates the ability of each neighboring device to complete its missing fragments and the reliability of the link based on the received state summary of the corresponding neighboring device, so as to construct a local ordered path priority queue and a cooperative identifier broadcast field. S4. Each target device selects the optimal retransmission source for each missing data fragment based on the local ordered path priority queue and the real-time load of the neighboring devices, and initiates a request to complete the breakpoint resume transmission.
2. The method for batch upgrade and resume transmission of near-field devices based on Bluetooth Mesh according to claim 1, characterized in that, S1 specifically includes: After the device is powered on, it enters the near-field upgraded monitoring mode and collects the local status within a set window time; wherein, the local status includes the current signal strength and neighbor density; The current signal strength and neighbor density are obtained, and the activation status of the device is determined by combining the signal strength threshold and the neighbor number threshold, so as to identify the activated device. Based on the activated device, its free memory capacity is obtained to determine the relay node.
3. The method for batch upgrade and resume transmission of near-field devices based on Bluetooth Mesh according to claim 2, characterized in that, The current signal strength is obtained by averaging multiple RSSI values using a sliding window method, representing the near-field signal strength sensed by the device; the neighbor density is calculated based on the number of unique device IDs counted within the window period, representing the number of direct Mesh neighbors identified by the device.
4. The method for batch upgrade and resume transmission of near-field devices based on Bluetooth Mesh according to claim 1, characterized in that, S2 specifically includes: Obtain the activated device as the target device; The target device will divide the received upgrade package into... Each data segment is used to maintain the device's receiving status, and its length is [length missing]. The target device received the number as After data is fragmented, the confidence level of the i-th data fragment is set to 1, otherwise it is kept at 0. When the confidence level of the i-th data fragment is approximately equal to 1, it indicates reliable reception. If the confidence level of the i-th data fragment gradually approaches 0, it indicates that the reception of this fragment may be outdated. A sparse segment labeling method based on the receiving order structure is introduced to construct a state summary.
5. The method for batch upgrade and resume transmission of near-field devices based on Bluetooth Mesh according to claim 4, characterized in that, The sparse segment marking method based on the receiving order structure is specifically as follows: The device's received state is converted into several continuous segments, where each segment represents a completed fragmented continuous segment. Combined with the relay node, a state summary is constructed.
6. The method for batch upgrade and resume transmission of near-field devices based on Bluetooth Mesh according to claim 1, characterized in that, S3 specifically includes: Obtain the state summary received by the current device from neighboring devices within the time window and restore it to the Boolean vector of the neighboring devices; Combine the Boolean vectors of the neighboring devices with the current device's own current receiving state; The proportion of supplementable segments is determined based on the current reception confidence of the device itself and the reception confidence of neighboring devices; The path stability penalty term is calculated based on the actual number of digests received by the current device from neighboring devices and the theoretically expected number of times it should receive them. This term represents the path stability penalty term for the current device's reception of digests from neighboring devices in the past. The efficiency of broadcasting summaries within seconds is used to dynamically adjust the credibility of each path; The capability score of each neighboring device is calculated by combining the compensable segment ratio index and the path stability penalty term; A local ordered path priority queue is constructed based on the capability scores of all neighboring devices.
7. The method for batch upgrade and resume transmission of near-field devices based on Bluetooth Mesh according to claim 6, characterized in that, The collaborative identifier broadcast field is calculated and generated based on the proportion of supplementable segments; If the proportion of available replacement fragments is greater than the collaborative capability threshold, the fragment is considered a high-value replacement fragment. If the current device is regarded as a source of high-value replacement fragments by multiple neighbors and is itself a relay node, the collaborative identifier broadcast field is set to 1. This value will be carried in subsequent broadcasts to prompt other devices to regard it as a high-priority replacement node.
8. The method for batch upgrade and resume transmission of near-field devices based on Bluetooth Mesh according to any one of claims 4 or 6, characterized in that, S4 specifically includes: The target device first extracts the set of missing fragments that are currently missing but have not yet been requested based on the confidence value in the reception status of its own receiving device; Based on the missing fragment set, for each fragment, the data fragment with the highest score and receiving confidence of 1 from the local ordered path priority queue is searched. For each missing fragment, the device calculates the scheduling priority by combining the capability score and load information; wherein, the higher the scheduling priority, the higher the resending value of the current missing fragment by the neighboring device, and the device selects the neighboring device corresponding to the maximum value to initiate a request. After receiving the request, the receiving device of the neighboring device first determines whether it is a relay node. If it is, it directly extracts the target fragment from its local cache and sends it according to the fixed Mesh short data packet structure. If it is not a relay node, but the fragment is still in the short-term buffer, it forwards it through a one-time broadcast. After receiving the target segment, the target device updates the corresponding segment position and the corresponding reception confidence in its device reception status; When all received confidence levels are greater than the preset threshold, the target device will perform a local image integrity verification process. After all verifications pass, the Flash upgrade will proceed. After a successful Flash upgrade, the device will broadcast a status frame via Mesh broadcast.
9. The method for batch upgrade and resume transmission of near-field devices based on Bluetooth Mesh according to claim 8, characterized in that, The request is encapsulated in MeshVendorModel format, containing data fragment numbers and expected response window time.
10. A batch upgrade system for near-field devices based on Bluetooth Mesh with interrupted data transmission resume capability, characterized in that: The system includes: The device initialization unit is used to listen to near-field Bluetooth signals, obtain local status, determine the activation status of the device by combining the signal strength threshold and the neighbor number threshold, and determine the devices with relay role capabilities as relay nodes based on the free memory capacity. The status recording and summary generation unit is used to select devices with an active state as target devices. Each target device records the data fragments it receives to update the reception confidence and generates a compressed status summary in combination with the relay node. The status summary is used to broadcast in the Mesh network to share its fragment reception progress with low overhead. The neighbor capability graph construction unit is used to evaluate the ability of each neighbor device to complete its missing fragments and the reliability of the link based on the state digest received by each target device according to the corresponding neighbor device, so as to construct a local ordered path priority queue and a cooperative identifier broadcast field. The differentiated retransmission scheduling unit is used by each target device to select the optimal retransmission source for each missing data fragment and initiate a request based on the local ordered path priority queue and the real-time load of the neighboring devices, so as to complete the breakpoint resume transmission.