CN106507272B - The broadcasting method and device of the monitoring data of bluetooth bracelet - Google Patents

The broadcasting method and device of the monitoring data of bluetooth bracelet Download PDF

Info

Publication number
CN106507272B
CN106507272B CN201610883007.1A CN201610883007A CN106507272B CN 106507272 B CN106507272 B CN 106507272B CN 201610883007 A CN201610883007 A CN 201610883007A CN 106507272 B CN106507272 B CN 106507272B
Authority
CN
China
Prior art keywords
byte
bluetooth
monitoring data
value
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.)
Active
Application number
CN201610883007.1A
Other languages
Chinese (zh)
Other versions
CN106507272A (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 Creation Cloud Technology Co Ltd
Original Assignee
Guangzhou Creation Cloud 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 Creation Cloud Technology Co Ltd filed Critical Guangzhou Creation Cloud Technology Co Ltd
Priority to CN201610883007.1A priority Critical patent/CN106507272B/en
Publication of CN106507272A publication Critical patent/CN106507272A/en
Application granted granted Critical
Publication of CN106507272B publication Critical patent/CN106507272B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/02Protecting privacy or anonymity, e.g. protecting personally identifiable information [PII]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • 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

Abstract

The invention discloses the broadcasting method and device of a kind of bluetooth bracelet monitoring data, method includes: to be classified to obtain data type ID to bluetooth bracelet monitoring data;When data type ID is between 0X0000~0X7FFF, monitoring data are compressed, obtain bluetooth BLE broadcast packet, low 2 byte of bluetooth BLE broadcast packet is actual value, and high 2 byte is to obtain low 2 byte of class UNIX timestamp at actual value moment;The currently monitored data are filled into bluetooth BLE broadcast packet by turns between the value 1 of monitoring data type 0, the value of monitoring data 0, monitoring data Class1 and monitoring data, is broadcasted after encrypted and verification, is received by bluetooth BLE receiving device.The present invention can efficiently transmit bluetooth bracelet current status data, while effectively obtaining bluetooth bracelet location information and current data, improve the capacity of system access, reduce the data traffic between bluetooth BLE receiving device, avoid repetitive operation.

Description

The broadcasting method and device of the monitoring data of bluetooth bracelet
Technical field
The present invention relates to medical bluetooth bracelets to monitor field, in particular to a kind of broadcaster of the monitoring data of bluetooth bracelet Method and device.
Background technique
It is universal with Internet of Things, bluetooth bracelet using more and more extensive, especially in medical industry.Traditional bluetooth Broadcast mechanism and method that bracelet uses are not able to satisfy the needs of reality, such as: the movement of operation bluetooth bracelet and current Bluetooth hand The delta data of ring will not be broadcast out by BLE, this brings great limitation to the use of bluetooth bracelet, cannot be in medical treatment The bigger effect of the performance of industry.Meanwhile the communication mode between bluetooth bracelet and bluetooth master needs to use and establishes connection, one To the mode of a communication, the communication efficiency of both sides is very low, and occupied bandwidth is relatively more, and capacity is low.Under one-to-one mode, in a timing In, it can only be communicated between two bluetooth equipments, can not achieve multiple bracelets and send/the situation of broadcast data on simultaneously.
Common bluetooth BLE broadcast packet, can only generally load 31 bytes, wherein 1 byte is length, a byte is Bluetooth broadcast type, in addition UUID, the practical bluetooth bracelet current information that can be transmitted is very limited, as the base station Ibeacon only transmits 2 ~3 information, using being limited to.
Summary of the invention
The technical problem to be solved in the present invention is that in view of the above drawbacks of the prior art, providing a kind of can efficiently be transmitted Bluetooth bracelet current status data improves system access while effectively obtaining bluetooth bracelet location information and current data Capacity, reduce and bluetooth BLE receiving device between data traffic, avoid the wide of the monitoring data of the bluetooth bracelet of repetitive operation Broadcasting method and device.
The technical solution adopted by the present invention to solve the technical problems is: constructing a kind of broadcast of bluetooth bracelet monitoring data Method, which comprises the steps of:
A) monitoring data different to bluetooth bracelet are classified, obtain monitoring data data type ID be 0X0000~ 0X7FFF and 0X8000~0XFFFF;The format of the monitoring data includes the length being arranged successively, Bluetooth broadcast type, producer BLE broadcast Packet type, low 2 byte of bluetooth bracelet factory number, high 2 byte of bluetooth bracelet factory number, heart rate value, heart rate value are adopted Collect low 2 byte of class UNIX timestamp, monitoring data type 0, low 2 byte of the value of monitoring data 0, the value of monitoring data 0 at moment High 2 byte, monitoring data Class1, low 2 byte of value 1 of monitoring data, high 2 byte of the value of monitoring data 1, class UNIX timestamp High 3 byte of low 1 byte, class UNIX timestamp, sleep state, battery instantly capacity, do not wear bluetooth bracelet, emissive porwer value and Check value;
B) when the data type ID of the currently monitored data is between 0X0000~0X7FFF, to the currently monitored data It is compressed, obtains bluetooth BLE broadcast packet;The low 2 byte representation actual value of the bluetooth BLE broadcast packet corresponding position, high 2 word Section indicates to obtain low 2 byte of class UNIX timestamp at the actual value moment;Or
When the data type ID of the currently monitored data is between 0X8000~0XFFFF, the currently monitored data For the bluetooth BLE broadcast packet;4 bytes of the currently monitored data are the actual value without compression;
C) between the value 1 of the monitoring data type 0, the value of monitoring data 0, monitoring data Class1 and monitoring data The currently monitored data of the bluetooth bracelet are filled into the bluetooth BLE broadcast packet by turns, by encryption and checking treatment Afterwards, current Bluetooth BLE broadcast packet is broadcasted, and is received by bluetooth BLE receiving device;
D) the bluetooth BLE receiving device unzips it the current Bluetooth BLE broadcast packet.
In the broadcasting method of bluetooth bracelet monitoring data of the present invention, the step D) it further comprise walking as follows It is rapid:
D1) the bluetooth BLE receiving device by high 2 byte of class UNIX timestamp of the current Bluetooth BLE broadcast packet with Low 2 byte of class UNIX timestamp of corresponding monitoring data forms the number of combinations of 4 bytes;
D2) by the class UNIX timestamp comparation of the number of combinations of 4 byte and the current Bluetooth BLE broadcast packet, and sentence Whether offset value is less than 32768, in this way, then it is assumed that the number of combinations of 4 byte is the acquisition moment, otherwise, by 4 byte Number of combinations subtracts 0X10000, obtains the class UNIX timestamp at acquisition moment.
In the broadcasting method of bluetooth bracelet monitoring data of the present invention, the length is 0X1E, and the bluetooth is wide Broadcasting type is 0XFF, and the verification is verified using CRC8;Unique ID of the bluetooth bracelet is by the bluetooth bracelet factory number The MAC Address of high 2 byte of low 2 byte, bluetooth bracelet factory number and the bluetooth bracelet combines to obtain.
In the broadcasting method of bluetooth bracelet monitoring data of the present invention, the heart rate value, sleep state, battery are worked as Lower capacity and the state for not wearing bluetooth bracelet are broadcasted every time in fixed position;The monitoring data are in the monitoring data The priority of 0 position of type broadcast is higher than the priority in monitoring data Class1 position.
In the broadcasting method of bluetooth bracelet monitoring data of the present invention, the length occupies 1 byte, the indigo plant Tooth broadcast type occupies 1 byte, and the producer BLE broadcast Packet type occupies 1 byte, and the heart rate value occupies 1 byte, The monitoring data type 0 occupies 2 bytes, and the monitoring data Class1 occupies 2 bytes, and the sleep state occupies 1 Byte, capacity occupies 1 byte to the battery instantly, and the bluetooth bracelet of not wearing occupies 1 byte, the emissive porwer value 1 byte is occupied, the check value occupies 1 byte.
The invention further relates to a kind of devices of broadcasting method for realizing above-mentioned bluetooth bracelet monitoring data, comprising:
Taxon: classifying for the monitoring data different to bluetooth bracelet, obtains the data type of monitoring data ID is 0X0000~0X7FFF and 0X8000~0XFFFF;The format of the monitoring data includes the length being arranged successively, bluetooth Broadcast type, producer BLE broadcast Packet type, low 2 byte of bluetooth bracelet factory number, high 2 byte of bluetooth bracelet factory number, the heart Rate value, heart rate value acquisition low 2 byte of class UNIX timestamp at moment, monitoring data type 0, low 2 byte of the value of monitoring data 0, High 2 bytes of value 0 of monitoring data, monitoring data Class1, low 2 byte of value 1 of monitoring data, high 2 byte of the value of monitoring data 1, Low 1 byte of class UNIX timestamp, high 3 byte of class UNIX timestamp, sleep state, battery instantly capacity, do not wear bluetooth bracelet, Emissive porwer value and check value;
Compression unit: for when the data type ID of the currently monitored data is between 0X0000~0X7FFF, to described The currently monitored data are compressed, and bluetooth BLE broadcast packet is obtained;Low 2 byte representation of the bluetooth BLE broadcast packet corresponding position Actual value, high 2 byte representation obtain low 2 byte of class UNIX timestamp at the actual value moment;Or
When the data type ID of the currently monitored data is between 0X8000~0XFFFF, the currently monitored data For the bluetooth BLE broadcast packet;4 bytes of the currently monitored data are the actual value without compression;
Cryptographic check radio unit: in the monitoring data type 0, the value of monitoring data 0, monitoring data Class1 The currently monitored data of the bluetooth bracelet are filled into the bluetooth BLE broadcast packet by turns between the value 1 of monitoring data, By encrypting with after checking treatment, current Bluetooth BLE broadcast packet is broadcasted, and is received by bluetooth BLE receiving device;
Decompression unit: for decompressing the bluetooth BLE receiving device to the current Bluetooth BLE broadcast packet Contracting.
In device of the present invention, the decompression unit further comprises:
Combination of bytes module: for making the bluetooth BLE receiving device by the class UNIX of the current Bluetooth BLE broadcast packet High 2 byte of timestamp 2 byte low with the class UNIX timestamp of corresponding monitoring data forms the number of combinations of 4 bytes;
Comparison module: for by the class UNIX timestamp of the number of combinations of 4 byte and the current Bluetooth BLE broadcast packet Compare, and judge difference whether less than 32768, in this way, then it is assumed that the number of combinations of 4 byte be acquisition the moment, otherwise, by institute The number of combinations for stating 4 bytes subtracts 0X10000, obtains the class UNIX timestamp at acquisition moment.
In device of the present invention, the length is 0X1E, and the Bluetooth broadcast type is 0XFF, and the verification is adopted It is verified with CRC8;Unique ID of the bluetooth bracelet is by low 2 byte of the bluetooth bracelet factory number, bluetooth bracelet factory number The MAC Address of high 2 byte and the bluetooth bracelet combines to obtain.
In device of the present invention, the heart rate value, sleep state, battery capacity and do not wear bluetooth bracelet instantly State in fixed position, broadcast every time;The monitoring data are high in the priority that 0 position of monitoring data type is broadcasted In the priority in monitoring data Class1 position.
In device of the present invention, the length occupies 1 byte, and the Bluetooth broadcast type occupies 1 byte, The producer BLE broadcast Packet type occupies 1 byte, and the heart rate value occupies 1 byte, and the monitoring data type 0 occupies 2 A byte, the monitoring data Class1 occupy 2 bytes, and the sleep state occupies 1 byte, battery capacity instantly 1 byte is occupied, the bluetooth bracelet of not wearing occupies 1 byte, and the emissive porwer value occupies 1 byte, the verification Value occupies 1 byte.
The broadcasting method and device for implementing the monitoring data of bluetooth bracelet of the invention, have the advantages that due to The monitoring data different to bluetooth bracelet are classified, and the data type ID of monitoring data is obtained;Data type ID is in 0X0000 When between~0X7FFF, the currently monitored data are compressed, obtain bluetooth BLE broadcast packet;Bluetooth BLE broadcast packet corresponding position Low 2 byte representation actual value, high 2 byte representation obtains low 2 byte of class UNIX timestamp at the actual value moment;Thus Bluetooth BLE receiving device can be made to be easy to reject duplicate BLE broadcast message, reduce it between bluetooth BLE receiving device Data traffic, avoid repetitive operation;In addition, in monitoring data type 0, the value of monitoring data 0, monitoring data Class1 and prison The currently monitored data of the bluetooth bracelet are filled into the bluetooth BLE broadcast packet by turns between the value 1 of measured data, are passed through It is broadcasted after encryption and checking treatment, and is received by bluetooth BLE receiving device, bluetooth bracelet monitoring data may be implemented in this way It is efficient transmission and reception, improve the timeliness and stability of system;So it can efficiently transmit bluetooth bracelet current state number According to effectively obtaining bluetooth bracelet location information and while current data, improving the capacity of system access, reducing and bluetooth Data traffic between BLE receiving device, avoids repetitive operation.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention without any creative labor, may be used also for those of ordinary skill in the art To obtain other drawings based on these drawings.
Fig. 1 is the process of method in the broadcasting method and device one embodiment of the monitoring data of bluetooth bracelet of the present invention Figure;
Fig. 2 is the specific stream that bluetooth BLE receiving device unzips it current Bluetooth BLE broadcast packet in the embodiment Cheng Tu;
Fig. 3 is the format list of monitoring data in the embodiment;
Fig. 4 is the compressed format list of part monitoring data in the embodiment;
Fig. 5 is the structural schematic diagram of device in the embodiment;
Fig. 6 is the transmission times of single monitoring data and the corresponding table of its Loss Rate in monitoring data in the embodiment.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
In the broadcasting method of the monitoring data of bluetooth bracelet of the present invention and Installation practice, bluetooth bracelet monitoring data Broadcasting method flow chart it is as shown in Figure 1.In Fig. 1, the broadcasting method of the bluetooth bracelet monitoring data includes the following steps:
Monitoring data step S01 different to bluetooth bracelet are classified, and the data type ID for obtaining monitoring data is 0X0000~0X7FFF and 0X8000~0XFFFF: in this step, the monitoring data different to bluetooth bracelet are classified, to prison Each data type of measured data is numbered, and the data type ID for obtaining monitoring data is 0X0000~0X7FFF and 0X8000 ~0XFFFF.Bluetooth bracelet is as bluetooth BLE from equipment.Above-mentioned bluetooth BLE is a kind of low-power consumption bluetooth standard, i.e., Bluetooth Low Energy, it be low cost, short distance, interoperable robustness wireless technology, work exempting to permit 2.4GHz ISM radio frequency band.
Fig. 3 is the format list of monitoring data in the present embodiment, and in Fig. 3, the format of monitoring data includes from beginning to last Hold length, Bluetooth broadcast type, producer BLE the broadcast Packet type, low 2 byte of bluetooth bracelet factory number, bluetooth being arranged successively High 2 byte of bracelet factory number, heart rate value, heart rate value acquisition low 2 byte of class UNIX timestamp at moment, monitoring data type 0, Low 2 bytes of value 0 of monitoring data, high 2 byte of the value of monitoring data 0, monitoring data Class1, monitoring data low 2 byte of value 1, High 2 byte of value 1 of monitoring data, low 1 byte of class UNIX timestamp, high 3 byte of class UNIX timestamp, sleep state, battery are worked as Lower capacity does not wear bluetooth bracelet, emissive porwer value and check value.
Wherein, length occupies 1 byte, and Bluetooth broadcast type occupies 1 byte, and producer BLE broadcasts Packet type and occupies 1 Byte, heart rate value occupy 1 byte, and monitoring data type 0 occupies 2 bytes, and monitoring data Class1 occupies 2 bytes, sleep State occupies 1 byte, and capacity occupies 1 byte to battery instantly, does not wear bluetooth bracelet and occupies 1 byte, emissive porwer value 1 byte is occupied, check value occupies 1 byte.
In addition, length is fixed 0X1E, Bluetooth broadcast type is fixed as 0XFF.Packet type, needle are broadcasted for producer BLE It to encryption or does not encrypt, in Fig. 3, is distinguished with " T ", " h ", " i ", " n ", " K ", " e ", " r ", wherein T indicates that trade edition does not encrypt Data, K indicate the encrypted data of trade edition;H indicates the data that quick version does not encrypt, and i indicates the quick encrypted number of version According to;Producer BLE broadcasts the undefined numerical value (in addition to " T ", " h ", " i ", " n ", " K ", " e ", " r ") of Packet type, leaves indigo plant for Tooth monitors series of products (bluetooths such as bluetooth bracelet, intelligent entrance guard or intelligent water logging acquire equipment) definition and uses;Bluetooth BLE is received After equipment receives data, according to the definition of this byte value, actual data are parsed.I.e. by this byte, number will be monitored According to classifying.Heart rate value, sleep state, battery capacity and the states such as bluetooth bracelet are not worn into fixed position, often instantly Secondary broadcast improves the efficiency of system in this way.For the other equipment of non-bluetooth bracelet, intelligent entrance guard, intelligence Water logging etc., the main distinction are the data type differences in fixed position filling.
Verification in the format of above-mentioned monitoring data is verified using CRC8, and generator polynomial is g (x)=x8+x5+x4+ 1, Wherein, x is monitoring data to be verified, and g (x) is check results value.
Step S02 is when the data type ID of the currently monitored data is between 0X0000~0X7FFF, to the currently monitored number According to being compressed, bluetooth BLE broadcast packet is obtained;Or when the currently monitored data data type ID 0X8000~0XFFFF it Between when, the values of the currently monitored data is actual value: in the present embodiment, according to the actual conditions of medical bluetooth bracelet, will be monitored Data compression takes low 2 byte data of class UNIX timestamp at 2 bytes, and 4 byte values of composition are broadcast out, and compresses Format is shown in Fig. 4.In this step, when the data type ID of the currently monitored data is between 0X0000~0X7FFF, to working as Preceding monitoring data are compressed, and bluetooth BLE broadcast packet is obtained, and low 2 byte representation of bluetooth BLE broadcast packet corresponding position is practical Value, high 2 byte representation obtain low 2 byte of class UNIX timestamp at actual value moment.
For class UNIX timestamp, system uses 4 byte representations, is defined as unsigned type (off-gauge UNIX time Stamp), i.e. the number of seconds of the current time distance January in 1970 of 00:00:00 on the 1st.What 0x00000000 was indicated is on January 1st, 1970 00:00:00 (Beijing time: on January 1st, 1970 08:00:00), and it is on 2 7th, 2,106 06 that 0XFFFFFFFF is corresponding: 28:15 (Beijing time: on 2 7th, 2106 14:28:15).Above-mentioned class UNIX timestamp refers both to the bluetooth where monitoring data The class UNIX timestamp of BLE broadcast packet, rather than the class UNIX timestamp of bluetooth BLE receiving device.
When the data type ID of the currently monitored data is between 0X8000~0XFFFF, the value of the currently monitored data is real Actual value, corresponding monitoring data are the data of no compression, i.e., its 4 byte is the actual value without compression.This compression method is for doctor It treats for monitor system, bluetooth BLE receiving device can be made to be easy to reject duplicate BLE broadcast message, reduce itself and indigo plant Data traffic between tooth BLE receiving device, avoids repetitive operation.Such as: the dtd--data type definition of same day movement step number is 0X8000, expression is the step number passed by the same day, and the timeliness with 4 byte representations, such data is of less demanding, poor a few minutes Clock can receive, therefore class UNIX timestamp is filled not in its broadcast packet data value, but Bluetooth recipient devices are using a kind of Approximate processing method: use the class UNIX timestamp of bluetooth bracelet broadcast moments as its time.
The compression algorithm that specially treated is carried out by the value to monitoring data by the actual value of monitoring data and is monitored The bluetooth bracelet moment of data puts together, so that bluetooth BLE receiving device obtains detailed information, while being also conducive to bluetooth BLE receiving device tells duplicate data.
Step S03 is between the value 1 of monitoring data type 0, the value of monitoring data 0, monitoring data Class1 and monitoring data The currently monitored data of bluetooth bracelet are filled into bluetooth BLE broadcast packet by turns, it, will be current after encryption and checking treatment Bluetooth BLE broadcast packet is broadcasted, and is received by bluetooth BLE receiving device: in the present embodiment, having been made to each monitoring data excellent The processing of first grade, 0 indicates highest priority, when there are this kind of monitoring data, preferentially broadcasts by turns in the position of monitoring data 0 Out;1 expression priority is taken second place, and is mainly broadcast out in the position of monitoring data 1, in monitoring number not higher than its priority In the case where, it can be broadcast out by turns in the position of monitoring data 0;Numerical value is bigger, and priority is lower.That is, Monitoring data are higher than the priority in monitoring data Class1 position in the priority that 0 position of monitoring data type is broadcasted.
In this step, monitoring data type 0, the value of monitoring data 0, monitoring data Class1 and monitoring data value 1 it Between the currently monitored data of bluetooth bracelet are filled into bluetooth BLE broadcast packet by turns, through encryption and checking treatment after, will work as Preceding bluetooth BLE broadcast packet is broadcasted, and is received by bluetooth BLE receiving device.In the present embodiment, above-mentioned encryption using AES encryption mode, that is, partial information described in Fig. 2 is encrypted, the password of encryption is set when bluetooth bracelet enables It sets, this password is arranged by dedicated setting tool.
It is noted that bluetooth BLE broadcast packet includes that bluetooth bracelet information, monitoring data information and bluetooth bracelet obtain The time of monitoring data can solve the validity period in monitoring data source, multiple information contents and each monitoring data in this way Problem, so that bluetooth BLE broadcast capability is more widely used.
Step S04 bluetooth BLE receiving device unzips it current Bluetooth BLE broadcast packet: in this step, bluetooth BLE Receiving device unzips it current Bluetooth BLE broadcast packet.
Because heart rate value, sleep state, battery instantly capacity and do not wear bluetooth bracelet every time can be in monitoring data Fixed position does not need to fill by turns, broadcast by turns so requiring to be broadcasted every time.By such in Bluetooth broadcast The method that the monitoring data and dynamic sharing of the fixed position filling fixed type of message segment fill bluetooth BLE monitoring data by turns, Single volume transmits more monitoring data information every time;Single bluetooth BLE broadcast packet repeats to send simultaneously, is combined into this way The broadcast mode of multiple volume realizes the efficient transmission and reception of bluetooth bracelet monitoring data, improves the timeliness and surely of system It is qualitative, corresponding table as shown in FIG. 6.The present invention can efficiently transmit bluetooth bracelet current status data, effectively obtain bluetooth hand While ring position information and current data, the capacity of system access is improved, reduces the data flow between bluetooth BLE receiving device Amount, avoids repetitive operation.
In the present embodiment, unique ID of bluetooth bracelet is by low 2 byte of bluetooth bracelet factory number, bluetooth bracelet factory number The MAC Address of high 2 byte and bluetooth bracelet combines to obtain.Different bluetooth bracelets can thus be distinguished, and (bluetooth BLE broadcast is set It is standby).
It is noted that bluetooth bracelet needs to do monitoring data time statistical disposition in the present embodiment, it is more than certain The monitoring data of time do invalidation (being 1~100 minute under normal circumstances, i.e., 60~6000 seconds), such as having for rhythm of the heart Imitating the time is 5 minutes, is monitoring 5 after heart rate value minutes in, is all being effective;More than 5 minutes, then bluetooth bracelet was by the monitoring Data abandon;Other monitoring data are also handled after the same method, and only specific numerical value may have difference.In this way, Each monitoring data have class UNIX timestamp, it is easy to be identified by bluetooth BLE receiving device, to weed out those The bluetooth BLE broadcast packet sent is repeated, and will not be connectionless because of bluetooth BLE, loses part monitoring data.Class UNIX timestamp Another use be that the time of current Bluetooth bracelet and each monitoring data obtain the class UNIX timestamp comparation at moment, bluetooth When BLE receiving device is easy to judge whether the monitoring data have been subjected to (invalid), also it is easy to get bluetooth bracelet and is somebody's turn to do Monitoring data have pass by how many second.
For the present embodiment, above-mentioned steps S04 can also be refined further, and the flow chart after refinement is as shown in Figure 2. In Fig. 2, above-mentioned steps S04 further comprises:
Step S41 bluetooth BLE receiving device by high 2 byte of class UNIX timestamp of current Bluetooth BLE broadcast packet with it is corresponding Low 2 byte of the class UNIX timestamp of monitoring data forms the number of combinations of 4 bytes: in this step, bluetooth BLE receiving device will High 2 byte of class UNIX timestamp of current Bluetooth BLE broadcast packet 2 byte composition low with the class UNIX timestamp of corresponding monitoring data The number of combinations of one 4 byte.
The class UNIX timestamp comparation of the number of combinations of 4 bytes and current Bluetooth BLE broadcast packet is judged difference by step S42 Whether value is less than 32768: in this step, by the class UNIX timestamp ratio of the number of combinations of 4 bytes and current Bluetooth BLE broadcast packet Compared with, and judge its difference whether less than 32768, if it is determined that result be it is yes, then follow the steps S43;Otherwise, step is executed S44。
Step S43 think the number of combinations of 4 bytes be acquisition the moment: if the judging result of above-mentioned steps S42 be it is yes, hold This step of row.In this step, it is believed that the number of combinations of above-mentioned 4 byte is the acquisition moment.
The number of combinations of 4 bytes is subtracted 0X10000 by step S44, obtains the class UNIX timestamp at acquisition moment: if above-mentioned The judging result of step S42 be it is no, then execute this step.In this step, the number of combinations of above-mentioned 4 byte is subtracted into 0X10000, is obtained To the class UNIX timestamp at acquisition moment.
Bluetooth bracelet broadcasts out each monitoring data in system according to above-mentioned regular BLE.Using monitoring data Within its validity period, the mode of broadcast is repeated several times, reduces the Loss Rate of the monitoring data of bluetooth bracelet.Bluetooth bracelet is by setting Setting the mode of each monitoring data transmission times, (another implementation method: various monitoring data are arranged in bluetooth BLE receiving device Validity period, such as 1 minute, 5 minutes), guarantee that some monitoring data by transmission enough times, just reduces within the regular hour The probability (analyzing referring to Fig. 6) that the monitoring data are lost is set to improve the monitoring data and be above sent to bluetooth BLE reception The reliability of standby success rate, system is guaranteed.
The present embodiment further relates to a kind of device of broadcasting method for realizing above-mentioned bluetooth bracelet monitoring data, structural representation For figure as shown in figure 5, in Fig. 5, which includes taxon 11, compression unit 12, cryptographic check radio unit 13 and decompression Unit 14;Wherein, taxon 11 is classified for the monitoring data different to bluetooth bracelet, obtains the data of monitoring data Type ID is 0X0000~0X7FFF and 0X8000~0XFFFF;The format of monitoring data includes the length being arranged successively, bluetooth Broadcast type, producer BLE broadcast Packet type, low 2 byte of bluetooth bracelet factory number, high 2 byte of bluetooth bracelet factory number, the heart Rate value, heart rate value acquisition low 2 byte of class UNIX timestamp at moment, monitoring data type 0, low 2 byte of the value of monitoring data 0, High 2 bytes of value 0 of monitoring data, monitoring data Class1, low 2 byte of value 1 of monitoring data, high 2 byte of the value of monitoring data 1, Low 1 byte of class UNIX timestamp, high 3 byte of class UNIX timestamp, sleep state, battery instantly capacity, do not wear bluetooth bracelet, Emissive porwer value and check value;Compression unit 12 be used for when the currently monitored data data type ID 0X0000~0X7FFF it Between when, the currently monitored data are compressed, bluetooth BLE broadcast packet is obtained;Low 2 byte representation of bluetooth BLE broadcast packet is practical Value, high 2 byte representation obtain low 2 byte of class UNIX timestamp at the actual value moment;Or the number when the currently monitored data When according to type ID between 0X8000~0XFFFF, the currently monitored data are the bluetooth BLE broadcast packet;The currently monitored data 4 bytes are the actual value without compression.
Cryptographic check radio unit 13 is used in monitoring data type 0, the value of monitoring data 0, monitoring data Class1 and prison The currently monitored data of bluetooth bracelet are filled into bluetooth BLE broadcast packet by turns between the value 1 of measured data, by encryption and school It is broadcasted after testing processing, and is received by bluetooth BLE receiving device.Decompression unit 14 is for making bluetooth BLE receiving device pair Current Bluetooth BLE broadcast packet unzips it.The present invention can efficiently transmit bluetooth bracelet current status data, obtain indigo plant effective While tooth bracelet location information and current data, the capacity of system access is improved, reduces the number between bluetooth BLE receiving device According to flow, repetitive operation is avoided.
In the present embodiment, decompression unit 14 further comprises combination of bytes module 141 and comparison module 142;Wherein, word Section composite module 141 for make bluetooth BLE receiving device by high 2 byte of class UNIX timestamp of current Bluetooth BLE broadcast packet with Low 2 byte of class UNIX timestamp of corresponding monitoring data forms the number of combinations of 4 bytes;Comparison module 142 is used for 4 bytes Number of combinations and current Bluetooth BLE broadcast packet class UNIX timestamp comparation, and judge difference whether less than 32768, if so, then The number of combinations for thinking 4 bytes is the acquisition moment number of combinations of 4 bytes otherwise to be subtracted 0X10000, obtains the class at acquisition moment UNIX timestamp.
It is noted that above-mentioned length occupies 1 byte, Bluetooth broadcast type occupies 1 byte, producer BLE broadcast Packet type occupies 1 byte, and heart rate value occupies 1 byte, and monitoring data type 0 occupies 2 bytes, and monitoring data Class1 accounts for With 2 bytes, sleep state occupies 1 byte, and capacity occupies 1 byte to battery instantly, does not wear bluetooth bracelet and occupies 1 word Section, emissive porwer value occupy 1 byte, and check value occupies 1 byte.
It is noted that above-mentioned length is 0X1E in the present embodiment, Bluetooth broadcast type is 0XFF, and verification uses CRC8 verification;Unique ID of bluetooth bracelet by low 2 byte of bluetooth bracelet factory number, high 2 byte of bluetooth bracelet factory number and The MAC Address of bluetooth bracelet combines to obtain, and can thus distinguish different bluetooth bracelets.
It is noted that in the present embodiment, in such a way that same categorical data is divided into two segment descriptions, thus Facilitate the classification processing of encrypted fields, Partial encryption or sectional encryption etc. can be carried out, it is such as above-mentioned: heart rate value, class UNIX time It stabs high 3 byte of low 1 byte, class UNIX timestamp and low 2 byte of bluetooth bracelet factory number, bluetooth bracelet factory number is high by 2 Byte, low 2 byte of the value of monitoring data 0, low 2 byte of the value of monitoring data 1, sleep state etc., reference can be made to Fig. 3.
In the apparatus of the present, heart rate value, sleep state, battery capacity and do not wear the state of bluetooth bracelet and exist instantly Fixed position, is broadcasted every time.Improve the efficiency of system in this way.
To priority processing has been done in monitoring data, monitoring data are high in the priority that 0 position of monitoring data type is broadcasted In the priority in monitoring data Class1 position.
In short, the present invention solves the problems, such as that the communication efficiency between bluetooth bracelet and bluetooth transceiver is low, capacity is low: mentioning Connection is not established between bluetooth master for bluetooth bracelet, in such a way that BLE is broadcasted, realizes that efficiently transmitting bluetooth bracelet is current The method of status data improves the appearance of system access while effectively obtaining the location information and current data of bluetooth bracelet Amount.The method that the multiple volume that the present invention uses sends bluetooth BLE broadcast packet, and all monitoring quantities are all attached to timestamp, so that Bluetooth BLE receiving device is easy to reject duplicate bluetooth BLE broadcast message, reduces its number between bluetooth BLE receiving device According to flow, repetitive operation is avoided.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention Within mind and principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.

