Communication method and device for adjusting message scanning window

By adjusting the start time of the scanning window of each device in the Bluetooth mesh network, making it overlap at the same time, the problem of high power consumption in the Bluetooth mesh network is solved, and the low-power consumption and efficient communication of the device is achieved.

CN120378845APending Publication Date: 2025-07-25HUAWEI TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410107894.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-25
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

In Bluetooth mesh network, the power consumption of broadcasting message devices is relatively high. The prior art increases the reception success rate of the message receiving device through flooding, but leads to an increase in the power consumption of the device.

Method used

By adjusting the start time of the scanning window of each device in the Bluetooth mesh network, it coincides at the same time, reducing the duration of each broadcast heartbeat message, reducing the scanning sleep period, and increasing the probability that the device is scanned at the same time.

Benefits of technology

It reduces the power consumption of Bluetooth devices, improves the success rate of heartbeat messages being scanned, and enhances the reliability of Bluetooth mesh network and the rapid perception of the device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120378845A_ABST
    Figure CN120378845A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, and discloses a communication method and equipment for adjusting a message scanning window. According to the method, the starting time of a scanning window of each Bluetooth device in the Bluetooth mesh network is adjusted at the same moment. Therefore, the scanning windows of the nodes have coincident time periods, so that the probability that the Bluetooth devices are scanned at the same time is improved, meanwhile, the duration of each time of heartbeat message broadcasting of the Bluetooth devices is reduced, and the power consumption of the devices for broadcasting messages can be reduced while the probability that the heartbeat messages of the Bluetooth devices are scanned is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of wireless communication technologies, and in particular, to a communication method and device for adjusting a message scanning window. Background Art

[0002] A network based on Bluetooth Low Energy (BLE) released by the Bluetooth Special Interest Group (Bluetooth SIG), such as a Bluetooth wireless mesh network (Mesh), is hereinafter referred to as a Bluetooth Mesh network. The Bluetooth Mesh network technology has broad application prospects in fields such as building automation, commercial lighting, and sensor networks.

[0003] A BLE device in a Bluetooth Mesh network is called a Node, and each Node can communicate with other Nodes through broadcasting or other forms. For example, Figure 1A shows a mesh schematic diagram of a Bluetooth Mesh network 100A. Figure 1A The network of the Bluetooth Mesh network 100A in is composed of several Nodes, including Figure 1A the shown Nodes H1, H2..... Hn, etc. Each Node can ensure timely response to network requests and communicate with other Nodes through Bluetooth broadcasting.

[0004] In a Bluetooth Mesh network, network flooding is generally used to broadcast and relay messages, so that the messages can reach their destination devices through multiple paths to ensure the reliability of the Bluetooth Mesh network. However, when using the flooding technology, in order to improve the reception success rate of the message receiving device, the device broadcasting the message generally needs to continuously broadcast the message for a long time, which results in high power consumption of the device broadcasting the message. Summary of the Invention

[0005] To solve the above problems, embodiments of this application provide a communication method and device for adjusting a message scanning window to improve the reception success rate of a message receiving device.

[0006] In a first aspect, an embodiment of the present application provides a communication method for adjusting a message scanning window, including: a first Bluetooth device in a Bluetooth mesh network broadcasts a first scanning adjustment message, where the first scanning adjustment message is 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, where the start time of the message scanning window of the second Bluetooth device before adjustment is a second moment, 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 a plurality of heartbeat messages in at least one message scanning window after the start time is adjusted, and 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.

[0007] It can be understood that in a Bluetooth mesh network, when each Bluetooth device (for example, a node below) performs message scanning itself, the start time of the message scanning window (i.e., the scanning window below) may not be at the same moment according to its own configuration. For example, due to different configurations of the second Bluetooth device and the third Bluetooth device, at this time, the start times of the message scanning windows of each Bluetooth device are very likely to be at different moments. For example, the start time of the message scanning window of the second Bluetooth device before adjustment is a second moment, the start time of the message scanning window of the third Bluetooth device before adjustment is a third moment, and the second moment and the third moment are both different time points. When the first Bluetooth device broadcasts a first scanning adjustment message, and the first scanning 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 a first moment, each Bluetooth device can adjust the message scanning window to the same moment. At this time, there will be an overlapping time period between the message scanning windows of the first Bluetooth device, the second Bluetooth device, and the third Bluetooth device, so as to improve the probability that each Bluetooth device is scanned simultaneously, and then the duration of each Bluetooth device broadcasting a heartbeat message each time can be reduced, and there is no need to increase the scanning period, so that while improving the probability that the heartbeat messages of each Bluetooth device are scanned, the power consumption of the Bluetooth device broadcasting the message can be reduced.

[0008] In a possible implementation of the above first aspect, it further includes: determining that the first Bluetooth device broadcasts the first scanning adjustment message based on the clock drift accuracy with each Bluetooth device in the Bluetooth mesh network, where the clock drift accuracy of the first Bluetooth device satisfies a first accuracy condition.

[0009] It can be understood that the first precision condition can be that the clock drift precision of the Bluetooth device is greater than that of the Bluetooth devices in the Bluetooth mesh network other than itself that need to adjust the message scanning window, that is, the clock drift precision is the highest. The first precision condition can also be that the clock drift precision is the second highest or the clock drift precision is the third highest, etc., which is not required here. It can be understood that since each Bluetooth device can evaluate its own clock drift precision and determine the device for broadcasting the scan adjustment message according to the clock drift precision, it is scientific and reasonable.

[0010] In a possible implementation of the foregoing first aspect, the scanning 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 scanning period includes a message scanning window and a scanning sleep period.

[0011] 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 a multiple relationship, for example, the scanning period can be 600 ms or 300 ms as described below. At this time, 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 that each Bluetooth device is scanned simultaneously is higher, which is beneficial to further reducing power consumption.

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

[0013] It can be understood that as each Bluetooth device is running continuously and clock drift occurs, the start times of the message scanning windows that should originally be aligned between the Bluetooth devices will be staggered. Therefore, the first Bluetooth device periodically sends a scan adjustment message at an adjustment period to reconfigure the start times of the message scanning windows of each Bluetooth device at the same moment, thereby increasing the probability that each Bluetooth device is scanned simultaneously.

[0014] In a second aspect, an embodiment of the present application provides a communication method for adjusting a message scanning window, including: the second Bluetooth device in the Bluetooth mesh network receives a first scan adjustment message sent by the first Bluetooth device in the Bluetooth mesh network, and adjusts the start time corresponding to the message scanning window to the first moment, where the start time of the message scanning window of the second Bluetooth device before adjustment is the 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.

[0015] It can be understood that in the Bluetooth mesh network, the second Bluetooth device adjusts the start time corresponding to the message scanning window to the first moment according to the received first scanning adjustment message. At this time, it can effectively cooperate with the start times of the message scanning windows of other devices in the Bluetooth mesh network, so that the start times of the message scanning windows of each Bluetooth device are configured at the same moment, increasing the probability of receiving the same heartbeat message together with other devices.

[0016] 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 P1th broadcast period, and the second Bluetooth device scans the third heartbeat message in the S2th scanning period, where the scanning period includes a message scanning window and a scanning sleep period.

[0017] In a possible implementation of the second aspect above, it further 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 that the message scanning window of the second Bluetooth device in the S2 + jth scanning period meets the first window adjustment condition based on the first time interval, where the first time interval is the time interval between the first reception time tm when the second Bluetooth device scans the fourth heartbeat message and the estimated second reception time tn for receiving the fourth heartbeat message; and adjusts the start time of the message scanning window of the S2 + j + 1th scanning period.

[0018] It can be understood that after a period of time when each Bluetooth device in the Bluetooth mesh network is broadcasting and scanning for heartbeat messages, due to clock drift, the scanning windows of each Bluetooth device will be misaligned. At this time, each Bluetooth device can use one Bluetooth device as the alignment standard and dynamically adjust the start time of its own scanning window so that there can still be an overlapping time period for the scanning windows of each Bluetooth device. Specifically, an aligned Bluetooth device can be negotiated among the devices. For example, the first Bluetooth device is used as the aligned Bluetooth device, and the start times of the scanning windows of other Bluetooth devices are aligned with the start time of the scanning window of this Bluetooth device. It can be understood that each device estimates in advance the first reception time for scanning the heartbeat message sent by other Bluetooth devices, and then can compare the estimated first reception time with the actually received second reception time to determine whether an adjustment is needed. For example, after the second Bluetooth device scans the fourth heartbeat message broadcast by the first Bluetooth device in the P1 + n broadcast period, if the time interval between the first reception time tm when the fourth heartbeat message is scanned and the estimated second reception time tn for receiving the fourth heartbeat message meets 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, which reduces the probability of receiving the same heartbeat message together with other devices.

[0019] In a possible implementation of the second aspect described above, it further includes that the first window adjustment condition includes: the first time interval is greater than the time threshold.

[0020] It can be understood that if the first time interval is greater than the time threshold, it indicates that the starting time point of the own message scanning window is severely misaligned with the starting time of the message scanning window of the paired Bluetooth device, and adjustment is required at this time.

[0021] In a possible implementation of the second aspect described above, adjusting the starting time of the message scanning window for the (S2 + j + 1)-th scanning period includes: corresponding to the first reception time tm being earlier than the second reception time tn, advancing the starting time of the message scanning window for the (S2 + j + 1)-th scanning period by the first time interval; corresponding to the first reception time tm being later than the second reception time tn, delaying the starting time of the message scanning window for the (S2 + j + 1)-th scanning period by the first time interval.

[0022] In a possible implementation of the second aspect described above, the fourth heartbeat message is the heartbeat message broadcast for the first time among the multiple heartbeat messages broadcast by the first Bluetooth device within the (P1 + n) broadcast period.

[0023] It can be understood that it is more convenient to use the heartbeat message broadcast for the first time among the multiple heartbeat messages broadcast within a certain broadcast period for judgment.

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

[0025] It can be understood that since the sensor hub is a low-power and always-on hardware module, each Bluetooth device can always control the Bluetooth chip to periodically broadcast heartbeat messages and adjust the scanning window alignment through the sensor hub. At this time, the processor does not need to be woken up to control the Bluetooth chip to broadcast heartbeat messages, and the processor can be put into sleep, thereby further reducing power consumption. Since the power consumption of the sensor hub is small, the overhead of controlling the Bluetooth chip to periodically broadcast messages is small at this time, and the broadcast period and the duration of the broadcast heartbeat message in each broadcast period can be further reduced, thereby further improving the broadcast efficiency on the basis of saving power.

[0026] Fourth aspect, an embodiment of the present application provides a Bluetooth device, which is characterized by including: 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 of adjusting the message scanning window in any one of the first aspect and various implementations of the first aspect, or the communication method of adjusting the message scanning window in any one of the second aspect and various implementations of the second aspect.

[0027] Fifth aspect, an embodiment of the present application provides a computer program product, which is characterized in that the computer program product includes instructions, and when the instructions are executed, the computer executes the communication method of adjusting the message scanning window in any one of the first aspect and various implementations of the first aspect, or the communication method of adjusting the message scanning window in any one of the second aspect and various implementations of the second aspect.

[0028] Sixth aspect, an embodiment of the present application provides a readable storage medium, which is 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 of adjusting the message scanning window in any one of the first aspect and various implementations of the first aspect, or the communication method of adjusting the message scanning window in any one of the second aspect and various implementations of the second aspect.

[0029] Among them, the beneficial effects of the fourth aspect to the sixth aspect can refer to the beneficial effects related to the first aspect and the second aspect, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1A According to some embodiments of the present application, a schematic diagram of a Bluetooth mesh network 100A is shown;

[0031] Figure 1B According to some embodiments of the present application, a schematic diagram of a smart home 100B is shown;

[0032] Figure 1C According to some embodiments of the present application, a schematic diagram of the scanning windows of a mobile phone 101, a printer 103, and a Bluetooth headset 104 is shown;

[0033] Figure 1D According to some embodiments of the present application, a schematic diagram of a broadcast window is shown;

[0034] Figure 1E According to some embodiments of the present application, a schematic diagram of the control interface P1 of a mobile phone 101 is shown;

[0035] Figure 2A According to some embodiments of the present application, a schematic diagram of a mobile phone 101, a smart light 102, and a printer 103 is shown;

[0036] Figure 2B According to some embodiments of the present application, a schematic diagram of message broadcasting is shown;

[0037] Figure 2C According to some embodiments of the present application, a schematic diagram of the control center interface P2 is shown;

[0038] Figure 2D According to some embodiments of the present application, a schematic diagram of the super terminal interface P3 is shown;

[0039] Figure 2E According to some embodiments of the present application, a schematic diagram of a timing axis showing clock drift after a certain period of time corresponding to a mobile phone 101, a smart light 102, and a printer 103 respectively is shown;

[0040] Figure 2F According to some embodiments of the present application, another schematic diagram of the scanning windows of a mobile phone 101, a smart light 102, and a printer 103 is shown;

[0041] Figure 3A According to some embodiments of the present application, a process schematic diagram of a communication method for adjusting a message scanning window is shown;

[0042] Figure 3B According to some embodiments of the present application, a schematic diagram of the scanning windows of a mobile phone 101, a smart light 102, and a printer 103 is shown;

[0043] Figure 3C According to some embodiments of the present application, a process schematic diagram of dynamic adjustment of a scanning window is shown;

[0044] Figure 4A According to some embodiments of the present application, an interaction schematic diagram of a communication method based on adjusting a message scanning window is shown;

[0045] Figure 4B According to some embodiments of the present application, another interaction schematic diagram of a communication method based on adjusting a message scanning window is shown;

[0046] Figure 5A According to some embodiments of the present application, a schematic diagram of aligning the wake-up windows of a mobile phone 101 and a smart light 102 is shown;

[0047] Figure 5B According to some embodiments of the present application, a schematic diagram of the operation of a CPU controlling a Bluetooth chip in an initial one scanning cycle is shown;

[0048] Figure 6According to some embodiments of the present application, a schematic diagram showing the operation of a Bluetooth chip in an initial scanning cycle based on a sensor hub is shown;

[0049] Figure 7 According to some embodiments of the present application, a schematic structural diagram of an electronic device 700 is shown;

[0050] Figure 8 According to some embodiments of the present application, a schematic structural diagram of an electronic device 800 is shown. Detailed implementation manners

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

[0052] The embodiments of the present application will be introduced below with reference to the accompanying drawings.

[0053] Figure 1B According to some embodiments of the present application, a schematic diagram of a smart home scenario based on a Bluetooth mesh network is shown.

[0054] As Figure 1B shown, in the smart home scenario 100B, a mobile phone 101, a smart light 102, a printer 103, a Bluetooth headset 104, a Bluetooth mouse 105, a computer 106, etc. can be used as nodes in the Bluetooth mesh network to establish long connections through low-power Bluetooth technology to achieve communication and control between devices. It can be understood that each node in the Bluetooth mesh network can broadcast messages to other nodes or receive messages from other nodes.

[0055] It can be understood that in Figure 1B the scenario shown, after the devices in the smart home 100B establish a connection, they need to perform a keep-alive behavior. Specifically, each node needs to regularly broadcast heartbeat messages to other devices. For example, the heartbeat messages can be broadcast by broadcasting messages, and the heartbeat messages are used to confirm whether the device is online. Other devices can confirm that the sender of the heartbeat message is still online and can work properly only after receiving the message carrying the heartbeat message, otherwise it is considered that the sender of the heartbeat message has a fault. Usually, the device can broadcast heartbeat messages at fixed time intervals, such as broadcasting a heartbeat message every 3 seconds or 3 minutes.

[0056] For example, if Figure 1BThe smart light 102 in it broadcasts a heartbeat message to the mobile phone 101 at regular intervals, such as once every 3 minutes, to indicate that the smart light 102 is in the online state. Therefore, the mobile phone can normally broadcast instructions to the smart light 102, thereby realizing the control of the smart light 102. If the mobile phone 101 does not receive the heartbeat message broadcast by the smart light 102 for a long time, such as not receiving the heartbeat message for 1 hour, the mobile phone 101 may think that the smart light 102 has gone offline or malfunctioned.

[0057] It can be understood that in some embodiments, the Bluetooth chips of the nodes in the Bluetooth mesh network are configured to perform packet scanning at regular intervals (hereinafter referred to as the scanning sleep period). For example, as Figure 1C shown, 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 packet scanning window) is 60 milliseconds (ms), the scanning sleep period is 540 milliseconds, and the scanning period includes the scanning window and the scanning sleep period, with a length of 600 ms. That is, each device starts to perform packet scanning every 540 ms, and each packet scanning lasts for 60 ms. At the same time, each device can only scan the heartbeat message, that is, receive the heartbeat message, during the time period corresponding to the scanning window.

[0058] As mentioned above, the nodes in the Bluetooth mesh network also broadcast heartbeat messages at fixed time intervals. Therefore, if the time when a node broadcasts a heartbeat message to another node happens to be the scanning sleep period of the other node, the other node cannot scan the heartbeat message. In some embodiments, in order to improve the success rate of packet reception, when each node broadcasts a heartbeat message, it can adopt the flooding technology and continue to broadcast packets for a relatively long time before stopping broadcasting packets.

[0059] Refer to Figure 1D Axis 01 in, when the smart light 102 adopts the flooding method, it can broadcast heartbeat messages to all other devices every 3 minutes. At this time, in order to improve the success rate of receiving heartbeat messages during the broadcast period, the smart light 102 can continuously broadcast heartbeat messages for 30 s in each broadcast period, resulting in relatively high power consumption.

[0060] It can be understood that for Figure 1D the details of broadcasting heartbeat messages corresponding to the circle Q1 in axis 01 in, reference can be made to Figure 1D Axis Q1 in. Within 30 seconds (i.e., 3000 milliseconds), the smart light 102 broadcasts 1 heartbeat message every 20 milliseconds and continuously broadcasts without interruption for 30 s, resulting in relatively high power consumption. However, due to the relatively long duration of broadcasting heartbeat messages, the power consumption is relatively high.

[0061] Furthermore, some problems may also arise when the broadcast power consumption is relatively high. Exemplarily, since each node has a relatively long duration and high power consumption during each broadcast, in order to maintain power consumption and save battery power, the scanning sleep period will be extended. For example, the heartbeat message is broadcast every 5 minutes and the broadcast lasts for 30s. However, extending the scanning sleep period will result in a lower probability of a node receiving the heartbeat messages of other nodes, and the time interval during which the node broadcasting the heartbeat message is perceived as online will also be extended. For example, for Figure 1B the scenario shown in FIG. 1, assume that the smart electric lamp 102 broadcasts the heartbeat message during the time period from t1 to (t1 + 0.5) min. After an interval of 5 min, the smart electric lamp 102 starts broadcasting the heartbeat message again after (t1 + 5.5) min. During the 5-min interval, if the user needs to search for connected devices through the mobile phone 101, the mobile phone 101 cannot quickly sense whether the smart electric lamp 102 exists. For example, referring to Figure 1E the control interface P1 of the mobile phone 101 shown in FIG. 2, in the super terminal box P11, the surrounding devices cannot be quickly displayed, and generally it takes several minutes to determine which other devices exist.

[0062] Therefore, in order to reduce the power consumption of the device broadcasting the heartbeat message, the present application proposes a communication method for adjusting the message scanning window. This method adjusts the start 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, and the negotiation message carries a scanning adjustment message to notify other devices to enter the scanning window at the same moment. In this way, there will be an overlapping time period (hereinafter referred to as the "overlapping time period") for the scanning windows of each node, which increases the probability that each node is scanned simultaneously, while reducing the duration of each broadcast of the heartbeat message by each node, and there is no need to increase the scanning sleep period. Therefore, the present application can reduce the power consumption of the device broadcasting the broadcast message while increasing the probability that the heartbeat message of each node is scanned.

[0063] It can be understood that in some embodiments, multiple electronic devices can log in to the same user account, or multiple electronic devices can log in to different user accounts, but there may be a credit relationship between the user accounts. Each device can detect the devices that need to synchronize the scanning window according to the account relationship, and then self-run the method of synchronizing the scanning window.

[0064] In other embodiments, multiple electronic devices can belong to the same home network or the same public network. Each device can detect the devices that need to synchronize the scanning window according to the network relationship, and then self-run the method of synchronizing the scanning window.

[0065] Specifically, multiple electronic devices can obtain their own clock drift amounts in advance, so as to obtain their own clock drift accuracies. Among them, the clock drift amount is the change amount of the clocks 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 amount per unit time between the clocks of each device and the standard clock in the cloud. Those that meet the first accuracy condition are used as the master device. For example, the device with the highest clock drift accuracy is used as the master device. It can be understood that devices with the second highest, third highest, etc. clock drift accuracies can also be used as the master devices, which is not limited 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.

[0066] For example, in the above Figure 1B shown scenario, the electronic devices in the Bluetooth mesh network can be of the same user account, and the scan cycles and scan windows of each electronic device are the same. After the mobile phone 101 and the smart light 102 are both online at the same time, the mobile phone 101 and the smart light 102 respectively detect that the other is a device of the same user account. At this time, the mobile phone 101 and the smart light 102 self-run synchronous scan windows. After a period of time, when the printer 103 is online, at this time, when the printer 103, the mobile phone 101, and the smart light 102 can respectively detect that the three are of the same user account, at this time, the printer 103 configures the start time of its own scan window and the scan windows of the mobile phone 101 and the smart light 102 at the same moment.

[0067] Another example is in the above Figure 1B shown scenario, the electronic devices in the Bluetooth mesh network are of different user accounts but have a trust relationship, and the scan cycles and scan windows of each electronic device are the same. After the mobile phone 101 and the smart light 102 are both online at the same time, the mobile phone 101 and the smart light 102 respectively detect that the other is a device of a user account with a trust relationship. At this time, the mobile phone 101 and the smart light 102 self-run synchronous scan windows. After a period of time, when the printer 103 is online, at this time, when the printer 103, the mobile phone 101, and the smart light 102 can respectively detect that the three are all user accounts with a trust relationship, at this time, the printer 103 configures the start time of its own scan window and the scan windows of the mobile phone 101 and the smart light 102 at the same moment.

[0068] It can be understood that in some scenarios, after an electronic device 0 turns on Bluetooth, it can connect to the surrounding devices with the same user account or different user accounts that can have a trusted relationship; it can also, when the screen is turned on again after a long period of screen-off, reconnect to the surrounding devices with the same user account or different user accounts that can have a trusted relationship; it can also be timed, such as automatically starting Bluetooth in the morning or evening to connect to the surrounding devices with the same user account or different user accounts that can have a trusted relationship. For example, after the electronic device 0 turns on Bluetooth, it will scan the surrounding devices, check the devices present, and then broadcast a message to the present devices. The message carries the user account of its own device. If the surrounding devices find that the user accounts are the same as their own, they can feedback their own user accounts to the electronic device 0, thus establishing a connection.

[0069] Figure 2A According to some embodiments of the present application, the timing axes corresponding to the mobile phone 101, the smart light 102, and the printer 103 are shown respectively.

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

[0071] It can be understood that since the success rate of a single heartbeat message received by all devices is increased, each device can shorten the duration of continuously broadcasting the heartbeat message within each broadcast cycle, that is, shorten the time of the broadcast window in the broadcast cycle. For example, the broadcast window is reduced from 30 s to 10 s, thereby reducing power consumption and improving efficiency. In addition, since the power consumption of the broadcast heartbeat message required within 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 heartbeat message was broadcast for 30 s every 5 minutes, which can be changed to broadcast for 10 s every 3 minutes, and the number of broadcast cycles changes from 3 to 5. At this time, the power consumption is about the same as before, but the frequency of proving its own existence to other devices is increased, which is convenient for each device to quickly sense whether there are surrounding devices. Furthermore, the reliability of the entire Bluetooth mesh network is improved. The embodiment of the present application can also reduce the total number of broadcast packets during the broadcast time period, thereby reducing power consumption.

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

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

[0074] In some embodiments, when each node broadcasts a message, it is necessary to control the Bluetooth chip to broadcast the message through a central processing unit (CPU). After the node goes to sleep, it is necessary to wake up the CPU regularly to broadcast heartbeat messages, thereby reducing the time when the CPU needs to be woken up and run and reducing the power consumption of the CPU.

[0075] In some other embodiments, a sensor hub is included on certain nodes. Since the sensor hub is a low-power and always-on hardware module, 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 woken up to control the Bluetooth chip to broadcast messages, and the CPU can go to sleep, thereby further reducing power consumption. Since the power consumption of the sensor hub is small, the overhead of controlling the Bluetooth chip to periodically broadcast messages at this time is small, and the broadcast period and the duration of the broadcast message in each broadcast period can be further reduced. For example, refer to Figure 2A , when it is determined that the coincidence period is 600 ms and the coincidence duration is 60 ms, where the coincidence period is the time difference between the starting points of two adjacent coincidence time periods. The broadcast period can be determined to be 1 s, and the duration of the broadcast message can be determined to be 100 ms, thereby further improving the broadcast efficiency on the basis of saving power.

[0076] It can be understood that during actual use, since the node receiving the message can quickly receive the message, some interfaces that enable the user to quickly perceive the state of the controlled device can be provided to improve the user experience. For example, based on the above Figure 1B shown scenario, after the mobile phone 101 adopts the communication method of adjusting the message scan window in the embodiments of the present application, it can quickly perceive whether the surrounding electronic devices still exist in the connection. Refer to Figure 2C shown control center interface P2 of the mobile phone 101. 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 with the surrounding devices of the mobile phone 101 is improved and the broadcast period is shortened, the mobile phone 101 can quickly receive the heartbeat messages of the surrounding devices, and then can quickly display the devices with long connections in the super terminal search box k21, and further, it can be further rendered as Figure 2D shown super terminal interface P3.

[0077] It can be 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 s, changing the broadcast of one heartbeat message every 20 milliseconds (ms) to the simultaneous broadcast of 3 heartbeat messages, thereby improving the success rate of the devices receiving the heartbeat message.

[0078] It is understandable that after each node in the Bluetooth mesh network broadcasts and scans the heartbeat message for a period of time, due to clock drift, the scan windows of each node will be misaligned. At this time, each node can dynamically adjust the start time of its own scan window and the start time of the broadcast window so that there is still an overlapping period for the scan windows of each node. Specifically, the clock of the node with the first sending order can be used as the standard, that is, this node is used as the standard node, and the start time of the scan window of each other node is aligned with the start time of the scan window of this standard node.

[0079] For example, Figure 2E shows the time sequence axes with clock drift after a period of time corresponding to the mobile phone 101, the smart light 102, and the printer 103 respectively. The mobile phone 101, the smart light 102, and the printer 103 correspond to scan windows t1 of the same size and a scan period T1. It can be seen from the figure that the start times of the scan windows of the three are misaligned, and the misalignment of the smart light 102 is relatively large. Taking the mobile phone 101 as the standard node, the smart light 102 and the printer 103 can be aligned with the scan window of the mobile phone 101, and their start times are adjusted to be postponed by t1 on the original basis. For example, Figure 2F as shown, the start time of the smart light 102 in the next scan window is at the same moment as the start time of the mobile phone 101.

[0080] It is understandable that the electronic devices in the above 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, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, ultra-mobile personal computers (UMPCs), personal digital assistants (PDAs), smart speakers, air detectors, thermohygrometers, alarms, smart door locks, cameras, and other electronic devices that support Bluetooth low-power transmission capabilities, which are not limited here.

[0081] Figure 3A According to some embodiments of the present application, a process schematic diagram of a communication method for adjusting a packet scan window is shown. When each node executes specific steps in this process schematic diagram, the execution entity can be an electronic device, or a processor or a sensor hub of the electronic device. However, the present application does not limit the execution entity of this method flow.

[0082] S101, each node configures the start time of the scan window at the same moment.

[0083] In some embodiments, each node evaluates its own clock drift accuracy, negotiates a master node (i.e., the master device mentioned above) and a standard node based on the clock drift accuracy, and each node configures the start time of the scan window at the same moment based on the scan adjustment message broadcast by the master node. It can be understood that the master node and the standard node can be the same node or different nodes, and the master node can be the node with the first broadcast order.

[0084] In some implementation manners, after running for a period of time, each node will have a clock drift situation due to its own characteristics. At this time, each node can use the clock synchronization protocol to synchronize the clock with the standard clock in the cloud, count the clock drift amount, and obtain its own clock drift accuracy. For example, during the operation of mobile phone 101 for 1 hour, due to its own characteristics, its own clock will always be less than the standard clock. The clock drift amount at each time point during the 1-hour process can be counted, so as to evaluate the clock drift accuracy of mobile phone 101. Each node negotiates the broadcast order of each node based on the magnitude order of the clock drift accuracy, and takes the node with the highest clock drift accuracy as the standard node and the master node, that is, the master node and the standard node are the same node. Each node configures the start time of the scan window at the same moment based on the scan adjustment message broadcast by the master node. Specifically, during the negotiation process, each node can carry its own clock drift accuracy message in the broadcast packet, and negotiate to take the node with the highest clock drift accuracy as the node with the first order and the standard node, that is, the master device mentioned above, which is beneficial to subsequent dynamic adjustment at each node. It can be understood that in some other implementation manners, the node with the second highest or the second and third highest clock drift accuracy can also be used as the standard node, which is not limited here.

[0085] In some implementation manners, each node can configure the start time of the scan window for receiving heartbeat messages at the same moment in the following way: the master node broadcasts a scan adjustment message, and the scan adjustment message includes an alignment time point. For example, the alignment time point is 10:00:000 milliseconds, and each node can configure the start time of a scan window for receiving packets at this alignment time point.

[0086] In some implementation manners, due to clock characteristics, for the same standard clock time, the corresponding system times of each node will be inconsistent. At this time, each device can, according to the clock deviation rule between its own system clock and the system clock of the master node, and the received alignment time point, configure its own system time at the time position corresponding to the alignment time point. Thus, each node realizes configuring the start time of the scan window at the same moment. At this time, during subsequent operation, there will be an overlapping time period for the scan windows of each node.

[0087] For example, assume that the clock drift accuracies of each device are in the following order: the clock drift accuracy of mobile phone 101 is the highest, that of smart light 102 is the second, and that of printer 103 is the third... The mobile phone 101 with the highest clock drift accuracy is used as the master node and the standard node. At this time, the mobile phone 101 as the master device can interact with other devices through negotiation messages. The negotiation message broadcast by the mobile phone 101 carries the timestamp of the broadcast message. After multiple rounds of communication, each device can determine the fixed clock deviation rule between its own system clock and the system time of the mobile phone 101. For example, every time the smart light 102 receives a message from the mobile phone 101, its system time is 1 ms different from the timestamp carried in the negotiation message. At this time, each node can calculate the system time of the mobile phone 101 at 10:00:00 ms, assume it is 10:00:01 ms, and then configure the system time of the start time of the corresponding scan window at 10:00:01 ms, so that each node configures the start time of a scan window for receiving heartbeat messages at the same moment.

[0088] It can be understood that each electronic device has a corresponding duty cycle in the current scenario, that is, the currently determined scan period and scan window. The duty cycle is the ratio of the total duration of the scan window within a period of time. For example, taking 1 hour as an example, the duty cycle of a certain node is 10%, which means that there are 6 minutes for message scanning within 1 hour, the total duration of the scan window is 6 minutes. Assuming the scan interval is 600 ms, at this time, the scan window is 60 ms, and the number of scan intervals is 600; assuming the scan interval is 300 ms, at this time, the scan window is 30 ms, and the number of scan intervals is 1200. After configuring the start time of a scan window for receiving heartbeat messages at the same moment, there will be an overlapping time period for the scan windows of each node. Referring to the above Figure 2A description corresponding to a scan interval of 600 ms and a scan window of 60 ms, it will not be elaborated here.

[0089] In some embodiments, the duty cycle of each electronic device, as well as the corresponding scan window and scan period, can be artificially set parameter values. For example, the duty cycle can also be 20%, 12%, 5%, etc., and can be any value. Moreover, the scan window and scan period can also be set to any value accordingly, as long as the duty cycle result is satisfied, and no requirements are made here.

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

[0091] S102, each node broadcasts multiple heartbeat messages according to its own broadcast period, and other nodes can scan a certain heartbeat message together during the overlapping time period of the scanning windows.

[0092] In some embodiments, each node determines the start time of its own initial broadcast window according to the broadcast order; based on the determined start time of its own initial broadcast window, multiple heartbeat messages are broadcast to other nodes according to the negotiated broadcast period. It can be understood that since the scanning windows of each node are configured at the same moment, there will be an overlapping time period for the scanning windows of each node. If each node sends a certain heartbeat message during the overlapping time period, other nodes can scan this heartbeat message together.

[0093] In some implementation manners, each node determines the start time of its own initial broadcast window according to the determined broadcast order and the configured discrete time. Among them, the discrete time can be a default parameter pre-configured by the user. Then, each node broadcasts heartbeat messages to other nodes at the start time of the initial broadcast window according to the same broadcast period, and the size of the broadcast window of each node in each broadcast period is equal. For a specific example, refer to the description shown above Figure 2B and will not be elaborated here. It can be understood that when the broadcast periods of each node are the same, it can be avoided that within the broadcast period, node A can determine the existence of node B, while node B cannot determine the existence of node A.

[0094] For example, assume that the order of the mobile phone 101 is 1, the order of the smart electric lamp 102 is 2, the order of the printer 103 is 3...., and the discrete time is 5 ms. At this time, the sequence of the start times of the initial broadcast windows corresponding to the respective broadcast heartbeat messages is the same as the broadcast order, and each node can broadcast heartbeat messages in sequence according to the situation of the node with order 1 broadcasting heartbeat messages, and the start times of the broadcast windows are staggered by 5 ms respectively. At this time, the start time of the initial broadcast window of the mobile phone 101 is 20 milliseconds at 10:00:00, the start time of the initial broadcast window of the smart electric lamp 102 is 25 milliseconds at 10:00:00,......, and the start times of the initial broadcast windows of other electronic devices will not be elaborated here.

[0095] In addition, in some other embodiments, the broadcast windows of each node, i.e., the duration of the broadcast messages, can be different, and during the actual broadcast process, it can also be adaptively adjusted. For example, when receiving the information of successfully received messages carried in the heartbeat messages broadcast from other nodes, the number of broadcast messages can also be reduced.

[0096] S103. Each node dynamically adjusts the start time of the scan window.

[0097] In some embodiments, after each node broadcasts and scans the heartbeat message for a period of time, due to clock drift, the scan windows of each node will be misaligned. At this time, each node can dynamically adjust the start time of its own scan window and the start time of the broadcast window, so that there can still be an overlapping time period for the scan windows of each node. The specific adjustment method can refer to Figure 3C the schematic diagram of the dynamic adjustment process shown.

[0098] Figure 3C The schematic diagram of the process of each node performing dynamic adjustment shown is as follows:

[0099] S1031. Each node determines whether to re-adjust the start time of the scan window based on the heartbeat message received corresponding to the start time of a certain broadcast window.

[0100] If the judgment result is yes, go to S1032 to adjust the start time of the next scan window; if the judgment result is no, go to S1034 without adjustment.

[0101] It can be understood that each node determines its own corresponding clock drift threshold in advance according to the clock drift accuracy and the negotiated broadcast period, which is used to judge whether to adjust the start time of the scan window. It can be understood that the size of the broadcast window and the clock drift accuracy are important parameters affecting the clock drift threshold. The size of the broadcast window will affect the tolerance of clock drift. When the broadcast window is large, at this time, the deviation amount that tolerates the misalignment of the scan windows of each node is large, and at this time, the clock drift threshold can be set larger according to the self-evaluated clock drift accuracy. If the broadcast window is small, at this time, the clock drift threshold can be set smaller according to the self-evaluated clock drift accuracy. For example, mobile phone 101 determines the clock drift threshold to be 10 ms, and other electronic devices also determine their corresponding clock drift thresholds, which will not be elaborated here.

[0102] In some implementations, each node can determine whether to adjust the start time of the scan window by judging whether the heartbeat message received at the start time of a corresponding 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 reception time) and the estimated time of receiving the heartbeat message (i.e., the second reception time).

[0103] Corresponding to the received heartbeat message being from a standard node and the current time interval being greater than or equal to its own corresponding clock drift threshold, enter S1032 to adjust the start time of the next scan window. Otherwise, enter S1034 without adjustment.

[0104] It can be understood that the heartbeat message will carry the sequence number of the broadcast of the heartbeat message by the agreed broadcaster. For example, the heartbeat message carries information that it is the first heartbeat message in the first broadcast cycle of node A. And when each node negotiates in advance, it can know the broadcast cycles of other nodes. At this time, each node can estimate the time of receiving the first heartbeat message in the next broadcast cycle of that node based on the time of receiving the first heartbeat message broadcast by other nodes in a certain broadcast cycle and the broadcast cycle of that node.

[0105] Therefore, when the first time interval obtained by a certain node based on receiving the first heartbeat message sent by the standard node for a certain broadcast cycle has a large difference. Then it is determined to enter S1032 to adjust the start time of its own next scan window. Otherwise, enter S1034.

[0106] For example, when the system time of the smart light 102 when receiving the heartbeat message from the mobile phone 101 is 12:00:00.030, and it is determined that the other party is a standard node. The smart light 102 estimates that the time it should receive is 12:00:00.041, thus calculating the first time interval as 11 ms, while the clock drift threshold of the smart light 102 itself is 10 ms. It is determined that there is a large drift in itself or the other party. At this time, it adjusts its own scan window to align with the scan window of this standard node.

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

[0108] S1032, adjust the start time of the next scan window and the start time of the next broadcast window.

[0109] In some embodiments, each node may, according to the first time interval calculated by each node, extend or shorten the start time of the next scan window and the start time of the next broadcast window on the original basis by the first time interval. For example, the smart light 102 determines that the first reception time is 11 ms earlier than the second reception time, and the smart light 102 advances the start time of the next broadcast window by 11 ms. For another example, the smart light 102 determines that the first reception time is 11 ms later than the second reception time, and the smart light 102 delays the start time of the next broadcast window by 11 ms.

[0110] S1033. After each node compensates its own clock regularly based on the standard node, it adjusts the start time of the next broadcast window and the start time of the scan window again according to the clock compensation adjusted by the standard node.

[0111] In some embodiments, the standard node will regularly adjust its own time according to its own clock drift threshold, such as shortening or extending the start times of its own scan window and broadcast window by the clock drift threshold, and will inform other nodes that the same adjustment is required, such as informing other nodes to shorten or extend the start times of their own scan window and broadcast window by the clock drift threshold.

[0112] For example, the mobile phone 101 is the standard node. After half a day, it moves the scan window and the broadcast window backward by 10 ms. At this time, it will notify other nodes, and other nodes will also move backward by 10 ms together.

[0113] S1034. Each node does not make adjustments.

[0114] It can be understood that if the current node finds that the received heartbeat message is not broadcast by the standard node, there is no need to consider adjustment. If it is broadcast by the standard node, but the first time interval does not reach the clock drift threshold, there is also no need to adjust.

[0115] It can be understood that the execution order of the above steps S1031 to S1034 is only an example. In some other embodiments, other execution orders may also be adopted, and some steps may also be split or combined, which are not limited herein. It can be understood that the nodes in the above steps S1031 to S1034 are the dynamic adjustments required for the nodes other than the standard node.

[0116] In some other embodiments, the node with the first broadcast order may periodically send scan adjustment messages at an adjustment period, and the adjustment period is longer than the scan intervals of all nodes.

[0117] It can be understood that the execution order of the above steps S101 to S103 is only an example. In some other embodiments, other execution orders may also be adopted, and some steps may be split or combined, which are not limited herein.

[0118] Figure 4A According to some embodiments of the present application, an interaction schematic diagram of a communication method based on adjusting a message scanning window is shown. It can be understood that Figure 4A the process of the processing of each node within the time period corresponding to the first initial scanning window is specifically described, and each electronic device needs to broadcast and receive heartbeat messages.

[0119] For the convenience of description, the following will take 3 specific nodes, corresponding to mobile phone 101, smart light 102, and printer 103 respectively, as examples for description. In the embodiments of the present application, the execution subject of the specific steps in the interaction process schematic diagram shown in FIG. 4 may be an electronic device. In some other embodiments, the execution subject of each step in the interaction process shown in FIG. 4 may also be a processor or a sensor hub and other structures of the corresponding electronic device, but the present application does not limit the execution subject of this method process.

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

[0121] It can be understood that the specific process of the mobile phone 101, the smart light 102, and the printer 103 configuring the scanning window at the same moment and respectively configuring the start time of the initial broadcast window can refer to the detailed description of FIGS. S101 and S102, which will not be elaborated herein.

[0122] It can be understood that there will be a broadcast order among the mobile phone 101, the smart light 102, and the printer 103. Taking the mobile phone 101, the smart light 102, and the printer 103 corresponding to broadcast order 1, broadcast order 2, and broadcast order 3 respectively as examples. The following steps S202A - S204B are the processes of the mobile phone 101, the smart light 102, and the printer 103 broadcasting heartbeat messages to all other devices according to their respective initial broadcast window start times in the broadcast order.

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

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

[0125] It can be understood that S202A and S202B are the same step for the mobile phone 101. The mobile phone 101 uses the flooding broadcast method. At this time, the mobile phone 101 will broadcast the heartbeat message L11 to the smart light 102 and the printer 103 together at the start time of the initial broadcast window. For the specific description of broadcasting the heartbeat message, reference can be made to step S102 above Figure 3A and will not be elaborated here.

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

[0127] S203B, the smart light 102 broadcasts the heartbeat message L21 to the printer 103 at the start time of the initial broadcast window.

[0128] It can be understood that S203A and S203B are the same step for the smart light 102, which is essentially the same as the mobile phone 101 broadcasting the heartbeat message L21 and will not be elaborated here.

[0129] S204A, the printer 103 broadcasts the heartbeat message L31 to the mobile phone 101 at the start time of the initial broadcast window.

[0130] S204B, the printer 103 broadcasts the heartbeat message L32 to the smart light 102 at the start time of the initial broadcast window.

[0131] It can be understood that S203A and S203B are the same step for the smart light 102, which is essentially the same as the mobile phone 101 broadcasting the heartbeat message L21 and will not be elaborated here.

[0132] S202, the mobile phone 101, the smart light 102, and the printer 103 receive the heartbeat message within the corresponding time period of the corresponding scan window.

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

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

[0135] It can be understood that after the mobile phone 101, the smart light 102, and the printer 103 broadcast the first heartbeat message, they continue to broadcast the heartbeat message according to the broadcast rule. For details, reference can be made to the above Figure 3AStep S102 therein will not be elaborated here. It can be understood that the execution order of the above steps S201 to S203 is only an example. In some other embodiments, other execution orders can also be adopted, and some steps can also be split or combined, which will not be limited here.

[0136] Figure 4B According to some embodiments of the present application, an interaction schematic diagram of another communication method based on adjusting the message scanning window is shown. And Figure 4A The process of a node adjusting to compensate for clock drift after receiving the first heartbeat message broadcast by another node in a certain broadcast period is specifically described therein. For the convenience of description, only the case where the smart light 102 receives the first protection message of the Nth broadcast period of the mobile phone 101 and the mobile phone 101 is a standard node will be used as an example for elaboration. When each electronic device executes specific steps in the interaction process schematic diagram, 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 this method flow.

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

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

[0139] S303, the smart light 102 calculates the first time interval based on the broadcast time in the heartbeat message LN and its own reception time when scanning the message.

[0140] 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.

[0141] For the specific descriptions of the above steps S303 and S304, reference can be made to the above steps S1031 and S1032, which will not be elaborated here.

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

[0143] In some embodiments, each node needs to control the Bluetooth chip to broadcast messages through the CPU. After each node goes to sleep, it needs to regularly wake up the CPU to perform the message broadcast work, that is, the heartbeat message operation can only be performed after the CPU is woken up. It can be understood that each node can align the wake-up window to improve the service experience. For example, Figure 5AIt shows a schematic diagram of the alignment of each wake-up window when the mobile phone 101 and the smart light 102 have equal wake-up windows and wake-up periods. Among them, the vertical axis represents power consumption, the horizontal axis represents time. In the vertical axis, "start waking up" means the CPU starts to wake up, and at this time the power consumption is the highest. "Wake up and run / background" means the power consumption when the CPU is running after being woken up. And the wake-up window in the horizontal axis corresponds to the "start waking up" and "wake up and run / background" parts in the vertical axis. "Sleep" means the CPU is in sleep. The wake-up period of "3 minutes" means that every 3 minutes, the CPU is woken up, and the wake-up duration is the time width of the wake-up window.

[0144] Figure 5B According to an embodiment of the present application, it shows a schematic diagram of the operation of a Bluetooth chip controlled by a CPU in an initial one scanning period. Figure 5B Taking the interaction between two electronic devices as an example, a simple description is given. Suppose electronic device A1, for example, mobile phone 101, includes a processor 1 and a Bluetooth chip U11, and electronic device A2, for example, smart light 102, includes a processor 2 and a Bluetooth chip U12.

[0145] Step0A: The processor 1 sends a start broadcast instruction and an instruction to obtain an accurate scanning window to the Bluetooth chip U11. Specifically, when the processor 1 sends a start broadcast instruction to the Bluetooth chip U11, it can instruct the Bluetooth chip U11 to start sending broadcast signals. After the processor 1 sends an instruction to obtain an accurate scanning window to the Bluetooth chip U11, it can obtain the scanning window information from the Bluetooth chip U11 to optimize the performance of Bluetooth communication according to the scanning window information.

[0146] Step0B: The processor 2 sends a start broadcast instruction and an instruction to obtain an accurate scanning window to the Bluetooth chip U12. It can be understood that this step is essentially the same as Step0A and will not be elaborated here.

[0147] It can be understood that Step0A and Step0B can be executed synchronously or asynchronously and will not be elaborated here.

[0148] After Step0A or Step0B, the processor 1 and the processor 2 can continue to execute the following steps Step1 to Step3.

[0149] Step1: The processor 1 and the processor 2 respectively control the Bluetooth chips U11 and U12 to align the scanning windows. Specifically, the processor 1 and the processor 2 respectively control the Bluetooth chips U11 and U12 to configure the start time of the initial scanning window at the same moment. For specific description, refer to S101 and S102 above Figure 3A and will not be elaborated here.

[0150] Step 2: Processor 1 and Processor 2 respectively control Bluetooth chip U11 and Bluetooth chip U12 to configure the advertising window. Specifically, Processor 1 and Processor 2 respectively control Bluetooth chip U11 and Bluetooth chip U12 to configure the start time of the advertising window based on the advertising sequence and discrete time, and broadcast heartbeat messages. It can be understood that when configuring the start time of the advertising window, code needs to be written in the software to configure the advertising window; it is also necessary to enable the Bluetooth chip to implement the configuration of the advertising window. For specific descriptions, refer to S102 above Figure 3A and will not be elaborated here.

[0151] 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 during the time period corresponding to the scanning window.

[0152] Figure 6 According to the embodiments of the present application, a schematic diagram of controlling the operation of a Bluetooth chip in the initial 1 scanning cycle based on a sensor hub is shown. Figure 6 Taking the interaction between 2 electronic devices as an example, a simple elaboration is made. It is assumed that electronic device B1 includes sensor hub 1 and Bluetooth chip U21, and electronic device B2 includes sensor hub 2 and Bluetooth chip U22.

[0153] Step 0A’: Sensor hub 1 sends a start advertising instruction and an instruction to obtain an accurate scanning window to Bluetooth chip U21.

[0154] Step 0B’: Sensor hub 2 sends a start advertising instruction and an instruction to obtain an accurate scanning window to Bluetooth chip U22.

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

[0156] Step 2’: Sensor hub 1 and sensor hub 2 respectively control Bluetooth chip U21 and Bluetooth chip U22 to configure the advertising window.

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

[0158] It can be understood that the above process is essentially the same as the process shown in Figure 5 and will not be elaborated here.

[0159] Figure 7According to an embodiment of the present application, a schematic structural diagram of an electronic device 700 is shown. It can be understood that the electronic device 700 can be any one of the above-mentioned electronic devices in the Bluetooth mesh network, which will not be elaborated here.

[0160] As Figure 7 shown, 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, etc.

[0161] Specifically, the processor 701 may also be referred to as a processing unit and can implement certain control functions. The processor 701 may be a general-purpose processor or a dedicated processor, etc. For example, it may be a baseband processor or a central processing unit. The baseband processor may be used to process communication protocols and communication data, and the central processing unit may 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 may control the Bluetooth chip 705 to execute the communication method for adjusting the message scanning window in the embodiments of the present application. For example, execute as Figure 3A 、 Figure 4A and Figure 4B as well as Figure 5B the described communication method for adjusting the message scanning window.

[0162] In an alternative design, the processor 701 may also store instructions and / or data, and the instructions and / or data may be run by the processor, so that the electronic device 700 executes the methods described in the above method embodiments. For example, execute as Figure 3A 、 Figure 4A and Figure 4B as well as Figure 5B the described communication method for adjusting the message scanning window.

[0163] The processor 701 may also include a transceiver unit for implementing receiving and sending functions. For example, the transceiver unit may be a transceiver circuit, or an interface, or an interface circuit. The transceiver circuit, interface, or interface circuit for implementing receiving and sending functions may be separate or integrated together. The above transceiver circuit, interface, or interface circuit may be used for reading and writing code / data, or the above transceiver circuit, interface, or interface circuit may be used for signal transmission or transfer.

[0164] The memory 702 may store instructions / data thereon, and the instructions may be run on the processor, so that the electronic device 700 executes the methods described in the above method embodiments. Optionally, data may also be stored in the memory.

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

[0166] Figure 8 According to an embodiment of the present application, a schematic structural diagram of another electronic device 800 is shown. It can be understood that the electronic device 700 may be any one of the above-mentioned electronic devices in the Bluetooth mesh network, which will not be elaborated here.

[0167] As Figure 8 shown, 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, and a sensor hub 806, etc.

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

[0169] In some embodiments of the present application, a sensor hub 806 is further provided on the processor 801. The sensor hub 806 is a device or system for managing and processing data of multiple sensors. It can integrate various different types of sensors and centrally process and analyze their output data. The sensor hub 806 may also store instructions and / or data, and the instructions and / or data may be run by the sensor hub 806, so that the electronic device 800 executes the methods described in the above method embodiments. For example, execute as Figure 3A 、 Figure 4A and Figure 4B and Figure 6 the communication method of adjusting the message scan window described above.

[0170] The memory 802 may store instructions / data thereon, and the instructions may be run on the processor, so that the electronic device 800 executes the methods described in the above method embodiments. Optionally, data may also be stored in the memory.

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

[0172] The various embodiments disclosed in the present 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.

[0173] In some cases, the disclosed embodiments can be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments can be implemented as instructions carried or stored on one or more transient or non-transient machine-readable (e.g., computer-readable) storage media, which can be read and executed by one or more processors. For example, the instructions can be distributed via a network or via other computer-readable media. Thus, machine-readable media can include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including but not limited to, floppy disks, optical disks, optical discs, magneto-optical discs, read-only memory (ROM), random-access memory (RAM), erasable programmable read-only memory, electrically erasable programmable read-only memory, magnetic or optical cards, flash memory, or tangible machine-readable memories for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) in the form of electrical, optical, acoustic, or other propagated signals using the Internet. Thus, machine-readable media includes any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).

[0174] In the 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 ordering may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. Additionally, the inclusion of a structural or method feature in a particular figure does not imply that such a feature is required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

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

[0176] It should be noted that in the examples and the description of this patent, relational terms such as first and second are only 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 term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "including one" does not exclude the presence of additional identical elements in the process, method, article or device including the said element. Although the present application has been illustrated and described by reference to certain preferred embodiments thereof, those of ordinary skill in the art should understand that various changes can be made 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 is adjusted, 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, wherein Also including: Based on clock drift accuracies of the Bluetooth devices 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 meets a first accuracy condition.

3. The method according to claim 1, wherein The 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 maximum scan period among the scan periods of the first Bluetooth device and the 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 the first scan adjustment message sent by the first Bluetooth device in the Bluetooth mesh network and adjusts the start time corresponding to the packet scan window to the first moment, where the start time of the packet scan window of the second Bluetooth device before adjustment is the 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 is adjusted, 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 information 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 the packet scan window of the second Bluetooth device in an S2 + j scan period meets 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 when the second Bluetooth device scans the fourth heartbeat message and the estimated second reception time tn for receiving the fourth heartbeat message; Adjust the start time of the message scan window for the (S2 + j + 1)-th scan cycle.

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, characterized in that, The adjustment of the start time of the message scan window for the (S2 + j + 1)-th scan cycle includes: Corresponding to the first reception time tm being earlier than the second reception time tn, advance the start time of the message scan window for the (S2 + j + 1)-th scan cycle by the first time interval; Corresponding to the first reception time tm being later than the second reception time tn, postpone the start time of the message scan window for the (S2 + j + 1)-th scan cycle by the first time interval.

10. The method according to claim 7, wherein The fourth heartbeat message is the first heartbeat message broadcast by the first Bluetooth device during multiple broadcast heartbeat messages in the (P1 + n)-th broadcast cycle.

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 message scan window as described in any one of claims 1 - 10.

12. A computer program product, characterized in that, The computer program product includes instructions that, when executed, cause a computer to execute the communication method for adjusting the message scan window as described in 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 message scan window as described in any one of claims 1 - 10.

Citation Information

Cited By

  • Communication method and device for adjusting packet scanning window

    WO2025156703A1