The content of the invention
The embodiments of the invention provide the detection method and system that a kind of user based on Bluetooth beacon equipment passes in and out region,
To improve the accuracy that detection user passes in and out region.
According to an aspect of the invention, there is provided a kind of user passes in and out the detecting system in region, including:
Be arranged at the first Bluetooth beacon equipment on the region doorway, its transmitting antenna towards outside the region, for
Bluetooth wireless mode sends basic data bag and the first extended packet;Wherein, transmission is carried in the basic data bag originally
The universal unique identifier UUID of the beacon equipment of packet, and basic data bag configured information;First growth data
The disengaging that the UUID, specially export-oriented configured information that send notebook data bag are carried in bag detects configured information, and spreading number
According to bag configured information;
Be arranged at the second Bluetooth beacon equipment on the region doorway, its transmitting antenna towards in the region, for
Bluetooth wireless mode sends basic data bag and the second extended packet;Wherein, transmission is carried in the second extended packet originally
The UUID of packet, it is specially that the interior disengaging to configured information detects configured information, and extended packet configured information;
Intelligent terminal, for receive beacon equipment transmission packet after, if therefrom parse basic data bag instruction
The received signal strength of information, the then content that will be carried in the packet, and the packet is corresponded in the packet
Information stores based on UUID;If therefrom parsing extended packet configured information, in being carried in the packet
Hold the UUID in the corresponding packet as extension information storage;Afterwards, if further determining that, the extension information includes
Disengaging detection configured information, then the disengaging is detected into configured information and be stored in caching;And entering in the caching is judged
Go out to detect in configured information export-oriented configured information compared to it is interior to configured information be stored in preceding when, determine the knot that detection enters
Fruit, and empty the caching;Export-oriented configured information is compared to interior in the disengaging detection configured information in judging the caching
When being stored in rear to configured information, the result that detection is left is determined, and empty the caching.
It is preferred that the intelligent terminal is additionally operable to after determining to detect into/out result, admission/appearance is shown
Prompt message.
It is preferred that the system also includes:Server;
The intelligent terminal is additionally operable to after determining to detect into/out result, according to the default server
Address send solicited message;The into/out result of the detection is carried in the solicited message, and the beacon is set
Standby UUID;
The server parses from the solicited message of reception detects into/out result and UUID;Find out with
After the prompt message of the UUID, according to the into/out result of the detection, by admission/appearance in the prompt message
Prompt message returns to the intelligent terminal.
According to another aspect of the present invention, a kind of Bluetooth beacon equipment is additionally provided, including:Transmitting antenna, logic control
Molding block and the wireless signal transmitting module being connected with the transmitting antenna;Wherein, the Logic control module specifically includes:
First timer unit, for when each timing reaches, exporting timing arriving signal;
Second timer unit, after the timing arriving signal for receiving first timer unit output, start
Timing;When timing time reaches, timing arriving signal is exported;
Control unit, after receiving the timing arriving signal, by the UUID of this beacon equipment, and basic data
Bag configured information, which is encapsulated into packet and sent to the wireless signal transmitting module, to be transmitted wirelessly;It is and described receiving
After timing arriving signal, the UUID of this beacon equipment, the specially outer/inner disengaging to configured information are detected into configured information, with
And extended packet configured information is encapsulated into packet and sent to the wireless signal transmitting module and transmitted wirelessly.
It is preferred that described control unit specifically includes:
Performance number reads subelement, and after receiving the timing arriving signal, it is defeated to read the performance number prestored
Go out;
First packet encapsulation subelement, will after the performance number that subelement output is read for receiving the performance number
The UUID of the performance number of reception and the beacon equipment, and basic data bag configured information are encapsulated into packet and sent to described
Wireless signal transmitting module is transmitted wirelessly;
Second packet encapsulation subelement, after receiving the timing arriving signal, by the UUID of this beacon equipment,
Positional information, it is specially that the outer/inner disengaging to configured information detects configured information, and extended packet configured information is encapsulated into
Packet sends to the wireless signal transmitting module and transmitted wirelessly.
It is preferred that the power output of the power amplifier in the wireless signal transmitting module is adjustable;It is and described
Control unit also includes:Performance number sets subelement;And
The performance number reads subelement and is specifically used for after receiving the timing arriving signal, if judging, n is equal to m,
The 1st performance number is read, otherwise, reads (n+1)th performance number;Wherein, n is the sequence number of the performance number read last time;M is advance
The sum of the sequence number of the performance number of storage;
The performance number sets subelement to be used for according to the performance number reads the performance number setting of subelement reading
The power output of the power amplifier of wireless signal transmitting module.
It is preferred that the timing of the first timer unit is 20ms~1s.
According to another aspect of the present invention, the detection method that a kind of user passes in and out region is additionally provided, including:
After the packet that intelligent terminal for reception is sent to beacon equipment, if therefrom parsing basic data bag configured information,
The content that will then be carried in the packet, and the received signal strength of the packet correspond to UUID in the packet and made
Based on information store;It is if therefrom parsing extended packet configured information, the content carried in the packet is corresponding
UUID in the packet is as extension information storage;
If the intelligent terminal further determine that it is described extension information include disengaging detect configured information, by it is described enter
Go out to detect configured information and be stored in caching;And the export-oriented configured information in the disengaging detection configured information in judging the caching
Compared to it is interior to configured information be stored in preceding when, determine the result that detection enters, and empty the caching;Described in judging
In caching disengaging detection configured information in export-oriented configured information compared to it is interior to configured information be stored in rear when, determine to detect
The result left, and empty the caching;
Wherein, the packet for carrying export-oriented configured information is set by the first Bluetooth beacon for being arranged at the region doorway
What preparation was sent;The directional transmitting antenna of the first Bluetooth beacon equipment is towards outside the region, for bluetooth wireless mode
Send basic data bag and the first extended packet;Wherein, the beacon for sending notebook data bag is carried in the basic data bag
The UUID of equipment, and basic data bag configured information;Carried in first extended packet and send notebook data bag
The disengaging detection configured information of UUID, specially export-oriented configured information, and extended packet configured information;
Carry it is interior to the packet of configured information be by be arranged at the region doorway the second Bluetooth beacon equipment send out
Send;The directional transmitting antenna of the second Bluetooth beacon equipment is towards in the region, for being sent with bluetooth wireless mode
Basic data bag and the second extended packet;Wherein, the UUID for sending notebook data bag, position are carried in the second extended packet
Information, it is specially that the interior disengaging to configured information detects configured information, and extended packet configured information.
It is preferred that it is described determine to detect into/out result after, in addition to:
The intelligent terminal shows admission/appearance prompt message.
It is preferred that it is described determine to detect into/out result after, in addition to:
The intelligent terminal sends solicited message according to the address of default server;Carried in the solicited message
State and detect into/out result, and the UUID of the beacon equipment;
The server parses from the solicited message of reception detects into/out result and UUID;Find out with
After the prompt message of the UUID, according to the into/out result of the detection, by admission/appearance in the prompt message
Prompt message returns to the intelligent terminal.
In the technical scheme of the embodiment of the present invention, the first and second Bluetooth beacon equipment on region doorway is arranged at respectively to area
The outer/inner transmission packet in domain, wherein, carry export-oriented configured information in the transmission extended packet of the first Bluetooth beacon equipment;
Carried in the transmission extended packet of second Bluetooth beacon equipment interior to configured information.Intelligent terminal is according to receiving packet
Afterwards, by the storage of the disengaging carried in extended packet detection configured information in the buffer, if judging, disengaging detection refers in storage
Show in information export-oriented configured information compared to it is interior be stored in configured information before, it is determined that go out detection and enter;If judge to store
It is middle disengaging detection configured information in export-oriented configured information compared to it is interior be stored in configured information after, it is determined that go out detection and leave.
So, detected compared to the picture that doorway is passed in and out according to the user of collection, the accuracy of detection is higher.
Embodiment
For the objects, technical solutions and advantages of the present invention are more clearly understood, referring to the drawings and preferred reality is enumerated
Example is applied, the present invention is described in more detail.However, it is necessary to illustrate, many details listed in specification are only to be
Reader is set to have a thorough explanation to the one or more aspects of the present invention, even without these specific details can also
Realize the aspects of the invention.
The term such as " module " used in this application, " system " is intended to include the entity related to computer, such as but unlimited
In hardware, firmware, combination thereof, software or executory software.For example, module can be, it is not limited to:Processing
The process run on device, processor, object, executable program, thread, program and/or the computer performed.For example, count
It can be module to calculate the application program run in equipment and this computing device.One or more modules can be located at executory
In one process and/or thread.
The present inventor is it is considered that two Bluetooth beacon equipment for launching packet towards opposite direction are arranged at
The specially indoor place such as market, museum, hotel, or the region doorway in some room in indoor place, and
Bluetooth beacon equipment carries disengaging detection configured information when packet is sent:The Bluetooth beacon of packet is sent into region
Equipment, it is interior to configured information that it, which passes in and out detection configured information,;The Bluetooth beacon equipment of packet is sent to outside region, it is passed in and out
Detection configured information is export-oriented configured information.Intelligent terminal first receives interior to configured information, then receives export-oriented configured information,
Then determine that detection enters, otherwise, it determines detection is left.Not only the cost of Bluetooth beacon equipment is well below camera, compared to
Picture detects, and the testing result that judgement enters or left is more accurate.
However, the size of the packet based on wireless blue tooth technology is fixed, it is existing for the wireless of indoor positioning
Following information has been generally comprised in the packet of Bluetooth Bluetooth beacon equipment:UUID (the Universally of the Bluetooth beacon equipment
Unique Identifier, universal unique identifier), the information about power of Bluetooth beacon equipment.If wish to wrap again in the packet
Configured information containing voucher or checking configured information can then exceed the size of packet.
Therefore, the present inventor considers to be extended packet:Bluetooth beacon equipment is sent in packet
When, except sending a basic data bag, also send an extended packet.Include in basic data bag:Send this number
According to the UUID of the Bluetooth beacon equipment of bag, the Bluetooth beacon equipment transmission notebook data bag for sending notebook data bag performance number, and
Basic data bag configured information;Extended packet is specially two kinds, is specifically included:First extended packet and the second growth data
Bag;Include in first extended packet:Send UUID, positional information, the growth data of the Bluetooth beacon equipment of notebook data bag
Bag configured information, and be specially the interior detection configured information to configured information.Include in second extended packet:Send this
The UUID of the Bluetooth beacon equipment of packet, positional information, extended packet configured information, and specially export-oriented configured information
Detection configured information.
The technical scheme that the invention will now be described in detail with reference to the accompanying drawings.
User provided in an embodiment of the present invention based on Bluetooth beacon equipment passes in and out the detecting system in region, and its structure is as schemed
Shown in 1.Including:The the first Bluetooth beacon equipment 101 for being arranged at region doorway, the second Bluetooth beacon for being arranged at region doorway are set
Standby 102 and intelligent terminal 103;
Wherein, above-mentioned zone is specifically as follows the indoor place such as market, museum, hotel, or certain in indoor place
One room.
Towards outside region, the first Bluetooth beacon equipment 101 is used for towards area the transmitting antenna of first Bluetooth beacon equipment 101
It is overseas that basic data bag and the first extended packet are alternately sent with bluetooth wireless mode.Wherein, carried in basic data bag
Send UUID (Universally Unique Identifier, the general unique mark of the Bluetooth beacon equipment of notebook data bag
Symbol), performance number, and basic data bag configured information;The UUID for sending notebook data bag, position are carried in first extended packet
The disengaging detection configured information of confidence breath, specially export-oriented configured information, and extended packet configured information.
Towards in region, the second Bluetooth beacon equipment 102 is used for towards area the transmitting antenna of second Bluetooth beacon equipment 102
Basic data bag and the second extended packet are alternately sent with bluetooth wireless mode in domain.Wherein, carried in basic data bag
Send UUID, the performance number of the Bluetooth beacon equipment of notebook data bag, and basic data bag configured information;Second extended packet
In carry send the UUID of notebook data bag, positional information, be specially in disengaging detection configured information to configured information, and
Extended packet configured information.
Wherein, the transmitting antenna of the first Bluetooth beacon equipment 101 and the second Bluetooth beacon equipment 102 can be orientation day
Line, ceramic antenna or PCB (Printed Circuit Board, printed circuit board) antenna.
Intelligent terminal 103 specially supports Bluetooth (bluetooth) v4.0 smart mobile phone or tablet personal computer, its specific work(
It can describe, room user as described below passes in and out the flow of the detection method in region.
Specifically, the structure of the first Bluetooth beacon equipment 101 or the second Bluetooth beacon equipment 102 as shown in Fig. 2 including:
Transmitting antenna (not marked in figure), Logic control module 201 and wireless signal transmitting module 202;
Wherein, Logic control module 201 is used for the basic data bag and growth data packet interleaving of the Bluetooth beacon equipment
Send to wireless signal transmitting module 202.
Wireless signal transmitting module 202 is connected with transmitting antenna, for the packet received to be based on into wireless blue tooth skill
Art is simultaneously broadcasted by transmitting antenna.The power output of power amplifier in this module is adjustable.
Transmitting antenna is used to send intelligent terminal 103 of the packet to outside region or in region.
In fact, Logic control module 201 and wireless signal transmitting module 202 can be integrated in Bluetooth beacon equipment
On SoC (System on Chip, on-chip system) chip.
Wherein, Logic control module 201 structure as shown in figure 3, including:First timer unit 301, second timer
Unit 302, control unit 303;
First timer unit 301 is used for when each timing reaches, and exports timing arriving signal.Wherein, timing
Time can be 20ms~1s.
Second timer unit 302 is used for after receiving the timing arriving signal that first timer unit exports, and starts to count
When;When timing time reaches, timing arriving signal is exported.
Control unit 303 is used for after receiving timing arriving signal, reads the performance number prestored, and by the work(of reading
The UUID of rate value and beacon equipment, which is encapsulated into packet and sent to wireless signal transmitting module 202, to be transmitted wirelessly;And
After receiving timing arriving signal, the UUID of this beacon equipment and positional information are encapsulated into packet and sent to wireless signal hair
Module 202 is penetrated to be transmitted wirelessly.
In fact, Bluetooth beacon equipment can also be previously stored with the performance number of multiple different stages, and in a looping fashion
The transmission of packet is carried out by the performance number of the multiple ranks prestored, the power of different stage carries out packet transmission, with
Intelligent terminal 102 is contributed to improve positioning precision.Therefore, control unit 303 specifically includes:Performance number reads subelement, first
Packet encapsulation subelement, the second packet encapsulation subelement;
Wherein, performance number reads subelement and is used for after receiving timing arriving signal, and it is defeated to read the performance number prestored
Go out;Specifically, performance number reads subelement and is used for after receiving timing arriving signal, if judging, n is equal to m, reads the 1st work(
Rate value, otherwise, read (n+1)th performance number;Wherein, m is the sum of the sequence number of the performance number prestored, and n read for last time
Performance number sequence number.
First packet encapsulation subelement is used for after receiving the performance number that performance number reads subelement output, by reception
The UUID of performance number and beacon equipment, and basic data bag configured information are encapsulated into packet and sent to wireless signal transmission mould
Block 202 is transmitted wirelessly.
Second packet encapsulation subelement is used for after receiving timing arriving signal, by the UUID of this beacon equipment and position
Information, and extended packet configured information are encapsulated into packet and sent to wireless signal transmitting module 202 and transmitted wirelessly.
Further, control unit 303 also includes:Performance number sets subelement;
Performance number sets subelement to be used for the performance number setting wireless signal transmission for reading subelement according to performance number and reading
The power output of the power amplifier of module 202.
User provided in an embodiment of the present invention based on Bluetooth beacon equipment passes in and out the detection method in region, flow such as Fig. 4
It is shown, specifically include following method and step:
S401:Intelligent terminal 103 receives what the first Bluetooth beacon equipment 101 or the second Bluetooth beacon equipment 102 were sent
After packet, the positional information of performance number and Bluetooth beacon equipment is therefrom parsed.
In this step, intelligent terminal 103 receives what the first Bluetooth beacon equipment 101 or the second information equipment 102 were sent
After packet, if therefrom parsing basic data bag configured information, the content that will be carried in the packet, and the packet
Received signal strength to should be in packet UUID based on information store;If therefrom parse extended packet instruction
Information, then using the content carried in the packet to should be in packet UUID as extension information storage.
S402:Performance number and received signal strength of the intelligent terminal 103 in Back ground Information, calculate distance value;And
Adjust the distance-performance number pair using the distance value calculated and the performance number as one, also serve as to should Bluetooth beacon equipment
UUID Back ground Information is stored.
In this step, intelligent terminal 103 is it is determined that corresponding first Bluetooth beacon equipment 101 or the second information equipment 102
After UUID has been stored with Back ground Information and extension information, performance number and received signal strength in Back ground Information, calculate
Distance value is well known to those skilled in the art, for example, distance value R can be calculated according to equation below 1:
P=Q-10*ylgR (formula 1)
In formula 1, (when receiving the packet, the signal of the packet is strong for the received signal strength based on P in information
Degree);Q is receiving power when transmission of wireless signals is 1 meter remote, i.e. performance number in Back ground Information;Y is propagation factor, is specially
Constant value.
Afterwards, the distance value calculated, the performance number parsed are adjusted the distance-performance number (i.e. a pair of distance values as one
And performance number), also serve as storing into Back ground Information corresponding to the UUID of the Bluetooth beacon equipment.
S403:Intelligent terminal combines the positional information in extension information according to the distance value calculated and determines positioning result.
In this step, after distance value is calculated, the positional information that intelligent terminal 103 can be combined in extension information is quick
Determine positioning result.
More preferably, intelligent terminal 103 is during received data packet, it is possible to which receiving Bluetooth beacon equipment (can be
First Bluetooth beacon equipment or the second Bluetooth beacon equipment) data of the transmission of the performance number based on m rank that send
Bag, so as to should Bluetooth beacon equipment UUID Back ground Information in, it is possible to be stored with m and adjusted the distance-performance number, can
Adjusted the distance with the m in Back ground Information-performance number can more precisely calculate intelligent terminal 103 and be set to the Bluetooth beacon
Standby distance:Intelligent terminal 103 adjusts the distance m-performance number in distance value average with being set respectively for m performance number in advance
The distance range put is compared;According to comparative result choose m adjust the distance-performance number in a distance value determined as final
This intelligent terminal and the value of the distance between Bluetooth beacon equipment gone out.
Specifically, if the average is located in the distance range set for i-th of performance number, by i-th pair distance-power
Distance value in value is as the intelligent terminal 103 finally determined and the value of the distance between the Bluetooth beacon equipment.Wherein, i
For 1~m natural number, m is the rank sum for the performance number that Bluetooth beacon equipment prestores.Those skilled in the art can root
Each performance number is directed in advance according to experience, and for the performance number, corresponding distance range, in the distance range, intelligent terminal are set
The signal intensity and intelligent terminal of received data packet have preferable linear relationship between the distance of Bluetooth beacon equipment, by connecing
Receiving the signal intensity of packet more can accurately reflect intelligent terminal to the distance of Bluetooth beacon equipment.
According to the intelligent terminal 103 and the value of the distance between the Bluetooth beacon equipment finally determined, in conjunction with corresponding
Positional information in the UUID of Bluetooth beacon equipment extension information, more accurate positioning result can be obtained.
S404:Intelligent terminal 103 includes disengaging detection configured information according to extension information and determines to detect the result of disengaging.
In this step, if if intelligent terminal 103 further determines that extension information includes disengaging detection configured information, will
Disengaging detection configured information is stored in caching.And if judge export-oriented configured information in the disengaging detection configured information in caching
Compared to it is interior be stored in configured information before, it is determined that go out the result that detection enters, and empty the caching.If judge to cache
In disengaging detection configured information in export-oriented configured information compared to it is interior be stored in configured information after, it is determined that go out detection and leave
Result, and empty caching.
In fact, the disengaging detection instruction letter carried in the first extended packet that the first Bluetooth beacon equipment 101 is sent
Breath is specially export-oriented configured information;And the disengaging inspection carried in the second extended packet that the second Bluetooth beacon equipment 102 is sent
It is specially interior to configured information to survey configured information.It is inevitable first to receive first when the ecto-entad of intelligent terminal 103 enters region
The first extended packet that Bluetooth beacon equipment 101 is sent, then receive the second extension of the second Bluetooth beacon equipment 102 transmission
Packet;And when intelligent terminal 103 leaves region from inside to outside, necessarily first receive the second Bluetooth beacon equipment 102 and send
The second extended packet, then receive the first Bluetooth beacon equipment 101 transmission the first extended packet.Therefore, if intelligence
Terminal 103 judge export-oriented configured information in caching compared to it is interior be stored in configured information before, can be to determine to detect
The result of entrance;If intelligent terminal 103 judge caching in export-oriented configured information compared to it is interior be stored in configured information after,
Can be to determine the result left of detection.
S405:Intelligent terminal 103 sends to server according to the address of default server and asked, and shows server
The result of return.
In this step, intelligent terminal 103 is according to the address of default server, the result that previous step is detected, and
The UUID of Bluetooth beacon equipment is carried with being sent in solicited message to server.For server, it is receiving request
After information, according to the UUID of Bluetooth beacon equipment therein, in database lookup prompt message corresponding with UUID, wherein, carry
Show that information includes admission prompt message and appearance prompt message.And then the testing result in solicited message, it will be prompted to
Admission or appearance prompt message in information return to intelligent terminal 103:If the testing result in solicited message enters for detection
Result, then the admission prompt message in the prompt message found out is returned to intelligent terminal 103;If the inspection in solicited message
The result that result is left for detection is surveyed, then is returned to the appearance prompt message in the prompt message found out to intelligent terminal 103;
After intelligent terminal 103 receives the information of server return, shown.
For example, region is specially certain market, intelligent terminal 103 is sent out after the result of detection entrance is determined to server
Solicited message is sent, server finds corresponding prompt message according to the UUID of bluetooth equipment, and entered according to detection
As a result, the prompt message in certain market that will be prompted in information that welcome returns to intelligent terminal 103, and intelligent terminal 103 is then by it
It is shown to user.
In addition, intelligent terminal 103 can also directly display admission or appearance carry after S404 steps determine testing result
Show information:If the result that testing result enters for detection, show admission prompt message;If the knot that testing result is left for detection
Fruit, then show appearance prompt message.
It is to be herein pointed out when carrying out user's disengaging region detection, above-mentioned steps S402, S403 are simultaneously nonessential
's;In fact, positioning service can be may also provide when carrying out user's disengaging region detection by performing step S402, S403, there is provided
The higher positioning result of precision.
In technical scheme, be arranged at the first and second Bluetooth beacon equipment on region doorway respectively to outside region and
Interior transmission packet, wherein, carry export-oriented configured information in the transmission extended packet of the first Bluetooth beacon equipment;Second is blue
Carried in the transmission extended packet of tooth beacon equipment interior to configured information.Intelligent terminal is according to receiving Bluetooth beacon equipment
After the packet content of transmission is positioned, by the storage of the disengaging carried in extended packet detection configured information in the buffer,
If judge storage in disengaging detection configured information in export-oriented configured information compared to it is interior be stored in configured information before, it is determined that
Go out detection to enter;If judging, export-oriented configured information stores compared to interior to configured information in disengaging detection configured information in storage
Rear, it is determined that go out detection and leave.So, detected compared to the picture that doorway is passed in and out according to the user of collection, detection
Accuracy is higher.
Can be with one of ordinary skill in the art will appreciate that realizing that all or part of step in above-described embodiment method is
The hardware of correlation is instructed to complete by program, the program can be stored in a computer read/write memory medium, such as:
ROM/RAM, magnetic disc, CD etc..
Described above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications also should
It is considered as protection scope of the present invention.