Claims (8)

1. a kind of broadcasting method of bluetooth bracelet monitoring data, which comprises the steps of:
A) monitoring data different to bluetooth bracelet are classified, obtain monitoring data data type ID be 0X0000~ 0X7FFF and 0X8000~0XFFFF;The format of the monitoring data includes the length being arranged successively, Bluetooth broadcast type, producer BLE broadcast Packet type, low 2 byte of bluetooth bracelet factory number, high 2 byte of bluetooth bracelet factory number, heart rate value, heart rate value are adopted Collect low 2 byte of class UNIX timestamp, monitoring data type 0, low 2 byte of the value of monitoring data 0, the value of monitoring data 0 at moment High 2 byte, monitoring data Class1, low 2 byte of value 1 of monitoring data, high 2 byte of the value of monitoring data 1, class UNIX timestamp High 3 byte of low 1 byte, class UNIX timestamp, sleep state, battery instantly capacity, do not wear bluetooth bracelet, emissive porwer value and Check value;
B) when the data type ID of the currently monitored data is between 0X0000~0X7FFF, the currently monitored data are carried out Compression, obtains bluetooth BLE broadcast packet;The low 2 byte representation actual value of the bluetooth BLE broadcast packet corresponding position, high 2 table of bytes Show low 2 byte of class UNIX timestamp for obtaining the actual value moment;Or
When the data type ID of the currently monitored data is between 0X8000~0XFFFF, the currently monitored data are institute State bluetooth BLE broadcast packet;4 bytes of the currently monitored data are the actual value without compression;
C) between the value 1 of the monitoring data type 0, the value of monitoring data 0, monitoring data Class1 and monitoring data by turns The currently monitored data of the bluetooth bracelet are filled into the bluetooth BLE broadcast packet, it, will after encryption and checking treatment Current Bluetooth BLE broadcast packet is broadcasted, and is received by bluetooth BLE receiving device;
D) the bluetooth BLE receiving device unzips it the current Bluetooth BLE broadcast packet;
The step D) further comprise following steps:
D1) the bluetooth BLE receiving device by high 2 byte of class UNIX timestamp of the current Bluetooth BLE broadcast packet with it is corresponding Low 2 byte of the class UNIX timestamp of monitoring data forms the number of combinations of 4 bytes;
D2) by the class UNIX timestamp comparation of the number of combinations of 4 byte and the current Bluetooth BLE broadcast packet, and judge difference Whether value is less than 32768, in this way, then it is assumed that the number of combinations of 4 byte is the acquisition moment, otherwise, by the combination of 4 byte Number subtracts 0X10000, obtains the class UNIX timestamp at acquisition moment.
2. the broadcasting method of bluetooth bracelet monitoring data according to claim 1, which is characterized in that the length is 0X1E, the Bluetooth broadcast type are 0XFF, and the verification is verified using CRC8;Unique ID of the bluetooth bracelet is by the indigo plant The MAC Address of low 2 byte of tooth bracelet factory number, high 2 byte of bluetooth bracelet factory number and the bluetooth bracelet combines to obtain.
3. the broadcasting method of bluetooth bracelet monitoring data according to claim 2, which is characterized in that the heart rate value is slept Capacity and the state for not wearing bluetooth bracelet are broadcasted every time in fixed position instantly for dormancy state, battery;The monitoring data exist The priority of 0 position of the monitoring data type broadcast is higher than the priority in monitoring data Class1 position.
4. the broadcasting method of bluetooth bracelet monitoring data according to claim 1, which is characterized in that the length occupies 1 A byte, the Bluetooth broadcast type occupy 1 byte, and the producer BLE broadcast Packet type occupies 1 byte, the heart rate Value occupies 1 byte, and the monitoring data type 0 occupies 2 bytes, and the monitoring data Class1 occupies 2 bytes, described Sleep state occupies 1 byte, and capacity occupies 1 byte to the battery instantly, and the bluetooth bracelet of not wearing occupies 1 word Section, the emissive porwer value occupy 1 byte, and the check value occupies 1 byte.
5. a kind of device for the broadcasting method for realizing bluetooth bracelet monitoring data as described in claim 1, which is characterized in that packet It includes:
Taxon: classifying for the monitoring data different to bluetooth bracelet, and the data type ID for obtaining monitoring data is 0X0000~0X7FFF and 0X8000~0XFFFF;The format of the monitoring data includes the length being arranged successively, Bluetooth broadcast Type, producer BLE broadcast Packet type, low 2 byte of bluetooth bracelet factory number, high 2 byte of bluetooth bracelet factory number, heart rate Value, low 2 byte of class UNIX timestamp at heart rate value acquisition moment, monitoring data type 0, low 2 byte of the value of monitoring data 0, prison High 2 byte of value 0, monitoring data Class1, low 2 byte of value 1 of monitoring data, high 2 byte of the value of monitoring data 1, class of measured data Low 1 byte of UNIX timestamp, high 3 byte of class UNIX timestamp, sleep state, battery instantly capacity, do not wear bluetooth bracelet, hair Penetrate intensity value and check value;
Compression unit: for when the data type ID of the currently monitored data is between 0X0000~0X7FFF, to described current Monitoring data are compressed, and bluetooth BLE broadcast packet is obtained;Low 2 byte representation of the bluetooth BLE broadcast packet corresponding position is practical Value, high 2 byte representation obtain low 2 byte of class UNIX timestamp at the actual value moment;Or
When the data type ID of the currently monitored data is between 0X8000~0XFFFF, the currently monitored data are institute State bluetooth BLE broadcast packet;4 bytes of the currently monitored data are the actual value without compression;
Cryptographic check radio unit: in the monitoring data type 0, the value of monitoring data 0, monitoring data Class1 and prison The currently monitored data of the bluetooth bracelet are filled into the bluetooth BLE broadcast packet by turns between the value 1 of measured data, are passed through After encryption and checking treatment, current Bluetooth BLE broadcast packet is broadcasted, and is received by bluetooth BLE receiving device;
Decompression unit: for unziping it the bluetooth BLE receiving device to the current Bluetooth BLE broadcast packet;
The decompression unit further comprises:
Combination of bytes module: for making class UNIX time of the bluetooth BLE receiving device by the current Bluetooth BLE broadcast packet Stab the number of combinations that high 2 byte 2 byte low with the class UNIX timestamp of corresponding monitoring data forms 4 bytes;
Comparison module: for by the class UNIX timestamp ratio of the number of combinations of 4 byte and the current Bluetooth BLE broadcast packet Compared with, and judge difference whether less than 32768, in this way, then it is assumed that the number of combinations of 4 byte is the acquisition moment, otherwise, will be described The number of combinations of 4 bytes subtracts 0X10000, obtains the class UNIX timestamp at acquisition moment.
6. device according to claim 5, which is characterized in that the length is 0X1E, and the Bluetooth broadcast type is 0XFF, the verification are verified using CRC8;Unique ID of the bluetooth bracelet by low 2 byte of the bluetooth bracelet factory number, The MAC Address of high 2 byte of bluetooth bracelet factory number and the bluetooth bracelet combines to obtain.
7. device according to claim 6, which is characterized in that the heart rate value, sleep state, battery capacity and not instantly The state of bluetooth bracelet is worn in fixed position, is broadcasted every time;The monitoring data are wide in 0 position of monitoring data type The priority broadcast is higher than the priority in monitoring data Class1 position.
8. device according to claim 5, which is characterized in that the length occupies 1 byte, the Bluetooth broadcast type 1 byte is occupied, the producer BLE broadcast Packet type occupies 1 byte, and the heart rate value occupies 1 byte, the monitoring number 2 bytes are occupied according to type 0, the monitoring data Class1 occupies 2 bytes, and the sleep state occupies 1 byte, described Instantly capacity occupies 1 byte to battery, and the bluetooth bracelet of not wearing occupies 1 byte, and the emissive porwer value occupies 1 word Section, the check value occupy 1 byte.
CN201610883007.1A 2016-10-09 2016-10-09 The broadcasting method and device of the monitoring data of bluetooth bracelet Active CN106507272B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610883007.1A CN106507272B (en) 2016-10-09 2016-10-09 The broadcasting method and device of the monitoring data of bluetooth bracelet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610883007.1A CN106507272B (en) 2016-10-09 2016-10-09 The broadcasting method and device of the monitoring data of bluetooth bracelet

