CN113423098A - Bluetooth scanning event scheduling method and device and Bluetooth equipment - Google Patents

Bluetooth scanning event scheduling method and device and Bluetooth equipment Download PDF

Info

Publication number
CN113423098A
CN113423098A CN202110688169.0A CN202110688169A CN113423098A CN 113423098 A CN113423098 A CN 113423098A CN 202110688169 A CN202110688169 A CN 202110688169A CN 113423098 A CN113423098 A CN 113423098A
Authority
CN
China
Prior art keywords
bluetooth
event
scanning
priority
scannable
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110688169.0A
Other languages
Chinese (zh)
Other versions
CN113423098B (en
Inventor
王春兴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Xinzhilian Technology Co ltd
Original Assignee
Guangzhou Xinzhilian Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Xinzhilian Technology Co ltd filed Critical Guangzhou Xinzhilian Technology Co ltd
Publication of CN113423098A publication Critical patent/CN113423098A/en
Application granted granted Critical
Publication of CN113423098B publication Critical patent/CN113423098B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/04Wireless resource allocation
    • H04W72/044Wireless resource allocation based on the type of the allocated resource
    • H04W72/0446Resources in time domain, e.g. slots or frames
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/50Allocation or scheduling criteria for wireless resources
    • H04W72/56Allocation or scheduling criteria for wireless resources based on priority criteria
    • H04W72/566Allocation or scheduling criteria for wireless resources based on priority criteria of the information or information source or recipient
    • H04W72/569Allocation or scheduling criteria for wireless resources based on priority criteria of the information or information source or recipient of the traffic information
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention discloses a Bluetooth scanning event scheduling method, a Bluetooth scanning event scheduling device and Bluetooth equipment, wherein the method comprises the following steps: determining at least one non-scanning priority event expected to be performed within a target time period; the non-scanning priority event is any Bluetooth data transmission event with the priority higher than that of a Bluetooth scanning type event in the preset priority sequence of the Bluetooth data transmission events; determining a scannable idle time period from the target time period according to the predicted execution time of the at least one non-scanning priority event; the scannable idle time period is a time interval within the target time period that is not occupied by an expected execution time interval of the non-scanning priority event; and determining the scannable idle time period as an execution time interval of the Bluetooth scanning event. Therefore, the invention realizes more flexible Bluetooth scanning function, and is beneficial to improving the efficiency of Bluetooth data transmission and the utilization rate of Bluetooth data transmission resources.

Description

Bluetooth scanning event scheduling method and device and Bluetooth equipment
Technical Field
The invention relates to the technical field of data transmission, in particular to a Bluetooth scanning event scheduling method, a Bluetooth scanning event scheduling device and Bluetooth equipment.
Background
With the improvement of the degree of modernization of people's life, the demand for communication technology is increasing, and the bluetooth data transmission technology characterized by low cost and short distance is gaining favor in the market, becoming one of the widely used wireless connection communication technologies.
However, when solving the problem of event collision caused by different bluetooth data transmission events occupying the bluetooth data physical layer at the same time, the existing bluetooth data transmission technology generally adopts to enable or close different bluetooth data transmission events respectively to avoid simultaneous execution, but the solution is too low in efficiency and does not consider the characteristics of different bluetooth data transmission events, so that the existing technology has certain defects and needs to be solved urgently.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method, an apparatus and a bluetooth device for scheduling a bluetooth scanning event, which can determine a time interval without a higher priority conflict event from a target time period to perform bluetooth scanning through a preset priority relationship, so as to schedule the bluetooth scanning event, thereby implementing a more flexible bluetooth scanning function, and contributing to improving the efficiency of bluetooth data transmission and the utilization rate of bluetooth data transmission resources.
In order to solve the above technical problem, a first aspect of the present invention discloses a bluetooth scan event scheduling method, including:
determining at least one non-scanning priority event expected to be performed within a target time period; the non-scanning priority event is any Bluetooth data transmission event with the priority higher than that of a Bluetooth scanning type event in the preset priority sequence of the Bluetooth data transmission events;
determining a scannable idle time period from the target time period according to the predicted execution time of the at least one non-scanning priority event; the scannable idle time period is a time interval within the target time period that is not occupied by an expected execution time interval of the non-scanning priority event;
and determining the scannable idle time period as an execution time interval of the Bluetooth scanning event.
As an optional implementation manner, in the first aspect of the present invention, the bluetooth scan-like event includes a bluetooth scan event and/or a bluetooth initiated status scan event.
As an alternative implementation manner, in the first aspect of the present invention, the non-scanning priority event includes a bluetooth connection event and/or a bluetooth broadcast event.
As an optional implementation manner, in the first aspect of the present invention, the priority order of the bluetooth data transmission events includes:
the priority of the Bluetooth connection event is higher than that of the Bluetooth broadcast event; and/or the presence of a gas in the gas,
the priority of the Bluetooth broadcast event is higher than that of the Bluetooth scanning event; and/or the presence of a gas in the gas,
the priority of the Bluetooth connection event is higher than that of the Bluetooth scanning event; and/or the presence of a gas in the gas,
the priority of the Bluetooth initiation state scanning event is higher than that of the Bluetooth scanning event or the Bluetooth broadcasting event; and/or;
the priority of the Bluetooth connection event is higher than that of the Bluetooth initiated state scanning event.
As an optional implementation manner, in the first aspect of the present invention, the scannable idle period may include a plurality of scannable time intervals, a time interval exists between at least two of the scannable time intervals, and before the scannable idle period is determined to be the execution time interval of the bluetooth scan-type event, the method further includes:
determining the maximum scanning duration of the Bluetooth scanning event;
for any scannable time interval, judging whether the duration of the scannable time interval is greater than the maximum scanning duration;
and when the judgment result is yes, modifying the time length of the scannable time interval into the maximum scanning time length.
As an optional implementation manner, in the first aspect of the present invention, the scannable idle period may include a plurality of scannable time intervals, a time interval exists between at least two of the scannable time intervals, and before the scannable idle period is determined to be the execution time interval of the bluetooth scan-type event, the method further includes:
for any one scannable time interval, determining a transmission preparation duration corresponding to the non-scanning priority event to be executed in the next time interval of the scannable time interval;
and determining the difference between the time length of the scannable time interval and the transmission preparation time length as a new time length of the scannable time interval.
As an optional implementation manner, in the first aspect of the present invention, the transmission preparation duration includes one or more of a software preparation duration, a hardware preparation duration, and a radio frequency preparation duration.
The second aspect of the present invention discloses a bluetooth scan event scheduling device, which comprises:
a first determination module to determine at least one non-scanning priority event expected to be performed within a target time period; the non-scanning priority event is any Bluetooth data transmission event with the priority higher than that of a Bluetooth scanning type event in the preset priority sequence of the Bluetooth data transmission events;
a second determining module, configured to determine a scannable idle time period from the target time period according to an expected execution time of the at least one non-scanning priority event; the scannable idle time period is a time interval within the target time period that is not occupied by an expected execution time interval of the non-scanning priority event;
and the third determining module is used for determining the scannable idle time period as the execution time interval of the Bluetooth scanning event.
As an optional implementation manner, in the second aspect of the present invention, the bluetooth scan-like event includes a bluetooth scan event and/or a bluetooth initiated status scan event.
As an alternative implementation, in the second aspect of the present invention, the non-scanning priority event includes a bluetooth connection event and/or a bluetooth broadcast event.
As an optional implementation manner, in the second aspect of the present invention, the priority order of the bluetooth data transmission events includes:
the priority of the Bluetooth connection event is higher than that of the Bluetooth broadcast event; and/or the presence of a gas in the gas,
the priority of the Bluetooth broadcast event is higher than that of the Bluetooth scanning event; and/or the presence of a gas in the gas,
the priority of the Bluetooth connection event is higher than that of the Bluetooth scanning event; and/or the presence of a gas in the gas,
the priority of the Bluetooth initiation state scanning event is higher than that of the Bluetooth scanning event or the Bluetooth broadcasting event; and/or;
the priority of the Bluetooth connection event is higher than that of the Bluetooth initiated state scanning event.
As an optional implementation manner, in the second aspect of the present invention, the scannable idle period may include a plurality of scannable time intervals, and a time interval exists between at least two of the scannable time intervals, and the apparatus further includes a duration modification module, configured to:
determining the maximum scanning duration of the Bluetooth scanning event;
for any scannable time interval, judging whether the duration of the scannable time interval is greater than the maximum scanning duration;
and when the judgment result is yes, modifying the time length of the scannable time interval into the maximum scanning time length.
As an optional implementation manner, in the second aspect of the present invention, the scannable idle period may include a plurality of scannable time intervals, and a time interval exists between at least two of the scannable time intervals, where the apparatus further includes a duration determining module, configured to:
for any one scannable time interval, determining a transmission preparation duration corresponding to the non-scanning priority event to be executed in the next time interval of the scannable time interval;
and determining the difference between the time length of the scannable time interval and the transmission preparation time length as a new time length of the scannable time interval.
As an optional implementation manner, in the second aspect of the present invention, the transmission preparation duration includes one or more of a software preparation duration, a hardware preparation duration, and a radio frequency preparation duration.
The third aspect of the present invention discloses another bluetooth scan event scheduling apparatus, which includes:
a memory storing executable program code;
a processor coupled with the memory;
the processor calls the executable program code stored in the memory to execute part or all of the steps of the bluetooth scan event scheduling method disclosed in the first aspect of the embodiments of the present invention.
The fourth aspect of the present invention discloses a bluetooth device, which includes a bluetooth scan event scheduling apparatus, where the bluetooth scan event scheduling apparatus is configured to perform some or all of the steps in the bluetooth scan event scheduling method disclosed in the first aspect of the present invention.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
in an embodiment of the invention, at least one non-scanning priority event expected to be executed in a target time period is determined; the non-scanning priority event is any Bluetooth data transmission event with the priority higher than that of a Bluetooth scanning type event in the preset priority sequence of the Bluetooth data transmission events; determining a scannable idle time period from the target time period according to the predicted execution time of the at least one non-scanning priority event; the scannable idle time period is a time interval within the target time period that is not occupied by an expected execution time interval of the non-scanning priority event; and determining the scannable idle time period as an execution time interval of the Bluetooth scanning event. Therefore, the invention can determine the time interval without the conflict event with higher priority from the target time period to carry out the Bluetooth scanning through the preset priority relation so as to schedule the Bluetooth scanning event, thereby realizing more flexible Bluetooth scanning function, and being beneficial to improving the efficiency of Bluetooth data transmission and the utilization rate of Bluetooth data transmission resources.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a bluetooth scan event scheduling method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a bluetooth scanning event scheduling apparatus according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of another bluetooth scan event scheduling apparatus according to an embodiment of the present invention;
FIG. 4 is a timing diagram illustrating the collision of a Bluetooth scan event with a Bluetooth broadcast event according to an embodiment of the present invention;
FIG. 5 is a timing comparison diagram of the adaptive scan mode and the normal scan mode of the Bluetooth in accordance with an embodiment of the present invention;
FIG. 6 is a timing diagram illustrating a transmission preparation duration according to an embodiment of the present invention;
FIG. 7 is a diagram of a hardware and software framework of an embodiment of an event scheduler disclosed in the embodiments of the present invention;
FIG. 8 is a flowchart illustrating a software implementation of an embodiment of an event scheduler disclosed in an embodiment of the present invention;
fig. 9 is a schematic diagram of a data transmission timing sequence of an embodiment of an event scheduling apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," and the like in the description and claims of the present invention and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, article, or article that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or article.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The invention discloses a method and a device for scheduling Bluetooth scanning events and Bluetooth equipment, which can determine a time interval without a higher priority conflict event from a target time period to perform Bluetooth scanning through a preset priority relation so as to schedule the Bluetooth scanning events, thereby realizing a more flexible Bluetooth scanning function, and being beneficial to improving the efficiency of Bluetooth data transmission and the utilization rate of Bluetooth data transmission resources. The following are detailed below.
Example one
Referring to fig. 1, fig. 1 is a flowchart illustrating a bluetooth scan event scheduling method according to an embodiment of the present invention. The method described in fig. 1 may be applied to corresponding bluetooth control equipment, a bluetooth control terminal, and a bluetooth control server, where the server may be a local server or a cloud server, and the embodiment of the present invention is not limited. The method described in the present invention can be applied to technologies of different generations of Bluetooth, and preferably, it can be applied to BLE (Bluetooth Low Energy) technology of Bluetooth 4.0. As shown in fig. 1, the bluetooth scan event scheduling method may include the following operations:
101. at least one non-scanning priority event expected to be performed within the target time period is determined.
In the embodiment of the invention, the non-scanning priority event is any Bluetooth data transmission event with the priority higher than that of the Bluetooth scanning event in the preset priority sequence of the Bluetooth data transmission event. Optionally, the non-scanning priority event comprises a bluetooth connection event and/or a bluetooth broadcast event. Optionally, the bluetooth scan-like event includes a bluetooth scan event and/or a bluetooth initiated status scan event.
In an embodiment of the present invention, the bluetooth data transmission event priority order is used to define priorities among a plurality of types of bluetooth data transmission events.
In the embodiment of the present invention, the target time period may be a current time period or a future time interval, which is not limited in the present invention. Optionally, the predicted execution in the target time period in the embodiment of the present invention may be performed in the target time period from the scheduled execution time of the corresponding bluetooth data transmission event, or the scheduled execution time of the corresponding bluetooth data transmission event may include part or all of the target time period, or the corresponding bluetooth data transmission event is being executed and the scheduled execution duration thereof intersects with the target time period, which is not limited in the present invention.
102. And determining a scannable idle time period from the target time periods according to the predicted execution time of the at least one non-scanning priority event.
In the embodiment of the invention, the scannable idle time period is a time interval which is not occupied by the predicted execution time interval of the non-scanning priority event in the target time period.
103. And determining the scannable idle time period as an execution time interval of the Bluetooth scanning type event.
Therefore, the method described in the embodiment of the present invention can determine, through the preset priority relationship, a time interval in which no higher priority conflict event exists from the target time period to perform bluetooth scanning, so as to schedule the bluetooth scanning event, thereby implementing a more flexible bluetooth scanning function, and contributing to improving the efficiency of bluetooth data transmission and the utilization rate of bluetooth data transmission resources.
In an alternative embodiment, the bluetooth data transmission event priority order may include:
the priority of the Bluetooth connection event is higher than that of the Bluetooth broadcast event; and/or the presence of a gas in the gas,
the priority of the Bluetooth broadcast event is higher than that of the Bluetooth scanning event; and/or the presence of a gas in the gas,
the priority of the Bluetooth connection event is higher than that of the Bluetooth scanning event; and/or the presence of a gas in the gas,
the priority of the Bluetooth initiating state scanning event is higher than that of the Bluetooth scanning event or the Bluetooth broadcasting event; and/or;
the priority of the bluetooth connection event is higher than the bluetooth initiated status scan event.
In the embodiment of the present invention, the priority order of the bluetooth data transmission event may be any one or more combinations of the multiple priority relationships, or may be directly located in the combination of all the priority relationships, that is: bluetooth connection event > bluetooth initiated state scan event > bluetooth broadcast event > bluetooth scan event. The bluetooth initiating state scanning event in the present invention should be distinguished from the bluetooth scanning event, the bluetooth initiating state scanning event should be defined as a scanning broadcast packet behavior performed by the bluetooth device in the initiating state for establishing a bluetooth connection, and the bluetooth scanning event should be defined as a scanning broadcast packet behavior performed by the bluetooth device in the scanning state.
Preferably, the bluetooth initiated scanning event is a BLE scanning behavior in an initiated state, specifically, the BLE device enters the initiated state before establishing a BLE connection, and a scanning broadcast packet behavior performed by the BLE device in the initiated state.
Preferably, the bluetooth scanning event is a scanning broadcast behavior of the BLE device in a scanning state, for example, a negative scanning behavior of the BLE device in a BLE Mesh (bluetooth low energy networking) technology.
Preferably, the bluetooth connection event is a BLE connection. Preferably, the bluetooth broadcast event is a BLE broadcast behavior, such as a BLE non-directional broadcast behavior of a BLE device in BLE Mesh (bluetooth low energy networking) technology.
In the embodiment of the present invention, the reason why the priority order of the bluetooth data transmission events is set as the above order is that in the bluetooth data transmission technology, such as BLE Mesh technology, bluetooth scanning needs to be started to maximize the data receiving capability of the bluetooth device, and the data sending capability of the bluetooth device is determined by the packet of the bluetooth broadcast, which also affects the active communication capability of the bluetooth device, and the active communication capability of the bluetooth device obviously has a higher priority than the passive communication capability, so the priority of the bluetooth broadcast event should be higher than that of the bluetooth scanning event. On the other hand, unlike the bluetooth broadcast event, when the bluetooth connection event is executed, data transmission must be performed at a certain time point, otherwise, the data retransmission rate is increased, and even the bluetooth connection is disconnected, so the bluetooth connection event should have the highest priority to ensure the stability of the bluetooth function. On the other hand, the bluetooth initiation state scanning event is the initiation scanning behavior of the bluetooth device before the bluetooth connection is established, and is the basis for establishing the bluetooth connection, so the priority of the bluetooth initiation state scanning event should be higher than other events except the bluetooth connection event, and optionally lower than or equal to the bluetooth connection event, so as to ensure that the execution thereof is not interrupted.
Therefore, the optional implementation method can establish a reasonable and efficient bluetooth data transmission event priority strategy, and can schedule the conflicting bluetooth data transmission events, so as to assist in realizing more flexible bluetooth scanning, and contribute to improving the efficiency of bluetooth data transmission and the utilization rate of bluetooth data transmission resources.
The priority order proposed by the above alternative embodiment may be used to schedule multiple conflicting bluetooth data transmission events, for example, when a higher priority conflicting event needs to be scheduled, a current low priority event may be suspended directly, but it still has the problem of improving the utilization of the bluetooth physical layer by a bluetooth scan event that fails to improve the bluetooth scan event.
Specifically, since the priority of the bluetooth scan event is lowest, when the bluetooth scan event is stopped using the bluetooth physical layer due to the occurrence of the bluetooth broadcast event or the bluetooth connection event, or the bluetooth scan event is determined not to use the bluetooth physical layer during scheduling, the bluetooth scan event needs to have an opportunity to contend for the bluetooth physical layer right of use in the next period, as shown in fig. 4, in the non-preemptible bluetooth physical layer, there is a high-priority bluetooth broadcast event during the bluetooth scan event window at time T0, and the bluetooth scan event needs to be scheduled in the next period T4, but since there is also a high-priority bluetooth broadcast event at time T4, the bluetooth scan event cannot use the bluetooth physical layer in the 2-cycle scheduling, but actually there is a high idle ratio of the bluetooth physical layer in fig. 4.
Therefore, in order to solve the problem, in the method, the bluetooth scan event is no longer a scan cycle as a scan rule, but all time intervals not occupied by higher priority events in a target time period are determined as intervals in which scanning can be performed, so that the utilization rate of the bluetooth physical layer by the bluetooth scan event is maximized.
A specific implementation of the embodiment of the present invention may refer to fig. 5, which is a BLE adaptive scanning mode applied in the BLE Mesh technology, and it is seen that the scanning window and the scanning initiation time point are adaptively adjusted according to time-sharing collision of a BLE PHY, so that all idle time slices of the BLE PHY are occupied by scanning, thereby maximizing the usage duty cycle of the BLE PHY. As shown in fig. 5, the difference between the BLE adaptive scanning mode and the normal scanning can be seen, which solves the problem that the BLE PHY has a high idle rate, and even if the BLE broadcast continuously transmits broadcast packets at intervals of 20ms, the time that the BLE PHY is occupied by the BLE scanning is still higher than 92%, so as to maximally improve the potential packet receiving performance of the BLE Mesh.
In another alternative embodiment, the scannable idle period may include a plurality of scannable time intervals, a time interval exists between at least two scannable time intervals, and the method further includes, before determining the scannable idle period as the execution time interval of the bluetooth scan type event in step 103:
determining the maximum scanning duration of the Bluetooth scanning event;
for any scannable time interval, judging whether the duration of the scannable time interval is greater than the maximum scanning duration;
when the judgment result is yes, the time length of the scannable time interval is modified into the maximum scanning time length;
and when the judgment result is negative, the scannable time interval is not changed.
The above setting is for making the execution time interval of bluetooth scanning class incident, be not more than its maximum scanning duration to can improve the utilization ratio to bluetooth physical layer to the at utmost, and avoid appearing because of the unnecessary duration in bluetooth scanning incident can not carry out but be occupied, and the unable condition of carrying out of other bluetooth data transmission incident that lead to.
Therefore, by implementing the optional implementation mode, the time length of the scannable event interval can be further adjusted by combining the maximum scanning time length, so that a more reasonable scanning time interval can be determined, and the improvement of the efficiency of Bluetooth data transmission and the utilization rate of Bluetooth data transmission resources are facilitated.
In yet another alternative embodiment, in step 103, the scannable idle period is determined to be before the execution time interval of the bluetooth scan type event, and the method further includes:
for any scannable time interval, determining a transmission preparation duration corresponding to a Bluetooth data transmission event to be executed in a next time interval of the scannable time interval;
and determining the difference between the duration of the scannable time interval and the transmission preparation duration as a new duration of the scannable time interval.
Preferably, the transmission preparation duration is a preparation duration that needs to be reserved before the bluetooth data transmission event is executed, which may be a time consumed by some software and hardware preparation operations for implementing the bluetooth data transmission event, and the transmission preparation duration may include one or more of a software preparation duration, a hardware preparation duration, and a radio frequency preparation duration. In a specific implementation of this optional embodiment, considering that there is a quantitative time deviation Δ T for the use time of the BLE PHY, when there is some reserved time of software and hardware before the start of another event when a certain BLE event ends, so that the difference between the time point occupied by the BLE PHY and the time point of the end time of the previous event reflected in the air interface by another event is the time deviation Δ T, as shown in fig. 6, a time point at which a BLE connection event needs to transmit and receive packets in the air interface is T2, according to the adaptive scanning mode, the scanning event needs to stop using the BLE PHY at T2, but in an actual implementation of the technical solution, the scanning event needs to end using the BLE PHY at T1 before T2 so that Δ T is equal to (T2-T1), and the PHY Δ T may also consider that the connection event uses the reserved time of the BLE PHY before transmitting and receiving packets in the air interface, however, in practice, the sum of various times such as software scheduling time, hardware link control time, RF preparation time and the like may be used, the composition and the size of Δ t are related to implementation of a specific technical scheme, and the value needs to be determined repeatedly in implementation, so as to avoid that the use of the BLE PHY does not meet expectations.
Therefore, by implementing the optional implementation mode, the time length of the scannable event interval can be further adjusted by combining the transmission preparation time length, so that a more reasonable scanning time interval can be determined, and the improvement of the efficiency of Bluetooth data transmission and the utilization rate of Bluetooth data transmission resources are facilitated.
Optionally, the transmission preparation duration may be determined by obtaining a historical transmission record from the target BLE device, and determining the transmission preparation duration according to a plurality of historical transmission preparation durations in the historical transmission record, for example, calculating an average value or a median or a maximum value of the plurality of historical transmission preparation durations as the transmission preparation duration.
The embodiment of the invention also discloses a technical implementation scheme comprising a software and hardware architecture and a software flow which can be used for executing the scheduling method, which comprises the technical details of the application of BLE Mesh to the BLE PHY, the configuration parameters, the parameter application method and the parameter quantification method of the BLE Mesh application, so that the time-sharing efficient utilization of the BLE PHY is realized, and the reliability of data transmission in a BLE Mesh network is ensured under a specific environment and a specific BLE Mesh topological structure.
The implementation method of the technical embodiment comprises the following parts:
a first part: fig. 7 is a diagram of a software and hardware framework used in implementing an embodiment of the technology, and illustrates several main components, namely, a BLE Mesh application, a BLE protocol stack, a software scheduler, a hardware link controller, and a BLE PHY.
The software scheduler mainly functions to configure and control the hardware link controller to use the BLE PHY to transmit and receive link layer data at a specific time point according to a priority policy in the above embodiments, and the hardware link controller is responsible for physical link management including link layer data packet management, timing control, physical layer link configuration parameters, and wired/wireless hardware interaction interface management.
A second part: with reference to fig. 8, a general software implementation flow of the technical embodiment is briefly described:
firstly, starting an application program (including protocol stack starting and BLE controller starting);
enabling the BLE controller to enter an adaptive broadcasting mode and an adaptive scanning mode (configured through a vendor-defined HCI instruction) by an application program;
thirdly, setting protocol stack parameters (such as setting network method packet sending intervals and retransmission numbers) by the application program;
enabling BLE scanning to enter data receiving by an application program (under the action of a software scheduler, a BLE controller uses a BLE PHY (physical layer) in an adaptive scanning mode and a high duty ratio to receive at the maximum capacity);
and fifthly, putting an application packet receiving and transmitting processing program, a protocol stack data packet receiving and transmitting program, a software scheduler, a link controller, an interrupt controller and a BLE PHY into a self-circulation packet receiving and transmitting processing flow to jointly complete the work function of the BLE Mesh network equipment.
And a third part: the fifth flow step of the second part is described in detail to show details of software and hardware cooperation so as to embody the implementation method of the scheduling method of the bluetooth data transmission event and the process of implementing the method to complete efficient PHY time-sharing utilization, thereby implementing the performance optimization of BLE Mesh transceiving in the technical implementation scheme. The software scheduler module is composed of a scheduling list, a software priority policy and a scheduling algorithm, the scheduling list manages the current BLE event, the BLE PHY at a certain time T0 is being used by a certain event, if the BLE PHY is not able to be preempted, the BLE software scheduler will set its flag bit to indicate scheduling is prohibited until the event used by the BLE PHY is released, when the BLE PHY is finished being used, the scheduler software will be notified by the interrupt controller, the scheduler software will clear the flag that the BLE PHY is occupied and traverse the scheduling list, the scheduling priority policy and the scheduling algorithm are used to select the next BLE event that can use the BLE PHY, first, the scheduler reads the current time point T1 and finds the connection event from the scheduling list that is the latest connection time point T2, if T2 exists, so that the condition 1 "(T2-T1-Tsw-Thw) ═ twinnsin (i.e. the minimum scan window corresponding to scan event)" holds, if the time for broadcasting the event in the scheduling list, which is preset to need to use the BLE PHY, is T3, and if there is T3, so that condition 2 "(T3-T1-Tsw-Thw) > is true for twinscan," BLE PHY is used in BLE scan at time T1+ Tsw + Thw, (Tsw + Thw) is the transmission preparation time length described in the above embodiment, where Tsw represents the software time length that the software scheduler expects to start scheduling from time T1 to control the link manager, and Thw represents the time length that the hardware link controller starts to execute the scheduling command until the BLE PHY receives and transmits the packet over the air interface. The duration of the BLE scan is the minimum of T2-T1-Tsw-Thw, T3-T1-Tsw-Thw, and Twinscan (i.e., the maximum scan duration described in the above embodiments). Whether the next BLE PHY to be used is BLE broadcast or BLE connection is also calculated through the scheduling list, the scheduling algorithm, and the scheduling policy, and the details of the calculation are in accordance with the adaptive scanning mode indicated in the above embodiments. Secondly, when the scheduling software selects an Event1 which is to use the BLE PHY, the scheduling software needs to read the current time T0 and the time T1 which is preset by the scheduling Event and needs to transmit and receive packets over the air interface, when T1-T0> Thw, the scheduling software controls the link controller to execute hardware scheduling of Event1 through the register to use the BLE PHY, and if T1-T0< ═ Thw, the scheduling software needs to abandon the scheduling and re-execute scheduling selection, for example, for a BLE connection Event, the connection aiming point time of the BLE connection Event needs to be adjusted to the next aiming point time of the connection Event. And finally, the BLE PHY returns to the scheduling module to perform scheduling again through the interrupt controller after the BLE PHY finishes the air interface packet receiving and sending behaviors of the BLE event. The BLE Mesh application can change a scheduling list in the scheduling module through switch BLE broadcasting or switch BLE scanning, so that the purpose of changing the behavior of the BLE Mesh transceiving packets is achieved. Fig. 9 shows a specific timing example after the implementation of the embodiment of the present technology.
The fourth part: configuration parameters and parameter quantification methods and methods of use are applied with respect to BLE Mesh. The BLE Mesh may change the maximum scan window value Twinscan of the adaptive scan pattern by changing the scan window in the scan parameter, where the Twinscan size will affect the BLE broadcast packet delay in the non-preemptive BLE PHY, and the BLE Mesh application may control the BLE broadcast packet delay by changing the parameter. The BLE Mesh can obtain relatively reliable Mesh data transmission by changing the packet sending interval and the packet sending retransmission number of the Mesh protocol stack network. Assuming that quantitative BLE Mesh devices are arranged in a quantitative interference environment, the devices can receive BLE wireless signals of the other party, and transmit packets at a certain frequency, for example, 20ms intervals, where the minimum receiving success rate between any two devices is P, then the number of retransmissions for reliable transmission in this environment is (1/P + 1).
Optionally, for the above technical implementation, two sets of respective bluetooth physical layers and bluetooth radio frequency modules may be used to respectively implement bluetooth packet reception and bluetooth packet transmission.
Optionally, the implementation of the scheduling method in the embodiment of the present invention may be a scheduling scheme in which software performs link control, or may be a hardware arbitration device, which is not limited in the present invention.
Optionally, the bluetooth data transmission physical resource occupied by the conflicting bluetooth data transmission event by the scheduling method in the embodiment of the present invention may be a physical layer resource, for example, a BLE PHY resource, or other resources, such as a classic bluetooth physical layer resource conflict in a classic bluetooth/enhanced data rate bluetooth/bluetooth low energy dual mode controller or a radio frequency resource time sharing conflict used when coexisting with a wireless local area network. Optionally, the scheduling method in the embodiment of the present invention may be used in a BLE controller chip, a classic bluetooth/enhanced data rate bluetooth/low power consumption bluetooth controller chip, or a two-in-one dual-mode chip of classic bluetooth/enhanced data rate bluetooth/low power consumption bluetooth + wireless lan.
When the method is applied to the BLE Mesh technology, the transmitting and receiving performance of the BLE Mesh equipment is improved as a design starting point, a BLE Mesh protocol stack does not need to be modified, the method is universal, and the problem caused by using a BLE PHY (physical layer) in a BLE Mesh time-sharing mode can be solved. Specifically, although the bottom layer communication mode of the BLE Mesh is realized based on a BLE broadcast channel, the BLE Mesh is greatly different from the common BLE application, the requirement on data transmission of the BLE broadcast channel is higher, and particularly, when the capacity of using the BLE PHY in a time-sharing manner is insufficient, the optimization and improvement of the invention have strong pertinence and general significance.
Example two
Referring to fig. 2, fig. 2 is a schematic structural diagram of a bluetooth scan event scheduling apparatus according to an embodiment of the present invention. The apparatus described in fig. 2 may be applied to a corresponding bluetooth control device, a bluetooth control terminal, and a bluetooth control server, where the server may be a local server or a cloud server, and the embodiment of the present invention is not limited thereto. The device described in the present invention can be applied to technologies of different generations of Bluetooth, and preferably, it can be applied to BLE (Bluetooth Low Energy) technology of Bluetooth 4.0. As shown in fig. 2, the apparatus may include:
a first determination module 201 for determining at least one non-scanning priority event expected to be performed within a target time period.
In the embodiment of the invention, the non-scanning priority event is any Bluetooth data transmission event with the priority higher than that of the Bluetooth scanning event in the preset priority sequence of the Bluetooth data transmission event. Optionally, the non-scanning priority event comprises a bluetooth connection event and/or a bluetooth broadcast event. Optionally, the bluetooth scan-like event includes a bluetooth scan event and/or a bluetooth initiated status scan event.
In an embodiment of the present invention, the bluetooth data transmission event priority order is used to define priorities among a plurality of types of bluetooth data transmission events.
In the embodiment of the present invention, the target time period may be a current time period or a future time interval, which is not limited in the present invention. Optionally, the predicted execution in the target time period in the embodiment of the present invention may be performed in the target time period from the scheduled execution time of the corresponding bluetooth data transmission event, or the scheduled execution time of the corresponding bluetooth data transmission event may include part or all of the target time period, or the corresponding bluetooth data transmission event is being executed and the scheduled execution duration thereof intersects with the target time period, which is not limited in the present invention.
A second determining module 202, configured to determine a scannable idle time period from the target time periods according to an expected execution time of at least one non-scanning priority event.
In the embodiment of the invention, the scannable idle time period is a time interval which is not occupied by the predicted execution time interval of the non-scanning priority event in the target time period.
A third determining module 203, configured to determine the scannable idle time period as an execution time interval of the bluetooth scan event.
Therefore, the device described in the embodiment of the present invention can determine, through the preset priority relationship, a time interval in which no higher priority conflict event exists from the target time period to perform bluetooth scanning, so as to schedule the bluetooth scanning event, thereby implementing a more flexible bluetooth scanning function, and contributing to improving the efficiency of bluetooth data transmission and the utilization rate of bluetooth data transmission resources.
As an alternative embodiment, the bluetooth data transmission event priority order comprises:
the priority of the Bluetooth connection event is higher than that of the Bluetooth broadcast event; and/or the presence of a gas in the gas,
the priority of the Bluetooth broadcast event is higher than that of the Bluetooth scanning event; and/or the presence of a gas in the gas,
the priority of the Bluetooth connection event is higher than that of the Bluetooth scanning event; and/or the presence of a gas in the gas,
the priority of the Bluetooth initiating state scanning event is higher than that of the Bluetooth scanning event or the Bluetooth broadcasting event; and/or;
the priority of the bluetooth connection event is higher than the bluetooth initiated status scan event.
In the embodiment of the present invention, the priority order of the bluetooth data transmission event may be any one or more combinations of the multiple priority relationships, or may be directly located in the combination of all the priority relationships, that is: bluetooth connection event > bluetooth initiated state scan event > bluetooth broadcast event > bluetooth scan event. The bluetooth initiating state scanning event in the present invention should be distinguished from the bluetooth scanning event, the bluetooth initiating state scanning event should be defined as a scanning broadcast packet behavior performed by the bluetooth device in the initiating state for establishing a bluetooth connection, and the bluetooth scanning event should be defined as a scanning broadcast packet behavior performed by the bluetooth device in the scanning state.
Preferably, the bluetooth initiated scanning event is a BLE scanning behavior in an initiated state, specifically, the BLE device enters the initiated state before establishing a BLE connection, and a scanning broadcast packet behavior performed by the BLE device in the initiated state.
Preferably, the bluetooth scanning event is a scanning broadcast behavior of the BLE device in a scanning state, for example, a negative scanning behavior of the BLE device in a BLE Mesh (bluetooth low energy networking) technology.
Preferably, the bluetooth connection event is a BLE connection. Preferably, the bluetooth broadcast event is a BLE broadcast behavior, such as a BLE non-directional broadcast behavior of a BLE device in BLE Mesh (bluetooth low energy networking) technology.
In the embodiment of the present invention, the reason why the priority order of the bluetooth data transmission events is set as the above order is that in the bluetooth data transmission technology, such as BLE Mesh technology, bluetooth scanning needs to be started to maximize the data receiving capability of the bluetooth device, and the data sending capability of the bluetooth device is determined by the packet of the bluetooth broadcast, which also affects the active communication capability of the bluetooth device, and the active communication capability of the bluetooth device obviously has a higher priority than the passive communication capability, so the priority of the bluetooth broadcast event should be higher than that of the bluetooth scanning event. On the other hand, unlike the bluetooth broadcast event, when the bluetooth connection event is executed, data transmission must be performed at a certain time point, otherwise, the data retransmission rate is increased, and even the bluetooth connection is disconnected, so the bluetooth connection event should have the highest priority to ensure the stability of the bluetooth function. On the other hand, the bluetooth initiation state scanning event is the initiation scanning behavior of the bluetooth device before the bluetooth connection is established, and is the basis for establishing the bluetooth connection, so the priority of the bluetooth initiation state scanning event should be higher than other events except the bluetooth connection event, and optionally lower than or equal to the bluetooth connection event, so as to ensure that the execution thereof is not interrupted.
Therefore, the optional implementation method can establish a reasonable and efficient bluetooth data transmission event priority strategy, and can schedule the conflicting bluetooth data transmission events, so as to assist in realizing more flexible bluetooth scanning, and contribute to improving the efficiency of bluetooth data transmission and the utilization rate of bluetooth data transmission resources.
The priority order proposed by the above alternative embodiment may be used to schedule multiple conflicting bluetooth data transmission events, for example, when a higher priority conflicting event needs to be scheduled, a current low priority event may be suspended directly, but it still has the problem of improving the utilization of the bluetooth physical layer by a bluetooth scan event that fails to improve the bluetooth scan event.
Specifically, since the priority of the bluetooth scan event is lowest, when the bluetooth scan event is stopped using the bluetooth physical layer due to the occurrence of the bluetooth broadcast event or the bluetooth connection event, or the bluetooth scan event is determined not to use the bluetooth physical layer during scheduling, the bluetooth scan event needs to have an opportunity to contend for the bluetooth physical layer right of use in the next period, as shown in fig. 4, in the non-preemptible bluetooth physical layer, there is a high-priority bluetooth broadcast event during the bluetooth scan event window at time T0, and the bluetooth scan event needs to be scheduled in the next period T4, but since there is also a high-priority bluetooth broadcast event at time T4, the bluetooth scan event cannot use the bluetooth physical layer in the 2-cycle scheduling, but actually there is a high idle ratio of the bluetooth physical layer in fig. 4.
Therefore, in order to solve the problem, in the method, the bluetooth scan event is no longer a scan cycle as a scan rule, but all time intervals not occupied by higher priority events in a target time period are determined as intervals in which scanning can be performed, so that the utilization rate of the bluetooth physical layer by the bluetooth scan event is maximized.
A specific implementation of the embodiment of the present invention may refer to fig. 5, which is a BLE adaptive scanning mode applied in the BLE Mesh technology, and it is seen that the scanning window and the scanning initiation time point are adaptively adjusted according to time-sharing collision of a BLE PHY, so that all idle time slices of the BLE PHY are occupied by scanning, thereby maximizing the usage duty cycle of the BLE PHY. As shown in fig. 5, the difference between the BLE adaptive scanning mode and the normal scanning can be seen, which solves the problem that the BLE PHY has a high idle rate, and even if the BLE broadcast continuously transmits broadcast packets at intervals of 20ms, the time that the BLE PHY is occupied by the BLE scanning is still higher than 92%, so as to maximally improve the potential packet receiving performance of the BLE Mesh.
As an optional implementation manner, the scannable idle period may include a plurality of scannable time intervals, a time interval exists between at least two scannable time intervals, and the apparatus further includes a duration modification module, configured to:
determining the maximum scanning duration of the Bluetooth scanning event;
for any scannable time interval, judging whether the duration of the scannable time interval is greater than the maximum scanning duration;
and when the judgment result is yes, modifying the duration of the scannable time interval into the maximum scanning duration.
The above setting is for making the execution time interval of bluetooth scanning class incident, be not more than its maximum scanning duration to can improve the utilization ratio to bluetooth physical layer to the at utmost, and avoid appearing because of the unnecessary duration in bluetooth scanning incident can not carry out but be occupied, and the unable condition of carrying out of other bluetooth data transmission incident that lead to.
Therefore, by implementing the optional implementation mode, the time length of the scannable event interval can be further adjusted by combining the maximum scanning time length, so that a more reasonable scanning time interval can be determined, and the improvement of the efficiency of Bluetooth data transmission and the utilization rate of Bluetooth data transmission resources are facilitated.
As an optional implementation manner, the scannable idle period may include a plurality of scannable time intervals, a time interval exists between at least two scannable time intervals, and the apparatus further includes a duration determining module, configured to:
for any scannable time interval, determining a transmission preparation duration corresponding to a non-scanning priority event to be executed in a next time interval of the scannable time interval;
and determining the difference between the duration of the scannable time interval and the transmission preparation duration as a new duration of the scannable time interval.
Preferably, the transmission preparation duration is a preparation duration that needs to be reserved before the bluetooth data transmission event is executed, which may be a time consumed by some software and hardware preparation operations for implementing the bluetooth data transmission event, and the transmission preparation duration may include one or more of a software preparation duration, a hardware preparation duration, and a radio frequency preparation duration. In a specific implementation of this optional embodiment, considering that there is a quantitative time deviation Δ T for the use time of the BLE PHY, when there is some reserved time of software and hardware before the start of another event when a certain BLE event ends, so that the difference between the time point occupied by the BLE PHY and the time point of the end time of the previous event reflected in the air interface by another event is the time deviation Δ T, as shown in fig. 6, a time point at which a BLE connection event needs to transmit and receive packets in the air interface is T2, according to the adaptive scanning mode, the scanning event needs to stop using the BLE PHY at T2, but in an actual implementation of the technical solution, the scanning event needs to end using the BLE PHY at T1 before T2 so that Δ T is equal to (T2-T1), and the PHY Δ T may also consider that the connection event uses the reserved time of the BLE PHY before transmitting and receiving packets in the air interface, however, in practice, the sum of various times such as software scheduling time, hardware link control time, RF preparation time and the like may be used, the composition and the size of Δ t are related to implementation of a specific technical scheme, and the value needs to be determined repeatedly in implementation, so as to avoid that the use of the BLE PHY does not meet expectations.
Therefore, by implementing the optional implementation mode, the time length of the scannable event interval can be further adjusted by combining the transmission preparation time length, so that a more reasonable scanning time interval can be determined, and the improvement of the efficiency of Bluetooth data transmission and the utilization rate of Bluetooth data transmission resources are facilitated.
Optionally, the transmission preparation duration may be determined by obtaining a historical transmission record from the target BLE device, and determining the transmission preparation duration according to a plurality of historical transmission preparation durations in the historical transmission record, for example, calculating an average value or a median or a maximum value of the plurality of historical transmission preparation durations as the transmission preparation duration.
Specifically, the scheduling method in the embodiment of the present invention is a hardware implementation scheme of the scheduling apparatus in the first embodiment, and specific technical details or implementation schemes thereof may refer to the description in the first embodiment, which is not described herein again.
The embodiment of the invention also discloses a technical implementation scheme comprising a software and hardware architecture and a software flow which can be used for executing the scheduling device, which comprises the technical details of the application of BLE Mesh to the BLE PHY, the configuration parameters, the parameter application method and the parameter quantification method of the BLE Mesh application, so that the time-sharing efficient utilization of the BLE PHY is realized, and the reliability of data transmission in a BLE Mesh network is ensured under a specific environment and a specific BLE Mesh topological structure.
The implementation method of the technical embodiment comprises the following parts:
a first part: fig. 7 is a diagram of a software and hardware framework used in implementing an embodiment of the technology, and illustrates several main components, namely, a BLE Mesh application, a BLE protocol stack, a software scheduler, a hardware link controller, and a BLE PHY.
The software scheduler mainly functions to configure and control the hardware link controller to use the BLE PHY to transmit and receive link layer data at a specific time point according to a priority policy in the above embodiments, and the hardware link controller is responsible for physical link management including link layer data packet management, timing control, physical layer link configuration parameters, and wired/wireless hardware interaction interface management.
A second part: with reference to fig. 8, a general software implementation flow of the technical embodiment is briefly described:
firstly, starting an application program (including protocol stack starting and BLE controller starting);
enabling the BLE controller to enter an adaptive broadcasting mode and an adaptive scanning mode (configured through a vendor-defined HCI instruction) by an application program;
thirdly, setting protocol stack parameters (such as setting network method packet sending intervals and retransmission numbers) by the application program;
enabling BLE scanning to enter data receiving by an application program (under the action of a software scheduler, a BLE controller uses a BLE PHY (physical layer) in an adaptive scanning mode and a high duty ratio to receive at the maximum capacity);
and fifthly, putting an application packet receiving and transmitting processing program, a protocol stack data packet receiving and transmitting program, a software scheduler, a link controller, an interrupt controller and a BLE PHY into a self-circulation packet receiving and transmitting processing flow to jointly complete the work function of the BLE Mesh network equipment.
And a third part: the fifth flow step of the second part is described in detail to illustrate details of software and hardware cooperation so as to embody the implementation method of the scheduling device for bluetooth data transmission events described in the above embodiment and a process of implementing the method to complete efficient PHY time-sharing utilization, so as to implement application of performance optimization of BLE Mesh transceiving in a technical implementation scheme. The software scheduler module is composed of a scheduling list, a software priority policy and a scheduling algorithm, the scheduling list manages the current BLE event, the BLE PHY at a certain time T0 is being used by a certain event, if the BLE PHY is not able to be preempted, the BLE software scheduler will set its flag bit to indicate scheduling is prohibited until the event used by the BLE PHY is released, when the BLE PHY is finished being used, the scheduler software will be notified by the interrupt controller, the scheduler software will clear the flag that the BLE PHY is occupied and traverse the scheduling list, the scheduling priority policy and the scheduling algorithm are used to select the next BLE event that can use the BLE PHY, first, the scheduler reads the current time point T1 and finds the connection event from the scheduling list that is the latest connection time point T2, if T2 exists, so that the condition 1 "(T2-T1-Tsw-Thw) ═ twinnsin (i.e. the minimum scan window corresponding to scan event)" holds, if the time for broadcasting the event in the scheduling list, which is preset to need to use the BLE PHY, is T3, and if there is T3, so that condition 2 "(T3-T1-Tsw-Thw) > is true for twinscan," BLE PHY is used in BLE scan at time T1+ Tsw + Thw, (Tsw + Thw) is the transmission preparation time length described in the above embodiment, where Tsw represents the software time length that the software scheduler expects to start scheduling from time T1 to control the link manager, and Thw represents the time length that the hardware link controller starts to execute the scheduling command until the BLE PHY receives and transmits the packet over the air interface. The duration of the BLE scan is the minimum of T2-T1-Tsw-Thw, T3-T1-Tsw-Thw, and Twinscan (i.e., the maximum scan duration described in the above embodiments). Whether the next BLE PHY to be used is BLE broadcast or BLE connection is also calculated through the scheduling list, the scheduling algorithm, and the scheduling policy, and the details of the calculation are in accordance with the adaptive scanning mode indicated in the above embodiments. Secondly, when the scheduling software selects an Event1 which is to use the BLE PHY, the scheduling software needs to read the current time T0 and the time T1 which is preset by the scheduling Event and needs to transmit and receive packets over the air interface, when T1-T0> Thw, the scheduling software controls the link controller to execute hardware scheduling of Event1 through the register to use the BLE PHY, and if T1-T0< ═ Thw, the scheduling software needs to abandon the scheduling and re-execute scheduling selection, for example, for a BLE connection Event, the connection aiming point time of the BLE connection Event needs to be adjusted to the next aiming point time of the connection Event. And finally, the BLE PHY returns to the scheduling module to perform scheduling again through the interrupt controller after the BLE PHY finishes the air interface packet receiving and sending behaviors of the BLE event. The BLE Mesh application can change a scheduling list in the scheduling module through switch BLE broadcasting or switch BLE scanning, so that the purpose of changing the behavior of the BLE Mesh transceiving packets is achieved. Fig. 9 shows a specific timing example after the implementation of the embodiment of the present technology.
The fourth part: configuration parameters and parameter quantification methods and methods of use are applied with respect to BLE Mesh. The BLE Mesh may change the maximum scan window value Twinscan of the adaptive scan pattern by changing the scan window in the scan parameter, where the Twinscan size will affect the BLE broadcast packet delay in the non-preemptive BLE PHY, and the BLE Mesh application may control the BLE broadcast packet delay by changing the parameter. The BLE Mesh can obtain relatively reliable Mesh data transmission by changing the packet sending interval and the packet sending retransmission number of the Mesh protocol stack network. Assuming that quantitative BLE Mesh devices are arranged in a quantitative interference environment, the devices can receive BLE wireless signals of the other party, and transmit packets at a certain frequency, for example, 20ms intervals, where the minimum receiving success rate between any two devices is P, then the number of retransmissions for reliable transmission in this environment is (1/P + 1).
Optionally, for the above technical implementation, two sets of respective bluetooth physical layers and bluetooth radio frequency modules may be used to respectively implement bluetooth packet reception and bluetooth packet transmission.
Optionally, the implementation of the scheduling apparatus in the embodiment of the present invention may be a scheduling scheme in which software performs link control, or may be a hardware arbitration apparatus, which is not limited in the present invention.
Optionally, the bluetooth data transmission physical resource occupied by the conflicting bluetooth data transmission event for which the scheduling apparatus described in the embodiment of the present invention is directed may be a physical layer resource, for example, a BLE PHY resource, or other resources, such as a classic bluetooth physical layer resource conflict in a classic bluetooth/enhanced data rate bluetooth/bluetooth low energy dual mode controller or a radio frequency resource time sharing conflict used when coexisting with a wireless local area network. Optionally, the scheduling device in the embodiment of the present invention may be used in a BLE controller chip, a classic bluetooth/enhanced data rate bluetooth/low power consumption bluetooth controller chip, or a two-in-one dual-mode chip of classic bluetooth/enhanced data rate bluetooth/low power consumption bluetooth + wireless lan.
When the method is applied to the BLE Mesh technology, the transmitting and receiving performance of the BLE Mesh equipment is improved as a design starting point, a BLE Mesh protocol stack does not need to be modified, the method is universal, and the problem caused by using a BLE PHY (physical layer) in a BLE Mesh time-sharing mode can be solved. Specifically, although the bottom layer communication mode of the BLE Mesh is realized based on a BLE broadcast channel, the BLE Mesh is greatly different from the common BLE application, the requirement on data transmission of the BLE broadcast channel is higher, and particularly, when the capacity of using the BLE PHY in a time-sharing manner is insufficient, the optimization and improvement of the invention have strong pertinence and general significance.
EXAMPLE III
Referring to fig. 3, fig. 3 is a schematic structural diagram of another bluetooth scan event scheduling apparatus according to an embodiment of the present invention. As shown in fig. 3, the apparatus may include:
a memory 301 storing executable program code;
a processor 302 coupled to the memory 301;
the processor 302 calls the executable program code stored in the memory 301 to perform part or all of the steps of the bluetooth scan event scheduling method disclosed in the embodiment of the present invention.
Example four
The embodiment of the invention discloses a computer storage medium, which stores computer instructions, and when the computer instructions are called, the computer instructions are used for executing part or all of the steps in the Bluetooth scanning event scheduling method disclosed by the embodiment of the invention.
EXAMPLE five
The embodiment of the invention discloses Bluetooth equipment which comprises a Bluetooth scanning event scheduling device, wherein the Bluetooth scanning event scheduling device is used for executing part or all steps in the Bluetooth scanning event scheduling method in the embodiment of the invention. Optionally, details of the technical implementation scheme disclosed in the first embodiment or the second embodiment may be referred to in the specific implementation scheme of the bluetooth device, and are not described herein again.
The above-described embodiments of the apparatus are merely illustrative, and the modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above detailed description of the embodiments, those skilled in the art will clearly understand that the embodiments may be implemented by software plus a necessary general hardware platform, and may also be implemented by hardware. Based on such understanding, the above technical solutions may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, where the storage medium includes a Read-Only Memory (ROM), a Random Access Memory (RAM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), a One-time Programmable Read-Only Memory (OTPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc-Read-Only Memory (CD-ROM), or other disk memories, CD-ROMs, or other magnetic disks, A tape memory, or any other medium readable by a computer that can be used to carry or store data.
Finally, it should be noted that: the method, apparatus and bluetooth device for scheduling bluetooth scan events disclosed in the embodiments of the present invention are only preferred embodiments of the present invention, and are only used for illustrating the technical solutions of the present invention, rather than for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art; the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for scheduling Bluetooth scanning events, the method comprising:
determining at least one non-scanning priority event expected to be performed within a target time period; the non-scanning priority event is any Bluetooth data transmission event with the priority higher than that of a Bluetooth scanning type event in the preset priority sequence of the Bluetooth data transmission events;
determining a scannable idle time period from the target time period according to the predicted execution time of the at least one non-scanning priority event; the scannable idle time period is a time interval within the target time period that is not occupied by an expected execution time interval of the non-scanning priority event;
and determining the scannable idle time period as an execution time interval of the Bluetooth scanning event.
2. The method according to claim 1, wherein the bluetooth scan event comprises a bluetooth scan event and/or a bluetooth initiated scan event.
3. The bluetooth scan event scheduling method of claim 2, wherein the non-scan priority event comprises a bluetooth connection event and/or a bluetooth broadcast event.
4. The bluetooth scan event scheduling method of claim 3, wherein the bluetooth data transmission event priority order comprises:
the priority of the Bluetooth connection event is higher than that of the Bluetooth broadcast event; and/or the presence of a gas in the gas,
the priority of the Bluetooth broadcast event is higher than that of the Bluetooth scanning event; and/or the presence of a gas in the gas,
the priority of the Bluetooth connection event is higher than that of the Bluetooth scanning event; and/or the presence of a gas in the gas,
the priority of the Bluetooth initiation state scanning event is higher than that of the Bluetooth scanning event or the Bluetooth broadcasting event; and/or;
the priority of the Bluetooth connection event is higher than that of the Bluetooth initiated state scanning event.
5. The bluetooth scan event scheduling method of claim 1, wherein the scannable idle period comprises a plurality of scannable time intervals, there is a time interval between at least two of the scannable time intervals, and the method further comprises, before determining the scannable idle period as the execution time interval of the bluetooth scan event:
determining the maximum scanning duration of the Bluetooth scanning event;
for any scannable time interval, judging whether the duration of the scannable time interval is greater than the maximum scanning duration;
and when the judgment result is yes, modifying the time length of the scannable time interval into the maximum scanning time length.
6. The bluetooth scan event scheduling method of claim 1, wherein the scannable idle period comprises a plurality of scannable time intervals, there is a time interval between at least two of the scannable time intervals, and the method further comprises, before determining the scannable idle period as the execution time interval of the bluetooth scan event:
for any one scannable time interval, determining a transmission preparation duration corresponding to the non-scanning priority event to be executed in the next time interval of the scannable time interval;
and determining the difference between the time length of the scannable time interval and the transmission preparation time length as a new time length of the scannable time interval.
7. The bluetooth scan event scheduling method of claim 6, wherein the transmission setup period comprises one or more of a software setup period, a hardware setup period, and a radio frequency setup period.
8. An apparatus for scheduling bluetooth scan events, the apparatus comprising:
a first determination module to determine at least one non-scanning priority event expected to be performed within a target time period; the non-scanning priority event is any Bluetooth data transmission event with the priority higher than that of a Bluetooth scanning type event in the preset priority sequence of the Bluetooth data transmission events;
a second determining module, configured to determine a scannable idle time period from the target time period according to an expected execution time of the at least one non-scanning priority event; the scannable idle time period is a time interval within the target time period that is not occupied by an expected execution time interval of the non-scanning priority event;
and the third determining module is used for determining the scannable idle time period as the execution time interval of the Bluetooth scanning event.
9. A bluetooth scanning event scheduling device, wherein the device is adapted to a smart card, the device comprising:
a memory storing executable program code;
a processor coupled with the memory;
the processor calls the executable program code stored in the memory to execute the bluetooth scan event scheduling method of any of claims 1-7.
10. A bluetooth device, characterized in that it comprises bluetooth scan event scheduling means for performing the bluetooth scan event scheduling method according to any of claims 1-7.
CN202110688169.0A 2021-04-28 2021-06-21 Bluetooth scanning event scheduling method and device and Bluetooth equipment Active CN113423098B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2021104643999 2021-04-28
CN202110464399 2021-04-28

Publications (2)

Publication Number Publication Date
CN113423098A true CN113423098A (en) 2021-09-21
CN113423098B CN113423098B (en) 2022-12-02

Family

ID=77789596

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110688169.0A Active CN113423098B (en) 2021-04-28 2021-06-21 Bluetooth scanning event scheduling method and device and Bluetooth equipment

Country Status (1)

Country Link
CN (1) CN113423098B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115278634A (en) * 2022-06-30 2022-11-01 海信视像科技股份有限公司 Display device and Bluetooth scanning method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104936211A (en) * 2015-04-27 2015-09-23 深圳市金立通信设备有限公司 Wireless resource distribution method
CN110297701A (en) * 2019-05-16 2019-10-01 平安科技(深圳)有限公司 Data processing operation dispatching method, device, computer equipment and storage medium
US20200015163A1 (en) * 2017-03-14 2020-01-09 Huawei Technologies Co., Ltd. Scanning Method and Device
CN110972120A (en) * 2018-09-29 2020-04-07 安凯(广州)微电子技术有限公司 Low-power-consumption Bluetooth device multilink management method, system and device
CN112291718A (en) * 2020-10-16 2021-01-29 精伦电子股份有限公司 Service scheduling method and system based on low-power-consumption Bluetooth broadcast

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104936211A (en) * 2015-04-27 2015-09-23 深圳市金立通信设备有限公司 Wireless resource distribution method
US20200015163A1 (en) * 2017-03-14 2020-01-09 Huawei Technologies Co., Ltd. Scanning Method and Device
CN110972120A (en) * 2018-09-29 2020-04-07 安凯(广州)微电子技术有限公司 Low-power-consumption Bluetooth device multilink management method, system and device
CN110297701A (en) * 2019-05-16 2019-10-01 平安科技(深圳)有限公司 Data processing operation dispatching method, device, computer equipment and storage medium
CN112291718A (en) * 2020-10-16 2021-01-29 精伦电子股份有限公司 Service scheduling method and system based on low-power-consumption Bluetooth broadcast

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115278634A (en) * 2022-06-30 2022-11-01 海信视像科技股份有限公司 Display device and Bluetooth scanning method

Also Published As

Publication number Publication date
CN113423098B (en) 2022-12-02

Similar Documents

Publication Publication Date Title
CN113498049A (en) Bluetooth data transmission event scheduling method and device and Bluetooth equipment
US10660087B2 (en) Radio communication system, radio communication apparatus, radio communication method, and computer program
US9723641B2 (en) Wireless communication system, wireless communication apparatus, wireless communication method, and computer program
CN113423099B (en) Bluetooth broadcast event scheduling method and device and Bluetooth equipment
US20070019607A1 (en) Radio communication system, radio communication apparatus and computer program
CN106686727B (en) Multi-carrier competition access method, device and system
CN110100400B (en) Method, device, equipment and storage medium for determining channel detection mechanism
CN108605354A (en) A kind of acquisition methods and user terminal of transfer resource
CN113423098B (en) Bluetooth scanning event scheduling method and device and Bluetooth equipment
WO2004045150A2 (en) Shared-medium contention algorithm exhibiting fairness
US10681187B2 (en) Dynamic scheduling of a single radio executing multiple wireless protocols
Souil et al. A new adaptive MAC protocol with QoS support for heterogeneous wireless sensor networks
CN114050851B (en) Bluetooth communication method, device and storage medium supporting multiple antenna receiving and transmitting channels
CN111342914B (en) Communication management method and device
WO2022141104A1 (en) Resource selection method and apparatus, device and storage medium
JP7045466B2 (en) Improved schedule transmission
CN106465426A (en) Wireless communication device, wireless communication method, and computer program
CN116671220A (en) Service scheduling method and device
CN116033577A (en) Data transmission method and device, storage medium and electronic device
CN115297449A (en) Data transmission control method, ioT (Internet of things) equipment and storage medium
Ge et al. DH-MAC: A Dynamic Hybrid MAC Protocol with the mechanisms of TDMA and CSMA/CA

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant