Multi-protocol mesh network and resource coordination management method and system

By implementing resource coordination management of multiple protocol stacks in the microcontroller through a cross-layer resource coordination layer, the problem of memory and radio frequency resource management of multiple protocol stacks under resource-constrained conditions is solved, thereby improving the transmission reliability and resource utilization of critical services.

CN123185283APending Publication Date: 2026-11-27SHENZHEN HEIMAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611419145.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-14
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In resource-constrained microcontrollers, the concurrent operation of multiple protocol stacks leads to a shortage of memory and radio frequency resources. Furthermore, the lack of coordination in neighbor information, link observation, and resource management among different protocol stacks results in insufficient reliability of critical service transmissions, making packet loss particularly likely during unexpected events.

Method used

By establishing a cross-layer resource coordination layer, it can determine whether the identities of different protocol stacks correspond to the same physical device, establish a shared physical neighbor master object, realize cross-protocol reuse of physical facts, and dynamically allocate memory and radio frequency resources through logical view and resource budget module to ensure reliable transmission of critical services.

Benefits of technology

It improves memory utilization, reduces link probing overhead, ensures the transmission reliability and radio frequency determinism of critical services, and avoids resource idleness and packet loss during sudden services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123185283A_ABST
    Figure CN123185283A_ABST
Patent Text Reader

Abstract

The application discloses a multi-protocol MESH network and resource coordination management method and system, and is applied to a resource-restricted microcontroller running multiple wireless protocol stacks and sharing radio frequency resources. The method comprises the following steps: judging whether the protocol identities of different protocol stacks correspond to the same physical device, establishing a shared physical neighbor master object multiplexing physical fact for the homologous protocol identities; establishing a protocol-specific logical view of the reference master object for each protocol stack, and keeping the protocol address, routing state and security state isolated; normalizing link observation and fusing and updating shared observation values according to the confidence; periodically estimating the resource requirements of each protocol stack, and dynamically allocating the shared elastic resources on the basis of minimum hard reservation and emergency reservation; after feasibility filtering of a unified radio frequency operation descriptor, scheduling the radio frequency operation according to the business risk, deadline and switching cost. The application reduces repeated storage and resource conflicts while keeping the protocol safe isolation, and guarantees reliable transmission of critical business.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of multi-protocol networking control technology, specifically relating to a multi-protocol MESH network and resource collaborative management method and system. Background Technology

[0002] With the increasing prevalence of IoT applications such as smart homes and security alarms, low-power devices like smoke, temperature, and carbon monoxide alarms typically need to support multiple wireless communication protocols simultaneously, such as Zigbee, Thread, Bluetooth Low Energy, and Sub-G proprietary MESH protocols, to meet the needs of home networking, Matter access, device configuration, and alarm cascading. Due to cost and power consumption constraints, these multiple protocol stacks are often integrated into the same resource-constrained microcontroller and share the same RF hardware; concurrent operation of multiple protocol stacks has become the norm for such devices.

[0003] However, resource-constrained microcontrollers have very limited memory, processing time, and radio frequency (RF) resources. In existing implementations, each protocol stack typically maintains its own neighbor table, link quality statistics, routing entries, message buffers, retransmission queues, and RF tasks independently. Physical information such as signal strength, link stability, and channel occupancy of the same physical neighbor is repeatedly observed and stored by multiple protocol stacks, consuming already limited memory resources. Furthermore, different protocols have different observation criteria for the same link, making it difficult to share resources. Simply merging and sharing the neighbor and routing tables of different protocols would confuse protocol-specific semantics such as short addresses, routing identifiers, parent-child relationships, keys, and frame counters, interfering with the normal operation of the standard state machines of each protocol and posing risks to communication security.

[0004] On the other hand, the workload of multi-protocol devices varies significantly over time: under normal conditions, the workload of each protocol is relatively stable, but in emergency scenarios such as fire alarms, the protocol carrying alarm services will generate a large number of high real-time packets in a short period of time. Existing solutions typically allocate a fixed amount of memory and cache resources statically to each protocol. When a protocol is idle, the resources it occupies cannot be borrowed by other protocols, and when an emergency such as an alarm occurs, packet loss may occur due to insufficient cache. It is difficult to balance resource utilization and the ability to ensure critical business operations.

[0005] In terms of radio frequency (RF) resource management, existing dynamic multi-protocol (MPLP) schemes primarily focus on time multiplexing of a single RF. This involves each protocol stack submitting RF requests (transmission, reception, or scanning) to the scheduler, which then allocates RFs according to fixed priorities and allowed slippage time. This scheduling method does not comprehensively consider service risks, message deadlines, and protocol switching costs. It can easily lead to situations where low-value tasks occupy RFs while high-risk alarm tasks are delayed. Furthermore, the lack of consideration for switching costs can cause unnecessary and frequent protocol switching, introducing additional RF reconfiguration overhead and further impacting the deterministic transmission of real-time services such as alarms.

[0006] Therefore, how to achieve unified and coordinated management of neighbor information, link observation, memory cache resources, and radio frequency resources of multiple protocol stacks without compromising the standard state machines and security isolation of each wireless protocol, so that resource-constrained microcontrollers can still ensure reliable transmission of critical services in multi-protocol concurrent scenarios, is a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0007] The technical problem to be solved by the present invention is to overcome the shortcomings of the prior art, which is that the limited microcontroller resources lead to insufficient reliability of critical service transmission, thereby providing a multi-protocol MESH network and resource collaborative management method and system.

[0008] A resource collaborative management method for multi-protocol mesh networks, applied to a microcontroller, wherein multiple wireless protocol stacks run on the microcontroller and the multiple wireless protocol stacks share the same radio frequency resources, the method comprising: Determine whether the protocol identities of different wireless protocol stacks correspond to the same physical device. For multiple protocol identities that are confirmed to correspond to the same physical device, establish a shared physical neighbor master object in the cross-layer resource coordination layer. The shared physical neighbor master object is an index inside the cross-layer resource coordination layer and is used to store physical facts that can be reused across protocols. The physical facts include at least physical capability information, spatial location information, and link observation information. A protocol-specific logical view is established for each wireless protocol stack, referencing the shared physical neighbor master object. The protocol address and routing state of each wireless protocol stack are stored in the corresponding protocol-specific logical view. The security state of each wireless protocol stack is stored in the protocol private area and does not enter the shared physical neighbor master object. The protocol private field of any wireless protocol stack is not directly read or written by other wireless protocol stacks. The link observations of each wireless protocol stack on the same physical link are mapped to a unified interval, and the shared link observation values ​​stored in the shared physical neighbor master object are updated according to the confidence level of each link observation sample. The system periodically acquires the resource status of each wireless protocol stack and estimates the resource requirements of each wireless protocol stack; it sets a minimum hard reserve resource for each wireless protocol stack in schedulable memory and sets an emergency reserve resource for use only for alarm, network recovery and security control; it dynamically allocates the shared elastic resource, after deducting the minimum hard reserve resource and the emergency reserve resource, among the multiple wireless protocol stacks according to the resource requirements of each wireless protocol stack, and the shared elastic resource includes at least packet buffer resources. The system receives unified radio operation descriptors submitted by each wireless protocol stack. The unified radio operation descriptor includes at least the latest completion time, the expected duration, and the service risk. The system performs feasibility filtering on candidate radio operations based on the protocol switching time and the latest completion time. In the set of feasible radio operations, the system determines the scheduling priority of each candidate radio operation based on its service risk, deadline urgency, and protocol switching cost. The system schedules the candidate radio operations to the radio resources for execution according to the scheduling priority.

[0009] Furthermore, determining whether the protocol identities of different wireless protocol stacks correspond to the same physical device includes: When a binding statement is obtained declaring that multiple protocol identities belong to the same physical entity, the signature or message authentication code of the binding statement is verified, and the device serial number digest, protocol identity digest and validity period in the binding statement are checked. When the verification is successful and the binding permission is valid, the multiple protocol identities are associated with the same shared physical neighbor master object. When the binding statement is absent, weak evidence is obtained. This weak evidence includes at least two of the following: hardware fingerprint similarity, correlation of received signal strength changes at multiple times, clock drift similarity, spatial location consistency, online / offline time synchronization, and product capability consistency. The association confidence level is calculated based on the normalized confidence level and corresponding weights of each weak piece of evidence. The weights are determined according to the forgery difficulty, stability, and sample quality of the evidence. An association is established when the association confidence level reaches a strong association threshold. A candidate relationship is established and samples are collected again when the association confidence level is between the observation threshold and the strong association threshold. Each protocol identity remains independent when the association confidence level is below the observation threshold. No association is established when there are rejection conditions such as certificate subject conflict, spatial location mutual exclusion, or capability set mutual exclusion. After establishing the association, if subsequent observations show contradictions and the association confidence level is below the splitting threshold for several consecutive periods, the original shared physical neighbor master object is split into independent objects, and a common statistical summary is copied to each protocol-specific logical view.

[0010] Furthermore, the step of mapping the link observations of each wireless protocol stack for the same physical link to a unified interval, determining the confidence level of each link observation sample, and fusing and updating the shared link observations based on the confidence level includes: The original observations are mapped to a unified range according to the boundary defined by the protocol. For observation types where the smaller the value, the better the link status, reverse mapping is used, and the original observation value, source protocol, and sampling time are preserved. The confidence level of each link observation sample is determined based on sampling freshness, recent sample variance, measurement confidence of the source protocol, and consistency with observations from other sources. Samples with confidence levels below the minimum adoption threshold are not used to update the shared link observation values. The update coefficients are determined based on the confidence level and the environmental change gain. The shared link observations are then weighted and fused according to the update coefficients. The environmental change gain is determined based on the degree of deviation between the current observation and the current shared link observation, whether the change direction of recent multiple observations is consistent, and whether it is accompanied by packet loss, retransmission, or channel occupancy degradation. Physical link edge objects are established in the cross-layer resource coordination layer. The physical link edge objects store the shared link observations, trends and observation confidence between two shared physical neighbor master objects. Each wireless protocol stack generates a protocol-specific routing metric based on the physical link edge objects and the routing status of the protocol. The final path selection satisfies the loop, address, role and security constraints of the protocol.

