Bluetooth based on co-located is registered method
Technical field
The present invention relates to use built-in low-power consumption bluetooth function intelligent wearable device (such as mobile phone, bracelet, wrist-watch this
The equipment that sample can be realized bluetooth communication) positioning register method, be it is a kind of acquire relative position using Bluetooth communication, and then really
The fixed collaboration compared with exact position is registered method.
Background technique
Technology of Internet of things received the extensive concern of people in recent years." Internet of Things " (Internet of Things),
It refers to various information sensing devices, as radio frequency identification (RFID) device, infrared inductor, global positioning system, laser are swept
Retouch the huge network that various devices such as device combine with internet and formed.The purpose is to allow all articles all with net
Network links together, and system can automatically, in real time identify object, positions, tracks, monitor and trigger corresponding thing
Part.The rapid development and application of " Internet of Things " technology bring great convenience to people's lives.
Wherein, the scene applied and used in " Internet of Things " technology of registering is relatively broad, is mainly the following mode at present:
1, IC card (Integrated Circuit Card) is registered
IC card register according to distance be divided into contact with it is contactless.IC card need to be inserted into card reading by contact intelligent card
Device, card reader read the personal information being written in IC card and register to realize, this IC card is easy to appear poor contact in use
Disadvantage, and be prone to wear.
2, RFID radio frequency identification (Radio-Frequency Identification) is registered
, there is contact type intelligent card in the shortcomings that in order to overcome contact intelligent card, and RFID (radio frequency identification) is exactly
Using relatively more extensive one kind in contact type intelligent card, it realizes contactless automatic identification using radio communication.It is this
The personnel for needing to register to every in advance that register provide the card of a built-in electronic tag, have unique ID body in electronic tag
Part identifier, when electronic tag enters in the induction range of reader, the electromagnetism that electronic tag is constantly emitted by reader is asked
Ask signal activation, to feed back to card reader one answer signal for carrying ID number and data, be exactly based on electronic tag with
The signal inquiry and response of card reader from each other, card reader can quickly and accurately identify the ID number carried in electronic tag
And data, and the ID number for the electronic tag read and data are exported according to certain output format to computer, external control
Device or other terminal devices, to realize the identification to electronic tag.
RFID electronic label have it is small in size, capacity is big, and the service life is long, it is reusable the features such as, can support fast reading and writing,
Non- visual recognition, mobile identification, multi-targets recognition, positioning and long-term follow management.The disadvantage is that must be arranged in place of registering
Reader, and reader higher cost.
3, bluetooth is registered
Registering based on Bluetooth signal is many using having, and be roughly divided into two kinds: one is passively register: first in sign-in area
Domain arranges that a certain number of bluetooth anchor nodes, bluetooth anchor node scan the held bluetooth equipment of personnel of registering in its signal cover
The signal of sending, includes one or a set of identifier in this signal, and the signal searched is sent to service by bluetooth anchor node
Device, the server corresponding personnel of identifier that query search arrives in the database, completes to register.Another kind is actively to register, first
First arrange that a certain number of bluetooth anchor nodes, bluetooth anchor node scan personnel institute of registering in its signal cover in region of registering
The signal of bluetooth equipment sending is held, the personnel that register are by held bluetooth equipment active transmission personal information, such as name, number
Deng, the signal searched is sent to server by bluetooth anchor node, and server stores the data collected, complete label
It arrives.
From Bluetooth specification it is found that realize that bluetooth is registered the communication just needed between bluetooth equipment, bluetooth low energy device
Between most basic communication pattern be exactly scanning and broadcast.When bluetooth equipment will find other equipment, a method, apparatus is needed to carry out
Scanning, another method, apparatus are broadcasted.Bluetooth (link layer state machines of bluetooth) is in scanning state when scanning, can receive opposite end
The broadcast data packet of equipment.Scanning state, there are two sub- states: drive sweep and active scan.Drive sweep only receives broadcast report
Text.Active scan then sends scan request to broadcasting equipment, and obtains additional scanning response data.Bluetooth is in wide when broadcast
State is broadcast, broadcasting packet can be sent out.Broadcast type is generally divided into four kinds: attachable non-directional broadcast is (also known as general wide
Broadcast), it is most popular broadcast, uses generic broadcasted (ADV_IND) communication message format;Attachable directional broadcasting is (again
Claim directional broadcasting), it can be achieved that quick connection between equipment, uses orientation connection (ADV_DIRECT_IND) communication message lattice
Formula needs in message comprising broadcaster address and originator address;Not attachable non-directional broadcast (can not also known as connect wide
Broadcast), this broadcast is suitable for the case where equipment merely desires to broadcast data and is not desired to response scanning or connection, and use can not connect broadcast
(ADV_NONCONN_IND) communication message format;Scannable non-directional broadcasts (can also known as find to broadcast), can be with broadcast data
It is scanned with response, but connection cannot be established, use can scan broadcast (ADV_SCAN_IND) communication message format.
Bluetooth broadcast communication message is divided into 6 parts (such as Fig. 2 (a)), is respectively: leading, access address, header, length,
Data portion and verification.Leading is the alternate sequence of a byte, is 10101010.4 byte of access address, is fixed as
0x8E89BED6, the use when broadcast, scanning, initiating the connection.Four parts of header point: the broadcasting packet type of 4 bits is (as above
4 kinds of one segment description);2 bits retain;Send address style, receive address style be all 1 bit, indicate respectively send address,
Receiving address is random address or public address, if random address is indicated with 0, if public address is indicated with 1.Publicly
Location all includes 6 bytes totally 48 as the length of random address.Bluetooth low energy device will at least possess both addresses
One of type can also possess both address styles simultaneously.Public address, from IEEE application, is infused by manufacturer by IEEE
Volume mechanism is the mechanism unique identifier OUI (Organizationally Unique Identifier) of manufacturer distribution.
This address be it is unique, cannot modify.1 byte of length indicates the length of subsequent data part.Data portion is up to 37
Byte.Verify 3 bytes.
Bluetooth specification provides that the length of each broadcast communication message data part must be 37 bytes, wherein must include
The broadcasting equipment Bluetooth MAC address of 6 bytes, the data portion that can freely modify have 31 bytes.If effective data portion
Less than 31 bytes, remaining just with 0 completion, the data of this part are invalid.Valid data part includes several broadcast numbers
According to unit (AD Structure).It is the data for needing to broadcast in broadcast data unit, composition is: first character section is length
Value n indicates that following n byte is data portion.The first character section of data portion indicates data type (AD Type), blue
A series of types that can choose are given in tooth specification, can according to need unrestricted choice, according to the data type of selection, are mended
Fill the remaining data to be broadcasted of n-1 byte (AD Data).Such as Fig. 2 (b).
4, living things feature recognition is registered
It is this kind of register it is main have fingerprint attendance, face recognition is registered, and iris recognition is registered, it is this kind of register all to hardware according to
Rely higher, equipment of registering valuableness.Wherein face recognition and iris recognition are currently not very mature.
5, wifi registers
The method of registering is mainly used in smart phone, and smartwatch etc. has the mobile device of wifi communication function.Label
Arrange that certain amount knows the router of specific location to region, the personnel that register reach region of registering and first open mobile device
Wifi realizes using wifi location algorithm and positions that server determines success of registering according to location information after positioning successfully.The label
The success rate arrived depends on the accuracy of location algorithm, and needs to arrange the routing of certain amount location aware in the environment
Device, wherein the deployed position of router directly affects the accuracy of location algorithm again, so this is registered, method is to hardware environment
It is more demanding.
Currently, in the units such as campus, company or government department using most modes of registering be IC card register with RFID without
Line radio frequency identification is registered, in each one or two card reader special of place deployment of registering, therefore both modes of registering require
Hardware facility deployment cost of registering is high and place of registering is confined to interior, and scope of application scalability is bad, and flexibility is poor.Zhang Zong
Up to et al. in page 145 to page 148 of " Changchun University of Science and Technology's journal (natural science edition) " 34 (4) phase propose one kind within 2011
Based on the Bluetooth of mobile phone attendance checking system of ARM7 LPC2138 controller, which uses Bluetooth of mobile phone device address as the people that registers
The unique identity of member is registered with to replace tradition and uses magnetic card.The system uses ARM7 LPC2138 controller with AT command set
Mode control core is the CSR bluetooth module of BC417143 chip, by searching for the bluetooth equipment in effective range (≤20m)
Location, and compared with registered information pair, realization is automatically signing in, while being shown by screen and voice broadcast function prompts to register
Personnel register success or not.The bluetooth mode of registering is needed using special LPC2138 controller, CSR bluetooth module, liquid crystal
Display screen and voice module, it is poor to the adaptability of hardware, and single bluetooth equipment signal cover is limited, it is wider to cover
Range, need to dispose more above-mentioned special hardwares of registering of set.Student or office worker are allowed there are also school or company
It scans specified two dimensional code to designated place to register, the program is fast accurate, and low for equipment requirements, deficiency is that two dimensional code is fragile
Damage, and the student for needing each to register or office worker carry the mobile phone that can be networked.
Therefore, in region of registering additionally deployment auxiliary register special hardware in the case where, to setting low in using
The intelligent wearable device realization of power consumption Bluetooth function, which registers study, good practical value.At present not yet from open
It is found in the data delivered and realizes the solution registered using the intelligent wearable device with function of Bluetooth communication.
Summary of the invention
The technical problem to be solved in the present invention is to provide one kind without register region additionally dispose assist register it is dedicated
In the case where hardware device, determined using the function of Bluetooth communication of the intelligent wearable device with function of Bluetooth communication opposite
Position is to realize method that collaboration is registered.Networking realizes that collaboration is registered between this method passes through intelligent wearable device bluetooth module,
Dedicated hardware device of registering is assisted without additionally disposing in region of registering, reduces the requirement to hardware to a certain extent, and beat
The limitation for having broken single bluetooth module signal cover, expands the coverage area registered.In addition, due to without in sign-in area
The special hardware that auxiliary is registered additionally is disposed in domain, can set place of registering more flexiblely.
The technical scheme is that
The first step, building plurality of Bluetooth equipments mutually assist system of registering, which consists of three parts, and is to sign online respectively
To subsystem, register offline subsystem and server of registering.
Subsystem of registering online realizes the function of registering online of intelligent wearable device, and server is connected with registering.Online
Subsystem of registering is made of terminal and intelligent wearable device, and terminal has function of surfing the Net, and intelligent wearable device has bluetooth
Communication function.It is required that an at least terminal and a paired intelligent wearable device.In region of registering, with terminal
The intelligent wearable device of successful matching is equivalent to have function of surfing the Net (this intelligent wearable device with function of surfing the Net
Referred to as base positions point device), it can be realized and register online.Open online register function when, the end with base anchor point device pairing
End receives the place of currently registering of user's input, and the base in register place and connection is positioned the Bluetooth MAC address of point device by terminal
It is sent to server of registering.Register server data memory module by the place of registering received, base positioning point device bluetooth
MAC Address and the storage of server present system time return to success flag symbol of registering in the database and to terminal, and terminal should
Success flag symbol is transmitted to paired base positioning point device, and base anchor point device prompts are registered success online.Base positioning simultaneously
The unlatching of point device bluetooth can not connect broadcast broadcast a period of time (time span t1, t1 are 5 minutes to 15 minutes).Using wide
It broadcasts the address the machine bluetooth MAC (Media Access Control) for including in communication message and (sends the broadcast communication message
The Bluetooth MAC address of equipment), broadcast identifier of registering, success flag of registering symbol and hop count come around assisting other offline wear
Equipment realization is worn to register offline.
Subsystem of registering offline realizes the function of registering offline of intelligent wearable device, the intelligence that You Duotai is not matched with terminal
It can wearable device composition (calling off-line device in the following text).Off-line device will open function of registering offline and just be able to achieve and register offline, be
Guarantee to register the validity of time, and function of registering offline is automatically stopped after opening a period of time (t1).The indigo plant of off-line device
Tooth original state is generic broadcasted state, its bluetooth state is changed into scanning state after function is registered in unlatching offline, continues scan ring
Whether broadcast communication message containing register successful information is had in border.As long as in the time up to t1 for registering function unlatching offline
Scanning is considered as the off-line device in range of registering to a broadcast communication message containing successful information of registering in section, offline
It registers success.The broadcast communication message containing successful information of registering that successful off-line device will receive of registering offline simultaneously
In include MAC Address and current time be stored in oneself memory, the broadcast communication report containing successful information of registering received
The evidence that the MAC Address for including in text oneself is registered offline as assistance, current time are registered the time as oneself.Offline label
To successful off-line device bluetooth state switched to that broadcast state can not be connected by scanning state, utilizes the sheet for including in broadcast communication message
Machine Bluetooth MAC address, broadcast identifier of registering, success flag of registering symbol and hop count are come other offline wearable devices around helping
Realization is registered offline.If off-line device is in function unlatching of registering offline up to failing to scan always in the period of t1 to containing
It registers successful broadcast communication message, then regards as registering offline unsuccessfully.Networking cooperates with the mode registered between this bluetooth, beats
The limitation for having broken single Bluetooth signal transmission distance, expands the coverage area registered.For the validity in the region that guarantees to register,
Range of registering can be controlled by limiting the hop count of broadcast delivery, this kind of mode be again register range control bring it is convenient
And flexibility.
Overall information of registering is understood in order to facilitate manager, and successful off-line device of registering offline is connected into terminal pairing
After function, the information of registering offline of oneself is uploaded into server of registering.
Server of registering is a computer or work station, is equipped with data management system of registering thereon, and the system is by data
Memory module, data preparation module, database composition.Register online data and the offline label of data memory module self terminal in future
To data storage into database.Database stores the data of registering of intelligent wearable device, and an intelligent wearable device accounts for
One record, every record in have 5 fields, be respectively register success flag symbol, assist register offline Bluetooth MAC address,
It registers time, the machine (i.e. intelligent wearable device belonging to this record) Bluetooth MAC address and place of registering.Data preparation module
The data of registering in database are arranged, confirm the place of registering of off-line device, and after all places of registering are assert and finished, it will
Statistical result showed comes out.
Second step initializes intelligent wearable device, by the bluetooth of unpaired intelligent wearable device (i.e. off-line device)
It is set to generic broadcasted state, the bluetooth for having matched intelligent wearable device (i.e. base positioning point device) does not use broadcast letter
Road, but data communication is carried out with the terminal of pairing using data channel, so the bluetooth of base positioning point device is set to
It neither broadcasts nor scanning mode.These states are all blue in intelligent wearable device (including off-line device and base position point device)
It is set in tooth module.
Third step, subsystem of registering online carry out registering online for base positioning point device, and method is:
3.1 register online: the place of currently registering of user's input are received with the terminal of base anchor point device pairing, terminal will
The Bluetooth MAC address of place and paired base positioning point device of registering is sent to server of registering.It registers the number of server
Data of registering online (are worked as including place of currently registering, the Bluetooth MAC address of base positioning point device and server according to memory module
Preceding system time) storage in the database and to terminal return register success flag symbol, terminal by the success flag symbol be transmitted to
Pairing base position point device.Success flag of registering symbol have successfully with unsuccessful two states.When registering online, register ground
Point, the MAC Address of base positioning point device and time of registering store successfully, and success flag of registering symbol is just successfully (to be such as expressed as
TRUE), storage failure success flag symbol is just unsuccessful (being such as expressed as FALSE).
3.2 bases positioning point device judgement success flag symbol of registering turns 3.3 if success, if unsuccessful, turns 3.1, weight
Newly register.
The system time of 3.3 bases positioning point device storage this moment, which is used as, registers the time, and prompts success of registering, prompting mode
The screen that can be intelligent wearable device itself shows perhaps vibration reminding or the tinkle of bells prompting or this 3 kinds of methods simultaneously
With turn the 4th step.
The bluetooth of 4th step, base positioning point device is broadcasted, and method is:
The function timing variable T1 that registers in 4.1 initialization base positioning point devices is 0, and base positioning point device starts timing,
The system time that T1 starts to position point device with base increases.
Whether 4.2 judgement T1 are less than or equal to t1, if T1 is greater than t1, as shown in after the T1 time in Fig. 4 (a), stopping can not connect
Broadcast is connect, bluetooth reverts to the state neither broadcasted nor scanned, and turns 7.8;If T1 is less than or equal to t1, turn 4.3.
4.3 bases position the bluetooth state of point device as shown in arrow in Fig. 4 (a), by the state neither broadcasted nor scanned
Broadcast state can not be connected by being changed into, and the bluetooth of base positioning point device starts to broadcast outward.Broadcast communication message at this time contains label
To information, it is known as broadcasting packet of registering, data portion there are 4 data fields, is the machine Bluetooth MAC address, broadcast of registering respectively
Identifier, success flag of registering symbol and hop count, these message informations are used to that wearable device offline around is helped to realize offline
It registers.The machine Bluetooth MAC address, broadcast identifier of registering, success flag of registering symbol and hop count are successively individually placed to different wide
In multicast data unit, each domain at least accounts for a broadcast data unit.Broadcast identifier of registering is used to and other broadcast communications
Message is distinguished, and shows that the broadcast communication message contains information of registering, and the value for broadcast identifier of registering is developer's setting
Fixed value, such as can be set as 0xFF, expression is broadcasting packet of registering;Whether success flag of registering symbol shows to register succeeds,
It is divided into function and unsuccessful two states, such as shows that the corresponding equipment of MAC Address is registered success with TRUE, with showing MAC with FALSE
The corresponding equipment in location is registered unsuccessful.Local equipment Bluetooth MAC address sends the bluetooth MAC of the broadcast communication message equipment
Address can allow the equipment for scanning broadcasting packet of registering to this to know which intelligent wearable device broadcast is the information of registering be by
Out;Hop count refers to that broadcasting packet of registering comes current device, it is specified that base anchor point device broadcasts label by how many times transmitting
Hop count into broadcast is 0;The setting rule of hop count is as follows: if hop count in the broadcasting packet of registering that equipment scanning is resolved to of registering
It is integer for nn, nn, then hop count is nn+1 in the message that the equipment itself is sent.The broadcast singal of single bluetooth equipment is in reality
The propagation radius of application is 10m or so, general classroom or meeting signature, and the maximum value N, N of nn is integer, and N is 3 or 4 or 5,
If usage scenario has particular/special requirement, N can be zoomed in or out suitably.
5th step, off-line device open function of registering offline, and the bluetooth of off-line device is changed into scanning by generic broadcasted state
State, as shown in Fig. 4 (b) (c) (d).
6th step, the function timing variable T2 that registers of the offline equipment of registering of initialization are system of 0, the T2 with off-line device
Time starts to increase.
7th step, off-line device determine whether T2 is less than or equal to t1, if T2 is less than or equal to t1, turn 7.1;If T2 is greater than t1,
Turn 7.6.
Whether can not connect broadcast communication message, if so, then turning 7.2 if having around 7.1 scannings;If no, turning the 7th step.
Whether the parsing of 7.2 off-line devices can not connect containing broadcast identifier of registering in broadcast communication message, if so, being then
It registers broadcast communication message, then turns 7.2.1;If no, abandoning the message, turns the 7th step and continue to scan on.
7.2.1 parsing is registered the success flag symbol of registering in broadcast communication message, if the value for success flag symbol of registering be at
Function then turns 7.2.2;If success flag of registering symbol value be it is unsuccessful, abandon the message, turn the 7th step continue to scan on.
7.2.2 the hop count in the broadcast communication message of registering is parsed, if hop count is less than or equal to N, turns 7.2.3, if more than
N then abandons the message, turns the 7th step and continues to scan on.
7.2.3 the machine Bluetooth MAC address in broadcast communication message of registering is parsed, by the machine bluetooth MAC parsed
Location is stored in the off-line device memory together with current system time, and the MAC Address in message is registered as the equipment off-line
Successful voucher (also known as assisting the Bluetooth MAC address registered offline), present system time is registered the time as the off-line device.
7.2.4 off-line device prompts success of registering, and the screen that prompting mode can be intelligent wearable device itself is shown,
Perhaps vibration reminding or the tinkle of bells are reminded or this 3 kinds of methods are used in combination, and turn 7.3.
7.3 calculate and need the hop count that is broadcasted, i.e., on the basis of hop count in the broadcast communication message of registering received
1 is added to obtain new hop count.If hop count is greater than N, the bluetooth state of the off-line device switchs to generic broadcasted state by scanning state, such as
Shown in Fig. 4 (c), explanation cannot assist again other equipment to register, and turn 7.7;If hop count is less than or equal to N, turn 7.4.
The bluetooth state of 7.4 off-line devices is converted into that broadcast state can not be connected by scanning state, as offline in Fig. 4 (b)
Shown in bluetooth state variation when successfully and newly hop count of registering is less than or equal to N, other off-line devices is assisted to register.
7.5 off-line devices are broadcasted with that can not connect broadcast state, determine T2 whether be less than or equal to t1, if T2 be less than etc.
In t1, turn 7.5, if T2 is greater than t1, turns 7.7.
The prompt of 7.6 off-line devices is registered unsuccessfully, and the bluetooth state of the off-line device switchs to generic broadcasted state by scanning state,
As shown in bluetooth state variation at the end of Fig. 4 (d) T2 moment, turn 7.8.
The bluetooth state of 7.7 off-line devices switchs to generic broadcasted state by that can not connect broadcast state, such as T2 in Fig. 4 (b)
At the end of moment shown in bluetooth state variation, turn 7.8.
7.8 register end, execute the 8th step.
Step 8: if off-line device and networked terminals match, by the link established between terminal by number of registering offline
According to terminal is transmitted to, terminal uploads to server of registering again.The data that successful equipment uploads of registering offline include registering successfully to mark
Know symbol (being at this time success), assist the Bluetooth MAC address registered offline, off-line device register time and off-line device the machine it is blue
Tooth MAC Address.Offline register failure equipment upload data include register success flag symbol (being at this time unsuccessful), assist from
Bluetooth MAC address (for sky) that line is registered, off-line device is registered the time (for sky) and the machine Bluetooth MAC address of off-line device,
Turn the 9th step.
9th step, data memory module in server of registering by the data of registering of upload (including register offline data and
Online data of registering) it stores in database one by one.An equipment accounts for a record, the label in every record in database
To success flag symbol, assist the Bluetooth MAC address registered offline, time of registering, the machine Bluetooth MAC address and register place and label
Corresponding to data, " place of the registering " field for equipment of only registering offline is NULL, and equipment of registering online " assists offline label
The Bluetooth MAC address arrived " field is NULL.
Tenth step, the place of registering for equipment of being registered in the data preparation module confirmation database in server of registering offline,
As shown in Figure 5.Since the data that the equipment registered offline uploads are places of not registering, set so needing to confirm to register offline
Standby place of registering, the specific method is as follows:
10.1 data preparation modules filter out success flag symbol of registering from database as data of successfully registering.
" place of registering " field in the data of registering that 10.2 data preparation module polls filter out, confirmation register set offline
Standby place of registering, specific method is:
10.2.1 since first success flag symbol of registering is data of successfully registering, what inquiry filtered out one by one registers
" place of registering " field in data;
If 10.2.2 current " place of registering " field is NULL, turn 10.3;If current " place of registering " field is not NULL,
The success flag that then determines whether also to register symbol successfully to register data, if in addition, if inquire next success flag of registering
Symbol is " place of the registering " field for data of successfully registering, and turns 10.2.2;If without the place confirmation that illustrates to register finishes, and turns
11st step.
10.3 obtain databases with the value of " assisting the Bluetooth MAC address registered offline " in a line, in " the machine bluetooth
Same value is inquired in MAC Address " field, navigates to the row where assisting to register equipment offline.
10.4 obtain the value in " place of registering " of equipment of assisting to register offline, judge whether the value is NULL, if NULL,
10.3 are gone to, if not NULL, then the value in " place of registering " is obtained, turns 10.5.
The value in 10.5 " places of registering " that will acquire is assigned to 10.2.1 and traces all the way into 10.4 steps and carry out all values
The place confirmation of registering registered offline is realized in " place of registering " of NULL.Turn 10.2.1.
11st step, the data preparation module for server of registering is by statistics of database result presentation to administrative staff.
12nd step terminates.
The present invention can achieve following technical effect:
1. the equipment that prescribed limit is registered is reached not in time in time tolerance band of registering, if camouflage is registered again offline
Upload registers information to server, then can not include the MAC Address for correctly assisting to register in information of registering.So the present invention can
To correctly judge, to reach equipment that prescribed limit is registered not in time in time tolerance band of registering be to register unsuccessfully, be ensure that
The correctness registered.
2, by mutually assisting to register between bluetooth, the limitation of single bluetooth module signal cover has been broken, has expanded
The coverage area registered.For the validity in the region that guarantees to register, label can be controlled by limiting the hop count of broadcast delivery
To range, this kind of mode is that the register control of range brings conveniently and flexibly property again.In addition, without in the additional portion in region of registering
The special hardware registered of administration's auxiliary, it is only necessary to it is common with function of Bluetooth communication can networked terminals (such as mobile phone, notes
This computer etc.) it can be realized and register, the mobility of terminal sets place of registering more flexiblely.
It 3, can be short because broadcast communication message of registering can be arrived by the scanning of multiple bluetooth equipments simultaneously after being broadcast
Realize that multiple equipment is registered simultaneously in time, compared with it is traditional register it is faster.
Detailed description of the invention
Fig. 1 is that the plurality of Bluetooth equipments of first step building of the present invention mutually assists system overall logic figure of registering;
Fig. 2 is Bluetooth broadcast communication message format, and Fig. 2 (a) is existing Bluetooth broadcast message format, and Fig. 2 (b) is existing indigo plant
Tooth broadcasting packet data portion format, Fig. 2 (c) are that the present invention registers broadcasting packet format sample;
Fig. 3 is overview flow chart of the present invention.
Fig. 4 is bluetooth state transition diagram of the 4th step of the invention into the 7th step;Fig. 4 (a) is equipment bluetooth of registering online
State transition graph, Fig. 4 (b) are that equipment off-line of registering offline is registered success, and new hop count is less than or equal to bluetooth state when N and converts
Figure, Fig. 4 (c) are that equipment off-line of registering offline is registered success, and bluetooth state transition diagram when new hop count is greater than N, Fig. 4 (d) be from
Line register equipment off-line register failure when bluetooth state transition diagram;
Fig. 5 is that tenth step of the invention server confirmation off-line device of registering is registered place schematic diagram.
Specific embodiment
Fig. 1 is that the plurality of Bluetooth equipments of first step building of the present invention mutually assists system overall logic figure of registering;Such as Fig. 1 institute
Show, plurality of Bluetooth equipments mutually assists the system of registering to consist of three parts, and is register online subsystem, subsystem of registering offline respectively
With server of registering.
Subsystem of registering online realizes the function of registering online of intelligent wearable device, and server is connected with registering.Online
Subsystem of registering is made of terminal and intelligent wearable device, and terminal has function of surfing the Net, and intelligent wearable device has bluetooth
Communication function.It is required that an at least terminal and a paired intelligent wearable device.In region of registering, with terminal
The intelligent wearable device of successful matching is known as base positioning point device, it can be achieved that registering online.Open online register function when, with
The terminal of base anchor point device pairing receives the place of currently registering of user's input, and terminal positions the base in register place and connection
The MAC Address of point device is sent to server of registering.Register server data memory module the place of registering received, base is fixed
MAC Address and server the present system time storage of site equipment return to success flag of registering in the database and to terminal
Success flag symbol is transmitted to paired base and positions point device by symbol, terminal, and base anchor point device prompts are registered success online.
The point device bluetooth unlatching of base positioning simultaneously can not connect broadcast broadcast a period of time, and time span t1, t1 are 5 minutes to 15 points
Clock.(the bluetooth MAC of the broadcast communication message equipment is sent using the machine Bluetooth MAC address for including in broadcast communication message
Address), broadcast identifier of registering, success flag of registering symbol and hop count realized come other offline wearable devices around assisting it is offline
It registers.
Subsystem of registering offline realizes the function of registering offline of intelligent wearable device, You Duotai not with terminal pairing from
Line equipment composition.Just off-line device will open function of registering offline and be able to achieve and register offline, in order to guarantee the effective of time that register
Property, function of registering offline is automatically stopped after opening a period of time (t1).The bluetooth original state of off-line device is generic broadcasted
State, when open register function offline after its bluetooth state be changed into scanning state, continue whether to have in scanning circumstance containing registering into
The broadcast communication message of function information.As long as containing label to one up to scanning in the period of t1 in function unlatching of registering offline
Broadcast communication message to successful information is considered as the off-line device in range of registering, success of registering offline.This is offline simultaneously
Successful off-line device of registering is by the MAC Address for including in the broadcast communication message containing successful information of registering received and works as
The preceding time is stored in the memory of oneself, and the MAC Address for including in the broadcast communication message containing successful information of registering received is made
For the evidence for assisting oneself to register offline, current time is registered the time as oneself.Successful off-line device of registering offline is blue
Dental phenomenon is switched to that broadcast state can not be connected by scanning state, using the machine Bluetooth MAC address for including in broadcast communication message, is registered
Broadcast identifier, success flag of registering symbol and hop count are registered offline to help other offline wearable devices of surrounding to realize.If from
Line equipment is in the logical to successfully broadcast of registering is contained up to failing scanning in the period of t1 always of function unlatching of registering offline
Believe message, then regards as registering offline unsuccessfully.
After successful off-line device of registering offline and terminal pairing successful connection, the information of registering offline of oneself is uploaded to
Server.
Server of registering is a computer or work station, is equipped with data management system of registering thereon, and the system is by data
Memory module, data preparation module, database composition.Register online data and the offline label of data memory module self terminal in future
To data storage into database.Database stores the data of registering of intelligent wearable device, and an intelligent wearable device accounts for
One record, every record in have 5 fields, be respectively register success flag symbol, assist register offline Bluetooth MAC address,
It registers time, the machine (i.e. intelligent wearable device belonging to this record) Bluetooth MAC address and place of registering.Data preparation module
The data of registering in database are arranged, confirm the place of registering of off-line device.After all places identifications of registering finish, clothes of registering
Business device comes out statistical result showed.
Fig. 2 is Bluetooth broadcast communication message format, and Fig. 2 (a) is existing Bluetooth broadcast message format, and Fig. 2 (b) is existing indigo plant
Tooth broadcasting packet data portion format, Fig. 2 (c) are that the present invention registers broadcasting packet format sample.As shown in Fig. 2 (a), bluetooth is wide
It broadcasts communication message and is divided into 6 parts, be respectively: leading, access address, header, length, data portion and verification.Leading is one
The alternate sequence of a byte is 10101010.4 byte of access address, is fixed as 0x8E89BED6, in broadcast, scanning, the company of initiation
Use when connecing.Four parts of header point: the broadcasting packet type of 4 bits;2 bits retain;Address style is sent, address class is received
Type is all 1 bit, indicates respectively that sending address, receiving address is random address or public address, if 0 table of random address
Show, if public address is indicated with 1.1 byte of length indicates the length of subsequent data part.Data portion is up to 37 bytes.School
Test 3 bytes.
As shown in Fig. 2 (b), Bluetooth specification provides that the length of each broadcast communication message data part is 37 bytes,
In include 6 bytes broadcasting equipment Bluetooth MAC address, the data portion that can freely modify has 31 bytes.If significant figure
According to part less than 31 bytes, remaining just with 0 completion, the data of this part are invalid.Valid data part includes several
Broadcast data unit.It is the data for needing to broadcast in broadcast data unit, composition is: first character section is length value n, is indicated
Following n byte is data portion.The first character section of data portion indicates types of broadcast data, gives in Bluetooth specification
A series of types that can choose, can according to need unrestricted choice, according to the data type of selection, supplement remaining n-1
The data to be broadcasted of byte.
As shown in Fig. 2 (c), the present invention registers, and most to start 6 bytes be from bluetooth register for the data portion of broadcasting packet
In the machine Bluetooth MAC address for reading out, the phase for broadcast identifier of registering is filled in a next broadcast data unit
Close data.Broadcast identifier of registering can regard certain service as, which has the Universally Unique Identifier of 16 bits
(Universally Unique Identifier)UUID.According to the regulation of Bluetooth specification, there is the wide of the service of 16 UUID
The value of multicast data type is 0x16, and the data portion after types of broadcast data is that 2 bytes are that No. UUID defined (is set in figure
Be 0x8000), and the data to be used of the 1 byte service (that set in figure is 0xFF).Number where broadcast identifier of registering
Entire data portion length according to unit is 4 bytes, so the value of length is 4.
Fig. 3 is overview flow chart of the present invention, and Fig. 4 is bluetooth state transition diagram of the 4th step of the invention into the 7th step;Fig. 4
It (a) is equipment bluetooth state transition diagram of registering online, Fig. 4 (b) is that equipment off-line of registering offline is registered success, and new hop count is less than
Bluetooth state transition diagram when equal to N, Fig. 4 (c) are that equipment off-line of registering offline is registered success, and bluetooth shape when new hop count is greater than N
State transition diagram, Fig. 4 (d) be register offline equipment off-line register failure when bluetooth state transition diagram;It is as shown in Figure 3 and Figure 4:
The first step, building plurality of Bluetooth equipments mutually assist system of registering.
Second step initializes intelligent wearable device, by the bluetooth of unpaired intelligent wearable device (i.e. off-line device)
It is set to generic broadcasted state, the bluetooth for having matched intelligent wearable device (i.e. base positioning point device) does not use broadcast letter
Road, but data communication is carried out with the terminal of pairing using data channel, so the bluetooth of base positioning point device is set to
It neither broadcasts nor scanning mode.These states are all blue in intelligent wearable device (including off-line device and base position point device)
It is set in tooth module.
Third step, subsystem of registering online carry out registering online for base positioning point device, and method is:
3.1 register online: the place of currently registering of user's input are received with the terminal of base anchor point device pairing, terminal will
The Bluetooth MAC address of place and paired base positioning point device of registering is sent to server of registering.It registers the number of server
Data of registering online (are worked as including place of currently registering, the Bluetooth MAC address of base positioning point device and server according to memory module
Preceding system time) storage in the database and to terminal return register success flag symbol, terminal by the success flag symbol be transmitted to
Pairing base position point device.Success flag of registering symbol has successfully (such as TRUE) and unsuccessful (such as FALSE) two states.?
When line is registered, place of registering, the MAC Address of base positioning point device and time of registering are stored successfully, and success flag of registering symbol is just
Success, storage failure success flag symbol is just unsuccessful.
3.2 bases positioning point device judgement success flag symbol of registering turns 3.3 if success, if unsuccessful, turns 3.1, weight
Newly register.
The system time of 3.3 bases positioning point device storage this moment, which is used as, registers the time, and prompts success of registering, prompting mode
The screen that can be intelligent wearable device itself shows perhaps vibration reminding or the tinkle of bells prompting or this 3 kinds of methods simultaneously
With turn the 4th step.
The bluetooth of 4th step, base positioning point device is broadcasted, and method is:
The function timing variable T1 that registers in 4.1 initialization base positioning point devices is 0, and base positioning point device starts timing,
The system time that T1 starts to position point device with base increases.
Whether 4.2 judgement T1 are less than or equal to t1, if T1 is greater than t1, as shown in after the T1 time in Fig. 4 (a), stopping can not connect
Broadcast is connect, bluetooth reverts to the state neither broadcasted nor scanned, and turns 7.8;If T1 is less than or equal to t1, turn 4.3.
4.3 bases position the bluetooth state of point device as shown in arrow in Fig. 4 (a), by the state neither broadcasted nor scanned
Broadcast state can not be connected by being changed into, and the bluetooth of base positioning point device starts to broadcast outward.Broadcast communication message at this time contains label
To information, it is known as broadcasting packet of registering, data portion there are 4 data fields, is the machine Bluetooth MAC address, broadcast of registering respectively
Identifier, success flag of registering symbol and hop count, these message informations are used to that wearable device offline around is helped to realize offline
It registers.The machine Bluetooth MAC address, broadcast identifier of registering, success flag of registering symbol and hop count are successively individually placed to different wide
In multicast data unit, each domain at least accounts for a broadcast data unit.Broadcast identifier of registering is used to and other broadcast communications
Message is distinguished, and shows that the broadcast communication message contains information of registering, and the value for broadcast identifier of registering is developer's setting
Fixed value, such as can be set as 0xFF, expression is broadcasting packet of registering;Whether success flag of registering symbol shows to register succeeds,
It is divided into function and unsuccessful two states.Local equipment Bluetooth MAC address sends the bluetooth MAC of the broadcast communication message equipment
Address can allow the equipment for scanning broadcasting packet of registering to this to know which intelligent wearable device broadcast is the information of registering be by
Out;Hop count refers to that broadcasting packet of registering comes current device, it is specified that base anchor point device broadcasts label by how many times transmitting
Hop count into broadcast is 0;The setting rule of hop count is as follows: if hop count in the broadcasting packet of registering that equipment scanning is resolved to of registering
It is integer for nn, nn, then hop count is nn+1 in the message that the equipment itself is sent.The broadcast singal of single bluetooth equipment is in reality
The propagation radius of application is 10m or so, general classroom or meeting signature, and the maximum value N, N of nn is integer, and N is 3 or 4 or 5,
If usage scenario has particular/special requirement, N can be zoomed in or out suitably.
5th step, off-line device open function of registering offline, and the bluetooth of off-line device is changed into scanning by generic broadcasted state
State, as shown in Fig. 4 (b) (c) (d).
6th step, the function timing variable T2 that registers of the offline equipment of registering of initialization are system of 0, the T2 with off-line device
Time starts to increase.
7th step, off-line device determine whether T2 is less than or equal to t1, if T2 is less than or equal to t1, turn 7.1;If T2 is greater than t1,
Turn 7.6.
Whether can not connect broadcast communication message, if so, then turning 7.2 if having around 7.1 scannings;If no, turning the 7th step.
Whether the parsing of 7.2 off-line devices can not connect containing broadcast identifier of registering in broadcast communication message, if so, being then
It registers broadcast communication message, then turns 7.2.1;If no, abandoning the message, turns the 7th step and continue to scan on.
7.2.1 parsing is registered the success flag symbol of registering in broadcast communication message, if the value for success flag symbol of registering be at
Function then turns 7.2.2;If success flag of registering symbol value be it is unsuccessful, abandon the message, turn the 7th step continue to scan on.
7.2.2 the hop count in the broadcast communication message of registering is parsed, if hop count is less than or equal to N, turns 7.2.3, if more than
N then abandons the message, turns the 7th step and continues to scan on.
7.2.3 the machine Bluetooth MAC address in broadcast communication message of registering is parsed, by the machine bluetooth MAC parsed
Location is stored in the off-line device memory together with current system time, and the MAC Address in message is registered as the equipment off-line
Successful voucher (also known as assisting the Bluetooth MAC address registered offline), present system time is registered the time as the off-line device.
7.2.4 off-line device prompts success of registering, and the screen that prompting mode can be intelligent wearable device itself is shown,
Perhaps vibration reminding or the tinkle of bells are reminded or this 3 kinds of methods are used in combination, and turn 7.3.
7.3 calculate and need the hop count that is broadcasted, i.e., on the basis of hop count in the broadcast communication message of registering received
1 is added to obtain new hop count.If hop count is greater than N, the bluetooth state of the off-line device switchs to generic broadcasted state by scanning state, such as
Shown in Fig. 4 (c), explanation cannot assist again other equipment to register, and turn 7.7;If hop count is less than or equal to N, turn 7.4.
The bluetooth state of 7.4 off-line devices is converted into that broadcast state can not be connected by scanning state, as offline in Fig. 4 (b)
Shown in bluetooth state variation when successfully and newly hop count of registering is less than or equal to N, other off-line devices is assisted to register.
7.5 off-line devices are broadcasted with that can not connect broadcast state, determine T2 whether be less than or equal to t1, if T2 be less than etc.
In t1, turn 7.5, if T2 is greater than t1, turns 7.7.
The prompt of 7.6 off-line devices is registered unsuccessfully, and the bluetooth state of the off-line device switchs to generic broadcasted state by scanning state,
As shown in bluetooth state variation at the end of Fig. 4 (d) T2 moment.Turn 7.8.
The bluetooth state of 7.7 off-line devices switchs to generic broadcasted state by that can not connect broadcast state, such as T2 in Fig. 4 (b)
At the end of moment shown in bluetooth state variation, turn 7.8.
7.8 register end, execute the 8th step.
Step 8: if off-line device and networked terminals match, by the link established between terminal by number of registering offline
According to terminal is transmitted to, terminal uploads to server of registering again.The data that successful equipment uploads of registering offline include registering successfully to mark
Know symbol (being at this time success), assist the Bluetooth MAC address registered offline, off-line device register time and off-line device the machine it is blue
Tooth MAC Address.Offline register failure equipment upload data include register success flag symbol (being at this time unsuccessful), assist from
Bluetooth MAC address (for sky) that line is registered, off-line device is registered the time (for sky) and the machine Bluetooth MAC address of off-line device,
Turn the 9th step.
9th step, data memory module in server of registering by the data of registering of upload (including register offline data and
Online data of registering) it stores in database one by one.An equipment accounts for a record, the label in every record in database
To success flag symbol, assist the Bluetooth MAC address registered offline, time of registering, the machine Bluetooth MAC address and register place and label
Corresponding to data, " place of the registering " field for equipment of only registering offline is NULL, and equipment of registering online " assists offline label
The Bluetooth MAC address arrived " field is NULL.
Tenth step, the place of registering for equipment of being registered in the data preparation module confirmation database in server of registering offline,
As shown in Figure 5.Since the data that the equipment registered offline uploads are places of not registering, set so needing to confirm to register offline
Standby place of registering, the specific method is as follows:
10.1 data preparation modules filter out success flag symbol of registering from database as data of successfully registering.
" place of registering " field in the data of registering that 10.2 data preparation module polls filter out, confirmation register set offline
Standby place of registering, specific method is:
10.2.1 since first success flag symbol of registering is data of successfully registering, what inquiry filtered out one by one registers
" place of registering " field in data;
If 10.2.2 current " place of registering " field is NULL, turn 10.3;If current " place of registering " field is not NULL,
The success flag that then determines whether also to register symbol successfully to register data, if in addition, if inquire next success flag of registering
Symbol is " place of the registering " field for data of successfully registering, and turns 10.2.2;If without the 11st step is turned.
10.3 obtain databases with the value of " assisting the Bluetooth MAC address registered offline " in a line, in " the machine bluetooth
Same value is inquired in MAC Address " field, navigates to the row where assisting to register equipment offline.
10.4 obtain the value in " place of registering " of equipment of assisting to register offline, judge whether the value is NULL, if NULL,
10.3 are gone to, if not NULL, then the value in " place of registering " is obtained, turns 10.5.
The value in 10.5 " places of registering " that will acquire is assigned to 10.2.1 and traces all the way into 10.4 steps and carry out all values
The place confirmation of registering registered offline is realized in " place of registering " of NULL.Turn 10.2.1.
Step 11: server of registering is by statistics of database result presentation to administrative staff.
Step 12: terminating.