Device status detection method, electronic device and storage medium

By maintaining a device status list in the Bluetooth Mesh network and using a timer to detect device values, the problem of high resource overhead in large-scale Bluetooth Mesh networks is solved, and device status detection with low resource consumption is achieved.

CN115297501BActive Publication Date: 2025-09-09ZHEJIANG MAOJING ARTIFICIAL INTELLIGENCE TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210765465.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-01
Publication Date
2025-09-09
Estimated Expiration
2042-07-01

AI Technical Summary

Technical Problem

In the process of Bluetooth Mesh device status detection, the existing technology has the problem of excessive resource overhead. Especially in large-scale Bluetooth Mesh networks, the Bluetooth Mesh gateway needs to start a large number of timers, resulting in excessive memory resource overhead.

Method used

By maintaining a device status list, recording the device values ​​of Bluetooth Mesh devices, and using a timer to periodically detect the device values ​​in the device status list, the number of timers can be reduced, and the device values ​​are updated only when device information is obtained to reflect the device status.

Benefits of technology

It effectively reduces the resource overhead of Bluetooth Mesh device status detection and enables the detection of the status of multiple Bluetooth Mesh devices with lower resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115297501B_ABST
    Figure CN115297501B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a device status detection method, electronic device, and storage medium. The method includes: maintaining a device status list, the device status list being used to record at least device values ​​of multiple Bluetooth Mesh devices, wherein the device values ​​of the Bluetooth Mesh devices are associated with the device status of the Bluetooth Mesh devices; detecting a timer timing, and when the timer timing reaches a preset timing, reducing the device value of the Bluetooth Mesh device in the device status list by a preset value; and upon obtaining information sent by the Bluetooth Mesh device, updating the device value of the Bluetooth Mesh device in the device status list to a maximum value; and determining the device status of the Bluetooth Mesh device based on the device value of the Bluetooth Mesh device. The embodiment of the present application can reduce the resource overhead required for detecting the device status of Bluetooth Mesh devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technology, and specifically to a device status detection method, an electronic device, and a storage medium. Background Art

[0002] A Bluetooth Mesh (wireless mesh) network is a mesh network that establishes inter-device communication based on Bluetooth Low Energy (BLE). It is widely used in intelligent device interconnection scenarios such as smart homes and smart offices. Bluetooth Mesh devices in a Bluetooth Mesh network have various states, such as online and offline. To facilitate inspection and maintenance of Bluetooth Mesh devices, device status monitoring is necessary. In this context, reducing resource overhead during Bluetooth Mesh device status monitoring has become a pressing technical challenge for those skilled in the art. Summary of the Invention

[0003] In view of this, embodiments of the present application provide a device status detection method, an electronic device, and a storage medium to reduce the resource overhead required for detecting the device status of a Bluetooth Mesh device.

[0004] To achieve the above objectives, the embodiments of the present application provide the following technical solutions.

[0005] In a first aspect, an embodiment of the present application provides a device status detection method, comprising:

[0006] Maintaining a device status list, the device status list being used to record at least device values ​​of a plurality of Bluetooth Mesh devices, the device values ​​of the Bluetooth Mesh devices being associated with the device states of the Bluetooth Mesh devices;

[0007] detecting a timer timing, and when the timer timing reaches a preset timing, reducing the device value of the Bluetooth Mesh device in the device status list by a preset value; and, upon obtaining information sent by the Bluetooth Mesh device, updating the device value of the Bluetooth Mesh device in the device status list to a maximum value;

[0008] Determine the device status of the Bluetooth Mesh device according to the device value of the Bluetooth Mesh device.

[0009] In a second aspect, an embodiment of the present application provides an electronic device comprising at least one memory and at least one processor; the memory stores one or more computer-executable instructions, and the processor calls the one or more computer-executable instructions to execute the device status detection method as described in the first aspect above.

[0010] In a third aspect, an embodiment of the present application further provides a storage medium, which stores one or more computer-executable instructions. When the one or more computer-executable instructions are executed, the device status detection method described in the first aspect above is implemented.

[0011] In a fourth aspect, an embodiment of the present application provides a computer program, which, when executed, implements the device status detection method as described in the first aspect above.