[0011] Furthermore, the estimation of resource requirements for each wireless protocol stack and the dynamic allocation include: The resource requirements of each wireless protocol stack are obtained by normalizing and weighting the number of active neighbors, queue occupancy, routing change rate, failure debt, deadline pressure, service risk, recent load peak and load growth trend. The weights of service risk and deadline pressure items are increased for wireless protocol stacks that undertake alarm or network recovery services, and only positive growth trends are included in the resource requirements. After ensuring the minimum hard reserved resources for each wireless protocol stack, the shared elastic resources are allocated according to the weighted ratio of the resource requirements and service weights of each wireless protocol stack. When the allocation amount of a certain wireless protocol stack reaches its budget limit, the allocation amount is truncated, and the remaining shared elastic resources are iteratively allocated among the wireless protocol stacks that have not reached their budget limits until there are no remaining resources or all wireless protocol stacks have reached their budget limits. When the difference between the recalculated resource budget and the current resource budget exceeds the adjustment threshold and continues for a preset number of monitoring cycles, a budget adjustment is performed. When entering an alarm state, the waiting period is skipped and the budget is immediately increased from the shared elastic resources or the emergency reserved resources to the wireless protocol stack undertaking the alarm service. After exiting the alarm state, the resources are returned according to the preset slow return strategy.

[0012] Furthermore, the message caching resources are managed through an elastic cache pool, and the management methods of the elastic cache pool include: Each wireless protocol stack's message buffer is managed by a unified message descriptor. The unified message descriptor includes at least the owner protocol identifier, service risk level, latest completion time, reference count, generation number, payload block chain pointer, whether reclamation is allowed, and security zeroing flag. Each wireless protocol stack accesses the unified message descriptor through a handle. The payload area is divided into multiple fixed-size block pools, and a message occupies one block or multiple linked blocks. During allocation, candidate block combinations that meet the message length and alignment requirements are enumerated. The allocation cost is determined based on the internal fragmentation amount, number of blocks, linked list operation cost, and cross-protocol ownership switching and zeroing cost of each candidate block combination. The candidate block combination with the lowest allocation cost is selected for allocation. Alarm messages will preferentially use the cache corresponding to the minimum hard reserve resource of this protocol. If the hard reserve resource is insufficient, the cache corresponding to the shared elastic resource will be used. When the risk level of the alarm message reaches the alarm or emergency level, the cache corresponding to the emergency reserve resource is allowed to be used. Ordinary business messages are prohibited from using the cache corresponding to the emergency reserve resource.

[0013] Furthermore, this also includes transactional garbage collection of resource objects: When shared memory is less than a preset threshold, for candidate objects that have passed hard filtering, the retention value is calculated based on business criticality, alarm relevance, route centrality, object age, degree of dependence, reconstruction cost, memory usage, and substitutability. Objects with the lowest retention value are prioritized for reclamation. Among them, objects with non-zero reference counts, those performing radio frequency operations, those waiting for protocol responses, those participating in security transactions, those on the current alarm critical path, those holding a unique unconfirmed alarm message, or those in the process of protocol state transition are not included in the reclamation candidate set. The reclamation process includes: a first phase, marking the object to be reclaimed as silent to prevent new references from being added, and waiting for the in-transit operations of the object to finish; a second phase, saving a reconstructable summary of the object, and notifying all protocol-specific logical views referencing the object to unbind; after confirming that the object's reference count is zero and all protocol-specific logical views have been unbound, releasing the resources occupied by the object and incrementing its generation number, causing old handles to be denied access due to generation number mismatch; if the object becomes a critical object again during the silent period, the reclamation is canceled and it is restored to an active state; For memory blocks that may contain application data or security material, zero them out before returning them to the shared free area, and update the quota statistics of the relevant wireless protocol stack synchronously when object ownership is switched between wireless protocol stacks.

[0014] Furthermore, the radio frequency scheduling specifically includes: The feasibility filtering includes: determining whether a candidate radio frequency operation can be completed before its latest completion time based on the protocol switching time and the end time of the current task, and configuring a hard hold window for critical radio frequency operations; delaying, downgrading, or rejecting infeasible ordinary radio frequency operations, and allowing alarm and emergency radio frequency operations to enter the emergency channel; In the set of feasible radio frequency (RF) operations, business risk, deadline urgency, failure debt, queue pressure, and task criticality are considered as benefit items, while protocol switching costs and expected energy consumption are considered as cost items. The joint utility density of each candidate RF operation within a unit RF occupation time is calculated, and the candidate RF operation with the highest joint utility density is prioritized for scheduling. When the utility difference between the best candidate RF operation of the current protocol and the best candidate RF operation of other protocols is less than the switching hysteresis value, the RF operation of the current protocol is prioritized for execution. When a radio frequency operation is rejected or preempted due to resource conflicts, the failure debt of the corresponding wireless protocol stack is added according to the task category. After the radio frequency operation is successfully completed, the failure debt gradually decreases, and the failure debt has an upper limit. For preemptible radio operations that have declared checkpoint capabilities, preemption is performed only if the preemption benefit outweighs the interruption cost and the preempted radio operation can still be completed before its latest completion time. The preempted radio operation is then re-enqueued after saving its operation progress, remaining payload, and radio status summary.

[0015] Furthermore, it also includes combined overload determination and graded degradation: A joint stress metric is formed based on schedulable memory utilization, descriptor utilization, queue utilization, deadline omission rate, and radio frequency scheduling conflict rate. When the joint stress indicator exceeds the warning threshold, compress link observation history, reduce diagnostic logs and ordinary telemetry frequency, and tighten shared quotas for ordinary services; when the joint stress indicator exceeds the critical threshold, reclaim low-value alternative routes, merge ordinary packets, reduce non-critical scanning and discovery frequency, and limit the rate of low-risk services; when the joint stress indicator exceeds the emergency threshold, retain only alarm, network recovery, security control, and minimum protocol maintenance services, and open the emergency reserved resources. Entering each level of degraded state uses a first threshold, and exiting uses a second threshold lower than the first threshold, requiring a stable observation time to form a hysteresis; when the pressure continues to be lower than the exit threshold, neighbor history, cache and alternative routes are restored in batches; in any degraded state, security context, current alarm critical path objects and unacknowledged alarm messages are not reclaimed.

[0016] A multi-protocol MESH network resource collaborative management system is deployed on a microcontroller, wherein multiple wireless protocol stacks run on the microcontroller, and the multiple wireless protocol stacks share the same radio frequency resources. The system includes: The physical identity association module is used to determine whether the protocol identities of different wireless protocol stacks correspond to the same physical device. For multiple protocol identities that are confirmed to correspond to the same physical device, a shared physical neighbor master object is established. The shared physical neighbor master object is a stable index inside the system and is used to store physical facts that can be reused across protocols. The physical facts include at least physical capability information, spatial location information, and link observation information. The logical view management module is used to establish a protocol-specific logical view for each wireless protocol stack that references the shared physical neighbor master object. The protocol address and routing status of each wireless protocol stack are stored in the corresponding protocol-specific logical view. The security status of each wireless protocol stack is stored in the protocol private area and does not enter the shared physical neighbor master object. The protocol private field of any wireless protocol stack is not directly read or written by other wireless protocol stacks. The link observation fusion module is used to map the link observations of each wireless protocol stack on the same physical link to a unified interval, and to fuse and update the shared link observation values ​​stored in the shared physical neighbor master object according to the confidence level of each link observation sample. The resource budget allocation module is used to periodically obtain the resource status of each wireless protocol stack and estimate the resource requirements of each wireless protocol stack; it sets a minimum hard reserve resource for each wireless protocol stack in schedulable memory, and sets an emergency reserve resource for alarm, network recovery and security control only; it dynamically allocates the shared elastic resource after deducting the minimum hard reserve resource and the emergency reserve resource among the multiple wireless protocol stacks according to the resource requirements of each wireless protocol stack, and the shared elastic resource includes at least packet buffer resources; The radio frequency scheduling module is used to receive unified radio frequency operation descriptors submitted by each wireless protocol stack. The unified radio frequency operation descriptor includes at least the latest completion time, the expected duration, and the service risk. The module performs feasibility filtering on candidate radio frequency operations based on the protocol switching time and the latest completion time. In the set of feasible radio frequency operations, the module determines the scheduling priority of each candidate radio frequency operation based on the service risk, deadline urgency, and protocol switching cost. The module schedules the candidate radio frequency operations to the radio frequency resources for execution according to the scheduling priority.

[0017] A multi-protocol MESH network includes multiple network nodes, each of which includes a microcontroller and a radio frequency module connected to the microcontroller. Multiple wireless protocol stacks run on each network node, and a multi-protocol MESH network resource collaborative management system as described above is deployed to collaboratively manage the neighbor information, link observation, packet buffer resources, and radio frequency operations of the network nodes. The network nodes communicate with each other through the multiple wireless protocol stacks.

[0018] Beneficial effects: This invention determines whether the protocol identities of different wireless protocol stacks correspond to the same physical device and establishes a shared physical neighbor master object for confirmed protocol identities. This enables multiple wireless protocol stacks to reuse physical capabilities, spatial locations, and link observations, avoiding repeated observation and storage of the same physical neighbor information in each protocol stack, reducing memory consumption, and improving the memory utilization of resource-constrained microcontrollers. At the same time, the protocol addresses and routing states of each protocol stack are stored in the protocol-specific logical view, while the security state is stored in the protocol's private area and does not enter the shared physical neighbor master object. While realizing cross-protocol sharing of physical facts, this invention maintains the independence of the standard state machine and security state of each protocol stack, avoiding protocol semantic confusion and security risks caused by sharing.

[0019] By mapping the link observations of the same physical link from various wireless protocol stacks to a unified range and merging and updating them according to confidence level, different protocol stacks with different observation calibers, ranges, and sampling frequencies can obtain shared link observation results with unified caliber and good timeliness. Each protocol stack can utilize the observation results of other protocol stacks without having to conduct repeated probes, reducing link probe overhead and providing a reliable basis for route evaluation of each protocol stack.

[0020] By periodically estimating the resource requirements of each wireless protocol stack, and setting minimum hard-reserve resources and emergency reserve resources for alarms, network recovery, and security control for each protocol stack, shared elastic resources are dynamically allocated. This allows resources such as packet buffers to be borrowed and returned between protocol stacks as their load changes. This ensures that each protocol stack has the basic resources required to maintain standard operation, while also enabling protocol stacks handling sudden emergencies such as alarms to obtain the necessary resources in a timely manner. This avoids situations where one protocol resource is idle while another protocol loses packets due to insufficient buffers, thus improving resource utilization and the transmission reliability of critical services.

[0021] By using a unified radio frequency operation descriptor to filter the feasibility of candidate radio frequency operations and determining scheduling priorities based on business risk, deadline urgency, and protocol switching costs, shared radio frequency resources are prioritized to meet high-risk business operations that are close to their deadlines. This avoids unnecessary protocol switching and the resulting reconfiguration overhead, and improves the radio frequency determinism and end-to-end real-time performance of critical services such as alarms. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a schematic diagram of the main method steps of the present invention; Figure 2 This is a schematic diagram of the multi-protocol MESH network resource collaborative management system architecture of the present invention; Figure 3 This is a schematic diagram of the physical neighbor knowledge base mapping relationship of the present invention; Figure 4 This is a schematic diagram of the link observation method of the present invention; Figure 5 This is a schematic diagram of the method for allocating remaining shared flexible resources according to the present invention; Figure 6 This is a schematic diagram of the message caching resources and protocol hard reserved area structure of the present invention; Figure 7 This is a schematic diagram of the transactional recycling method of the present invention; Figure 8 This is a schematic diagram of the physical link edge structure of the present invention; Figure 9 This is a schematic diagram of the radio frequency scheduling method of the present invention; Figure 10 This is a schematic diagram of the combined overload determination and graded degradation method of the present invention; Figure 11 This is a schematic diagram of the resource collaborative management method of the present invention. Detailed Implementation

[0024] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the specific embodiments of this application are described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of this application. Therefore, this application is not limited to the specific embodiments disclosed below.

[0025] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0026] In this application, unless otherwise expressly specified and limited, the terms "installation," "connection," "joining," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components, unless otherwise expressly limited. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.

[0027] Example 1: Reference Figures 1-11 As shown, this embodiment provides a resource collaborative management method for multi-protocol MESH networks, applied to a resource-constrained microcontroller. The resource-constrained microcontroller runs multiple wireless protocol stacks, and these multiple wireless protocol stacks share the same radio frequency resources. The multiple wireless protocol stacks include, for example, at least two of the following: Zigbee protocol stack, Thread protocol stack, Sub-G private MESH protocol stack, and Bluetooth Low Energy protocol stack. The method of this embodiment is particularly suitable for low-power fire alarm devices, gateways, and wireless coprocessors that simultaneously perform functions such as smoke alarm, temperature alarm, carbon monoxide alarm, home networking, Matter access, device configuration, and emergency cascading, but its application is not limited to these.

[0028] Architecturally, the method in this embodiment is executed by a cross-layer resource coordinator positioned between multiple wireless protocol stacks and the underlying radio frequency (RF) driver. The cross-layer resource coordinator establishes a shared resource plane between multiple independent protocol stacks and the underlying RF driver. The device and service layers provide the cross-layer resource coordinator with service information such as fire service risks. The shared resource plane provides a physical neighbor knowledge base, common link observation, elastic buffer pool, object pool, and RF operation queue. Each wireless protocol stack maintains its own independent state, forming its own protocol-specific logical view. The cross-layer resource coordinator periodically collects data on the number of active nodes, queue backlog, routing change rate, retransmission debt, deadline pressure, memory usage, RF conflicts, and fire service risks for each wireless protocol stack, and outputs a resource budget vector and RF scheduling decisions. This shared resource plane does not directly merge the security states of each protocol. Instead, it employs a structure that combines shared physical neighbor master objects with protocol-specific logical views, shared link observations with protocol-specific routing semantics, a shared elastic resource pool with protocol minimum hard reservation, and a unified RF operation descriptor with risk deadline scheduling. This structure achieves unified and collaborative resource management while maintaining protocol isolation.

[0029] For ease of understanding, the main terms involved in this embodiment are explained in Table 1 below.

[0030] Table 1: Explanation of Key Terms

[0031] The method includes the following steps.

[0032] Step S1: Determine whether the protocol identities of different wireless protocol stacks correspond to the same physical device. For multiple protocol identities confirmed to correspond to the same physical device, establish a shared physical neighbor master object at the cross-layer resource coordination layer. The shared physical neighbor master object (hereinafter referred to as the PID master object) is a stable index within the cross-layer resource coordination layer, rather than a network address in any protocol. It is used to store physical facts that can be reused across protocols. The physical facts include at least physical capability information, spatial location information, and link observation information. Specifically, the identifier of the PID master object can be composed of manufacturing certificate digest, EUI-64, MAC address mapping, device serial number digest, hardware fingerprint, or same-origin identifier generated by a local security session. The physical facts stored in the PID master object include, for example, power supply type, whether it has routing capabilities, room or floor, radio frequency capabilities, normalized link observation, last visible time, stability, mobility, and cross-protocol association confidence. Thus, multiple wireless protocol stacks can reuse the physical facts of the same physical neighbor, avoiding the repeated storage of the same physical information and reducing memory usage.

[0033] Specifically, in step S1, it is determined whether the protocol identities of different wireless protocol stacks correspond to the same physical device, including two methods: strong evidence association and weak evidence confidence association.

[0034] When a binding statement is obtained declaring that multiple protocol identities belong to the same physical entity, strong evidence association is used. For example, a device may explicitly declare that multiple protocol identities belong to the same physical entity during the manufacturing, network access, or local security session; the device certificate may contain both Zigbee EUI-64 and Thread extended address digests; or the same device may provide a protocol identity binding statement in a local protected channel. When establishing a strong evidence association, the signature or message authentication code of the binding statement is first verified, then the device serial number digest, product identifier, protocol identity digest, and validity period in the binding statement are checked, and the certificate chain or local binding permissions are verified. Only when the verification passes and the binding permissions belong to the manufacturer, an authenticated gateway, or a local protected maintenance session, are multiple protocol-specific logical views pointed to the same PID master object; if the verification fails, the statement expires, or there is an identity conflict, no association is established. It should be noted that the fact that multiple protocol identities belonging to the same physical device are associated with the same PID master object does not mean that each protocol uses the same protocol address. The PID is only used as a stable index inside the microcontroller to reuse physical facts such as power supply type, radio frequency capability, physical location and link trend. The address, routing status and security status of each protocol are still stored in the corresponding protocol-specific logical view.

[0035] When the binding declaration is absent, weak evidence confidence is used for association, and objects should not be merged solely based on similar received signal strength in a single instance. The weak evidence includes at least two of the following: hardware fingerprint similarity, correlation of received signal strength changes over multiple moments, clock drift similarity, spatial location consistency, online / offline time synchronization, and product capability consistency. The association confidence is calculated based on the normalized confidence and corresponding weights of each piece of weak evidence. Calculate according to the following formula: ; In the formula, Let k be the normalized credibility of the evidence. Let be the weight of the k-th piece of evidence, where k is the evidence number, and ∏ represents the product of all valid pieces of evidence.

[0036] Each weak piece of evidence is calculated to have a confidence level of 0 to 1 within a preset observation window. Hardware fingerprint similarity is compared item by item based on product model, radio frequency capability, supported channel set, manufacturer capability field, and reliably readable hardware features. When they are completely identical, the similarity is close to 1, and when there are mutually exclusive capabilities or model conflicts, the similarity is set directly to 0. In order to avoid leaking the original device identifier, the digest value can be used during comparison instead of saving the plaintext serial number.

[0037] The correlation of received signal strength changes is not about comparing whether the received signal strength is close at a certain time. Instead, it forms a change sequence of two protocol identities at multiple sampling times that are the same or time-aligned. After removing the fixed bias of each protocol, it compares the rising, falling and fluctuating trends. When the number of effective paired samples is less than the minimum, the sample time span is insufficient, or most samples are in the receiver saturation region, this evidence is not included in the current calculation. When the trends are highly consistent, a higher confidence level is taken, and when there are long-term reverse changes, a lower value is taken.

[0038] Clock drift similarity is obtained by statistically analyzing the cumulative deviation of periodic messages, connection events, or local timestamps relative to the coordinator clock: first, the unit-time drift rate of the two identities is estimated separately; then, the confidence level is given based on the difference in drift rates and the estimated error range. A higher value is taken when the difference is within the measurement error range, and 0 is taken when it exceeds the allowable range of the device's crystal oscillator. Spatial location consistency prioritizes the use of distance measurement results from known rooms, installation points, or gateways; when only received signal strength is available, area determination must be performed by two or more receiving points, and homogeneity cannot be directly confirmed by a single receiving point.

[0039] The online / offline time synchronization is formed by statistically analyzing the time difference between two identities in multiple power-on, power-off, maintenance wake-up, or movement events. The credibility is increased when multiple events occur synchronously within the allowed time window, and the credibility is not increased to the strong correlation threshold if there is only one accidental overlap.

[0040] Product model and capability consistency are verified through the essential capability set and the mutually exclusive capability set. For example, the power type, product series and alarm capabilities of devices declared as having the same dual protocol should be consistent. If there is an obvious conflict, such as one identity being a battery smoke detector and the other being a mains power gateway, the candidate association will be directly rejected.

[0041] Weight The weighting is determined by the difficulty of forgery, stability, and current sample quality of the evidence: evidence protected by authentication, such as hardware fingerprints, manufacturing bindings, and evidence from multiple receiving points, carries a higher weighting; evidence susceptible to environmental influences, such as single-point signal strength and short-term online synchronization, carries a lower weighting. If a piece of evidence is missing, its credibility is not calculated as 0; instead, it is removed from the set of valid evidence and its weight is re-normalized.

[0042] System setting strong correlation threshold and observation threshold When the association confidence level Greater than or equal to Establish association at time; when Greater than or equal to and less than Only candidate relationships are established at one time, and samples are continued to be collected for candidate relationships to avoid erroneous merging; when Below Each protocol identity remains independent. Furthermore, mutual exclusion conditions are set: if a certificate subject conflict occurs, two protocol identities are simultaneously located in two impossible locations, or capability sets are mutually exclusive, the two PID master objects remain independent even if the overall association confidence is high.

[0043] After establishing the association, if subsequent observations reveal contradictions—for example, two protocol identities appearing simultaneously in spatially distinct locations, a long-term decline in temporal correlation, or device certificate updates indicating they are not from the same source—the association confidence is reduced. When the association confidence falls below the splitting threshold for several consecutive periods, the original PID master object is split into independent objects, and necessary common statistical summaries are copied to each protocol's dedicated logical view. The splitting process does not affect the protocol's private state. Through this association, observation, and reversal mechanism, we can effectively merge objects from the same source to save memory while avoiding erroneous merging and long-term incorrect associations.

[0044] Taking a dual-protocol alarm that uses Zigbee as the normal network and Bluetooth Low Energy only for maintenance as an example, the device certificate contains a common-source digest of the two protocol identities. The gateway creates a PID master object for the device and creates logical views for Zigbee and Bluetooth Low Energy respectively. The received signal strength change trends measured by the two protocols are entered into a shared knowledge base, but the Bluetooth Low Energy connection handle, Zigbee short address, key and frame counter remain isolated. During maintenance, channel occupancy observations generated by Bluetooth Low Energy scanning can help Zigbee select a more stable channel, but do not change Zigbee's standard security procedures.

