A Bluetooth multi-connection conflict handling method based on connection interval optimization
By adjusting the connection interval of Bluetooth devices, conflict problems caused by the same or multiple relationships in multiple devices are solved, a more stable communication environment is achieved, and the connection quality and efficiency are improved.
Patent Information
- Application Number
- CN202410949309.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-07-16
AI Technical Summary
In multi-device connection scenarios, connection conflicts caused by using connection parameters of the same or multiple relationships affect the quality of Bluetooth communication, resulting in decreased communication interference between devices and connection stability.
By adjusting the connection interval between devices, calculate the conflict-free target connection interval, ensure that the connection interval of each device is not the same as that of other devices or is an integer multiple, dynamically adjust the connection interval to avoid conflicts, and use an optimization strategy to allocate the initial Connection intervals and monitor connection status, reallocating intervals to reduce interference.
It effectively reduces communication interference between devices, improves connection stability, reduces the risk of abnormal connection disconnection, and improves communication efficiency and user experience.
Smart Images

Figure CN118510072B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of Bluetooth communication, and in particular relates to a Bluetooth multi-connection conflict processing method and system based on connection interval optimization. Background Art
[0002] A BLE Bluetooth chip usually has only one radio frequency module (RF) to send and receive wireless signals, and it can achieve multiple connections through time division multiple access (TDMA) technology. When communicating, the BLE Bluetooth chip will allocate a connection interval (Connection Interval) for each connection. This interval is the time window for communication between devices. When communicating with a device, RF will occupy a period of time, and the rest of the time, it can switch to communicate with other devices. In their respective connection intervals, each connection takes turns using RF to communicate, thereby achieving multiple connections.
[0003] When two or more devices need to communicate at the same time, for example, if there are three, the BLE Bluetooth protocol stack will communicate with only one of the devices based on priority, and the other two devices will not be able to communicate. Since Bluetooth communication is performed at each connection interval and has very high timing accuracy requirements, even if the RF is idle after the previous device completes the communication, the communication timing of the other two devices has passed, making the two devices unable to communicate, affecting the communication quality of Bluetooth multi-connection. Summary of the invention
[0004] In view of this, the present invention provides a Bluetooth multi-connection conflict handling method and system based on connection interval optimization, which can solve the connection conflict problem that is easily caused by using the same or multiple connection parameters in a multi-device connection scenario, and is specifically implemented by the following technical solution.
[0005] In a first aspect, the present invention provides a method for handling Bluetooth multi-connection conflicts based on connection interval optimization, comprising the following steps:
[0006] Establish a Bluetooth connection that includes multiple device connection events;
[0007] Obtain a first connection interval corresponding to a start time of a to-be-connected event of a first device and a start time of a connected event adjacent to the to-be-connected event, and obtain a second connection interval of a second device, wherein a Bluetooth connection time point of the second device is later than a Bluetooth connection time point of the first device;
[0008] adjusting the first connection interval and the second connection interval, and calculating a non-conflicting target connection interval when it is determined that the first connection interval and the second connection interval meet a conflict condition, wherein the conflict condition includes that the first connection interval is the same as the second connection interval or the first connection interval and the second connection interval are integer multiples;
[0009] The target connection interval is updated to the second device to complete the connection interval optimization.
[0010] As a preferred embodiment of the above technical solution, obtaining a first connection interval corresponding to a start time of a to-be-connected event of a first device and a start time of a connected event adjacent to the to-be-connected event, and obtaining a second connection interval of a second device includes:
[0011] When the first device establishes a connection, if it is determined that the first connection interval satisfies a first validity condition and a second validity condition, the first connection interval is updated to the first device.
[0012] Among them, the first validity condition includes that the first connection interval and the first threshold are not integer multiples, and the difference between the first connection interval and the first threshold is greater than or equal to a second threshold, and the second validity condition includes that the first connection interval and the third threshold are not integer multiples.
[0013] As a preferred embodiment of the above technical solution, when the second device establishes a connection, if it is determined that the second connection interval satisfies the third validity condition, the fourth validity condition and the fifth validity condition, the second connection interval is updated to the second device;
[0014] Among them, the third valid condition includes that the second connection interval is not an integer multiple of the first threshold, and the difference between the second connection interval and the first threshold is greater than or equal to the second threshold, the fourth valid condition includes that the second connection interval is not an integer multiple of the third threshold, and the fifth valid condition includes traversing the connection intervals of connected devices and ensuring that the second connection interval is not an integer multiple of the connection interval of the connected devices, and the difference between the second connection interval and the connection interval of the connected devices is greater than or equal to the second threshold.
[0015] As a preferred embodiment of the above technical solution, when at least one of the first valid condition, the second valid condition, the third valid condition, the fourth valid condition or the fifth valid condition is not met, the first connection interval or the second connection interval is increased by a preset connection interval value and re-judged until all valid conditions are met, and the connection interval at this time is updated to the corresponding device.
[0016] As a preferred embodiment of the above technical solution, the second threshold, the first threshold and the third threshold are increased successively, and the preset connection interval value is less than the second threshold.
[0017] As a preferred embodiment of the above technical solution, the first threshold is 7.5 ms, the second threshold is 5 ms, the third threshold is 10 ms, and the preset connection interval value is 1.25 ms.
[0018] As a preferred embodiment of the above technical solution, adjusting the first connection interval and the second connection interval, and determining that the first connection interval and the second connection interval meet a conflict condition, includes:
[0019] Obtaining a request instruction for updating a target connection interval of the second device;
[0020] Determining whether the target connection interval conflicts with the first connection interval;
[0021] If so, reject the update, and determine the previous connection interval corresponding to the target connection interval for connection;
[0022] If not, agree to update the target connection interval.
[0023] As a preferred embodiment of the above technical solution, when the first connection interval and the second connection interval are the same or an integer multiple of each other, the connection event is occupied by the first device, the connection events corresponding to the first device and the second device collide, and the second device times out and disconnects.
[0024] In a second aspect, the present invention further provides a Bluetooth multi-connection conflict handling system based on connection interval optimization, comprising:
[0025] A Bluetooth connection establishing unit, used to establish a Bluetooth connection including multiple device connection events;
[0026] A connection interval acquisition unit, configured to acquire a first connection interval corresponding to a start time of a to-be-connected event of a first device and a start time of a connected event adjacent to the to-be-connected event, and acquire a second connection interval of a second device, wherein a Bluetooth connection time point of the second device is later than a Bluetooth connection time point of the first device;
[0027] a conflict condition determination unit, configured to adjust the first connection interval and the second connection interval, and when determining that the first connection interval and the second connection interval satisfy a conflict condition, calculate a non-conflicting target connection interval, wherein the conflict condition includes that the first connection interval is the same as the second connection interval or that the first connection interval and the second connection interval are integer multiples;
[0028] A connection interval optimization unit is used to update the target connection interval to the second device to complete the connection interval optimization.
[0029] In the third aspect, the present invention also provides a computer-readable storage medium, characterized in that the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the steps of the above-mentioned Bluetooth multi-connection conflict handling method based on connection interval optimization.
[0030] The present invention provides a Bluetooth multi-connection conflict processing method and system based on connection interval optimization, by establishing a Bluetooth connection including multiple device connection events, obtaining a first connection interval corresponding to the start time of a to-be-connected event of a first device and the start time of a connected event adjacent to the to-be-connected event, and obtaining a second connection interval of a second device, adjusting the first connection interval and the second connection interval, and when it is determined that the first connection interval and the second connection interval meet a conflict condition, calculating a conflict-free target connection interval, and updating the target connection interval to the second device to complete the connection interval optimization, by allocating an initial connection interval to each device, dynamically adjusting the connection interval according to a connection interval adjustment strategy, monitoring the connection status between devices and reallocating the connection interval when a connection conflict is detected, the present invention can effectively reduce communication interference between devices and improve connection stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0032] Figure 1 A schematic diagram of the prior art of using RF for communication in a time-sharing manner;
[0033] Figure 2 It is a flow chart of a Bluetooth multi-connection conflict handling method based on connection interval optimization of the present invention;
[0034] Figure 3 It is a principle diagram of a communication abnormality of a device when the first connection interval and the second connection interval are the same according to the present invention;
[0035] Figure 4 It is a principle diagram of a communication abnormality of a device when the first connection interval and the second connection interval are integer multiples of the present invention;
[0036] Figure 5A schematic diagram of adjusting the first connection interval and the second connection interval to make communication normal according to the present invention;
[0037] Figure 6 It is a structural block diagram of the Bluetooth multi-connection conflict processing system based on connection interval optimization of the present invention. DETAILED DESCRIPTION
[0038] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0039] See also Figure 2 The present invention provides a Bluetooth multi-connection conflict processing method based on connection interval optimization, comprising the following steps:
[0040] S1: Establishing a Bluetooth connection including multiple device connection events;
[0041] S2: Obtain a first connection interval corresponding to a start time of a to-be-connected event of the first device and a start time of a connected event adjacent to the to-be-connected event, and obtain a second connection interval of the second device, wherein a Bluetooth connection time point of the second device is later than a Bluetooth connection time point of the first device;
[0042] S3: adjusting the first connection interval and the second connection interval, and calculating a non-conflicting target connection interval when it is determined that the first connection interval and the second connection interval meet a conflict condition, wherein the conflict condition includes that the first connection interval is the same as the second connection interval or the first connection interval and the second connection interval are integer multiples;
[0043] S4: Update the target connection interval to the second device to complete the connection interval optimization.
[0044] In this embodiment, refer to Figure 1 , Figure 1The horizontal axis can be time. Preferably, four devices use RF for communication. There will be an interval between each two devices, that is, a time window for communication between devices. Each device can generate a connection event using RF. The start time of the connected event is earlier than the start time of the event to be connected. The connection intervals for each device to establish a connection can be the same or different. The first device is recorded as device 1, the second device is recorded as 2, and so on. When device 1 completes the connection to device 2 to establish a connection, RF will be idle. Each device uses RF to work with RF. When two or more devices need to communicate at the same time point, for example, there are three, then the BLE Bluetooth protocol stack will communicate with only one of the devices according to the priority, and the other two devices will not be able to communicate. Since Bluetooth communication is carried out at each connection interval and the timing accuracy requirements are very high, even if the RF is idle after the previous device completes the communication, the communication timing of the other two devices has also been completed, so that two devices will not be able to communicate. When the connection intervals of multiple devices are the same, or the connection intervals are multiples, it is possible that multiple devices need to communicate at the same time point, resulting in communication anomalies in some devices. In other words, when the first connection interval and the second connection interval are the same or an integer multiple of each other, the connection event is occupied by the first device, the connection events corresponding to the first device and the second device collide, and the second device times out and disconnects.
[0045] It should be noted that the device in the present invention may be a terminal device with Bluetooth function, and the terminal devices may perform data transmission, operation control, etc. via Bluetooth. Figure 3 , when multiple connections are in progress, when the connection intervals of device 1 and device 2 are the same (for example, both are 100ms), the connection events of these two devices may collide. Since RF can only communicate with one device at a time, when RF is communicating with device 1, device 2 will not be able to communicate. In each subsequent connection event, device 2 will collide with device 1. For example, in event 2, event 3, event 4, and event n, RF will be occupied by device 1, and device 2 will not be able to communicate normally. This will cause device 2 to time out and disconnect, affecting the stability of the connection. See Figure 4In the case of multiple connections, when the connection intervals of device 1 and device 2 are in a multiple relationship (for example, device 1 is 50ms and device 2 is 200ms), the connection events of these two devices may collide. Since RF can only communicate with one device at a time, when RF is communicating with device 1, device 2 will not be able to communicate. In each subsequent connection event (event in the figure), device 2 will collide with device 1. For example, in event 1, event 5, and event n, RF will be occupied by device 1, and device 2 will not be able to communicate normally. This will cause device 2 to time out and disconnect, affecting the stability of the connection. For the above figures and abnormal situations in the figures, after the connection is established, a connection interval without collision will be assigned to each device. This connection interval will ensure that RF has only one device that needs to communicate at the same time.
[0046] It should be understood that adjusting the first connection interval and the second connection interval, and judging whether the first connection interval and the second connection interval meet the conflict condition, includes: obtaining a request instruction for updating the target connection interval of the second device; judging whether the target connection interval conflicts with the first connection interval; if so, refusing to update, and determining the previous connection interval corresponding to the target connection interval for connection; if not, agreeing to update the target connection interval. By establishing a Bluetooth connection including multiple device connection events, obtaining the first connection interval corresponding to the start time of the to-be-connected event of the first device and the start time of the connected event adjacent to the to-be-connected event, and obtaining the second connection interval of the second device, adjusting the first connection interval and the second connection interval, and judging that the first connection interval and the second connection interval meet the conflict condition, calculating the conflict-free target connection interval, and updating the target connection interval to the second device to complete the connection interval optimization, by allocating an initial connection interval to each device, and dynamically adjusting the connection interval according to the connection interval adjustment strategy, monitoring the connection status between devices and reallocating the connection interval when a connection conflict is detected, the present invention can effectively reduce communication interference between devices and improve connection stability.
[0047] Optionally, obtaining a first connection interval corresponding to a start time of a to-be-connected event of the first device and a start time of a connected event adjacent to the to-be-connected event, and obtaining a second connection interval of the second device includes:
[0048] When the first device establishes a connection, if it is determined that the first connection interval satisfies a first validity condition and a second validity condition, updating the first connection interval to the first device;
[0049] Among them, the first validity condition includes that the first connection interval and the first threshold are not integer multiples, and the difference between the first connection interval and the first threshold is greater than or equal to a second threshold, and the second validity condition includes that the first connection interval and the third threshold are not integer multiples.
[0050] In this embodiment, when the second device establishes a connection, if it is determined that the second connection interval satisfies the third valid condition, the fourth valid condition and the fifth valid condition, the second connection interval is updated to the second device; wherein the third valid condition includes that the second connection interval is not an integer multiple of the first threshold, and the difference between the second connection interval and the first threshold is greater than or equal to the second threshold, the fourth valid condition includes that the second connection interval is not an integer multiple of the third threshold, and the fifth valid condition includes traversing the connection intervals of the connected devices and ensuring that the second connection interval is not an integer multiple of the connection interval of the connected device, and the difference between the second connection interval and the connection interval of the connected device is greater than or equal to the second threshold. The second threshold, the first threshold and the third threshold increase in sequence, and the preset connection interval value is less than the second threshold, the first threshold is 7.5ms, the second threshold is 5ms, the third threshold is 10ms, and the preset connection interval value is 1.25ms. The delay caused by the collision of connection events is reduced, and the communication delay is reduced.
[0051] It should be noted that when at least one of the first valid condition, the second valid condition, the third valid condition, the fourth valid condition or the fifth valid condition is not met, the first connection interval or the second connection interval is increased by a preset connection interval value and re-judged until all valid conditions are met, and the connection interval at this time is updated to the corresponding device. Each time a device is connected, the interval that can be used by the connected device is calculated and then updated to the device. For example, if the device that needs to be connected is device 2, adjusting the connection interval of device 2 requires the following four conditions to be met:
[0052] The difference between the connection interval and the existing device needs to be greater than 5ms. For example, the connection interval difference is 5ms. This time is the minimum time required for RF to switch to different devices for communication, and the time required for the previous device to communicate. It is given based on actual conditions.
[0053] The connection interval with the existing device cannot be a multiple relationship. If the connection interval is a multiple, the connection events will overlap;
[0054] It cannot be an integer multiple of 10ms. When the connection is just started, the connection interval is determined by the host. Generally, the host uses a multiple of 10ms. Therefore, multiples of 10 are not used here to avoid collisions with newly connected devices.
[0055] It cannot be an integer multiple of 7.5ms, and the difference from 7.5ms is greater than 5ms. When the Android system connects to the discovery service, it generally switches to 7.5ms. Therefore, multiples of 7.5 are not used here to avoid collisions with newly connected devices.
[0056] Among them, according to the new connection interval newInterval, the algorithm will make the following three judgments on newInterval. Only when these three conditions are met at the same time, this newInterval is valid. The corresponding algorithm process is as follows:
[0057] a. newInterval and 7.5ms are not integer multiples, and the difference is at least 5ms;
[0058] b. newInterval and 10ms are not integer multiples;
[0059] c. Traverse the connection intervals of other connected devices to ensure that newInterval is not an integer multiple of the connection intervals of other devices and the difference is at least 5ms.
[0060] If any of the above conditions a, b, and c are not met, newInterval will increase by 1.25ms, and the above three conditions will be re-executed until all conditions are met. This means that there is no collision between newInterval and other devices, and this connection interval can be updated to the device. This algorithm can adapt to a variety of connection intervals and has good adaptability to scenarios where multiple devices are connected. At the same time, the algorithm has good scalability and can cope with more connected devices. This algorithm is not only applicable to BLE systems, but can also be extended to other time division multiple access systems.
[0061] In addition, assuming that the connection interval of all devices is expected to be based on 40ms, when establishing connections one by one, different connection intervals will be allocated to each device, as follows:
[0062] 1. The first device to establish a connection, since it is currently connected to only one device, only needs to execute steps a and b of the "algorithm process" to calculate an ideal connection interval, and then update it to device 1;
[0063] 2. The second device to establish a connection needs to execute steps a, b, and c of the "algorithm flow" to calculate an ideal connection interval, and then update it to device 2 because there are currently multiple devices connected;
[0064] 3. For subsequent connected devices, refer to the steps in point 2 to calculate the ideal connection interval and then update it.
[0065] In a feasible embodiment, for example, when there are four devices connected, all devices are based on 40ms. If all four devices use a 40ms connection interval, there will be an RF collision problem. After algorithm calculation, the actually allocated connection intervals are as follows: Device 1: 42.50ms; Device 2: 51.25ms; Device 3: 57.50ms; Device 4: 65.00ms.
[0066] In a feasible embodiment, for example, when four devices are connected, device 1 is based on 10ms, device 2 is based on 50ms, device 3 is based on 100ms, and device 4 is based on 200ms. If the connection intervals of these devices are multiples, there will be an RF collision problem. After the algorithm calculation, the actual allocated connection intervals are as follows: device 1: 12.5ms; device 2: 57.5ms; device 3: 111.25ms; device 4: 207.5ms. By reasonably allocating the connection intervals, the RF resources are effectively utilized and the resource utilization rate is improved.
[0067] See also Figure 5 , when two devices are connected and a connection interval of 40ms is required, the algorithm will allocate 42.5ms to device 1 and 51.25ms to device 2. 51.25-42.5=8.75, the difference between the two connection intervals is greater than 5; 51.25 / 42.5=1.20, the two connection intervals are not integer multiples; 51.25 / 10=5.125, the connection interval of device 2 is not an integer multiple of 10; 42.50 / 10=4.250, the connection interval of device 1 is not an integer multiple of 10; 51.25 / 7.5=6.83, the connection interval of device 2 is not an integer multiple of 7.5; 42.50 / 7.5=5.66, the connection interval of device 1 is not an integer multiple of 7.5; It can be seen from the above calculation process that after redistribution, there will be no collision problem in the connection interval. It effectively reduces the situation of abnormal connection disconnection and improves the user experience.
[0068] See also Figure 6 The present invention also provides a Bluetooth multi-connection conflict handling system based on connection interval optimization, comprising:
[0069] A Bluetooth connection establishing unit, used to establish a Bluetooth connection including multiple device connection events;
[0070] A connection interval acquisition unit, configured to acquire a first connection interval corresponding to a start time of a to-be-connected event of a first device and a start time of a connected event adjacent to the to-be-connected event, and acquire a second connection interval of a second device, wherein a Bluetooth connection time point of the second device is later than a Bluetooth connection time point of the first device;
[0071] a conflict condition determination unit, configured to adjust the first connection interval and the second connection interval, and when determining that the first connection interval and the second connection interval satisfy a conflict condition, calculate a non-conflicting target connection interval, wherein the conflict condition includes that the first connection interval is the same as the second connection interval or that the first connection interval and the second connection interval are integer multiples;
[0072] A connection interval optimization unit is used to update the target connection interval to the second device to complete the connection interval optimization.
[0073] In a feasible embodiment, the present invention also provides a computer-readable storage medium, characterized in that the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the steps of the above-mentioned Bluetooth multi-connection conflict handling method based on connection interval optimization.
[0074] The present invention establishes a Bluetooth connection including multiple device connection events, obtains a first connection interval corresponding to the start time of a to-be-connected event of the first device and the start time of a connected event adjacent to the to-be-connected event, obtains a second connection interval of the second device, adjusts the first connection interval and the second connection interval, and when it is determined that the first connection interval and the second connection interval meet a conflict condition, calculates a conflict-free target connection interval, and updates the target connection interval to the second device to complete connection interval optimization. By dynamically adjusting the connection interval, the situation where multiple devices occupy radio frequency resources at the same time is avoided, the stability of the connection is improved, the packet loss caused by the collision of connection events is avoided, and the retransmission is reduced, thereby improving the communication efficiency. The connection status can be monitored in real time, and the connection interval can be adjusted in time after a conflict is found to ensure a stable connection.
[0075] In all examples shown and described herein, any specific values should be interpreted as merely exemplary and not as limiting, and thus other examples of the exemplary embodiments may have different values.
[0076] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0077] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the present invention. It should be pointed out that for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.
Claims
1. A Bluetooth multi-connection conflict handling method based on connection interval optimization, It is characterized in that The following steps are involved: Establish a Bluetooth connection that includes multiple device connection events; Obtain a first connection interval corresponding to a start time of a to-be-connected event of a first device and a start time of a connected event adjacent to the to-be-connected event, and obtain a second connection interval of a second device, wherein a Bluetooth connection time point of the second device is later than a Bluetooth connection time point of the first device; adjusting the first connection interval and the second connection interval, and calculating a non-conflicting target connection interval when it is determined that the first connection interval and the second connection interval meet a conflict condition, wherein the conflict condition includes that the first connection interval is the same as the second connection interval or the first connection interval and the second connection interval are integer multiples; Updating the target connection interval to the second device to complete connection interval optimization; Acquiring a first connection interval corresponding to a start time of a to-be-connected event of a first device and a start time of a connected event adjacent to the to-be-connected event, and acquiring a second connection interval of a second device, including: When the first device establishes a connection, if it is determined that the first connection interval satisfies a first validity condition and a second validity condition, updating the first connection interval to the first device; Among them, the first validity condition includes that the first connection interval and the first threshold are not integer multiples, and the difference between the first connection interval and the first threshold is greater than or equal to the second threshold, and the second validity condition includes that the first connection interval and the third threshold are not integer multiples.
2. The method for handling Bluetooth multi-connection conflicts based on connection interval optimization according to claim 1, It is characterized in that Also includes: When the second device establishes a connection, if it is determined that the second connection interval satisfies the third validity condition, the fourth validity condition, and the fifth validity condition, updating the second connection interval to the second device; Among them, the third valid condition includes that the second connection interval is not an integer multiple of the first threshold, and the difference between the second connection interval and the first threshold is greater than or equal to the second threshold, the fourth valid condition includes that the second connection interval is not an integer multiple of the third threshold, and the fifth valid condition includes traversing the connection intervals of connected devices and ensuring that the second connection interval is not an integer multiple of the connection interval of the connected devices, and the difference between the second connection interval and the connection interval of the connected devices is greater than or equal to the second threshold.
3. The method for handling Bluetooth multi-connection conflicts based on connection interval optimization according to claim 2, It is characterized in that When at least one of the first valid condition, the second valid condition, the third valid condition, the fourth valid condition or the fifth valid condition is not met, the first connection interval or the second connection interval is increased by a preset connection interval value and re-judged until all valid conditions are met, and the connection interval at this time is updated to the corresponding device.
4. The method for handling Bluetooth multi-connection conflicts based on connection interval optimization according to claim 3, It is characterized in that The second threshold, the first threshold and the third threshold are increased in sequence, and the preset connection interval value is less than the second threshold.
5. The method for handling Bluetooth multi-connection conflicts based on connection interval optimization according to claim 4, It is characterized in that The first threshold is 7.5 ms, the second threshold is 5 ms, the third threshold is 10 ms, and the preset connection interval value is 1.25 ms.
6. The method for handling Bluetooth multi-connection conflicts based on connection interval optimization according to claim 1, It is characterized in that The first connection interval and the second connection interval are adjusted, and when it is determined that the first connection interval and the second connection interval meet a conflict condition, the method includes: Obtaining a request instruction for updating a target connection interval of the second device; Determining whether the target connection interval conflicts with the first connection interval; If so, reject the update, and determine the previous connection interval corresponding to the target connection interval for connection; If not, agree to update the target connection interval.
7. The method for handling Bluetooth multi-connection conflicts based on connection interval optimization according to claim 1, It is characterized in that When the first connection interval and the second connection interval are the same or an integral multiple of each other, the connection event is occupied by the first device, the connection events corresponding to the first device and the second device collide, and the second device times out and disconnects.
8. A Bluetooth multi-connection conflict handling system based on connection interval optimization according to the Bluetooth multi-connection conflict handling method based on connection interval optimization according to any one of claims 1 to 7, It is characterized in that include: A Bluetooth connection establishing unit, used to establish a Bluetooth connection including multiple device connection events; A connection interval acquisition unit, configured to acquire a first connection interval corresponding to a start time of a to-be-connected event of a first device and a start time of a connected event adjacent to the to-be-connected event, and acquire a second connection interval of a second device, wherein a Bluetooth connection time point of the second device is later than a Bluetooth connection time point of the first device; a conflict condition determination unit, configured to adjust the first connection interval and the second connection interval, and when determining that the first connection interval and the second connection interval satisfy a conflict condition, calculate a non-conflicting target connection interval, wherein the conflict condition includes that the first connection interval is the same as the second connection interval or that the first connection interval and the second connection interval are integer multiples; A connection interval optimization unit is used to update the target connection interval to the second device to complete the connection interval optimization.
9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the steps of the Bluetooth multi-connection conflict handling method based on connection interval optimization according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for dynamically adjusting BLE Bluetooth connection interval
CN105959040A
A Bluetooth connection interval dynamic adjustment method applied in an electrocardiograph
CN109104714A
Link processing method, link processing equipment and storage medium
CN110892748A
Bluetooth connection method and device and vehicle machine
CN112351404A
Method and device for establishing Bluetooth link, Bluetooth chip and equipment
CN115442778A
