A method for managing Bluetooth Mesh devices on the network based on time chain table
By using the technical means of time-link list and hierarchical management in the Internet Bluetooth Mesh device management method, the complexity and dependence problems of Bluetooth Mesh device management in the multi-device environment in the existing technology are solved, efficient and simplified device management is achieved, and user experience is improved.
Patent Information
- Application Number
- CN202211576734.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-02
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2042-12-02
AI Technical Summary
The existing Bluetooth Mesh-based intelligent device management method is difficult to effectively manage in multiple types and multi-device environments. It relies on a cloud service platform, has cumbersome operations, and lacks flexibility and convenience in device management.
The time-linked list-based Bluetooth Mesh device management method is adopted, and through the characteristics of hierarchical management and Bluetooth Mesh, the gateway device is used to automatically classify and process the equipment, create data storage parts, and manage and update the equipment data through the time-linked list to reduce manual operations.
It realizes efficient management of multiple types and multiple devices, reduces channel congestion, simplifies device management operations, improves user experience, and enhances the flexibility and convenience of device management.
Smart Images

Figure CN116033399B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Bluetooth Mesh device management, and in particular to a method for managing online Bluetooth Mesh devices based on a time chain table. Background Art
[0002] With the continuous advancement of science and technology, the number of smart devices on the market has exploded, and the smart networking communication methods are diverse, each with its own characteristics and advantages. At present, most smart products are connected through WIFI, but the vast majority of smart products do not transmit a large amount of data. Using WIFI not only wastes performance, but also increases power consumption. With the increase in smart devices, channel congestion is inevitable, which will affect indoor connections. At the same time, the limitation on the number of devices that can be connected to wireless routers is also one of the main reasons. Gradually, IoT products based on Bluetooth Mesh networking have also emerged.
[0003] For a small number of data devices and sensor devices, using Bluetooth Mesh networking is a good choice. However, it requires a network access module to access the cloud service platform. Current Bluetooth Mesh-based products cannot manage multiple devices well when there are multiple types and multiple devices. Many data and operation instructions must be reported to the cloud service platform for confirmation. The dependence on the cloud service platform is large, the operation is cumbersome, and it is inevitable that it will cause difficulties in device management. At the same time, many devices need to be manually registered, and the flexibility and convenience are reduced instead of increased.
[0004] Therefore, in view of the defects of the existing technology, it is necessary to propose a technical solution to solve the device management problem of Bluetooth Mesh networking. Summary of the invention
[0005] The purpose of the present invention is to solve the shortcomings existing in the prior art, and proposes a method for managing Bluetooth Mesh devices on the network based on a time chain table. The hierarchical management function and the characteristics of Bluetooth Mesh are adopted. Users only need to connect the device to the network and complete the binding operation, and the proposed gateway device will automatically classify and process it and create the corresponding data storage part. All data is managed and updated according to the time chain table, thereby reducing cumbersome operations and simplifying the complexity of device management.
[0006] A method for managing an on-line Bluetooth Mesh device based on a time chain table comprises the following steps:
[0007] Step 101, the mobile terminal binds the online device to a model and allocates an address, and the online device automatically uploads a configuration data packet and waits for a gateway reply;
[0008] Step 102: After the gateway is powered on, the timer is started, and the stored fixed partition data is read to initialize the device table and time chain table;
[0009] Step 103, the gateway compares the configuration data packet regularly reported by the device in step 101 with the stored fixed partition data, if it does not exist, execute step 104, otherwise, execute step 105;
[0010] Step 104, create a device node and a time node and insert them to a suitable position, and then execute step 105;
[0011] Step 105: The gateway is configured successfully and replies. After receiving the reply packet, the network device starts the function of reporting data regularly.
[0012] Step 106, the gateway monitors the device status in real time by actively updating data and passively updating data;
[0013] Step 107, the device data is updated, the cloud service platform is synchronized, and the timer is restarted.
[0014] Furthermore, the step 102 includes:
[0015] The header of the device table stores identifiers of various devices, so as to facilitate fast and targeted retrieval during each traversal;
[0016] The header of the time chain table stores the timing time and the delay interval. The timing time is used to configure the timer. The timing time will change as the number of nodes in the time chain table increases: Let T n is the current timing time, T n-1 is the last timing time, n is the number of nodes in the time chain list, Tn INR is the reporting time interval of the new node, T DLY The random delay interval is 1 to 5 seconds.
[0017]
[0018] The timing time of the table header is initialized to 0. When the configuration information packet reported by the first network access device is received, it is configured to: T1 INR The reporting interval for the first device to access the network.
[0019] T1=T1 INR +T DLY
[0020] Furthermore, the step 104 includes:
[0021] The device node will be inserted into the end of the device table in the table header according to the specific device type parameter in the identifier, such as general switch devices, multi-parameter devices, and sensor devices belonging to different types of parameters; the data of the device node also includes the number of timeouts;
[0022] The time node will get the next reporting time when it is created, and the next reporting time is the current time plus the reporting time interval;
[0023] The time node is inserted before the value of the next node in the time chain table is greater than the value of the node to be inserted, and the data of the devices in the network are sorted according to the same traversal logic each time when they report, so as to ensure that the time chain table is sorted from small to large;
[0024] The device node and the corresponding time node have corresponding pointers pointing to each other.
[0025] Furthermore, in step 105, after receiving the configuration operation result from the gateway, the device will store the result and enable the timed data reporting function, which is used by the gateway to quickly determine the device status;
[0026] Furthermore, the two determinations in step 106 include:
[0027] The active update is that the timer actively detects the time chain table according to the timing time, and the timing time of the timer changes with the change of the reporting time interval of the node. When the timer ends, it means that there is a device that fails to report on time during this process;
[0028] The passive update is to detect the time chain table each time the gateway receives data reported from the network device, and restart the timer of the active update.
[0029] Furthermore, the detailed rapid identification comprises the following steps:
[0030] Step 301, obtain the current time and compare it with the header of the time linked list;
[0031] Step 302: If it is less than, it means that there is no timeout / offline device in the time chain list, and all devices report on time, and the next reporting time and the corresponding device-related data are updated;
[0032] Step 303: If it is greater than, it means that some devices are in timeout / offline state, and the time chain table is traversed to the position where the next node value is greater than the next reporting time of the reporting node, and the timeout times of all the device nodes in front of it are increased by 1;
[0033] Step 304: If the number of device timeouts is greater than a preset value, it indicates that a device in the network is offline.
[0034] Furthermore, the step 107 includes the following operations:
[0035] Update relevant data, restart the timer, synchronize to the cloud service platform, and notify users of low-battery / timeout / offline devices in the network.
[0036] Furthermore, the cloud service platform includes a storage part and an analysis part, including:
[0037] The storage part stores all the reported data of the devices that are / were online;
[0038] The cloud service platform will analyze the application scenarios and data of the data uploaded by the gateway, generate the final comprehensive analysis results based on scenario judgment, data reporting delay, comparison of current data with historical data, reporting frequency, and remaining power of the device, check whether the overall status of the current devices on the network meets the current scenario, and notify the user of the existing devices. The present invention can achieve the following technical effects:
[0039] The Bluetooth Mesh device management method of the present invention can reduce channel congestion in homes and buildings, and break through the limitation on the number of smart devices. It provides a device management method for multi-type and multi-device management, adopts hierarchical management and the characteristics of Bluetooth Mesh, reduces the tediousness of manually adding nodes, and users can monitor the status of devices in the network at all times through the mobile terminal APP, simplifying operations and improving product experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 This is a flowchart of the overall steps of a method for managing an online Bluetooth Mesh device based on a time chain table according to an embodiment of the present invention;
[0041] Figure 2 A configuration data packet uploaded by a device after joining the network in a method for managing an on-line Bluetooth Mesh device based on a time chain table according to an embodiment of the present invention;
[0042] Figure 3 A schematic diagram of the storage and relationship of a device table and a time chain table of an on-network Bluetooth Mesh device management method based on a time chain table according to an embodiment of the present invention;
[0043] Figure 4 A flowchart of the steps of updating data based on a time chain table method of a device in a method for managing an on-network Bluetooth Mesh device based on a time chain table according to an embodiment of the present invention; DETAILED DESCRIPTION
[0044] The technical solutions of the embodiments of the present invention are explained and described below in conjunction with the drawings of the embodiments of the present invention, but the following embodiments are only preferred embodiments of the present invention, not all. Based on the embodiments in the implementation mode, other embodiments obtained by those skilled in the art without creative work are all within the protection scope of the present invention.
[0045] According to an embodiment of the present invention, a method for managing Bluetooth Mesh devices on a network based on a time chain table is provided.
[0046] The overall embodiment of the present invention is shown in Figure 1 , including the following steps:
[0047] Step 101, binding a model and assigning an address to the device on the mobile terminal, the device automatically uploads a configuration data packet after accessing the network, and starts the function of regularly reporting data after the gateway is successfully configured and replies;
[0048] Step 102: After the gateway is powered on, it reads the stored fixed partition data. If there is no fixed partition data, it creates a device table and a time chain table of multiple identifier types and starts the timer.
[0049] Step 103, the gateway compares the identifier in the data packet regularly reported by the device in step 101 with the stored fixed partition data. If no identifier exists, the gateway creates a device node and a time node and inserts them at an appropriate position, and executes step 105. If yes, the gateway executes step 104.
[0050] Step 104, the gateway finds the device node in the device table according to the identifier in the reported data packet, updates the device-related data and time information, and quickly determines whether there is a timed-out / offline node in the linked list;
[0051] Step 105, the update is completed and the timer is restarted.
[0052] The configuration data packet of the embodiment of the present invention is shown in Figure 2 ,include:
[0053] The data frame in the configuration data packet used to report the configuration to the gateway includes the device ID, device type, initial data of the device type, and the time interval to be reported. After receiving the data packet, the gateway starts to parse it, identifies the device type identifier and merges it into the table of the corresponding device type, and assigns the initial data and ID of the type to the corresponding node in the table, and assigns the timeout number to 0; obtains the current time, and assigns the current time and the time interval to be reported to the time node corresponding to the device node;
[0054] The current time is the number of seconds from midnight on January 1, 1970 to the present;
[0055] The storage and relationship between the device table and the time chain table in the embodiment of the present invention are shown in Figure 3 ,include:
[0056] The device table is stored according to the device type reported by the device, and the gateway will create corresponding device nodes and time nodes;
[0057] The device node will be classified according to its device type. If it does not exist, a new device type table header will be created and inserted at the end. If it exists, it will be inserted at the end in the order of addition. The device node contains the device ID, device type, time node pointer, next device pointer, timeout reporting times and data corresponding to the device.
[0058] The equipment table is constructed according to the above method and has the functions of adding, deleting, modifying and querying;
[0059] The time node obtains the next reporting time when it is created, and the next reporting time is the current time plus the reporting time interval; the time node is inserted before the value of the next node in the time chain list is greater than the value of the node to be inserted, and the data of the devices in the network are sorted according to the same traversal logic each time they report, ensuring that the time chain list is sorted from small to large; the time node also includes a device node pointer, a previous time pointer, and a next time pointer;
[0060] The above can be obtained as Figure 3 The storage diagram shown;
[0061] Finally, the device table and the time linked list are combined. The device nodes and the corresponding time nodes have corresponding pointers pointing to each other, thus we can get the following: Figure 3 The relationship diagram is shown.
[0062] The method for updating data based on the time chain table of the embodiment of the present invention is shown in FIG. Figure 4 , including the following steps:
[0063] According to the above description, the data management of the device is divided into active update and passive update; the active update is to use a timer to regularly manage and update the stored devices according to the time chain table; the passive update is that the gateway manages and updates the stored devices according to the time chain table based on the data regularly reported by the devices in the network;
[0064] Step 201, for active update, the timer ends, the time is compared with the head of the time priority list, and then step 203 is executed;
[0065] Step 202 is a passive update. The control gateway receives data reported by the device in the network, compares the time with the time priority list header, and then executes step 203;
[0066] Step 203, determine whether the current time is less than the next reporting time of the header time node, if so, execute step 204, otherwise, execute step 205;
[0067] Step 204, indicating that all devices have not timed out, updating the linked list and display interface, refreshing the timer, and then executing step 207;
[0068] Step 205, indicating that at least one device has timed out and has not been updated, searching downward to a node with a time smaller than the current time, marking all previous nodes as timed out, updating the linked list, timer and display interface, and then executing step 206;
[0069] The timer is refreshed in both step 204 and step 205. Since the timer timing interval is calculated based on the average value of the reporting time intervals of all nodes, when the timer expires, it means that there are devices in the network that have not reported on time, and usually the timer will be restarted at each passive update. When the timer expires, it must mean that a device in the network has timed out / is offline.
[0070] Therefore, no matter whether it is an active update or a passive update, the timer needs to be refreshed every time the device data is updated;
[0071] Step 206, determining whether the number of timeouts reaches a set threshold, if not, executing step 207, otherwise, executing step 208;
[0072] Step 207, after the update is completed, the node-related data that needs to be updated is synchronized to the cloud service platform, and the timed-out but not offline device is marked as timed-out and displayed on the control gateway display interface;
[0073] Step 208, mark the device as offline, update the linked list and display it, synchronize it to the cloud service platform, notify the user that there is an offline device, and display it as offline on the control gateway display interface.
[0074] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for managing Bluetooth Mesh devices on the network based on a time chain table, characterized in that: The following steps are involved: Step 101: The mobile terminal binds the model and allocates the address to the online device, and the online device automatically uploads the configuration data packet and waits for the gateway to reply; Step 102: After the gateway is powered on, the timer is started and the initialization device table and time chain table of the fixed partition data stored in the flash are read. The header of the initialization device table stores identifiers of multiple different devices; The header of the time chain table stores the timing time and the delay interval. The timing time is used to configure the timer. The timing time will change as the number of nodes in the time chain table increases: Let T n is the current timing time, T n-1 is the last timing time, n is the number of nodes in the time chain list, Tn INR is the reporting time interval of the new node, T DLY The random delay interval is 1 to 5s, The timing time of the table header is initialized to 0. When the configuration information packet reported by the first network access device is received, it is configured to: T1 INR The reporting interval for the first device to access the network. T1=T1 INR +T DLY ; Step 103: The gateway compares the configuration data packet automatically reported by the network device in step 101 with the stored fixed partition data. If the configuration data packet does not exist, step 104 is executed; otherwise, step 105 is executed. Step 104, create a device node and a time node and insert them to a suitable position, then execute step 105; Step 105: The gateway is configured successfully and replies. After receiving the reply packet, the network device starts the function of reporting data regularly. Step 106: The gateway monitors the device status in real time by distinguishing the active update data and the passive update data; Step 107: After the device data is updated, the cloud service platform is synchronized and the timer is restarted.
2. According to claim 1, a method for managing Bluetooth Mesh devices on the network based on a time chain list is characterized in that: In step 104, the device node is inserted into the end of the device table to which it belongs in the table header according to the specific device type parameter in the identifier. The data of the device node also includes the timeout number.
3. According to claim 2, a method for managing Bluetooth Mesh devices on the network based on a time chain list is characterized in that: In step 104, the time node will obtain the next reporting time when it is created, and the next reporting time is obtained by adding the reporting time interval to the current time; The time node is inserted before the value of the next node in the time chain list is greater than the value of the node to be inserted. Each time the device data in the network is reported, it is sorted according to the same traversal logic to ensure that the time chain list is sorted from small to large.
4. According to claim 3, a method for managing Bluetooth Mesh devices on the network based on a time chain list is characterized in that: The device node and the corresponding time node have corresponding pointers pointing to each other.
5. According to the time chain table-based online Bluetooth Mesh device management method of claim 1, it is characterized in that: In step 105, after receiving the configuration operation result from the gateway, the network device will store the result and enable the function of regularly reporting data, so as to quickly determine the device status of the gateway through the function of regularly reporting data.
6. According to claim 5, a method for managing Bluetooth Mesh devices on the network based on a time chain table is characterized in that: The method for quickly determining the device status of a gateway comprises the following steps: Step 201, obtain the current time and compare it with the header of the time linked list; Step 202: If it is less than, it means that there is no timeout / offline device in the time chain table, all devices report on time, and the next reporting time and the corresponding device-related data are updated; Step 203: If it is greater than, it means that some devices are in timeout / offline state, and quickly traverse to the next node whose value is greater than the next reporting time of the reporting node, and increase the timeout count of all the device nodes in front of it by 1 each time; Step 204: If the number of device timeouts is greater than a preset value, it means that there is a device offline in the network, and the device is marked as offline.
7. According to claim 1, a method for managing Bluetooth Mesh devices on the network based on a time chain list is characterized in that: The method for determining the actively updated data in step 106 is as follows: the active update is that the timer actively detects the time list according to the timing time, and the timing time of the timer changes with the reporting time interval of the node. When the timer ends, it means that there is a device that fails to report on time during this process.
8. The method for managing Bluetooth Mesh devices on the network based on a time chain table according to claim 7, characterized in that: The passive update data in step 106 is determined in the following manner: the passive update is to detect the time chain table each time the gateway receives data reported from the network device, and restart the active update timer.
9. The method for managing Bluetooth Mesh devices on the network based on a time chain table according to claim 8, characterized in that: The step 107 includes the following operations: Update relevant data, restart the timer, synchronize to the cloud service platform, and notify users of low-battery / timeout / offline devices in the network.
10. The method for managing Bluetooth Mesh devices on the network based on a time chain table according to claim 9, characterized in that: The cloud service platform includes a storage part and an analysis part. The storage part stores all the reported data of the devices that are / were online; The cloud service platform will conduct an inductive analysis of the application scenarios and data uploaded by the gateway, and generate the final comprehensive analysis results based on scenario judgment, data reporting delay, comparison of current data with historical data, reporting frequency, and remaining power of the device. It will check whether the overall status of the devices currently on the network meets the current scenario, and notify the user of the existing devices.
Citation Information
Patent Citations
Optimization method for Bluetooth Mesh remote control system
CN112017413A
Method for improving working stability of Bluetooth mesh network equipment and Bluetooth equipment
CN114449563A