Communication method and device for adjusting packet scanning window

By adjusting the start time of the scanning window of the Bluetooth device in the Bluetooth mesh network and making it aligned at the same time, the problems of high power consumption and low reception success rate of Bluetooth devices are solved, and more efficient device communication is achieved.

WO2025156703A1PCT designated stage Publication Date: 2025-07-31HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/123732
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-25
Filing Date
2024-10-09
Publication Date
2025-07-31

AI Technical Summary

Technical Problem

In Bluetooth mesh network, the power consumption of broadcasting message devices is high, and the success rate of device reception is low when the prior art sends messages through flooding.

Method used

By adjusting the start time of the message scanning window of the Bluetooth device in the Bluetooth mesh network, it is aligned at the same time, reducing the duration of each broadcast, reducing the device power consumption, and improving the message reception success rate.

Benefits of technology

It reduces the power consumption of Bluetooth devices, improves the success rate of packet reception, and enhances the reliability of Bluetooth mesh network and the fast connection capability of the device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024123732_31072025_PF_FP_ABST
    Figure CN2024123732_31072025_PF_FP_ABST
Patent Text Reader

Abstract

A communication method and device for adjusting a packet scanning window. In the method, the start time of a scanning window of each Bluetooth device in a Bluetooth mesh network is adjusted to the same moment. Thus, there is an overlapping time period between scanning windows of all nodes, so that the probability that all Bluetooth devices are simultaneously scanned is increased; in addition, the duration in which each Bluetooth device broadcasts a heartbeat message each time is shortened, so that the power consumption of the Bluetooth device broadcasting a packet can be reduced while the probability that the heartbeat message of each Bluetooth device is scanned is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Communication method and device for adjusting message scanning window

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on January 25, 2024, with application number 202410107894.8 and application name “A communication method and device for adjusting the message scanning window”. The entire contents of the above application are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of wireless communication technology, and in particular to a communication method and device for adjusting a message scanning window. Background Art

[0003] The Bluetooth Special Interest Group (Bluetooth SIG) has released Bluetooth Low Energy (BLE)-based networks, such as Bluetooth wireless mesh networks (hereinafter referred to as Bluetooth mesh networks). Bluetooth mesh networking technology has broad application prospects in areas such as building automation, commercial lighting, and sensor networks.

[0004] BLE devices in a Bluetooth mesh network are called nodes, and each node can communicate with other nodes through Bluetooth broadcasting and other methods. For example, Figure 1A shows a schematic diagram of a Bluetooth mesh network 100A. The Bluetooth mesh network 100A in Figure 1A consists of several nodes, including nodes H1, H2, and Hn, as shown in Figure 1A. Each node can use Bluetooth broadcasting to ensure timely response to network requests and communication with other nodes.

[0005] Bluetooth mesh networks typically use flooding to broadcast and relay messages, allowing them to reach their destination devices via multiple paths to ensure network reliability. However, to improve the reception success rate of receiving devices, the broadcasting device must continue broadcasting for a relatively long period of time, resulting in higher power consumption.

[0006] Summary of the Invention

[0007] In order to solve the above problems, an embodiment of the present application provides a communication method and device for adjusting a message scanning window, so as to improve the reception success rate of a message receiving device.

[0008] In a first aspect, an embodiment of the present application provides a communication method for adjusting a message scanning window, comprising: a first Bluetooth device in a Bluetooth mesh network broadcasts a first scanning adjustment message, the first scanning adjustment message being used to instruct a second Bluetooth device and a third Bluetooth device in the Bluetooth mesh network to adjust the start time of the message scanning window to a first moment, wherein the start time of the message scanning window of the second Bluetooth device before adjustment is a second moment, and the start time of the message scanning window of the third Bluetooth device before adjustment is a third moment, and the first moment, the second moment and the third moment are all different time points; the first Bluetooth device adjusts the start time of the message scanning window to the first moment; the first Bluetooth device scans multiple heartbeat messages in at least one message scanning window after the start time is adjusted, and the multiple heartbeat messages include a first heartbeat message broadcast by the second Bluetooth device and a second heartbeat message broadcast by the third Bluetooth device.

[0009] It is understandable that in a Bluetooth mesh network, when each Bluetooth device (for example, the node below) performs message scanning, the message scanning window (i.e., the scanning window below) will make the start time of the message scanning window not at the same moment according to its own configuration. For example, the second Bluetooth and the third Bluetooth device have different configurations. At this time, the start time of the message scanning window of each Bluetooth device is likely to be at different moments. For example, the start time of the message scanning window of the second Bluetooth device before adjustment is the second moment, and the start time of the message scanning window of the third Bluetooth device before adjustment is the third moment, and the second moment and the third moment are both different time points. When the first Bluetooth device broadcasts the first scan adjustment message, and the first scan adjustment message is used to instruct the second Bluetooth device and the third Bluetooth device in the Bluetooth mesh network to adjust the start time of the message scanning window to the first moment, each Bluetooth device can adjust the message scanning window to the same moment. At this time, there will be overlapping time periods between the message scanning windows of the first Bluetooth device, the second Bluetooth device and the third Bluetooth device, which can increase the probability of each Bluetooth device being scanned at the same time, and thus reduce the duration of each Bluetooth device broadcasting a heartbeat message each time, without increasing the scanning period. In this way, while increasing the probability of each Bluetooth device's heartbeat message being scanned, the power consumption of the Bluetooth device broadcasting the message can be reduced.

[0010] In a possible implementation of the first aspect above, it also includes: based on the clock drift accuracy of each Bluetooth device in the Bluetooth mesh network, determining that the first Bluetooth device broadcasts the first scan adjustment message, wherein the clock drift accuracy of the first Bluetooth device meets the first accuracy condition.

[0011] It is understood that the first accuracy condition can be that the Bluetooth device's clock drift accuracy is greater than that of all other Bluetooth devices in the Bluetooth mesh network that are subject to message scan window adjustment, excluding itself, i.e., that it has the highest clock drift accuracy. The first accuracy condition can also be that the clock drift accuracy is the second highest, or the third highest, etc., though this is not required here. It is understood that since each Bluetooth device can assess its own clock drift accuracy, determining the device for broadcasting scan adjustment messages based on clock drift accuracy is scientific and reasonable.

[0012] In a possible implementation of the first aspect, the scanning periods of the first Bluetooth device, the second Bluetooth device, and the third Bluetooth device are the same or in multiples, and the scanning period includes a message scanning window and a scanning dormant period.

[0013] It can be understood that when the scanning periods of the first Bluetooth device, the second Bluetooth device and the third Bluetooth device are the same or in multiple relationship, for example, the scanning period can be 600ms or 300ms as shown below, then the overlapping time periods between the message scanning windows of the first Bluetooth device, the second Bluetooth device and the third Bluetooth device are relatively long, and the probability of each Bluetooth device being scanned at the same time is higher, which is conducive to further reducing power consumption.

[0014] In a possible implementation of the first aspect above, the first Bluetooth device periodically sends a scan adjustment message with an adjustment period, and the adjustment period is greater than or equal to the maximum scan period, and the maximum scan period is the maximum scan period of the first Bluetooth device and the scan periods of Bluetooth devices other than itself in the Bluetooth mesh network.

[0015] It is understandable that as each Bluetooth device continues to run and clock drift occurs, the start time of the message scanning windows that should have been aligned between the Bluetooth devices will be staggered. Therefore, the first Bluetooth device periodically sends a scan adjustment message with an adjustment period to reconfigure the start time of the message scanning window of each Bluetooth device to the same moment, thereby increasing the probability of each Bluetooth device being scanned at the same time.

[0016] In a second aspect, an embodiment of the present application provides a communication method for adjusting a message scanning window, comprising: a second Bluetooth device in a Bluetooth mesh network receives a first scanning adjustment message sent by a first Bluetooth device in the Bluetooth mesh network, and adjusts the start time corresponding to the message scanning window to a first moment, wherein the start time of the message scanning window of the second Bluetooth device before adjustment is a second moment, and the first moment and the second moment are different time points; the second Bluetooth device scans multiple heartbeat messages in at least one message scanning window after the start time is adjusted, and the multiple heartbeat messages include a third heartbeat message broadcast by the first Bluetooth device and a second heartbeat message broadcast by the third Bluetooth device.