[0045] Step S2: Establish a protocol-specific logical view for each wireless protocol stack that references the PID master object. The protocol address and routing state of each wireless protocol stack are stored in their respective protocol-specific logical views. The security state of each wireless protocol stack is stored in a protocol-private area and does not enter the shared physical neighbor master object. Protocol-private fields of any wireless protocol stack cannot be directly read or written by other wireless protocol stacks. Specifically, the Zigbee view stores short addresses, network addresses, parent-child relationships, neighbor relationships, routing records, and APS / NWK transactions; the Thread view stores extended addresses, Router Locator (RLOC), Router ID, MLE neighbor state, IPv6 neighbor cache, and routing state; the Sub-G private protocol view stores its address, parent node, timeslot, route sequence number, and retransmission status. Each logical view references the PID master object, but protocol-private fields cannot be directly read or written by other protocols.

[0046] In terms of security isolation, network keys, session keys, frame counters, nonce numbers, replay windows, authentication status, temporary network access materials, and in-transit security transactions are all located in the protocol's private area and do not enter the PID master object. The cross-layer resource coordinator only reads boolean or enumerated states such as "whether it is occupied by a security transaction" and "whether it can be reclaimed," and does not read the key content. Before an object is released from one protocol and transferred to another, the memory that may contain sensitive payloads is zeroed, and the owner tag and generation number are updated. Through the above view and isolation structure, while realizing the reuse of physical facts across protocols, the independence of the standard state machine and security state of each protocol is maintained, avoiding protocol semantic confusion and security risks introduced by sharing.

[0047] The sharing principles for various types of data in this embodiment are shown in Table 2 below.

[0048] Table 2: Principles for Sharing Various Types of Data

[0049] Step S3: Map the link observations of each wireless protocol stack for the same physical link to a unified interval, and update the shared link observations stored in the PID master object according to the confidence level of each link observation sample. Different protocols have different definitions, ranges, and sampling frequencies for RSSI, LQI, packet error rate PER, and link stability. In this embodiment, the original observations are first mapped to a unified 0 to 1 interval according to the protocol calibration curve, while retaining the original observation values, source protocol, and sampling time. The normalized observation x_norm is calculated according to the following formula: ; In the formula, x represents the original observation. and These represent the lower and upper bounds of the calibration boundary of protocol p, where p is the protocol identifier; clip(·,0,1) restricts the value within the brackets to the range of 0 to 1. For observation types where smaller values ​​indicate better link conditions, such as PER, retransmission rate, and latency, inverse mapping can be used.

[0050] Calculate the confidence level for each observation sample. The confidence level can be determined by the sampling freshness, sample variance, number of consecutive observations, protocol measurement reliability, and consistency with other sources. The overall confidence level C_k of the k-th link observation sample can be used to update the shared link value, calculated according to the following formula: ; In the formula, The result is limited to 0 to 1; The basic reliability of the source protocol and measurement method can be determined experimentally; for example, the RSSI / LQI directly given by the hardware receiver is higher than the link quality inferred only from the application layer timeout. Δt is the sample age, i.e., the current time minus the sampling time. τ is the effective aging time constant for this observation type; a smaller τ is used for rapidly changing channel occupancy, and a larger τ is used for slow variables such as equipment capabilities. e is the natural constant, an exponential term. This indicates an aging factor that decreases with increasing age of the sample. The recent sample variance is calculated by the dispersion of the most recent W valid samples around their mean, and is first normalized according to the allowable range of the observation. When the sample is insufficient, a conservative initial variance is used to avoid obtaining too high a confidence level from a single measurement. This indicates the degree of agreement between the sample and other sources. It is used to indicate whether the sample is consistent with other reliable sources on the same physical edge: the new sample is compared with the current fusion value and allowable error band of each source. The more sources that fall within the error band, the closer the value is to 1. If the new sample continues to contradict multiple high-confidence sources, the value is reduced to close to 0, and the source is recorded as an anomaly instead of immediately overwriting the shared value.

[0051] Optionally, to suit microcontrollers without floating-point units, the exponential aging term and variance correction term can be pre-quantized into lookup tables or fixed-point numbers, and all intermediate quantities are saturated. When the value is below the minimum adoption threshold, only the original observations are saved for diagnostic purposes, and shared values ​​are not updated.

[0052] Shared link observations are fused using an exponential fusion method with confidence levels: if the new sample has high confidence and significant environmental changes, the update coefficient is increased; if the sample is unstable or outdated, the update coefficient is decreased. The fusion update is performed according to the following formula: ; ; In the formula, For the updated shared link observations, These are the shared link observations before the update. For this normalized observation, To update the coefficients, Based on the updated coefficients, The confidence level for the above samples, Gain due to environmental changes and These are the lower and upper limits of the update coefficients, respectively. Environmental change gain. This mechanism is designed for rapid response when a real link suddenly deteriorates. It is formed based on three types of information: the difference between the current normalized observation and the current shared value; whether the directions of recent changes are consistent; and whether packet loss, retransmission, or channel busy increases occur simultaneously. The rate is set to 1 when the difference is less than the normal noise threshold; it increases progressively when the difference exceeds the first-level change threshold and changes in the same direction for two or more consecutive samples; it can be increased to a preset upper limit when the difference exceeds the second-level threshold and is accompanied by a deterioration in PER, retransmission rate, or channel busy ratio; the update coefficient is not amplified when there is only a single sudden change followed by immediate recovery or when the source confidence is low. The first and second-level change thresholds are determined by the measured noise of each protocol and RF chip, and can be set as the upper bound of normal steady-state fluctuations and the upper bound of changes that affect routing reliability, respectively. It should be noted that... Only the fusion speed is adjusted, without directly determining the route switching; the updated shared observation still needs to be judged by the protocol-specific hysteresis, minimum dwell time and standard state machine, so as to avoid routing oscillation caused by rapid fusion.

[0053] The shared knowledge base simultaneously stores the mean, variance, trend, and last observation time of shared link observations, while each wireless protocol stack converts the shared values ​​into its own routing metrics according to its own standards. Thus, different protocol stacks with different observation calibers, ranges, and sampling frequencies can obtain shared link observation results with consistent caliber and good timeliness. Each protocol stack can utilize the observation results of other protocol stacks without having to perform repeated probing, reducing link probing overhead.

[0054] Step S4: A physical link edge object is established at the cross-layer resource coordination layer. Each wireless protocol stack generates a protocol-specific routing metric based on the physical link edge object and the routing state of its own protocol. The final path selection satisfies the loop, address, role, and security constraints of the protocol. In this embodiment, the Zigbee routing table is not used directly as the Thread routing table. Instead, a physical link edge object E(u,v) is established at the cross-layer resource coordination layer. This object only stores reusable physical facts, such as the normalized link quality, latency trend, channel occupancy, spatial span, stability, and observation confidence between the two PID master objects u and v.

[0055] Each protocol establishes a dedicated binding for the physical link edge. When the Zigbee protocol generates metrics, the protocol adapter first uses the shared RSSI, LQI, PER, and stability as auxiliary observations, and then merges them with the most recently received MAC / NWK results from Zigbee itself to obtain the link quality level within the protocol. Subsequently, it converts the single-hop cost into a limited level according to the link cost mapping table used by the Zigbee implementation, and accumulates the path cost during route discovery or candidate path comparison. The current parent-child relationship, route discovery sequence number, source route status, and secure reachability are still determined by the Zigbee protocol stack. Shared observations can only correct the initial estimate, reduce duplicate probes, or trigger re-evaluation, and cannot be directly written into the protocol's private routing table. When the Thread protocol forms metrics, it first estimates the quality of inbound and outbound links based on shared observations and the Thread's own received statistics, and then maps it to the link quality level and corresponding link cost used by Thread MLE. Path selection continues to combine the Router ID, path cost in Route TLV, neighbor status, partition, and role restrictions. The Rank mentioned in this embodiment is only used as an additional constraint when the device is running upper-layer or border routing functions using RPL at the same time, and is not used as an inherent field of Thread MLE. When shared information fails or conflicts with the MLE result, the valid result of the Thread protocol state machine shall prevail. The Sub-G private MESH protocol can be defined by the implementer as a reproducible candidate edge cost. A typical approach is to statistically analyze the average number of attempts required for successful transmission, the expected delay, the time slot conflict ratio, the energy consumption corresponding to the transmit power, and recent link fluctuations, and weight them according to the service type: alarm services prioritize paths that can be completed within the deadline and have spare time slots, while ordinary telemetry can prioritize low-energy paths. When forming a path, the route sequence number, hop count limit, loopback detection, parent node status, and frequency / time slot availability must be checked simultaneously.

[0056] When protocol p uses physical link edge e as a candidate single hop, the comprehensive cost M_e,p is calculated according to the following formula: ; In the formula, The smaller the value, the more suitable it is as a candidate edge. Each input is first scaled to the range of 0 to 1. The expected number of transmissions is obtained by dividing the actual number of transmission attempts in the statistics window by the number of successful confirmations. When the sample is insufficient, a conservative initial value is used and an upper limit is set. To estimate the latency, the estimated total latency for queuing, waiting slots, sending, and acknowledgment is normalized relative to the allowed latency. To predict energy consumption, energy is estimated based on transmit power, transmit / receive duration, and protocol switching time, and normalized relative to the allowable energy per operation. The degree of congestion is determined by a combination of the protocol's queue occupancy rate, channel busy ratio, and known congestion indicators from neighboring sides. The instability is determined based on recent link quality variance, number of consecutive failures, number of primary next-hop switchings, and observation staleness. The confidence level of the shared observations calculated in step S3 is used to reduce the cost of repeated detections, and therefore it is represented as a limited reward term in the formula. to Non-negative weights are used. To prevent shared rewards from masking true risks, restrictions are imposed. · Not exceeding a certain percentage of positive cost items, and The cost is limited to non-negative values; this comprehensive cost is only used for candidate ranking or to determine whether to actively probe, and cannot bypass the protocol's loop checks, role restrictions, address validity, security state, and hard timing conditions.

[0057] Regarding the resource budget for routing objects, the budget for routing entries in the protocol is jointly determined by the number of active targets, the rate of route change, the alarm coverage area, the value of alternative paths, and the current memory pressure: under normal conditions, only a small number of high-value alternative routes are retained; under alarm or topology damage conditions, the budget for alternative routes from the alarm source to the gateway, stairs, and critical exits is increased; when reclaiming routing entries, the current primary path and alarm backup paths have higher retention value. Through the structure of binding physical link edges to protocols, multiple protocols can reuse link facts without confusing routing semantics, reducing redundant probing and improving routing stability.

