Summary of the invention
Detection system and the method for a kind of user area time of staying based on Bluetooth beacon equipment have been the object of the present invention is to provide, in order to improve the accuracy detecting and to reduce detection complexity.
An aspect according to an embodiment of the invention, provides the detection system of a kind of user area time of staying, comprising:
Be arranged at least one the Bluetooth beacon equipment in described region, for alternately sending basic data bag and extended packet in blue teeth wireless mode; Wherein, in described basic data bag, carry the general unique identifier UUID of the Bluetooth beacon equipment that sends notebook data bag, and basic data bag indication information; In described extended packet, carry the Bluetooth beacon equipment that sends notebook data bag UUID, include the region indication information of the sign in described region and extended packet indication information;
Intelligent terminal, for receiving after the packet of Bluetooth beacon equipment transmission, if therefrom parse basic data bag indication information, by the content of carrying in described packet, and the UUID in the corresponding described packet of the received signal strength of this packet stores as Back ground Information; If therefrom parse extended packet indication information, the UUID in the corresponding described packet of the content of carrying in described packet is stored as extend information; And stored after Back ground Information and extend information at the UUID that determines corresponding described Bluetooth beacon equipment, if further determine, described extend information comprises region indication information, in the time of staying table creating at the area identification in the indication information of described region, records current time; Afterwards, described intelligent terminal is determined the time of staying in described region according to the time of record in described time of staying table.
Preferably, in the time of staying table that described intelligent terminal also creates for the area identification for described region indication information, record after current time, calculated a upper time of record in described time of staying table and the time difference between described current time; If the time difference calculating surpasses set point, other record except the last item record in described time of staying table is deleted.
Preferably, described intelligent terminal, also for after determining the time of staying in described region, is greater than the default time period if compare the described time of staying, shows the stop information corresponding with the sign in described region.
Preferably, described detection system also comprises: server;
Described intelligent terminal, also for after determining the time of staying in described region, is greater than the default time period if compare the described time of staying, according to the address of default described server, sends request information; In described request information, carry the sign in described region;
Described server parses after the sign in region from the solicited message receiving, and finds out the stop information corresponding with the sign in described region and returns to described intelligent terminal.
Another aspect, also provides a kind of Bluetooth beacon equipment according to an embodiment of the invention, comprising: Logic control module and the wireless signal transmitting module being connected with described directional antenna; Wherein, described Logic control module specifically comprises:
First timer unit, for when each timing arrives, output is arriving signal regularly;
Second timer unit, for receiving after the timing arriving signal of described first timer unit output, starts timing; When timing time arrives, output timing arriving signal;
Control unit, for receiving after described timing arriving signal, by the UUID of this Bluetooth beacon equipment, and basic data bag indication information is encapsulated into Packet Generation and carries out wireless transmission to described wireless signal transmitting module; And after receiving described timing arriving signal, by the UUID of this Bluetooth beacon equipment, region indication information, and extended packet indication information is encapsulated into Packet Generation and carries out wireless transmission to described wireless signal transmitting module.
Preferably, described control unit specifically comprises:
Performance number reads subelement, for receiving after described timing arriving signal, and the output of the performance number of reading pre-stored;
The first packet encapsulation subelement, for receiving described performance number, read after the performance number of subelement output, by the performance number receiving and the UUID of described Bluetooth beacon equipment, and basic data bag indication information is encapsulated into Packet Generation to described wireless signal transmitting module and carries out wireless transmission;
The second packet encapsulation subelement, be used for receiving after described timing arriving signal, by the UUID of this Bluetooth beacon equipment, positional information, region indication information, and extended packet indication information is encapsulated into Packet Generation and carries out wireless transmission to described wireless signal transmitting module.
Another aspect according to an embodiment of the invention, also provides the detection method of a kind of user area time of staying, comprising:
Intelligent terminal receives after the packet of Bluetooth beacon equipment transmission, if therefrom parse basic data bag indication information, by the content of carrying in described packet, and the UUID in the corresponding described packet of the received signal strength of this packet stores as Back ground Information; If therefrom parse extended packet indication information, the UUID in the corresponding described packet of the content of carrying in described packet is stored as extend information;
Described intelligent terminal has stored after Back ground Information and extend information at the UUID that determines corresponding described Bluetooth beacon equipment, if further determine, described extend information comprises region indication information, in the time of staying table creating at the area identification in the indication information of described region, records current time;
Afterwards, described intelligent terminal is determined the time of staying in described region according to the time of record in described time of staying table;
Wherein, described Bluetooth beacon equipment is arranged in described region, for alternately sending basic data bag and extended packet in blue teeth wireless mode; Wherein, in described basic data bag, carry the UUID of the Bluetooth beacon equipment that sends notebook data bag, and basic data bag indication information; In described extended packet, carry the Bluetooth beacon equipment that sends notebook data bag UUID, include the region indication information of the sign in described region and extended packet indication information.
Preferably, in the described time of staying table creating at the area identification in the indication information of described region, record after current time, also comprise:
Described intelligent terminal calculated a upper time of record in described time of staying table and the time difference between described current time; If the time difference calculating surpasses set point, other record except the last item record in described time of staying table is deleted.
Preferably, in the described time according to record in described time of staying table, determine after the time of staying in described region, also comprise:
If described intelligent terminal compares the described time of staying and is greater than the default time period, show the stop information corresponding with the sign in described region.
Preferably, in the described time according to record in described time of staying table, determine after the time of staying in described region, also comprise:
If described intelligent terminal compares the described time of staying and is greater than the default time period, according to the address of default described server, send request information; In described request information, carry the sign in described region;
Described server parses after the sign in region from the solicited message receiving, and finds out the stop information corresponding with the sign in described region and returns to described intelligent terminal.
As shown from the above technical solution, detection system and the method for the user area time of staying based on Bluetooth beacon equipment that the embodiment of the present invention provides, intelligent terminal can receive basic data bag and the extended packet being sent by the Bluetooth beacon equipment that is arranged at region, and according to entrained content in the packet receiving, carry out the storage of Back ground Information and extend information; According to the Back ground Information of storage, determine the positioning result of intelligent terminal; In determining intelligent terminal, stored after the Back ground Information and extend information of UUID of corresponding Bluetooth beacon equipment, in time of staying table, recorded current time and determine the time of staying in region user according to the time of record in time of staying table.Compare existing scheme of carrying out user's time of staying based on ultrared indoor locating system, technical scheme provided by the invention, avoid occurring that detected entry time and time departure do not belong to same user's situation, also without by extra face recognition technology, different users being made to differentiation, when having guaranteed the accuracy of user's time of staying that it is determined, reduced the detection complexity of user's time of staying.
Embodiment
For making object of the present invention, technical scheme and advantage clearer, referring to accompanying drawing and enumerate preferred embodiment, the present invention is described in more detail.Yet, it should be noted that, many details of listing in specification are only used to make reader to have a thorough understanding to one or more aspects of the present invention, even if do not have these specific details also can realize these aspects of the present invention.
The terms such as " module " used in this application, " system " are intended to comprise the entity relevant to computer, such as but not limited to hardware, firmware, combination thereof, software or executory software.For example, module can be, but be not limited in: the thread of the process of moving on processor, processor, object, executable program, execution, program and/or computer.
The present inventor's discovery, along with the development of development of Mobile Internet technology, the mobile intelligent terminals such as smart mobile phone, net book, MID (Mobile Internet Device, mobile internet device) are used widely.These intelligent terminals become requisite communications and entertainment instrument in people's daily life gradually.Therefore, the present inventor considers, can carry out region division to indoor, and for each region of dividing, is provided with the sign corresponding with this region and location Bluetooth beacon equipment is set in this region.Then, by location Bluetooth beacon equipment, to entering the user's in region intelligent terminal, according to setpoint frequency, constantly send packet.Detect user in the time of staying in this region the writing time that like this, can receive packet according to user's intelligent terminal.Due to the user for different, this user's intelligent terminal is different from other users' intelligent terminal, therefore, compare existing scheme of carrying out user's time of staying based on ultrared indoor locating system, technical scheme provided by the invention, avoid occurring that detected entry time and time departure do not belong to same user's situation, also without by extra face recognition technology, different users being made to differentiation, when having guaranteed the accuracy of user's time of staying that it is determined, reduced the detection complexity of user's time of staying.
In addition, the present inventor also finds, the size of the packet based on wireless blue tooth technology is fixed, the packet of the existing wireless blue tooth beacon equipment for indoor positioning includes following information conventionally: the information about power of the UUID of this Bluetooth beacon equipment (Universally Unique Identifier, general unique identifier), Bluetooth beacon equipment.If wish, in packet, comprise again voucher indication information or verify that indication information can exceed the size of packet.
Therefore, the present inventor considers packet is expanded: Bluetooth beacon equipment, when Packet Generation, except sending a basic data bag, also sends an extended packet.In basic data bag, include: the performance number of the UUID of Bluetooth beacon equipment, Bluetooth beacon equipment sending data bag, and basic data bag indication information; In extended packet, include: the UUID of Bluetooth beacon equipment, include the region indication information of the sign in region and extended packet indication information.
Below in conjunction with accompanying drawing, describe the technical scheme of the embodiment of the present invention in detail.
The detection system of a kind of user area time of staying that the embodiment of the present invention provides, its structure as shown in Figure 1, specifically can comprise: be arranged at least one Bluetooth beacon equipment 101 and terminal equipment 102 in region.
Each the Bluetooth beacon equipment 101 arranging in a region, for alternately sending basic data bag and extended packet in blue teeth wireless mode.Wherein, in basic data bag, carry UUID, the performance number (be RSSI, Radio Signal Strength Indicator, claims again radio signal strength indicated value) of the Bluetooth beacon equipment that sends notebook data bag, and basic data bag indication information.In extended packet, carry the Bluetooth beacon equipment that sends notebook data bag UUID, include the region indication information of the sign of Bluetooth beacon equipment region and extended packet indication information.
In the embodiment of the present invention, about the Bluetooth beacon equipment 101 being arranged in region, how to send basic data bag and extended packet, will describe in detail follow-up.
Intelligent terminal 102 is for receiving after the packet of Bluetooth beacon equipment 101 transmissions, if therefrom parse basic data bag indication information, by the content of carrying in the packet of this reception, and the received signal strength of this packet is stored as Back ground Information the UUID in should packet.If therefrom parse extended packet indication information, the content of carrying in the packet of reception is stored as extend information the UUID in should packet.Further, intelligent terminal 102 has stored after Back ground Information and extend information at the UUID that determines corresponding Bluetooth beacon equipment 101, if further determine, extend information comprises region indication information, in the time of staying table creating at the area identification in this region indication information, records current time; And intelligent terminal 102 is determined the time of staying in region according to the time of record in this time of staying table.
In practical application, intelligent terminal 102 can also be after determining the time of staying in region, and the time of staying obtaining and default time period are compared, if compare this time of staying, is greater than the default time period, shows that user is larger to the interest in this region.
Therefore,, as a kind of more excellent execution mode, intelligent terminal 102 also, for being greater than after the default time period comparing this time of staying, shows the stop information corresponding with the sign in region; Wherein, stop recommended information that information can be specifically the major commodities in this region or favor information etc.
More preferably, in the detection system of the user area time of staying that the embodiment of the present invention provides, can also comprise: server 103.
Correspondingly, intelligent terminal 102 is greater than after the default time period comparing this time of staying, can send request information according to the address of default server 103, wherein, carries the sign in region in solicited message.Like this, server 103 can parse after the sign in region the solicited message from receiving, finds out the stop information corresponding with the sign in region and returns to intelligent terminal.
In the embodiment of the present invention, user's intelligent terminal 102 detects user at the concrete grammar of the time of staying in this region by the Bluetooth beacon equipment 101 in region, and flow process as shown in Figure 2, comprises the steps:
S201: intelligent terminal, after receiving the packet of Bluetooth beacon equipment transmission, is resolved the packet receiving.
Particularly, because the Bluetooth beacon equipment 101 being arranged in region alternately sends basic data bag and extended packet in blue teeth wireless mode, therefore, when user enters region, the packet that the Bluetooth beacon equipment 101 by being arranged in region that user's intelligent terminal receives sends is basic data bag, or extended packet.In fact, for the different pieces of information bag receiving, the content difference that packet is entrained: if reception is basic data bag, the content of wherein carrying can comprise: the UUID of Bluetooth beacon equipment, performance number, and basic data bag indication information; If what receive is extended packet, the content of wherein carrying can comprise: the UUID of Bluetooth beacon equipment, include the region indication information of the area identification in this region and extended packet indication information.
S202: if intelligent terminal parses basic data bag indication information from the packet receiving, by the content of carrying in the packet of reception, and the received signal strength of this packet is stored as Back ground Information the UUID in should packet.
Particularly, if intelligent terminal 102 parses basic data bag indication information from the packet receiving, show that packet that intelligent terminal receives in region is specially the basic data bag that the Bluetooth beacon equipment 101 that is arranged in this region sends.And then, content entrained in basic data bag can be stored as Back ground Information the UUID of the Bluetooth beacon equipment in should basic data bag.
S203: if intelligent terminal parses extended packet indication information from the packet receiving, the content of carrying in the packet of reception is stored as extend information the UUID in should packet.
Particularly, if intelligent terminal parses extended packet indication information from the packet receiving, show that packet that intelligent terminal receives in region is specially the extended packet that the Bluetooth beacon equipment 101 that is arranged in this region sends.And then, content entrained in the extended packet of reception can be stored as extend information the UUID of the Bluetooth beacon equipment in should extended packet.
S204: the UUID that intelligent terminal is arranged at the Bluetooth beacon equipment in voucher granting region in definite correspondence has stored after Back ground Information and extend information, according to the performance number in Back ground Information and received signal strength, calculate distance value, and in conjunction with the positional information in described extend information, determine positioning result according to the distance value calculating.
Particularly, after step S202, step S203, if intelligent terminal 102 has stored after the Back ground Information and extend information of UUID that correspondence is arranged at the same Bluetooth beacon equipment 101 in region, can calculate after distance value according to performance number and received signal strength in the Back ground Information of storage, according to the distance value calculating, in conjunction with the positional information in the extend information of storage, determine the positioning result of intelligent terminal.Wherein, about according to performance number and received signal strength compute distance values and determine positioning result according to the positional information of distance value and Bluetooth beacon equipment, can adopt the conventional technological means of those skilled in the art to realize, not repeat them here.
S205: intelligent terminal, when the extend information of storage comprises region indication information, records current time in the time of staying table creating at the area identification in this region indication information.
Intelligent terminal 102 can judge in the extend information of storage whether comprise region indication information, if comprise, in the extended packet that shows to receive, entrained content has comprised the region indication information of the area identification that contains region.Then, in the time of staying table that can create at the area identification in this region indication information, record current time, record current timestamp.
More preferably, in the embodiment of the present invention, can also filter the time of record in time of staying table, obtain effective writing time.Particularly, in the time of staying table creating at the area identification in this region indication information, record after current time, can calculate a upper time of record in time of staying table and the time difference between the time of current record; For example, if the time difference calculating surpasses set point (, set point is 3 minutes), other record except the last item record in time of staying table is deleted.In fact, if mobile terminal receives the interval time of same area sign, surpass set point (for example 3 minutes), show that mobile terminal left this region during this period, therefore, the time of leaving is should be as the effective time of staying; Like this, can be filtered the ineffective time of record in time of staying table, guarantee follow-up according to the accuracy of definite time of staying of time of record in time of staying table.
S206: intelligent terminal, according to the time of record in time of staying table, is determined user in the time of staying in this region.
Particularly, the time of recording in the time of staying table that intelligent terminal 102 can create according to the area identification in the indication information of region, determine user in the current time of staying in a region.For example, the time that the last item can be recorded, and between the most last time of recording the time difference as the current time of staying in this region.
In practical application, intelligent terminal 102 can also be after determining the time of staying in region, and the time of staying obtaining and default time period are compared, if compare this time of staying, is greater than the default time period, shows that user is larger to the interest in this region.Therefore, more preferably, at step S205, determine after the time of staying in region, if compare this time of staying, be greater than the default time period, the corresponding stop information of the sign with region can also be shown on the interface of intelligent terminal 102.Wherein, stop recommended information that information can be specifically the major commodities in this region or favor information etc.
Or, intelligent terminal 102 is determined after the time of staying in region at step S205, if compare this time of staying, is greater than the default time period, can also send request information according to the address of default server 103, wherein, in solicited message, carry the sign in region.Like this, server 103 can parse after the sign in region the solicited message from receiving, finds out the stop information corresponding with the sign in region and returns to intelligent terminal 102.
Here it is pointed out that and carrying out user while detecting in time of staying in region, above-mentioned steps S204 is also nonessential; In fact, execution step S204 can also can provide positioning service carrying out user while detecting in time of staying in region, and the positioning result that precision is higher is provided.
In the embodiment of the present invention, about each the Bluetooth beacon equipment 101 in region that is arranged at of mentioning before, its internal structure, as shown in Figure 3, specifically can comprise: Logic control module 301, the wireless signal transmitting module 302 being connected with directional antenna.
Particularly, Logic control module 301 is for being alternately sent to wireless signal transmitting module 302 by the basic data bag of this Bluetooth beacon equipment and extended packet (the first extended packet or the second extended packet).
Wireless signal transmitting module 302 is for broadcasting the packet receiving based on wireless blue tooth technology.In fact, Logic control module 301 and wireless signal transmitting module 302 can be integrated on SoC (System on Chip, the SOC (system on a chip)) chip in Bluetooth beacon equipment.
Wherein, the internal structure of Logic control module 301, as shown in Figure 4, specifically can comprise: first timer unit 401, second timer unit 402 and control unit 403.
Wherein, the output of first timer unit 401 is connected with the input of control unit 403, the input of second timer unit 402, and for when each timing arrives, output is arriving signal regularly; Particularly, timing is rule of thumb set in advance by those skilled in the art, for example, can be set as 0.1s.
The output of second timer unit 402 is connected with the input of control unit 403, for receiving after the timing arriving signal of first timer unit 401 outputs, starts timing; And when timing time arrives, output timing arriving signal.
Control unit 403 is for receiving after the timing arriving signal of first timer list 401 outputs, the performance number of reading pre-stored, and by the UUID of Bluetooth beacon equipment under the performance number reading, this control unit 403, and basic data bag indication information is encapsulated into Packet Generation to wireless signal transmitting module 302 and carries out wireless transmission; And after receiving the timing arriving signal of second timer unit 402 outputs, by the UUID of this Bluetooth beacon equipment, include the voucher indication information checking indication information of the sign of voucher (or include) of the sign of voucher, and extended packet indication information is encapsulated into Packet Generation to wireless signal transmitting module 302 and carries out wireless transmission.
In the embodiment of the present invention, control unit 403 specifically can comprise: performance number reads subelement, the first packet encapsulation subelement, the second packet encapsulation subelement.
Wherein, performance number reads subelement specifically for receiving after the timing arriving signal of first timer unit 401 outputs, the output of the performance number of reading pre-stored.
The first packet encapsulation subelement reads after the performance number of subelement output for receiving performance number, by the UUID of the performance number receiving and this Bluetooth beacon equipment, and basic data bag indication information is encapsulated into Packet Generation to wireless signal transmitting module 302 and carries out wireless transmission.
The second packet encapsulation subelement is for receiving after the timing arriving signal of second timer unit 402 outputs, by the UUID of this Bluetooth beacon equipment, include voucher/checking indication information of the sign of voucher, and extended packet indication information is encapsulated into Packet Generation to wireless signal transmitting module 302 and carries out wireless transmission.
From above-mentioned, detection system and the method for the user area time of staying based on Bluetooth beacon equipment that the embodiment of the present invention provides, intelligent terminal can receive basic data bag and the extended packet being sent by the Bluetooth beacon equipment that is arranged at region, and according to entrained content in the packet receiving, carry out the storage of Back ground Information and extend information; According to the Back ground Information of storage, determine the positioning result of intelligent terminal; In determining intelligent terminal, stored after the Back ground Information and extend information of UUID of corresponding Bluetooth beacon equipment, in time of staying table, recorded current time and determine the time of staying in region user according to the time of record in time of staying table.Compare existing scheme of carrying out user's time of staying based on ultrared indoor locating system, technical scheme provided by the invention, avoid occurring that detected entry time and time departure do not belong to same user's situation, also without by extra face recognition technology, different users being made to differentiation, when having guaranteed the accuracy of user's time of staying that it is determined, reduced the detection complexity of user's time of staying.
The foregoing is only preferred embodiment of the present invention, not for limiting the scope of the invention.Within the spirit and principles in the present invention all, any modification of doing, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.