[0017] It can be understood that the second Bluetooth device in the Bluetooth mesh network adjusts the start time corresponding to the message scanning window to the first moment based on the received first scanning adjustment message. At this time, it can effectively coordinate with the start time of the message scanning window of other devices in the Bluetooth mesh network, so that the start time of the message scanning window of each Bluetooth device is configured at the same moment, thereby increasing the probability of receiving the same heartbeat message with other devices.

[0018] In a possible implementation of the second aspect above, the third heartbeat message is the heartbeat message broadcast by the first Bluetooth device in the P1 broadcast period, and the second Bluetooth device scans the third heartbeat information in the S2 scanning period, wherein the scanning period includes a message scanning window and a scanning dormant period.

[0019] In a possible implementation of the second aspect above, it also includes: the second Bluetooth device scans the fourth heartbeat message broadcast by the first Bluetooth device in the P1+n broadcast period at the fourth moment; the second Bluetooth device determines, based on the first time interval, that the message scanning window of the second Bluetooth device in the S2+j scanning period meets the first window adjustment condition, wherein the first time interval is: the time interval between the first receiving time tm when the second Bluetooth device scans the fourth heartbeat message and the estimated second receiving time tn when the fourth heartbeat message is received; and the start time of the message scanning window of the S2+j+1 scanning period is adjusted.

[0020] It is understandable that after a period of time when each Bluetooth device in the Bluetooth mesh network broadcasts and scans for heartbeat messages, the scanning windows of each Bluetooth device will be misaligned due to clock drift. At this time, each Bluetooth device can use a Bluetooth device as the alignment standard to dynamically adjust the start time of its own scanning window so that the scanning windows of each Bluetooth device can still have overlapping time periods. Specifically, each device can negotiate an aligned Bluetooth device. For example, with the first Bluetooth device as the aligned Bluetooth device, the start time of the scanning window of each other Bluetooth device is aligned to the start time of the scanning window of the Bluetooth device. It is understandable that each device estimates the first reception time of the heartbeat message sent by the scanned other Bluetooth devices in advance, and then compares the estimated first reception time with the actually received second reception time to determine whether adjustment is required. For example, after the second Bluetooth device scans the fourth heartbeat message broadcast by the first Bluetooth device within the P1+n broadcast period, it compares the time interval between the first receiving time tm of the scanned fourth heartbeat message and the estimated second receiving time tn of receiving the fourth heartbeat message to meet the first window adjustment condition. At this time, the start time of the next message scanning window is adjusted to avoid the misalignment of its own message scanning window with other message scanning windows, thereby reducing the probability of receiving the same heartbeat message with other devices.

[0021] In a possible implementation of the second aspect, the first window adjustment condition includes: the first time interval is greater than a time threshold.

[0022] It is understandable that if the first time interval is greater than the time threshold, it means that the starting time point of the own message scanning window is seriously misaligned with the starting time of the message scanning window of the aligned Bluetooth device, and adjustment is required at this time.

[0023] In a possible implementation of the second aspect above, the start time of the message scanning window of the S2+j+1 scanning cycle is adjusted, including: corresponding to the first receiving time tm being earlier than the second receiving time tn, the start time of the message scanning window of the S2+j+1 scanning cycle is advanced by the first time interval; corresponding to the first receiving time tm being later than the second receiving time tn, the start time of the message scanning window of the S2+j+1 scanning cycle is postponed by the first time interval.

[0024] In a possible implementation of the second aspect, the fourth heartbeat message is the first heartbeat message broadcast by the first Bluetooth device among multiple heartbeat messages broadcast within the P1+n broadcast period.

[0025] It is understandable that it is more convenient to use the first broadcast heartbeat message among multiple broadcast heartbeat messages within a certain broadcast cycle for judgment.

[0026] In a third aspect, an embodiment of the present application provides a Bluetooth device, comprising: a sensor hub and a Bluetooth chip, wherein the sensor hub is used to control the Bluetooth chip to execute a communication method for adjusting a message scanning window such as the first aspect and any one of the various implementations of the first aspect, or a communication method for adjusting a message scanning window such as the second aspect and any one of the various implementations of the second aspect.

[0027] It is understandable that since the sensor hub is a low-power hardware module that can always work, each Bluetooth device can control the Bluetooth chip to periodically broadcast heartbeat messages and adjust the scan window alignment through the sensor hub. At this time, the processor does not need to be awakened to control the Bluetooth chip to broadcast heartbeat messages, and the processor can be dormant, thereby further reducing power consumption. Since the sensor hub consumes less power, the overhead of controlling the Bluetooth chip to periodically broadcast messages is relatively small, which can further reduce the broadcast cycle and the duration of the broadcast heartbeat message in each broadcast cycle, thereby further improving the broadcast efficiency while saving power.

[0028] In a fourth aspect, an embodiment of the present application provides a Bluetooth device, characterized in that it includes: a processor and a memory, wherein the memory is used to store program instructions, and the processor is used to read the program instructions, so that the Bluetooth device executes the communication method for adjusting the message scanning window as described in the first aspect and any one of the various implementations of the first aspect, or the communication method for adjusting the message scanning window as described in the second aspect and any one of the various implementations of the second aspect.

[0029] In a fifth aspect, an embodiment of the present application provides a computer program product, characterized in that the computer program product includes instructions that, when executed, cause the computer to execute a communication method for adjusting the message scanning window such as the first aspect and any one of the various implementations of the first aspect, or a communication method for adjusting the message scanning window such as the second aspect and any one of the various implementations of the second aspect.

[0030] In the sixth aspect, an embodiment of the present application provides a readable storage medium, characterized in that instructions are stored on the readable medium, and when the instructions are executed on an electronic device, the electronic device executes a communication method for adjusting the message scanning window such as the above-mentioned first aspect and any one of the various implementations of the first aspect, or a communication method for adjusting the message scanning window such as the above-mentioned second aspect and any one of the various implementations of the second aspect.

[0031] Among them, the beneficial effects of the fourth to sixth aspects can refer to the relevant beneficial effects of the first and second aspects, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] FIG1A shows a schematic diagram of a Bluetooth mesh network 100A according to some embodiments of the present application;

[0033] FIG1B shows a schematic diagram of a smart home 100B according to some embodiments of the present application;

[0034] FIG1C shows a schematic diagram of scanning windows of a mobile phone 101, a printer 103, and a Bluetooth headset 104 according to some embodiments of the present application;

[0035] FIG1D shows a schematic diagram of a broadcast window according to some embodiments of the present application;

[0036] FIG1E shows a schematic diagram of a control interface P1 of a mobile phone 101 according to some embodiments of the present application;

[0037] FIG2A shows a schematic diagram of a mobile phone 101, a smart light 102, and a printer 103 according to some embodiments of the present application;

[0038] FIG2B shows a schematic diagram of message broadcasting according to some embodiments of the present application;

[0039] FIG2C shows a schematic diagram of a control center interface P2 according to some embodiments of the present application;

[0040] FIG2D shows a schematic diagram of a hyperterminal interface P3 according to some embodiments of the present application;

[0041] FIG2E is a schematic diagram showing a timing axis of clock drift generated by the mobile phone 101, the smart light 102, and the printer 103 after a period of time, according to some embodiments of the present application;

[0042] FIG2F shows another schematic diagram of scanning windows of the mobile phone 101, the smart light 102, and the printer 103 according to some embodiments of the present application;

[0043] FIG3A is a schematic diagram showing a process of a communication method for adjusting a message scanning window according to some embodiments of the present application;

[0044] FIG3B shows a schematic diagram of scanning windows of a mobile phone 101, a smart light 102, and a printer 103 according to some embodiments of the present application;

[0045] FIG3C shows a schematic diagram of a process for dynamically adjusting a scanning window according to some embodiments of the present application;

[0046] FIG4A is a schematic diagram illustrating an interaction method based on adjusting a message scanning window according to some embodiments of the present application;

[0047] FIG4B is a schematic diagram illustrating an interaction of another communication method based on adjusting a message scanning window according to some embodiments of the present application;

[0048] FIG5A shows a schematic diagram of aligning the wake-up windows of a mobile phone 101 and a smart light 102 according to some embodiments of the present application;

[0049] FIG5B is a schematic diagram showing an operation of a CPU-based control of a Bluetooth chip in an initial scanning cycle according to some embodiments of the present application;

[0050] FIG6 shows a schematic diagram of an operation of controlling a Bluetooth chip in an initial scanning cycle based on a sensor hub according to some embodiments of the present application;

[0051] FIG7 shows a schematic structural diagram of an electronic device 700 according to some embodiments of the present application;

[0052] FIG8 shows a schematic structural diagram of an electronic device 800 according to some embodiments of the present application. DETAILED DESCRIPTION

[0053] The illustrative embodiments of the present application include, but are not limited to, a communication method and device for adjusting a message scanning window.

[0054] The following describes the embodiments of the present application in conjunction with the accompanying drawings.

[0055] FIG1B shows a schematic diagram of a smart home scenario based on a Bluetooth mesh network according to some embodiments of the present application.

[0056] As shown in Figure 1B, in a smart home scenario 100B, a mobile phone 101, a smart light 102, a printer 103, a Bluetooth headset 104, a Bluetooth mouse 105, and a computer 106 can serve as nodes in a Bluetooth mesh network. Long connections are established using Bluetooth low energy technology to enable communication and control between devices. As will be appreciated, each node in a Bluetooth mesh network can broadcast messages to or receive messages from other nodes.

[0057] It is understandable that in the scenario shown in FIG1B , the devices in the smart home 100B need to perform keep-alive behavior after establishing a connection. Specifically, each node needs to regularly broadcast heartbeat messages to other devices. For example, heartbeat messages can be broadcast by broadcasting messages, where the heartbeat messages are used to confirm whether the device is online. Other devices can only confirm that the heartbeat message broadcaster is still online and can work normally after receiving the message carrying the heartbeat message. Otherwise, it is considered that the heartbeat message broadcaster has a fault. Typically, devices can broadcast heartbeat messages at fixed time intervals, for example, broadcasting a heartbeat message once every 3 seconds or 3 minutes.

[0058] For example, if the smart light 102 in Figure 1B broadcasts a heartbeat message to the mobile phone 101 at a certain period, such as every three minutes, to indicate that the smart light 102 is online, the mobile phone can then broadcast commands to the smart light 102 normally, thereby controlling the smart light 102. However, if the mobile phone 101 does not receive the heartbeat message broadcast by the smart light 102 for a long time, such as one hour, the mobile phone 101 may believe that the smart light 102 is offline or malfunctioning.

[0059] It is understood that in some embodiments, the Bluetooth chip of each node in the Bluetooth mesh network is configured to perform message scanning at regular intervals (hereinafter referred to as the scanning dormancy period). For example, as shown in FIG1C , the Bluetooth chips in the mobile phone 101, the printer 103, and the Bluetooth headset 104 are configured as follows: the scanning window (i.e., the message scanning window) is 60 milliseconds (ms), the scanning dormancy period is 540 milliseconds, and the scanning cycle includes the scanning window and the scanning dormancy period, and the length is 600ms. That is, each device will start message scanning every 540ms, and each message scan lasts 60ms. At the same time, each device can only scan the heartbeat message, i.e., receive the heartbeat message, during the time period corresponding to the scanning window.

[0060] As previously mentioned, each node in a Bluetooth mesh network broadcasts heartbeat messages at fixed intervals. Therefore, if a node broadcasts a heartbeat message to another node during the other node's scanning dormant period, the other node will not be able to scan the heartbeat message. In some embodiments, to improve the success rate of message reception, each node can use flooding technology when broadcasting heartbeat messages, continuing the broadcast for a longer period before stopping the message.

[0061] Referring to axis 01 in Figure 1D , smart light 102 can broadcast heartbeat messages to all other devices every three minutes when using a flooding method. To improve the success rate of receiving heartbeat messages within a broadcast cycle, smart light 102 can continuously broadcast heartbeat messages for 30 seconds during each broadcast cycle, resulting in higher power consumption.

[0062] It can be understood that for the details of the heartbeat message broadcast corresponding to circle Q1 in axis O1 in Figure 1D, please refer to axis Q1 in Figure 1D. Within 30 seconds (i.e., 3000 milliseconds), the smart light 102 broadcasts a heartbeat message every 20 milliseconds and continuously broadcasts for 30 seconds, resulting in higher power consumption. However, the longer duration of the heartbeat message broadcast leads to higher power consumption.

[0063] Furthermore, high broadcast power consumption can also lead to other problems. For example, because each node broadcasts for a long time and consumes high power, to maintain power consumption and conserve battery life, the scanning sleep period is extended. For example, a heartbeat message broadcast may be initiated every 5 minutes and last for 30 seconds. However, extending the scanning sleep period reduces the probability of a node receiving heartbeat messages from other nodes and also prolongs the time interval during which the node broadcasting the heartbeat message is perceived as online. For example, in the scenario shown in Figure 1B , assume that smart light 102 broadcasts a heartbeat message from t1 to (t1 + 0.5) minutes, then resumes broadcasting heartbeat messages after a 5-minute interval (t1 + 5.5) minutes. During this 5-minute interval, if a user searches for connected devices using mobile phone 101, mobile phone 101 will not be able to quickly detect the presence of smart light 102. For example, referring to the control interface P1 of mobile phone 101 shown in Figure 1E , the hyperterminal box P11 does not quickly display surrounding devices, and it typically takes several minutes to determine which other devices are present.

[0064] Therefore, in order to reduce the power consumption of the device that broadcasts the heartbeat message, the present application proposes a communication method for adjusting the message scanning window. The method adjusts the starting time of the scanning window of each node in the Bluetooth mesh network to the same moment. For example, the master device in the Bluetooth mesh network broadcasts a negotiation message to other devices in the Bluetooth mesh network. The negotiation message carries a scan adjustment message to notify other devices to enter the scanning window at the same time. In this way, there will be overlapping time periods for the scanning windows of each node (hereinafter referred to as "overlapping time periods"), which increases the probability of each node being scanned at the same time, while reducing the duration of each node broadcasting a heartbeat message each time, and there is no need to increase the scan sleep period. Therefore, the present application can reduce the power consumption of the device that broadcasts the message while increasing the probability of the heartbeat message of each node being scanned.

[0065] It is understood that in some embodiments, multiple electronic devices can be logged into the same user account, or multiple electronic devices can be logged into different user accounts but each user account can have a trusted relationship. Each device can detect the device that needs to synchronize the scanning window based on the account relationship and then automatically run the synchronized scanning window mode.

[0066] In other embodiments, multiple electronic devices may belong to the same home network or the same public network. Each device may detect a device that requires a synchronous scanning window based on the network relationship, and then automatically run the synchronous scanning window mode.

[0067] Specifically, multiple electronic devices can obtain their own clock drift in advance, thereby obtaining their own clock drift accuracy, wherein the clock drift is the change in the clock of each device and the standard clock in the cloud at different time points within a period of time, and the clock drift accuracy is the change per unit time between the clock of each device and the standard clock in the cloud. The device that meets the first accuracy condition is used as the master device, for example, the device with the highest clock drift accuracy is used as the master device. It is understandable that the device with the second highest and the second highest clock drift accuracy can also be used as the master device, and there is no restriction here. The master device can broadcast a scan adjustment message to other devices, notifying each node to configure the start time of the scan window at a unified time point.

[0068] For example, in the scenario shown in FIG1B , each electronic device in the Bluetooth mesh network can have the same user account, and each device has the same scanning period and scanning window. When mobile phone 101 and smart light 102 are both online, each device detects that the other device is a device with the same user account. At this point, mobile phone 101 and smart light 102 automatically run synchronized scanning windows. After a period of time, when printer 103 comes online, printer 103, mobile phone 101, and smart light 102 can each detect that they are all the same user account. At this point, printer 103 configures its own scanning window to start at the same time as the scanning windows of mobile phone 101 and smart light 102.

[0069] For another example, in the scenario shown in Figure 1B above, each electronic device in the Bluetooth mesh network represents a different user account but has a trusted relationship, and each electronic device has the same scanning cycle and scanning window. When mobile phone 101 and smart light 102 are both online, each device detects that the other device is a device with a trusted user account. At this point, mobile phone 101 and smart light 102 automatically run synchronized scanning windows. Some time later, when printer 103 comes online, printer 103, mobile phone 101, and smart light 102 can each detect that they are all user accounts with a trusted relationship. At this point, printer 103 configures its own scanning window to start at the same time as the scanning windows of mobile phone 101 and smart light 102.

[0070] It is understandable that in some scenarios, after turning on Bluetooth, an electronic device 0 can connect to surrounding devices with the same user account or different user accounts with which a credit relationship can exist; it can also reconnect to surrounding devices with the same user account or different user accounts with which a credit relationship can exist when the screen is turned on again after being off for a long time; it can also automatically start Bluetooth on a scheduled basis, such as in the morning or evening, to connect to surrounding devices with the same user account or different user accounts with which a credit relationship can exist. For example, after turning on Bluetooth, the electronic device 0 will scan the surrounding devices to check the devices that exist around it, and then broadcast a message to the existing devices, which carries the user account of its own device. If the surrounding devices find that their user account is the same as their own, they can feedback their own user account to the electronic device 0, thereby establishing a connection.

[0071] FIG2A shows the timing axes corresponding to the mobile phone 101 , the smart light 102 , and the printer 103 , respectively, according to some embodiments of the present application.

[0072] As shown in Figure 2A, taking the scanning interval T1 as 600ms, the scanning window t1 as 60ms, and the scanning dormancy period as 540ms as an example, based on the communication solution provided by this application, the starting time of a scanning window of each device is configured at the same time. For example, the starting time of the scanning window of a certain scanning cycle is 0ms, then the scanning windows of all devices are 0-60ms, 600ms-660ms, 1200ms-1260ms..... The scanning windows of each device overlap, and the overlapping time period corresponds to the scanning window of each device. In addition, when all electronic devices such as mobile phone 101, smart light 102, printer 103 broadcast a heartbeat message to other electronic devices respectively, if the moment is the overlapping time period, each device can scan the heartbeat message and successfully receive the heartbeat message, that is, the success rate of a single heartbeat message being received by all devices is improved.

[0073] It is understandable that since the success rate of a single heartbeat message being received by all devices is improved, each device can shorten the duration of the continuous broadcast of the heartbeat message in each broadcast cycle, that is, shorten the time of the broadcast window in the broadcast cycle, for example, the broadcast window is reduced from 30s to 10s, thereby reducing power consumption and improving efficiency. In addition, since the power consumption of the broadcast heartbeat message required in a single broadcast cycle is reduced, the duration of the broadcast cycle can be shortened and the number of broadcast cycles can be increased. For example, in the original 15 minutes, the 30s broadcast every 5 minutes can be changed to 10s broadcast every 3 minutes, and the number of broadcast cycles is increased from 3 to 5. At this time, the power consumption is similar to the original, but the frequency of proving its existence to other devices is increased, which makes it easier for each device to quickly perceive whether the surrounding devices exist. This improves the reliability of the entire Bluetooth mesh network. The embodiment of the present application can also reduce the total number of broadcast messages within the broadcast time period, thereby reducing power consumption.

[0074] In some embodiments, when each node broadcasts a heartbeat message, each node can be configured with the same broadcast period, and the start time of each broadcast window needs to be configured with a discrete time so that it can be staggered in a very short period of time to avoid air interface conflicts. The discrete time is the time difference between the start time of the first broadcast window and the start time of the broadcast window of the node preceding it in the broadcast order. For example, the discrete time corresponding to each node is 5ms, indicating that the interval between the start times of the two initial broadcast windows (i.e., the first broadcast window) of every two nodes adjacent in the broadcast order is 5ms.

[0075] For example, with 0ms as the time origin, the broadcast window of each node is 2s, and the broadcast period is 50s, then the broadcast dormancy period is 48s. The start time of each node's broadcast window is staggered by the same discrete time of 5ms, and each node broadcasts a heartbeat message every 20ms within 2s, so that the broadcast heartbeat messages are staggered as much as possible to reduce air interface conflicts. Referring to the time axis shown in Figure 2B, with 0 as the time origin, the mobile phone 101 broadcasts messages w11, w12, w13, w14... at 20ms, 40ms, 60ms, 80ms..., the smart desk lamp 102 broadcasts messages w21, w22, w23, w24... at 25ms, 45ms, 65ms, 85ms..., and the printer 103 broadcasts messages w31, w32, w33, w34... at 30ms, 50ms, 70ms, 90ms..., respectively, for 2s. Other electronic devices are not shown.

[0076] In some embodiments, when each node is broadcasting a message, it is necessary to control the Bluetooth chip to broadcast the message through the central processing unit (CPU). When the node is dormant, it is necessary to periodically wake up the CPU to broadcast heartbeat messages, thereby reducing the time the CPU needs to be awakened and running and reducing CPU power consumption.

[0077] In other embodiments, some nodes include a sensor hub. Since the sensor hub is a hardware module with low power consumption and can always work, each node can control the Bluetooth chip to periodically broadcast heartbeat messages and dynamically adjust the scan window alignment through the sensor hub, that is, the CPU does not need to be awakened to control the Bluetooth chip to broadcast messages, and the CPU can be put into sleep mode, thereby further reducing power consumption. Since the sensor hub has low power consumption, the overhead of controlling the Bluetooth chip to periodically broadcast messages is small at this time, which can further reduce the broadcast cycle and the duration of the broadcast message in each broadcast cycle. For example, with reference to Figure 2A, when it is determined that the overlap period is 600ms and the overlap duration is 60ms, the overlap period is the time difference between the starting points of two adjacent overlap time periods. The broadcast period can be determined to be 1s, and the duration of the broadcast message can be determined to be 100ms, thereby further improving the broadcast efficiency on the basis of saving power consumption.

[0078] It is understandable that in actual use, since the node receiving the message can quickly receive the message, it can provide the user with some interfaces that enable the user to quickly perceive the status of the controlled device, thereby improving the user experience. For example, based on the scenario shown in FIG1B above, after the mobile phone 101 adopts the communication method of adjusting the message scanning window of the embodiment of the present application, it can quickly perceive whether the surrounding electronic devices are still connected. Referring to the control center interface P2 of the mobile phone 101 shown in FIG2C, when the user opens the control center interface P2 of the mobile phone 101, at this time, since the broadcast success rate of the message is improved with the surrounding devices of the mobile phone 101, the broadcast cycle becomes shorter, so the mobile phone 101 can quickly receive the heartbeat message of the surrounding devices, and then can quickly display the devices with long connections in the super terminal search box k21, and can further render the super terminal interface P3 as shown in FIG2D.

[0079] It is understood that when each node continuously broadcasts heartbeat messages within the determined broadcast time, multiple heartbeat messages can be broadcast at each time point, thereby improving the success rate of each node receiving the heartbeat message. For example, within 10 seconds, the broadcast of one heartbeat message every 20 milliseconds (ms) can be changed to broadcasting three heartbeat messages simultaneously, thereby improving the success rate of each device receiving the heartbeat message being able to receive the heartbeat message.

[0080] It's understandable that after a period of time, when each node in a Bluetooth mesh network broadcasts and scans for heartbeat messages, clock drift can cause misalignment between the scan windows of each node. In this case, each node can dynamically adjust the start time of its own scan window and the start time of its broadcast window to ensure that the scan windows of each node still overlap. Specifically, the clock of the node that sends the message first can be used as the standard, i.e., this node serves as the standard node, and the start time of the scan windows of other nodes can be aligned with the start time of the scan window of this standard node.

[0081] For example, Figure 2E shows the timing axes that produce clock drift over time for mobile phone 101, smart light bulb 102, and printer 103, respectively. Mobile phone 101, smart light bulb 102, and printer 103 each have the same scan window size, t1, and scan period, T1. The figure shows that the start times of their scan windows are misaligned, with the start time of smart light bulb 102 being significantly offset. Using mobile phone 101 as the reference node, smart light bulb 102 and printer 103 can align with the scan window of mobile phone 101, adjusting their own start times to be delayed by t1 from their original start times. For example, as shown in Figure 2F, the start time of the next scan window for smart light bulb 102 coincides with the start time of mobile phone 101.

[0082] It is understandable that the electronic devices in the above-mentioned Bluetooth mesh network, in addition to the mobile phones, smart lights, printers, Bluetooth headsets, Bluetooth mice and computers mentioned above, may also include but are not limited to vehicle-mounted equipment, augmented reality (AR) / virtual reality (VR) devices, ultra-mobile personal computers (UMPCs), personal digital assistants (PDAs), smart speakers, air detectors, thermometers and hygrometers, alarms, smart door locks, cameras and other electronic devices that support Bluetooth low-power transmission capabilities, without limitation here.

[0083] Figure 3A illustrates a process diagram of a communication method for adjusting a message scanning window, according to some embodiments of the present application. When each node in this process diagram executes specific steps, the execution entity may be an electronic device, a processor of the electronic device, or a sensor hub. However, this application does not limit the execution entity of this method flow.

[0084] S101: Each node configures the start time of the scanning window to be the same.

[0085] In some embodiments, each node evaluates its own clock drift accuracy and, based on this accuracy, negotiates a master node (i.e., the master device mentioned above) and a standard node. Each node then configures the start time of its scan window to coincide with the scan adjustment message broadcast by the master node. It will be appreciated that the master node and the standard node can be the same node or different nodes, and the master node can be the node that appears first in the broadcast order.

[0086] In some implementations, each node may experience clock drift after a period of operation due to its own characteristics. In this case, each node can use a clock synchronization protocol to synchronize its clock with a standard clock in the cloud, calculate the clock drift, and obtain its own clock drift accuracy. For example, during the course of one hour of operation, due to its own characteristics, the clock of mobile phone 101 will always be less than the standard clock. The clock drift at each time point during the one-hour period can be calculated to assess the clock drift accuracy of mobile phone 101. Each node negotiates the broadcast order of each node based on the order of clock drift accuracy, and selects the node with the highest clock drift accuracy as the standard node and the master node, i.e., the master node and the standard node are the same node. Based on the scan adjustment message broadcast by the master node, each node configures the start time of the scan window to be the same time. Specifically, during the negotiation process, each node can include its own clock drift accuracy information in the broadcast message, and negotiate to select the node with the highest clock drift accuracy as the first node and the standard node, i.e., the master device mentioned above, which facilitates subsequent dynamic adjustment of each node. It is understandable that in other implementations, the node with the second highest or second-highest clock drift accuracy may be used as the standard node, and this is not limited here.

[0087] In some implementations, each node can configure the start time of its scan window for receiving heartbeat messages to coincide with the same time by broadcasting a scan adjustment message that includes an alignment time. For example, the alignment time is 10:00:00, and each node can configure the start time of a scan window for receiving messages to coincide with the alignment time.

[0088] In some implementations, due to clock characteristics, each node may have inconsistent system times corresponding to the same standard clock time. In this case, each device can configure its own system time to the time corresponding to the alignment time point based on the clock deviation between its own system clock and the master node's system clock, as well as the received alignment time point. This allows each node to configure the start time of the scan window to be the same. In this case, during subsequent operation, the scan windows of each node may overlap.

[0089] For example, assume that the clock drift accuracy of each device is ranked in order: mobile phone 101 has the highest clock drift accuracy, followed by smart light bulb 102, printer 103, etc. Mobile phone 101, which has the highest clock drift accuracy, is designated as the master node and the standard node. In this case, mobile phone 101, acting as the master device, can interact with other devices through negotiation messages. The negotiation message broadcast by mobile phone 101 carries the timestamp of the broadcast message. After multiple rounds of communication, each device can determine the fixed clock deviation between its own system clock and the system time of mobile phone 101. For example, each time smart light bulb 102 receives a message from mobile phone 101, its own system time will differ by 1ms from the timestamp carried in the negotiation message. At this point, each node can calculate the system time of mobile phone 101 at 10:00:00, assuming it is 10:00:01, and then configure the system time of the corresponding scanning window start time to 10:00:01, so that each node will configure the start time of the scanning window for receiving heartbeat messages to be the same.

[0090] It can be understood that each electronic device has a corresponding duty cycle in the current scenario, that is, the currently determined scanning period and scanning window. Among them, the duty cycle is the ratio of the total duration of the scanning window within a period of time. For example, taking 1 hour as an example, the duty cycle of a node is 10%, which means that 6 minutes of 1 hour are used for message scanning, and the total duration of the scanning window is 6 minutes. Assuming that the scanning interval is 600ms, the scanning window is 60ms at this time, and the number of scanning intervals is 600; assuming that the scanning interval is 300ms, the scanning window is 30ms at this time, and the number of scanning intervals is 1200. At this time, after the start time of a scanning window for receiving heartbeat messages is configured at the same time, the scanning windows of each node will have overlapping time periods. Refer to the description corresponding to the scanning interval of 600ms and the scanning window of 60ms shown in Figure 2A above, which will not be repeated here.

[0091] In some embodiments, the duty cycle of each electronic device, and the corresponding scanning window and scanning period, can be manually set parameter values. For example, the duty cycle can be 20%, 12%, 5%, etc., or any other value, and the scanning window and scanning period can also be set to any value accordingly, as long as the duty cycle results are met. This is not a requirement here.

[0092] For another example, as shown in FIG3B , taking the scanning interval T1 of the mobile phone 101 and the printer 103 as 600ms and the scanning window t1 as 60ms, and the scanning interval T2 of the smart lamp 102 as 300ms and the scanning window t2 as 30ms, based on the communication scheme provided in this application, the start time of a scanning window of each device is configured at the same moment. For example, the start time of the scanning window of a certain scanning cycle is 0ms, then the scanning windows of all devices are 0-30ms, 600ms-630ms, 1200ms-1230ms.....

[0093] S102: Each node broadcasts a plurality of heartbeat messages according to its own broadcast cycle, and other nodes can scan a certain heartbeat message at the same time within the overlapping time period of the scanning window.

[0094] In some embodiments, each node determines the start time of its respective initial broadcast window based on a broadcast order; based on the determined start time of its respective initial broadcast window, multiple heartbeat messages are broadcast to other nodes according to a negotiated broadcast period. It is understood that since the scanning windows of each node are configured at the same time, there may be overlapping time periods in the scanning windows of each node. If each node sends a heartbeat message during the overlapping time period, other nodes can also scan for the heartbeat message.

[0095] In some implementations, each node determines the start time of its own initial broadcast window based on a determined broadcast order and a configured discrete time. The discrete time can be a default parameter pre-configured by the user. Then, each node broadcasts a heartbeat message to other nodes at the start time of the initial broadcast window according to the same broadcast cycle, and the size of the broadcast window of each node in each broadcast cycle is equal. For a specific example, refer to the description shown in FIG2B above, which will not be repeated here. It can be understood that when the broadcast cycles of each node are the same, it can avoid the situation where node A can determine the existence of node B, but node B cannot determine the existence of node A during the broadcast cycle.

[0096] For example, assume that mobile phone 101 is ranked 1, smart light 102 is ranked 2, printer 103 is ranked 3, and so on, with a discrete time of 5 ms. In this case, the start times of the initial broadcast windows corresponding to the heartbeat messages broadcast by each electronic device are in the same order as the broadcast order. Furthermore, each node can broadcast heartbeat messages in sequence based on the heartbeat message broadcast by the node ranked 1, with the start times of the broadcast windows staggered by 5 ms. In this case, the start time of mobile phone 101's initial broadcast window is 10:0:0:20 ms, the start time of smart light 102's initial broadcast window is 10:0:0:25 ms, and so on. The start times of the initial broadcast windows of other electronic devices are not detailed here.

[0097] In addition, in other embodiments, the broadcast window of each node, that is, the duration of the broadcast message, can be different, and during the actual broadcast process, it can also be adaptively adjusted during the broadcast process. For example, when the heartbeat message received from other nodes carries information that has been successfully received, the number of broadcast messages can also be reduced.

[0098] S103, each node dynamically adjusts the start time of the scanning window.

[0099] In some embodiments, after each node broadcasts and scans for a period of time after receiving a heartbeat message, clock drift may cause the scanning windows of each node to become misaligned. In this case, each node can dynamically adjust the start time of its own scanning window and the start time of its broadcast window so that the scanning windows of each node can still overlap. The specific adjustment method can be seen in the dynamic adjustment flow diagram shown in Figure 3C.

[0100] The schematic diagram of the process of dynamic adjustment of each node shown in FIG3C is as follows:

[0101] S1031 : Each node determines whether it is necessary to readjust the start time of the scanning window based on the received heartbeat message corresponding to the start time of a certain broadcast window.

[0102] If the judgment result is yes, then the process proceeds to S1032 to adjust the start time of the next scanning window; if the judgment result is no, then the process proceeds to S1034 without making any adjustment.

[0103] It is understandable that each node determines its own corresponding clock drift threshold in advance based on the clock drift accuracy and the negotiated broadcast period, which is used to determine whether the start time of the scanning window needs to be adjusted. It is understandable that the size of the broadcast window and the clock drift accuracy are important parameters that affect the clock drift threshold. The size of the broadcast window will affect the tolerance for clock drift. When the broadcast window is large, the deviation of the scanning windows of each node can be tolerated to be large. At this time, the clock drift threshold can be set larger based on the clock drift accuracy evaluated by itself. If the broadcast window is small, the clock drift threshold can be set smaller based on the clock drift accuracy evaluated by itself. For example, mobile phone 101 determines the clock drift threshold to be 10ms, and other electronic devices also determine the corresponding clock drift thresholds, which will not be elaborated here.

[0104] In some implementations, each node can determine whether it needs to adjust the start time of the scanning window by determining whether the received heartbeat message corresponding to the start time of a broadcast window is from a standard node, and whether the first time interval obtained based on the heartbeat message is greater than or equal to its own corresponding clock drift threshold, where the first time interval is the time interval between the actual time of receiving the heartbeat message (i.e., the first receiving time) and the estimated time of receiving the heartbeat message (i.e., the second receiving time).

[0105] If the received heartbeat message is from a standard node and the current time interval is greater than or equal to the corresponding clock drift threshold, the process proceeds to S1032 to adjust the start time of the next scanning window. Otherwise, the process proceeds to S1034 without making any adjustment.

[0106] It is understandable that the heartbeat message will carry the sequence number of the heartbeat message broadcast by the agreed broadcasting party. For example, the heartbeat message carries information that it is the first heartbeat message of the first broadcast cycle of node A. In addition, each node can know the broadcast cycle of other nodes during prior negotiation. At this time, each node can estimate the time to receive the first heartbeat message of the next broadcast cycle of the node based on the time of the first heartbeat message broadcast by other nodes in a certain broadcast cycle and the broadcast cycle of the node.

[0107] Therefore, when a node receives a first heartbeat message of a broadcast period sent by a standard node and obtains a first time interval that differs significantly from the first time interval received by the standard node, it determines to proceed to S1032 and adjust the start time of its next scanning window. Otherwise, it proceeds to S1034.

[0108] For example, when smart light 102 receives a heartbeat message from mobile phone 101, the system time is 12:00:00:30 milliseconds. Smart light 102 determines that the other party is a standard node. It estimates that the expected reception time is 12:00:00:41 milliseconds, and thus calculates the first time interval to be 11 milliseconds. Since smart light 102's clock drift threshold is 10 milliseconds, it determines that either it or the other party has experienced significant drift. It then adjusts its scanning window to align with the scanning window of the standard node.

[0109] It can be understood that comparing the first time interval with its own clock drift threshold and making adjustments when the clock drift threshold is reached is beneficial to maintaining system stability.

[0110] S1032: Adjust the start time of the next scanning window and the start time of the next broadcast window.

[0111] In some embodiments, each node can extend or shorten the start time of the next scanning window and the start time of the next broadcast window based on the first time interval calculated by each node. For example, if smart light 102 determines that the first reception time is 11 ms earlier than the second reception time, smart light 102 will advance the start time of the next broadcast window by 11 ms. For another example, if smart light 102 determines that the first reception time is 11 ms later than the second reception time, smart light 102 will delay the start time of the next broadcast window by 11 ms.

[0112] S1033 , after each node periodically compensates its own clock based on the standard node, it re-adjusts the start time of the next broadcast window and the start time of the scanning window according to the clock compensation adjusted by the standard node.

[0113] In some embodiments, a standard node periodically adjusts its own time based on its own clock drift threshold, such as shortening or extending the start time of its own scanning window and broadcast window by the clock drift threshold, and informs other nodes that the same adjustments need to be made, such as informing other nodes to shorten or extend the start time of their own scanning window and broadcast window by the clock drift threshold.

[0114] For example, mobile phone 101 is a standard node. After half a day, it adjusts its scanning window and broadcast window back by 10ms. At this time, it will notify other nodes, and other nodes will also adjust them back by 10ms.

[0115] S1034: No adjustment is performed on each node.

[0116] It is understandable that if the current node finds that the received heartbeat message is not broadcast by a standard node, no adjustment is required. If it is broadcast by a standard node but the first time interval does not reach the clock drift threshold, no adjustment is required.

[0117] It is understood that the execution order of steps S1031 to S1034 is merely an example. In other embodiments, other execution orders may be used, and some steps may be split or combined, without limitation. It is understood that the nodes in steps S1031 to S1034 are nodes other than standard nodes that require dynamic adjustment.

[0118] In other embodiments, the node that is first in the broadcast order may periodically send a scan adjustment message with an adjustment period that is greater than a scan interval of all nodes.

[0119] It is understandable that the execution order of the above steps S101 to S103 is only an example. In other embodiments, other execution orders may be adopted, and some steps may be split or combined, which is not limited here.

[0120] Figure 4A illustrates an interactive diagram of a communication method based on adjusting a message scanning window according to some embodiments of the present application. It is understood that Figure 4A specifically illustrates the processing of each node within the time period corresponding to the first initial scanning window, where each electronic device needs to broadcast and receive heartbeat messages.

[0121] For ease of explanation, the following uses three specific nodes, corresponding to mobile phone 101, smart light 102, and printer 103, as examples. In the embodiment of the present application, the specific steps in the interactive process diagram shown in FIG4 may be performed by an electronic device. In other embodiments, the execution entity of each step of the interactive process shown in FIG4 may also be a processor or sensor hub of the corresponding electronic device, but this application does not limit the execution entity of the method flow.

[0122] S201 , the mobile phone 101 , the smart light 102 , and the printer 103 configure scanning windows at the same time, and respectively configure the start time of the initial broadcast window.

[0123] It is understandable that the specific process of mobile phone 101, smart light 102, and printer 103 configuring the scanning window at the same time and respectively configuring the start time of the initial broadcast window can be referred to the detailed description of Figures S101 and S102, which will not be repeated here.

[0124] It is understood that there is a broadcast sequence between the mobile phone 101, the smart light 102, and the printer 103. For example, the mobile phone 101, the smart light 102, and the printer 103 correspond to broadcast sequence 1, broadcast sequence 2, and broadcast sequence 3, respectively. The following steps S202A-S204B illustrate the process by which the mobile phone 101, the smart light 102, and the printer 103 broadcast heartbeat messages to all other devices according to the broadcast sequence and the start time of their initial broadcast windows.

[0125] S202A, the mobile phone 101 broadcasts a heartbeat message L11 to the smart light 102 at the start time of the initial broadcast window.

[0126] S202B: The mobile phone 101 broadcasts a heartbeat message L11 to the printer 103 at the start time of the initial broadcast window.

[0127] It is understood that S202A and S202B are the same steps for mobile phone 101. Mobile phone 101 uses a flooding broadcast method. At the start time of the initial broadcast window, mobile phone 101 broadcasts the heartbeat message L11 to both smart light 102 and printer 103. A detailed description of broadcasting the heartbeat message can be found in step S102 of FIG. 3A above and is not repeated here.

[0128] S203A, the smart light 102 broadcasts a heartbeat message L21 to the mobile phone 101 at the start time of the initial broadcast window.

[0129] S203B: The smart light 102 broadcasts a heartbeat message L21 to the printer 103 at the start time of the initial broadcast window.

[0130] It can be understood that S203A and S203B are the same steps for the smart light 102, which are essentially the same as the broadcasting of the heartbeat message L21 by the mobile phone 101, and are not described in detail here.

[0131] S204A: The printer 103 broadcasts a heartbeat message L31 to the mobile phone 101 at the start time of the initial broadcast window.

[0132] S204B: The printer 103 broadcasts a heartbeat message L32 to the smart light 102 at the start time of the initial broadcast window.

[0133] It can be understood that S203A and S203B are the same steps for the smart light 102, which are essentially the same as the broadcasting of the heartbeat message L21 by the mobile phone 101, and are not described in detail here.

[0134] S202 , the mobile phone 101 , the smart light 102 , and the printer 103 receive heartbeat messages within a time period corresponding to a corresponding scanning window.

[0135] It can be understood that when performing steps S202A and S202B, if the mobile phone 101 broadcasts the message during the time period corresponding to the scanning window, the smart light 102 and the printer 103 can successfully receive the heartbeat message L11. Similarly, the same is true for the heartbeat message L21 broadcast by the smart light 102 and the heartbeat message L31 broadcast by the printer 103.

[0136] S203, the mobile phone 101, the smart light 102, and the printer 103 continue to broadcast the heartbeat message.

[0137] It is understood that after the mobile phone 101, the smart light 102, and the printer 103 broadcast the first heartbeat message, they continue to broadcast heartbeat messages according to the broadcasting rules. For details, please refer to step S102 in Figure 3A above, and will not be described in detail here. It is understood that the execution order of the above steps S201 to S203 is only an example. In other embodiments, other execution orders may be adopted, and some steps may be split or combined, which is not limited here.

[0138] FIG4B shows an interactive schematic diagram of another communication method based on adjusting the message scanning window according to some embodiments of the present application. FIG4A also specifically illustrates the process of adjusting to compensate for clock drift after a node receives the first heartbeat message broadcast by another node in a certain broadcast cycle. For the sake of convenience, the example of the smart light 102 receiving the first protection message of the mobile phone 101 in the Nth broadcast cycle, with the mobile phone 101 as a standard node, is used for explanation. In the interactive process diagram, when each electronic device executes specific steps, the execution subject can be the electronic device, or the processor or sensor hub of the electronic device. However, the present application does not limit the execution subject of the method flow.

[0139] S301, the mobile phone 101 broadcasts the first heartbeat message LN of the Nth broadcast cycle of the smart light 102.

[0140] S302, the smart light 102 receives the heartbeat message LN.

[0141] S303: The smart light 102 calculates a first time interval based on the broadcast time in the heartbeat message LN and its own receiving time when scanning messages.

[0142] S304: After determining that the first time interval is greater than the clock drift threshold, the smart light 102 adjusts the start time of the next scanning window and the start time of the next broadcast window.

[0143] The detailed description of the above steps S303 and S304 can refer to the above steps S1031 and S1032, which will not be repeated here.

[0144] It is understandable that the execution order of the above steps S301 to S304 is only an example. In other embodiments, other execution orders may be adopted, and some steps may be split or combined, which is not limited here.

[0145] In some embodiments, each node needs to control the Bluetooth chip to broadcast messages through the CPU. After each node goes into sleep mode, it needs to periodically wake up the CPU to broadcast messages. That is, heartbeat message operations can only be performed after the CPU is awakened. It is understandable that each node can align the wake-up window to improve the service experience. For example, Figure 5A shows a schematic diagram of the alignment of the wake-up windows of the mobile phone 101 and the smart light 102 when the wake-up window and wake-up period are equal. Among them, the vertical axis represents power consumption and the horizontal axis represents time. The "start wake-up" on the vertical axis indicates that the CPU starts to wake up, at which time the power consumption is the highest. "Wake up and run / background" indicates the power consumption when the CPU is awakened and running. The wake-up window on the horizontal axis corresponds to the "start wake-up" and "wake up and run / background" parts of the vertical axis. "Sleep" indicates that the CPU is in sleep mode. The wake-up period of "3 minutes" means that the CPU is awakened every 3 minutes, and the wake-up duration is the time width of the wake-up window.

[0146] Figure 5B shows a schematic diagram of the operation of a CPU-based Bluetooth chip in an initial scanning cycle according to an embodiment of the present application. Figure 5B uses the interaction between two electronic devices as an example for a simple explanation. Assume that electronic device A1, such as mobile phone 101, includes processor 1 and Bluetooth chip U11, and electronic device A2, such as smart light 102, includes processor 2 and Bluetooth chip U12.

[0147] Step 0A: Processor 1 sends a broadcast start instruction and an instruction to obtain a precise scan window to Bluetooth chip U11. Specifically, processor 1 sends the broadcast start instruction to Bluetooth chip U11, instructing Bluetooth chip U11 to begin sending broadcast signals. After sending the instruction to obtain a precise scan window to Bluetooth chip U11, processor 1 can obtain scan window information from Bluetooth chip U11 and use this information to optimize Bluetooth communication performance.

[0148] Step 0B: Processor 2 sends a broadcast start instruction and an instruction to obtain a precise scanning window to the Bluetooth chip U12. It can be understood that this step is substantially the same as Step 0A and will not be described in detail here.

[0149] It is understandable that Step0A and Step0B can be executed synchronously or asynchronously, which will not be described in detail here.

[0150] After Step 0A or Step 0B, processor 1 and processor 2 may continue to execute the following steps Step 1 to Step 3.

[0151] Step 1: Processor 1 and processor 2 respectively control Bluetooth chip U11 and Bluetooth chip U12 to align the scan windows. Specifically, processor 1 and processor 2 respectively control Bluetooth chip U11 and Bluetooth chip U12 to configure the start time of the initial scan window to be the same. For a detailed description, refer to S101 and S102 in Figure 3A above and will not be repeated here.

[0152] Step 2: Processor 1 and processor 2 respectively control Bluetooth chip U11 and Bluetooth chip U12 to configure the broadcast window. Specifically, processor 1 and processor 2 respectively control Bluetooth chip U11 and Bluetooth chip U12 to configure the start time of the broadcast window based on the broadcast order and discrete time, and broadcast the heartbeat message. It can be understood that when configuring the start time of the broadcast window, it is necessary to write code in the software to configure the broadcast window; it is also necessary to enable the Bluetooth chip to implement the configuration of the broadcast window. For a specific description, refer to S102 in Figure 3A above, which will not be repeated here.

[0153] Step 3: Processor 1 and processor 2 respectively control Bluetooth chip U11 and Bluetooth chip U12 to receive heartbeat messages. Specifically, processor 1 and processor 2 respectively control Bluetooth chip U11 and Bluetooth chip U12 to receive heartbeat messages in the time period corresponding to the scanning window.

[0154] Figure 6 shows a schematic diagram of an operation of a sensor hub controlling a Bluetooth chip during an initial scan cycle, according to an embodiment of the present application. Figure 6 uses the interaction between two electronic devices as an example for a simple explanation. Assume that electronic device B1 includes sensor hub 1 and Bluetooth chip U21, and electronic device B2 includes sensor hub 2 and Bluetooth chip U22.

[0155] Step 0A': Sensor hub 1 sends a broadcast start instruction and an instruction to obtain a precise scanning window to the Bluetooth chip U21.

[0156] Step 0B': Sensor hub 2 sends a broadcast start instruction and an instruction to obtain a precise scanning window to the Bluetooth chip U22.

[0157] Step 1': Sensor hub 1 and sensor hub 2 control Bluetooth chip U21 and Bluetooth chip U22 respectively to align the scanning windows.

[0158] Step 2': Sensor hub 1 and sensor hub 2 control Bluetooth chip U21 and Bluetooth chip U22 respectively to configure the broadcast window.

[0159] Step 3': Sensor hub 1 and sensor hub 2 respectively control Bluetooth chip U21 and Bluetooth chip U22 to receive heartbeat messages.

[0160] It can be understood that the above process is substantially the same as the process shown in FIG5 , and will not be described in detail here.

[0161] FIG7 shows a schematic diagram of the structure of an electronic device 700 according to an embodiment of the present application. It is understandable that the electronic device 700 can be any electronic device in the Bluetooth mesh network described above and will not be described in detail here.

[0162] As shown in FIG. 7 , the electronic device 700 may include one or more processors 701 , one or more memories 702 , a transceiver 703 , an antenna 704 , a Bluetooth chip 705 , and the like.

[0163] Specifically, the processor 701 can also be referred to as a processing unit, which can implement certain control functions. The processor 701 can be a general-purpose processor or a dedicated processor, etc. For example, it can be a baseband processor or a central processing unit. The baseband processor can be used to process communication protocols and communication data, and the central processing unit can be used to control communication devices, such as base stations, baseband chips, terminals, terminal chips, DUs or CUs, Bluetooth chips 705, etc., execute software programs, and process data of software programs. In some embodiments of the present application, the processor 701 can control the Bluetooth chip 705 to execute the communication method for adjusting the message scanning window of the embodiment of the present application, for example, executing the communication method for adjusting the message scanning window as described in Figures 3A, 4A and 4B, and 5B.

[0164] In an optional design, the processor 701 may also store instructions and / or data, which can be executed by the processor so that the electronic device 700 executes the method described in the above method embodiment, for example, executing the communication method for adjusting the message scanning window as described in Figures 3A, 4A, 4B and 5B.

[0165] Processor 701 may also include a transceiver unit for implementing receiving and transmitting functions. For example, the transceiver unit may be a transceiver circuit, an interface, or an interface circuit. The transceiver circuit, interface, or interface circuit for implementing the receiving and transmitting functions may be separate or integrated. The transceiver circuit, interface, or interface circuit may be used for reading and writing code / data, or may be used for transmitting or delivering signals.

[0166] The memory 702 may store instructions / data, and the instructions may be executed on the processor to enable the electronic device 700 to perform the method described in the above method embodiment. Optionally, the memory may also store data.

[0167] The transceiver 703 may be referred to as a transceiver unit, a transceiver, a transceiver circuit, a transceiver device, an interface, an interface circuit or a transceiver module, etc., and is used to implement transceiver functions.

[0168] FIG8 shows a schematic diagram of the structure of another electronic device 800 according to an embodiment of the present application. It is understandable that the electronic device 700 can be any electronic device in the Bluetooth mesh network described above and will not be described in detail here.

[0169] As shown in FIG8 , the electronic device 800 may include one or more processors 801 , one or more memories 802 , a transceiver 803 , an antenna 804 , a Bluetooth chip 805 , a sensor hub 806 , and the like.

[0170] Specifically, processor 801, also referred to as a processing unit, can implement certain control functions. Processor 801 can be a general-purpose processor or a dedicated processor. For example, it can be a baseband processor or a central processing unit. A baseband processor can be used to process communication protocols and communication data, while a central processing unit can be used to control communication devices, such as base stations, baseband chips, terminals, and terminal chips, execute software programs, and process software program data.

[0171] In some embodiments of the present application, the processor 801 is further provided with a sensor hub 806. The sensor hub 806 is a device or system for managing and processing data from multiple sensors. It can integrate various types of sensors and centrally process and analyze their output data. The sensor hub 806 can also store instructions and / or data, which can be executed by the sensor hub 806 to enable the electronic device 800 to perform the method described in the above method embodiments, for example, to perform the communication method for adjusting the message scanning window as described in Figures 3A, 4A and 4B, and 6.

[0172] The memory 802 may store instructions / data, and the instructions may be executed on the processor to enable the electronic device 800 to perform the method described in the above method embodiment. Optionally, the memory may also store data.

[0173] The transceiver 803 may be referred to as a transceiver unit, a transceiver, a transceiver circuit, a transceiver device, an interface, an interface circuit or a transceiver module, etc., and is used to implement transceiver functions.

[0174] The various embodiments disclosed in this application can be implemented in hardware, software, firmware, or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0175] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or through other computer-readable media. Therefore, a machine-readable medium may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including but not limited to a floppy disk, an optical disk, an optical disk, a magneto-optical disk, a read-only memory (ROM), a random-access memory (RAM), an erasable programmable read-only memory, an electrically erasable programmable read-only memory, a magnetic card or an optical card, a flash memory, or a tangible machine-readable memory for transmitting information (e.g., a carrier wave, an infrared signal, a digital signal, etc.) using the Internet in an electrical, optical, acoustic, or other form of propagation signal. Therefore, a machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).

[0176] In the accompanying drawings, some structural or method features are shown in a particular arrangement and / or order. However, it should be understood that such a particular arrangement and / or order may not be required. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of a structural or method feature in a particular figure does not imply that such feature is required in all embodiments, and in some embodiments, such features may not be included or may be combined with other features.

[0177] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems raised by this application. In addition, in order to highlight the innovative part of this application, the above-mentioned device embodiments of this application do not introduce units / modules that are not closely related to solving the technical problems raised by this application. This does not mean that other units / modules do not exist in the above-mentioned device embodiments.

[0178] It should be noted that in the examples and description of this patent, relational terms such as first and second are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. Without further restriction, an element defined by the phrase "comprising a" does not exclude the presence of other identical elements in the process, method, article or device comprising the element. Although the present application has been illustrated and described with reference to certain preferred embodiments of the present application, it should be understood by those skilled in the art that various changes can be made thereto in form and detail without departing from the scope of the present application.

Claims

1. A communication method for adjusting a message scanning window, characterized in that, Including: A first Bluetooth device in a Bluetooth mesh network broadcasts a first scan adjustment message for instructing a second Bluetooth device and a third Bluetooth device in the Bluetooth mesh network to adjust a start time of a packet scan window to a first moment, where a start time of the packet scan window of the second Bluetooth device before adjustment is a second moment, a start time of the packet scan window of the third Bluetooth device before adjustment is a third moment, and the first moment, the second moment, and the third moment are all different time points; The first Bluetooth device adjusts the start time of the packet scan window to the first moment; The first Bluetooth device scans a plurality of heartbeat messages in at least one packet scan window after the start time adjustment, where the plurality of heartbeat messages include a first heartbeat message broadcast by the second Bluetooth device and a second heartbeat message broadcast by the third Bluetooth device.

2. The method according to claim 1, characterized in that, Also including: Based on clock drift accuracies with each Bluetooth device in the Bluetooth mesh network, it is determined that the first Bluetooth device broadcasts the first scan adjustment message, where the clock drift accuracy of the first Bluetooth device satisfies a first accuracy condition.

3. The method according to claim 1, characterized in that, Scan periods of the first Bluetooth device, the second Bluetooth device, and the third Bluetooth device are the same or in a multiple relationship, and the scan period includes the packet scan window and a scan sleep period.

4. The method according to claim 3, characterized in that The first Bluetooth device periodically sends scan adjustment messages at an adjustment period, where the adjustment period is greater than or equal to a maximum scan period, and the maximum scan period is the largest scan period among scan periods of the first Bluetooth device and Bluetooth devices other than itself in the Bluetooth mesh network.

5. A communication method for adjusting a message scanning window, characterized in that, Including: A second Bluetooth device in a Bluetooth mesh network receives a first scan adjustment message sent by a first Bluetooth device in the Bluetooth mesh network and adjusts a start time corresponding to a packet scan window to a first moment, where a start time of the packet scan window of the second Bluetooth device before adjustment is a second moment, and the first moment and the second moment are different time points; The second Bluetooth device scans a plurality of heartbeat messages in at least one packet scan window after the start time adjustment, where the plurality of heartbeat messages include a third heartbeat message broadcast by the first Bluetooth device and a second heartbeat message broadcast by the third Bluetooth device.

6. The method according to claim 5, characterized in that, The third heartbeat message is a heartbeat message broadcast by the first Bluetooth device in a P1 broadcast period, and the second Bluetooth device scans the third heartbeat message in an S2 scan period, where the scan period includes the packet scan window and a scan sleep period.

7. The method according to claim 6, characterized in that Also including: The second Bluetooth device scans a fourth heartbeat message broadcast by the first Bluetooth device in a P1 + n broadcast period at a fourth moment; The second Bluetooth device determines that a packet scan window in an S2 + j scan period of the second Bluetooth device satisfies a first window adjustment condition based on a first time interval, where the first time interval is: The time interval between the first reception time tm at which the second Bluetooth device scans the fourth heartbeat message and the second reception time tn estimated for receiving the fourth heartbeat message; Adjust the start time of the packet scan window for the (S2 + j + 1)-th scan period.

8. The method according to claim 7, wherein Further included, the first window adjustment condition includes: The first time interval is greater than the time threshold.

9. The method according to claim 8, wherein The adjustment of the start time of the packet scan window for the (S2 + j + 1)-th scan period includes: Corresponding to the case where the first reception time tm is earlier than the second reception time tn, advance the start time of the packet scan window for the (S2 + j + 1)-th scan period by the first time interval; Corresponding to the case where the first reception time tm is later than the second reception time tn, postpone the start time of the packet scan window for the (S2 + j + 1)-th scan period by the first time interval.

10. The method according to claim 7, wherein The fourth heartbeat message is the first heartbeat message broadcast in multiple heartbeat messages broadcast by the first Bluetooth device within the P1 + n broadcast period.

11. A Bluetooth device, characterized in that, Includes: A memory and a processor, wherein the memory is used to store program instructions, and the processor is used to read the program instructions, so that the Bluetooth device executes the communication method for adjusting the packet scan window according to any one of claims 1-10.

12. A computer program product, characterized in that, The computer program product includes instructions, which when executed cause the computer to execute the communication method for adjusting the packet scan window according to any one of claims 1 to 10.

13. A readable storage medium, characterized in that, Instructions are stored on the readable medium, and when the instructions are executed on an electronic device, the electronic device executes the communication method for adjusting the packet scan window according to any one of claims 1-10.

Citation Information

Patent Citations

  • Communication method and device for adjusting message scanning window

    CN120378845A

  • Communication method, device and equipment and storage medium

    CN112702718A

  • Communication system, communication method and equipment

    CN116471550A