Publications (2)

Publication Number Publication Date
CN106507272A CN106507272A (en) 2017-03-15
CN106507272B true CN106507272B (en) 2019-11-12

Family

ID=58294625

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610883007.1A Active CN106507272B (en) 2016-10-09 2016-10-09 The broadcasting method and device of the monitoring data of bluetooth bracelet

Country Status (1)

Country Link
CN (1) CN106507272B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107071717A (en) * 2017-06-15 2017-08-18 重庆智石网络科技有限公司 A kind of collecting method and device based on Bluetooth technology
CN108378846A (en) * 2018-02-08 2018-08-10 深圳市宏智力科技有限公司 Based on binary channels brain electric detection method and device
CN109165844A (en) * 2018-08-23 2019-01-08 合肥好多帮信息科技有限公司 A kind of dormitory management method based on student's state
CN109199354B (en) * 2018-09-17 2021-06-25 山东思迈教育科技有限公司 Heart rate data acquisition method and heart rate measuring equipment
CN109151788A (en) * 2018-09-28 2019-01-04 咪付(广西)网络技术有限公司 A kind of data in mobile phone transmission method and system based on bluetooth low energy device
CN110958594B (en) * 2019-12-18 2023-05-12 深圳市芯中芯科技有限公司 Effectiveness filtering method for searching Bluetooth BLE equipment
CN113747369B (en) * 2020-05-29 2023-03-24 芯海科技(深圳)股份有限公司 Broadcast data processing method, apparatus, computer device and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103888362B (en) * 2014-04-04 2017-10-31 深圳市科博能科技有限公司 Multiband wireless sensor network data router and system
US9763063B2 (en) * 2014-10-06 2017-09-12 Derek D. Kumar Secure broadcast beacon communications
CN104224151A (en) * 2014-10-11 2014-12-24 上海贝生医疗设备有限公司 Data collector and data collection method
CN104967972A (en) * 2015-06-29 2015-10-07 上海卓易科技股份有限公司 Method and device for testing wearable Bluetooth device through BLE protocol
CN105228151A (en) * 2015-10-16 2016-01-06 天彩电子(深圳)有限公司 A kind of method and apparatus of quick transmission air message

Also Published As

Publication number Publication date
CN106507272A (en) 2017-03-15

Similar Documents

Publication Publication Date Title
CN106507272B (en) The broadcasting method and device of the monitoring data of bluetooth bracelet
CN106507273B (en) Bluetooth BLE communication device and the method for carrying out communication control using the device
US20140378057A1 (en) Low energy bluetooth system with authentication during connectionless advertising and broadcasting
CN107124716B (en) Wireless channel dynamic key production method based on fixed position
CN106412886A (en) Method, device and system for secure access of intelligent device to wireless network
JP5205400B2 (en) SENSOR NETWORK SYSTEM, RADIO TRANSMITTING / RECEIVING DEVICE AND SENSOR INFORMATION TRANSMISSION METHOD
CN104811894B (en) Statistical method and device for people flow distribution and server
KR101612552B1 (en) Method for Multi-type Beacon Operation
CN1054693A (en) The continous cipher of cellular communication system is synchronous
DE102014007329A1 (en) Device and method for securing beacons
MX2020008163A (en) Wireless device, network node, and methods performed thereby.
CN109714291A (en) A kind of data transmission method and device
CN104904175B (en) Transmission method, base station, user equipment and the communication system of information
CN106412882A (en) Method and system for accessing intelligent equipment into wireless network
CN101461174A (en) A process for establishing a secret key
CN110049053A (en) A kind of data transmission system based on big data
CN108334917B (en) Low-power consumption wireless electronic tag system based on LORA technology
CN111083646A (en) Method and system for transmitting physical sign data with low power consumption
CN109548012A (en) A kind of construction method based on the wireless family domain net of more technical systems
CN104993904A (en) Secure network coding method for realizing data exchange between long distance area earth station source nodes through satellite relay
CN104579625A (en) DRM single-frequency network synchronization implementation method based on ARM and CPLD
DE102010021254A1 (en) Method for the secure agreement of a security key via an unencrypted radio interface
KR20230050688A (en) Biometric data collection device, residents monitoring system and method using the same
CN204721361U (en) PDT multichannel monitor
CN107105513A (en) A kind of detectable signal detection method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 510000 Tianhe District, Guangzhou, Zhongshan, No. 89 Guangdong Avenue, building A, room 3, room 02

Applicant after: Guangzhou creation cloud Technology Co., Ltd.

Address before: 510000 Tianhe District, Guangzhou, Zhongshan, No. 89 Guangdong Avenue, building A, room 3, room 02

Applicant before: Guangzhou Chuangxiang Science & Technology Co Ltd

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant