Communication method and device, equipment, chip and storage medium
By adjusting the scanning parameters of Bluetooth devices, the scanning windows of master and slave devices are aligned, solving the problems of packet loss and retransmission in Bluetooth communication, and improving the transmission success rate and resource utilization rate.
Patent Information
- Application Number
- CN202310659878.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-05
- Publication Date
- 2024-12-06
AI Technical Summary
During Bluetooth communication, the independent scanning behavior of the master and slave device leads to packet loss and retransmission of data packets, resulting in waste of air interface resources and power consumption.
By obtaining and adjusting the scanning parameters of the other party's device, the scanning windows of both parties are aligned, thereby ensuring the success rate of data transmission in more time periods and reducing invalid air-side interactions.
It improves the success rate of data transmission, saves air interface resources, optimizes user experience, and reduces power consumption.
Smart Images

Figure CN119095012A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a communication method, apparatus, device, chip and storage medium. Background Art
[0002] During Bluetooth communication, the master and slave devices must be at the same frequency at the same time to send and receive signals normally. Therefore, both parties need to negotiate a set of frequency hopping sequences to achieve the same frequency point at the same time point to send and receive signals. In order to obtain the frequency hopping sequence, the master and slave devices need to perform various types of scans regularly, such as channel scans, page scans, inquiry scans, etc. After the device enters the scanning state, it will not be able to receive data packets from the peer device.
[0003] In the prior art, the scanning behaviors of the master and slave devices are independent of each other. Therefore, it is possible that when one device is sending a data packet, the other device is in a scanning state. When this happens, packet loss and retransmission will occur, resulting in a waste of air interface resources and power consumption. Summary of the invention
[0004] The embodiments of the present application at least provide a communication method, apparatus, device, chip and storage medium.
[0005] The technical solution of this application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a communication method, applied to a first Bluetooth device, the method comprising: obtaining scanning parameters of a second Bluetooth device, the scanning parameters of the second Bluetooth device being used to configure the time domain position of a scanning window of the second Bluetooth device; adjusting the scanning parameters of the second Bluetooth device based on the scanning parameters of the first Bluetooth device so that multiple scanning windows of the second Bluetooth device are aligned with multiple scanning windows of the first Bluetooth device; and sending the adjusted scanning parameters of the second Bluetooth device to the second Bluetooth device.
[0007] In a second aspect, an embodiment of the present application provides a communication method, which is applied to a second Bluetooth device, the method comprising: receiving a target scanning parameter from a first Bluetooth device, the target scanning parameter aligning multiple scanning windows of the second Bluetooth device with multiple scanning windows of the first Bluetooth device; wherein the target scanning parameter is obtained by adjusting the scanning parameter of the second Bluetooth device based on the scanning parameter of the first Bluetooth device, and the scanning parameter is used to configure the time domain position of the scanning window; when the second Bluetooth device determines to adopt the target scanning parameter, the target scanning parameter is used for communication between the first Bluetooth device and the second Bluetooth device.
[0008] In a third aspect, an embodiment of the present application provides a communication device, which includes: an acquisition module, used to acquire scanning parameters of a second Bluetooth device, wherein the scanning parameters of the second Bluetooth device are used to configure the time domain position of a scanning window of the second Bluetooth device; an adjustment module, used to adjust the scanning parameters of the second Bluetooth device based on the scanning parameters of the device, so that multiple scanning windows of the second Bluetooth device are aligned with multiple scanning windows of the device; and a first sending module, used to send the adjusted scanning parameters of the second Bluetooth device to the second Bluetooth device.
[0009] In a fourth aspect, an embodiment of the present application provides a communication device, which includes: a first receiving module, used to receive target scanning parameters from a first Bluetooth device, the target scanning parameters aligning multiple scanning windows of the device with multiple scanning windows of the first Bluetooth device; wherein the target scanning parameters are obtained by adjusting the scanning parameters of the device based on the scanning parameters of the first Bluetooth device, and the scanning parameters are used to configure the time domain position of the scanning window; when the device determines to adopt the target scanning parameters, the target scanning parameters are used for communication between the first Bluetooth device and the device.
[0010] In a fifth aspect, an embodiment of the present application provides a communication device, which includes a memory and a processor; wherein the memory is used to store computer-executable instructions; the processor is connected to the memory and is used to implement the method described in the first aspect or the second aspect by executing the computer-executable instructions.
[0011] In a sixth aspect, an embodiment of the present application provides a chip, which includes: a processor, configured to call and run a computer program from a memory, so that a device equipped with the chip executes the method described in the first aspect or the second aspect.
[0012] In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by at least one processor, it implements the method described in the first aspect or the second aspect.
[0013] In an embodiment of the present application, the first Bluetooth device can obtain the scanning parameters of the second Bluetooth device, and adjust the scanning parameters of the second Bluetooth device based on the scanning parameters of the first Bluetooth device, so that multiple scanning windows of the second Bluetooth device are aligned with multiple scanning windows of the first Bluetooth device. Then, the first Bluetooth device can send the adjusted scanning parameters of the second Bluetooth device to the second Bluetooth device. By aligning the multiple scanning windows of the first Bluetooth device and the second Bluetooth device, the method ensures that both devices can successfully complete data transmission through the air interface in more time periods, thereby improving the success rate of data transmission, reducing invalid air interface interactions, and saving air interface resources.
[0014] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.
[0016] Figure 1 A schematic diagram of an example of data transmission between Bluetooth master and slave devices;
[0017] Figure 2 A flow chart of a communication method provided in an embodiment of the present application;
[0018] Figure 3 A schematic diagram of an example of scanning parameters of an embodiment of the present application;
[0019] Figure 4 This is a schematic diagram of an example of adjusting the scanning period of the second Bluetooth device according to an embodiment of the present application;
[0020] Figure 5 Another schematic diagram of scanning parameters according to an embodiment of the present application;
[0021] Figure 6 A schematic diagram of aligning the first scanning windows of the master and slave devices according to an embodiment of the present application;
[0022] Figure 7 This is a schematic diagram of an example of adjusting the scanning period of a slave device according to an embodiment of the present application;
[0023] Figure 8 A schematic diagram of the operation of the master and slave devices according to the adjusted scanning parameters;
[0024] Fig. 9 A schematic diagram of the structure of a communication device provided in an embodiment of the present application;
[0025] Fig.10 A schematic diagram of the structure of another communication device provided in an embodiment of the present application;
[0026] Fig.11 A schematic diagram of a hardware entity of a communication device in an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.
[0028] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meaning as those commonly understood by those skilled in the art of the present application. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0029] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict. It should also be noted that the terms "first\second\third" involved in the embodiments of the present application are only used to distinguish similar objects and do not represent a specific ordering of the objects. It is understandable that "first\second\third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0030] It should be understood that the term "and / or" in the embodiments of the present application is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0031] Bluetooth is a low-power communication solution that works in the 2.4G unlicensed channel of Industrial Scientific Medical (ISM). The types of devices that also work in this unlicensed frequency band include, for example, cordless phones, microwave ovens, Wireless Fidelity (WiFi) devices, and some wireless cameras. In order to reduce the interference of other 2.4G frequency band devices on Bluetooth communication, Bluetooth devices can adopt a frequency hopping mechanism, that is, each interaction uses a different frequency. In the actual communication process of Bluetooth, the transmitting device and the receiving device must be at the same frequency at the same time to receive the signal normally. Taking the two communicating parties as a mobile phone and a True Wireless Stereo (TWS) headset as an example, when the mobile phone and the TWS headset are connected and play songs, both parties need to jump to the same frequency according to the same set of principles to work, that is, negotiate a set of frequency hopping sequences (map), and then both parties can use the same frequency to send and receive signals at the same time according to the frequency hopping sequence.
[0032] In order to obtain the frequency hopping sequence, the Bluetooth master and slave devices (master and slave) need to perform various types of scans regularly, such as channel scans, paging scans, inquiry scans, etc. After the device enters the scanning state, it will not be able to receive data packets from the peer device. As an example, the master and slave devices need to perform channel scans regularly to evaluate the channel quality, and the master and slave devices may send signals to the peer device when the peer device is performing channel scanning. At this time, the peer device cannot receive the signal normally because it is in the channel scanning state, thereby affecting the behavior of both parties. As another example, in order to quickly scan the surrounding connectable Bluetooth devices and quickly pair them, the master and slave devices need to perform paging scans or inquiry scans regularly. Similarly, the master and slave devices may send signals to the peer device when the peer device is performing paging scans or inquiry scans, thereby affecting the behavior of both parties.
[0033] Figure 1 The figure is a schematic diagram of data transmission between Bluetooth master and slave devices. T represents the behavior of the master device sending data (data packet) to the slave device, RT represents the behavior of the master device resending (retransmitting) data to the slave device, and R represents the behavior of the slave device sending (replying) confirmation information (ACK packet) to the master device. Figure 1 In the figure, the shaded part indicates that after sending corresponding data to the peer device, the peer device fails to receive the data or cannot receive the data normally.
[0034] like Figure 1 As shown, in the first transmission between the master and slave devices, both parties are in a normal sending and receiving state, so there is no problem of packet loss and retransmission. When the master device sends a data packet to the slave device for the second time, the slave device is in a paging scan or inquiry scan state. Since the slave device does not notify the master device when it is in this state, the master device is not clear about the status of the slave device. Therefore, the master device still sends data to the slave device within the preset time slice, and at this time the slave device will inevitably lose the packet and cannot reply with an ACK packet to the master device. Then, the master device retransmits the data to the slave device again. At this time, the slave device is still in a paging scan or inquiry scan state, and cannot reply with an ACK packet to the master device and cause packet loss. The transmission is successful only when the master device sends data to the slave device again within the preset time slice. Similarly, the master device may also be in a scanning state when the slave device replies to the master device for confirmation or the slave device sends data to the master device. As shown in Figure 1 As shown in the figure, when the master device is in the channel scanning state, it cannot normally receive the data packet of the slave device. At this time, the master and slave devices need to interact or retransmit again to successfully transmit. It can be seen that since the scanning behaviors of the master and slave devices are independent of each other, or in other words, due to the independent scanning states of the master and slave devices, a large number of invalid air interface interactions are caused, thereby wasting air interface resources and power consumption.
[0035] In other words, in the existing technology and protocol, there is no standardization and interaction of scanning parameter information between the master and slave devices, which leads to the scanning behaviors of each device running independently of each other. In this way, if the data is sent and happens to hit the scanning window of the other device, it will cause packet loss and retransmission, resulting in a waste of air interface resources and power consumption, which greatly affects the user experience.
[0036] In view of this, the embodiments of the present application provide a communication method, apparatus, device, chip and storage medium. In the method, the first Bluetooth device can obtain the scanning parameters of the second Bluetooth device, and adjust the scanning parameters of the second Bluetooth device based on the scanning parameters of the first Bluetooth device, so that multiple scanning windows of the second Bluetooth device are aligned with multiple scanning windows of the first Bluetooth device. Then, the first Bluetooth device can send the adjusted scanning parameters of the second Bluetooth device to the second Bluetooth device. By aligning the multiple scanning windows of the first Bluetooth device and the second Bluetooth device, the method ensures that the two devices can successfully complete data transmission through the air interface in more time periods, thereby improving the success rate of data transmission, reducing invalid air interface interactions, and saving air interface resources.
[0037] To facilitate understanding of the technical solutions of the embodiments of the present application, the technical solutions of the present application are described in detail below through specific embodiments. The above related technologies can be combined arbitrarily with the technical solutions of the embodiments of the present application as optional solutions, and they all belong to the protection scope of the embodiments of the present application. The embodiments of the present application include at least part of the following contents.
[0038] In an embodiment of the present application, the first Bluetooth device may be used as a master device (Bluetooth master device) in Bluetooth communication, and the second Bluetooth device may be used as a slave device (Bluetooth slave device) in Bluetooth communication. It should be noted that the embodiment of the present application does not limit the specific forms of the first Bluetooth device and the second Bluetooth device. As an example, the first Bluetooth device may be a mobile phone, and the second Bluetooth device may be a TWS headset.
[0039] Figure 2 A communication method provided by an embodiment of the present application is shown. The method may include:
[0040] S201: A first Bluetooth device obtains scanning parameters of a second Bluetooth device.
[0041] Among them, the scanning parameters can be used to configure and / or describe the time domain position of the scanning window. For example, the scanning parameters of the second Bluetooth device can be used to configure and / or describe the time domain position of the scanning window of the second Bluetooth device; for another example, the scanning parameters of the first Bluetooth device can be used to configure and / or describe the time domain position of the scanning window of the first Bluetooth device. In the embodiment of the present application, the scanning parameters can also be referred to as scanning parameter configuration or scanning parameter configuration information.
[0042] As an example, the scanning parameters may include at least one of the following: a scanning period; a start time of a scanning window; and a duration of a scanning window.
[0043] The scanning period refers to the duration between the start time (or end time) of two adjacent scanning windows. The scanning period can also be called the scanning interval, scanning window period or scanning window interval. The start time of the scanning window refers to the start time (time point) of a single scanning window. The duration of the scanning window refers to the duration of a single scanning window. The relationship between the scanning period, the start time of the scanning window and the duration of the scanning window is as follows: Figure 3 shown.
[0044] It should be noted that the scanning window in the embodiment of the present application can be, for example, a scanning window corresponding to any of the following scanning types / scanning behaviors: paging scanning; inquiry scanning; Bluetooth Low Energy (BLE) scanning; and channel scanning.
[0045] In some embodiments, the first Bluetooth device obtains the scanning parameters of the second Bluetooth device, including: sending a request message to the second Bluetooth device, where the request message is used to request the scanning parameters of the second Bluetooth device; and receiving the scanning parameters of the second Bluetooth device from the second Bluetooth device.
[0046] That is to say, in order to obtain the scanning parameters of the second Bluetooth device, the first Bluetooth device may send a request message to the second Bluetooth device, and correspondingly, the second Bluetooth device may receive the request message from the first Bluetooth device. The request message may be used to request the scanning parameters of the second Bluetooth device, or in other words, the purpose of the first Bluetooth device sending the request message is to inquire the second Bluetooth device about the scanning parameters. After receiving the request message, the second Bluetooth device may send the scanning parameters of the second Bluetooth device to the first Bluetooth device. For example, the second Bluetooth device may reply to the first Bluetooth device with its own scanning parameters in the next time slot after receiving the request message.
[0047] S202: The first Bluetooth device adjusts the scanning parameters of the second Bluetooth device based on the scanning parameters of the first Bluetooth device, so that multiple scanning windows of the second Bluetooth device are aligned with multiple scanning windows of the first Bluetooth device.
[0048] For ease of explanation, the adjusted scanning parameters of the second Bluetooth device are hereinafter referred to as target scanning parameters. That is, the target scanning parameters are obtained by adjusting the scanning parameters of the second Bluetooth device based on the scanning parameters of the first Bluetooth device, and the target scanning parameters can align multiple scanning windows of the second Bluetooth device with multiple scanning windows of the first Bluetooth device. For example, if the first Bluetooth device adjusts the scanning period and the starting time of the scanning window of the second Bluetooth device, the target scanning parameters include the adjusted scanning period and the starting time of the adjusted scanning window.
[0049] It should be noted that after the first Bluetooth device obtains the scanning parameters of the second Bluetooth device, the scanning parameters of the second Bluetooth device are adjusted, which may include the following two situations. The first situation: the first Bluetooth device may adjust all the scanning parameters of the acquired scanning parameters of the second Bluetooth device. In this case, the adjusted scanning parameters of the second Bluetooth device may include all the adjusted scanning parameters. The second situation: the first Bluetooth device may adjust some of the scanning parameters of the acquired scanning parameters of the second Bluetooth device. In this case, the adjusted scanning parameters of the second Bluetooth device may include scanning parameters that have been actually adjusted and scanning parameters that have not been actually adjusted; or, may include scanning parameters that have been actually adjusted.
[0050] In some embodiments, the target scan parameter can be used for communication / data transmission between the first Bluetooth device and the second Bluetooth device, or in other words, the first Bluetooth device can communicate / data transmission with the second Bluetooth device based on the target scan parameter. For example, when the second Bluetooth device determines to adopt the target scan parameter, the target scan parameter can be used for communication between the first Bluetooth device and the second Bluetooth device.
[0051] It should be noted that the scanning window alignment in the embodiment of the present application refers to the alignment of the scanning windows in the time domain, for example, the alignment of the start time of the scanning windows.
[0052] In one possible manner, the scanning parameters include a scanning period and a starting time of a scanning window. In this case, based on the scanning parameters of the first Bluetooth device, the scanning parameters of the second Bluetooth device are adjusted so that multiple scanning windows of the second Bluetooth device are aligned with multiple scanning windows of the first Bluetooth device, including: based on the scanning period of the first Bluetooth device, the scanning period of the second Bluetooth device is adjusted so that the starting time of multiple scanning windows of the second Bluetooth device is aligned with the starting time of multiple scanning windows of the first Bluetooth device. In other words, in order to align the multiple scanning windows of the second Bluetooth device with the multiple scanning windows of the first Bluetooth device, the scanning period of the second Bluetooth device can be adjusted based on the scanning period of the first Bluetooth device so that the starting time of multiple scanning windows of the second Bluetooth device is aligned with the starting time of multiple scanning windows of the first Bluetooth device.
[0053] For ease of understanding, the scanning period of the first Bluetooth device is T 1 , the scanning period of the second Bluetooth device is T 2 Taking the example of FIG. 1 as an example, a possible implementation method for adjusting the scanning period of the second Bluetooth device is introduced:
[0054] In one possible case (denoted as case 1), T 1 and T 2 The difference between them does not exceed the threshold range. At this time, T 2 Adjust to T 1 In another possible case (denoted as case 2), T 1 and T 2 The difference between them exceeds the threshold range. At this time, T 2 Adjust to T 3 , so that at the first moment, the start time of the scanning window of the first Bluetooth device and the second Bluetooth device are aligned, wherein the first moment is aligned with T 1 Related to the common multiples of T3.
[0055] Among them, T 1 and T 2 The difference between them does not exceed the threshold range, which can also be understood as T 1 and T 2 The difference between them falls within the numerical range corresponding to the threshold range, or it can also be understood that T 1 and T 2 The absolute value of the difference between is less than the upper limit of the value range. For example, assuming the threshold range is T 1 (or T 2 ), then, T 1 and T 2 The difference between them does not exceed T 1 (or T 2 ) ±10%, it can also be understood that T 1 and T 2 The difference between them falls on T 1 (or T 2 ), or it can also be understood as T 1 and T 2 The absolute value of the difference between them is less than T 1 (or T 2 ) of 10%.
[0056] The above situation 1 and situation 2 are further explained below.
[0057] Case 1: At T 1 and T 2If the difference between the two values does not exceed the threshold range, T 2 Adjust to T 1 .
[0058] It is understandable that if T 1 and T 2 If the difference between the values does not exceed the threshold range, it means that the scanning period of the first Bluetooth device and the scanning period of the second Bluetooth device are close. In this case, the scanning period of the second Bluetooth device can be adjusted to be equal to the scanning period of the first Bluetooth device. In this way, each scanning window of the first Bluetooth device and each scanning window of the second Bluetooth device can be aligned one by one. As an implementation method, T 2 Adjust to T 1 After that, the start time of each scanning window of the first Bluetooth device and the start time of each scanning window of the second Bluetooth device can be aligned one by one by translating the scanning window of the second Bluetooth device. 2 Before making the adjustment, the start time of one of the scanning windows of the second Bluetooth device is aligned with the start time of one of the scanning windows of the first Bluetooth device, and then T 2 Adjust to T 1 , so that the starting time of each scanning window of the first Bluetooth device and the starting time of each scanning window of the second Bluetooth device are aligned one by one.
[0059] Case 2: At T 1 and T 2 If the difference between the two exceeds the threshold, T 2 Adjust to T3, so that at the first moment, the start time of the scanning window of the first Bluetooth device and the second Bluetooth device is aligned, wherein the first moment is aligned with T 1 and T 3 The common multiples of .
[0060] It is understandable that if T 1 and T 2 If the difference between the two exceeds the threshold range, it means that the scanning period of the first Bluetooth device is significantly different from the scanning period of the second Bluetooth device. In this case, if T 2 Adjust to T 1 , will cause a significant change in the scanning window of the second Bluetooth device, thereby affecting the stability of the system. 1 and T 2 If the difference between the two exceeds the threshold range, T 2 Adjust to T 3 In some embodiments, T 3 With T 1The difference between them is controlled within a certain range to avoid causing a large change to the scanning window of the second Bluetooth device.
[0061] For example, T 3 The value of should satisfy the following conditions: 2 Adjust to T 3 After that, the start time of the scanning window of the first Bluetooth device and the second Bluetooth device can be aligned at the first moment, wherein the first moment is aligned with T 1 and T 3 The common multiples (or least common multiples) of .
[0062] For example, suppose T 1 =3, T 3 = 2, the start time of the first aligned scan window is t. In this case, T 1 and T 3 The lowest common multiple of is 6, so T 1 and T 3 The common multiple of can be expressed as 6N, where N is a positive integer. For this case, the first moment (e.g., t 1 ) can be, for example, the time corresponding to t+6N, that is, when t 1 When it is equal to t+6, t+12, t+18, ..., the starting time of the scanning window of the first Bluetooth device and the second Bluetooth device can be aligned.
[0063] As an example, Figure 4 FIG. 4 shows the position of each scanning window in the time domain after the scanning period of the second Bluetooth device is adjusted in the above manner. Figure 4 As shown, assuming T 1 =3, T 3 =2, t = 0, then, t 1 It can be 6, 12, 18..., that is, when t 1 When the time is equal to 6, 12, 18, ..., the start time of the scanning window of the first Bluetooth device and the start time of the scanning window of the second Bluetooth device can be aligned.
[0064] According to the method of this embodiment, when the first Bluetooth device adjusts the scanning period of the second Bluetooth device, different adjustment strategies can be adopted based on the degree of difference between the scanning periods of the first Bluetooth device and the second Bluetooth device. In this way, the scanning windows of the first Bluetooth device and the second Bluetooth device can be aligned as much as possible while ensuring that the scanning window changes before and after the adjustment are small, thereby saving air interface resources while avoiding affecting the stability of the system.
[0065] In some embodiments, based on the scanning period of the first Bluetooth device, the scanning period of the second Bluetooth device is adjusted so that the starting time of multiple scanning windows of the second Bluetooth device is aligned with the starting time of multiple scanning windows of the first Bluetooth device, including: aligning the starting time of one scanning window of the second Bluetooth device with the starting time of one scanning window of the first Bluetooth device, and adjusting the scanning period of the second Bluetooth device based on the scanning period of the first Bluetooth device so that the starting time of other multiple scanning windows of the second Bluetooth device is aligned with the starting time of other multiple scanning windows of the first Bluetooth device.
[0066] That is, in order to align the start times of the multiple scanning windows of the second Bluetooth device with the start times of the multiple scanning windows of the first Bluetooth device, before adjusting the scanning period of the second Bluetooth device, the start time of one of the scanning windows of the second Bluetooth device (such as the first scanning window) may be aligned with the start time of one of the scanning windows of the first Bluetooth device (such as the first scanning window), and then, on this basis, the scanning period T of the second Bluetooth device may be adjusted. 2 Adjustments are made so that the start time of the other multiple scanning windows of the second Bluetooth device is aligned with the start time of the other multiple scanning windows of the first Bluetooth device. Exemplarily, when the start time of the scanning windows is aligned, for example, the alignment can be performed in a manner such that the scanning window of the second Bluetooth device is aligned to the scanning window of the first Bluetooth device.
[0067] It should be noted that the number of second Bluetooth devices in the embodiment of the present application can be one or more, and the embodiment of the present application is not limited to this. For ease of explanation, the above only takes one second Bluetooth device as an example to introduce the method of adjusting the scanning parameters of the second Bluetooth device. It should be understood that when there are multiple second Bluetooth devices, the scanning parameters of each second Bluetooth device can also be adjusted by the same or similar method mentioned above.
[0068] It should also be noted that the first Bluetooth device and the second Bluetooth device may also have multiple scan types / scan behaviors at the same time. For example, two or more scan types / scan behaviors among paging scan, inquiry scan, BLE scan and channel scan may exist at the same time. When multiple scan types / scan behaviors exist at the same time, the first Bluetooth device may use the above-mentioned method of aligning scan windows to align the scan windows corresponding to the same scan type / scan behavior.
[0069] According to the method of this embodiment, by aligning multiple scanning windows of the first Bluetooth device and the second Bluetooth device, it is ensured that both devices can successfully complete data transmission through the air interface in more time periods, thereby improving the success rate of data transmission, reducing invalid air interface interactions, and saving air interface resources.
[0070] S203: The first Bluetooth device sends the adjusted scanning parameters (target scanning parameters) of the second Bluetooth device to the second Bluetooth device.
[0071] Accordingly, the second Bluetooth device may receive the target scan parameter from the first Bluetooth device. When the second Bluetooth device determines to adopt the target scan parameter, the target scan parameter may be used for communication between the first Bluetooth device and the second Bluetooth device.
[0072] In some embodiments, the method may further include: the first Bluetooth device sending an effective time to the second Bluetooth device. The effective time may be used to indicate a time when the second Bluetooth device enables the target scanning parameter.
[0073] As an implementation method, the effective time can be specified by the first Bluetooth device, so that when the second Bluetooth device determines to adopt the target scanning parameters, the second Bluetooth device can enable the target scanning parameters at the effective time. The second Bluetooth device determines to adopt the target scanning parameters, which can also be understood as the second Bluetooth device agrees to operate according to the target scanning parameters. Correspondingly, if the second Bluetooth device determines not to adopt the target scanning parameters, it means that the second Bluetooth device does not obey the target scanning parameters, or in other words, the second Bluetooth device does not agree to operate according to the target scanning parameters, but uses its own default scanning parameters to operate.
[0074] It should be noted that the target scanning parameters and the effective time can be carried by the same information (for example, recorded as scanning parameter setting information), or can be carried by two separate messages, which is not limited in this embodiment of the present application.
[0075] It should also be noted that in some scenarios, the first Bluetooth device may not need to send the effective time to the second Bluetooth device. In this case, as an implementation, after receiving the target scanning parameter from the first Bluetooth device, the second Bluetooth device may automatically enable the target scanning parameter by default.
[0076] In some embodiments, the method may further include: the second Bluetooth device sends indication information to the first Bluetooth device, where the indication information is used to indicate whether the second Bluetooth device determines to adopt the target scanning parameter.
[0077] Exemplarily, the second Bluetooth device may, for example, reply to the first Bluetooth device with the indication information in the next time slot after receiving the target scan parameters and the effective time from the first Bluetooth device. The indication information may, for example, include an indication of successful setting or failed setting. Successful setting indicates that the second Bluetooth device determines to adopt the target scan parameters, in which case the second Bluetooth device will enable the target scan parameters at the effective time; failed setting indicates that the second Bluetooth device determines not to adopt the target scan parameters, in which case the second Bluetooth device will continue to operate with its own default scan parameters.
[0078] In some embodiments, the first Bluetooth device is a Bluetooth master device, the second Bluetooth device is a Bluetooth slave device, and the scanning parameters include the duration of the scanning window. The method may also include: the first Bluetooth device determines a first time period occupied by the scanning window of the first Bluetooth device based on the scanning parameters of the first Bluetooth device, and determines a second time period occupied by the scanning window of the second Bluetooth device based on the target scanning parameters; and communicates with the second Bluetooth device at a time other than the first time period and the second time period.
[0079] As an implementation method, after receiving the indication information from the second Bluetooth device, the first Bluetooth device can learn whether the second Bluetooth device has determined to use the target scanning parameters based on the indication information. Then, when learning that the second Bluetooth device has determined to use the target scanning parameters, the first Bluetooth device can calculate the time period (second time period) occupied by the scanning window of the second Bluetooth device based on the target scanning parameters, and can calculate the time period (first time period) occupied by the scanning window of the first Bluetooth device itself based on the scanning parameters of the first Bluetooth device itself. Then, the first Bluetooth device can communicate with the second Bluetooth device at a time other than the first time period and the second time period. In other words, the first Bluetooth device can avoid its own scanning window and the scanning window of the second Bluetooth device to communicate with the second Bluetooth device, thereby improving the success rate of data transmission during the communication process, avoiding invalid air interface interaction, and saving power consumption.
[0080] In some embodiments, the scanning parameters include the duration of the scanning window, and the method may also include: determining a first time period occupied by the scanning window of the first Bluetooth device based on the scanning parameters of the first Bluetooth device, and determining a second time period occupied by the scanning window of the second Bluetooth device based on the target scanning parameters; within the second time period, and outside the first time period, using the first Bluetooth device for wireless fidelity (WiFi) communication.
[0081] Currently, WiFi (WiFi 2.4G) and Bluetooth use the same hardware access, so WiFi will not be available when Bluetooth is occupied. To this end, in an embodiment of the present application, when the first Bluetooth device knows the time period (second time period) occupied by the scanning window of the second Bluetooth device, since the second time period cannot be used for normal Bluetooth communication, the first Bluetooth device can use the first Bluetooth device for WiFi communication within the second time period and in addition to the first time period. In this way, the hardware access can be given to WiFi, thereby improving the throughput of WiFi communication and reducing latency. In other words, the time for the first Bluetooth device to use WiFi communication can be set within the time period occupied by the scanning window of the second Bluetooth device, and at the same time, the time for the first Bluetooth device to use WiFi communication needs to avoid the time period occupied by the scanning window of the first Bluetooth device itself.
[0082] Combination of the above Figure 2 A communication method provided by an embodiment of the present application is introduced. To facilitate understanding of the embodiment of the present application, a possible implementation process of the communication method provided by an embodiment of the present application is introduced below, taking the first Bluetooth device as a Bluetooth master device (hereinafter referred to as the master device) and the second Bluetooth device as a Bluetooth slave device (hereinafter referred to as the slave device) as an example. The implementation process may include:
[0083] Step 1: The master device obtains the scanning parameter configuration information of the slave device.
[0084] In this step, the master and slave devices may first scan parameter configuration information interactively through the Link Management Protocol (LMP) when establishing a Bluetooth connection.
[0085] Exemplarily, in the process of establishing a connection between the master device and the slave device, the master device may first send a scan parameter request message (e.g., recorded as LMP_scan_config_req, corresponding to the request message in the aforementioned embodiment) to the slave device, with the purpose of the master device asking the slave device for scan parameter configuration information. After the slave device receives the scan parameter request message of the master device, it may reply to the master device with its own scan parameter configuration information (e.g., recorded as LMP_scan_config_resp) in the next time slot, and the scan parameter configuration information includes the start time, window time, and cycle time of at least one scan behavior of the slave device. For example, the scan parameter configuration information may include the start time, window time, and cycle time of one or more scan behaviors shown in Table 1. As shown in Table 1, the scan behavior may include, for example, paging scan, inquiry scan, BLE scan, and channel scan.
[0086] Table 1 Scan parameter configuration information
[0087] Scanning behavior Starting time Window time Cycle time Page Scan Tps_s Tps_w Tps_c Query Scan Tis_s Tis_w Tis_c BLE Scanning Tbs_s Tbs_w Tbs_c Channel Scan Tcs_s Tcs_w Tcs_c
[0088] The start time indicates the start time (time point) of a single scanning window; the window time indicates the duration of a single scanning window; the cycle time is the scanning cycle (scanning window cycle) in the aforementioned embodiment, which indicates the duration between the start time or end time of two adjacent scanning windows. As an example, Figure 5 An example schematic diagram of scanning parameters of the paging scan, inquiry scan and BLE scan of the slave device is shown.
[0089] Step 2: The master device adjusts the scanning parameter configuration of the slave device based on the scanning parameter configuration of the master device.
[0090] After the master device receives the scanning parameter configuration information of the slave device, it can compare and calculate the scanning parameter configuration of the slave device with its own (master device) scanning parameter configuration, and adjust the scanning window of the slave device to maximize the alignment of the scanning windows of the master and slave devices.
[0091] Exemplarily, the alignment method may be performed according to the following steps 21) and 22):
[0092] 21) Compare the starting times of various scanning behaviors of the master and slave devices, and then align the starting times of the first scanning windows of the master and slave devices. When aligning the starting times, for example, all slave devices can be aligned to the master device, such as Figure 6 shown.
[0093] 22) Adjust the scanning window period (or interval) of the slave device.
[0094] One possible situation is that when the scanning window period of the slave device and the scanning window period of the master device are at a comparable level, or in other words, when the difference between the scanning window period of the slave device and the scanning window period of the master device does not exceed a threshold range (such as the difference is within ±10%), the scanning window period of the slave device and the scanning window period of the master device are adjusted to be the same.
[0095] Another possible situation is that when the scanning window period of the slave device and the scanning window period of the master device are not at the same level, or when the difference between the scanning window period of the slave device and the scanning window period of the master device exceeds the threshold range (such as the difference value exceeds ±10%), the scanning window period of the slave device is fine-tuned so that the integer scanning windows are aligned (for example, the time point of the least common multiple is taken).
[0096] For example, assume that the scanning window period of the master device is T 1 , the scanning window period of the slave device is T 2 , then, if T 1 and T2 If the difference between them exceeds the threshold range, T 2 For example, you can adjust T 2 Adjust to T 3 , so that the start time of the scanning window of the master and slave devices is aligned at the first moment, where the first moment is aligned with T 1 and T 3 Taking paging scanning as an example, the position of the scanning window after adjusting the scanning period of the slave device is as follows: Figure 7 shown.
[0097] Step 3: The master device sends the adjusted scanning parameters of the slave device to the slave device.
[0098] After adjusting the scanning parameters of the slave device according to the method in step 2, the adjusted scanning parameters can be sent to the slave device through the master device, and take effect after the slave device responds.
[0099] As an implementation method, the master device may send scanning parameter setting information (e.g., LMP_scan_config_set) to the slave device, with the purpose of the master device sending scanning parameters and configuration setting information to the slave device. In addition to the parameter information of each scanning behavior, the scanning parameter setting information may also include the time point Te when it takes effect (corresponding to the effective time in the above embodiment), indicating that the master and slave devices operate according to the latest negotiated scanning parameters (i.e., the adjusted scanning parameters) at the time point Te.
[0100] Table 2 shows an example of scanning parameter setting information, which includes the adjusted scanning parameters of the slave device (agreed scanning parameters) and the agreed effective time.
[0101] Table 2 Scan parameter setting information
[0102] Scanning behavior Agreed start time Agreed window time Agreed cycle time Agreed effective time Page Scan Tps_s Tps_w Tps_c Tps_e Query Scan Tis_s Tis_w Tis_c Tis_e BLE Scanning Tbs_s Tbs_w Tbs_c Tbs_e Channel Scan Tcs_s Tcs_w Tcs_c Tcs_e
[0103] It should be noted that the agreed start time in Table 2 may, for example, only include the agreed start time of the first scanning window corresponding to the scanning behavior, or may also include the agreed start time of each scanning window corresponding to the scanning behavior, which is not limited in the embodiment of the present application.
[0104] After receiving the scanning parameter setting information of the master device, the slave device may reply to the master device in the next time slot with information on whether the slave device is successfully set (for example, LMP_scan_config_set_resp), which may include an indication of successful setting or failed setting. Among them, successful setting means that the slave device will run according to the scanning parameters agreed upon by the master device, or in other words, the slave device determines to use the adjusted scanning parameters; failed setting means that the slave device does not obey the agreement of the master device, or in other words, the slave device determines not to use the adjusted scanning parameters, but uses its own default scanning parameters to run.
[0105] Through the operations of steps 1 to 3 above, the scanning windows of the master and slave devices are aligned as much as possible, thereby reducing the waste of air interfaces caused by the scanning behaviors of the master and slave devices occupying the air interfaces.
[0106] Figure 8 This is a schematic diagram of the operation of the master and slave devices according to the adjusted scanning parameters. Figure 8 As shown, the interaction between the master and slave devices can use more air interface time, thereby improving the success rate of transmission and optimizing the user experience. In addition, unlike the traditional solution, even if the scanning windows of the master and slave devices are not completely aligned, the master device can know the time period occupied by the scanning window of the slave device, so the master device can avoid sending data packets to the slave device during this time period to avoid data transmission failure.
[0107] It should be noted that when the master device is a mobile phone, since the mobile phone WiFi 2.4G and Bluetooth use the same hardware path, WiFi 2.4G cannot be used when Bluetooth is occupied. Therefore, in some embodiments, if the master device (mobile phone) knows the time period occupied by the scanning window of the slave device, it can actively give up the hardware path to WiFi 2.4G during this time period, thereby improving the throughput of WiFi 2.4G and reducing the latency. Figure 8 As shown, during the time period when the slave device performs BLE scanning, the master device can actively give up the hardware path to WiFi 2.4G (corresponding to Figure 8 The method can achieve significant benefits on the mobile phone side.
[0108] In one possible approach, the master device may also put the hardware into a sleep state during the time period occupied by the scan window of the slave device to further reduce power consumption. Figure 8 In this case, the master device can enter idle time when the slave device is performing an inquiry scan and put the hardware to sleep during this period.
[0109] According to the above implementation process, the solution of the embodiment of the present application can achieve the following functions:
[0110] When multiple devices are connected via Bluetooth, the scanning parameter information can be exchanged through LMP, so that the master device can reset the scanning parameters of each device based on the scanning parameter information of each device to ensure that the scanning windows of each device are aligned as much as possible. After that, each device can operate according to the renegotiated scanning parameters. Furthermore, after the master and slave devices know the scanning parameter information of the slave device, they can interact with the slave device when the slave device is idle, thereby avoiding invalid air interface interaction and improving air interface efficiency. In addition, the master device can allocate hardware resources more efficiently on the premise of knowing the scanning window of the slave device, thereby reducing power consumption, while improving the throughput of WiFi 2.4G and reducing latency.
[0111] The method of the embodiment of the present application standardizes the scanning behavior of the master and slave devices, aligns the scanning windows of the master and slave devices to the greatest extent, thereby saving air interface resources. The advantages brought by this method include:
[0112] 1) The Bluetooth master service is allocated more air interface resources, which improves the success rate of outgoing transmission. When the master and slave devices are mobile phones and TWS headphones respectively, the user's Bluetooth listening experience is optimized.
[0113] 2) The master device (such as a mobile phone) can know the scanning window of the slave device (such as a TWS headset), so it can avoid the scanning window and send data packets to the slave device, thereby reducing the sending of invalid data packets and saving power consumption.
[0114] 3) When the main device is a mobile phone, the mobile phone can more efficiently give up the hardware path to WiFi 2.4G, thereby improving the throughput of WiFi 2.4G and reducing latency.
[0115] The preferred embodiments of the present application are described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the specific details in the above embodiments. Within the technical concept of the present application, the technical solution of the present application can be subjected to a variety of simple modifications, and these simple modifications all belong to the protection scope of the present application. For example, the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present application will not further explain various possible combinations. For another example, the various different embodiments of the present application can also be arbitrarily combined, as long as they do not violate the idea of the present application, they should also be regarded as the contents disclosed in the present application. For another example, under the premise of no conflict, the various embodiments and / or the technical features in the various embodiments described in the present application can be arbitrarily combined with the prior art, and the technical solution obtained after the combination should also fall within the protection scope of the present application.
[0116] Based on the foregoing embodiments, the embodiments of the present application provide corresponding communication devices.
[0117] Fig. 9 FIG. 9 shows a structure of a communication device 900 provided in an embodiment of the present application. Fig. 9 As shown, the apparatus 900 may include:
[0118] An acquisition module 901 is used to acquire scanning parameters of a second Bluetooth device, where the scanning parameters of the second Bluetooth device are used to configure the time domain position of a scanning window of the second Bluetooth device; an adjustment module 902 is used to adjust the scanning parameters of the second Bluetooth device based on the scanning parameters of the device 900, so that multiple scanning windows of the second Bluetooth device and multiple scanning windows of the device 900 are aligned; a first sending module 903 is used to send the adjusted scanning parameters of the second Bluetooth device to the second Bluetooth device.
[0119] In some embodiments, the scanning parameters include a scanning period and a starting time of a scanning window; the adjustment module 902 is specifically used to: based on the scanning period of the device 900, adjust the scanning period of the second Bluetooth device so that the starting time of multiple scanning windows of the second Bluetooth device is aligned with the starting time of multiple scanning windows of the device 900.
[0120] In some embodiments, the scanning period of the apparatus 900 is T 1 , the scanning period of the second Bluetooth device is T 2 ; Adjustment module 902, specifically used for: in T 1 and T 2 If the difference between the two values does not exceed the threshold range, T 2 Adjust to T 1 ; in T 1 and T 2 If the difference between the two exceeds the threshold, T 2 Adjust to T 3 , so that at the first moment, the start time of the scanning window of the apparatus 900 and the second Bluetooth device are aligned, wherein the first moment is aligned with T 1 and T 3 The common multiples of .
[0121] In some embodiments, the scanning parameters also include the starting time of the scanning window; the adjustment module 902 is specifically used to: align the starting time of one of the scanning windows of the second Bluetooth device with the starting time of one of the scanning windows of the device 900, and adjust the scanning period of the second Bluetooth device based on the scanning period of the device 900, so that the starting time of other multiple scanning windows of the second Bluetooth device is aligned with the starting time of other multiple scanning windows of the device 900.
[0122] In some embodiments, the apparatus 900 further includes: a second sending module, configured to send an effective time to a second Bluetooth device, wherein the effective time is used to indicate a time when the second Bluetooth device enables target scanning parameters; wherein the target scanning parameters are the adjusted scanning parameters of the second Bluetooth device.
[0123] In some embodiments, the apparatus 900 further includes: a receiving module, configured to receive indication information from a second Bluetooth device, where the indication information is used to indicate whether the second Bluetooth device determines to adopt the target scanning parameter.
[0124] In some embodiments, the first Bluetooth device is a Bluetooth master device, the second Bluetooth device is a Bluetooth slave device, the scanning parameters include the duration of the scanning window, and the device 900 also includes: a first determination module, used to determine a first time period occupied by the scanning window of the device 900 based on the scanning parameters of the device 900, and to determine a second time period occupied by the scanning window of the second Bluetooth device based on the adjusted scanning parameters of the second Bluetooth device; and a first communication module, used to communicate with the second Bluetooth device at a time other than the first time period and the second time period.
[0125] In some embodiments, the scanning parameters include the duration of the scanning window, and the device 900 also includes: a second determination module, used to determine a first time period occupied by the scanning window of the device 900 based on the scanning parameters of the device 900, and to determine a second time period occupied by the scanning window of the second Bluetooth device based on the adjusted scanning parameters of the second Bluetooth device; a second communication module, used to use the device 900 for wireless fidelity communication within the second time period and in a time other than the first time period.
[0126] In some embodiments, the scanning window is a scanning window corresponding to any one of the following scanning types: paging scanning; inquiry scanning; Bluetooth low energy scanning; and channel scanning.
[0127] Fig.10 FIG. 1 shows the composition structure of another communication device 1000 provided in an embodiment of the present application. Fig.10 As shown, the apparatus 1000 may include:
[0128] The first receiving module 1001 is used to receive target scanning parameters from the first Bluetooth device, and the target scanning parameters align multiple scanning windows of the device 1000 with multiple scanning windows of the first Bluetooth device; wherein the target scanning parameters are obtained by adjusting the scanning parameters of the device 1000 based on the scanning parameters of the first Bluetooth device, and the scanning parameters are used to configure the time domain position of the scanning window; when the device 1000 determines to adopt the target scanning parameters, the target scanning parameters are used for communication between the first Bluetooth device and the device 1000.
[0129] In some embodiments, the apparatus 1000 further includes: a second receiving module for receiving an effective time from the first Bluetooth device; and an enabling module for enabling the target scanning parameter at the effective time when it is determined to adopt the target scanning parameter.
[0130] In some embodiments, the apparatus 1000 further includes: a first sending module, configured to send indication information to the first Bluetooth device, wherein the indication information is used to indicate whether the apparatus 1000 determines to adopt the target scanning parameter.
[0131] In some embodiments, the device 1000 also includes: a third receiving module, used to receive a request message from the first Bluetooth device before receiving the target scanning parameters from the first Bluetooth device, the request information being used to request the scanning parameters of the device 1000; and a second sending module, used to send the scanning parameters of the device 1000 to the first Bluetooth device.
[0132] In some embodiments, the scanning window is a scanning window corresponding to any one of the following scanning types: paging scanning; inquiry scanning; Bluetooth low energy scanning; and channel scanning.
[0133] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. In some embodiments, the functions or modules included in the device provided in the embodiment of the present application can be used to execute the method described in the above method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.
[0134] It should be noted that in the embodiment of the present application, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific hardware, software or firmware, or any combination of hardware, software, and firmware.
[0135] An embodiment of the present application also provides a communication device, including a memory and a processor, wherein the memory stores a computer program that can be executed on the processor, and when the processor executes the program, some or all of the steps in the above method are implemented.
[0136] The embodiment of the present application further provides a chip, which includes: a processor, which is used to call and run a computer program from a memory, so that a device equipped with the chip executes some or all of the steps in the above method.
[0137] The embodiment of the present application also provides another chip, which includes a processor and a communication interface, and the processor reads instructions stored in the memory through the communication interface to implement some or all of the steps in the above method. In some embodiments, as an implementation method, the chip also includes a memory, in which a computer program or instruction is stored, and the processor is used to execute the computer program or instruction stored in the memory. When the computer program or instruction is executed, the processor is used to execute some or all of the steps in the above method.
[0138] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, some or all of the steps in the above method are implemented. The computer-readable storage medium can be transient or non-transient.
[0139] An embodiment of the present application also provides a computer program, including a computer-readable code. When the computer-readable code is executed in a device (such as a first Bluetooth device; or a second Bluetooth device), a processor in the device executes some or all of the steps in the above method.
[0140] The present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is read and executed by a computer, some or all of the steps in the above method are implemented. The computer program product can be implemented specifically by hardware, software, or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium, and in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK), etc.
[0141] It should be noted here that the description of the various embodiments above tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. The description of the above device, storage medium, computer program and computer program product embodiments is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the embodiments of the device, storage medium, computer program and computer program product of this application, please refer to the description of the method embodiment of this application for understanding.
[0142] Fig.11This is a hardware entity diagram of a communication device in an embodiment of the present application. The communication device may be a first Bluetooth device or a second Bluetooth device. Fig.11 The communication device 1100 shown includes a processor 1110, and the processor 1110 can call and run a computer program from a memory to implement the method in the embodiment of the present application.
[0143] In some embodiments, Fig.11 As shown, the communication device 1100 may further include a memory 1120. The processor 1110 may call and run a computer program from the memory 1120 to implement the method in the embodiment of the present application. The memory 1120 may be a separate device independent of the processor 1110, or may be integrated in the processor 1110.
[0144] In some embodiments, Fig.11 As shown, the communication device 1100 may further include a transceiver 1130, and the processor 1110 may control the transceiver 1130 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 1130 may include a transmitter and a receiver. The transceiver 1130 may further include an antenna, and the number of antennas may be one or more.
[0145] In some embodiments, the communication device 1100 may specifically be the first Bluetooth device of the embodiment of the present application, and the communication device 1100 may implement the corresponding processes implemented by the first Bluetooth device in each method of the embodiment of the present application, which will not be described here for the sake of brevity.
[0146] In some embodiments, the communication device 1100 may specifically be the second Bluetooth device of the embodiment of the present application, and the communication device 1100 may implement the corresponding processes implemented by the second Bluetooth device in each method of the embodiment of the present application, which will not be described here for the sake of brevity.
[0147] It should be understood that "one embodiment", "an embodiment" or "some embodiments" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment", "in an embodiment" or "in some embodiments" appearing throughout the specification may not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the serial number of each step / process mentioned above does not mean the order of execution, and the execution order of each step / process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The serial numbers of the embodiments of the present application mentioned above are for description only and do not represent the advantages and disadvantages of the embodiments.
[0148] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are 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 explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0149] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units or modules is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0150] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0151] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0152] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.
[0153] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0154] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A communication method, characterized in that: Applied to a first Bluetooth device, the method includes: Acquire a scanning parameter of the second Bluetooth device, where the scanning parameter of the second Bluetooth device is used to configure a time domain position of a scanning window of the second Bluetooth device; Based on the scanning parameters of the first Bluetooth device, adjusting the scanning parameters of the second Bluetooth device so that multiple scanning windows of the second Bluetooth device are aligned with multiple scanning windows of the first Bluetooth device; Send the adjusted scanning parameters of the second Bluetooth device to the second Bluetooth device.
2. The method according to claim 1, characterized in that The scanning parameters include a scanning period and a start time of a scanning window; and adjusting the scanning parameters of the second Bluetooth device based on the scanning parameters of the first Bluetooth device so that multiple scanning windows of the second Bluetooth device are aligned with multiple scanning windows of the first Bluetooth device, including: Based on the scanning period of the first Bluetooth device, the scanning period of the second Bluetooth device is adjusted so that the start times of the multiple scanning windows of the second Bluetooth device are aligned with the start times of the multiple scanning windows of the first Bluetooth device.
3. The method according to claim 2, characterized in that The scanning period of the first Bluetooth device is T1, and the scanning period of the second Bluetooth device is T2; and adjusting the scanning period of the second Bluetooth device based on the scanning period of the first Bluetooth device includes: When the difference between T1 and T2 does not exceed the threshold range, T2 is adjusted to T1; When the difference between T1 and T2 exceeds a threshold range, T2 is adjusted to T3 so that at a first moment, the start moments of the scanning windows of the first Bluetooth device and the second Bluetooth device are aligned, wherein the first moment is related to a common multiple of T1 and T3.
4. The method according to claim 2 or 3, characterized in that: The step of adjusting the scanning period of the second Bluetooth device based on the scanning period of the first Bluetooth device so that the starting time of multiple scanning windows of the second Bluetooth device is aligned with the starting time of multiple scanning windows of the first Bluetooth device includes: The starting time of one scanning window of the second Bluetooth device is aligned with the starting time of one scanning window of the first Bluetooth device, and the scanning period of the second Bluetooth device is adjusted based on the scanning period of the first Bluetooth device, so that the starting time of other multiple scanning windows of the second Bluetooth device is aligned with the starting time of other multiple scanning windows of the first Bluetooth device.
5. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Sending an effective time to the second Bluetooth device, where the effective time is used to indicate a time when the second Bluetooth device enables a target scanning parameter; wherein the target scanning parameter is an adjusted scanning parameter of the second Bluetooth device.
6. The method according to claim 5, characterized in that The method further comprises: Indication information is received from the second Bluetooth device, where the indication information is used to indicate whether the second Bluetooth device determines to adopt the target scanning parameter.
7. The method according to any one of claims 1 to 3, characterized in that The first Bluetooth device is a Bluetooth master device, the second Bluetooth device is a Bluetooth slave device, the scanning parameter includes a duration of a scanning window, and the method further includes: Determine a first time period occupied by a scanning window of the first Bluetooth device based on the scanning parameters of the first Bluetooth device, and determine a second time period occupied by a scanning window of the second Bluetooth device based on the adjusted scanning parameters of the second Bluetooth device; Communicate with the second Bluetooth device at a time other than the first time period and the second time period.
8. The method according to any one of claims 1 to 3, characterized in that The scanning parameters include a duration of a scanning window, and the method further includes: Determine a first time period occupied by a scanning window of the first Bluetooth device based on the scanning parameters of the first Bluetooth device, and determine a second time period occupied by a scanning window of the second Bluetooth device based on the adjusted scanning parameters of the second Bluetooth device; During the second time period and except the first time period, the first Bluetooth device is used for Wi-Fi communication.
9. The method according to any one of claims 1 to 3, characterized in that The scanning window is a scanning window corresponding to any of the following scanning types: Paging scan; inquiry scan; Bluetooth low energy scan; and channel scan.
10. A method of communication, characterized in that: Applied to a second Bluetooth device, the method comprises: receiving a target scan parameter from a first Bluetooth device, wherein the target scan parameter aligns a plurality of scan windows of the second Bluetooth device with a plurality of scan windows of the first Bluetooth device; Among them, the target scanning parameters are obtained by adjusting the scanning parameters of the second Bluetooth device based on the scanning parameters of the first Bluetooth device, and the scanning parameters are used to configure the time domain position of the scanning window; when the second Bluetooth device determines to adopt the target scanning parameters, the target scanning parameters are used for communication between the first Bluetooth device and the second Bluetooth device.
11. The method according to claim 10, characterized in that The method further comprises: Receiving an effective time from the first Bluetooth device; In the case where it is determined to adopt the target scanning parameter, the target scanning parameter is enabled at the effective time.
12. The method according to claim 11, characterized in that The method further comprises: Sending indication information to the first Bluetooth device, where the indication information is used to indicate whether the second Bluetooth device determines to adopt the target scanning parameter.
13. The method according to any one of claims 10 to 12, characterized in that Before receiving the target scanning parameter from the first Bluetooth device, the method further includes: receiving a request message from the first Bluetooth device, wherein the request message is used to request a scanning parameter of the second Bluetooth device; Sending the scanning parameters of the second Bluetooth device to the first Bluetooth device.
14. The method according to any one of claims 10 to 12, characterized in that The scanning window is a scanning window corresponding to any of the following scanning types: Paging scan; inquiry scan; Bluetooth low energy scan; and channel scan.
15. A communication device, characterized in that: The device comprises: An acquisition module, used to acquire a scanning parameter of a second Bluetooth device, where the scanning parameter of the second Bluetooth device is used to configure a time domain position of a scanning window of the second Bluetooth device; an adjustment module, configured to adjust the scanning parameters of the second Bluetooth device based on the scanning parameters of the apparatus, so that the multiple scanning windows of the second Bluetooth device are aligned with the multiple scanning windows of the apparatus; The first sending module is used to send the adjusted scanning parameters of the second Bluetooth device to the second Bluetooth device.
16. A communication device, characterized in that: The device comprises: A first receiving module, configured to receive a target scanning parameter from a first Bluetooth device, wherein the target scanning parameter aligns multiple scanning windows of the apparatus with multiple scanning windows of the first Bluetooth device; Among them, the target scanning parameters are obtained by adjusting the scanning parameters of the device based on the scanning parameters of the first Bluetooth device, and the scanning parameters are used to configure the time domain position of the scanning window; when the device determines to adopt the target scanning parameters, the target scanning parameters are used for communication between the first Bluetooth device and the device.
17. A communication device, characterized in that: The communication device comprises: A memory for storing computer executable instructions; A processor, connected to the memory, for implementing the method of any one of claims 1 to 9, or implementing the method of any one of claims 10 to 14 by executing the computer executable instructions.
18. A chip, characterized in that: The chip comprises: A processor, configured to call and run a computer program from a memory, so that a device equipped with the chip executes the method described in any one of claims 1 to 9, or executes the method described in any one of claims 10 to 14.
19. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by at least one processor, the method according to any one of claims 1 to 9 is implemented, or the method according to any one of claims 10 to 14 is implemented.