[0058] Step S5: Periodically acquire the resource status of each wireless protocol stack and estimate the resource requirements of each wireless protocol stack; set minimum hard reserved resources for each wireless protocol stack in schedulable memory, and set emergency reserved resources for alarm, network recovery and security control only; dynamically allocate the shared elastic resources, after deducting the minimum hard reserved resources and the emergency reserved resources, among the multiple wireless protocol stacks according to the resource requirements of each wireless protocol stack, wherein the shared elastic resources include at least packet buffer resources.

[0059] Specifically, let the total amount of dynamic RAM available for the microcontroller to operate on multiple protocols be . The system first deducts the kernel, applications, sensor algorithms, stack space, and non-reclaimable safe areas to obtain schedulable memory. : ; In the formula, For kernel memory usage, To account for the memory usage of the application, For stack space, This is the secure area memory, containing keys, frame counters, authentication status, and other secure memory that cannot be reclaimed. Divided into the minimum hard reserved resources of each protocol Shared flexible resources and emergency backup resources , This is the protocol identifier.

[0060] Agreement Computing resource requirements The input includes the number of active neighbors. Message queue usage Routing change rate Retransmission of debt Deadline pressure Business risks Recent peak and growth trend The terms are first normalized to the same interval, and then weighted and summed. ; In the formula, to The weights for each indicator can be determined by stress testing and implemented using integer fixed points. Protocol The number of active neighbors that are still valid and have a protocol logical view in the most recent statistical period is normalized according to the maximum neighbor capacity that can be configured by the protocol. Objects that have expired, left the network, or only have a summary are not included in the active number. Take the maximum value among message queue occupancy, descriptor occupancy, and payload block occupancy. If the high-priority queue is close to full load, it can be directly increased to the high-pressure range. This indicates the pressure from route changes. It can be obtained by dividing the number of route entries added, deleted, invalidated, or whose primary next hop has changed in the statistics window by the number of active routes in the window, and additional penalties are imposed for repeated switching in a short period of time. This indicates the accumulation of resource or transmission failures. It can be calculated by combining the number of times the cache was not obtained, the retry was sent, the radio frequency request was rejected, and the deadline was not met. The failures of alarm, security and network repair are calculated with a higher increment, and the increment is reduced periodically after successful completion. Indicating deadline pressure: Calculate the remaining slack time for each pending task, which is the latest completion time minus the current time and the estimated execution time. The smaller the slack time, the higher the urgency; protocol level. The highest urgency level can be used, or a weighted average of the urgency levels of high-priority tasks can be used; ordinary tasks that cannot be completed before the deadline will not have their resource requirements increased, but will instead enter a process of postponement, downgrading, or abandonment, while alarm and security tasks will trigger the emergency budget. The current business risk is determined by the highest risk task in the protocol queue and the duration of the risk. Normal telemetry is a low value, while equipment failure, network partition, and suspected fire increase in level. Confirmed alarms, alarm forwarding, and security recovery are assigned the highest level. This indicates the peak value of the overall load or memory usage over multiple recent statistical periods, used to reserve capacity for unexpected surges. This indicates the load growth trend, formed based on the increase and duration of continuous cycle occupancy rates. Only positive growth is included in demand; a downward trend does not represent negative demand. For protocols responsible for fire alarms or network recovery, the weights of business risk items and deadline items are increased; for Bluetooth Low Energy used only for temporary network configuration, its weight is reduced after the configuration ends, but minimum connection resources are retained. After weight configuration, the system guarantees... There is an upper limit, and Used only for allocating shared elastic areas, and must not exceed [the specified limits]. , Rules for the use of safety isolation zones and emergency alarm zones.

[0061] After ensuring a minimum hard reserve of resources for each protocol, the remaining shared elastic resources are allocated according to demand and business weight. Budget Calculate according to the following formula: ; In the formula, The remaining shared memory after deducting the minimum hard reserved resources for each protocol. For the agreement Business weight, This represents the summation of all protocols. If a protocol reaches its limit... If the allocation is not met, the remaining memory is truncated, and the remaining memory is iteratively allocated among protocols that have not reached their limits, until there is no remaining memory or all protocols have reached their limits.

[0062] To avoid object migration and cache jitter caused by frequent adjustments, budget adjustments are only performed when the difference between the recalculated resource budget and the current resource budget exceeds the adjustment threshold ΔB and persists for M monitoring cycles. When entering a high-risk alarm state, the waiting period is skipped, and the budget is immediately increased from shared elastic resources or emergency reserved resources to the alarm protocol. After exiting the alarm state, a slow return strategy is adopted to prevent instantaneous release. Thus, cache and other resources can be borrowed and returned between protocols according to changes in protocol load, ensuring that each protocol maintains basic resources for standard operation while enabling timely resource availability for sudden emergencies such as alarms.

[0063] Taking a resource-constrained gateway that simultaneously runs Zigbee coordinator and Thread border router auxiliary functions as an example, under normal conditions, Zigbee has many terminals and Thread has a low load. The cross-layer resource coordinator allocates more shared cache and route candidate budget to Zigbee according to resource demand, but still reserves the minimum MLE and IPv6 resources for Thread. When Matterover Thread smoke detectors report alarms in a concentrated manner, the Thread queue, deadline pressure and fire risk increase rapidly. The system immediately increases the Thread budget, borrows descriptors and 64B / 128B payload blocks from the shared area, and improves the RF utility of Thread alarm transmission. After the alarm ends, the budget is gradually returned through hysteresis, without instantaneous release.

[0064] Step S6: Manage message cache resources through an elastic cache pool. Each radio protocol stack's message cache is managed by a unified message descriptor. This unified message descriptor includes at least the owner protocol identifier, service risk level, message type, latest completion time, reference count, generation number, payload block head pointer, retransmission status, whether reclamation is allowed, and a secure zeroing flag. Each radio protocol stack accesses the unified message descriptor through a handle, and does not directly hold raw pointers that can expire indefinitely, thus providing a foundation for secure reclamation and cross-protocol sharing.

[0065] The payload area is divided into multiple fixed-size block pools, such as 16B, 32B, 64B, and 128B. A message can use one block or multiple blocks linked together. During allocation, a small number of candidate block combinations that can accommodate a message length L and meet protocol alignment requirements are first enumerated. The allocation cost is determined based on the internal fragmentation amount, number of blocks, linked list operation cost, and cross-protocol ownership switching and zeroing cost of each candidate block combination. The candidate block combination with the lowest allocation cost is selected, and the allocation cost is applied. Calculate according to the following formula: ; In the formula, The total capacity of candidate combinations, Internal fragments are obtained by subtracting the actual payload length from the total capacity of the candidate combinations, reflecting the number of internal fragment bytes that cannot be used by other messages. This represents the actual number of blocks occupied by the message; the more blocks, the more descriptors and chain pointers. The cost of linked list operations is formed based on the number of free list operations expected to be performed for allocating, linking, and releasing the combination. The base cost can be calculated once for each of the block fetching, splitting, merging, and recycling operations, and the cost is increased when multiple block pools are involved or when a long free list needs to be traversed. The cost of zeroing out cross-protocol ownership switching is calculated when the current owner of the block is different from the requesting protocol. It includes at least updating the owner tag, adjusting the quotas of both parties, zeroing out any remaining valid bytes, and the time or number of bytes required to refresh the generation number. This item is 0 when using the hard reserve area of ​​this protocol. to To determine the preferred weights, each cost is first scaled to a similar range by a preset upper limit, and then... to This indicates the microcontroller's preference for saving bytes, reducing block count, lowering processing time, and avoiding cross-protocol zeroing. Alarm messages can reduce the relative weight of fragmented items to prioritize timely allocation, but must not skip owner updates and safe zeroing; if multiple candidate combinations... Similarly, select combinations with fewer blocks, fewer cross-protocol switching, and better continuity of remaining large blocks in that order.

[0066] Regarding emergency resource usage rules, emergency alarm messages should prioritize using the cache corresponding to the hard-reserved area of ​​this protocol. If insufficient, the cache corresponding to the shared area can be used. When the risk level reaches the alarm or emergency level, the cache corresponding to the emergency-reserved area can be used. Ordinary telemetry, logging, diagnostics, and batch reporting must not use the emergency-reserved area. By selecting a combination of tiered block pools and minimum cost, cache fragmentation is reduced, and a handle-based basis for the following secure reclamation is provided through a unified descriptor.

[0067] Step S7: Perform transactional garbage collection on resource objects. When shared memory is insufficient, the system does not handle the issue by directly deleting the oldest objects. Instead, it calculates the retention value of candidate objects that have passed hard filtering based on factors such as business criticality, alarm relevance, route centrality, object age, dependency, reconstruction cost, memory usage, and substitutability. The system prioritizes collecting objects with the lowest retention value. The retention value of object o is... Calculate according to the following formula: ; In the formula, For business criticality, the values ​​are formed according to the business category to which the object belongs. Objects that require alarm confirmation, alarm forwarding, security authentication, network recovery, and waiting for protocol confirmation are assigned higher values, while ordinary telemetry, diagnostics, and rebuildable caches are assigned lower values. Indicates whether it is associated with the current alarm, depending on whether the object directly carries the current alarm, whether it is located on the main or backup path from the alarm source to the gateway, and whether the alarm has not yet been confirmed. If it is unrelated to the current alarm, it is 0. The centrality of an object within the current route is calculated only for neighbors and route objects. It can be determined based on whether the object is the current parent node, the default route, multiple destination addresses sharing a common next hop, and whether an equivalent alternative path exists. Age is the object's age, i.e., the difference between the current time and the object's last valid access or observation time. τ is the freshness time of this object type, an exponential term. This indicates that the time-sensitive value decreases with age; The degree of dependency is indicated by the reference count, the number of ACKs / acknowledgments waiting for the object to complete, the number of descriptors that depend on its payload blocks, and the protocol state machine wait relationships. Any object that still has strong dependencies will be excluded by hard filtering conditions, rather than being retained solely based on the score. The reconstruction cost represents the time, number of air interface packets, and energy required to regain access to an object after it has been released. For example, the cost of rediscovering neighbors, re-establishing a security session, or re-performing route discovery is high, while the cost of simply recalculating the statistical summary is low. For memory usage, normalize the total number of bytes occupied by the object's descriptors, payload blocks, and auxiliary indexes relative to the maximum size of a single object; The degree of substitutability is determined by factors such as whether there are copies with identical content and similar update levels, whether there are alternative paths that can be switched immediately, and the number of copies. The higher the degree of substitutability, the greater the deduction. to The weights are configured based on security level and resource pressure. The score is only used to sort candidate objects that have passed hard filtering. Before recycling, the reference count, generation number, protocol status, and alarm path must still be checked again to prevent the object status from changing after the score calculation is completed.

[0068] Hard filtering conditions are as follows: objects with a non-zero reference count, those performing RF operations, those waiting for MAC ACK or protocol response, those participating in key updates or authentication, those on the current alarm critical path, those holding a unique unacknowledged alarm message, and those undergoing object migration or protocol state transitions are prohibited from entering the recycling candidate set.

[0069] The reclamation process comprises three phases: silent, checkpoint, and commit. In the first phase, objects to be reclaimed are marked as quiet, preventing new references and waiting for ongoing operations to complete. In the second phase, a reconstructable summary of the object is saved, and all protocol-specific logical views referencing the object are notified to unbind. Only after confirming a reference count of zero and all protocol-specific logical views have been unbound are payload blocks and descriptors released, and the generational numbers of released descendants are incremented. Old handles are denied access due to generational mismatches. If an object becomes critical again during the quiet phase, reclamation is canceled, and the object is restored to an active state. For memory blocks that may contain application data, addresses, or security material, zeroing is performed before returning to the shared free list. Protocol quotas and statistics are updated synchronously during object ownership changes to prevent a protocol from consuming resources exceeding the budget for an extended period. Through the combination of scoring, hard filtering, and transactional reclamation, dangling pointers, duplicate releases, and cross-protocol erroneous access are prevented, and it is ensured that critical objects under alarm conditions are not mistakenly reclaimed under any memory pressure.

[0070] Taking a scenario where device OTA upgrades, alarm forwarding, and network repair occur simultaneously as an example, when the descriptor occupancy rate reaches a critical threshold, the system first reduces diagnostic logs and ordinary telemetry, and then calculates the retention value for alternative routes and long-term unobserved neighbors. An alternative route object that has not been used for a long time, can be replaced by other paths, has no references, and does not participate in alarms has the lowest score and is marked as silent. After all protocol views are unbound, the object is released and cleared. The current alarm message, descriptors waiting for ACK, and key update context are retained due to hard filtering conditions.

[0071] Step S8: Jointly schedule shared radio frequency resources. Each wireless protocol stack submits a unified radio frequency operation descriptor to the cross-layer resource coordinator. The unified radio frequency operation descriptor includes at least the earliest start time (EST), latest finish time (DDL), estimated duration (Dur), allowed slippage time (Slip), protocol identifier, operation type, service risk (R), service criticality (C), failure debt (F), queue pressure (Q), whether preemption is allowed, preemption checkpoint method, and background reception recovery requirements.

[0072] The scheduler first performs feasibility filtering: it calculates the protocol switching time T_{switch} and the end time of the currently executing task to determine whether the candidate radio frequency operation can be completed before its latest completion time DDL; hard reservation windows can be configured for operations such as MAC ACK, Thread MLE critical switching, alarm broadcasting, network recovery, and key update; if a normal task is not feasible, it is postponed, downgraded, or rejected, and alarm and emergency tasks enter the emergency channel and can preempt normal tasks that are allowed to be interrupted.

[0073] Within the set of feasible radio frequency (RF) operations, business risk, deadline urgency, failure liabilities, queue pressure, and task criticality are considered as benefit items, while protocol switching costs and expected energy consumption are considered as cost items. The joint utility density of each candidate RF operation per unit RF occupancy time is calculated, along with the joint utility density of RF task j. Calculate according to the following formula: ; In the formula, This represents the overall benefit that radio frequency task j can obtain within a unit of radio frequency time; the larger the value, the higher the priority. Business risks are defined by the risk level and duration of fire, failure, or network recovery associated with the task. The urgency level is determined by normalizing the remaining slack time; the closer to the latest completion time, the closer it is to 1. Failed debts accumulated for this agreement or similar operations; To assess queue pressure, the larger of the occupancy rate of the priority queue containing the task and the waiting time can be selected. For task category criticality, MAC ACK, critical MLE exchange, key update, and alarm acknowledgment are more critical than normal scan, log, and telemetry. The protocol switching cost is determined based on the radio frequency reconfiguration time, calibration time, protocol context recovery time, and loss of background reception interruption required to switch from the current protocol to task j. The current protocol task usually takes a lower value. The estimated energy consumption is based on the expected transmit power, transmit / receive duration, and retry probability. The estimated radio frequency time required for the task. To switch to the additional time of this task, both must use the same time unit. To avoid the denominator being zero, in actual implementation, the denominator must take at least one radio frequency scheduling time quantum. to As weights, configured based on business security levels and actual scheduling results, the weights for risk, deadline, and criticality in alarm and security systems should be higher than the energy-saving weights. Hard deadlines and non-preemptible windows are first processed by feasibility filtering, and joint utility density is only sorted within the feasible task set. High-failure debts cannot be used to preempt alarm or security tasks that are about to expire. The scheduler selects from the feasible set. The biggest task execution.

[0074] To reduce frequent protocol switching, a switching hysteresis value is set. When the utility difference between the best task of the current protocol and the best task of another protocol is less than 100%. In such cases, the current protocol task will continue to be executed first, and the switch will only be made when the external task is significantly more useful or the current task is about to miss its deadline. A certain percentage or a fixed minimum difference can be taken as the optimal task utility of the current protocol, and the difference is required to last for more than one scheduling cycle in order to reduce repeated switching near the boundary.

[0075] In terms of fairness, a capped failure debt value is maintained for each agreement and the necessary task categories. When a regular task is rejected due to resource conflicts, a level of debt is added. If the task is preempted by an already executed task, a higher level of debt is added based on the interruption and recovery costs. If the deadline has been missed, another level of debt is added. Failures due to invalid parameters, unmet security conditions, or task cancellation do not increase debt. Debt is reduced in fixed steps, or multiplied by a decay coefficient of less than 1 in each statistical period until it returns to 0. Consecutive successes can accelerate the decay. Once the debt reaches its limit, it will not increase further to prevent low-value tasks from gaining unlimited priority simply by waiting for a long time. When a protocol goes offline, rejoins the network, or the task type changes, a limited amount of historical debt can be retained or cleared according to the configuration. Debt increments are set according to task categories. Low-risk tasks necessary to maintain basic network connectivity can have higher priority than ordinary diagnostic tasks, but any debt increase is subject to a hard priority cap. Alarm and security tasks still have hard priority, and the fairness mechanism must not reduce their deadline guarantees. The scheduler records the rejection reason, debt changes, and final service time to verify the maximum waiting time and the absence of permanent starvation.

[0076] Regarding preemption and recovery, preemptible tasks declare checkpoint capabilities before starting; when a high-priority task arrives, the scheduler only performs preemption if the preemption benefit outweighs the interruption cost and the preempted task can still recover within its latest completion time (DDL); the preempted protocol saves its operation progress, remaining payload, and RF status summary before re-enqueuing; ACK windows and critical security exchanges that cannot be safely preempted are not interrupted. Thus, RF resources prioritize high-risk, near-deadline service operations while avoiding unnecessary protocol switching and reconfiguration overhead, improving the RF determinism of critical services such as alarms, and preventing low-risk protocols from permanent starvation.

[0077] Taking a scenario where Zigbee alarm broadcasting, Thread MLE maintenance, and Sub-G periodic reception request radio frequency almost simultaneously as an example, the scheduler first filters hard timing windows and then calculates the joint utility density: Zigbee alarm broadcasting is executed first due to its highest risk and deadline urgency; Thread MLE operation, although lower in risk, has hard timing constraints and is executed subsequently; Sub-G reception is delayed because it allows for slippage and can still be completed before the latest completion time; the scheduler records the failure debts of Sub-G to prevent it from being starved for a long time.

[0078] Step S9: Perform joint overload assessment and graded degradation. A joint stress index Ω is formed based on schedulable memory utilization, descriptor utilization, queue utilization, deadline miss rate, and radio frequency scheduling conflict rate. ; In the formula, For schedulable RAM utilization, For descriptor occupancy, Queue occupancy rate This represents the omission rate for recent deadlines. For the radio frequency scheduling conflict rate, max represents the maximum value among all components. Optionally, a combination of weighted sum and maximum value can be used to form a joint stress index, depending on product requirements.

[0079] When the combined stress indicators sequentially cross the warning, critical, and emergency thresholds, the system adopts a step-by-step degradation approach instead of immediately shutting down the entire protocol: When crossing the warning threshold and entering the warning state, long-term link history is compressed, diagnostic logs and ordinary telemetry frequency are reduced, and shared quotas for ordinary services are tightened; when crossing the critical threshold and entering the critical state, low-value alternative routes are reclaimed, ordinary packets are merged, non-critical scanning and discovery frequency is reduced, and low-risk services are rate-limited; when crossing the emergency threshold and entering the emergency state, only alarms, network recovery, security control, minimum heartbeat, and necessary protocol maintenance are retained, and the emergency reserved resource B_emg is opened; when entering the recovery state, after the stress remains below the exit threshold, neighbor history, cache, and alternative routes are restored in batches, and the system returns to the normal state after observing stability. A higher first threshold is used to enter each state, and a lower second threshold is used to exit, requiring a stable observation time to create hysteresis and avoid repeated state fluctuations near the thresholds; under no circumstances should keys, frame counters, current alarm critical paths, unconfirmed alarm messages, or in-transit security transactions be reclaimed. Through graded degradation and hysteresis recovery, the system can prioritize maintaining the minimum set of alarms, network recovery, and security controls even under extreme pressure, and reversibly resume normal operation after the pressure is relieved.

[0080] When the above methods are applied to specific protocols, each protocol stack maintains its standard semantics. When applied to the Zigbee protocol stack, the Zigbee protocol stack maintains its neighbor table, sub-device table, routing table, source route, and security state semantics. The cross-layer resource coordination layer provides link observations of the PID master object to Zigbee routing cost calculation. The unified buffer pool provides descriptors and payload blocks for APS / NWK packets. MAC ACK, network entry, network key update, and alarm multicast are set as hard protection tasks. When there are insufficient Zigbee routing entries, priority is given to retaining the current parent route, alarm source path, and high-reliability path to the gateway. When applied to the Thread / Matter protocol stack, the Thread protocol stack maintains MLE neighbor state, Router ID, RLOC, Child Table, IPv6 neighbor cache, and network data. The shared layer only provides physical link observation and resource containers. MLE critical switching, Child Poll responses, Router maintenance, and Matter alarm messages can be prioritized based on their deadlines. If the device runs both Matter and Zigbee simultaneously, the two protocols can reuse the channel quality trend of the same physical link, but they must not reuse network keys, frame counters, or routing address states. When applied to the Sub-G private MESH protocol, the private Sub-G protocol can directly access the unified object pool and RF operation descriptor. Its time slots, frequency points, parent nodes, and retransmission status are maintained by a private logical view. In the event of a fire or severe 2.4GHz interference, Sub-G alarm forwarding can increase the service risk weight, obtain more cache and RF budget, and gradually return resources after normal operation is restored. When applied to Bluetooth Low Energy, it may not necessarily undertake MESH routing, but it can be used as a temporary network configuration or maintenance protocol access shared RF scheduling: when entering the network configuration window, the system reserves the minimum connection event resources for it, and reduces its budget after the network configuration ends; if the fire alarm task conflicts with the network configuration, the alarm task takes priority, and the Bluetooth Low Energy connection can delay or reduce the scan duty cycle within the allowable range.

