CN115297501A - Equipment state detection method, electronic equipment and storage medium - Google Patents

Equipment state detection method, electronic equipment and storage medium Download PDF

Info

Publication number
CN115297501A
CN115297501A CN202210765465.0A CN202210765465A CN115297501A CN 115297501 A CN115297501 A CN 115297501A CN 202210765465 A CN202210765465 A CN 202210765465A CN 115297501 A CN115297501 A CN 115297501A
Authority
CN
China
Prior art keywords
bluetooth mesh
value
equipment
state
list
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210765465.0A
Other languages
Chinese (zh)
Inventor
刘光勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Maojing Artificial Intelligence Technology Co ltd
Original Assignee
Zhejiang Maojing Artificial Intelligence Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Maojing Artificial Intelligence Technology Co ltd filed Critical Zhejiang Maojing Artificial Intelligence Technology Co ltd
Priority to CN202210765465.0A priority Critical patent/CN115297501A/en
Publication of CN115297501A publication Critical patent/CN115297501A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/04Arrangements for maintaining operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application provides a device state detection method, an electronic device and a storage medium, wherein the method comprises the following steps: maintaining a device state list, wherein the device state list is used for at least recording device values of a plurality of Bluetooth Mesh devices, and the device values of the Bluetooth Mesh devices are associated with the device states of the Bluetooth Mesh devices; detecting the timing time of a timer, and reducing the device value of the Bluetooth Mesh device in the device state list by a preset value when the timing time of the timer reaches the preset timing time; and updating the device value of the Bluetooth Mesh device in the device state list to the maximum value when the information sent by the Bluetooth Mesh device is obtained; and determining the equipment state of the Bluetooth Mesh equipment according to the equipment value of the Bluetooth Mesh equipment. The embodiment of the application can reduce the resource overhead required by detecting the equipment state of the Bluetooth Mesh equipment.

Description

Equipment state detection method, electronic equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of communication, in particular to a device state detection method, electronic equipment and a storage medium.
Background
The Bluetooth Mesh network is a Mesh network for establishing communication between devices based on BLE (Bluetooth Low Energy), and is widely used in smart home, smart office and other device intelligent interconnection scenarios. The bluetooth Mesh device in the bluetooth Mesh network has the device states of online, offline and the like, and the device state of the bluetooth Mesh device needs to be detected in order to facilitate the inspection and maintenance of the bluetooth Mesh device. In this background, how to reduce the resource overhead in the device status detection process of the bluetooth Mesh device becomes a technical problem that needs to be solved urgently by those skilled in the art.
Disclosure of Invention
In view of this, embodiments of the present application provide a device status detection method, an electronic device, and a storage medium, so as to reduce resource overhead required for detecting a device status of a bluetooth Mesh device.
In order to achieve the above object, the embodiments of the present application provide the following technical solutions.
In a first aspect, an embodiment of the present application provides an apparatus state detection method, including:
maintaining a device state list for recording at least device values of a plurality of Bluetooth Mesh devices, the device values of the Bluetooth Mesh devices being associated with device states of the Bluetooth Mesh devices;
detecting the timing time of a timer, and reducing the device value of the Bluetooth Mesh device in the device state list by a preset value when the timing time of the timer reaches the preset timing time; when information sent by the Bluetooth Mesh equipment is acquired, updating the equipment value of the Bluetooth Mesh equipment in the equipment state list to be a maximum value;
and determining the equipment state of the Bluetooth Mesh equipment according to the equipment value of the Bluetooth Mesh equipment.
In a second aspect, an embodiment of the present application provides an electronic device, including at least one memory and at least one processor; the memory stores one or more computer-executable instructions that are called by the processor to perform the device state detection method according to the first aspect.
In a third aspect, an embodiment of the present application further provides a storage medium, where the storage medium stores one or more computer-executable instructions, and when the one or more computer-executable instructions are executed, the method for detecting a device state according to the foregoing first aspect is implemented.
In a fourth aspect, an embodiment of the present application provides a computer program, where the computer program is executed to implement the device status detection method according to the first aspect.
The device state detection method provided by the embodiment of the application can maintain a device state list in electronic devices such as a Bluetooth Mesh gateway and the like which are communicated with the Bluetooth Mesh devices, the device state list can at least record device values of a plurality of Bluetooth Mesh devices, and the device values of the Bluetooth Mesh devices are associated with the device states of the Bluetooth Mesh devices, so that the device states of the Bluetooth Mesh devices can be determined according to the device values of the Bluetooth Mesh devices recorded by the device state list. Based on this, the embodiment of the application can set a timer and detect the timing time of the timer, and when the timing time of the timer reaches the preset timing time, the embodiment of the application can reduce the device data of the bluetooth Mesh device in the device state list by a preset value; meanwhile, when information sent by the Bluetooth Mesh device is acquired, the device value of the corresponding Bluetooth Mesh device in the device state list can be updated to the maximum value by the embodiment of the application, so that the device value of the actual online Bluetooth Mesh device is prevented from being continuously reduced.
Through the arrangement, when the Bluetooth Mesh equipment does not send information for a long time, the equipment value of the Bluetooth Mesh equipment can be continuously reduced through the timing detection of the timer, so that the equipment value of the Bluetooth Mesh equipment reflects the Bluetooth Mesh equipment which does not send information for a long time due to off-line and the Bluetooth Mesh equipment which sends information online, and the equipment state of the Bluetooth Mesh equipment is determined according to the equipment value of the Bluetooth Mesh equipment. Therefore, the device values of the plurality of bluetooth Mesh devices recorded in the device state list can be adjusted through the timing detection of the timer, so that the device values of the plurality of bluetooth Mesh devices reflect the device states of the plurality of bluetooth Mesh devices, and the device states of the plurality of bluetooth Mesh devices can be detected through lower resource overhead, so that the resource overhead required for detecting the device states of the bluetooth Mesh devices can be reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is an exemplary diagram of a bluetooth Mesh network.
Fig. 2 is a diagram illustrating an example of a correspondence relationship between a bluetooth Mesh device and a timer.
Fig. 3 is a diagram illustrating an example of a correspondence relationship between a device status list and a timer according to an embodiment of the present application.
Fig. 4 is a flowchart of an apparatus state detection method according to an embodiment of the present application.
Fig. 5 is an alternative form of the device status list provided in the embodiment of the present application.
Fig. 6 is a flowchart of a method for updating a device status list according to an embodiment of the present application.
Fig. 7 is a schematic diagram of device status detection provided in the embodiment of the present application.
Fig. 8 is an alternative block diagram of an apparatus state detection device according to an embodiment of the present application.
Fig. 9 is an alternative block diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 exemplarily shows an exemplary diagram of a bluetooth Mesh network, and as shown in fig. 1, the bluetooth Mesh network may include: bluetooth Mesh devices 101, 102, 10n, wherein n bluetooth Mesh devices are already distributed network devices. In fig. 1, the bluetooth Mesh gateway 110 may be used as a control device, and may configure and control the bluetooth Mesh device, and the bluetooth Mesh device may directly interact with the bluetooth Mesh gateway, and the bluetooth Mesh gateway 110 may directly interact with the cloud server. Further, the bluetooth Mesh gateway 110 may also serve as a springboard for connecting the bluetooth Mesh device with the cloud server, thereby implementing remote control of the bluetooth Mesh device. The bluetooth mesh gateway 110 may be, for example, a smart speaker, a multi-mode gateway, etc. having bluetooth communication capability and internet connection capability.
The bluetooth Mesh devices in the bluetooth Mesh network have device states such as online and offline, and in the process of using the bluetooth Mesh gateway 110 to realize data interaction between the bluetooth Mesh devices 101 and 102 to 10n and the cloud server, the cloud server needs to inform the users of the online and offline states of the bluetooth Mesh devices 101 and 102 to 10n, so that the users can conveniently check and maintain the bluetooth Mesh devices 101 and 102 to 10 n. Based on the method, the Bluetooth Mesh gateway can detect the equipment state of the Bluetooth Mesh equipment and inform the cloud server of the equipment state of the Bluetooth Mesh equipment.
One implementation way for the bluetooth Mesh gateway to detect the device state of the bluetooth Mesh device is as follows: the method comprises the steps that a plurality of timers are set for a plurality of Bluetooth Mesh devices, one Bluetooth Mesh device corresponds to one timer, and therefore device state detection of the Bluetooth Mesh devices is achieved through the plurality of timers. Fig. 2 exemplarily shows an exemplary diagram of a bluetooth Mesh device and a timer, and as shown in fig. 2, timers 201, 202, 10n corresponding to bluetooth Mesh devices 101, 102, 10n, respectively, are created in a bluetooth Mesh gateway; the Bluetooth Mesh gateway can set offline timeout time for the timer, and if the timing time of one timer reaches the offline timeout time, the Bluetooth Mesh device corresponding to the timer is not interacted with the Bluetooth Mesh gateway, and the Bluetooth Mesh device corresponding to the timer can be determined to be in an offline state. For example: the offline timeout time set for the timer 201 is 90 seconds, and if the bluetooth Mesh device 101 does not interact with the bluetooth Mesh gateway within 90 seconds timed by the timer 201, the bluetooth Mesh device 101 can be confirmed to be offline; if the bluetooth Mesh device 101 interacts with the bluetooth Mesh gateway within 90 seconds timed by the timer 201, it can be confirmed that the bluetooth Mesh device 101 is online; by the method, the device state detection of the Bluetooth Mesh devices can be realized based on the plurality of timers and the interaction condition of the Bluetooth Mesh devices and the Bluetooth Mesh gateway.
However, a large number of bluetooth Mesh devices exist in the large-scale bluetooth Mesh network, and if the bluetooth Mesh gateway sets a corresponding number of timers according to the number of the bluetooth Mesh devices, the bluetooth Mesh gateway needs to start a large number of timers to perform device state detection of the bluetooth Mesh devices, which causes the bluetooth Mesh gateway to have a very large resource overhead (e.g., memory resource overhead).
Therefore, when the device states of a plurality of bluetooth Mesh devices are detected, how to reduce the resource overhead of the bluetooth Mesh gateway is very important. Based on this, through an improved technical solution, an equipment state list is maintained at the bluetooth Mesh gateway, where the equipment state list may record equipment values (also referred to as life values) of the bluetooth Mesh equipment associated with equipment states, and the bluetooth Mesh gateway may update the equipment values of the multiple bluetooth Mesh equipments recorded in the equipment state list by starting a lower number of timers (for example, one timer), so as to reflect the equipment states of the bluetooth Mesh equipments through the equipment values of the bluetooth Mesh equipments, thereby implementing equipment state detection of the multiple bluetooth Mesh equipments. Fig. 3 exemplarily shows a corresponding relation example of the device state list and the timer in the embodiment of the present application; referring to fig. 3, the bluetooth Mesh gateway may set a timer 301 and a device status list 302; the device state list 302 may record device values of a plurality of bluetooth Mesh devices, and in the embodiment of the present application, based on the timing time of one timer 301, the device values of the plurality of bluetooth Mesh devices in the device state list may be updated, so that the device state of the bluetooth Mesh device is determined based on the device values of the bluetooth Mesh devices, and the resource overhead of the bluetooth Mesh gateway is effectively reduced.
Based on the above idea, fig. 4 exemplarily shows an optional flowchart of the device status detection method provided in the embodiment of the present application. The method flow can be applied to electronic devices such as a bluetooth Mesh gateway, and referring to fig. 4, the method flow can include the following steps.
In step 410, a device status list is maintained, 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 device statuses of the bluetooth Mesh devices.
In the interaction process of the Bluetooth Mesh device and the Bluetooth Mesh gateway, the Bluetooth Mesh gateway acquires information sent by the Bluetooth Mesh device and can consider the Bluetooth Mesh device to be online; in some embodiments, the bluetooth Mesh gateway in the embodiments of the present application may be an online bluetooth Mesh device, and construct a device status list. As an alternative implementation, when the device status list records information of the bluetooth Mesh devices in the online status, the device status list may be referred to as an online status list. In other embodiments, the device state list may also record information of the bluetooth Mesh device in an offline state, at this time, the device state list may be referred to as an offline state list, and of course, the device state list may be constructed according to actual requirements, which is not limited in this embodiment of the present application.
The device state list records content associated with device states of the plurality of bluetooth Mesh devices, and in some embodiments, the device state list records at least device values of the plurality of bluetooth Mesh devices, the device values being associated with the device states. It is understood that a device value is a numerical representation of the state of the device. Taking the case that the device state list is used for recording at least the online state of the bluetooth Mesh device, the device value may be a life value of the bluetooth Mesh device, and it is determined that the bluetooth Mesh device is offline if no information sent by the bluetooth Mesh device is received within a defined time of 90 seconds, in which case, the maximum life value of the bluetooth Mesh device is defined to be 9.
In some embodiments, the device state list may be an array or a linked list (for example, the device state list records information in an array or linked list structure), fig. 5 exemplarily shows an optional form of the device state list, such as the device state list shown in fig. 5, where the device state list records device numbers of a plurality of bluetooth Mesh devices and device identifications (for example, device IDs of the bluetooth Mesh devices), where the device IDs are device identification information unique to the bluetooth Mesh devices, the device IDs of the plurality of bluetooth Mesh devices recorded in the device state list are different from each other, and the device ID of each bluetooth Mesh device corresponds to a device number. It should be noted that fig. 5 is only an optional form of the device status list in the embodiment of the present application, and the embodiment of the present application is not limited to a specific form of the device status list.
In step S420, detecting a timing time of a timer, and decreasing a device value of the bluetooth Mesh device in the device status list by a preset value when the timing time of the timer reaches a preset timing time; and updating the device value of the Bluetooth Mesh device in the device state list to a maximum value when the information sent by the Bluetooth Mesh device is acquired.
The preset time is the preset time for realizing one-time updating of the device numerical values of the plurality of Bluetooth Mesh devices recorded in the device state list. For example: the preset timing time is 10 seconds, when the timing time of the timer reaches 10 seconds, one-time traversal is performed on the device state list, and the device values of the plurality of Bluetooth Mesh devices recorded in the device state list are reduced by preset values, so that the device values of the plurality of Bluetooth Mesh devices are updated. For example, the preset value is 1, and when the predetermined timing time is 10 seconds, traversing the device state list is performed every 10 seconds, and all the device values of the bluetooth Mesh devices recorded in the device state list are reduced by 1.
It can be understood that, if the bluetooth Mesh device does not send information to the bluetooth Mesh gateway for a long time, the bluetooth Mesh device is offline, and at this moment, in the embodiment of the present application, the device value of the bluetooth Mesh device is reduced by every preset time interval, and the device value that can be reduced by the bluetooth Mesh device embodies the bluetooth Mesh device that does not send information to the bluetooth Mesh gateway for a long time, so that the device state of the bluetooth Mesh device is reflected by the association relationship between the device value of the bluetooth Mesh device and the device state.
In the bluetooth Mesh network, the bluetooth Mesh gateway acquires information sent by the bluetooth Mesh device, the bluetooth Mesh device is online, and in order to avoid that the online bluetooth Mesh device is continuously reduced in device value, the embodiment of the application can update the device value of the bluetooth Mesh device in the device state list to the maximum value when the bluetooth Mesh gateway acquires the information sent by the bluetooth Mesh device, so that the online bluetooth Mesh device which sends the information is embodied under the condition that the device value of the bluetooth Mesh device is reduced at preset intervals. Alternatively, the maximum value may be an upper limit of a preset device value, for example, the device value corresponding to the bluetooth Mesh device with reference to ID2 in fig. 5 is 9.
In some embodiments, the information sent by the bluetooth Mesh device may be heartbeat information. Further, according to the heartbeat information of the bluetooth Mesh device, the bluetooth Mesh gateway can obtain the unicast address of the bluetooth Mesh device.
In step S430, the device state of the bluetooth Mesh device is determined according to the device value of the bluetooth Mesh device.
As an optional implementation, in an optional process of determining the device state of the bluetooth Mesh device according to the device value of the bluetooth Mesh device, if the device value of the bluetooth Mesh device is reduced to a minimum value, determining that the bluetooth Mesh device is in an offline state; the minimum value may be a lower limit value of a preset device value, for example, the device value corresponding to the bluetooth Mesh device with reference to ID7 in fig. 5 is 0. That is to say, the bluetooth Mesh device does not send information to the bluetooth Mesh gateway within a plurality of consecutive preset timing periods, and the device value of the bluetooth Mesh device is reduced for a plurality of times until the device value is reduced to the lower limit value of the device value, it can be determined that the bluetooth Mesh device is not interacted with the bluetooth Mesh gateway for a long time, and at this time, it can be determined that the bluetooth Mesh device is offline. In one example, when the life value of a bluetooth Mesh device decreases from 9 to 0 (1 every 10 seconds), it may be determined that the bluetooth Mesh device does not interact with the bluetooth Mesh gateway within 90 seconds, and the bluetooth Mesh device goes offline.
It can be understood that, when the bluetooth Mesh gateway acquires the 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.
In some embodiments, if the device value of the bluetooth Mesh device in the device status list is not reduced to the minimum value, the device status of the bluetooth Mesh device in the device status list is proved to be in an online status at this time.
In some further embodiments, when the device value of the bluetooth Mesh device is reduced to the minimum value, the bluetooth Mesh device is offline, and when the device status list records information of the offline bluetooth Mesh device, the bluetooth Mesh device may be deleted in the device status list in the embodiments of the present application.
It can be seen that, in the embodiment of the present application, by maintaining the device state list, the device state list may at least record the device values of the multiple bluetooth Mesh devices, and the device values of the bluetooth Mesh devices are associated with the device states of the bluetooth Mesh devices, and then the device values of the multiple bluetooth Mesh devices recorded by the device state list are adjusted through the timing detection of the timer, so that the device states of the multiple bluetooth Mesh devices are reflected by the device values of the multiple bluetooth Mesh devices, and the resource overhead required for detecting the device states of the bluetooth Mesh devices is effectively reduced.
In some embodiments, because the occasions when the bluetooth Mesh device sends information to the bluetooth Mesh gateway are different, when the bluetooth Mesh gateway acquires the information sent by the bluetooth Mesh device at any time, it needs to determine whether the bluetooth Mesh device is an offline device or an online device, therefore, based on the bluetooth Mesh device identification information and the device value recorded in the device state list, the bluetooth Mesh gateway has a step of determining the bluetooth Mesh device sending the information, fig. 6 is a flowchart of a method for updating the device state list in the embodiment of the present application, and as shown in fig. 6, the method may include the following steps.
In step S610: and acquiring information sent by the Bluetooth Mesh equipment.
In step S620: judging whether the equipment identification information of the Bluetooth Mesh equipment for sending information is recorded in the equipment state list or not; if yes, go to step S630; if not, go to step S640.
In step S630: and adjusting the device numerical value of the Bluetooth Mesh device recorded by the device state list to be a maximum value.
In step S640: and adding the record of the Bluetooth Mesh equipment in the equipment state list, and setting the equipment value of the recorded Bluetooth Mesh equipment as the maximum value.
In further some embodiments, after the bluetooth Mesh gateway acquires the information sent by the bluetooth Mesh device, if the device status list does not have the record of the bluetooth Mesh device, the embodiment of the present application may determine the device identification information of the bluetooth Mesh device to distinguish different bluetooth Mesh devices; and simultaneously, recording the equipment identification information of the Bluetooth Mesh equipment and the equipment value set as the maximum value into an equipment state list.
When the bluetooth Mesh gateway acquires the information sent by the bluetooth Mesh device and judges that the bluetooth Mesh device is recorded in the device state list, the embodiment of the application can adjust the device value of the recorded bluetooth Mesh device in the device state list to the maximum value.
In some embodiments, the device identification information and the device value are configured in correspondence in the device status list, and as illustrated with continued reference to fig. 5, one bluetooth Mesh device corresponds to one device Identification (ID), and the ID of the bluetooth Mesh device corresponds to the device value of the bluetooth Mesh device. It can be understood that the times of the device value corresponding to the device identifier being reduced by the preset value are different, and therefore the device values of the plurality of bluetooth Mesh devices recorded in the device state list will also be different.
In some embodiments, if the device status of the bluetooth Mesh device changes, the bluetooth Mesh gateway may send a status message of the bluetooth Mesh device to the cloud server. As shown in fig. 7, in the device state detection schematic diagram of the embodiment of the present application, based on the device life value recorded in the device state list, when the device state of the bluetooth Mesh device changes, the bluetooth Mesh gateway sends messages such as online and offline of the bluetooth Mesh device to the cloud server. Wherein, the upper limit value of the equipment life value is 9, and the lower limit value is 0.
As an optional implementation, for a bluetooth Mesh device whose device value is reduced to the minimum value, an offline state message of the bluetooth Mesh device is sent to the cloud server, for example: referring to fig. 7, in the device status list, the device life value of the bluetooth Mesh device is reduced to 0, which indicates that the bluetooth Mesh device does not send information to the bluetooth Mesh gateway within 90 seconds continuously, and then the bluetooth Mesh device is in an offline state, and the bluetooth Mesh gateway sends an offline state message of the bluetooth Mesh device to the cloud server.
As an optional implementation, for a bluetooth Mesh device newly recorded in the device status list, an online status message of the bluetooth Mesh device is sent to the cloud server, for example: referring to fig. 7, taking a bluetooth Mesh device with a device identifier of ID2 as an example, if no ID2 is recorded in the device status list, the bluetooth Mesh gateway acquires information sent by the bluetooth Mesh device, and determines that the bluetooth Mesh device is not recorded in the device status list, and when the device identifier and the device life value corresponding to the bluetooth Mesh device are added to the device status list, may send an online status message of the bluetooth Mesh device to the cloud server.
As another optional implementation, for a bluetooth Mesh device whose device value is not reduced to the minimum value, sending an online status message of the bluetooth Mesh device to the cloud server, for example: referring to fig. 7, the device life value of the bluetooth Mesh device recorded in the device state list is not a value of 0, which indicates that the bluetooth Mesh device has sent information to the bluetooth Mesh gateway at least once within 90 seconds, and the bluetooth Mesh device is in an online state, and the bluetooth Mesh gateway sends an online state message of the bluetooth Mesh device to the cloud server.
The device state detection scheme provided by the embodiment of the application can maintain a device state list in electronic devices such as a Bluetooth Mesh gateway and the like which are communicated with Bluetooth Mesh devices in a large-scale Bluetooth Mesh network, the device state list can at least record the device values of a plurality of Bluetooth Mesh devices, the device values of the Bluetooth Mesh devices are associated with the device states of the Bluetooth Mesh devices, and further the device values of the plurality of Bluetooth Mesh devices recorded by the device state list are adjusted based on timing detection of a timer, so that the device states of the plurality of Bluetooth Mesh devices are reflected by the device values of the plurality of Bluetooth Mesh devices, and the detection of the device states of the plurality of Bluetooth Mesh devices through lower resource overhead is realized.
In the following, the device state detection apparatus provided in the embodiment of the present application is introduced, and the apparatus content described below may be considered as a functional module that is required to be set by the bluetooth Mesh gateway to implement the device state detection method provided in the embodiment of the present application. The following description may be referred to in correspondence with the above description.
As an alternative implementation, fig. 8 exemplarily shows an alternative block diagram of the device state detection apparatus according to the embodiment of the present application, and the apparatus is applicable to an electronic device, and referring to fig. 8, the apparatus may include:
a state maintaining module 810, configured to maintain a device state list, where the device state list is used to record at least device values of a plurality of bluetooth Mesh devices, and the device values of the bluetooth Mesh devices are associated with device states of the bluetooth Mesh devices;
the state detection module 811 is configured to detect the timing time of a timer, and reduce the device value of the bluetooth Mesh device in the device state list by a preset value when the timing time of the timer reaches a preset timing time; when information sent by the Bluetooth Mesh device is obtained, updating the device value of the Bluetooth Mesh device in the device state list to be the maximum value;
a state determining module 812, configured to determine a device state of the bluetooth Mesh device according to the device value of the bluetooth Mesh device.
In some embodiments, the status determining module 812, configured to determine 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 is reduced to a minimum value, determining that the Bluetooth Mesh device is in an off-line state, wherein the minimum value is smaller than the maximum value;
and if the device value of the Bluetooth Mesh device is not reduced to the minimum value, determining that the Bluetooth Mesh device is in an online state.
In some embodiments, the status detecting module 810 is configured to, after obtaining the 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, where the updating includes:
judging whether a record of the Bluetooth Mesh equipment for sending information exists in the equipment state list or not;
if so, adjusting the device numerical value of the Bluetooth Mesh device recorded in the device state list to be the maximum value;
if not, adding the record of the Bluetooth Mesh equipment in the equipment state list, and setting the equipment value of the recorded Bluetooth Mesh equipment as the maximum value.
In some further embodiments, the state maintaining module 810 maintains a device state list, which further records device identification information of the bluetooth Mesh device; the determining, executed in the state detection module 811, whether there is a record of the bluetooth Mesh device that sends information in the device state list includes:
and judging whether the equipment identification information of the Bluetooth Mesh equipment for sending the information is recorded in the equipment state list or not.
In some embodiments, the status detection module 811 is further configured to:
and deleting the record of the Bluetooth Mesh device of which the device value is reduced to the minimum value from the device state list.
In some embodiments, the state determining 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:
sending an offline state message of the Bluetooth Mesh device to a cloud server aiming at the Bluetooth Mesh device with the device value reduced to the minimum value;
and/or sending an online state message of the Bluetooth Mesh device to a cloud server aiming at the Bluetooth Mesh device newly recorded in the device state list;
and/or sending an online state message of the Bluetooth Mesh device to the cloud server aiming at the Bluetooth Mesh device of which the device value is not reduced to the minimum value.
In some embodiments, the information sent by the bluetooth Mesh device comprises heartbeat information sent by the bluetooth Mesh device; the device state list is an array or a linked list.
The embodiment of the present application further provides an electronic device, where the electronic device may implement the device state detection method provided by the embodiment of the present application by setting the device state detection apparatus described above. In a possible example, the electronic device may be, for example, a bluetooth Mesh gateway. In other examples, the electronic device may also be a terminal device such as a mobile phone used by the user. As an alternative implementation, fig. 9 exemplarily shows an alternative block diagram of an electronic device according to an embodiment of the present application, and as shown in fig. 9, 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.
In the embodiment of the present application, the number of the processor 91, the communication interface 92, the memory 93 and the communication bus 94 is at least one, and the processor 91, the communication interface 92 and the memory 93 are communicated with each other through the communication bus 94.
Alternatively, the communication interface 92 may be an interface of a communication module for performing network communication.
Alternatively, 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 Application Specific Integrated Circuit ASIC (Application Specific Integrated Circuit), or one or more Integrated circuits configured to implement the embodiments of the present Application.
The memory 93 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
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 state detection method executed by the electronic device according to the embodiment of the present application.
In some embodiments, the electronic device further comprises: the device number value of the Bluetooth Mesh device in the device state list is reduced by a preset value when the timing time of the timer reaches the preset timing time; the device value of the Bluetooth Mesh device is associated with the device state of the Bluetooth Mesh device.
Embodiments of the present application also provide a storage medium storing one or more computer-executable instructions, which when executed, implement a device status detection method executed by an electronic device according to an embodiment of the present application.
Embodiments of the present application further provide a computer program, which when executed, implements the device state detection method executed by the electronic device according to the embodiments of the present application.
While various embodiments have been described above in connection with what are presently considered to be the embodiments of the disclosure, the various alternatives described in the various embodiments can be readily combined and cross-referenced without conflict to extend the variety of possible embodiments that can be considered to be the disclosed and disclosed embodiments of the disclosure.
Although the embodiments of the present application are disclosed above, the present application is not limited thereto. Various changes and modifications may be effected by one skilled in the art without departing from the spirit and scope of the application, and the scope of protection is defined by the claims.

Claims (10)

1. An apparatus state detection method, comprising:
maintaining a device state list for recording at least device values of a plurality of Bluetooth Mesh devices, the device values of the Bluetooth Mesh devices being associated with device states of the Bluetooth Mesh devices;
detecting the timing time of a timer, and reducing the device value of the Bluetooth Mesh device in the device state list by a preset value when the timing time of the timer reaches the preset timing time; when information sent by the Bluetooth Mesh device is acquired, updating the device value of the Bluetooth Mesh device in the device state list to be a maximum value;
and determining the equipment state of the Bluetooth Mesh equipment according to the equipment value of the Bluetooth Mesh equipment.
2. The method of claim 1, wherein the determining the device state of the bluetooth Mesh device according to the device value of the bluetooth Mesh device comprises:
if the device value of the Bluetooth Mesh device is reduced to the minimum value, determining that the Bluetooth Mesh device is in an off-line state;
and if the device value of the Bluetooth Mesh device is not reduced to the minimum value, determining that the Bluetooth Mesh device is in an online state.
3. The method according to claim 1 or 2, wherein the updating the device value of the bluetooth Mesh device in the device status list to the maximum value after acquiring the information sent by the bluetooth Mesh device comprises:
judging whether the record of the Bluetooth Mesh equipment for sending information exists in the equipment state list or not;
if so, adjusting the device numerical value of the Bluetooth Mesh device recorded in the device state list to be the maximum value;
if not, adding the record of the Bluetooth Mesh equipment in the equipment state list, and setting the equipment value of the recorded Bluetooth Mesh equipment as the maximum value.
4. The method of claim 3, wherein the device status list further records device identification information of the Bluetooth Mesh device; the judging whether the record of the Bluetooth Mesh device for sending the information exists in the device state list comprises the following steps:
and judging whether the equipment identification information of the Bluetooth Mesh equipment for sending the information is recorded in the equipment state list or not.
5. The method of claim 2 or 4, further comprising:
and deleting the record of the Bluetooth Mesh device of which the device value is reduced to the minimum value from the device state list.
6. The method of claim 2, further comprising:
sending an offline state message of the Bluetooth Mesh device to a cloud server aiming at the Bluetooth Mesh device with the device value reduced to the minimum value;
and/or sending an online status message of the Bluetooth Mesh device to a cloud server aiming at the Bluetooth Mesh device newly recorded in the device status list;
and/or sending an online state message of the Bluetooth Mesh device to the cloud server aiming at the Bluetooth Mesh device of which the device value is not reduced to the minimum value.
7. The method of claim 1, wherein the information sent by the bluetooth Mesh device comprises heartbeat information sent by the bluetooth Mesh device; the device state list is an array or a linked list.
8. An electronic device, comprising: at least one memory and at least one processor; the memory stores one or more computer-executable instructions that are called by the processor to perform the device state detection method of any of claims 1-7; the electronic equipment is a Bluetooth Mesh gateway or terminal equipment.
9. The electronic device of claim 8, further comprising: a timer; when the timing time of the timer reaches the preset timing time, reducing the equipment value of the Bluetooth Mesh equipment in an equipment state list maintained by the electronic equipment by the preset value; the device value of the Bluetooth Mesh device is associated with the device state of the Bluetooth Mesh device.
10. A storage medium, wherein the storage medium stores one or more computer-executable instructions that, when executed, implement the device state detection method of any one of claims 1-7.
CN202210765465.0A 2022-07-01 2022-07-01 Equipment state detection method, electronic equipment and storage medium Pending CN115297501A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210765465.0A CN115297501A (en) 2022-07-01 2022-07-01 Equipment state detection method, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210765465.0A CN115297501A (en) 2022-07-01 2022-07-01 Equipment state detection method, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115297501A true CN115297501A (en) 2022-11-04

Family

ID=83821357

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210765465.0A Pending CN115297501A (en) 2022-07-01 2022-07-01 Equipment state detection method, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115297501A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662645A (en) * 2009-09-17 2010-03-03 中兴通讯股份有限公司 Backup method for media processing unit, multipoint control unit and video communication system
CN103163874A (en) * 2011-12-09 2013-06-19 北京北方微电子基地设备工艺研究中心有限责任公司 Semiconductor device safety detection system and semiconductor device safety measuring method
US20200162278A1 (en) * 2018-11-15 2020-05-21 International Business Machines Corporation Internet of things enabled device termination
CN111371631A (en) * 2018-12-25 2020-07-03 成都鼎桥通信技术有限公司 Heartbeat mechanism detection method, terminal device and storage medium
CN113596884A (en) * 2021-08-19 2021-11-02 深圳创维数字技术有限公司 Equipment state monitoring method, equipment state monitoring device and readable storage medium
CN114449563A (en) * 2022-01-27 2022-05-06 厦门亚锝电子科技有限公司 Method for improving work stability of Bluetooth mesh network equipment and Bluetooth equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662645A (en) * 2009-09-17 2010-03-03 中兴通讯股份有限公司 Backup method for media processing unit, multipoint control unit and video communication system
CN103163874A (en) * 2011-12-09 2013-06-19 北京北方微电子基地设备工艺研究中心有限责任公司 Semiconductor device safety detection system and semiconductor device safety measuring method
US20200162278A1 (en) * 2018-11-15 2020-05-21 International Business Machines Corporation Internet of things enabled device termination
CN111371631A (en) * 2018-12-25 2020-07-03 成都鼎桥通信技术有限公司 Heartbeat mechanism detection method, terminal device and storage medium
CN113596884A (en) * 2021-08-19 2021-11-02 深圳创维数字技术有限公司 Equipment state monitoring method, equipment state monitoring device and readable storage medium
CN114449563A (en) * 2022-01-27 2022-05-06 厦门亚锝电子科技有限公司 Method for improving work stability of Bluetooth mesh network equipment and Bluetooth equipment

Similar Documents

Publication Publication Date Title
CN111884879A (en) Network detection method, device and related equipment
CN109040295B (en) Method and device for determining abnormal disconnection, terminal and storage medium
CN111984561B (en) IPMI command processing method, system, device and medium for BMC
CN112769652A (en) Node service monitoring method, device, equipment and medium
CN111884875A (en) Offline device determination method and device
CN115023919B (en) Firewall rule updating method and device, server and storage medium
CN111405059B (en) Cloud device data transmission method, electronic device and Internet of things system
CN112910740A (en) State reporting method, device, equipment and computer readable storage medium
CN115955332A (en) Abnormal traffic filtering method and device for authentication system and electronic equipment
CN110875857A (en) Method, device and system for reporting disconnected network state
CN100359865C (en) Detecting method
CN111049741B (en) Method for improving communication reliability, communication system and terminal equipment
CN110224872B (en) Communication method, device and storage medium
CN115297501A (en) Equipment state detection method, electronic equipment and storage medium
CN104065519A (en) Method for improving conversation interactive performance and automatic configuration server
CN110784369A (en) Method for detecting long connection, server, terminal and storage medium
CN113259468B (en) Network equipment configuration method and device
CN114064395A (en) Method and device for monitoring health degree of integrated interface, storage medium and electronic equipment
CN112953794A (en) Network detection method, device, equipment and storage medium of router
CN118540213B (en) Node configuration method and related device for secure real-time bus SRB
CN111343261A (en) Mobile phone data backup method based on wireless hotspot transmission
CN114006936B (en) System operation information real-time acquisition method, server and client
CN109451047A (en) Data transferring method, device, equipment and the storage medium of monitoring warning system
CN112769824B (en) Information transmission state updating method, terminal, device and storage medium
CN109347933B (en) Method and device for establishing connection

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 311121 room 801, building 2, No. 2699, yuhangtang Road, Cangqian street, Yuhang District, Hangzhou, Zhejiang Province

Applicant after: Zhejiang Aikesi Elf Artificial Intelligence Technology Co.,Ltd.

Address before: 311121 room 801, building 2, No. 2699, yuhangtang Road, Cangqian street, Yuhang District, Hangzhou, Zhejiang Province

Applicant before: Zhejiang Maojing Artificial Intelligence Technology Co.,Ltd.

CB02 Change of applicant information