Intelligent gateway device interconnection method of bluetooth ad hoc network protocol
By monitoring the motion status and communication quality of node devices and using pre-trained models to identify and predict topology oscillation events, the problem of task interruption in Bluetooth Mesh networks under high-mobility node scenarios is solved, achieving high reliability of network services and continuity of user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI RENWEI ELECTRONIC TECH CO LTD
- Filing Date
- 2026-05-27
- Publication Date
- 2026-06-23
AI Technical Summary
Bluetooth Mesh networks face topology oscillation problems in high-mobility node scenarios, which existing technologies struggle to identify and predict in real time, leading to task interruptions and service discontinuities.
By monitoring the motion status and communication quality of node devices, and utilizing a pre-trained topology oscillation event prediction model, topology oscillation events can be identified and predicted, enabling early intervention and pre-migrating of tasks, thus ensuring high reliability of network services.
It achieves accurate identification and prediction of topology oscillations in highly dynamic scenarios, avoiding task interruption and ensuring the continuity of user experience and the reliability of network services.
Smart Images

Figure CN122269404A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication data processing technology, and in particular to a method for interconnecting smart gateway devices using the Bluetooth self-organizing network protocol. Background Technology
[0002] Bluetooth Mesh networking, as an advanced wireless self-organizing network technology, is widely used in smart homes, industrial IoT, and smart warehousing scenarios due to its low power consumption, high coverage, and many-to-many communication capabilities. In these scenarios, the communication and processing capabilities of a single Bluetooth Mesh gateway are limited, typically requiring the deployment of multiple smart gateways to expand network coverage and system capacity, and to achieve data aggregation and collaborative processing between devices.
[0003] The relevant technologies mainly focus on optimizing network performance under relatively stable conditions. In practical applications, especially in scenarios with highly mobile nodes (such as warehouse AGV robots and mobile robot clusters), the network frequently faces the problem of "topology oscillation" caused by the collective movement of nodes, batch wake-ups, or dense failures. That is, a large number of nodes join or leave the network simultaneously in a very short period of time, causing drastic and transient changes in the network topology.
[0004] Faced with such topology oscillations, there are significant shortcomings: First, its dynamic node management and load balancing mechanisms are reactive, typically detecting and adjusting only after the oscillation occurs, resulting in lag and difficulty in handling instantaneous impacts. Second, and more critically, regarding task scheduling, while task sharding is mentioned, a sophisticated mechanism for seamless task takeover between gateways is lacking. When topology changes cause nodes performing critical tasks (such as continuous robot trajectory control or real-time video monitoring streams) to disconnect from the source gateway, the task is interrupted or dropped, and restarted on a new gateway after topology stabilization. This can lead to task execution failures, data loss, or significant service interruptions, failing to meet the stringent requirements for task continuity in scenarios such as industrial control. Summary of the Invention
[0005] This application provides a method for interconnecting smart gateway devices using the Bluetooth self-organizing network protocol, enabling accurate identification and prediction of topology oscillation events, thereby facilitating early intervention and monitoring of the task execution network and achieving high reliability of network services.
[0006] This application provides a method for interconnecting smart gateway devices using the Bluetooth self-organizing network protocol, the method comprising:
[0007] The S101 connects to multiple smart gateways based on a pre-built Bluetooth Mesh network; S102 periodically monitors the motion status data and communication quality indicators of each node device in the Bluetooth Mesh network according to the preset monitoring interval, and identifies topology oscillation events through the preset cluster mobility analysis mechanism. The preset cluster mobility analysis mechanism is set as follows: determine the dynamic risk node group based on the migration probability value of each node device, generate a spatial situation feature vector, and output the identification result of the topology oscillation event using the pre-trained topology oscillation event prediction model. S103, based on the identification results of topological oscillation events, triggers pre-response operations for dynamic risk node groups.
[0008] Preferably, the motion state data includes position coordinates, velocity vector, and motion trajectory, and the communication quality index includes the Received Signal Strength Index (RSSI) value.
[0009] Preferably, the topology oscillation event is defined as: within the next monitoring interval, node devices collectively migrate from the coverage area of the currently serving smart gateway to the coverage area of other gateways.
[0010] Preferably, the preset cluster movement analysis mechanism specifically includes: S201, obtain the position coordinate matrix P and velocity vector set of the node device. Signal intensity change rate sequence ; S202, For each node device i, calculate the migration probability value of the node device; S203, filter out node devices whose migration probability value is greater than the preset migration probability threshold and have the same potential target gateway to form a dynamic risk node group; S204. For each dynamic risk node group, generate its spatial situation feature vector, input it into the pre-trained topological oscillation event prediction model, and output the prediction result, which is whether a topological oscillation event has occurred.
[0011] Preferably, the position coordinate matrix of the node device , Let i be the two-dimensional coordinates of the i-th node device; Velocity vector set , Let be the velocity vector of the i-th node device; Signal intensity change rate sequence , , Let i be the signal strength value of the i-th node device at the current moment. Let i be the average signal strength value of the i-th node device within the previous preset window. It is the difference between the current time and the start time of the previous preset window.
[0012] Preferably, the migration probability value of the node device is calculated according to the following formula:
[0013] in, Let be the migration probability value of node device i. The rate of change of signal strength reflects the rate of connection quality degradation. Let be the radial relative velocity of node device i relative to its potential target gateway. The motion direction consistency coefficient is calculated by comparing the current motion direction of the node device with its historical trajectory directions. and and These are preset weight coefficient values, set based on expert experience and actual conditions, ranging from 0 to 1.
[0014] Preferably, the potential target gateway of the node device is determined as follows: A1. For node device i, scan all currently detectable gateways to form a candidate gateway set. k is the number of candidate gateways; A2. From the candidate gateway set, select the gateway with the highest attractiveness score as the potential target gateway. , Gateway The attractiveness score for node device i.
[0015] Preferably, the spatial situation feature vector of the dynamic risk node group includes risk scale ratio, average migration confidence, motion coordination index, spatial clustering degree, and group distribution radius; The risk scale ratio is set as the ratio of the number of node devices in the dynamic risk node group to the total number of node devices. The average migration confidence is set as the average of the migration probability values of all node devices in the dynamic risk node group; The motion coordination index is set as the standard deviation of the radial relative velocity of all node devices in the dynamic risk node group; The spatial clustering degree and the group distribution radius are determined based on the location coordinates of the node devices in the dynamic risk node group.
[0016] Preferably, the spatial clustering degree and the group distribution radius are determined based on the location coordinates of node devices in the dynamic risk node group, specifically including: Calculate the position vector of the center point of the risk node group:
[0017] in, Let be the position vector of the center point of the risk node group. Let be the position vector of node device i in the risk node group. The number of node devices in a dynamic risk node group; Calculate the location covariance matrix of the spatial distribution :
[0018] Spatial clustering is calculated using the largest and smallest eigenvalues of the covariance matrix.
[0019] Preferably, the method for obtaining the topological oscillation event prediction model is as follows: C1. Collect spatial situation feature vectors of each dynamic risk node group within a large number of historical monitoring periods, and use the corresponding topological oscillation event as a label for whether it actually occurred in the next monitoring period. C2. Label each historical spatial situation feature vector and use it as a training sample set to train the pre-selected neural network structure, continuously optimize the model parameters, and obtain the final topological oscillation event prediction model.
[0020] One or more technical solutions provided in this application have at least the following technical effects or advantages: By comprehensively analyzing the motion state, communication quality indicators, and motion intentions of node devices, the probability of individual migration is accurately calculated. This is then aggregated to generate a spatial situation feature vector of a dynamic risk node group. With the help of a pre-trained neural network model, the system can accurately predict topological oscillation events and their intensity, thus constructing a progressive identification model from "individual risk" to "group risk" and then to "system event". Based on this, differentiated pre-response operations can be proactively triggered based on the prediction results, thereby completing key monitoring of critical tasks before topological oscillations occur. This effectively solves the problem of passive task interruption caused by the processing lag of existing reactive mechanisms. Ultimately, it achieves seamless business continuity and high network service reliability for users in highly dynamic scenarios such as warehouse AGVs and mobile robot clusters. Attached Figure Description
[0021] Figure 1 This is a flowchart illustrating the method for interconnecting smart gateway devices using the Bluetooth self-organizing network protocol, as described in an embodiment of the present invention. Detailed Implementation
[0022] To facilitate understanding of the present invention, a more complete description of this application will be given below with reference to the accompanying drawings, which illustrate preferred embodiments of the invention. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to enable a more thorough and complete understanding of the disclosure of the present invention.
[0023] It should be noted that the terms "vertical," "horizontal," "up," "down," "left," "right," and similar expressions used in this article are for illustrative purposes only and do not represent the only possible implementation.
[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains; the terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to limit the invention; the term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0025] Example 1: Figure 1 This is a flowchart illustrating the method for interconnecting smart gateway devices using the Bluetooth self-organizing network protocol according to an embodiment of the present invention.
[0026] like Figure 1 As shown, a method for interconnecting smart gateway devices using the Bluetooth self-organizing network protocol includes the following steps: S101, based on a pre-built Bluetooth Mesh network, establishes a distributed consensus cluster composed of multiple smart gateways after the Bluetooth Mesh network is interconnected with multiple smart gateways, for collaborative management of network topology status and task allocation information.
[0027] Specifically, the constructed Bluetooth Mesh network is configured with multiple smart gateways and several mobile node devices, and a distributed consensus cluster is established. For example, the smart gateways use a Raspberry Pi 4B development board with a Linux system running a custom gateway management program, the mobile node devices use an nRF52840 chipset that supports the Bluetooth 5.0 protocol, and the distributed consensus cluster is implemented based on the improved Raft protocol with an election period of 200ms ± 50ms. The cluster maintains a shared state machine and stores topology data and task allocation information.
[0028] S102 periodically monitors the motion status data and communication quality indicators of each node device in the Bluetooth Mesh network according to the preset monitoring interval (which can be set to 5s or dynamically adjusted according to the actual application scenario), and identifies topology oscillation events through the preset cluster movement analysis mechanism.
[0029] Specifically, motion state data includes position coordinates, velocity vector, and motion trajectory, while communication quality indicators include Received Signal Strength Indicator (RSSI) and Link Quality Indicator (LQI). For example, position coordinates are obtained via a GPS module, velocity vector is calculated via an IMU (Inertial Measurement Unit), a motion model is built based on historical trajectory data, data fusion is performed using Kalman filtering, RSSI values (Received Signal Strength, measurement range -100dBm to -20dBm) are obtained via a Bluetooth baseband chip, and LQI values (Link Quality Indicator, value range 0-255) are obtained via a link layer controller.
[0030] Specifically, a topology oscillation event is defined as: within the next monitoring interval, node devices collectively migrate from the coverage area of the currently serving smart gateway (source gateway) to the coverage area of another smart gateway (target gateway).
[0031] In some embodiments, the preset cluster mobility analysis mechanism is configured to: determine the dynamic risk node group based on the migration probability value of each node device, generate a spatial situation feature vector, and output the identification result of the topological oscillation event using a pre-trained topological oscillation event prediction model.
[0032] Specifically, it includes: S201, obtain the position coordinate matrix P and velocity vector set of the node device. Signal intensity change rate sequence .
[0033] Wherein, position coordinate matrix , Let i be the two-dimensional coordinates of the i-th node device, and let v be the set of velocity vectors. , Let be the velocity vector of the i-th node device. , , Let i be the signal strength value of the i-th node device at the current moment. This represents the average signal strength value of the i-th node device within the previous preset window (which can be set to the past 5 seconds, or adjusted according to the actual scenario). It is the difference between the current time and the start time of the previous preset window.
[0034] S202, for each node device i, the migration probability value of the node device is calculated according to the following formula:
[0035] in, Let be the migration probability value of node device i. The rate of change of signal strength reflects the rate of connection quality degradation. Let be the radial relative velocity of node device i relative to its potential target gateway. The motion direction consistency coefficient is calculated using the cosine similarity between the current motion direction of the node device and its historical trajectory direction (the historical average direction within a preset window). and and These are preset weight coefficient values, set based on expert experience and actual conditions, ranging from 0 to 1.
[0036] For example, the migration probability value is between 0 and 1, with the closer to 1 indicating a greater likelihood of migration; the signal strength change rate is used to quantify the degradation trend of link quality and is one of the main driving factors of migration. It is obtained by periodically (at a preset time interval, e.g., every 1 second) scanning the BLE broadcast channel in real time. If the signal is steadily deteriorating ( A negative value with a large absolute value indicates that the node device is moving away from the gateway; the radial relative velocity represents the radial velocity component of the node device moving toward (or away from) a potential target gateway in physical space. The larger the value, the faster the node device is approaching the potential target gateway, resulting in a higher migration probability; the motion direction consistency coefficient is used to quantify the degree of consistency between the current motion direction and its historical average direction. The larger the value, the more stable and purposeful the motion trajectory, the clearer its intention to switch gateways, and the higher the migration probability.
[0037] and and These are used to balance the influence of signal changes, relative velocity, and direction of motion on migration probability, respectively. For example, in complex environments where signal fluctuations are large, the influence might be lowered. In high-speed moving scenarios, the setting may be increased. For example, it can be trained through supervised learning: collect historical migration data, which identifies which node devices ultimately migrated, then use this data to train the model, optimize it using a logistic regression model, and find the one that best predicts migrations. and and value.
[0038] It should be noted that the signal strength change rate, radial relative velocity, and motion direction consistency coefficient need to be normalized and dimensionally unified. This invention will not elaborate on this.
[0039] It should be noted that the method for determining the potential target gateway of the node device is as follows: A1. For node device i, scan all currently detectable gateways (excluding the currently serving gateway) to form a candidate gateway set. k is the number of candidate gateways.
[0040] A2. From the candidate gateway set, select the gateway with the highest attractiveness score as the potential target gateway. .
[0041] Specifically, the attractiveness score of candidate gateways is determined based on signal strength trends, relative motion trends, and gateway load:
[0042] in, Gateway The attractiveness score for node device i. For node device i, receive from the gateway The current signal strength, For node device i relative to the gateway radial velocity, Gateway The current load, , and These are preset weight values, set between 0 and 1, and can be set according to actual conditions and historical experience.
[0043] It should be noted that, , , All parameter values are normalized and used for weighted summation to obtain the attractiveness scores of candidate gateways, ensuring comparability.
[0044] S203. Select node devices with migration probability values greater than the preset migration probability threshold (individual risk threshold, for example, set to 0.65) and the same potential target gateway to form a dynamic risk node group.
[0045] S204. For each dynamic risk node group, generate its spatial situation feature vector, input it into the pre-trained topological oscillation event prediction model, and output the prediction result, which is whether a topological oscillation event has occurred and the degree of oscillation.
[0046] In some embodiments, the spatial situational feature vector of a dynamic risk node group includes risk scale ratio, average migration confidence, motion coordination index, spatial clustering, and group distribution radius, specifically including: B1. The ratio of the number of node devices in the dynamic risk node group to the total number of node devices is determined as the risk scale ratio f1, which represents the proportion of risk node devices in the whole.
[0047] B2. The average migration probability value of all node devices in the dynamic risk node group is determined as the average migration confidence f2, which represents the average strength of the migration intention of the group.
[0048] B3. The motion coordination index (i.e., the standard deviation of the radial relative velocity of all node devices in a dynamic risk node group, used to characterize the coordination of the motion of node devices within the group; the smaller the value, the more consistent the actions) is calculated according to the following formula:
[0049] in, Motor coordination index, This refers to the number of node devices in a dynamic risk node group. Let i be the radial relative velocity of node device i in a dynamic risk node group relative to its potential target gateway. This represents the average radial relative velocity of all node devices in the dynamic risk node group.
[0050] B4. Based on the location coordinates of the node devices in the dynamic risk node group, the spatial clustering degree f5 and the group distribution radius f6 are obtained by calculating the center point, location covariance matrix, and eigenvalues of the covariance matrix of the dynamic risk node group.
[0051] Specifically, step B4 includes: 1) Calculating the center point of the risk node cluster is the basic reference point for analyzing its spatial distribution:
[0052] in, This is the location vector (i.e., location coordinates) of the center point of the risk node group. , This refers to the number of node devices in a dynamic risk node group. Let i be the position vector of node device i in the risk node group.
[0053] 2) Calculating the spatial covariance matrix is key to understanding the shape and orientation of the node group's spatial distribution, representing how the nodes are distributed around the center point:
[0054] in, Let covariance matrix be the variance matrix. This refers to the number of node devices in a dynamic risk node group. Let be the position vector of node device i in the risk node group. This is the position vector of the center point of the risk node group.
[0055] For example, , , The physical meaning of a matrix: The top left element of the matrix This measures the dispersion (variance) of node devices in the X direction; the element in the bottom right corner of the matrix. It measures the degree of dispersion of node devices in the Y direction. The off-diagonal elements of the matrix measure the systematic change relationship (covariance) between the X and Y directions. If the node devices diffuse in the X direction, they also diffuse synchronously in the Y direction, then the covariance is positive.
[0056] 3) The spatial clustering degree is calculated using the eigenvalues of the covariance matrix:
[0057] in, and The ratio of the minimum and maximum eigenvalues of the covariance matrix eliminates the influence of dimensions and reflects the spatial concentration of the node group. The eigenvectors indicate the primary and secondary directions of the point cloud distribution. The corresponding feature vectors point in the direction where the point cloud is most dispersed. The corresponding feature vectors point in the direction where the point cloud is most concentrated. and These represent the scale of the distribution range in these two principal directions, which can be understood as the "variance intensity" of the point cloud in these two principal axis directions.
[0058] Therefore, it not only focuses on the number of node devices that need to move, but also further reveals the structural characteristics of node group movement through the spatial clustering index, which is highly... This means that the nodes are moving in a tight, orderly structure (like a convoy or queue), which is very likely driven by the same task or instruction. The resulting topology oscillations will be concentrated, instantaneous, and have a huge impact on the local network; therefore, the system must take the highest level of countermeasures. This means that the nodes move sporadically and randomly, and even if the number reaches the target, their impact on the network is dispersed and gradual. The system can adopt a more moderate resource allocation strategy. The originally vague concept of "group" has been precisely quantified into an indicator that can reflect its internal organizational structure and potential threat level. This improves the predictive ability from "knowing that an upheaval will occur" to "knowing the intensity of the upheaval." This provides a crucial decision-making basis for realizing differentiated and accurate resource pre-allocation and migration strategies, constituting a significant technological advancement.
[0059] 4) Calculate the population distribution radius:
[0060] in, The distribution radius of the group represents the absolute scale of the distribution range of the risk node group. Let be the position vector of node device i in the risk node group. This is the position vector of the center point of the risk node group.
[0061] In some embodiments, the topological oscillation event prediction model is obtained in the following ways: C1. Collect spatial situation feature vectors of each dynamic risk node group within a large number of historical monitoring periods, and use the label as whether a topological oscillation event (and its degree of oscillation) actually occurred in the next monitoring period. If a topological oscillation event occurs, it is labeled as 1; otherwise, it is labeled as 0.
[0062] In other embodiments, if the prediction result shows a topological oscillation event, it may also include the degree of oscillation. The degree of oscillation is quantified between 0 and 1. The larger the value, the greater the degree of oscillation. It can be labeled according to expert experience (experts make manual assessments based on the actual number of topological oscillations in the dynamic risk node group and the smoothness of the task (i.e., the task is stuck or interrupted). This invention does not limit this.
[0063] C2. Label each historical spatial situation feature vector and use it as a training sample set. Train the pre-selected neural network structure and continuously optimize the model parameters to obtain the final topological oscillation event prediction model. This model is used to learn the input spatial situation feature vector and output the topological oscillation probability value. When the probability value is greater than the preset probability threshold (set to 0.9), the prediction result is determined to be a topological oscillation event.
[0064] S103, based on the identification results of topological oscillation events, triggers pre-response operations for dynamic risk node groups to ensure the continuity of critical tasks.
[0065] The pre-response operation refers to the preparatory operation based on the prediction results of the topology oscillation event, which is used to avoid task interruption caused by the collective migration of node devices.
[0066] For example, the pre-response operation may be: real-time monitoring and focused observation of all node devices in the dynamic risk node group performing critical tasks (critical tasks are pre-marked and determined, and are marked in the list of all execution tasks of the node devices) according to predefined device-gateway interconnection rules. Specifically: The predefined rules are set by administrators or experts based on historical experience. For example, the rules include: when the oscillation degree of the topology oscillation event is greater than 0.8, the task execution status of the relevant node devices is sampled at high frequency (e.g., once per second), and the task data packet loss rate is recorded. The shared state machine of the distributed consistency cluster is used to monitor the task execution indicators (such as task latency and data throughput) of the dynamic risk node group in real time, and trigger an alarm mechanism when the indicators are abnormal so that manual intervention can be carried out. Therefore, by actively monitoring and alerting, the risk of unintentional task interruption can be reduced, making it suitable for scenarios where task continuity requirements are not high (such as environmental sensor data acquisition).
[0067] For example, the pre-response operation can also be: performing a pre-migration of the task status and data of critical tasks associated with dynamic risk node groups from the current service's source gateway to the potential target gateway. Specifically, this includes the following sub-steps: S301, Generate task pre-migration plan: Based on the prediction results of the topological oscillation event (including whether the event occurred and the degree of oscillation) and the predefined task criticality level, a task pre-migration plan is generated.
[0068] The criticality level of a task is determined by a predefined task attribute level table, which stores the task ID, task type, required resources, maximum allowable interruption time, and the corresponding criticality level (including high, medium, and low). For example, a robot continuous trajectory control task is defined as high criticality, and an environmental sensor data acquisition task is defined as low criticality.
[0069] The degree of oscillation is used to adjust the urgency of migration: When the oscillation level is greater than 0.8, all critical tasks must be pre-migrated immediately; When the oscillation level is between 0.5 and 0.8, only critical tasks with a criticality level of high and medium are migrated; When the oscillation level is less than 0.5, only critical tasks with a high criticality level are migrated.
[0070] The task pre-migration plan includes: identifying a list of critical tasks, determining the source gateway and target gateway for each critical task (the method for determining the target gateway is consistent with the method for determining the potential target gateway described in S102), setting migration priorities (based on the task's criticality level and real-time requirements), and pre-allocating resources (including computing resources, memory resources, and communication resources).
[0071] When generating a plan, real-time task allocation information is obtained through the shared state machine of the distributed consistency cluster to ensure that the plan is based on the latest network status.
[0072] S302, Execute the task pre-migration process: When the corresponding dynamic risk node group triggers the migration signal, the task pre-migration process is started based on the task pre-migration plan, including task status synchronization, resource preheating and input stream redirection, to ensure that the critical tasks are smoothly migrated before topology oscillation occurs.
[0073] When the dynamic risk node group triggers a migration signal, the task pre-migration process is initiated based on the task pre-migration plan. The triggering condition for the migration signal is: the signal strength change rate of the node devices in the dynamic risk node group relative to the source gateway is less than a preset change threshold (e.g., -10 dBm / s), and they are located within the signal coverage range of the target gateway (e.g., the RSSI value of the target gateway is greater than -70 dBm). The task pre-migration process includes: Task status synchronization: Through the asynchronous replication mechanism of the distributed consistency cluster, the execution status of critical tasks (such as progress checkpoints and intermediate data) is synchronized from the source gateway to the target gateway. For example, for continuous trajectory control tasks of robots, the current position, velocity planning, and remaining path points are synchronized; for real-time video monitoring streams, the video encoding context and the most recent keyframe are synchronized. Synchronization adopts an incremental approach, transmitting only data showing status changes to reduce bandwidth overhead.
[0074] Resource preheating: Preload the software modules (such as control algorithm libraries and video decoders) required for the task and allocate computing resources (such as memory buffers and CPU cores) on the target gateway. For example, containerization technologies (such as Docker) are used to quickly instantiate the task environment, ensuring that the task can be taken over immediately.
[0075] Input stream redirection: Gradually switch the task input data stream from the source gateway to the target gateway. For example, a bicast mechanism is used to send the task input data stream to both the source and target gateways simultaneously; during the node migration transition period, the source gateway processes the data stream; after the migration is complete, it automatically switches to the target gateway for processing, ensuring zero data loss.
[0076] Resource pre-allocation: The target gateway pre-allocates and reserves computing resources (such as CPU cores and time slices), memory resources (such as contiguous memory blocks), and communication resources (such as Bluetooth connection slots and bandwidth) based on the synchronized task status. For example, resources are reserved based on task type (such as real-time video streaming requiring high bandwidth), and quotas are dynamically adjusted through the resource manager. The pre-allocation results are updated through the distributed consensus cluster to update the shared state machine, avoiding resource conflicts. The target gateway performs precise resource reservation based on the resource requirement description in the received task status snapshot, through its resource manager component. Computing resources: Reserve CPU cores and time slices for the task. For example, reserve a dedicated CPU core for a video analysis task (e.g., through cgroups) and set a minimum guaranteed computing power of 1.2 GHz; Memory resources: Reserve contiguous physical memory blocks (e.g., 256MB) based on the size of the task status snapshot and data caching requirements. Communication resources: At the Bluetooth link layer, connection handles and broadcast time slots are pre-allocated to the node devices that are about to be connected, ensuring that a low-latency connection can be established immediately once the node enters the coverage area; All reserved resources are marked as "pre-allocated" and their resource handles are recorded in the cluster's shared state machine to prevent them from being occupied by other tasks, but they are not yet bound to physical nodes.
[0077] Continuity assurance mechanism: The target gateway continues execution of tasks from the last synchronized state point, achieving a seamless handover for the user. Task continuity is verified through a heartbeat mechanism (e.g., every 50ms). If a task interruption is detected, a rollback mechanism is triggered to restore the state from the source gateway. A takeover timeout (e.g., 100ms) is set to ensure that the handover latency meets real-time requirements.
[0078] It should be noted that the pre-response operation is not limited to the above embodiments, and may also include other proactive measures based on the topology oscillation event identification results, such as dynamically adjusting the gateway transmit power and optimizing the routing path.
[0079] In summary, topological oscillation event identification is essentially a progressive risk perception and prediction framework based on multimodal data fusion, ranging from micro-level individual behavior to macro-level group situation. Its core lies in using feature engineering to spatiotemporally align and fuse the kinematic features of physical layer nodes (position coordinates, velocity vectors, motion trajectories) with the communication quality indicators (RSSI, LQI) of the link layer, thereby constructing a dynamic risk profile describing the stability of node connections.
[0080] Specifically, the migration intention of individual nodes is first quantitatively assessed. The input vector integrates the signal strength change rate (ΔRSSI), which reflects the rate of connection quality degradation, the radial relative velocity (v_relative), which characterizes the tendency for physical proximity, and the velocity reflecting the intention to move. Figure 1 The consistency coefficient of motion direction (a_consistency) is used to achieve a semantic improvement from the original data to the individual migration probability (P_migrate).
[0081] Building upon this foundation, nodes with high migration probabilities and identical target gateways are aggregated into a dynamic risk node group. Furthermore, the spatial situation feature vector of this group is extracted, including risk size ratio, average migration confidence, motion coordination index, and crucial spatial clustering. This feature, calculated by the ratio of eigenvalues in the node group's position covariance matrix, precisely quantifies the spatial distribution structure of the group, effectively distinguishing the essential difference between random, dispersed movement and organized, concentrated movement. These higher-order features are then input into a pre-trained neural network model. This model learns nonlinear mapping relationships from historical data to perform pattern recognition and probability prediction from group situation to network-level events (topological oscillations).
[0082] By transforming reactive control based on lag information into feedforward control based on predictive information, the system provides a critical decision window by accurately predicting the probability and intensity of topological oscillations. This allows proactive safeguards to be implemented before actual damage to the topology occurs, fundamentally avoiding service interruptions caused by inconsistent views, routing chaos, and task restarts, and maximizing the service continuity of critical businesses in dynamic network environments.
[0083] The technical solutions described in the embodiments of this application have at least the following technical effects or advantages: This invention can be applied to practical scenarios such as smart homes, industrial IoT, and smart warehousing. In scenarios with highly mobile nodes, it can effectively identify topological oscillation events, providing a basis for possible subsequent handling measures, and is practical.
[0084] By using migration probability models and spatial situation feature vectors, a predictive system for the future behavior of networks was constructed. This system analyzes the network's movement trends, signal attenuation rates, and group organizational structure to demonstrate the shift from passive response to proactive prediction.
[0085] By introducing analytical methods from group behavior, and calculating motion coordination indices and spatial clustering, it is possible to identify whether a group of nodes is a "mob" or an "organized team." For example, high spatial clustering indicates that nodes are moving in tight formations, which is highly likely driven by the same task, and the resulting topological oscillations would be devastating.
[0086] In highly dynamic mobile node scenarios, the execution of critical tasks enables seamless migration without the user's awareness, greatly improving the robustness, efficiency, and user experience of the entire Bluetooth Mesh network system in complex application scenarios.
[0087] Raw data such as node location, velocity, and signal strength are continuously collected and transformed into quantitative features reflecting connection trends (signal change rate), motion trends (radial relative velocity), and behavioral patterns (consistency of motion direction). A logistic regression model (migration probability formula) is used to fuse these multi-dimensional features into a unified individual migration probability value. Essentially, this model learns a decision boundary that distinguishes between "stable nodes" and "potentially migrating nodes." Nodes with high migration probabilities and consistent goals are clustered into "dynamic risk node groups," achieving a shift from point-to-surface perspective. Further, situational features characterizing the group's spatial structure (e.g., spatial clustering) and motion consistency (e.g., motion coordination indicators) are extracted and input into a neural network model. The model learns historical oscillation patterns and ultimately outputs predictions of macroscopic topological oscillation events. This entire process achieves end-to-end inference from low-level sensor data to high-level network events. Finally, the predicted topological oscillation event results are specifically applied to gateway interconnection scenarios using the Bluetooth self-organizing network protocol, providing fundamental support for the reliable application of Bluetooth Mesh networks in critical mission scenarios such as the Industrial Internet of Things.
[0088] Therefore, by comprehensively analyzing the motion state, communication quality indicators, and motion intentions of node devices, the individual migration probability is accurately calculated, and then the spatial situation feature vector of the dynamic risk node group is aggregated to generate a vector. With the help of a pre-trained neural network model, the accurate prediction of topological oscillation events and their degree of oscillation is achieved, realizing the construction of a progressive identification model from "individual risk" to "group risk" and then to "system event". On this basis, differentiated pre-response operations can be proactively triggered based on the prediction results, thereby completing the key supervision of critical tasks before the occurrence of topological oscillations. This completely solves the problem of task interruption caused by the processing lag of the existing reactive mechanism, and finally achieves seamless business continuity and high reliability of network services for users in highly dynamic scenarios such as warehouse AGVs and mobile robot clusters.
[0089] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. For those skilled in the art, the present invention can have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for interconnecting smart gateway devices using the Bluetooth self-organizing network protocol, characterized in that, The method includes: The S101 connects to multiple smart gateways based on a pre-built Bluetooth Mesh network; S102 periodically monitors the motion status data and communication quality indicators of each node device in the Bluetooth Mesh network according to the preset monitoring interval, and identifies topology oscillation events through the preset cluster mobility analysis mechanism. The preset cluster mobility analysis mechanism is set as follows: determine the dynamic risk node group based on the migration probability value of each node device, generate a spatial situation feature vector, and output the identification result of the topology oscillation event using the pre-trained topology oscillation event prediction model. S103, based on the identification results of topological oscillation events, triggers pre-response operations for dynamic risk node groups.
2. The method for interconnecting smart gateway devices using the Bluetooth self-organizing network protocol as described in claim 1, characterized in that, The motion state data includes position coordinates, velocity vector, and motion trajectory, and the communication quality index includes the received signal strength (RSSI) value.
3. The method for interconnecting smart gateway devices using the Bluetooth self-organizing network protocol as described in claim 2, characterized in that, The topology oscillation event is defined as: within the next monitoring interval, node devices collectively migrate from the coverage area of the currently serving smart gateway to the coverage area of other gateways.
4. The method for interconnecting smart gateway devices using the Bluetooth self-organizing network protocol as described in claim 3, characterized in that, The preset cluster mobility analysis mechanism specifically includes: S201, obtain the position coordinate matrix P and velocity vector set of the node device. Signal intensity change rate sequence ; S202, For each node device i, calculate the migration probability value of the node device; S203, filter out node devices whose migration probability value is greater than the preset migration probability threshold and have the same potential target gateway to form a dynamic risk node group; S204. For each dynamic risk node group, generate its spatial situation feature vector, input it into the pre-trained topological oscillation event prediction model, and output the prediction result, which is whether a topological oscillation event has occurred.
5. The method for interconnecting smart gateway devices using the Bluetooth self-organizing network protocol as described in claim 4, characterized in that, The position coordinate matrix of the node device , Let i be the two-dimensional coordinates of the i-th node device; Velocity vector set , Let be the velocity vector of the i-th node device; Signal intensity change rate sequence , , Let i be the signal strength value of the i-th node device at the current moment. Let i be the average signal strength value of the i-th node device within the previous preset window. It is the difference between the current time and the start time of the previous preset window.
6. The method for interconnecting smart gateway devices using the Bluetooth self-organizing network protocol as described in claim 5, characterized in that, The migration probability value of the node device is calculated according to the following formula: ; in, Let be the migration probability value of node device i. The rate of change of signal strength reflects the rate of connection quality degradation. Let be the radial relative velocity of node device i relative to its potential target gateway. The motion direction consistency coefficient is calculated by comparing the current motion direction of the node device with its historical trajectory directions. and and These are preset weight coefficient values, set based on expert experience and actual conditions, ranging from 0 to 1.
7. The method for interconnecting smart gateway devices using the Bluetooth self-organizing network protocol as described in claim 6, characterized in that, The method for determining the potential target gateway of the node device is as follows: A1. For node device i, scan all currently detectable gateways to form a candidate gateway set. k is the number of candidate gateways; A2. From the candidate gateway set, select the gateway with the highest attractiveness score as the potential target gateway. , Gateway The attractiveness score for node device i.
8. The method for interconnecting smart gateway devices using the Bluetooth self-organizing network protocol as described in claim 7, characterized in that, The spatial situation feature vector of the dynamic risk node group includes risk scale ratio, average migration confidence, motion coordination index, spatial clustering degree, and group distribution radius. The risk scale ratio is set as the ratio of the number of node devices in the dynamic risk node group to the total number of node devices. The average migration confidence is set as the average of the migration probability values of all node devices in the dynamic risk node group; The motion coordination index is set as the standard deviation of the radial relative velocity of all node devices in the dynamic risk node group; The spatial clustering degree and the group distribution radius are determined based on the location coordinates of the node devices in the dynamic risk node group.
9. The method for interconnecting smart gateway devices using the Bluetooth self-organizing network protocol as described in claim 8, characterized in that, The spatial clustering degree and the group distribution radius are determined based on the location coordinates of node devices in the dynamic risk node group, specifically including: Calculate the position vector of the center point of the risk node group: ; in, Let be the position vector of the center point of the risk node group. Let be the position vector of node device i in the risk node group. The number of node devices in a dynamic risk node group; Calculate the location covariance matrix of the spatial distribution : ; Spatial clustering is calculated using the largest and smallest eigenvalues of the covariance matrix.
10. The method for interconnecting smart gateway devices using the Bluetooth self-organizing network protocol as described in claim 8, characterized in that, The method for obtaining the topological oscillation event prediction model is as follows: C1. Collect spatial situation feature vectors of each dynamic risk node group within a large number of historical monitoring periods, and use the corresponding topological oscillation event as a label for whether it actually occurred in the next monitoring period. C2. Label each historical spatial situation feature vector and use it as a training sample set to train the pre-selected neural network structure, continuously optimize the model parameters, and obtain the final topological oscillation event prediction model.