[0081] From the perspective of the complete operation process, after the system starts up, it establishes the minimum budget, emergency reserve area, object pool and shared knowledge base for each protocol; during operation, it periodically collects the status of protocol resources and fire risks, updates the cross-protocol neighbor observation and association confidence, estimates the resource needs of each protocol and performs dynamic budget allocation; when a protocol requests neighbor, routing, cache or radio frequency resources, the cross-layer resource coordinator allocates them according to budget, business risk and security constraints; after the operation is completed, it updates the link, latency, failure debt and stress indicators; if the joint stress exceeds the threshold, it performs hierarchical degradation and transactional reclamation.

[0082] To verify the technical effectiveness of this embodiment, the three schemes of "completely independent resource configuration", "shared radio frequency scheduling only" and "collaborative management of this invention" can be compared under the same microcontroller, the same node scale and the same service load. The suggested indicators are shown in Table 3 below.

[0083] Table 3: Recommended Indicators for Comparing the Options

[0084] For example, with a fixed total RAM, the total number of supported neighbors, the number of concurrent messages, and the alarm burst load are compared, while the number of duplicate statistical bytes reduced due to shared physical observations is recorded. The measured data helps to illustrate that this embodiment directly improves the memory usage, message loss, and RF real-time performance of wireless communication devices.

[0085] It should be noted that the formulas, weights, thresholds, block sizes, and number of states in the above embodiments are all implementable examples and can be adjusted according to the microcontroller RAM, protocol scale, RF chip, alarm standards, and product power consumption requirements, and do not constitute a limitation on the scope of protection.

[0086] Example 2: This embodiment provides a multi-protocol MESH network resource collaborative management system deployed on a resource-constrained microcontroller. Multiple wireless protocol stacks run on the resource-constrained microcontroller, and these multiple wireless protocol stacks share the same radio frequency resources. The system includes a physical identity association module, a logical view management module, a link observation fusion module, a resource budget allocation module, and a radio frequency scheduling module.

[0087] The physical identity association module is used to determine whether the protocol identities of different wireless protocol stacks correspond to the same physical device. For multiple protocol identities that are confirmed to correspond to the same physical device, a shared physical neighbor master object is established. The shared physical neighbor master object is a stable index inside the system and is used to store physical facts that can be reused across protocols. The physical facts include at least physical capability information, spatial location information, and link observation information. The specific association method can be referred to step S1 of embodiment one.

[0088] The logical view management module is used to establish a protocol-specific logical view for each wireless protocol stack that references the shared physical neighbor master object. The protocol address and routing status of each wireless protocol stack are stored in the corresponding protocol-specific logical view. The security status of each wireless protocol stack is stored in the protocol private area and does not enter the shared physical neighbor master object. The protocol private field of any wireless protocol stack is not directly read or written by other wireless protocol stacks. The specific view structure and security isolation method can be referred to step S2 of embodiment one.

[0089] The link observation fusion module is used to map the link observations of each wireless protocol stack on the same physical link to a unified interval, and to fuse and update the shared link observation values ​​stored in the shared physical neighbor master object according to the confidence level of each link observation sample; the specific normalization and fusion method can be referred to step S3 of Embodiment 1.

[0090] The resource budget allocation module is used to periodically acquire the resource status of each wireless protocol stack and estimate the resource requirements of each wireless protocol stack; it sets a minimum hard reserve resource for each wireless protocol stack in schedulable memory, and sets an emergency reserve resource for use only for alarms, network recovery and security control; it dynamically allocates the shared elastic resource, after deducting the minimum hard reserve resource and the emergency reserve resource, among the multiple wireless protocol stacks according to the resource requirements of each wireless protocol stack, and the shared elastic resource includes at least packet buffer resources; the specific requirement estimation and allocation method can be referred to step S5 of embodiment one.

[0091] The radio frequency (RF) scheduling module is used to receive unified RF operation descriptors submitted by each wireless protocol stack. The unified RF operation descriptor includes at least the latest completion time, the expected duration, and the service risk. The module performs feasibility filtering on candidate RF operations based on the protocol switching time and the latest completion time. In the set of feasible RF operations, the module determines the scheduling priority of each candidate RF operation based on its service risk, deadline urgency, and protocol switching cost. The module schedules the candidate RF operations to the RF resources for execution according to the scheduling priority. The specific scheduling method can be referred to step S8 of Embodiment 1.

[0092] In terms of physical architecture, the above modules constitute a cross-layer resource coordinator located between multiple wireless protocol stacks and the underlying radio frequency driver. It works in conjunction with the device and service layers, the shared resource plane, and the dedicated logical views of each protocol. The shared resource plane provides a physical neighbor knowledge base, public link observation, an elastic buffer pool, an object pool, and a radio frequency operation queue. Optionally, the system may further include functional modules for performing steps S4 (routing resource sharing), S6 (elastic buffer pool management), S7 (transactional recycling), and S9 (tiered degradation) in Embodiment 1. The specific processing procedures of each module refer to the corresponding steps in Embodiment 1.

[0093] In terms of hardware implementation, the system can be implemented by a processor, a memory, and a computer program stored in the memory within the resource-constrained microcontroller. When the processor executes the computer program, it implements the functions of each of the aforementioned modules. Through this modular structure, the system can reduce redundant storage and resource conflicts while maintaining secure isolation between protocols, ensuring reliable transmission of critical services.

[0094] Example 3: This embodiment provides a multi-protocol MESH network, including multiple network nodes. Each network node includes a resource-constrained microcontroller and a radio frequency module connected to the resource-constrained microcontroller. Multiple wireless protocol stacks run on the network nodes, and a multi-protocol MESH network resource collaborative management system as described in Embodiment 2 is deployed to collaboratively manage the neighbor information, link observation, packet buffer resources, and radio frequency operations of the network nodes. The network nodes communicate with each other through the multiple wireless protocol stacks.

[0095] The network nodes include, for example, low-power alarm terminal nodes, routing nodes, and gateway nodes. Low-power fire alarm devices can act as terminal nodes, simultaneously handling smoke, temperature, and carbon monoxide alarms, home networking, Matter access, device configuration, and emergency cascading functions. Gateway nodes can simultaneously run Zigbee coordinator functions and Thread border router auxiliary functions. Nodes in the network reuse physical facts by sharing physical neighbor master objects, maintain address, routing, and security state isolation through protocol-specific logical views, dynamically allocate and load-bearing cache resources within nodes, and ensure radio frequency determinism of alarm messages through joint radio frequency scheduling. When a fire alarm occurs in the network, nodes and protocols carrying alarm services can obtain emergency reserved resources and higher radio frequency scheduling priority. Sub-G alarm cascading links can increase service risk weights to ensure alarm forwarding even under severe 2.4GHz interference. Therefore, the entire network can still guarantee reliable transmission of fire alarm information and the basic operation of various protocols under resource-constrained conditions.

[0096] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0097] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A resource collaborative management method for multi-protocol MESH networks, characterized in that, Applied to a microcontroller, wherein multiple wireless protocol stacks run on the microcontroller and the multiple wireless protocol stacks share the same radio frequency resources, the method includes: Determine whether the protocol identities of different wireless protocol stacks correspond to the same physical device. For multiple protocol identities that are confirmed to correspond to the same physical device, establish a shared physical neighbor master object in the cross-layer resource coordination layer. The shared physical neighbor master object is an index inside the cross-layer resource coordination layer and is used to store physical facts that can be reused across protocols. The physical facts include at least physical capability information, spatial location information, and link observation information. A protocol-specific logical view is established for each wireless protocol stack, referencing the shared physical neighbor master object. The protocol address and routing state of each wireless protocol stack are stored in the corresponding protocol-specific logical view. The security state of each wireless protocol stack is stored in the protocol private area and does not enter the shared physical neighbor master object. The protocol private field of any wireless protocol stack is not directly read or written by other wireless protocol stacks. The link observations of each wireless protocol stack on the same physical link are mapped to a unified interval, and the shared link observation values ​​stored in the shared physical neighbor master object are updated according to the confidence level of each link observation sample. The system periodically acquires the resource status of each wireless protocol stack and estimates the resource requirements of each wireless protocol stack; it sets a minimum hard reserve resource for each wireless protocol stack in schedulable memory and sets an emergency reserve resource for use only for alarm, network recovery and security control; it dynamically allocates the shared elastic resource, after deducting the minimum hard reserve resource and the emergency reserve resource, among the multiple wireless protocol stacks according to the resource requirements of each wireless protocol stack, and the shared elastic resource includes at least packet buffer resources. The system receives unified radio operation descriptors submitted by each wireless protocol stack. The unified radio operation descriptor includes at least the latest completion time, the expected duration, and the service risk. The system performs feasibility filtering on candidate radio operations based on the protocol switching time and the latest completion time. In the set of feasible radio operations, the system determines the scheduling priority of each candidate radio operation based on its service risk, deadline urgency, and protocol switching cost. The system schedules the candidate radio operations to the radio resources for execution according to the scheduling priority.

2. The resource collaborative management method for multi-protocol MESH networks according to claim 1, characterized in that, The determination of whether the protocol identities of different wireless protocol stacks correspond to the same physical device includes: When a binding statement is obtained declaring that multiple protocol identities belong to the same physical entity, the signature or message authentication code of the binding statement is verified, and the device serial number digest, protocol identity digest and validity period in the binding statement are checked. When the verification is successful and the binding permission is valid, the multiple protocol identities are associated with the same shared physical neighbor master object. When the binding statement is absent, weak evidence is obtained. This weak evidence includes at least two of the following: hardware fingerprint similarity, correlation of received signal strength changes at multiple times, clock drift similarity, spatial location consistency, online / offline time synchronization, and product capability consistency. The association confidence level is calculated based on the normalized confidence level and corresponding weights of each weak piece of evidence. The weights are determined according to the forgery difficulty, stability, and sample quality of the evidence. An association is established when the association confidence level reaches a strong association threshold. A candidate relationship is established and samples are collected again when the association confidence level is between the observation threshold and the strong association threshold. Each protocol identity remains independent when the association confidence level is below the observation threshold. No association is established when there are rejection conditions such as certificate subject conflict, spatial location mutual exclusion, or capability set mutual exclusion. After establishing the association, if subsequent observations show contradictions and the association confidence level is below the splitting threshold for several consecutive periods, the original shared physical neighbor master object is split into independent objects, and a common statistical summary is copied to each protocol-specific logical view.

3. The resource collaborative management method for multi-protocol MESH networks according to claim 1, characterized in that, The step of mapping link observations of the same physical link from each wireless protocol stack to a unified interval, determining the confidence level of each link observation sample, and fusion updating the shared link observations based on the confidence level includes: The original observations are mapped to a unified range according to the boundary defined by the protocol. For observation types where the smaller the value, the better the link status, reverse mapping is used, and the original observation value, source protocol, and sampling time are preserved. The confidence level of each link observation sample is determined based on sampling freshness, recent sample variance, measurement confidence of the source protocol, and consistency with observations from other sources. Samples with confidence levels below the minimum adoption threshold are not used to update the shared link observation values. The update coefficients are determined based on the confidence level and the environmental change gain. The shared link observations are then weighted and fused according to the update coefficients. The environmental change gain is determined based on the degree of deviation between the current observation and the current shared link observation, whether the change direction of recent multiple observations is consistent, and whether it is accompanied by packet loss, retransmission, or channel occupancy degradation. Physical link edge objects are established in the cross-layer resource coordination layer. The physical link edge objects store the shared link observations, trends and observation confidence between two shared physical neighbor master objects. Each wireless protocol stack generates a protocol-specific routing metric based on the physical link edge objects and the routing status of the protocol. The final path selection satisfies the loop, address, role and security constraints of the protocol.

4. The resource collaborative management method for multi-protocol MESH networks according to claim 1, characterized in that, The estimation of resource requirements for each wireless protocol stack and the dynamic allocation include: The resource requirements of each wireless protocol stack are obtained by normalizing and weighting the number of active neighbors, queue occupancy, routing change rate, failure debt, deadline pressure, service risk, recent load peak and load growth trend. The weights of service risk and deadline pressure items are increased for wireless protocol stacks that undertake alarm or network recovery services, and only positive growth trends are included in the resource requirements. After ensuring the minimum hard reserved resources for each wireless protocol stack, the shared elastic resources are allocated according to the weighted ratio of the resource requirements and service weights of each wireless protocol stack. When the allocation amount of a certain wireless protocol stack reaches its budget limit, the allocation amount is truncated, and the remaining shared elastic resources are iteratively allocated among the wireless protocol stacks that have not reached their budget limits until there are no remaining resources or all wireless protocol stacks have reached their budget limits. When the difference between the recalculated resource budget and the current resource budget exceeds the adjustment threshold and continues for a preset number of monitoring cycles, a budget adjustment is performed. When entering an alarm state, the waiting period is skipped and the budget is immediately increased from the shared elastic resources or the emergency reserved resources to the wireless protocol stack undertaking the alarm service. After exiting the alarm state, the resources are returned according to the preset slow return strategy.

5. The resource collaborative management method for multi-protocol MESH networks according to claim 1, characterized in that, The message caching resources are managed through an elastic cache pool, and the management methods of the elastic cache pool include: Each wireless protocol stack's message buffer is managed by a unified message descriptor. The unified message descriptor includes at least the owner protocol identifier, service risk level, latest completion time, reference count, generation number, payload block chain pointer, whether reclamation is allowed, and security zeroing flag. Each wireless protocol stack accesses the unified message descriptor through a handle. The payload area is divided into multiple fixed-size block pools, and a message occupies one block or multiple linked blocks. During allocation, candidate block combinations that meet the message length and alignment requirements are enumerated. The allocation cost is determined based on the internal fragmentation amount, number of blocks, linked list operation cost, and cross-protocol ownership switching and zeroing cost of each candidate block combination. The candidate block combination with the lowest allocation cost is selected for allocation. Alarm messages will preferentially use the cache corresponding to the minimum hard reserve resource of this protocol. If the hard reserve resource is insufficient, the cache corresponding to the shared elastic resource will be used. When the risk level of the alarm message reaches the alarm or emergency level, the cache corresponding to the emergency reserve resource is allowed to be used. Ordinary business messages are prohibited from using the cache corresponding to the emergency reserve resource.

6. The resource collaborative management method for multi-protocol MESH networks according to claim 1, characterized in that, It also includes transactional garbage collection of resource objects: When shared memory is less than a preset threshold, for candidate objects that have passed hard filtering, the retention value is calculated based on business criticality, alarm relevance, route centrality, object age, degree of dependence, reconstruction cost, memory usage, and substitutability. Objects with the lowest retention value are prioritized for reclamation. Among them, objects with non-zero reference counts, those performing radio frequency operations, those waiting for protocol responses, those participating in security transactions, those on the current alarm critical path, those holding a unique unconfirmed alarm message, or those in the process of protocol state transition are not included in the reclamation candidate set. The reclamation process includes: a first phase, marking the object to be reclaimed as silent to prevent new references from being added, and waiting for the in-transit operations of the object to finish; a second phase, saving a reconstructable summary of the object, and notifying all protocol-specific logical views referencing the object to unbind; after confirming that the object's reference count is zero and all protocol-specific logical views have been unbound, releasing the resources occupied by the object and incrementing its generation number, causing old handles to be denied access due to generation number mismatch; if the object becomes a critical object again during the silent period, the reclamation is canceled and it is restored to an active state; For memory blocks that may contain application data or security material, zero them out before returning them to the shared free area, and update the quota statistics of the relevant wireless protocol stack synchronously when object ownership is switched between wireless protocol stacks.

7. The resource collaborative management method for multi-protocol MESH networks according to claim 1, characterized in that, The radio frequency scheduling specifically includes: The feasibility filtering includes: determining whether a candidate radio frequency operation can be completed before its latest completion time based on the protocol switching time and the end time of the current task, and configuring a hard hold window for critical radio frequency operations; delaying, downgrading, or rejecting infeasible ordinary radio frequency operations, and allowing alarm and emergency radio frequency operations to enter the emergency channel; In the set of feasible radio frequency (RF) operations, business risk, deadline urgency, failure debt, queue pressure, and task criticality are considered as benefit items, while protocol switching costs and expected energy consumption are considered as cost items. The joint utility density of each candidate RF operation within a unit RF occupation time is calculated, and the candidate RF operation with the highest joint utility density is prioritized for scheduling. When the utility difference between the best candidate RF operation of the current protocol and the best candidate RF operation of other protocols is less than the switching hysteresis value, the RF operation of the current protocol is prioritized for execution. When a radio frequency operation is rejected or preempted due to resource conflicts, the failure debt of the corresponding wireless protocol stack is added according to the task category. After the radio frequency operation is successfully completed, the failure debt gradually decreases, and the failure debt has an upper limit. For preemptible radio operations that have declared checkpoint capabilities, preemption is performed only if the preemption benefit outweighs the interruption cost and the preempted radio operation can still be completed before its latest completion time. The preempted radio operation is then re-enqueued after saving its operation progress, remaining payload, and radio status summary.

8. The resource collaborative management method for multi-protocol MESH networks according to claim 1, characterized in that, It also includes combined overload detection and graded degradation: A joint stress metric is formed based on schedulable memory utilization, descriptor utilization, queue utilization, deadline omission rate, and radio frequency scheduling conflict rate. When the joint stress indicator exceeds the warning threshold, compress link observation history, reduce diagnostic logs and ordinary telemetry frequency, and tighten shared quotas for ordinary services; when the joint stress indicator exceeds the critical threshold, reclaim low-value alternative routes, merge ordinary packets, reduce non-critical scanning and discovery frequency, and limit the rate of low-risk services; when the joint stress indicator exceeds the emergency threshold, retain only alarm, network recovery, security control, and minimum protocol maintenance services, and open the emergency reserved resources. Entering each level of degraded state uses a first threshold, and exiting uses a second threshold lower than the first threshold, requiring a stable observation time to form a hysteresis; when the pressure continues to be lower than the exit threshold, neighbor history, cache and alternative routes are restored in batches; in any degraded state, security context, current alarm critical path objects and unacknowledged alarm messages are not reclaimed.

9. A resource collaborative management system for multi-protocol MESH networks, characterized in that, Deployed on a microcontroller, the microcontroller running multiple wireless protocol stacks, and the multiple wireless protocol stacks sharing the same radio frequency resources, the system includes: The physical identity association module is used to determine whether the protocol identities of different wireless protocol stacks correspond to the same physical device. For multiple protocol identities that are confirmed to correspond to the same physical device, a shared physical neighbor master object is established. The shared physical neighbor master object is a stable index inside the system and is used to store physical facts that can be reused across protocols. The physical facts include at least physical capability information, spatial location information, and link observation information. The logical view management module is used to establish a protocol-specific logical view for each wireless protocol stack that references the shared physical neighbor master object. The protocol address and routing status of each wireless protocol stack are stored in the corresponding protocol-specific logical view. The security status of each wireless protocol stack is stored in the protocol private area and does not enter the shared physical neighbor master object. The protocol private field of any wireless protocol stack is not directly read or written by other wireless protocol stacks. The link observation fusion module is used to map the link observations of each wireless protocol stack on the same physical link to a unified interval, and to fuse and update the shared link observation values ​​stored in the shared physical neighbor master object according to the confidence level of each link observation sample. The resource budget allocation module is used to periodically obtain the resource status of each wireless protocol stack and estimate the resource requirements of each wireless protocol stack; it sets a minimum hard reserve resource for each wireless protocol stack in schedulable memory, and sets an emergency reserve resource for alarm, network recovery and security control only; it dynamically allocates the shared elastic resource after deducting the minimum hard reserve resource and the emergency reserve resource among the multiple wireless protocol stacks according to the resource requirements of each wireless protocol stack, and the shared elastic resource includes at least packet buffer resources; The radio frequency scheduling module is used to receive unified radio frequency operation descriptors submitted by each wireless protocol stack. The unified radio frequency operation descriptor includes at least the latest completion time, the expected duration, and the service risk. The module performs feasibility filtering on candidate radio frequency operations based on the protocol switching time and the latest completion time. In the set of feasible radio frequency operations, the module determines the scheduling priority of each candidate radio frequency operation based on the service risk, deadline urgency, and protocol switching cost. The module schedules the candidate radio frequency operations to the radio frequency resources for execution according to the scheduling priority.

10. A multi-protocol mesh network, characterized in that, It includes multiple network nodes, each of which includes a microcontroller and a radio frequency module connected to the microcontroller; multiple wireless protocol stacks run on each network node, and a multi-protocol MESH network resource collaborative management system as described in claim 9 is deployed to collaboratively manage the neighbor information, link observation, packet buffer resources and radio frequency operations of the network nodes, and the network nodes communicate with each other through the multiple wireless protocol stacks.