CN115915027A - Low-power-consumption Bluetooth broadcasting method and device and electronic equipment - Google Patents

Low-power-consumption Bluetooth broadcasting method and device and electronic equipment Download PDF

Info

Publication number
CN115915027A
CN115915027A CN202211428388.6A CN202211428388A CN115915027A CN 115915027 A CN115915027 A CN 115915027A CN 202211428388 A CN202211428388 A CN 202211428388A CN 115915027 A CN115915027 A CN 115915027A
Authority
CN
China
Prior art keywords
data
broadcast
broadcast message
broadcasting
target data
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.)
Pending
Application number
CN202211428388.6A
Other languages
Chinese (zh)
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.)
Shanghai Sunmi Technology Group Co Ltd
Shenzhen Michelangelo Technology Co Ltd
Original Assignee
Shanghai Sunmi Technology Group Co Ltd
Shenzhen Michelangelo 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 Shanghai Sunmi Technology Group Co Ltd, Shenzhen Michelangelo Technology Co Ltd filed Critical Shanghai Sunmi Technology Group Co Ltd
Priority to CN202211428388.6A priority Critical patent/CN115915027A/en
Publication of CN115915027A publication Critical patent/CN115915027A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a low-power-consumption Bluetooth broadcasting method, a low-power-consumption Bluetooth broadcasting device and electronic equipment, wherein the method applied to a sending end comprises the following steps: dividing target data to be broadcasted into a plurality of pieces of data; wherein the length of the fragmented data is smaller than the limit length of the broadcast channel; assembling each fragment data to form a broadcast message; the broadcast message comprises fragment data and attribute data, and the attribute data represents the data characteristics of the fragment data; and broadcasting the broadcast message circularly. The method applied to the receiving end comprises the following steps: monitoring a broadcast message on a broadcast channel; the broadcast message is formed by fragmenting target data into a plurality of fragment data and then assembling the fragment data; receiving a broadcast message; and after receiving all broadcast messages of the same target data, recombining the fragment data in the broadcast messages into the target data. The invention can transmit longer target data by using shorter data length even under the limit of the length of the low-power consumption Bluetooth broadcast channel PDU.

Description

Low-power-consumption Bluetooth broadcasting method and device and electronic equipment
Technical Field
The invention mainly relates to the technical field of wireless communication, in particular to a low-power-consumption Bluetooth broadcasting method, a low-power-consumption Bluetooth broadcasting device and electronic equipment.
Background
Bluetooth Low Energy (BLE) technology is a Low-cost, short-range, interoperable, robust wireless technology, operates in an unlicensed ISM radio frequency band of 2.4GHz, and has multiple protocol versions such as BLE4.0, BLE4.1, BLE4.2, and BLE 5.0. In BLE4.2, due to the limitation of the Protocol specification of BLE402, the maximum length of a Protocol Data Unit (PDU) of the bluetooth low energy broadcast channel is only 37 bytes, and after a broadcast address and an associated control field are removed, the actually available Data length is only 28 bytes, and thus, the Data length transmitted by the BLE broadcasting equipment through bluetooth broadcasting is very limited.
In the prior art, format data defined in a General Access Profile (GAP) protocol, such as UUID (Universally unique identifier), service name, vendor-defined data, and the like, is generally sent only in a broadcast manner, and the length of the data does not exceed the BLE protocol limit. When longer data needs to be transmitted between BLE devices, a connection mode is generally used instead of a broadcast packet, and a slave (slave) and a master (master) establish connection first and then use a unicast mode to receive and transmit data. However, in some application scenarios, the number of receiving devices is much larger than that of broadcasting devices, and if the data content sent to the receiving party by the sending party is the same, the efficiency of the broadcasting mode is higher than that of the unicast interaction. For example, a BLE base station synchronizes the same configuration data to hundreds to thousands of surrounding electronic price tags, if a unicast connection mode is adopted, each electronic price tag needs to establish bluetooth connection with the base station first, and then the base station sends data to the electronic price tags one by one, which is obviously more efficient through a broadcast mode. At this time, if the data length requiring broadcast synchronization exceeds the broadcast channel PDU length limit specified by the BLE protocol, the broadcasting device cannot fill all data into BLE broadcast packets. Therefore, due to PDU length limitation of the broadcast packet of BLE, the BLE broadcasting device cannot directly broadcast longer data.
Disclosure of Invention
The invention aims to provide a low-power-consumption Bluetooth broadcasting method, a low-power-consumption Bluetooth broadcasting device and electronic equipment, which can transmit longer target data by using shorter data length even under the limit of the length of a low-power-consumption Bluetooth broadcasting channel PDU.
In order to solve the above technical problem, in a first aspect, the present invention provides a low power consumption bluetooth broadcast method, applied to a sending end, including: dividing target data to be broadcasted into a plurality of pieces of data; wherein the length of the sliced data is smaller than the limit length of the broadcast channel; assembling each piece of fragment data to form a broadcast message; the broadcast message comprises the fragment data and attribute data, and the attribute data represents the data characteristics of the fragment data; and broadcasting the broadcast message in a circulating way.
Optionally, the fragmenting the target data to be broadcasted into a plurality of fragmented data further includes: and if the fragment data is divided into N pieces, the lengths of N-1 pieces of the fragment data are the same.
Optionally, in N-1 pieces of the fragmentation data with the same length, each piece of the fragmentation data has a length of 23 bytes.
Optionally, the attribute data includes: target data identity, fragment data identity and the number of fragment data.
Optionally, the cyclically broadcasting the broadcast packet includes: and broadcasting a plurality of broadcast messages formed by the target data in sequence, and performing next cycle broadcasting after all the broadcast messages of the target data are broadcasted.
Optionally, the cyclically broadcasting the broadcast packet includes: and transmitting the same broadcast message on different broadcast channels.
Optionally, transmitting the same broadcast packet on different broadcast channels further includes: and the time interval for broadcasting two adjacent broadcast messages is greater than the sum of the broadcast interval and the random time delay, wherein the broadcast interval is the time difference of two adjacent broadcast events.
Optionally, the time interval T is set to T =3 (T) In +T De ) Wherein T is In Is a set value of the broadcast interval, T De Is the maximum value of the random time delay.
Optionally, in the process of broadcasting the broadcast packet in a circulating manner, if the circulating broadcast duration has reached the maximum broadcast time, the broadcast packet is sent out.
In a second aspect, the present invention provides a low power consumption bluetooth broadcasting method, which is applied to a receiving end, and includes: monitoring a broadcast message on a broadcast channel; the broadcast message is formed by fragmenting target data into a plurality of fragment data and assembling the fragment data; if the received broadcast message and the cached broadcast message belong to the same target data, caching the received broadcast message, and continuing to monitor the broadcast message which is not cached; if the received broadcast message is the same as the cached broadcast message, ignoring the currently received broadcast message; and when all the broadcast messages of the same target data are received, the fragment data in the broadcast messages are recombined into the target data.
Optionally, the method further comprises: and if the received broadcast message and the currently cached broadcast message do not belong to the same target data, emptying the cached broadcast message.
Optionally, the method further comprises: distinguishing different target data by target data identity marks, and distinguishing different fragment data by fragment data identity marks; if the target data identity identifiers are the same, the broadcast message belongs to the same target data, and if the fragment data identity identifiers are the same, the fragment data are the same.
In a third aspect, the present invention provides a bluetooth low energy broadcasting apparatus, applied to a transmitting end, and characterized in that the apparatus comprises: the fragmentation module is used for fragmenting target data to be broadcasted into a plurality of fragmented data; wherein the length of the sliced data is less than the limit length of a broadcast channel; the assembling module is used for assembling each fragment data to form a broadcast message; the broadcast message comprises the fragment data and attribute data, and the attribute data represents the data characteristics of the fragment data; and the broadcasting module is used for broadcasting the broadcast message in a circulating way.
In a fourth aspect, the present invention provides a bluetooth low energy broadcasting apparatus, which is applied to a receiving end, and is characterized in that the apparatus comprises: the monitoring module is used for monitoring the broadcast message on the broadcast channel; the broadcast message is formed by fragmenting target data into a plurality of fragment data and assembling the fragment data; the cache module is used for caching the received broadcast message and continuously monitoring the broadcast message which is not cached if the received broadcast message and the cached broadcast message belong to the same target data; if the received broadcast message is the same as the cached broadcast message, ignoring the currently received broadcast message; and the recombination module is used for recombining the fragment data in the broadcast message into the target data after receiving all the broadcast messages of the same target data.
In a fifth aspect, the present invention provides an electronic device, comprising: a processor and a memory, the memory storing a program or instructions executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the bluetooth low energy broadcast method of the first or second aspect.
In a sixth aspect, the present invention provides a readable storage medium on which a program or instructions are stored, which when executed by a processor, implement the steps of the bluetooth low energy broadcast method according to the first or second aspect.
Compared with the prior art, the invention has the following advantages: the method comprises the steps of fragmenting target data to be broadcasted into a plurality of fragment data, wherein the length of the fragment data is smaller than the limit length of a broadcast channel; assembling each fragment data to form a broadcast message, wherein the broadcast message comprises fragment data and attribute data, and the attribute data represents the data characteristics of the fragment data; the broadcast message is broadcast circularly, and longer target data can be transmitted by using shorter data length under the limitation of the length of the low-power-consumption Bluetooth broadcast channel PDU.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the principle of the application. In the drawings:
figure 1 is a schematic diagram of the structure of a data packet of BLE broadcast;
FIG. 2 is a flowchart illustrating a method for Bluetooth Low energy broadcasting according to an embodiment of the present invention;
figure 3 is a schematic diagram of the structure of a data packet for constructing BLE broadcast in one embodiment of the present invention;
FIG. 4 is a simplified flow diagram of a method for broadcasting after a maximum broadcast time in one embodiment of the present invention;
FIG. 5 is a flowchart illustrating a Bluetooth Low energy broadcasting method according to another embodiment of the present invention;
FIG. 6 is a flow chart illustrating a Bluetooth Low energy broadcasting method according to another embodiment of the present invention;
FIG. 7 is a schematic diagram of an exemplary embodiment of a Bluetooth low energy broadcasting device;
fig. 8 is a schematic structural diagram of a bluetooth low energy broadcasting apparatus according to another embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only examples or embodiments of the application, from which the application can also be applied to other similar scenarios without inventive effort for a person skilled in the art. Unless otherwise apparent from the context, or stated otherwise, like reference numbers in the figures refer to the same structure or operation.
As used in this application and the appended claims, the terms "a," "an," "the," and/or "the" are not intended to be inclusive in the singular, but rather are intended to be inclusive in the plural unless the context clearly dictates otherwise. In general, the terms "comprises" and "comprising" merely indicate that steps and elements including well-identified steps and elements are not an exclusive list, and that a method or apparatus may include other steps or elements.
The relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present application unless specifically stated otherwise. In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
Flowcharts are used herein to illustrate the operations performed by systems according to embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed in the exact order in which they are performed. Rather, various steps may be processed in reverse order or simultaneously. Meanwhile, other operations are added to or removed from these processes.
Bluetooth low energy is a low-cost, short-range wireless technology designed by the bluetooth alliance, and it is a new feature from bluetooth version 4.0, aiming to reduce the power consumption of bluetooth communication of devices as much as possible. Bluetooth low energy is no longer backward compatible with the old classic Bluetooth protocol and is widely applied to mobile devices and embedded devices with requirements on power consumption. The BLE protocol divides the 2.4GHz frequency band into 40 physical channels, and the frequency interval of adjacent channels is 2MHz. Of the 40 physical channels, channel numbers 0 to 36 are data channels for transmitting connection data, and channel numbers 37, 38, and 39 are broadcast channels for transmitting broadcast data and scan data.
Fig. 1 is a schematic structural diagram of a data packet of BLE broadcast, as shown in fig. 1, due to the limitation of the BLE protocol, the maximum PDU length of the BLE broadcast packet is only 37 bytes, except for 6 bytes of a broadcast address and 3 bytes of a broadcast packet header, the length of the data packet actually usable for broadcast data (actual data) is only 28 bytes, where the 28 bytes of data also need to comply with the provisions of the GAP protocol, and since the length supported by the broadcast packet of BLE is too short, longer broadcast data cannot be directly transmitted.
The BLE bluetooth broadcast data has a length limitation, and generally only transmits data defined in the GAP protocol, such as service UUID, service name or vendor-defined data, in a broadcast manner. When more data needs to be transmitted, the following is usually done: 1) The slave equipment (slave) declares the existence of the service through the broadcast message, the master equipment (master) monitors the broadcast message and then establishes connection with the slave equipment, and then carries out communication with larger data volume through a unicast mode in a data channel. 2) The broadcaster broadcasts only information such as service ID (IDentity) and URL (Uniform resource locator) in a broadcast packet with a limited length. After the receiving device obtains the broadcast message, more information is obtained through other network modes (such as WiFi). This approach requires the BLE device to support other network access approaches. 3) BLE 5.0 extends the secondary broadcast channel allowing data to be broadcast on non-broadcast channels, i.e. 0-36 data channels, and the broadcast channel PDU payload length of the secondary broadcast channel extends to 255, which requires devices to support the BLE 5.0 feature.
Example one
Fig. 2 is a schematic flow chart of a low power consumption bluetooth broadcast method according to an embodiment of the present invention, and referring to fig. 2, the method 200 is applied to a transmitting end, and includes:
s210, segmenting target data to be broadcasted into a plurality of segmented data; wherein the length of the sliced data is smaller than the limit length of the broadcast channel.
In this embodiment, due to the limitation of the BLE protocol, the length of data transmitted by the BLE broadcast packet is limited, and therefore, when data exceeding the limited length is broadcast, it is obvious that data to be transmitted (target data) cannot be directly filled in the data structure of the BLE broadcast packet. And fragmenting the target data to be broadcasted into a plurality of fragmented data, wherein the length of the fragmented data is smaller than the limit length of the broadcast channel, so that the fragmented data can be filled into a data structure of the BLE broadcast message.
In some embodiments, the target data to be broadcasted is fragmented into a plurality of fragmented data, and if the fragmented data is fragmented into N pieces, the lengths of N-1 fragmented data are the same. The same fragment data length is beneficial to fragment the target data and is also beneficial to the recombination of the subsequent fragment data. Since each target data cannot be just divided into an integral number of fragment data having the same fragment data length, the present embodiment can ensure that the lengths of N-1 fragment data therein are the same. For example, assuming that the length of the fragment data is 20 bytes, then the length of N-1 fragment data is 20 bytes, and the length of the last fragment data is generally less than 20 bytes, such as 18 bytes, 10 bytes, etc. Obviously, it is also possible that the last fragment data length is exactly 20 bytes, which is not exemplified here. More preferably, the length of the fragmentation data is 23 bytes, so as to fully utilize the length of each broadcast message. For example, assuming that the length of data to be transmitted by the broadcasting equipment through the BLE broadcast message is L, the broadcasting equipment divides the data into N data fragments, where N = L/23 (round up), the size of the first N-1 fragments is fixed to 23 bytes, and the size of the last fragment is the remaining length (1-23 bytes).
S220, assembling each piece of fragment data to form a broadcast message; the broadcast message comprises the fragment data and attribute data, and the attribute data represents data characteristics of the fragment data.
In this embodiment, each piece of sliced data is assembled to form a broadcast packet. Fig. 3 is a schematic structural diagram of a Data packet for constructing BLE broadcast in an embodiment of the present invention, and referring to fig. 3, a user-defined broadcast type of Manufacturer Specific Data in GAP protocol is used to assemble a fragmentation array. In the assembled broadcast message, the broadcast message includes fragment data and attribute data, and the attribute data represents data characteristics of the fragment data. Illustratively, the attribute data may include the following data:
1) GAP broadcast length field: the GAP broadcast type and the custom broadcast payload total length are recorded and range from 5 to 27. When the field is 27, it represents that the slice data length is a maximum value of 23.
2) GAP broadcast type: fixed as 0xFF, namely, manufacturer Specific Data, representing vendor-defined target Data.
3) Message ID (target data identity): the first broadcast may be set to a random value, incremented by 1 each time the broadcast content is updated, and this message ID is used to distinguish between different target data.
4) Total number of fragments: namely the number of the fragment data, is set as the total number N of the fragments of the current target data.
5) Fragment ID (fragment data identity): the number of a certain piece of data in the current target data is set, and the value range can be 0-N-1 or 1-N.
6) Slicing data: set as the actual data of the corresponding slice.
And S230, broadcasting the broadcast message circularly.
In this embodiment, the broadcast message is broadcasted in a circular broadcast manner. In the unicast communication mode, after data sent by a sender is received by a receiving method, a receiver sends feedback information to the sender so that the sender can know whether the data sent by the sender is successfully sent. In the broadcast method, the number of the sending party is generally small, and the number of the receiving party is much larger than that of the sending party, so that the receiving party does not feed back the information of the received data to the sending party, and the sending party does not know whether the receiving party receives the data. In order to ensure that data sent by a sender is received by a receiver, the data needs to be broadcasted several times, so that the receiver can basically judge that the receiver receives the data sent by the sender because the sender sends data several times even though the receiver does not have feedback information to the sender. It is understood that the number of broadcast cycles may be set according to actual situations, and may be cycled for 2-4 times if the communication between the sender and the receiver is stable, or may be cycled for 10 times or more if the communication between the sender and the receiver is unstable, which is not illustrated here.
In some embodiments, the broadcast messages of the cyclic broadcast may be a plurality of broadcast messages formed by the target data, and the next cyclic broadcast is performed after all broadcast messages of the target data are broadcast. The broadcasting mode can further improve the sending efficiency of the broadcast message and avoid the condition that the broadcast message in the same target data has more sending times and less sending times. In addition, if the data is transmitted and received smoothly, the target data can be transmitted at the fastest speed. For example, the target data is fragmented into N pieces of fragment data, each piece of fragment data is filled into the custom broadcast payload shown in fig. 3, if the fragment data identities are 1, 2, 3,.,. N-1, and N, respectively, then the broadcast messages are sequentially broadcast according to the sequence of 1, 2, 3,..,. N-1, and N, and then the process is repeated.
In some embodiments, the recurring broadcast message may be the same broadcast message transmitted on a different broadcast channel. For example, the BLE protocol divides the 2.4GHz band into 40 physical channels, with adjacent channels separated by 2MHz. Among the 40 physical channels, channel numbers 0 to 36 are data channels for transmitting connection data; channel numbers 37, 38, and 39 are broadcast channels for transmitting broadcast data and scan data. Thus, in a BLE broadcast event, the broadcasting device may transmit the same broadcast message on three broadcast channels 37, 38 and 39 in turn.
In some embodiments, the same broadcast message is transmitted on different broadcast channels, and the time interval between two adjacent broadcast messages is greater than the sum of the broadcast interval and the random time delay. The direct time difference between two adjacent broadcast events is called the broadcast interval (advInterval). According to the BLE protocol specification, the broadcast interval is an integer multiple of 0.625ms, ranging from 32 x 0.625ms to 16448 x 0.625ms. A random time delay (advDelay) of 0 to 10ms is also added between two adjacent broadcasts. The interval of the broadcasting equipment when updating the fragment data cannot be smaller than the interval of two broadcasting packets, otherwise, the situation that the broadcasting message is switched without being sent may occur.
Illustratively, the time interval T is set to T =3*(T In +T De ) Wherein T is In Set value for broadcast interval, T De Is the maximum value of the random time delay. This arrangement ensures that one burst of data is sent out at least 1 time on the three broadcast channels 37, 38 and 39; or set to integral multiple of T, ensuring that the fragmented data is sent out on the broadcast channel multiple times.
In some embodiments, the type of BLE bluetooth broadcast may be an attachable broadcast type (ADV _ IND) or a non-attachable broadcast type (ADV _ nonce _ IND).
In some embodiments, in the process of broadcasting the broadcast message in a cyclic manner, if the cyclic broadcast duration has reached the maximum broadcast time, the broadcast message is finished being sent, and the maximum broadcast time may be determined according to an actual situation. Because wireless transmission has the possibility of interference and packet loss, in the transmission of fragmented data, the fragmented data cannot be broadcasted only once, otherwise, the receiver cannot collect all fragmented data in the case of interference. The broadcasting equipment can set the maximum broadcasting time, ensure that each piece of data is circularly transmitted for many times, and increase the success rate of receiving all piece of data. Fig. 4 is a simplified flow chart of a broadcasting method with maximum broadcasting time in an embodiment of the present invention, referring to fig. 4, in the diagram, target data is first divided into N pieces of fragment data, the fragment data is assembled into broadcast messages, then the N broadcast messages are broadcasted in sequence, after the broadcast messages are broadcasted, whether the maximum broadcasting time is reached at this time is judged, and if the maximum broadcasting time is reached, the broadcasting is ended in order to improve efficiency. For example, if the one-time fragment switching time interval is T and the total number of fragments of a certain message (target data) is N, the total transmission time of a group of fragment data is T × N, and in order to implement 10 times of circular broadcasting, the maximum broadcasting time of the broadcast packet may be set to 10 × T × N.
In the low power consumption bluetooth broadcasting method provided by this embodiment, target data to be broadcasted is fragmented into a plurality of fragmented data, where the length of the fragmented data is smaller than the limit length of a broadcast channel; assembling each fragment data to form a broadcast message; the broadcast message is broadcast circularly, and longer target data can be transmitted by using shorter data length under the limitation of the length of the low-power-consumption Bluetooth broadcast channel PDU.
Example two
Fig. 5 is a flowchart illustrating a bluetooth low energy broadcasting method according to another embodiment of the present invention, and referring to fig. 5, the method 500 is applied to a receiving end, and mainly includes:
s510, monitoring a broadcast message on a broadcast channel; the broadcast message is formed by fragmenting target data into a plurality of fragment data and assembling the fragment data.
In this embodiment, the target data is fragmented into a plurality of fragmented data, and if the fragmented data is fragmented into N pieces, the lengths of N-1 fragmented data are the same. The same fragment data length is beneficial to fragment the target data and is also beneficial to the recombination of the subsequent fragment data. Since each target data cannot be exactly divided into an integral number of fragment data having the same fragment data length, the present embodiment can ensure that the lengths of N-1 fragment data therein are the same. For example, assuming that the length of the fragment data is 20 bytes, then the length of N-1 fragment data is 20 bytes, and the length of the last fragment data is generally less than 20 bytes, such as 18 bytes, 10 bytes, etc. Obviously, it is also possible that the length of the last fragment data is just 20 bytes, which is not exemplified here. More preferably, the length of the fragmentation data is 23 bytes, so as to fully utilize the length of each broadcast message. For example, assuming that the length of data to be transmitted by the broadcast device through the BLE broadcast packet is L, the data is divided into N data fragments, where N = L/23 (rounding up), the first N-1 fragments are fixed to 23 bytes in size, and the last fragment is the remaining length (1-23 bytes). And monitoring the broadcast message carrying the fragmented data on a broadcast channel, for example, the BLE protocol divides the 2.4GHz band into 40 physical channels, and monitors the broadcast message on the broadcast channels 37, 38, and 39.
S520, if the received broadcast message and the cached broadcast message belong to the same target data, caching the received broadcast message, and continuing to monitor the broadcast message which is not cached; and if the received broadcast message is the same as the cached broadcast message, ignoring the currently received broadcast message.
In some embodiments, if the received broadcast packet and the currently cached broadcast packet do not belong to the same target data, the cached broadcast packet is cleared.
In some embodiments, the target data may be identified by a target data identifier, and the fragmented data may be identified by a fragmented data identifier. If the target data identity marks are the same, the broadcast message belongs to the same target data, and if the fragment data identity marks are the same, the fragment data are the same.
S530, when all the broadcast messages of the same target data are received, the fragment data in the broadcast messages are recombined into the target data.
When the receiving device successfully caches all the fragment data of a certain target data, the broadcast message contains all the fragment data of the target data, so that the fragment data are spliced and recombined, and the original target data are restored. And the fragment data is recombined into complete target data in sequence, so that one-time broadcast data reception is completed, and data communication is completed.
In the low power consumption bluetooth broadcasting method provided in this embodiment, after receiving a broadcast message, the broadcast message is formed by fragmenting target data into fragmented data and assembling the fragmented data, and a receiving party caches and reassembles the fragmented data. And then, under the length limit of the low-power Bluetooth broadcast channel PDU, longer target data can be transmitted by using a shorter data length.
Practice III
Fig. 6 is a schematic flow chart of a low-power consumption bluetooth broadcast method according to another embodiment of the present invention, and referring to fig. 6, the method is applied to a receiving end, and mainly includes:
s601, receiving the broadcast message.
S602, after receiving the broadcast message, judging whether the received message ID (target data identity) is equal to the message ID currently cached.
If the received message ID is equal to the currently cached message ID, it indicates that the received broadcast message and the currently cached broadcast message belong to the same target data, step 604 is executed, otherwise, it indicates that the received broadcast message and the currently cached broadcast message do not belong to the same target data, step 603 is executed.
S603, clearing the broadcast message buffer of the old message (the buffered target data). Then step 605 is performed.
S604, determining whether the received fragment ID (fragment data identity) is cached. If the received fragment ID is cached, it indicates that a repeated broadcast message is received, so that the broadcast message can be ignored, and step 601 is continuously executed; if the fragment ID is not cached, it indicates that a new broadcast packet is received, and step 605 is executed.
S605, caching the currently received broadcast message.
S606, determining whether all broadcast messages of the current message (target data) are cached, if so, indicating that all fragment data of the target data have been received, executing step 607, and if not, continuing to execute step 601.
And S607, splicing the fragments (fragment data) to form complete target data.
After receiving all broadcast messages of the same target data, the broadcast messages contain all fragment data of the target data, and therefore the fragment data are spliced and assembled, and then the original target data are restored, and data communication is completed.
In the low power consumption bluetooth broadcasting method provided in this embodiment, after receiving a broadcast message, the broadcast message is formed by fragmenting target data into fragmented data and assembling the fragmented data, and a receiving party caches and reassembles the fragmented data. And then, under the limit of the length of the low-power consumption Bluetooth broadcast channel PDU, longer target data can be transmitted by using shorter data length.
Example four
Fig. 7 is a schematic structural diagram of a bluetooth low energy broadcasting apparatus according to an embodiment of the present invention, and referring to fig. 7, the apparatus 700 mainly includes:
a slicing module 701, configured to slice target data to be broadcasted into a plurality of sliced data; wherein the length of the sliced data is smaller than the limit length of the broadcast channel.
In some embodiments, if the sliced data is divided into N slices, the length of N-1 slices of sliced data is the same.
An assembling module 702, configured to assemble each piece of sliced data to form a broadcast packet; the broadcast message comprises the fragment data and attribute data, and the attribute data represents the data characteristics of the fragment data.
In some embodiments, the attribute data includes a target data identity, a shard data identity, and a quantity of shard data.
The broadcasting module 703 is configured to broadcast the broadcast packet in a circulating manner.
In some embodiments, the broadcast message is broadcast cyclically, and a plurality of broadcast messages formed by the target data are broadcast sequentially, and after all broadcast messages of the target data are broadcast, the next cyclic broadcast is performed.
In some embodiments, the broadcast messages are broadcast cyclically, with the same broadcast message being transmitted on different broadcast channels.
In some embodiments, the same broadcast message is transmitted on different broadcast channels, and the time interval between two adjacent broadcast messages is greater than the sum of the broadcast interval and the random time delay, wherein the broadcast interval is the time difference between two adjacent broadcast events.
In some embodiments, in the process of broadcasting the broadcast message in a circulating manner, if the circulating broadcast time length reaches the maximum broadcast time, the broadcast message is sent out.
For details of other operations executed by each module in this embodiment, please refer to embodiment one, which is not expanded herein.
The low power consumption bluetooth broadcasting apparatus provided in this embodiment segments target data to be broadcasted into a plurality of segmented data, where the length of the segmented data is smaller than the limit length of a broadcast channel; assembling each fragment data to form a broadcast message; the broadcast message is broadcast circularly, and longer target data can be transmitted by using a shorter data length under the limitation of the length of a low-power-consumption Bluetooth broadcast channel PDU (protocol data Unit).
EXAMPLE five
Fig. 8 is a schematic structural diagram of a bluetooth low energy broadcasting apparatus according to another embodiment of the present invention, and referring to fig. 8, the apparatus 800 mainly includes:
the monitoring module 801 is configured to monitor a broadcast packet on a broadcast channel, where the broadcast packet is formed by fragmenting target data into a plurality of fragmented data and assembling the fragmented data.
A caching module 802, configured to cache the received broadcast packet and continue to monitor the uncached broadcast packet if the received broadcast packet and the cached broadcast packet belong to the same target data; and if the received broadcast message is the same as the cached broadcast message, ignoring the currently received broadcast message.
In some embodiments, if the received broadcast packet and the currently cached broadcast packet do not belong to the same target data, the cached broadcast packet is cleared.
In some embodiments, different target data are distinguished by a target data identity, and different sharded data are distinguished by a sharded data identity. If the target data identity marks are the same, the broadcast message belongs to the same target data, and if the fragment data identity marks are the same, the fragment data are the same.
A reassembly module 803, configured to, after receiving all broadcast packets of the same target data, reassemble the fragment data in the broadcast packet into the target data.
For details of other operations executed by each module in this embodiment, please refer to embodiment two and embodiment three, which are not expanded herein.
After receiving the broadcast message, the low-power-consumption bluetooth broadcasting apparatus provided in this embodiment segments the target data into segmented data and assembles the segmented data, and the receiving party caches and reassembles the segmented data. And then, under the limit of the length of the low-power consumption Bluetooth broadcast channel PDU, longer target data can be transmitted by using shorter data length.
The bluetooth low energy broadcasting device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. A bluetooth low energy broadcasting device in the embodiments of the present application may be a device having an operating system. The operating system may be an android operating system, an iOS operating system, or other possible operating systems, which is not specifically limited in the embodiments of the present application.
As shown in fig. 9, an electronic device 900 is further provided in this embodiment of the present application, and includes a processor 901, a memory 902, and a program or an instruction stored in the memory 902 and executable on the processor 901, where the program or the instruction is executed by the processor 901 to implement each process of the above-mentioned embodiment of the bluetooth low energy broadcasting method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the embodiment of the bluetooth low energy broadcasting method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The processor is the processor in the electronic device described in the above embodiment. Readable storage media, including computer-readable storage media, such as computer Read-Only Memory (ROM), random Access Memory (RAM), magnetic or optical disks, etc.
The computer readable medium may comprise a propagated data signal with the computer program code embodied therein, for example, on a baseband or as part of a carrier wave. The propagated signal may take any of a variety of forms, including electromagnetic, optical, and the like, or any suitable combination. The computer readable medium can be any computer readable medium that can communicate, propagate, or transport the program for use by or in connection with an instruction execution system, apparatus, or device. Program code on a computer readable medium may be propagated over any suitable medium, including radio, electrical cable, fiber optic cable, radio frequency signals, or the like, or any combination of the preceding.
The above disclosure is intended as an example, and not as a limitation on the present application, to one skilled in the art. Various modifications, improvements and adaptations to the present application may occur to those skilled in the art, although not explicitly described herein. Such modifications, improvements and adaptations are proposed in the present application and thus fall within the spirit and scope of the exemplary embodiments of the present application.
Also, this application uses specific language to describe embodiments of the application. Reference throughout this specification to "one embodiment," "an embodiment," and/or "some embodiments" means that a particular feature, structure, or characteristic described in connection with at least one embodiment of the present application is included in at least one embodiment of the present application. Therefore, it is emphasized and should be appreciated that two or more references to "an embodiment" or "one embodiment" or "an alternative embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, some features, structures, or characteristics of one or more embodiments of the present application may be combined as appropriate.
Aspects of the present application may be embodied entirely in hardware, entirely in software (including firmware, resident software, micro-code, etc.) or in a combination of hardware and software. The above hardware or software may be referred to as "data block," module, "" engine, "" unit, "" component, "or" system. The processor may be one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital signal processing devices (DAPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, or a combination thereof. Furthermore, aspects of the present application may be represented as a computer product, including computer readable program code, embodied in one or more computer readable media. For example, computer-readable media can include, but are not limited to, magnetic storage devices (e.g., hard disk, floppy disk, magnetic strips … …), optical disks (e.g., compact Disk (CD), digital Versatile Disk (DVD) … …), smart cards, and flash memory devices (e.g., card, stick, key drive … …).
Similarly, it should be noted that in the preceding description of embodiments of the application, various features are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure aiding in the understanding of one or more of the embodiments. This method of disclosure, however, is not intended to imply that more features are required than are expressly recited in the claims. Indeed, the embodiments may be characterized as having less than all of the features of a single embodiment disclosed above.
Although the present application has been described with reference to the present specific embodiments, it will be recognized by those skilled in the art that the foregoing embodiments are merely illustrative of the present application and that various changes and substitutions of equivalents may be made without departing from the spirit of the application, and therefore, it is intended that all changes and modifications to the above-described embodiments that come within the spirit of the application fall within the scope of the claims of the application.

Claims (16)

1. A low-power consumption Bluetooth broadcasting method is applied to a sending end and is characterized by comprising the following steps:
dividing target data to be broadcasted into a plurality of pieces of data; wherein the length of the sliced data is less than the limit length of a broadcast channel;
assembling each fragment data to form a broadcast message; the broadcast message comprises the fragment data and attribute data, and the attribute data represents the data characteristics of the fragment data;
and broadcasting the broadcast message in a circulating way.
2. The bluetooth low energy broadcasting method according to claim 1, wherein the slicing the target data to be broadcasted into a plurality of sliced data further comprises:
and if the fragment data is divided into N pieces, the lengths of N-1 pieces of the fragment data are the same.
3. The bluetooth low energy broadcasting method according to claim 2, wherein in N-1 pieces of the fragmentation data having the same length, each piece of the fragmentation data has a length of 23 bytes.
4. The bluetooth low energy broadcast method of claim 1, wherein the attribute data comprises: the data transmission method comprises a target data identity, a fragment data identity and the number of fragment data.
5. The bluetooth low energy broadcasting method of claim 1, wherein the cyclically broadcasting the broadcast packet comprises: and sequentially broadcasting a plurality of broadcast messages formed by the target data, and performing next cycle broadcasting after all the broadcast messages of the target data are broadcasted.
6. The bluetooth low energy broadcasting method of claim 1, wherein the cyclically broadcasting the broadcast packet comprises: and transmitting the same broadcast message on different broadcast channels.
7. The bluetooth low energy broadcasting method of claim 6, wherein transmitting the same broadcast message on different broadcast channels further comprises: and the time interval for broadcasting two adjacent broadcast messages is greater than the sum of the broadcast interval and the random time delay, wherein the broadcast interval is the time difference of two adjacent broadcast events.
8. The bluetooth low energy broadcasting method of claim 7, wherein the time interval T is set to T =3 (T) In +T De ) Wherein T is In Is a set value of the broadcast interval, T De Is the maximum value of the random time delay.
9. The bluetooth low energy broadcasting method according to claim 1, wherein during the broadcasting of the broadcast message in a cyclic manner, if the cyclic broadcasting duration has reached the maximum broadcasting time, the sending of the broadcast message is terminated.
10. A low-power consumption Bluetooth broadcasting method is applied to a receiving end and is characterized by comprising the following steps:
monitoring a broadcast message on a broadcast channel; the broadcast message is formed by fragmenting target data into a plurality of fragment data and assembling the fragment data;
if the received broadcast message and the cached broadcast message belong to the same target data, caching the received broadcast message, and continuing to monitor the broadcast message which is not cached; if the received broadcast message is the same as the cached broadcast message, ignoring the currently received broadcast message;
and when all the broadcast messages of the same target data are received, the fragment data in the broadcast messages are recombined into the target data.
11. The bluetooth low energy broadcast method of claim 10, wherein the method further comprises: and if the received broadcast message and the currently cached broadcast message do not belong to the same target data, emptying the cached broadcast message.
12. The bluetooth low energy broadcast method of claim 11, wherein the method further comprises: distinguishing different target data by target data identity marks, and distinguishing different fragment data by fragment data identity marks; if the target data identity marks are the same, the broadcast message belongs to the same target data, and if the fragment data identity marks are the same, the fragment data are the same.
13. The utility model provides a bluetooth low energy broadcaster, is applied to the sending end, its characterized in that includes:
the fragmentation module is used for fragmenting target data to be broadcasted into a plurality of fragmented data; wherein the length of the sliced data is less than the limit length of a broadcast channel;
the assembling module is used for assembling each fragment data to form a broadcast message; the broadcast message comprises the fragment data and attribute data, and the attribute data represents the data characteristics of the fragment data;
and the broadcasting module is used for broadcasting the broadcast message in a circulating way.
14. A low-power consumption Bluetooth broadcasting device is applied to a receiving end and is characterized by comprising:
the monitoring module is used for monitoring the broadcast message on the broadcast channel; the broadcast message is formed by fragmenting target data into a plurality of fragment data and assembling the fragment data;
the cache module is used for caching the received broadcast message and continuously monitoring the broadcast message which is not cached if the received broadcast message and the cached broadcast message belong to the same target data; if the received broadcast message is the same as the cached broadcast message, ignoring the currently received broadcast message;
and the recombination module is used for recombining the fragment data in the broadcast message into the target data after receiving all the broadcast messages of the same target data.
15. An electronic device, comprising: a processor and a memory, the memory storing a program or instructions executable on the processor, the program or instructions when executed by the processor implementing the steps of the bluetooth low energy broadcast method of any one of claims 1-12.
16. A readable storage medium, on which a program or instructions are stored, which program or instructions, when executed by a processor, carry out the steps of the bluetooth low energy broadcasting method according to any one of claims 1 to 12.
CN202211428388.6A 2022-11-15 2022-11-15 Low-power-consumption Bluetooth broadcasting method and device and electronic equipment Pending CN115915027A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211428388.6A CN115915027A (en) 2022-11-15 2022-11-15 Low-power-consumption Bluetooth broadcasting method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211428388.6A CN115915027A (en) 2022-11-15 2022-11-15 Low-power-consumption Bluetooth broadcasting method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN115915027A true CN115915027A (en) 2023-04-04

Family

ID=86487263

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211428388.6A Pending CN115915027A (en) 2022-11-15 2022-11-15 Low-power-consumption Bluetooth broadcasting method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN115915027A (en)

Similar Documents

Publication Publication Date Title
CN100375552C (en) Method and appts. for extending communication unit battery life
US8971228B2 (en) Method for configuring parameters, base station and user equipment
CN102083003A (en) Methods and devices for requesting and feeding back multimedia broadcast and multicast service (MBMS) state
CN114501340B (en) MBS receiving method, MBS transmitting device, terminal and base station
US20220353948A1 (en) Method and device for sidelink communication
CN105120507A (en) Data packet monitoring method and system
CN110999402A (en) Using latency to acquire on-demand system information for wireless networks
EP2456239A1 (en) Method and device for carrying mbms notification information
CN101385258B (en) Method and apparatus for waiting time gain of user equipment through efficient process of assigned slot in mobile communication system
JP2012523141A (en) Non-3GPP2 system information transmission, response method and apparatus in HRDP system
CN102883344B (en) Method and device for exchanging of wireless network management messages
CN115915027A (en) Low-power-consumption Bluetooth broadcasting method and device and electronic equipment
US20190239034A1 (en) Terminal Device, Network Device, and Group Communication Method
EP3434032B1 (en) Paging of a client node in a group communications system
WO2023284376A1 (en) Multicast service modification notification method and communication apparatus
EP2013979A2 (en) Method and system to improve transmission and receipt of channel descriptors
US20180262976A1 (en) Discovery message processing method and apparatus
CN111328040A (en) Communication mode indication method and device of Internet of vehicles V2X
CN107770809B (en) Method, base station, terminal and system for controlling data packet transmission
CN111108785B (en) Network slice specific paging cycle for wireless networks
CN111148192A (en) Discontinuous reception method and device
CN116567551A (en) Bluetooth communication method, device, equipment, system and storage medium
CN116647827A (en) Bluetooth communication method, device, equipment, system and storage medium
US20220182974A1 (en) Paging mechanism for wireless communication networks
CN113825103B (en) Carrier communication system based on LoRa communication

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