[0012] The device status detection method provided in the embodiment of the present application can maintain a device status list in an electronic device such as a Bluetooth Mesh gateway that communicates with a Bluetooth Mesh device. The device status list can record at least the device values ​​of multiple Bluetooth Mesh devices, and the device values ​​of the Bluetooth Mesh devices are associated with the device status of the Bluetooth Mesh devices. Therefore, the embodiment of the present application can provide a basis for determining the device status of the Bluetooth Mesh device through the device values ​​of the Bluetooth Mesh devices recorded in the device status list. Based on this, the embodiment of the present application can set a timer and detect the timing of the timer. When the timing of the timer reaches the predetermined timing, the embodiment of the present application can reduce the device data of the Bluetooth Mesh device in the device status list by a preset value; at the same time, when obtaining information sent by the Bluetooth Mesh device, the embodiment of the present application can update the device value of the corresponding Bluetooth Mesh device in the device status list to the maximum value to avoid the actual online Bluetooth Mesh device from having its device value continuously reduced.

[0013] Through the above settings, the embodiment of the present application can continuously reduce the device value of the Bluetooth Mesh device through the timer's regular detection when the Bluetooth Mesh device has not sent information for a long time, thereby reflecting the Bluetooth Mesh device that has not sent information for a long time due to being offline, and the Bluetooth Mesh device that has sent information due to being online through the device value of the Bluetooth Mesh device, and determining the device status of the Bluetooth Mesh device based on the device value of the Bluetooth Mesh device. It can be seen that the embodiment of the present application can adjust the device values ​​of multiple Bluetooth Mesh devices recorded in the device status list through the regular detection of the timer, so that the device values ​​of multiple Bluetooth Mesh devices reflect the device status of multiple Bluetooth Mesh devices, and detect the device status of multiple Bluetooth Mesh devices with lower resource overhead. Therefore, the embodiment of the present application can reduce the resource overhead required to detect the device status of Bluetooth Mesh devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.

[0015] Figure 1 This is an example diagram of a Bluetooth Mesh network.

[0016] Figure 2 This is an example diagram of the correspondence between Bluetooth Mesh devices and timers.

[0017] Figure 3 This is an example diagram of the correspondence between the device status list and the timer provided in the embodiment of the present application.

[0018] Figure 4 Flowchart of the device status detection method provided in an embodiment of the present application.

[0019] Figure 5 An optional form of the device status list provided in the embodiment of the present application.

[0020] Figure 6 A flowchart of a method for updating a device status list provided in an embodiment of the present application.

[0021] Figure 7 A schematic diagram of device status detection provided in an embodiment of the present application.

[0022] Figure 8 This is an optional block diagram of the device status detection apparatus provided in an embodiment of the present application.

[0023] Figure 9 This is an optional block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0025] Figure 1 An example diagram of a Bluetooth Mesh network is shown as follows: Figure 1 As shown, the Bluetooth Mesh network may include: Bluetooth Mesh devices 101, 102, ..., 10n, wherein n Bluetooth Mesh devices are all network-connected devices. Figure 1 As shown, the Bluetooth Mesh gateway 110 can serve as a control device, capable of configuring and controlling Bluetooth Mesh devices. Bluetooth Mesh devices can interact directly with the Bluetooth Mesh gateway, and the Bluetooth Mesh gateway 110 can interact directly with cloud servers. Furthermore, the Bluetooth Mesh gateway 110 can serve as a springboard connecting Bluetooth Mesh devices to cloud servers, enabling remote control of Bluetooth Mesh devices. The Bluetooth Mesh gateway 110 can be, for example, a smart speaker or multi-mode gateway with both Bluetooth communication and internet connectivity.

[0026] Bluetooth Mesh devices in a Bluetooth Mesh network have device states such as online and offline. When using a Bluetooth Mesh gateway 110 to implement data exchange between Bluetooth Mesh devices 101, 102-10n and a cloud server, the cloud server needs to inform users of the online and offline states of Bluetooth Mesh devices 101, 102-10n to facilitate user inspection and maintenance of Bluetooth Mesh devices 101, 102-10n. Based on this, the Bluetooth Mesh gateway can detect the device states of Bluetooth Mesh devices and inform the cloud server of the device states of Bluetooth Mesh devices.

[0027] One implementation method for a Bluetooth Mesh gateway to detect the device status of a Bluetooth Mesh device is to set multiple timers for multiple Bluetooth Mesh devices, and one Bluetooth Mesh device corresponds to one timer, thereby realizing device status detection of multiple Bluetooth Mesh devices through multiple timers. Figure 2 The following diagram shows the relationship between Bluetooth Mesh devices and timers: Figure 2 As shown, the Bluetooth Mesh gateway creates timers 201, 202, ..., 20n corresponding to Bluetooth Mesh devices 101, 102, ..., 10n, respectively. The Bluetooth Mesh gateway can set offline timeouts for these timers. If a timer reaches the offline timeout, and the Bluetooth Mesh device corresponding to the timer is not interacting with the Bluetooth Mesh gateway, the Bluetooth Mesh device corresponding to the timer can be determined to be offline. For example, if the offline timeout for timer 201 is set to 90 seconds, if Bluetooth Mesh device 101 does not interact with the Bluetooth Mesh gateway within 90 seconds of timer 201, Bluetooth Mesh device 101 can be determined to be offline. If Bluetooth Mesh device 101 interacts with the Bluetooth Mesh gateway within 90 seconds of timer 201, Bluetooth Mesh device 101 can be determined to be online. In this way, the device status of multiple Bluetooth Mesh devices can be detected based on multiple timers and the interaction between Bluetooth Mesh devices and the Bluetooth Mesh gateway.

[0028] However, there are a large number of Bluetooth Mesh devices in a large-scale Bluetooth Mesh network. If the Bluetooth Mesh gateway sets a corresponding number of timers based on the number of Bluetooth Mesh devices, the Bluetooth Mesh gateway will need to start a large number of timers to detect the device status of the Bluetooth Mesh devices, which will result in a huge resource overhead (such as memory resource overhead) for the Bluetooth Mesh gateway.

[0029] It can be seen that when detecting the device status of multiple Bluetooth Mesh devices, how to reduce the resource overhead of the Bluetooth Mesh gateway is particularly important. Based on this, the embodiment of the present application maintains a device status list in the Bluetooth Mesh gateway through an improved technical solution. The device status list can record the device values ​​(also called life values) associated with the device status of the Bluetooth Mesh device, and the Bluetooth Mesh gateway can update the device values ​​of the multiple Bluetooth Mesh devices recorded in the device status list by starting a lower number of timers (for example, one timer), thereby reflecting the device status of the Bluetooth Mesh device through the device value of the Bluetooth Mesh device, so as to realize the device status detection of multiple Bluetooth Mesh devices. Figure 3 The following is an exemplary diagram showing the correspondence between the device status list and the timer in the embodiment of the present application; Figure 3 As shown, the Bluetooth Mesh gateway can set a timer 301 and a device status list 302; the device status list 302 can record the device values ​​of multiple Bluetooth Mesh devices, and the embodiment of the present application can update the device values ​​of multiple Bluetooth Mesh devices in the device status list based on the timing of a timer 301, thereby determining the device status of the Bluetooth Mesh device based on the device value of the Bluetooth Mesh device, effectively reducing the resource overhead of the Bluetooth Mesh gateway.

[0030] Based on the above ideas, Figure 4 An optional flow chart of the device status detection method provided in the embodiment of the present application is shown as an example. The method flow can be applied to electronic devices such as Bluetooth Mesh gateways, refer to Figure 4 The method flow may include the following steps.

[0031] In step 410 , a device status list is maintained, where the device status list is used to record at least device values ​​of a plurality of Bluetooth Mesh devices, where the device values ​​of the Bluetooth Mesh devices are associated with the device statuses of the Bluetooth Mesh devices.

[0032] During the interaction between a Bluetooth Mesh device and a Bluetooth Mesh gateway, the Bluetooth Mesh gateway obtains information sent by the Bluetooth Mesh device and considers the Bluetooth Mesh device to be online. In some embodiments, the Bluetooth Mesh gateway of the embodiment of the present application can construct a device status list for online Bluetooth Mesh devices. As an optional implementation, when the device status list records the information of Bluetooth Mesh devices in an online state, the device status list can be called an online status list. In other embodiments, the device status list can also record the information of Bluetooth Mesh devices in an offline state. In this case, the device status list can be called an offline status list. Of course, the device status list can be constructed according to actual needs, and the embodiment of the present application does not limit this.

[0033] The device status list records content associated with the device status of multiple Bluetooth Mesh devices. In some embodiments, the device status list records at least device values ​​for the multiple Bluetooth Mesh devices, wherein the device values ​​are associated with the device status. It is understood that the device value is a numerical representation of the device status. For example, if the device status list is used to record at least the online status of a Bluetooth Mesh device, the device value can be the life value of the Bluetooth Mesh device. Assuming that a Bluetooth Mesh device is considered offline if no information is received from the Bluetooth Mesh device for 90 consecutive seconds, the maximum life value of the Bluetooth Mesh device is defined as 9.

[0034] In some embodiments, the device status list may be an array or a linked list (for example, the device status list records information in an array or linked list structure). Figure 5 An optional form of the device status list is shown as an example. Figure 5 The device status list shown in the figure records the device values ​​and device identifications (e.g., device IDs of Bluetooth Mesh devices) of multiple Bluetooth Mesh devices. The device ID is the unique device identification information of the Bluetooth Mesh device. The device IDs of multiple Bluetooth Mesh devices recorded in the device status list are different from each other. In addition, each Bluetooth Mesh device's device ID corresponds to a device value. It should be noted that Figure 5 This is only an optional form of the device status list in the embodiment of the present application, and the embodiment of the present application does not limit the specific form of the device status list.

[0035] In step S420, the timing of the timer is detected. When the timing of the timer reaches the preset timing, the device value of the Bluetooth Mesh device in the device status list is reduced by a preset value; and when the information sent by the Bluetooth Mesh device is obtained, the device value of the Bluetooth Mesh device in the device status list is updated to the maximum value.

[0036] The preset timer is the time at which the device values ​​of multiple Bluetooth Mesh devices recorded in the device status list are updated. For example, if the preset timer is 10 seconds, when the timer reaches 10 seconds, the device status list is traversed once, and the device values ​​of the multiple Bluetooth Mesh devices recorded in the device status list are reduced by the preset value, thereby updating the device values ​​of multiple Bluetooth Mesh devices. For example, if the preset value is 1, when the preset timer is 10 seconds, the device status list is traversed once every 10 seconds, and the device values ​​of the Bluetooth Mesh devices recorded in the device status list are reduced by 1.

[0037] It can be understood that if a Bluetooth Mesh device has not sent information to the Bluetooth Mesh gateway for a long time, the Bluetooth Mesh device is offline. At this time, the embodiment of the present application reduces the device value of the Bluetooth Mesh device at preset time intervals. The reduced device value of the Bluetooth Mesh device can reflect the Bluetooth Mesh device that has not sent information to the Bluetooth Mesh gateway for a long time, thereby reflecting the device status of the Bluetooth Mesh device through the correlation between the device value of the Bluetooth Mesh device and the device status.

[0038] In a Bluetooth Mesh network, if a Bluetooth Mesh gateway obtains information sent by a Bluetooth Mesh device, then the Bluetooth Mesh device is online. To prevent the online Bluetooth Mesh device from having its device value continuously reduced, the embodiment of the present application can update the device value of the Bluetooth Mesh device in the device status list to the maximum value when the Bluetooth Mesh gateway obtains information sent by the Bluetooth Mesh device, thereby reflecting the online Bluetooth Mesh device that sent the information when the device value of the Bluetooth Mesh device is reduced at every preset time. Optionally, the maximum value can be the upper limit of the preset device value, for example, refer to Figure 5 The device value corresponding to the Bluetooth Mesh device with ID 2 is 9.

[0039] In some embodiments, the information sent by the Bluetooth Mesh device may be heartbeat information. Further, based on the heartbeat information of the Bluetooth Mesh device, the Bluetooth Mesh gateway can obtain the unicast address of the Bluetooth Mesh device.

[0040] In step S430 , the device status of the Bluetooth Mesh device is determined according to the device value of the Bluetooth Mesh device.

[0041] As an optional implementation, in the optional process of determining the device status of the Bluetooth Mesh device according to the device value of the Bluetooth Mesh device, if the device value of the Bluetooth Mesh device decreases to a minimum value, the Bluetooth Mesh device is determined to be in an offline state; the minimum value can be a preset lower limit of the device value, for example, referring to Figure 5 The device value corresponding to the Bluetooth Mesh device with ID 7 is 0. In other words, if the Bluetooth Mesh device does not send information to the Bluetooth Mesh gateway within multiple consecutive preset time periods, then the device value of the Bluetooth Mesh device will decrease multiple times until it reaches the lower limit of the device value. It can be determined that the Bluetooth Mesh device has not interacted with the Bluetooth Mesh gateway for a long time, and the Bluetooth Mesh device can be determined to be offline. In one example, when the health value of the Bluetooth Mesh device decreases from 9 to 0 (minus 1 every 10 seconds), it can be determined that the Bluetooth Mesh device has not interacted with the Bluetooth Mesh gateway for 90 seconds, and the Bluetooth Mesh device is offline.

[0042] It is understandable that when the Bluetooth Mesh gateway obtains information sent by the Bluetooth Mesh device, the device value of the Bluetooth Mesh device in the device status list is updated to the maximum value.

[0043] In some embodiments, if the device value of the Bluetooth Mesh device in the device status list is not reduced to the minimum value, it proves that the device status of the Bluetooth Mesh device in the device status list is online at this time.

[0044] In some further embodiments, when the device value of a Bluetooth Mesh device is reduced to the minimum value, the Bluetooth Mesh device is offline. When the device status list records information of the offline Bluetooth Mesh device, the embodiment of the present application can delete the Bluetooth Mesh device from the device status list.

[0045] It can be seen that the embodiment of the present application maintains a device status list, which can record at least the device values ​​of multiple Bluetooth Mesh devices, and the device values ​​of the Bluetooth Mesh devices are associated with the device status of the Bluetooth Mesh devices. Then, through the timer's periodic detection, the device values ​​of the multiple Bluetooth Mesh devices recorded in the device status list are adjusted, so that the device values ​​of the multiple Bluetooth Mesh devices reflect the device status of the multiple Bluetooth Mesh devices, effectively reducing the resource overhead required for detecting the device status of the Bluetooth Mesh devices.

[0046] In some embodiments, since the timing of a Bluetooth Mesh device sending information to a Bluetooth Mesh gateway is different, the Bluetooth Mesh gateway needs to determine whether the Bluetooth Mesh device is offline or online at any time when it obtains information sent by the Bluetooth Mesh device. Therefore, based on the Bluetooth Mesh device identification information and device value recorded in the device status list, the Bluetooth Mesh gateway has a judgment step for the Bluetooth Mesh device that sends the information. Figure 6 This is a flow chart of a method for updating a device status list in an embodiment of the present application. Figure 6 As shown, the method flow may include the following steps.

[0047] In step S610: information sent by the Bluetooth Mesh device is obtained.

[0048] In step S620: determine whether the device identification information of the Bluetooth Mesh device sending the information is recorded in the device status list; if so, execute step S630; if not, execute step S640.

[0049] In step S630: the device value of the Bluetooth Mesh device recorded in the device status list is adjusted to the maximum value.

[0050] In step S640: adding a record of the Bluetooth Mesh device to the device status list, and setting the device value of the recorded Bluetooth Mesh device to the maximum value.

[0051] In some further embodiments, after the Bluetooth Mesh gateway obtains the information sent by the Bluetooth Mesh device, if there is no record of the Bluetooth Mesh device in the device status list, the embodiment of the present application can determine the device identification information of the Bluetooth Mesh device to distinguish different Bluetooth Mesh devices; at the same time, the device identification information of the Bluetooth Mesh device and the device value set to the maximum value are recorded in the device status list.

[0052] When the Bluetooth Mesh gateway obtains information sent by the Bluetooth Mesh device and determines that the Bluetooth Mesh device is recorded in the device status list, the embodiment of the present application can adjust the device value of the Bluetooth Mesh device recorded in the device status list to the maximum value.

[0053] In some embodiments, the device identification information and the device value are configured correspondingly in the device status list. Figure 5As shown, each Bluetooth Mesh device corresponds to a device identifier (ID), and the Bluetooth Mesh device ID corresponds to the device value of the Bluetooth Mesh device. It is understood that different Bluetooth Mesh devices send information to the Bluetooth Mesh gateway at different times, resulting in different times when the device identifier is recorded in the device status list. Consequently, the number of times the timer reaches the predetermined timer time varies, and the number of times the device value corresponding to the device identifier is reduced by the preset value varies. Therefore, the device values ​​of multiple Bluetooth Mesh devices recorded in the device status list may also vary.

[0054] In some embodiments, if the device status of a Bluetooth Mesh device changes, the Bluetooth Mesh gateway may send a status message of the Bluetooth Mesh device to the cloud server. Figure 7 The device status detection diagram of the embodiment of the present application is shown. Based on the device health value recorded in the device status list, when the device status of a Bluetooth Mesh device changes, the Bluetooth Mesh gateway sends messages such as Bluetooth Mesh device online and offline to the cloud server. The upper limit of the device health value is 9, and the lower limit is 0.

[0055] As an optional implementation, for the Bluetooth Mesh device whose device value is reduced to the minimum value, send the offline status message of the Bluetooth Mesh device to the cloud server, for example: Figure 7 In the device status list, if the device health value of the Bluetooth Mesh device is reduced to 0, it means that the Bluetooth Mesh device has not sent any information to the Bluetooth Mesh gateway for 90 consecutive seconds. The Bluetooth Mesh device is now offline, and the Bluetooth Mesh gateway sends an offline status message of the Bluetooth Mesh device to the cloud server.

[0056] As an optional implementation, for the Bluetooth Mesh device newly recorded in the device status list, send the Bluetooth Mesh device online status message to the cloud server, for example: Figure 7 In the example, if the device ID is ID2 and the device status list does not record ID2, the Bluetooth Mesh gateway receives the information sent by the Bluetooth Mesh device and determines that the Bluetooth Mesh device is not recorded in the device status list. When the device ID and device health value corresponding to the Bluetooth Mesh device are added to the device status list, the Bluetooth Mesh gateway can send an online status message of the Bluetooth Mesh device to the cloud server.

[0057] As another optional implementation, for Bluetooth Mesh devices whose device values ​​have not been reduced to the minimum value, send the online status message of the Bluetooth Mesh device to the cloud server, for example: Figure 7In the device status list, if the device health value of the Bluetooth Mesh device is not 0, it means that the Bluetooth Mesh device has sent information to the Bluetooth Mesh gateway at least once within 90 seconds. The Bluetooth Mesh device is online, and the Bluetooth Mesh gateway sends the online status message of the Bluetooth Mesh device to the cloud server.

[0058] The device status detection solution provided in the embodiment of the present application can maintain a device status list in an electronic device that communicates with the Bluetooth Mesh device, such as a Bluetooth Mesh gateway, in a large-scale Bluetooth Mesh network. The device status list can record at least the device values ​​of multiple Bluetooth Mesh devices, and the device values ​​of the Bluetooth Mesh device are associated with the device status of the Bluetooth Mesh device. Based on the timed detection of the timer, the device values ​​of the multiple Bluetooth Mesh devices recorded in the device status list can be adjusted, so that the device values ​​of the multiple Bluetooth Mesh devices reflect the device status of the multiple Bluetooth Mesh devices, thereby realizing the detection of the device status of multiple Bluetooth Mesh devices with low resource overhead.

[0059] The following describes the device status detection apparatus provided in the embodiments of this application. The apparatus described below can be considered the functional modules required by a Bluetooth Mesh gateway to implement the device status detection method provided in the embodiments of this application. The following description can be used in conjunction with the above description.

[0060] As an optional implementation, Figure 8 An optional block diagram of a device state detection device according to an embodiment of the present application is shown as an example. The device can be applied to electronic devices. Figure 8 , the apparatus may include:

[0061] A status maintenance module 810 is configured to maintain a device status list, wherein the device status list is configured to record at least device values ​​of a plurality of Bluetooth Mesh devices, wherein the device values ​​of the Bluetooth Mesh devices are associated with the device status of the Bluetooth Mesh devices;

[0062] The status detection module 811 is configured to detect a timer time, and when the timer time reaches a preset timer time, reduce the device value of the Bluetooth Mesh device in the device status list by a preset value; and, upon obtaining information sent by the Bluetooth Mesh device, update the device value of the Bluetooth Mesh device in the device status list to a maximum value;

[0063] The status determination module 812 is configured to determine the device status of the Bluetooth Mesh device according to the device value of the Bluetooth Mesh device.

[0064] In some embodiments, the state determination module 812 is configured to determine the device state of the Bluetooth Mesh device according to the device value of the Bluetooth Mesh device, including:

[0065] If the device value of the Bluetooth Mesh device decreases to a minimum value, it is determined that the Bluetooth Mesh device is in an offline state, and the minimum value is less than the maximum value;

[0066] If the device value of the Bluetooth Mesh device has not decreased to the minimum value, it is determined that the Bluetooth Mesh device is in an online state.

[0067] In some embodiments, the status detection module 810 is configured to update the device value of the Bluetooth Mesh device in the device status list to a maximum value upon obtaining information sent by the Bluetooth Mesh device, including:

[0068] Determine whether there is a record of the Bluetooth Mesh device sending information in the device status list;

[0069] If yes, adjust the device value of the Bluetooth Mesh device recorded in the device status list to the maximum value;

[0070] If not, add a record of the Bluetooth Mesh device to the device status list, and set the device value of the recorded Bluetooth Mesh device to the maximum value.

[0071] In some further embodiments, the device status list maintained by the status maintenance module 810 further records the device identification information of the Bluetooth Mesh device; and the determining whether there is a record of the Bluetooth Mesh device sending information in the device status list performed by the status detection module 811 includes:

[0072] Determine whether the device identification information of the Bluetooth Mesh device sending the information is recorded in the device status list.

[0073] In some embodiments, the status detection module 811 is further configured to:

[0074] The record of the Bluetooth Mesh device whose device value is reduced to the minimum value is deleted from the device status list.

[0075] In some embodiments, the state determination module 812 is configured to determine the device state of the Bluetooth Mesh device according to the device value of the Bluetooth Mesh device, and further includes:

[0076] For Bluetooth Mesh devices whose device values ​​are reduced to the minimum, an offline status message of the Bluetooth Mesh device is sent to the cloud server;

[0077] and / or, for a Bluetooth Mesh device newly recorded in the device status list, sending an online status message of the Bluetooth Mesh device to the cloud server;

[0078] And / or, for a Bluetooth Mesh device whose device value has not been reduced to the minimum value, an online status message of the Bluetooth Mesh device is sent to the cloud server.

[0079] In some embodiments, the information sent by the Bluetooth Mesh device includes heartbeat information sent by the Bluetooth Mesh device; and the device status list is an array or a linked list.

[0080] The embodiment of the present application also provides an electronic device, which can implement the device status detection method provided by the embodiment of the present application by setting the device status detection device described above. In a possible example, the electronic device can be, for example, a Bluetooth Mesh gateway. In other examples, the electronic device can also be a terminal device such as a mobile phone used by the user. As an optional implementation, Figure 9 An optional block diagram of an electronic device according to an embodiment of the present application is shown as an example. Figure 9 As shown, the electronic device may include: at least one processor 91 , at least one communication interface 92 , at least one memory 93 and at least one communication bus 94 .

[0081] In the embodiment of the present application, there is at least one processor 91 , communication interface 92 , memory 93 , and communication bus 94 , and the processor 91 , communication interface 92 , and memory 93 communicate with each other through the communication bus 94 .

[0082] Optionally, the communication interface 92 may be an interface of a communication module for performing network communication.

[0083] Optionally, the processor 91 may be a CPU, a GPU (Graphics Processing Unit), an NPU (embedded neural network processor), an FPGA (Field Programmable Gate Array), a TPU (Tensor Processing Unit), an AI chip, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.

[0084] The memory 93 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0085] The memory 93 stores one or more computer-executable instructions, and the processor 91 calls the one or more computer-executable instructions to execute the device status detection method performed by the electronic device in the embodiment of the present application.

[0086] In some embodiments, the electronic device further includes: a timer, wherein when the timing time of the timer reaches a preset timing time, the device value of the Bluetooth Mesh device in the device status list is reduced by a preset value; the device value of the Bluetooth Mesh device is associated with the device status of the Bluetooth Mesh device.

[0087] An embodiment of the present application further provides a storage medium, which stores one or more computer-executable instructions. When the one or more computer-executable instructions are executed, the device status detection method performed by the electronic device as in the embodiment of the present application is implemented.

[0088] An embodiment of the present application further provides a computer program, which, when executed, implements the device status detection method performed by the electronic device as described in the embodiment of the present application.

[0089] The above describes multiple embodiment schemes provided by the embodiments of the present application. The various optional methods introduced in each embodiment scheme can be combined and cross-referenced with each other without conflict, thereby extending a variety of possible embodiment schemes, which can all be considered as embodiment schemes disclosed and open in the embodiments of the present application.

[0090] Although the embodiments of the present application are disclosed above, the present application is not limited thereto. Any person skilled in the art may make various changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims.

Claims

1. A device status detection method, wherein: include: Maintaining a device status list, the device status list being used to record at least device values ​​of a plurality of Bluetooth Mesh devices, the device values ​​of the Bluetooth Mesh devices being associated with the device states of the Bluetooth Mesh devices, the device values ​​being life values ​​of the Bluetooth Mesh devices, and the device status list being maintained by an electronic device that communicates with the Bluetooth Mesh devices; Detecting a timer timing, and when the timer timing reaches a preset timing, reducing a device value of the Bluetooth Mesh device in the device status list by a preset value; And, when information sent by a Bluetooth Mesh device is obtained, the device value of the Bluetooth Mesh device in the device status list is updated to a maximum value, and the number of the timer is 1; Determine the device status of the Bluetooth Mesh device according to the device value of the Bluetooth Mesh device; The acquiring of information sent by the Bluetooth Mesh device and updating the device value of the Bluetooth Mesh device in the device status list to a maximum value includes: Determine whether there is a record of the Bluetooth Mesh device sending information in the device status list; If yes, adjust the device value of the Bluetooth Mesh device recorded in the device status list to the maximum value; If not, add a record of the Bluetooth Mesh device to the device status list, and set the device value of the recorded Bluetooth Mesh device to the maximum value.

2. The method according to claim 1, wherein Determining the device status of the Bluetooth Mesh device according to the device value of the Bluetooth Mesh device includes: If the device value of the Bluetooth Mesh device decreases to a minimum value, it is determined that the Bluetooth Mesh device is in an offline state; If the device value of the Bluetooth Mesh device has not decreased to the minimum value, it is determined that the Bluetooth Mesh device is in an online state.

3. The method according to claim 1, wherein The device status list also records the device identification information of the Bluetooth Mesh device; and determining whether there is a record of the Bluetooth Mesh device sending information in the device status list includes: Determine whether the device identification information of the Bluetooth Mesh device sending the information is recorded in the device status list.

4. The method according to claim 2 or 3, wherein: Also includes: The record of the Bluetooth Mesh device whose device value is reduced to the minimum value is deleted from the device status list.

5. The method according to claim 2, wherein: Also includes: For Bluetooth Mesh devices whose device values ​​are reduced to the minimum, an offline status message of the Bluetooth Mesh device is sent to the cloud server; and / or, for a Bluetooth Mesh device newly recorded in the device status list, sending an online status message of the Bluetooth Mesh device to the cloud server; And / or, for a Bluetooth Mesh device whose device value has not been reduced to the minimum value, an online status message of the Bluetooth Mesh device is sent to the cloud server.

6. The method according to claim 1, wherein The information sent by the Bluetooth Mesh device includes heartbeat information sent by the Bluetooth Mesh device; the device status list is an array or a linked list.

7. An electronic device, wherein: include: at least one memory and at least one processor; The memory stores one or more computer-executable instructions, and the processor calls the one or more computer-executable instructions to execute the device status detection method according to any one of claims 1 to 6; the electronic device is a Bluetooth Mesh gateway or a terminal device.

8. The electronic device according to claim 7, wherein: Also includes: Timer; When the timer reaches the preset time, the device value of the Bluetooth Mesh device in the device status list maintained by the electronic device is reduced by a preset value; The device value of the Bluetooth Mesh device is associated with the device status of the Bluetooth Mesh device.

9. A storage medium, wherein: The storage medium stores one or more computer-executable instructions, and when the one or more computer-executable instructions are executed, the device status detection method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Backup method for media processing unit, multipoint control unit and video communication system

    CN101662645A

  • Heartbeat mechanism detection method, terminal equipment and storage medium

    CN111371631A

  • Equipment state monitoring method, equipment state monitoring device and readable storage medium

    CN113596884A

  • Method for improving working stability of Bluetooth mesh network equipment and Bluetooth equipment

    CN114449563A