A low-power Bluetooth multi-connection method, device and system
By determining the baseline connection cycle and event cycle in low-power Bluetooth, and allocating time slices, the problem of multi-connection timing management is solved, efficiency and real-time performance are improved, and the problems of low connection efficiency and response delay in the existing technology are solved.
Patent Information
- Application Number
- CN202111038347.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-06
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2041-09-06
AI Technical Summary
In low-power Bluetooth multi-connection scenarios, it is difficult for existing technology to efficiently manage the connection timing of multiple slave devices, resulting in low connection allocation efficiency. Especially when the number of connections is large, time conflicts and response delays are prone to occur.
By determining the baseline connection period and event period, the master device allocates time slices to each target link to ensure that the link intervals are the same and the starting time is an integer multiple. This enables multiple connections to share anchor points and time slices, reducing implementation difficulty and improving configuration. efficiency.
It significantly improves the configuration efficiency of low-power Bluetooth multi-connection, saves the connection allocation time slice of slave devices, reduces the difficulty of implementation, and improves the real-time performance of multi-connection.
Smart Images

Figure CN115767487B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of wireless communications, and in particular to a low-power Bluetooth multi-connection method, device, and system. Background Art
[0002] Bluetooth Low Energy (BLE) is a personal area network technology that enables short-range wireless communication with extremely low power consumption. During the Bluetooth connection process, a master-slave relationship is established. The slave device is discovered by broadcasting data packets, and the master device scans the broadcast signal to initiate the connection.
[0003] When the two parties establish a low-power Bluetooth connection, the time of establishing the connection determines the anchor point of the connection. In any time period sequentially intercepted with the anchor point as the starting point and the connection period (Tinterval) as the time interval, the two parties send and receive data at the start time of the time period and complete data transmission and reception before the end of the time period corresponding to the connection period.
[0004] In the related art, when a master device has multiple connections with multiple slave devices, complex calculations are required to arrange the timing of each connection to avoid conflicts between the connections. When the number of connections to be supported is large, the efficiency of allocating time slices for the connections corresponding to multiple slave devices is very low. Summary of the invention
[0005] The embodiments of the present application provide a low-power Bluetooth multi-connection method, device and system, which can save time in allocating time slices for connections corresponding to multiple slave devices and improve the configuration efficiency of low-power Bluetooth multi-connections.
[0006] To achieve the above purpose, the technical solution of the embodiment of the present application is implemented as follows:
[0007] In a first aspect, an embodiment of the present application provides a low-power Bluetooth multi-connection method, including:
[0008] The master device establishes a link connection with multiple slave devices based on Bluetooth through connection parameters, and determines the first cyclic order for each first target link in the link to obtain a first time slice; the connection parameters include a first reference connection period and a first event period; the connection period of each first target link is the first reference connection period, and the interval between the start times of any two first target links is an integer multiple of the first reference connection period; each first time slice corresponds to one first target link; the first time slice is the start time of the first first target link established by the master device, and after the first time slice is divided into multiple first cycle time periods with the first reference connection period as the interval length, the time period intercepted from the starting point of any first cycle time period is the first event period;
[0009] If the master device detects that any of the first target links should obtain the first time slice according to the first cyclic order, data is sent to the first slave device corresponding to any of the first target links, so that the slave device and the master device perform data transmission.
[0010] The low-power Bluetooth multi-connection method provided by the embodiment of the present application is that the master device establishes a link connection with multiple slave devices based on Bluetooth through connection parameters, and determines the first cyclic order for each first target link in the link to obtain the first time slice; the connection parameters include the first reference connection period and the first event period; the connection period of each first target link is the first reference connection period, and the interval between the start times of any two first target links is an integer multiple of the first reference connection period; each first time slice corresponds to a first target link; if the master device detects that any first target link should obtain the first time slice according to the first cyclic order, data is sent to the first slave device corresponding to any first target link, so that the slave device and the master device can perform data transmission. In this method, the connection intervals of some or all links are the same, and the intervals of the start times of the links are integer multiples of the connection intervals, thereby realizing multiple connections sharing anchor points and time slices, which can significantly reduce the difficulty of implementing low-power Bluetooth multi-connections, save the time of allocating time slices for connections corresponding to multiple slave devices, and improve the configuration efficiency of low-power Bluetooth multi-connections.
[0011] In a second aspect, an embodiment of the present application further provides a low-power Bluetooth multi-connection device, comprising:
[0012] A first connection unit, the first connection unit is used to establish a link connection with multiple slave devices based on Bluetooth through connection parameters, and determine the first cyclic order of each first target link in the link to obtain a first time slice; the connection parameters include a first reference connection period and a first event period; the connection period of each first target link is the first reference connection period, and the interval between the start times of any two first target links is an integer multiple of the first reference connection period; each first time slice corresponds to one first target link; the first time slice is the start time of the first first target link established, and after the first time slice is divided into multiple first cycle time periods with the first reference connection period as the interval length, the time period intercepted from the starting point of any first cycle time period is the first event period;
[0013] A first data sending unit is used to send data to a first slave device corresponding to any of the first target links if it is monitored that any of the first target links should obtain the first time slice according to the first cyclic order, so that the slave device and the low-power Bluetooth multi-connection device can perform data transmission.
[0014] In a third aspect, an embodiment of the present application further provides a low-power Bluetooth multi-connection system, including a master device and multiple slave devices, wherein the master device includes a processor and a memory;
[0015] The memory is used to store data or program codes used by the main device when it is running;
[0016] The processor is used to establish a link connection with multiple slave devices based on Bluetooth through connection parameters, and determine a first cyclic order for each first target link in the link to obtain a first time slice; the connection parameters include a first reference connection period and a first event period; the connection period of each first target link is the first reference connection period, and the interval between the start times of any two first target links is an integer multiple of the first reference connection period; each first time slice corresponds to one first target link; the first time slice is the start time of the first first target link established by the master device, and after the first time slice is divided into multiple first cycle time periods with the first reference connection period as the interval length, the time period intercepted from the starting point of any first cycle time period is the first event period;
[0017] If it is monitored that any of the first target links should obtain the first time slice according to the first cyclic sequence, data is sent to the first slave device corresponding to any of the first target links, so that the slave device performs data transmission with the master device.
[0018] The technical effects brought about by any one of the implementation methods in the second aspect to the third aspect can refer to the technical effects brought about by the corresponding implementation method in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0020] Figure 1 A schematic diagram of a method for implementing multiple connections of low-power Bluetooth in related technology;
[0021] Figure 2 A schematic diagram of an application scenario of an embodiment of the present application;
[0022] Figure 3 A flowchart of a low-power Bluetooth multi-connection method provided in an embodiment of the present application;
[0023] Figure 4 A schematic diagram of a method for implementing low-power Bluetooth multi-connection provided in an embodiment of the present application;
[0024] Figure 5 A schematic diagram of another implementation method of low-power Bluetooth multi-connection provided in an embodiment of the present application;
[0025] Figure 6 A flowchart of another low-power Bluetooth multi-connection method provided in an embodiment of the present application;
[0026] Figure 7 A schematic diagram of an implementation method of low-power Bluetooth multi-connection that meets high real-time requirements provided in an embodiment of the present application;
[0027] Figure 8 A schematic diagram of the structure of a low-power Bluetooth multi-connection device provided in an embodiment of the present application;
[0028] Fig. 9 A schematic diagram of the structure of another low-power Bluetooth multi-connection device provided in an embodiment of the present application;
[0029] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0031] It should be noted that the terms "including" and "having" and their variations involved in the documents of this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] The following are explanations of some of the terms that appear in the text:
[0033] (1) Bluetooth Low Energy Technology low energy technology (BLE): Bluetooth low energy technology is an evolution of the Bluetooth classic standard, focusing on providing reliable, efficient and low-power link connections between devices. It has ultra-low power consumption and meets ultra-long battery life. In the process of establishing a connection with Bluetooth low energy technology, devices appear in pairs: the master device and the slave device. If the master wants to establish a connection with the slave, the master needs to initiate a connection request (Connection Request, CONNECT_REQ), so the master can be called a connection initiator; at the same time, the slave must be connectable and have the ability to parse the connection request CONNECT_REQ, and the slave can be called a broadcaster.
[0034] (2) Connection Event: A connection event refers to the process of sending data packets between the master device and the slave device. In a connection link, the master device will send a data packet to the slave device in each connection event.
[0035] (3) Connection Interval: The connection interval refers to the time distance between the start of two consecutive connection events. The connection interval can usually be any value within 7.5ms to 4s, but must be an integer multiple of 1.25ms. The connection interval determines the interaction interval between the master device and the slave device. Connection events are separated by connection intervals. Starting from the master device sending a data packet, each connection event can continue until the master device or the slave device stops responding. Outside of the connection event, no data packets are sent between the master and slave devices. In the embodiments of the present application, the connection interval is also referred to as a connection period.
[0036] (4) Anchor point: Anchor point refers to the sending time of the first data frame sent by the master to the slave after the master initiates the connection request CONNECT_REQ when the master wants to establish a connection with the slave. All connection events after this connection event are based on this moment and show periodic changes. In the embodiment of the present application, for a link, the above anchor point is recorded as anchor point 0 of the link. Starting from anchor point 0, time points are periodically taken with the connection period of the link as the time interval, and multiple feature points of the link are obtained in sequence, namely: anchor point 1, anchor point 2, anchor point 3, etc.
[0037] (5) Timeout: The Bluetooth specification does not require both parties to shake hands at each connection interval. The Bluetooth specification defines the time it takes for both parties to complete a handshake as the timeout. If the timeout expires and both parties have not yet completed a handshake, the connection is disconnected.
[0038] When the master and slave devices establish a low-power Bluetooth connection, the time of establishing the connection determines the anchor point of the connection. In any time period sequentially intercepted with the anchor point as the starting point and the connection period Tinterval as the time interval, the connected parties send and receive data at the start time of the time period and complete data transmission and reception before the end of the time period corresponding to the connection period.
[0039] In the related art, when a master device establishes multiple connections with multiple slave devices, complex calculations are required to arrange the timing of each connection to avoid conflicts between the connections in time.
[0040] by Figure 1 For example, two connections have their own anchor points and connection intervals Tinterval. In order to avoid time conflicts between the two connections, the timing of each connection must be carefully arranged, including: the anchor points of different connections must be staggered; the connection events Tevent of different connections must also be staggered.
[0041] When the number of connections to be supported is large, it is inefficient to allocate time slices for connections corresponding to multiple slave devices.
[0042] In order to better understand the technical solutions provided in the embodiments of the present application, the following briefly introduces the application scenarios to which the technical solutions provided in the embodiments of the present application are applicable. It should be noted that the application scenarios introduced below are only used to illustrate the embodiments of the present application and are not limited thereto. In specific implementation, the technical solutions provided in the embodiments of the present application can be flexibly applied according to actual needs.
[0043] Figure 2 An application scenario of the embodiment of the present application is shown, see Figure 2 As shown, the application scenario includes a master device 100 and multiple slave devices 200. The master device 100 and each slave device 200 can communicate data through the established link connection. Figure 2 The master device 100 and multiple slave devices 200 form a low-power Bluetooth multi-connection system provided in an embodiment of the present application.
[0044] To solve the existing technical problems, the embodiments of the present application provide a low-power Bluetooth multi-connection method, device and system, wherein the master device establishes a link connection with multiple slave devices based on Bluetooth through connection parameters, and determines the first cyclic order for each first target link in the link to obtain a first time slice; wherein the first target link is part or all of the link; the connection parameters include a first reference connection period and a first event period; the connection period of each first target link is the first reference connection period, and the interval between the start times of any two first target links is an integer multiple of the first reference connection period; each first time slice corresponds to a first target link; the first time slice is the start time of the first first target link established by the master device, and after the first reference connection period is used as the interval length to obtain multiple first cycle time periods, the length of the time period intercepted from the starting point of any first cycle time period is the first event period; if the master device detects that any first target link should obtain the first time slice according to the first cyclic order, data is sent to the first slave device corresponding to any first target link, so that the slave device and the master device can transmit data. This enables multiple connections to share anchor points and time slices, which can significantly reduce the difficulty of implementing low-power Bluetooth multi-connections, save time in allocating time slices for connections corresponding to multiple slave devices, and improve the configuration efficiency of low-power Bluetooth multi-connections.
[0045] For ease of understanding, the technical solution provided in the embodiments of the present application is described in detail below.
[0046] Please refer to Figure 3 , which is that the embodiment of the present application provides a low-power Bluetooth multi-connection method, such as Figure 3 As shown, the following steps are included:
[0047] Step S301: The master device establishes a link connection with multiple slave devices based on Bluetooth using connection parameters, and determines a first cyclic order for each first target link in the link to obtain a first time slice.
[0048] Among them, the connection parameters include a first reference connection period and a first event period; the connection period of each first target link is the first reference connection period, and the interval between the start times of any two first target links is an integer multiple of the first reference connection period; each first time slice corresponds to a first target link; the first time slice is the start time of the first first target link established by the master device, and after the first time slice is divided into multiple first cycle time periods with the first reference connection period as the interval length, the length of the time period intercepted from the starting point of any first cycle time period is the first event period.
[0049] In the embodiment of the present application, the first target link is part or all of the link. Specifically, the first target link can be the whole of the link established by the master device with multiple slave devices based on Bluetooth through connection parameters, or it can be part of the link established by the master device with multiple slave devices based on Bluetooth through connection parameters.
[0050] For example, Figure 4 A schematic diagram showing a method for implementing low-power Bluetooth multi-connection provided by an embodiment of the present application is shown. Figure 4 The master device BLE MASTER establishes links Link with three slave devices BLE SLAVE based on Bluetooth through connection parameters, including Link1, Link2, and Link3, and determines the first cycle order of each first target link in the link Link to obtain the first time slice. Figure 4 In the example, the first target link is the entire link Link. The connection parameters include the first reference connection period Tinterval and the first event period Tevent_max; the connection period of each first target link is the first reference connection period Tinterval, and the interval between the start times of any two first target links is an integer multiple of the first reference connection period Tinterval; each first time slice corresponds to a first target link; the start time of the first first target link established by the master device BLE MASTER is recorded as anchor point 0, and the first time slice is the time period of the first event period Tevent_max intercepted from the starting point of any first cycle time period after the first cycle time period is sequentially divided with the first reference connection period Tinterval as the interval length.
[0051] Depend on Figure 4 It can be seen that the three links Link1, Link2, and Link3 share the same anchor point and connection interval Tinterval. The BLE MASTER device as the master device controls the time slice allocation: the 3N+1th Tinterval is used for data transmission and reception between the BLE MASTER device and the BLE SLAVE1 device, the 3N+2th Tinterval is used for data transmission and reception between the BLE MASTER device and the BLE SLAVE2 device, and the 3N+3rd Tinterval is used for data transmission and reception between the BLE MASTER device and the BLE SLAVE3 device. Figure 4It can be seen that the first cycle order of the three links to obtain the first time slice is (Link1, Link2, Link3), indicating that the three links Link1, Link2, Link3 periodically obtain the first time slice in the order of (Link1, Link2, Link3). Each cycle is 3 time slices, N is a natural number, 3N+1, 3N+2, 3N+3 represent three consecutive time slices in one cycle.
[0052] It should be pointed out that Figure 4 The first target link is the entire link Link. It can be understood that the first target link can also be a part of the link Link. When real-time performance is not considered and all multi-connected links formally share anchor points and time slices, the first target link is set to be the entire link Link; when a part of the slave devices is expected to have high real-time performance, the first target link can also be set to be a part of the link Link. This application does not specifically limit whether the first target link is part of or all of the link.
[0053] In an optional embodiment, the connection parameters further include a first timeout period; the master device establishes a link connection with multiple slave devices based on Bluetooth through the connection parameters, which can be achieved by the following steps:
[0054] Step A01: The master device determines a first connection quantity limit according to a first timeout period and a first reference connection period.
[0055] Exemplarily, assuming that the first timeout period is Tsupertimeout1 and the first reference connection period is Tinterval1, the first connection quantity limit CONNmax1 is:
[0056]
[0057] CONNmax1 represents the maximum number of slave devices that the master device can support to connect. For example, when Tsupertimeout1 = 4s, Tinterval1 = 20ms, CONNmax1 = 200 can be obtained, indicating that the maximum number of slave devices that the master device can support to connect is 200.
[0058] Step A02: The master device establishes link connections with multiple slave devices based on Bluetooth using connection parameters and a first connection quantity limit.
[0059] The number of the first target links is not greater than the first connection quantity limit.
[0060] Exemplarily, assuming CONNmax1=200, the master device establishes link connections with multiple slave devices based on Bluetooth through the connection parameters and the first connection quantity limit CONNmax1=200. The number of first target links in the link is not greater than 200. It can be understood that if the first target link at this time is all the links, the number of links is not greater than 200.
[0061] In this embodiment, the connection parameters also include a first timeout period; the master device establishes a link connection with multiple slave devices based on Bluetooth through the connection parameters, including: the master device determines a first connection quantity limit value based on the first timeout period and the first reference connection period; the master device establishes a link connection with multiple slave devices based on Bluetooth through the connection parameters and the first connection quantity limit value; the number of first target links is not greater than the first connection quantity limit value. In this method, the master device determines the first connection quantity limit value based on the first timeout period and the first reference connection period; the number of first target links is not greater than the first connection quantity limit value, which can avoid the problem that the number of connections of the slave device exceeds the timeout limit, thereby preventing abnormal data transmission of multiple connections, and can improve the configuration efficiency of low-power Bluetooth multi-connections.
[0062] In order to avoid excessive connection response delays in multiple connections, this application provides a solution for balancing multiple parameters for specific multi-connection scenarios to meet the specific usage needs of users.
[0063] In an optional embodiment, the connection parameters further include a second timeout period and a target delay period; the target delay period represents the maximum value of the delay period allowed by the user; the master device establishes a link connection with multiple slave devices based on Bluetooth through the connection parameters, which is achieved by the following steps:
[0064] Step B01: The master device determines a second connection quantity limit according to a second timeout period, a target delay period, and a first reference connection period.
[0065] In an optional embodiment, determining the second connection quantity limit according to the second timeout period, the target delay period, and the first reference connection period includes:
[0066] If the target delay time is less than the second timeout time, determining the second connection quantity limit value according to the target delay time and the first reference connection period;
[0067] If the target delay time is not less than the second timeout time, the second connection quantity limit is determined according to the second timeout time and the first reference connection period.
[0068] For example, assuming that the second timeout Tsupertimeout2=4s, the target delay time Tlatency=100ms, and the first reference connection period Tinterval1=20ms. At this time, Tlatency is less than Tsupertimeout2, and the second connection quantity limit CONNmax2 is determined by Tlatency and Tinterval1. CONNmax2=Tlatency / Tinterval1=100 / 20=5.
[0069] For another example, suppose Tsupertimeout2 = 200ms, Tlatency = 500ms, Tinterval1 = 20ms. In this case, Tlatency is greater than SuperTimeout2, and CONNmax2 is determined by Tsupertimeout2 and Tinterval1. CONNmax = Tsupertimeout2 / Tinterval1 = 200 / 20 = 10.
[0070] Step B02: The master device establishes link connections with multiple slave devices based on Bluetooth using connection parameters and a second connection quantity limit.
[0071] The number of the first target links is not greater than the second connection number limit.
[0072] In specific implementation, the master device can first determine whether the number of slave devices that need to be connected to form the first target link exceeds the second connection number limit. If it does not exceed the second connection number limit, a link connection is established with the multiple slave devices based on Bluetooth through connection parameters.
[0073] In this embodiment, the connection parameters also include a second timeout and a target delay; the target delay represents the maximum value of the delay allowed by the user; the master device determines the second connection quantity limit according to the second timeout, the target delay, and the first reference connection period; the master device establishes link connections with multiple slave devices based on Bluetooth through the connection parameters and the second connection quantity limit; the number of first target links is not greater than the second connection quantity limit. This method determines the second connection quantity limit according to the timeout, the target delay, and the first reference connection period, and can strike a balance between the number of connections and the delay time, thereby preventing the problem that the response delay of multiple connections does not meet the usage requirements, and can improve the configuration efficiency of low-power Bluetooth multi-connections.
[0074] In an optional embodiment, determining a first cyclic order in which each first target link in the link acquires a first time slice is implemented by the following steps:
[0075] Step C01: Taking the number of first slave devices as the number of first time slices included in a first cycle of first time slices obtained by each first target link in the link.
[0076] Exemplarily, assuming that the number of first slave devices is 3, when determining the first cyclic order in which each first target link in the link obtains the first time slice, the number of first time slices included in the first cyclic period in which each first target link in the link obtains the first time slice is 3, that is, the first cyclic period allocates 3 first time slices in a fixed cyclic order.
[0077] Step C02: determining first sorting information corresponding to the time slice to which the start time of each first target link belongs in the first cycle.
[0078] Exemplarily, assuming that the first target links are three links Link1, Link2, and Link3, each time the master device establishes a first target link, it records the sorting information corresponding to the time slice to which the start moment of the first target link belongs in the first cycle. For example, assuming that the sorting information corresponding to the time slice to which the start moment of the three links Link1, Link2, and Link3 belongs in the first cycle is 1, 3, and 2 respectively, then the first sorting information corresponding to the time slice to which the start moment of the three links Link1, Link2, and Link3 belongs in the first cycle is 1, 3, and 2 respectively.
[0079] Step C03: determining a first cyclic order in which each first target link in the link acquires the first time slice according to each first sorting information and the number of first time slices included in the first cyclic period.
[0080] Exemplarily, if the first target links are three links, Link1, Link2, and Link3, the number of first time slices included in the first cycle in which each first target link in the link obtains the first time slice is 3, and the corresponding sorting information of the first time slices to which the starting times of the three links Link1, Link2, and Link3 belong in the first cycle are 1, 3, and 2 respectively. Then, the first cycle order in which each first target link in the link obtains the first time slice is (Link1, Link3, Link2). After the three links are established, the three links obtain the first time slice in the order of: Link1 first, then Link3, and finally Link2.
[0081] In this embodiment, the number of slave devices corresponding to the first target link is used as the number of first time slices included in the first cycle in which each first target link in the link obtains the first time slice; the first sorting order information corresponding to the time slice to which the start time of each first target link belongs in the first cycle is determined; and the first cycle order in which each first target link in the link obtains the first time slice is determined according to each first sorting order information and the number of first time slices included in the first cycle. This method can determine the cycle order in which each first target link in the link obtains the first time slice when each first target link only obtains the first time slice once in the first cycle in which each first target link in the link obtains the first time slice, which can save the time of allocating time slices for the connections corresponding to multiple slave devices and improve the configuration efficiency of low-power Bluetooth multi-connections.
[0082] In the embodiment of the present application, time slices may be allocated to different links according to allocation strategies such as bandwidth allocation parameters.
[0083] In an optional embodiment, the connection parameters further include bandwidth allocation parameters; the bandwidth allocation parameters include bandwidth ratios of each first slave device; the first slave device is a slave device corresponding to the first target link; and determining a first cyclic order in which each first target link in the link acquires the first time slice may be implemented by the following steps:
[0084] Step D01 : determining, according to the bandwidth ratio and the number of first slave devices, the minimum number of first time slices included in the second cycle in which each first target link in the link acquires the first time slice.
[0085] Exemplarily, it is assumed that the first target link is two links: Link1 and Link2, and the first slave devices corresponding to the two first target links are BLE SLAVE1 and BLE SLAVE2 respectively. The connection parameters also include bandwidth allocation parameters; the bandwidth allocation parameters include the bandwidth ratio of each first slave device, for example, the bandwidth ratio is BLE SLAVE1: BLE SLAVE2 = 3:1, indicating that Link1 occupies 75% and Link2 occupies 25%. According to the above bandwidth ratio and the number of first slave devices 2, it is determined that the minimum value of the number of first time slices included in the second cycle of each first target link in the link to obtain the first time slice is an integer, which is 4.
[0086] Step D02: determining data retransmission parameters corresponding to each first target link according to the bandwidth ratio.
[0087] The data retransmission parameter represents the number of time slices corresponding to each first target link in the second cycle.
[0088] Exemplarily, if the first target link is two links: Link1 and Link2, the first slave devices corresponding to the two first target links are BLE SLAVE1 and BLE SLAVE2 respectively, the bandwidth ratio is BLE SLAVE1:BLE SLAVE2=3:1, and the minimum number of first time slices included in the second cycle is 4. It can be determined that the data retransmission parameters corresponding to the first target links Link1 and Link2 are 3 and 1 respectively.
[0089] Step D03: determining the second sorting information corresponding to the first time slice to which the start time of each first target link belongs in the second cycle.
[0090] Exemplarily, assuming that the first target links are two links Link1 and Link2, each time the master device establishes a first target link, it records the sorting information corresponding to the first time slice to which the starting time of the first target link belongs in the second cycle. For example, assuming that the sorting information corresponding to the first time slice to which the starting time of the two links Link1 and Link2 belongs in the second cycle is 2 and 1 respectively, then the second sorting information corresponding to the first time slice to which the starting time of the two links Link1 and Link2 belongs in the second cycle is 2 and 1 respectively, that is, according to the second sorting information, the master device first establishes link Link2 and then establishes link Link1.
[0091] Step D04, determining a first cyclic order for each first target link in the link to obtain the first time slice according to each second sorting information, the minimum number of first time slices included in the second cycle period and the data retransmission parameter corresponding to each link.
[0092] When any first target link corresponds to a plurality of first time slices in the second cycle, for any two adjacent first time slices, the time difference between the starting points of the corresponding first time slices is the first reference connection period.
[0093] For example, if the first target links are two links, Link1 and Link2, the minimum number of first time slices included in the second cycle is 4, the first time slices to which the starting times of the two links Link1 and Link2 belong correspond to sorting information of 2 and 1 respectively in the second cycle, and the data retransmission parameters corresponding to the first target links Link1 and Link2 are 3 and 1 respectively, then the first cycle order for each first target link in the link to obtain the first time slice is (Link2, Link1, Link1, Link1), and after the two links are established, the two links obtain the first time slice in the following cycle order: Link2 obtains the first time slice once, and then Link1 obtains the first time slice three times. The implementation method of the low-power multi-connection is as follows: Figure 5 shown.
[0094] In this embodiment, time slices are allocated to different links through bandwidth allocation parameters. This method can support bandwidth control of part or all of the links, thereby preventing the problem that bandwidth allocation of multiple connections does not meet usage requirements, and can improve the configuration efficiency of low-power Bluetooth multi-connections.
[0095] Step S302: If the master device detects that any first target link should obtain the first time slice according to the first cyclic sequence, data is sent to the first slave device corresponding to any first target link, so that the slave device and the master device perform data transmission.
[0096] The embodiment of the present application provides a low-power Bluetooth multi-connection method, in which the master device establishes a link connection with multiple slave devices based on Bluetooth through connection parameters, and determines the first cyclic order for each first target link in the link to obtain the first time slice; wherein the first target link is part or all of the link; the connection parameters include a first reference connection period and a first event period; the connection period of each first target link is the first reference connection period, and the interval between the start times of any two first target links is an integer multiple of the first reference connection period; each first time slice corresponds to a first target link; if the master device detects that any first target link should obtain the first time slice according to the first cyclic order, data is sent to the first slave device corresponding to any first target link, so that the slave device and the master device perform data transmission. In this method, the connection intervals of some or all links are the same, and the intervals of the start times of the links are integer multiples of the connection intervals, thereby realizing multiple connections sharing anchor points and time slices, which can significantly reduce the difficulty of implementing low-power Bluetooth multi-connections, save the time of allocating time slices for connections corresponding to multiple slave devices, and improve the configuration efficiency of low-power Bluetooth multi-connections.
[0097] In order to solve the real-time problem, when there are multiple connections in low-power Bluetooth, two groups of slave devices can be set, one of which is set to a high real-time configuration and the other is set to a low real-time configuration. For the high real-time configuration, the link corresponding to the group of slave devices can be further optimized, for example, the connection interval is set to a relatively small value in the Bluetooth specification, and the number of transmissions and receptions in the connection event is limited, etc.
[0098] Figure 6 A flowchart of another low-power Bluetooth multi-connection method provided by an embodiment of the present application is shown. In this method, the number of first target links is a first preset integer; the link also includes a second target link; Figure 6 As shown, the method comprises the following steps:
[0099] Step S601: The master device establishes a link connection with multiple slave devices based on Bluetooth using connection parameters, and determines a first cyclic order for each first target link in the link to obtain a first time slice.
[0100] Among them, the first target link is part or all of the link; the connection parameters include a first reference connection period and a first event period; the connection period of each first target link is the first reference connection period, and the interval between the start times of any two first target links is an integer multiple of the first reference connection period; each first time slice corresponds to a first target link; the first time slice is the start time of the first first target link established by the main device, and after dividing the first time slice with the first reference connection period as the interval length to obtain multiple first cycle time periods, the length of the time period intercepted from the starting point of any first cycle time period is the first event period.
[0101] Step S602: determine a second cyclic order in which each second target link in the link acquires a second time slice.
[0102] Among them, the connection parameters also include a second reference connection period, a second event period and a first anchor time difference; the master device and the slave device first establish a first target link; the first anchor time difference is the difference between the starting time of the first second target link established by the master device and the first first target link; each second time slice corresponds to a second target link; the second time slice is the starting time of the first second target link established by the master device, and after dividing it with the second reference connection period as the interval length to obtain multiple second cycle time periods, the length of the time period intercepted from the starting point of any second cycle time period is the second event period; the connection period of each second target link is the second reference connection period, and the interval between the starting times of any two second target links is an integer multiple of the second reference connection period; the second reference connection period is the first preset integer multiple of the first reference connection period; the value of the first anchor time difference is greater than the first event duration; the second event period is less than the difference between the first reference connection period and the first anchor time difference.
[0103] For example, Figure 7As shown, assuming that the master device needs to establish multiple connections with multiple slave devices to form 4 links: Link1 to Link4, where Link1 and Link2 have high real-time requirements, the first preset integer can be set to 2, and the number of first target links is 2; the link also includes second target links: Link3 and Link4; the connection parameters also include a second reference connection period Tinterval2, a second event period Tevent_max' and a first anchor time difference Gap_T0; the master device and the slave device first establish a first target link, assuming it is Link2; the first anchor time difference Gap_T0 is the starting time of the first second target link established by the master device and the first first target link; each second time slice corresponds to a second target link; the second time slice is the starting time T0 of the first second target link established by the master device, and after the second period time period is obtained by dividing the second period time period with the second reference connection period Tinterval2 as the interval length, the time period of the second event period Tevent_max' intercepted from the starting point of any second period time period; the connection period of each second target link is the second reference connection period Tinterval2, and the interval between the starting times of any two second target links is an integer multiple of the second reference connection period Tinterval2; the second reference connection period is the first preset integer multiple of the first reference connection period, such as Figure 7 As shown, the second reference connection period is twice the first reference connection period; the value of the first anchor time difference Gap_T0 is greater than the first event duration Tevent_max; the second event period Tevent_max' is less than the difference Gap_T0 between the first reference connection period Tinterval1 and the first anchor time difference.
[0104] The specific process of determining the second cyclic order for each second target link in the link to obtain the second time slice can be performed with reference to the method steps for determining the first cyclic order in the aforementioned embodiment, which will not be described in detail here.
[0105] Step S603: Determine, according to the first cyclic order and the second cyclic order, a mixed cyclic order in which each first target link and each second target link in the link obtains the corresponding first time slice or second time slice.
[0106] Among them, in the mixed cyclic sequence, any second target link obtains a second time slice once, and each first target link correspondingly obtains a first time slice once respectively.
[0107] Exemplarily, assuming that the first loop order is (Link2, Link1) and the determined second loop order is (Link3, Link4), a mixed loop order (Link2, Link3, Link1, Link2, Link4, Link1) can be determined. In this mixed loop order, any second target link obtains the second time slice once, and each first target link correspondingly obtains the first time slice once.
[0108] In an optional embodiment, the first reference connection period is 7.5 ms.
[0109] This method sets the connection interval of a group of links to the minimum 7.5ms in the Bluetooth specification, further improving the real-time performance of multiple connections.
[0110] In an optional embodiment, within a first time slice corresponding to any first reference connection period, the number of times the corresponding first link performs data transmission and reception is once.
[0111] According to this method, in the first characteristic time slice corresponding to any first reference connection period, the corresponding first link performs data transmission and reception once, which can transmit data to different links more timely and further improve the real-time performance of multiple connections.
[0112] Step S604: If the master device detects that any first target link or second target link should obtain a time slice in a mixed cyclic order, data is sent to the first slave device or second slave device corresponding to any first target link or second target link, so that the master device and the slave device can perform data transmission.
[0113] The specific process of each step in step S601 to step S604 can be performed with reference to the method steps in the aforementioned embodiment, and will not be repeated here.
[0114] The method of this embodiment can set up two groups of links, and the time slices of the two groups of links do not overlap, so that the two groups of links in the multiple connections can share the anchor point and the time slice respectively, which not only significantly reduces the difficulty of implementing low-power Bluetooth multi-connections, saves the time of allocating time slices for connections corresponding to multiple slave devices, and improves the configuration efficiency of low-power Bluetooth multi-connections, but also because the second benchmark connection period is the first preset integer multiple of the first benchmark connection period, it can introduce links with high real-time performance, thereby improving the real-time performance of multiple connections.
[0115] and Figure 3The low-power Bluetooth multi-connection method shown is based on the same inventive concept, and a low-power Bluetooth multi-connection device is also provided in the embodiment of the present application. Since the device is the device corresponding to the low-power Bluetooth multi-connection method of the present application, and the principle of solving the problem by the device is similar to that of the method, the implementation of the device can refer to the implementation of the above method, and the repeated parts will not be repeated.
[0116] Figure 8 FIG. 4 shows a schematic diagram of a low-power Bluetooth multi-connection device provided in an embodiment of the present application. Figure 8 As shown, the low-power Bluetooth multi-connection device includes a first connection unit 801 and a first data sending unit 802 .
[0117] Among them, the first connection unit 801 is used to establish a link connection with multiple slave devices based on Bluetooth through connection parameters, and determine the first cyclic order of each first target link in the link to obtain the first time slice; wherein, the first target link is part or all of the link; the connection parameters include a first reference connection period and a first event period; the connection period of each first target link is the first reference connection period, and the interval between the starting times of any two first target links is an integer multiple of the first reference connection period; each first time slice corresponds to one first target link; the first time slice is the starting time of the first first target link established, and after dividing the first reference connection period as the interval length to obtain multiple first cycle time periods, the length of the time period intercepted from the starting point of any first cycle time period is the first event period;
[0118] The first data sending unit 802 is used to send data to a first slave device corresponding to any of the first target links if it is monitored that any of the first target links should obtain the first time slice according to the first cyclic order, so that the slave device and the low-power Bluetooth multi-connection device can perform data transmission.
[0119] It can be understood that the first target link may be part or all of the link.
[0120] In an optional embodiment, the connection parameters further include a first timeout period; the first connection unit 801 is specifically configured to:
[0121] Determine a first connection quantity limit according to the first timeout period and the first reference connection period;
[0122] By using the connection parameters and the first connection quantity limit, link connections are established with multiple slave devices based on Bluetooth; the number of the first target links is not greater than the first connection quantity limit.
[0123] In an optional embodiment, the connection parameters further include a second timeout period and a target delay period; the target delay period represents a maximum value of a delay period allowed by a user; and the first connection unit 801 is specifically configured to:
[0124] Determine a second connection quantity limit according to the second timeout period, the target delay period, and the first reference connection period;
[0125] A link connection is established with multiple slave devices based on Bluetooth using the connection parameters and the second connection quantity limit; and the number of the first target links is not greater than the second connection quantity limit.
[0126] In an optional embodiment, the first connecting unit 801 is specifically configured to:
[0127] If the target delay time is less than the second timeout time, determining the second connection quantity limit according to the target delay time and the first reference connection period;
[0128] If the target delay time is not less than the second timeout time, the second connection quantity limit is determined according to the second timeout time and the first reference connection period.
[0129] In an optional embodiment, the first connecting unit 801 is specifically configured to:
[0130] Taking the number of first slave devices as the number of first time slices included in the first cycle of obtaining the first time slice of each first target link in the link;
[0131] Determine first sorting information corresponding to the time slice to which the start time of each first target link belongs in the first cycle;
[0132] According to each piece of first sorting information and the number of first time slices included in the first cycle period, a first cycle order in which each first target link in the link acquires the first time slice is determined.
[0133] In an optional embodiment, the connection parameters further include bandwidth allocation parameters; the bandwidth allocation parameters include bandwidth ratios of the first slave devices; the first slave device is the slave device corresponding to the first target link; the first connection unit 801 is specifically configured to:
[0134] Determine, according to the bandwidth ratio and the number of the first slave devices, a minimum value of the number of the first time slices included in the second cycle in which each first target link in the link acquires the first time slice;
[0135] Determine, according to the bandwidth ratio, a data retransmission parameter corresponding to each of the first target links; the data retransmission parameter represents the number of time slices corresponding to each of the first target links in the second cycle;
[0136] Determine the second sorting information corresponding to the first time slice to which the start time of each of the first target links belongs in the second cycle;
[0137] The first cyclic order for each first target link in the link to obtain the first time slice is determined according to each of the second sorting information, the minimum number of the first time slices included in the second cycle period, and the data retransmission parameters corresponding to each of the links; wherein, when any of the first target links corresponds to multiple first time slices in the second cycle period, for any adjacent two of the multiple first time slices, the time difference between the starting points of the corresponding first time slices is the first reference connection period.
[0138] In an optional embodiment, the number of the first target links is a first preset integer; the link also includes a second target link; Fig. 9 As shown, the device further includes a second connection unit 901, and the second connection unit 901 is used to:
[0139] Determine a second cyclic order for each second target link in the link to obtain a second time slice; wherein the connection parameters also include a second reference connection period, a second event period and a first anchor time difference; the master device and the slave device first establish a first target link; the first anchor time difference is the difference between the start time of the first second target link established by the master device and the first first target link; each second time slice corresponds to a second target link; the second time slice is the start time of the first second target link established by the master device, and after the second time slice is divided into multiple second cycle time periods with the second reference connection period as the interval length, the length of the time period intercepted from the starting point of any second cycle time period is the second event period; the connection period of each second target link is the second reference connection period, and the interval between the start times of any two second target links is an integer multiple of the second reference connection period; the second reference connection period is the first preset integer multiple of the first reference connection period; the value of the first anchor time difference is greater than the first event duration; the second event period is less than the difference between the first reference connection period and the first anchor time difference;
[0140] According to the first cyclic order and the second cyclic order, a mixed cyclic order is determined in which each of the first target links and each of the second target links in the link obtains the corresponding first time slice or second time slice; in the mixed cyclic order, if any of the second target links obtains the second time slice once, then each of the first target links correspondingly obtains the first time slice once respectively;
[0141] The first data sending unit 802 is specifically used for: if the master device detects that any of the first target link or the second target link should obtain a time slice according to the mixed cycle order, then sending data to the first slave device or the second slave device corresponding to any of the first target link or the second target link, so that the master device and the slave device can perform data transmission.
[0142] In an optional embodiment, the first reference connection period is 7.5 ms.
[0143] In an optional embodiment, within the first time slice corresponding to any first reference connection period, the number of times the corresponding first link performs data transmission and reception is once.
[0144] Based on the same technical concept, the embodiment of the present application also provides an electronic device, referring to Fig.10 As shown, the electronic device is used to implement the methods described in the above-mentioned various method embodiments, for example, Figure 3 According to the method shown, the electronic device may include a memory 1001 and a processor 1002 .
[0145] The memory 1001 is used to store computer programs executed by the processor 1002. The memory 1001 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the electronic device, etc. The processor 1002 may be a central processing unit (CPU) or a digital processing unit, etc.
[0146] The specific connection medium between the memory 1001 and the processor 1002 is not limited in the embodiment of the present application. Fig.10 In the embodiment, the memory 1001 and the processor 1002 are connected via a bus 1003. The bus 1003 is Fig.10 The connections between other components are shown in bold lines, and are not intended to be limiting. Bus 1003 can be divided into address bus, data bus, control bus, etc. For ease of representation, Fig.10Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0147] The memory 1001 may be a volatile memory, such as a random-access memory (RAM); the memory 1001 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or the memory 1001 is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1001 may be a combination of the above memories.
[0148] The processor 1002 is configured to call a computer program stored in the memory 1001 to execute any one of the above-mentioned low-power Bluetooth multi-connection methods.
[0149] Based on the same technical concept, the present application embodiment also provides a low-power Bluetooth multi-connection system. The structure of the low-power Bluetooth multi-connection system provided by the present application embodiment can be found in Figure 2 The low-power Bluetooth multi-connection system includes a master device and multiple slave devices, and the master device includes a processor and a memory;
[0150] A memory for storing data or program codes used when the main device is running;
[0151] A processor, configured to establish a link connection with multiple slave devices based on Bluetooth through connection parameters, and determine a first cyclic order for each first target link in the link to obtain a first time slice; the connection parameters include a first reference connection period and a first event period; the connection period of each first target link is the first reference connection period, and the interval between the start times of any two first target links is an integer multiple of the first reference connection period; each first time slice corresponds to a first target link; the first time slice is a time period of a first event period intercepted from the starting time of the first first target link established by the master device after being divided into multiple first cycle time periods with the first reference connection period as the interval length;
[0152] If it is monitored that any first target link should obtain the first time slice according to the first cyclic sequence, data is sent to the first slave device corresponding to any first target link, so that the slave device and the master device perform data transmission.
[0153] It can be understood that the first target link may be part or all of the link.
[0154] In an optional embodiment, the connection parameters further include a first timeout period; and the processor is specifically configured to:
[0155] Determine a first connection quantity limit value according to a first timeout period and a first reference connection period;
[0156] Through the connection parameters and the first connection quantity limit, link connections are established with multiple slave devices based on Bluetooth; the number of first target links is not greater than the first connection quantity limit.
[0157] In an optional embodiment, the connection parameters further include a second timeout period and a target delay period; the target delay period represents a maximum value of a delay period allowed by a user; and the processor is specifically configured to:
[0158] Determine a second connection quantity limit according to the second timeout period, the target delay period, and the first benchmark connection period;
[0159] Through the connection parameters and the second connection quantity limit, link connections are established with multiple slave devices based on Bluetooth; the number of first target links is not greater than the second connection quantity limit.
[0160] In an optional embodiment, the processor is specifically configured to:
[0161] If the target delay time is less than the second timeout time, determining the second connection quantity limit value according to the target delay time and the first reference connection period;
[0162] If the target delay time is not less than the second timeout time, the second connection quantity limit is determined according to the second timeout time and the first reference connection period.
[0163] In an optional embodiment, the processor is specifically configured to:
[0164] Taking the number of first slave devices as the number of first time slices included in the first cycle of obtaining the first time slice of each first target link in the link;
[0165] Determine first sorting information corresponding to the time slice to which the start time of each first target link belongs in the first cycle;
[0166] According to each piece of first sorting information and the number of first time slices included in the first cycle period, a first cycle order in which each first target link in the link acquires the first time slice is determined.
[0167] In an optional embodiment, the connection parameters further include bandwidth allocation parameters; the bandwidth allocation parameters include bandwidth ratios of the first slave devices; the first slave device is a slave device corresponding to the first target link; the processor is specifically configured to:
[0168] Determine, according to the bandwidth ratio and the number of first slave devices, a minimum value of the number of first time slices included in the second cycle in which each first target link in the link obtains the first time slice;
[0169] Determine, according to the bandwidth ratio, a data retransmission parameter corresponding to each first target link; the data retransmission parameter represents the number of time slices corresponding to each first target link in the second cycle;
[0170] Determine the second sorting information corresponding to the first time slice to which the start time of each first target link belongs in the second cycle;
[0171] The first cyclic order in which each first target link in the link obtains the first time slice is determined according to each second sorting information, the minimum number of first time slices included in the second cycle period and the data retransmission parameter corresponding to each link; wherein, when any first target link corresponds to multiple first time slices in the second cycle period, for any adjacent two of the multiple first time slices, the time difference between the starting points of the corresponding first time slices is the first reference connection period.
[0172] In an optional embodiment, the number of the first target links is a first preset integer; the link further includes a second target link; and the processor is further configured to:
[0173] Determine the second cyclic order for each second target link in the link to obtain the second time slice; wherein the connection parameters also include a second reference connection period, a second event period and a first anchor time difference; the master device and the slave device first establish a first target link; the first anchor time difference is the difference between the starting time of the first second target link established by the master device and the first first target link; each second time slice corresponds to a second target link; the second time slice is the time period whose length is the second event period intercepted from the starting point of any second cycle time period after being divided into multiple second cycle time periods with the second reference connection period as the interval length from the starting time of the first second target link established by the master device; the connection period of each second target link is the second reference connection period, and the interval between the starting times of any two second target links is an integer multiple of the second reference connection period; the second reference connection period is the first preset integer multiple of the first reference connection period; the value of the first anchor time difference is greater than the first event duration; the second event period is less than the difference between the first reference connection period and the first anchor time difference;
[0174] According to the first cycle sequence and the second cycle sequence, a mixed cycle sequence is determined in which each first target link and each second target link in the link obtains the corresponding first time slice or second time slice; in the mixed cycle sequence, if any second target link obtains the second time slice once, then each first target link correspondingly obtains the first time slice once respectively;
[0175] The processor is specifically used to: if the master device detects that any first target link or second target link should obtain a time slice in a mixed cyclic order, send data to the first slave device or second slave device corresponding to any first target link or second target link, so that the master device and the slave device can perform data transmission.
[0176] In an optional embodiment, the first reference connection period is 7.5 ms.
[0177] In an optional embodiment, within a first time slice corresponding to any first reference connection period, the number of times the corresponding first link performs data transmission and reception is once.
[0178] According to one aspect of the present application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions so that the computer device executes the low-power Bluetooth multi-connection method in the above embodiment. The program product can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0179] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0180] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0181] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0182] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0183] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A low-power Bluetooth multi-connection method, It is characterized in that include: The master device establishes a link connection with a plurality of slave devices based on Bluetooth through the connection parameters, and determines a first cycle order for each first target link in the link to obtain a first time slice; The connection parameters include a first reference connection period and a first event period; the connection period of each of the first target links is the first reference connection period, and the interval between the start times of any two of the first target links is an integer multiple of the first reference connection period; each of the first time slices corresponds to one first target link; The first time slice is a time period of the first event cycle, which is intercepted from the starting point of any first cycle time period after the first target link established by the master device is divided into multiple first cycle time periods with the first reference connection period as the interval length; If the master device detects that any of the first target links should obtain the first time slice according to the first cyclic order, data is sent to the first slave device corresponding to any of the first target links, so that the slave device and the master device perform data transmission.
2. The method according to claim 1, It is characterized in that The connection parameters also include a first timeout period; The master device establishes a link connection with multiple slave devices based on Bluetooth through connection parameters, including: The master device determines a first connection quantity limit according to the first timeout period and the first reference connection period; The master device establishes link connections with multiple slave devices based on Bluetooth through the connection parameters and the first connection quantity limit; the number of the first target links is not greater than the first connection quantity limit.
3. The method according to claim 1, It is characterized in that The connection parameters also include a second timeout period and a target delay period; the target delay period represents the maximum value of the delay period allowed by the user; The master device establishes a link connection with multiple slave devices based on Bluetooth through connection parameters, including: The master device determines a second connection quantity limit according to the second timeout period, the target delay period, and the first reference connection period; The master device establishes link connections with multiple slave devices based on Bluetooth through the connection parameters and the second connection quantity limit; the number of the first target links is not greater than the second connection quantity limit.
4. The method according to claim 3, It is characterized in that The determining, according to the second timeout period, the target delay period, and the first reference connection period, of a second connection quantity limit includes: If the target delay time is less than the second timeout time, determining the second connection quantity limit according to the target delay time and the first reference connection period; If the target delay time is not less than the second timeout time, the second connection quantity limit is determined according to the second timeout time and the first reference connection period.
5. The method according to claim 1, It is characterized in that The determining a first cyclic order for each first target link in the link to acquire a first time slice includes: Taking the number of the first slave devices as the number of the first time slices included in the first cycle of obtaining the first time slice of each first target link in the link; Determine first sorting information corresponding to the time slice to which the start time of each of the first target links belongs in the first cycle; A first cyclic order in which each first target link in the link acquires the first time slice is determined according to each of the first sorting information and the number of the first time slices included in the first cyclic period.
6. The method according to claim 1, It is characterized in that The connection parameters further include bandwidth allocation parameters; the bandwidth allocation parameters include bandwidth ratios of the first slave devices; the first slave device is the slave device corresponding to the first target link; and determining a first cyclic order in which the first target links in the link acquire the first time slice includes: Determine, according to the bandwidth ratio and the number of the first slave devices, a minimum value of the number of the first time slices included in the second cycle in which each first target link in the link acquires the first time slice; Determine, according to the bandwidth ratio, a data retransmission parameter corresponding to each of the first target links; the data retransmission parameter represents the number of time slices corresponding to each of the first target links in the second cycle; Determine the second sorting information corresponding to the first time slice to which the start time of each of the first target links belongs in the second cycle; The first cyclic order for each first target link in the link to obtain the first time slice is determined according to each of the second sorting information, the minimum number of the first time slices included in the second cycle period, and the data retransmission parameters corresponding to each of the links; wherein, when any of the first target links corresponds to multiple first time slices in the second cycle period, for any adjacent two of the multiple first time slices, the time difference between the starting points of the corresponding first time slices is the first reference connection period.
7. The method according to claim 1, It is characterized in that The number of the first target links is a first preset integer; the link further includes a second target link; after determining the cyclic order in which each first target link in the link acquires the first time slice, the method further includes: Determine a second cyclic order for each second target link in the link to obtain a second time slice; wherein the connection parameters also include a second reference connection period, a second event period and a first anchor time difference; the master device and the slave device first establish a first target link; the first anchor time difference is the difference between the start time of the first second target link established by the master device and the first first target link; each second time slice corresponds to a second target link; the second time slice is the start time of the first second target link established by the master device, and after the second time slice is divided into multiple second cycle time periods with the second reference connection period as the interval length, the length of the time period intercepted from the starting point of any second cycle time period is the second event period; the connection period of each second target link is the second reference connection period, and the interval between the start times of any two second target links is an integer multiple of the second reference connection period; the second reference connection period is the first preset integer multiple of the first reference connection period; the value of the first anchor time difference is greater than the first event duration; the second event period is less than the difference between the first reference connection period and the first anchor time difference; According to the first cyclic order and the second cyclic order, a mixed cyclic order is determined in which each of the first target links and each of the second target links in the link obtains the corresponding first time slice or second time slice; in the mixed cyclic order, if any of the second target links obtains the second time slice once, then each of the first target links correspondingly obtains the first time slice once respectively; If the master device detects that any of the first target links should obtain the first time slice according to the first cyclic order, data is sent to the first slave device corresponding to any of the first target links, including: if the master device detects that any of the first target link or the second target link should obtain the time slice according to the mixed cyclic order, data is sent to the first slave device or the second slave device corresponding to any of the first target link or the second target link, so that the master device and the slave device can transmit data.
8. The method according to claim 7, It is characterized in that The first reference connection period is 7.5 ms.
9. The method according to claim 7, It is characterized in that In the first time slice corresponding to any one of the first reference connection cycles, the number of times the corresponding first target link performs data transmission and reception is once.
10. A low-power Bluetooth multi-connection device, It is characterized in that include: A first connection unit, the first connection unit is used to establish a link connection with multiple slave devices based on Bluetooth through connection parameters, and determine a first cyclic order for each first target link in the link to obtain a first time slice; the connection parameters include a first reference connection period and a first event period; the connection period of each first target link is the first reference connection period, and the interval between the start times of any two first target links is an integer multiple of the first reference connection period; each first time slice corresponds to one first target link; The first time slice is a time period of the first event cycle, which is intercepted from the starting point of any first cycle time period after the first target link is established and divided into multiple first cycle time periods with the first reference connection period as the interval length; A first data sending unit is used to send data to a first slave device corresponding to any of the first target links if it is monitored that any of the first target links should obtain the first time slice according to the first cyclic order, so that the slave device and the low-power Bluetooth multi-connection device can perform data transmission.
11. A low-power Bluetooth multi-connection system, It is characterized in that The method comprises a master device and a plurality of slave devices, wherein the master device comprises a processor and a memory; The memory is used to store data or program codes used by the main device when it is running; The processor is used to establish a link connection with the plurality of slave devices based on Bluetooth through connection parameters, and determine a first cyclic order in which each first target link in the link obtains a first time slice; the connection parameters include a first reference connection period and a first event period; the connection period of each first target link is the first reference connection period, and the interval between the start times of any two first target links is an integer multiple of the first reference connection period; each first time slice corresponds to one first target link; The first time slice is a time period of the first event cycle, which is intercepted from the starting point of any first cycle time period after the first target link established by the master device is divided into multiple first cycle time periods with the first reference connection period as the interval length; If it is monitored that any of the first target links should obtain the first time slice according to the first cyclic sequence, data is sent to the first slave device corresponding to any of the first target links, so that the slave device performs data transmission with the master device.
