CN106028282B - Based on Wi-Fi apart from acquisition methods, terminal, system, server and electronic equipment - Google Patents

Based on Wi-Fi apart from acquisition methods, terminal, system, server and electronic equipment Download PDF

Info

Publication number
CN106028282B
CN106028282B CN201610320004.7A CN201610320004A CN106028282B CN 106028282 B CN106028282 B CN 106028282B CN 201610320004 A CN201610320004 A CN 201610320004A CN 106028282 B CN106028282 B CN 106028282B
Authority
CN
China
Prior art keywords
terminal
base station
record
sim
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610320004.7A
Other languages
Chinese (zh)
Other versions
CN106028282A (en
Inventor
刘军发
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhongke Strong Point (beijing) Technology Co Ltd
Original Assignee
Zhongke Strong Point (beijing) Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhongke Strong Point (beijing) Technology Co Ltd filed Critical Zhongke Strong Point (beijing) Technology Co Ltd
Priority to CN201610320004.7A priority Critical patent/CN106028282B/en
Publication of CN106028282A publication Critical patent/CN106028282A/en
Application granted granted Critical
Publication of CN106028282B publication Critical patent/CN106028282B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/023Services making use of location information using mutual or relative location information between multiple location based services [LBS] targets or of distance thresholds
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S5/00Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations
    • G01S5/02Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations using radio waves

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the present invention disclose it is a kind of based on Wi Fi apart from acquisition methods, system, server and a kind of electronic equipment, be related to wireless communication technology field, can improve distance obtain precision, reduce manpower and materials cost.It is described to include apart from acquisition methods based on Wi Fi:Server obtains all Wi Fi transmittings source information/and mobile base station information and preset time threshold in unicom region;The distance for receiving first terminal obtains request;The distance obtains request:The first terminal temporal information and its collected Wi Fi transmittings source information/and mobile base station information;The temporal information is in the time threshold effective range, server is according to the collected Wi Fi transmittings source information/of the first terminal and mobile base station information, it is matched with all Wi Fi transmitting source information/and mobile base station information in the unicom region, obtains the terminal distance to match with the first terminal.The present invention is suitable for obtaining based on the terminal distance in Wi Fi signal fields.

Description

Based on Wi-Fi apart from acquisition methods, terminal, system, server and electronic equipment
Technical field
The present invention relates to wireless communication technology field more particularly to it is a kind of based on Wi-Fi apart from acquisition methods, terminal, System, server and electronic equipment.
Background technology
In LBS (Location Based Services, location based service) field, many application systems are both needed to Estimate the approximate distance between user by mobile terminal (such as cell phone apparatus), and then carries out the business such as friend-making, service recommendation Activity.Specifically, can be amusement and recreation type, service for life type, koinotropic type and business type by LBS points.The LBS of amusement and recreation type So that the user in same position region is participated in game, finds enjoyment;The LBS of service for life type is more It is various, including the dining room of finding nearby, hotel, market etc.;The LBS of koinotropic type is mainly to instigate the user in the same area can be with It is movable to be communicated and made friends etc.;The LBS of business type mainly believes the merchandise news of the location information of user and businessman, discount Breath etc. is combined, to promote customer consumption etc..
Obviously, all have to provide the positioning function of mobile terminal in above application, and the accuracy positioned is higher, it is fixed The means of position are more convenient, and the service that can be provided to the user will be abundanter.
Determine currently, location technology can be divided mainly into GPS (Global Position System, GPS) Position and non-GPS positioning.GPS positioning, technology relative maturity obtain the absolute seat of equipment in positioning means such as outdoor vehicle mounted guidances Mark, and then the distance between estimation apparatus.Rather than GPS positioning, such as:Based on the positioning means such as Wi-Fi, bluetooth, infrared, RFID The absolute coordinate of equipment, and then the distance between estimation apparatus are obtained, is also belonged to such;The second is the side based on point-to-point ranging Method.It can mutually be perceived by sensor i.e. between equipment and equipment, and then relative distance estimated by the power of perception.Such as Document CN104459612A, it is entitled to have measurement and WI-FI equipment distance and the mobile terminal of direction energy supply, be by Telemetry antenna and phase demodulation distance-finding module carry out the measurement of distance of mobile terminal and direction.The characteristics of such method, is to need Ranging both sides are limited in the range of sensor can perceive, and point-to-point direct perception is realized by sensor assembly.
However, becoming increasingly popular with the WLAN based on IEEE802.11b/g agreements, in all kinds of mobile terminals by Gradually start built-in wireless network card, in addition, the idea of development of " wireless city " is gradually moved to maturity by concept, is occurred in environment more next More AP (Access Point, wireless access point), these are all that the development of the location technology based on Wi-Fi creates facility Condition.
The location technology based on Wi-Fi occurred at present, there are two main classes:1) the positioning skill based on signal propagation model Art;2) it is based on the location technology of fingerprint (fingerprint) model.The former is when being propagated in air according to wireless signal The nonlinear attenuation characteristic revealed, establishes the model of signal strength and distance, to obtain location information.Since it mainly makes A series of location Calculation is carried out with the signal strength received, generally involves a large amount of calculating, it is still complex;More Importantly, due to which indoor environment complicated and changeable causes larger loss to the propagation of signal, and deposited in signal communication process In multipath effect, therefore the positioning result precision of this method is not high.And location technology of the latter based on Fingerprint Model, then mainly It is to realize positioning based on a large amount of actual observation data.The above method compared to the location technology based on signal propagation model, although The precision of positioning can be promoted, still, off-line training step needs take a substantial amount of time, manpower and material resources carry out calibration work Make, previous work is more heavy.
Invention content
In view of this, the embodiment of the present invention provide it is a kind of based on Wi-Fi apart from acquisition methods, system, server and one Kind of electronic equipment, it is high to solve to be based on Wi-Fi positioning accuracies in the prior art, and spends human and material resources that cost is higher to ask Topic.
In order to achieve the above objectives, the embodiment of the present invention adopts the following technical scheme that:
On the one hand, the embodiment of the present invention provide it is a kind of based on Wi-Fi apart from acquisition methods, this method includes:
Server obtains all Wi-Fi transmittings source information/and mobile base station information and preset time threshold in unicom region;
The distance for receiving first terminal obtains request;The distance obtains request:The first terminal time letter Breath and its collected Wi-Fi transmittings source information/and mobile base station information;
For the temporal information in the time threshold effective range, server is collected according to the first terminal Wi-Fi emits all Wi-Fi transmitting source information/and mobile base station in source information/and mobile base station information, with the unicom region Information is matched, and the terminal distance to match with the first terminal is obtained.
As another embodiment, all Wi-Fi transmittings source packets include in the unicom region:Institute in the unicom region There is collected Wi-Fi access points MAC Address set, neighbours are closed between each access point signals intensity set and each access point System;The mobile base station information includes at least base station LAC and base station CID.
As another embodiment, further, the method further includes:
It is pre-configured all Wi-Fi in time threshold and the unicom region and emits source information;
Receive the temporal information and its collected Wi-Fi emission sources letter that each terminal uploads in the unicom region Breath;The Wi-Fi transmittings source information includes at least:The collected Wi-Fi access points MAC Address set of terminal.
As another embodiment, it is described obtain the terminal that matches with the first terminal apart from the step of specifically include:
It is constituted with the data that the first terminal is uploaded to the server when the record in the server database There are identical MAC Address in record, then according to formula Dist=Dsim-min+pdif-new*(Dsim-max-Dsim-min) described in calculating The terminal distance Dist of first terminal and server database record to match with the first terminal;
The Dsim-minRefer to that record in the server database is uploaded with the first terminal to the server The record that constitutes of data in, in the corresponding distance range of ratio shared by identical MAC Address apart from minimum value;It is described Dsim-maxRefer to that the data that record and the first terminal in the server database are uploaded to the server are constituted In record, in the corresponding distance range of ratio shared by identical MAC Address apart from maximum value;The Pdif-newIt refer to root In the record constituted with the data that the first terminal is uploaded to the server according to the record in the server database, tool There is the weight factor that the ratiometric conversion shared by different MAC Address obtains;
When the note that recording in the database of server is uploaded to the data of the server with the first terminal and constitutes When identical MAC Address being not present in record, then the first terminal and the mobile base station of other matched terminals are believed Whether the base station LAC and base station CID of breath are consistent;When the mobile base station information is consistent, the first terminal and the clothes The distance Dist for recording corresponding Wi-Fi terminals of business device database is less than or equal to the diameter of base station range;Work as institute State mobile base station information it is inconsistent when, then be more than base station range diameter.
As another embodiment, the Pdif-new is according to formulaIt is calculated;
Wherein, the PdifRefer to the record MAC different from the record of the first terminal in the server database Address ratio shared in being recorded at two;The pdif-minRefer to that the range of 0-100% is divided into several sections, it is described PdifMinimum value in the interval range at place;The pdif-maxRefer to the PdifMaximum value in the interval range at place.
As another embodiment, the PdifAccording to formulaIt calculates It arrives;
Wherein, the MacNum refers to that the record in the server database is identical with the record of the first terminal The number of MAC Address;M and N is respectively the record in the server database and MAC Address in the record of the first terminal Number.
As another embodiment, the range of 0-100% is divided into following 4 sections:(0,20%), (20%, 40%), (40%, 80%), (80%, 1), works as PdifWhen falling into wherein some section, the pdif-minWith the pdif-maxIt is to represent The minimum value and maximum value in this section.
As another embodiment, the Dsim-minAnd Dsim-maxBy calculating DsimIt obtains;The DsimIt refer to the service In the record of record and the first terminal in device database, the corresponding distance range of ratio shared by identical MAC Address, institute State Dsim-minAnd Dsim-maxThe minimum value and maximum value in this section represented;
Its calculation is:According to formulaRecord and described first in calculation server database Ratio P in the record of terminal shared by identical MAC Addresssim, wherein min (N, M) refers to the smaller value taken in the N and M;When PsimWhen >=80%, DsimTake 10-30m;As 40%≤PsimWhen < 80%, DsimTake 30-50m;As 20%≤PsimWhen < 40%, DsimTake 50-70m;As 0 < PsimWhen < 20%, DsimTake 70-100m;PsimWhen=0, Dsim> 100m, then DistMore than 100m.
As another embodiment, the Dsim-minAnd Dsim-maxPass through DsimIt is calculated;The DsimIt refer to server count According to the record in library with the record of the first terminal, the corresponding distance range of ratio shared by identical MAC Address is described Dsim-minAnd Dsim-maxThe minimum value and maximum value in this section represented;Its calculation is:According to formulaThe ratio shared by record MAC Address identical with the record of first terminal in calculation server database Example Psim, wherein min (N, M) refers to the smaller value taken in N and M;Work as PsimWhen >=80%, DsimTake 10-30m;As 40%≤Psim When < 80%, DsimTake 30-50m;As 20%≤PsimWhen < 40%, DsimTake 50-70m;As 0 < PsimWhen < 20%, DsimIt takes 70-100m。
As another embodiment, when there is no identical with the record of the first terminal for the record in server database MAC Address, and the base station LAC and base station CID of mobile base station information are consistent, then Dist is more than 100m;Work as server data Record in library and identical MAC Address, and the base station LAC and base of mobile base station information are not present in the record of first terminal The CID that stands is inconsistent, then Dist is more than 600m.
Second aspect, the embodiment of the present invention provide a kind of server, which includes:
Information acquisition unit, for obtaining in unicom region all Wi-Fi transmitting source information/and mobile base station information and pre- If time threshold;
Request reception unit, the distance for receiving first terminal obtain request;The distance obtains request:Institute State first terminal temporal information and its collected Wi-Fi transmittings source information/and mobile base station information;
Distance acquiring unit, for the temporal information in the time threshold effective range, server is according to All Wi-Fi transmittings in the collected Wi-Fi transmittings source information/of first terminal and mobile base station information, with the unicom region Source information/and mobile base station information are matched, and the terminal distance to match with the first terminal is obtained.
The third aspect, the embodiment of the present invention provide a kind of distance acquisition system based on Wi-Fi, which includes:At least One terminal and server as described above;
The terminal, for acquiring Wi-Fi transmittings source information/and mobile base station information in real time, and in real time by the acquisition The Wi-Fi transmitting source information arrived, mobile base station information and its corresponding temporal information upload to the server;
The server, for storing the Wi-Fi transmittings source information/and mobile base station information, time that the terminal uploads Information, also, the temporal information, in the time threshold effective range, server is according to the collected Wi- of the terminal Fi emits all Wi-Fi transmitting source information/and mobile base station letter in source information/and mobile base station information, with the unicom region Breath is matched, and the terminal distance to match with the terminal is obtained.
Fourth aspect, the embodiment of the present invention provide a kind of electronic equipment, which includes:Processor, leads to memory Believe interface and bus;
The processor, the memory are connected by the bus with the communication interface and complete mutual lead to Letter;
The memory stores executable program code;
The processor can perform to run with described by reading the executable program code stored in the memory The corresponding program of program code, for:
Obtain all Wi-Fi transmittings source information/and mobile base station information and preset time threshold in unicom region;
The distance for receiving first terminal obtains request;The distance obtains request:The first terminal time letter Breath and its collected Wi-Fi transmittings source information/and mobile base station information;
The temporal information is sent out in the time threshold effective range according to the collected Wi-Fi of the first terminal Penetrate in source information/and mobile base station information, with the unicom region all Wi-Fi transmitting source information/and mobile base station information into Row matching, obtains the terminal distance to match with the first terminal.
5th aspect, the embodiment of the present invention provide it is a kind of based on Wi-Fi apart from acquisition methods;This method includes:Second The distance that terminal receives first terminal obtains request;The distance obtains request:The first terminal temporal information with And its collected Wi-Fi emits source information/and mobile base station information;
The second terminal obtains the Wi-Fi transmittings source information/and mobile base station information and preset time threshold of its own;
For the temporal information in the time threshold effective range, the second terminal collects the first terminal Wi-Fi transmittings source information/and mobile base station information, the Wi-Fi transmitting source information/with its own and the progress of mobile base station information Matching obtains the terminal distance to match with the first terminal.
As another embodiment, the Wi-Fi transmittings source packet includes:The collected Wi-Fi accesses of first terminal Point MAC Address set, neighborhood between each access point signals intensity set and each access point;The mobile base station information is extremely Include base station LAC and base station CID less.
As another embodiment, further, the terminal that the acquisition matches with the first terminal apart from the step of It specifically includes:
When in the second terminal database record with the first terminal to the second terminal transmission at a distance from obtain Take request data constitute record in there are identical MAC Address, then according to formula Dist=Dsim-min+pdif-new*(Dsim-max- Dsim-min) calculate the terminal to match with the first terminal of the first terminal and the second terminal data-base recording away from From Dist
The Dsim-minRefer to record in the second terminal database with the first terminal to the second terminal The distance of transmission obtains in the record that request data is constituted, in the corresponding distance range of ratio shared by identical MAC Address Apart from minimum value;The Dsim-maxRefer to record in the second terminal database with the first terminal to described second The distance that terminal is sent obtains in the record that request data is constituted, corresponding apart from model with the ratio shared by identical MAC Address In enclosing apart from maximum value;The Pdif-newRefer to according to record and the first terminal in the second terminal database to The distance that the second terminal is sent obtains in the record of data composition of request, is changed with the ratio shared by different MAC Address Obtained weight factor;
It is obtained when the record in the database of second terminal is sent to the first terminal at a distance from the second terminal When identical MAC Address being not present in the record that request data is constituted, then the first terminal is matched with other Whether the base station LAC and base station CID of the mobile base station information of terminal are consistent;It is described when the mobile base station information is consistent First terminal records corresponding Wi-Fi terminals distance D with the second terminal databaseistIt is covered less than or equal to base station The diameter of lid range;When the mobile base station information is inconsistent, then it is more than the diameter of base station range.
As another embodiment, further, the Pdif-newAccording to formulaIt calculates It obtains;
Wherein, the PdifRefer in the second terminal database record it is different from the record of the first terminal MAC Address ratio shared in being recorded at two;The pdif-minRefer to that the range of 0-100% is divided into several sections, institute State PdifMinimum value in the interval range at place;The pdif-maxRefer to the PdifMaximum value in the interval range at place.
As another embodiment, further, the PdifAccording to formula
It is calculated;
Wherein, the MacNum refers to the record in the second terminal database and phase in the record of the first terminal With the number of MAC Address;M and N is respectively the record in the second terminal database and MAC in the record of the first terminal The number of address.
As another embodiment, further, the range of 0-100% is divided into 4 sections:(0,20%), (20%, 40%), (40%, 80%), (80%, 1), work as PdifWhen falling into wherein some section, the pdif-minWith the pdif-maxIt is The minimum value and maximum value in this section represented.
As another embodiment, further, the Dsim-minAnd Dsim-maxBy calculating DsimIt obtains;The DsimIt is Refer to the record in the second terminal database with the record of the first terminal, the ratio shared by identical MAC Address corresponds to Distance range, the Dsim-minAnd Dsim-maxThe minimum value and maximum value in this section represented;
Its calculation is:According to formulaCalculate the record in the second terminal database and institute State the ratio P shared by identical MAC Address in the record of first terminalsim, wherein min (N, M) refer to take the N with it is smaller in M Value;Work as PsimWhen >=80%, DsimTake 10-30m;As 40%≤PsimWhen < 80%, DsimTake 30-50m;As 20%≤Psim< When 40%, DsimTake 50-70m;As 0 < PsimWhen < 20%, DsimTake 70-100m;PsimWhen=0, Dsim> 100m, then DistIt is more than 100m。
As another embodiment, further, the Dsim-minAnd Dsim-maxPass through DsimIt is calculated;The DsimIt is Refer to record in second terminal database in the record of the first terminal, ratio shared by identical MAC Address it is corresponding away from From range, the Dsim-minAnd Dsim-maxThe minimum value and maximum value in this section represented;Its calculation is:According to public affairs FormulaIt calculates shared by the record MAC Address identical with the record of first terminal in second terminal database Ratio Psim, wherein min (N, M) refers to the smaller value taken in N and M;Work as PsimWhen >=80%, DsimTake 10-30m;When 40%≤ PsimWhen < 80%, DsimTake 30-50m;As 20%≤PsimWhen < 40%, DsimTake 50-70m;As 0 < PsimWhen < 20%, Dsim Take 70-100m.
As another embodiment, further, when the record of record and the first terminal in second terminal database In identical MAC Address is not present, and the base station LAC and base station CID of mobile base station information are consistent, then DistMore than 100m;When Record in second terminal database and identical MAC Address is not present in the record of first terminal, and mobile base station information Base station LAC and base station CID are inconsistent, then DistTo be more than 600m.
6th aspect, the embodiment of the present invention provide a kind of terminal, which includes:Request reception unit, for receiving the The distance of one terminal obtains request;The distance obtains request:The first terminal temporal information and its collect Wi-Fi transmittings source information/and mobile base station information;
Information acquisition unit emits source information/and mobile base station information and preset time for obtaining the Wi-Fi of its own Threshold value;
Distance acquiring unit, for the temporal information in the time threshold effective range, the second terminal will The collected Wi-Fi transmittings source information/of the first terminal and mobile base station information, with the Wi-Fi transmittings source information of its own/ It is matched with mobile base station information, obtains the terminal distance to match with the first terminal.
As another embodiment, the Wi-Fi transmittings source packet includes:The collected Wi-Fi accesses of first terminal Point MAC Address set, neighborhood between each access point signals intensity set and each access point;The mobile base station information is extremely Include base station LAC and base station CID less.
As another embodiment, further, the distance acquiring unit is specifically used for working as the second terminal database In record with the first terminal to the second terminal send at a distance from obtain request data composition record in there are phases Same MAC Address, then according to formula Dist=Dsim-min+pdif-new*(Dsim-max-Dsim-min) calculate the first terminal and institute State the terminal distance D of second terminal data-base recording to match with the first terminalist;The Dsim-minRefer to described What the record in two terminal databases was constituted with the first terminal to acquisition request data at a distance from second terminal transmission In record, in the corresponding distance range of ratio shared by identical MAC Address apart from minimum value;The Dsim-maxIt refer to institute State in second terminal database record with the first terminal to the second terminal send at a distance from acquisition request data structure At record in, in the corresponding distance range of ratio shared by identical MAC Address apart from maximum value;The Pdif-newIt is Refer to according to record and the first terminal in the second terminal database to obtaining and ask at a distance from second terminal transmission In the record that the data asked are constituted, there is the weight factor that the ratiometric conversion shared by different MAC Address obtains;When second terminal Record in database, which is sent to the first terminal at a distance from the second terminal, to be obtained in the record that request data is constituted There is no when identical MAC Address, then the first terminal and the mobile base station information of other matched terminals Whether base station LAC and base station CID are consistent;When the mobile base station information is consistent, the first terminal is whole with described second The distance D for recording corresponding Wi-Fi terminals of client databaseistLess than or equal to the diameter of base station range;When the shifting When dynamic base station information is inconsistent, then it is more than the diameter of base station range.
All Wi-Fi emit source information/and mobile base station in the unicom region that the embodiment of the present invention is obtained by server Obtained at a distance from information and preset time threshold, with first terminal in request the first terminal temporal information that carries and its Collected Wi-Fi transmittings source information/and mobile base station information are matched, so as to get and the first terminal phase Matched terminal distance.Compared with prior art, technical solution of the present invention only needs the unicom area stored by server internal All Wi-Fi transmitting source information/and mobile base station information and time threshold can get the first terminal and its in domain The distance between terminal to match positions complexity in the prior art to reduce, and improves distance and obtains precision;And this Inventive technique scheme carries out the staking-out work of manpower and materials without early period, to reduce manpower and materials cost.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the flow chart apart from acquisition methods based on Wi-Fi of the embodiment of the present invention one;
Fig. 2 is the structural schematic diagram of the server of the embodiment of the present invention two;
Fig. 3 is that the distance based on Wi-Fi of the embodiment of the present invention three obtains the structural schematic diagram of system;
Fig. 4 is the schematic diagram of the electronic equipment of the embodiment of the present invention four;
Fig. 5 is the schematic diagram of two pieces of unicom region Ω 1 and Ω 2 in the embodiment of the present invention;
Fig. 6 be in the embodiment of the present invention in unicom region Ω 1 in terminal A and terminal B and unicom region Ω 1 terminal A and The link relation schematic diagram of terminal C in terminal B and unicom region Ω 2;
Fig. 7 is in the embodiment of the present invention using 4 Wi-Fi emission sources, 2 mobile base station system configuration diagrams;
Fig. 8 is the flow chart apart from acquisition methods based on Wi-Fi of the embodiment of the present invention five;
Fig. 9 is the structural schematic diagram of the terminal of the embodiment of the present invention six.
Specific implementation mode
Method and device is recommended to be described in detail a kind of application program of the embodiment of the present invention below in conjunction with the accompanying drawings.It should Clear, described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Based in the present invention Embodiment, all other embodiment that those of ordinary skill in the art are obtained without creative efforts, all Belong to the scope of protection of the invention.
As shown in Figure 1, the embodiment of the present invention one provide it is a kind of based on Wi-Fi apart from acquisition methods;This method includes:
101:Server obtains all Wi-Fi transmittings source information/and mobile base station information and preset time in unicom region Threshold value;All Wi-Fi transmittings source packets include in the unicom region:All collected Wi-Fi connect in the unicom region Access point MAC Address set, neighborhood between each access point signals intensity set and each access point;The mobile base station information Including at least base station LAC and base station CID.
102:The distance for receiving first terminal obtains request;The distance obtains request:When the first terminal Between information and its collected Wi-Fi transmitting source information/and mobile base station information;
103:In the time threshold effective range, server collects the temporal information according to the first terminal Wi-Fi transmittings source information/and mobile base station information, with the unicom region in all Wi-Fi transmitting source information/and move base Information of standing is matched, and the terminal distance to match with the first terminal is obtained.
It should be noted that this method can also include the following steps:
It is pre-configured all Wi-Fi in time threshold and the unicom region and emits source information;
Receive the temporal information and its collected Wi-Fi emission sources letter that each terminal uploads in the unicom region Breath;The Wi-Fi transmittings source information includes at least:The collected Wi-Fi access points MAC Address set of terminal.
All Wi-Fi emit source information/and mobile base station in the unicom region that the embodiment of the present invention is obtained by server Obtained at a distance from information and preset time threshold, with first terminal in request the first terminal temporal information that carries and its Collected Wi-Fi transmittings source information/and mobile base station information are matched, so as to get and the first terminal phase Matched terminal distance.Compared with prior art, technical solution of the present invention only needs within the scope of the time threshold of pre-configuration, leads to Cross in the unicom region of server internal storage that all Wi-Fi transmitting source information/and mobile base station information and time threshold can It is complicated to reduce positioning in the prior art to get the distance between matched terminal of the first terminal Degree improves distance and obtains precision;And technical solution of the present invention carries out the staking-out work of manpower and materials without early period, to lower Manpower and materials costs.
As shown in Fig. 2, the embodiment of the present invention two additionally provides a kind of server, which includes:
Information acquisition unit 201, for obtaining all Wi-Fi transmittings source information/and mobile base station information in unicom region And preset time threshold;All Wi-Fi transmittings source packets include in the unicom region:It is all in the unicom region to collect Wi-Fi access point MAC Address set, neighborhood between each access point signals intensity set and each access point;The shifting Dynamic base station information includes at least base station LAC and base station CID.
Request reception unit 202, the distance for receiving first terminal obtain request;The distance obtains wraps in request It includes:The first terminal temporal information and its collected Wi-Fi transmittings source information/and mobile base station information;
Distance acquiring unit 203, for the temporal information in the time threshold effective range, server is according to institute State all Wi-Fi hairs in the collected Wi-Fi transmittings source information/of first terminal and mobile base station information, with the unicom region It penetrates source information/and mobile base station information is matched, obtain the terminal distance to match with the first terminal.
It should be noted that the server further includes:
It is pre-configured unit, emits source information for being pre-configured all Wi-Fi in time threshold and the unicom region;
Information receiving unit, for receiving each terminal uploads in the unicom region temporal information and it is collected Wi-Fi emit source information;The Wi-Fi transmittings source information includes at least:The collected Wi-Fi access points MAC of terminal Address set.
It should also be noted that, the distance acquiring unit is specifically used for working as the record in the server database and institute State in the record that the data that first terminal uploads to the server are constituted that there are identical MAC Address, then according to formula Dist =Dsim-min+pdif-new*(Dsim-max-Dsim-min) calculate that the first terminal records with the server database with it is described The terminal distance Dist that first terminal matches;The Dsim-minIt refer to the record and described first in the server database It is corresponding apart from model with the ratio shared by identical MAC Address in the record that the data that terminal is uploaded to the server are constituted In enclosing apart from minimum value;The Dsim-maxRefer to record in the server database with the first terminal to the clothes It is engaged in the record that the data that device uploads are constituted, most with the distance in the corresponding distance range of ratio shared by identical MAC Address Big value;The Pdif-newRefer to being uploaded to the server with the first terminal according to the record in the server database The record that constitutes of data in, the weight factor that is obtained with the ratiometric conversion shared by different MAC Address;When the data of server Identical MAC Address is not present in the record for the data composition that record in library is uploaded to the server with the first terminal When, then the base station LAC and base station CID of the mobile base station information of the first terminal terminal matched with other are It is no consistent;When the mobile base station information is consistent, the first terminal records corresponding Wi- with the server database The distance Dist of Fi terminals is less than or equal to the diameter of base station range;When the mobile base station information is inconsistent, then More than the diameter of base station range.
As shown in figure 8, the embodiment of the present invention five additionally provide it is a kind of based on Wi-Fi apart from acquisition methods;This method packet It includes:
801:The distance that second terminal receives first terminal obtains request;The distance obtains request:Described One terminal time information and its collected Wi-Fi transmittings source information/and mobile base station information;Wherein, the Wi-Fi transmittings Source information includes:Collected Wi-Fi access points MAC Address (MAC Address) set of first terminal, each access point signals Neighborhood between intensity set and each access point;The mobile base station information includes at least base station LAC and base station CID.
802:The second terminal obtains the Wi-Fi transmittings source information/and mobile base station information and preset time of its own Threshold value;
803:For the temporal information in the time threshold effective range, the second terminal adopts the first terminal The Wi-Fi transmittings source information/and mobile base station information collected, emits source information/and mobile base station information with the Wi-Fi of its own It is matched, obtains the terminal distance to match with the first terminal.The step specifically includes:
When in the second terminal database record with the first terminal to the second terminal transmission at a distance from obtain Take request data constitute record in there are identical MAC Address, then according to formula Dist=Dsim-min+pdif-new*(Dsim-max- Dsim-min) calculate the terminal to match with the first terminal of the first terminal and the second terminal data-base recording away from From Dist
The Dsim-minRefer to record in the second terminal database with the first terminal to the second terminal The distance of transmission obtains in the record that request data is constituted, in the corresponding distance range of ratio shared by identical MAC Address Apart from minimum value;The Dsim-maxRefer to record in the second terminal database with the first terminal to described second The distance that terminal is sent obtains in the record that request data is constituted, corresponding apart from model with the ratio shared by identical MAC Address In enclosing apart from maximum value;The Pdif-newRefer to according to record and the first terminal in the second terminal database to The distance that the second terminal is sent obtains in the record of data composition of request, is changed with the ratio shared by different MAC Address Obtained weight factor;
It is obtained when the record in the database of second terminal is sent to the first terminal at a distance from the second terminal When identical MAC Address being not present in the record that request data is constituted, then the first terminal is matched with other Whether the base station LAC and base station CID of the mobile base station information of terminal are consistent;It is described when the mobile base station information is consistent First terminal records corresponding Wi-Fi terminals distance D with the second terminal databaseistIt is covered less than or equal to base station The diameter of lid range;When the mobile base station information is inconsistent, then it is more than the diameter of base station range.
It should be noted that the Pdif-newAccording to formulaIt is calculated;
Wherein, the PdifRefer in the second terminal database record it is different from the record of the first terminal MAC Address ratio shared in being recorded at two;The pdif-minRefer to that the range of 0-100% is divided into several sections, institute State PdifMinimum value in the interval range at place;The pdif-maxRefer to the PdifMaximum value in the interval range at place.
The PdifAccording to formulaIt is calculated;
Wherein, the MacNum refers to the record in the second terminal database and phase in the record of the first terminal With the number of MAC Address;M and N is respectively the record in the second terminal database and MAC in the record of the first terminal The number of address.
The range of 0-100% is divided into 4 sections:(0,20%), (20%, 40%), (40%, 80%), (80%, 1), Work as PdifWhen falling into wherein some section, the pdif-minWith the pdif-maxIt is the minimum value and maximum in this section represented Value.
The Dsim-minAnd Dsim-maxBy calculating DsimIt obtains;The DsimRefer in the second terminal database In the record of record and the first terminal, the corresponding distance range of ratio shared by identical MAC Address, the Dsim-minAnd Dsim-maxThe minimum value and maximum value in this section represented;
Its calculation is:According to formulaCalculate the record in the second terminal database and institute State the ratio P shared by identical MAC Address in the record of first terminalsim, wherein min (N, M) refer to take the N with it is smaller in M Value;Work as PsimWhen >=80%, DsimTake 10-30m;As 40%≤PsimWhen < 80%, DsimTake 30-50m;As 20%≤Psim< When 40%, DsimTake 50-70m;As 0 < PsimWhen < 20%, DsimTake 70-100m;PsimWhen=0, Dsim> 100m, then DistIt is more than 100m。
The Dsim-minAnd Dsim-maxPass through DsimIt is calculated;The DsimIt refer to the record in second terminal database With in the record of the first terminal, the corresponding distance range of ratio shared by identical MAC Address, the Dsim-minAnd Dsim-maxThe minimum value and maximum value in this section represented;Its calculation is:According to formulaIt calculates Record in second terminal database and the ratio P in the record of first terminal shared by identical MAC Addresssim, wherein min (N, M) It refer to the smaller value taken in N and M;Work as PsimWhen >=80%, DsimTake 10-30m;As 40%≤PsimWhen < 80%, DsimTake 30- 50m;As 20%≤PsimWhen < 40%, DsimTake 50-70m;As 0 < PsimWhen < 20%, DsimTake 70-100m.
When in second terminal database record with identical MAC Address is not present in the record of the first terminal, and The base station LAC and base station CID of mobile base station information are consistent, then DistMore than 100m;When in second terminal database record with Identical MAC Address is not present in the record of first terminal, and the base station LAC and base station CID of mobile base station information are inconsistent, Then DistTo be more than 600m.
As shown in figure 9, the embodiment of the present invention six additionally provides a kind of terminal, which includes:
Request reception unit 901, the distance for receiving first terminal obtain request;The distance obtains wraps in request It includes:The first terminal temporal information and its collected Wi-Fi transmittings source information/and mobile base station information;The Wi-Fi Transmitting source packet includes:The collected Wi-Fi access points MAC Address set of first terminal, each access point signals intensity Neighborhood between set and each access point;The mobile base station information includes at least base station LAC and base station CID.
Information acquisition unit 902 emits source information/and mobile base station information and presets for obtaining the Wi-Fi of its own Time threshold;
Distance acquiring unit 903, for the temporal information in the time threshold effective range, the second terminal By the collected Wi-Fi transmittings source information/of the first terminal and mobile base station information, believe with the Wi-Fi emission sources of its own Breath/and mobile base station information are matched, and the terminal distance to match with the first terminal is obtained.
It should be noted that the distance acquiring unit, be specifically used for when in the second terminal database record with The distance that the first terminal is sent to the second terminal obtains in the record that request data is constituted there are identical MAC Location, then according to formula Dist=Dsim-min+pdif-new*(Dsim-max-Dsim-min) calculate the first terminal and the second terminal The terminal distance D of data-base recording to match with the first terminalist;The Dsim-minRefer to the second terminal data Record in library has with the record that the first terminal is constituted to acquisition request data at a distance from second terminal transmission In the corresponding distance range of ratio shared by identical MAC Address apart from minimum value;The Dsim-maxIt refer to the second terminal Recording with the first terminal into the record of acquisition request data composition at a distance from second terminal transmission in database, With in the corresponding distance range of ratio shared by identical MAC Address apart from maximum value;The Pdif-newRefer to according to The data structure that record in second terminal database is asked with the first terminal to acquisition at a distance from second terminal transmission At record in, the weight factor that is obtained with the ratiometric conversion shared by different MAC Address;When in the database of second terminal Record with the first terminal be sent at a distance from the second terminal obtain request data constitute record in be not present it is identical MAC Address when, then the base station LAC of the mobile base station information of the first terminal and other matched terminals and Whether base station CID is consistent;When the mobile base station information is consistent, the note of the first terminal and the second terminal database Record the distance D of corresponding Wi-Fi terminalsistLess than or equal to the diameter of base station range;When the mobile base station information not When consistent, then it is more than the diameter of base station range.
As shown in figure 3, the embodiment of the present invention three additionally provides a kind of distance acquisition system based on Wi-Fi;The system packet It includes:At least one terminal and server as described above;
The terminal, for acquiring Wi-Fi transmittings source information/and mobile base station information in real time, and in real time by the acquisition The Wi-Fi transmitting source information arrived, mobile base station information and its corresponding temporal information upload to the server;
The server, for storing the Wi-Fi transmittings source information/and mobile base station information, time that the terminal uploads Information, also, the temporal information, in the time threshold effective range, server is according to the collected Wi- of the terminal Fi emits all Wi-Fi transmitting source information/and mobile base station letter in source information/and mobile base station information, with the unicom region Breath is matched, and the terminal distance to match with the terminal is obtained.
Based on above method, server and system architecture, the distance based on Wi-Fi is obtained below by way of specific embodiment Process is taken to be described in detail.If unicom region Ω 1 and unicom region Ω 2 based on Wi-Fi are as shown in figure 5, wherein dot Indicate wireless access point;Currently having in the unicom region Ω 1 in terminal A and terminal B, the unicom region Ω 2 currently has end C is held, as shown in Figure 6;
(1) after present terminal A and B opens Wi-Fi, the Wi-Fi transmitting source information and mobile base station information of surrounding are acquired, and Include the data that the Wi-Fi emits source information and mobile base station information to server upload;The Wi-Fi emits source packet Include MAC Address;The mobile base station information includes base station LAC and base station CID;The present terminal A and B is to the server The data of upload include but not limited to that the Wi-Fi emits source information, the mobile base station information, preferred as the present embodiment Embodiment, the present terminal to the data of the server transport further include temporal information;Obviously, those skilled in the art Also other information can be added according to actual demand, for example, the personal information such as hobby of terminal user.
(2) server receive the present terminal distance obtain request after, according to the present terminal transmit come The data for emitting source information and mobile base station information including Wi-Fi find satisfactory record (i.e. inside it in database The data of the information match carried in request are obtained at a distance from present terminal transmission), it is calculated, obtains the current end Hold other-end existing for surrounding and at a distance from other-end;
It should be noted that being recorded as other-end acquisition and to the server in the server internal database The record that the data including surrounding Wi-Fi transmitting source information and mobile base station information of transmission are constituted;Preferably, the data are also Including temporal information;To obtain real-time results, in the present embodiment, the satisfactory time for being recorded as being formed works as with described Record of the time of preceding terminal transmission data within the same period.Obviously, those skilled in the art can set according to actual demand Other fixed or additional requirements, for example, the satisfactory record can also be that corresponding terminal user has identical hobby Record etc..
Its calculating process is as follows:
When in the database record with there are identical MAC Address in the record of the present terminal, then according to public affairs Formula Dist=Dsim-min+pdif-new*(Dsim-max-Dsim-min) the corresponding Wi-Fi that records that calculates present terminal and database moves The distance D of terminalist
The Dsim-minRefer to that record in the server database is uploaded with the first terminal to the server The record that constitutes of data in, in the corresponding distance range of ratio shared by identical MAC Address apart from minimum value;It is described Dsim-maxRefer to that the data that record and the first terminal in the server database are uploaded to the server are constituted In record, in the corresponding distance range of ratio shared by identical MAC Address apart from maximum value;The Pdif-newIt refer to root In the record constituted with the data that the first terminal is uploaded to the server according to the record in the server database, tool There is the weight factor that the ratiometric conversion shared by different MAC Address obtains;
The Pdif-newAccording to formulaIt is calculated;
Wherein, the PdifRefer to the record MAC different from the record of the present terminal in the server database Address ratio shared in being recorded at two;The pdif-minRefer to that the range of 0-100% is divided into several sections, it is described PdifMinimum value in the interval range at place;The pdif-maxRefer to the PdifMaximum value in the interval range at place.Make For concrete implementation mode, the range of 0-100% is divided into following 4 sections:(0,20%), (20%, 40%), (40%, 80%), (80%, 1);
The PdifAccording to formulaIt is calculated;
Wherein, the MacNum refers to that the record in the server database is identical with the record of the present terminal The number of MAC Address;M and N is respectively of the record and MAC Address in the record of the present terminal in the database Number.
The Dsim-minAnd Dsim-maxPass through DsimIt is calculated;The DsimRefer to record in server database with In the record of present terminal, the corresponding distance range of ratio shared by identical MAC Address, the Dsim-minAnd Dsim-maxIt represents DsimThe minimum value and maximum value in region;Its calculation is:According to formulaCalculation server database In record and present terminal record in ratio P shared by identical MAC Addresssim, wherein min (N, M) refers to taking in N and M Smaller value;According to experiment experience, work as PsimWhen >=80%, DsimTake 10-30m;As 40%≤PsimWhen < 80%, DsimTake 30- 50m;As 20%≤PsimWhen < 40%, DsimTake 50-70m;As 0 < PsimWhen < 20%, DsimTake 70-100m.
When identical MAC Address is not present in the record of record and present terminal in server database, then compare Whether the base station LAC and base station CID of mobile base station information are consistent;When mobile base station information is consistent, present terminal and data The distance Dist for recording corresponding Wi-Fi mobile terminals in library is less than or equal to the diameter of base station range;When mobile base When information of standing is inconsistent, Dist is more than the diameter of base station range.According to current experience, the covering of common Wi-Fi emission sources Ranging from 50m, a diameter of 100m of coverage area;Base station range is 300m, a diameter of 600m of coverage area.Make It is in the present embodiment, identical when being not present in the record of record and present terminal in database for concrete implementation mode MAC Address, and the base station LAC and base station CID of mobile base station information are consistent, then Dist is 100-600m;Work as server data Record in library and identical MAC Address, and the base station LAC and base of mobile base station information are not present in the record of present terminal The CID that stands is inconsistent, then Dist is more than 600m;
(3) result of calculation in step (2) is transmitted to the present terminal by the server;
(4) if dissatisfied to result, the present terminal can refresh again, search again for and calculate.
In the following, as shown in fig. 7, being obtained to the distance based on Wi-Fi by taking 4 Wi-Fi emission sources, 2 mobile base stations as an example Method is further described.Wherein, 4 Wi-Fi emission sources are denoted as MAC1, MAC2, MAC3, MAC4 respectively, described in 2 Mobile base station is denoted as (LAC1, CID1), (LAC2, CID2) respectively.Assuming that the note that 4 terminals are formed within the same period Record, the time is denoted as T1, T2, T3, T4 respectively, and the time difference between T1, T2, T3, T4 is not more than time threshold T0.It is formed Record it is as follows:
Record1:T1+LAC1+CID1+MAC2+MAC3
Record2:T2+LAC1+CID1+MAC1+MAC2+MAC3
Record3:T3+LAC2+CID2+MAC4
Record4:T4+LAC1+CID1+MAC1+MAC3
The present embodiment based on Wi-Fi apart from acquisition methods, specifically include following steps:
(1) after first terminal (i.e. present terminal, similarly hereinafter) opens Wi-Fi, the Wi-Fi around acquisition emits source information in real time With mobile base station information, in addition time stamp T 1, is denoted as " Record1:
T1+LAC1+CID1+MAC2+MAC3 ", and to the server transport data;
(2) after server receives the data of the first terminal, according to the data, when searching out this in its database Between record Record2, Record3, Record4 in section, calculate separately the first terminal in server database The distance of the corresponding second terminals of Record2, at a distance from the corresponding third terminals of Record3 in server database, with The distance of corresponding 4th terminals of Record4 in server database;
The calculating of the first terminal and the second terminal distance Dist1:
Due in the record of the first terminal and the second terminal there are identical MAC Address, according to formula Dist=Dsim-min+pdif-new*(Dsim-max-Dsim-min) calculate;
Wherein, the Dsim-minRefer to the data to the server transport of the second terminal and the first terminal In the record of composition, in the corresponding distance range of ratio shared by identical MAC Address apart from minimum value;The Dsim-maxRefer to In the record of the second terminal and the first terminal, in the corresponding distance range of ratio shared by identical MAC Address away from From maximum value;The Pdif-newRefer in the record according to the second terminal and the first terminal, shared by different MAC Address The obtained weight factor of ratiometric conversion.
The Pdif-newAccording to formulaIt is calculated;Wherein, the PdifRefer to described Different MAC Address ratio shared in being recorded at two in the record of second terminal and the first terminal;The pdif-minIt is Refer to and the range of 0-100% be divided into 4 sections, respectively (0,20%), (20%, 40%), (40%, 80%), (80%, 1), The PdifMinimum value in the interval range at place;The pdif-maxRefer to the PdifMaximum in the interval range at place Value.
The PdifAccording to formulaIt is calculated;
Wherein, the MacNum refers to the number of second terminal MAC Address identical with the record of first terminal;M It is respectively the number of the record and MAC Address in the record of the first terminal of the second terminal with N.
The Dsim-minAnd Dsim-maxPass through DsimIt is calculated;The DsimRefer to the second terminal and described first In the record of terminal, the corresponding distance range of ratio shared by identical MAC Address;Its calculation is:According to formulaCalculate the ratio shared by identical MAC Address in the record of the second terminal and the first terminal Psim, wherein min (N, M) refers to the smaller value taken in N and M;Work as PsimWhen >=80%, DsimTake 10-30m;As 40%≤Psim< When 80%, DsimTake 30-50m;As 20%≤PsimWhen < 40%, DsimTake 50-70m;As 0 < PsimWhen < 20%, DsimTake 70- 100m。
Calculating process is as follows:
Thus, the DsimFor 10-30m.
Dist=Dsim-min+pdif-new*(Dsim-max-Dsim-min)=10+66.7% (30-10)=23.3 (m)
The first terminal and the third terminal distance Dist2Calculating:Due to the first terminal and the third Identical MAC Address is not present in the record of terminal, and the base station LAC and base station CID of dynamic base station information are inconsistent, then Dist To be more than 600m, not nearby region;
The first terminal can similarly be calculated at a distance from the 4th terminal;
(3) result of calculation in step 2) is transmitted to terminal by server;
(4) if dissatisfied to result, the present terminal can refresh again, search again for and calculate.
As shown in figure 4, the embodiment of the present invention four additionally provides a kind of electronic equipment, including:Processor 41, memory 42, Communication interface 43 and bus 44.The processor 41, the memory 42 and the communication interface 43 are connected by the bus And complete mutual communication;The memory 42 stores executable program code;The processor is by reading the storage The executable program code stored in device runs program corresponding with the executable program code, for:
Obtain all Wi-Fi transmittings source information/and mobile base station information and preset time threshold in unicom region;
The distance for receiving first terminal obtains request;The distance obtains request:The first terminal time letter Breath and its collected Wi-Fi transmittings source information/and mobile base station information;
The temporal information is sent out in the time threshold effective range according to the collected Wi-Fi of the first terminal Penetrate in source information/and mobile base station information, with the unicom region all Wi-Fi transmitting source information/and mobile base station information into Row matching, obtains the terminal distance to match with the first terminal.
The electronic equipment exists in a variety of forms, including but not limited to:
Server:The equipment for providing the service of calculating, the composition of server includes processor, hard disk, memory, system bus Deng, server is similar with general computer architecture, but due to needing to provide highly reliable service, processing capacity, Stability, reliability, safety, scalability, manageability etc. are more demanding.
The terminal that technical solution of the present invention uses not carries out the accurate of physics absolute position apart from acquisition methods to terminal Positioning, but source information/and mobile base station information and time threshold are emitted by all Wi-Fi in unicom region, eventually with first The distance at end obtain the first terminal temporal information carried in request and its collected Wi-Fi transmittings source information/and Mobile base station information is matched, and so as to get the terminal distance to match with the first terminal, that is, gets week Enclose the distance between the other-end to match with the first terminal and described first terminal.The use of technical solution of the present invention Range can be outdoor indoors, and without carrying out any transformation to terminal, using simple, convenient, fast, also, orientation range It is small to 10m, it can be achieved that higher positioning accuracy greatly to hundreds of meters, and technical solution of the present invention need to only be done simply in server end Calculating can show that the first terminal at a distance from other-end, avoids a large amount of calculating, simplify the process of positioning, Also ensure positioning accuracy simultaneously.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in a computer read/write memory medium In, the program is when being executed, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, all answer by the change or replacement that can be readily occurred in It is included within the scope of the present invention.Therefore, protection scope of the present invention should be subject to the protection scope in claims.

Claims (24)

1. it is a kind of based on Wi-Fi apart from acquisition methods, which is characterized in that including:
The distance that second terminal receives first terminal obtains request;The distance obtains request:When the first terminal Between information and its collected Wi-Fi transmitting source information/and mobile base station information;
The second terminal obtains the Wi-Fi transmittings source information/and mobile base station information and preset time threshold of its own;
For the temporal information in the time threshold effective range, the second terminal is collected by the first terminal Wi-Fi emits source information/and mobile base station information, emits source information/and the progress of mobile base station information with the Wi-Fi of its own Match, distance range corresponding with matching result is obtained based on matching result, matches with the first terminal to acquisition Terminal distance;
The Wi-Fi transmittings source packet includes:The collected Wi-Fi access points MAC Address set of first terminal, Ge Gejie Neighborhood between access point signals intensity set and each access point.
2. according to the method described in claim 1, it is characterized in that, the mobile base station information include at least base station LAC and Base station CID.
3. according to the method described in claim 2, it is characterized in that, the terminal that matches with the first terminal of the acquisition away from From the step of specifically include:
When record and the first terminal in the second terminal database are to obtaining and ask at a distance from second terminal transmission Ask data constitute record in there are identical MAC Address, then according to formula Dist=Dsim-min+Pdif-new*(Dsim-max- Dsim-min) calculate the terminal to match with the first terminal of the first terminal and the second terminal data-base recording away from From Dist
The Dsim-minRefer to that recording in the second terminal database sends with the first terminal to the second terminal Distance obtains in the record that request data is constituted, with the distance in the corresponding distance range of ratio shared by identical MAC Address Minimum value;The Dsim-maxRefer to that record in the second terminal database is sent out with the first terminal to the second terminal The distance sent obtains in the record that request data is constituted, in the corresponding distance range of ratio shared by identical MAC Address Apart from maximum value;The Pdif-newRefer to according to record and the first terminal in the second terminal database to described the The distance that two terminals are sent obtains in the record of data composition of request, is obtained with the ratiometric conversion shared by different MAC Address Weight factor;
It is asked when the record in the database of second terminal is sent to obtain at a distance from the second terminal with the first terminal When identical MAC Address being not present in the record that data are constituted, then the first terminal and other matched terminals Mobile base station information base station LAC and base station CID it is whether consistent;When the mobile base station information is consistent, described first Terminal records corresponding Wi-Fi terminals distance D with the second terminal databaseistModel is covered less than or equal to base station The diameter enclosed;When the mobile base station information is inconsistent, then it is more than the diameter of base station range.
4. according to the method described in claim 3, which is characterized in that the Pdif-newAccording to formulaIt is calculated;
Wherein, the PdifRefer to record MACs different from the record of the first terminal in the second terminal database Location ratio shared in being recorded at two;The Pdif-minRefer to that the range of 0-100% is divided into several sections, the Pdif Minimum value in the interval range at place;The Pdif-maxRefer to the PdifMaximum value in the interval range at place.
5. according to the method described in claim 4, which is characterized in that the PdifAccording to formulaIt is calculated;
Wherein, the MacNum refers to that the record in the second terminal database is identical with the record of the first terminal The number of MAC Address;M and N be respectively record in the second terminal database with MAC in the record of the first terminal The number of location.
6. the method described according to claim 4 or 5, which is characterized in that the range of 0-100% is divided into 4 sections:(0, 20%), (20%, 40%), (40%, 80%), (80%, 1), work as PdifWhen falling into wherein some section, the Pdif-minWith The Pdif-maxIt is the minimum value and maximum value in this section represented.
7. according to the method described in claim 6, it is characterized in that, the Dsim-minAnd Dsim-maxBy calculating DsimIt obtains; The DsimRefer to recording in the record with the first terminal in the second terminal database, shared by identical MAC Address The corresponding distance range of ratio, the Dsim-minAnd Dsim-maxThe minimum value and maximum value in this section represented;
Its calculation is:According to formulaCalculate record in the second terminal database and described the Ratio P in the record of one terminal shared by identical MAC Addresssim, wherein min (N, M) refers to the smaller value taken in the N and M; Work as PsimWhen >=80%, DsimTake 10-30m;As 40%≤PsimWhen < 80%, DsimTake 30-50m;As 20%≤Psim< 40% When, DsimTake 50-70m;As 0 < PsimWhen < 20%, DsimTake 70-100m;PsimWhen=0, Dsim> 100m, then DistIt is more than 100m。
8. the method according to the description of claim 7 is characterized in that working as the record in second terminal database and first end Identical MAC Address is not present in the record at end, and the base station LAC and base station CID of mobile base station information are consistent, then DistGreatly In 100m;When identical MAC Address, and mobile base are not present in the record of record and first terminal in second terminal database The base station LAC and base station CID for information of standing are inconsistent, then DistTo be more than 600m.
9. a kind of terminal, which is characterized in that including:
Request reception unit, the distance for receiving first terminal obtain request;The distance obtains request:Described One terminal time information and its collected Wi-Fi transmittings source information/and mobile base station information;
Information acquisition unit emits source information/and mobile base station information and preset time threshold for obtaining the Wi-Fi of its own Value;
Distance acquiring unit, for the temporal information in the time threshold effective range, the terminal is by described first The collected Wi-Fi transmittings source information/of terminal and mobile base station information, emit source information/and mobile base with the Wi-Fi of its own Information of standing is matched, and distance range corresponding with matching result is obtained based on matching result, to obtain and described first The terminal distance that terminal matches;
The Wi-Fi transmittings source packet includes:The collected Wi-Fi access points MAC Address set of first terminal, Ge Gejie Neighborhood between access point signals intensity set and each access point.
10. terminal according to claim 9, which is characterized in that the mobile base station information include at least base station LAC and Base station CID.
11. terminal according to claim 10, which is characterized in that the distance acquiring unit is further used for:
When in the terminal database record with the first terminal to the terminal send at a distance from acquisition request data structure At record in there are identical MAC Address, then according to formula Dist=Dsim-min+Pdif-new*(Dsim-max-Dsim-min) calculate institute State the terminal distance D of first terminal and terminal database record to match with the first terminalist;The Dsim-min Refer to that recording in the terminal database is constituted with the first terminal to acquisition request data at a distance from terminal transmission Record in, in the corresponding distance range of ratio shared by identical MAC Address apart from minimum value;The Dsim-maxRefer to The note that record in the terminal database is constituted with the first terminal to acquisition request data at a distance from terminal transmission In record, in the corresponding distance range of ratio shared by identical MAC Address apart from maximum value;The Pdif-newIt refer to basis What the record in the terminal database was constituted with the first terminal to the data of acquisition request at a distance from terminal transmission In record, there is the weight factor that the ratiometric conversion shared by different MAC Address obtains;
Request data is obtained when the record in the database of the terminal is sent to the first terminal at a distance from the terminal When identical MAC Address being not present in the record of composition, then the shifting of the first terminal and other matched terminals Whether the base station LAC and base station CID of dynamic base station information are consistent;When the mobile base station information is consistent, the first terminal Corresponding Wi-Fi terminals distance D is recorded with the terminal databaseistLess than or equal to the diameter of base station range; When the mobile base station information is inconsistent, then it is more than the diameter of base station range.
12. it is a kind of based on Wi-Fi apart from acquisition methods, which is characterized in that including:
Server obtains all Wi-Fi transmittings source information/and mobile base station information and preset time threshold in unicom region;
The distance for receiving first terminal obtains request;The distance obtains request:The first terminal temporal information with And its collected Wi-Fi emits source information/and mobile base station information;
The temporal information is in the time threshold effective range, and server is according to the collected Wi-Fi of the first terminal Emit all Wi-Fi transmitting source information/and mobile base station information in source information/and mobile base station information, with the unicom region It is matched, distance range corresponding with matching result is obtained based on matching result, to obtain and the first terminal phase Matched terminal distance;
All Wi-Fi transmittings source packets include in the unicom region:All collected Wi-Fi accesses in the unicom region Point MAC Address set, neighborhood between each access point signals intensity set and each access point;The mobile base station information is extremely Include base station LAC and base station CID less.
13. according to the method for claim 12, which is characterized in that the method further includes:
It is pre-configured all Wi-Fi in time threshold and the unicom region and emits source information;
Receive the temporal information and its collected Wi-Fi transmittings source information that each terminal uploads in the unicom region;Institute Wi-Fi transmittings source information is stated to include at least:The collected Wi-Fi access points MAC Address set of terminal.
14. according to the method for claim 13, which is characterized in that the terminal that the acquisition matches with the first terminal Apart from the step of further include specifically:
When the record that the record in the server database is constituted with the data that the first terminal is uploaded to the server In there are identical MAC Address, then according to formula Dist=Dsim-min+Pdif-new*(Dsim-max-Dsim-min) calculate described first eventually The terminal distance D to match with the first terminal at end and server database recordist
The Dsim-minRefer to the data that the record in the server database is uploaded with the first terminal to the server In the record of composition, in the corresponding distance range of ratio shared by identical MAC Address apart from minimum value;The Dsim-max Refer to recording in the record that the data uploaded to the server with the first terminal are constituted in the server database, With in the corresponding distance range of ratio shared by identical MAC Address apart from maximum value;The Pdif-newRefer to according to In the record that record in server database is constituted with the data that the first terminal is uploaded to the server, there is difference The weight factor that ratiometric conversion shared by MAC Address obtains;
When in the record of data composition that the record in the database of server is uploaded to the server with the first terminal There is no when identical MAC Address, then the first terminal and the mobile base station information of other matched terminals Whether base station LAC and base station CID are consistent;When the mobile base station information is consistent, the first terminal and the server The distance D for recording corresponding Wi-Fi terminals of databaseistLess than or equal to the diameter of base station range;When the movement When base station information is inconsistent, then it is more than the diameter of base station range.
15. according to the method described in claim 14, which is characterized in that the Pdif-newAccording to formulaIt is calculated;
Wherein, the PdifIt refer to the record MAC Address different from the record of the first terminal in the server database Shared ratio in being recorded at two;The Pdif-minRefer to that the range of 0-100% is divided into several sections, the PdifInstitute Interval range in minimum value;The Pdif-maxRefer to the PdifMaximum value in the interval range at place.
16. according to the method described in claim 15, which is characterized in that the PdifAccording to formulaIt is calculated;
Wherein, the MacNum refers to the record MAC identical with the record of the first terminal in the server database The number of address;M and N is respectively the record in the server database and MAC Address in the record of the first terminal Number.
17. the method according to claim 15 or 16, which is characterized in that the range of 0-100% is divided into 4 sections: (0,20%), (20%, 40%), (40%, 80%), (80%, 1), work as PdifIt is described when falling into wherein some section Pdif-minWith the Pdif-maxIt is the minimum value and maximum value in this section represented.
18. according to the method for claim 17, which is characterized in that the Dsim-minAnd Dsim-maxBy calculating Dsim It arrives;The DsimRefer to recording in the record with the first terminal in the server database, shared by identical MAC Address The corresponding distance range of ratio, the Dsim-minAnd Dsim-maxThe minimum value and maximum value in this section represented;
Its calculation is:According to formulaCalculate the record and described first in the server database Ratio P in the record of terminal shared by identical MAC Addresssim, wherein min (N, M) refers to the smaller value taken in the N and M;When PsimWhen >=80%, DsimTake 10-30m;As 40%≤PsimWhen < 80%, DsimTake 30-50m;As 20%≤PsimWhen < 40%, DsimTake 50-70m;As 0 < PsimWhen < 20%, DsimTake 70-100m;PsimWhen=0, Dsim> 100m, then DistMore than 100m.
19. according to the method for claim 18, which is characterized in that when in server database record with it is described first eventually Identical MAC Address is not present in the record at end, and the base station LAC and base station CID of mobile base station information are consistent, then DistGreatly In 100m;When identical MAC Address, and mobile base station are not present in the record of record and first terminal in server database The base station LAC and base station CID of information are inconsistent, then DistTo be more than 600m.
20. a kind of server, which is characterized in that including:
Information acquisition unit, for obtain in unicom region all Wi-Fi transmitting source information/and mobile base station information and it is default when Between threshold value;
Request reception unit, the distance for receiving first terminal obtain request;The distance obtains request:Described One terminal time information and its collected Wi-Fi transmittings source information/and mobile base station information;
Distance acquiring unit, for the temporal information in the time threshold effective range, server is according to described first All Wi-Fi emission sources letters in the collected Wi-Fi transmittings source information/of terminal and mobile base station information, with the unicom region Breath/and mobile base station information are matched, and distance range corresponding with matching result are obtained based on matching result, to obtain The terminal distance to match with the first terminal;
All Wi-Fi transmittings source packets include in the unicom region:All collected Wi-Fi accesses in the unicom region Point MAC Address set, neighborhood between each access point signals intensity set and each access point;The mobile base station information is extremely Include base station LAC and base station CID less.
21. server according to claim 20, which is characterized in that further include:
It is pre-configured unit, emits source information for being pre-configured all Wi-Fi in time threshold and the unicom region;
Information receiving unit, for receiving each terminal uploads in the unicom region temporal information and its is collected Wi-Fi emits source information;The Wi-Fi transmittings source information includes at least:The collected Wi-Fi access points MAC of terminal Gather location.
22. server according to claim 21, which is characterized in that the distance acquiring unit is specifically used for working as the clothes There are identical in the record that record in business device database is constituted with the data that the first terminal is uploaded to the server MAC Address, then according to formula Dist=Dsim-min+Pdif-new*(Dsim-max-Dsim-min) calculate the first terminal and the service The terminal distance D of device data-base recording to match with the first terminalist;The Dsim-minIt refer to the server data In the record that record in library is constituted with the data that the first terminal is uploaded to the server, there is identical MAC Address institute In the corresponding distance range of ratio accounted for apart from minimum value;The Dsim-maxRefer to record in the server database with In the record that the data that the first terminal is uploaded to the server are constituted, corresponded to the ratio shared by identical MAC Address Distance range in apart from maximum value;The Pdif-newRefer to according to the record and described first in the server database In the record that the data that terminal is uploaded to the server are constituted, there is the power that the ratiometric conversion shared by different MAC Address obtains Repeated factor;
When in the record of data composition that the record in the database of server is uploaded to the server with the first terminal There is no when identical MAC Address, then the first terminal and the mobile base station information of other matched terminals Whether base station LAC and base station CID are consistent;
When the mobile base station information is consistent, the first terminal records corresponding Wi-Fi with the server database The distance D of terminalistLess than or equal to the diameter of base station range;When the mobile base station information is inconsistent, then it is more than The diameter of base station range.
23. a kind of distance based on Wi-Fi obtains system, which is characterized in that the system includes:At least one terminal and such as right It is required that any one of 20 to 22 servers;
The terminal, for acquiring Wi-Fi transmittings source information/and mobile base station information in real time, and in real time will be described collected Wi-Fi emits source information, and mobile base station information and its corresponding temporal information upload to the server;
The server, for storing the Wi-Fi transmittings source information/and mobile base station information, temporal information that the terminal uploads, Also, the temporal information, in the time threshold effective range, server emits according to the collected Wi-Fi of the terminal All Wi-Fi transmitting source information/and mobile base station information carry out in source information/and mobile base station information, with the unicom region Matching obtains distance range corresponding with matching result based on matching result, to obtain the end to match with the terminal Hold distance.
24. a kind of electronic equipment, which is characterized in that including:Processor, memory, communication interface and bus;
The processor, the memory are connected by the bus with the communication interface and complete mutual communication;
The memory stores executable program code;
The processor is run and the executable program by reading the executable program code stored in the memory The corresponding program of code, for:
Obtain all Wi-Fi transmittings source information/and mobile base station information and preset time threshold in unicom region;
The distance for receiving first terminal obtains request;The distance obtains request:The first terminal temporal information with And its collected Wi-Fi emits source information/and mobile base station information;
The temporal information is in the time threshold effective range, according to the collected Wi-Fi emission sources of the first terminal All Wi-Fi transmitting source information/and the progress of mobile base station information in information/and mobile base station information, with the unicom region Match, distance range corresponding with matching result is obtained based on matching result, matches with the first terminal to acquisition Terminal distance;
All Wi-Fi transmittings source packets include in the unicom region:All collected Wi-Fi accesses in the unicom region Point MAC Address set, neighborhood between each access point signals intensity set and each access point;The mobile base station information is extremely Include base station LAC and base station CID less.
CN201610320004.7A 2016-05-13 2016-05-13 Based on Wi-Fi apart from acquisition methods, terminal, system, server and electronic equipment Active CN106028282B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610320004.7A CN106028282B (en) 2016-05-13 2016-05-13 Based on Wi-Fi apart from acquisition methods, terminal, system, server and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610320004.7A CN106028282B (en) 2016-05-13 2016-05-13 Based on Wi-Fi apart from acquisition methods, terminal, system, server and electronic equipment

Publications (2)

Publication Number Publication Date
CN106028282A CN106028282A (en) 2016-10-12
CN106028282B true CN106028282B (en) 2018-07-24

Family

ID=57096837

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610320004.7A Active CN106028282B (en) 2016-05-13 2016-05-13 Based on Wi-Fi apart from acquisition methods, terminal, system, server and electronic equipment

Country Status (1)

Country Link
CN (1) CN106028282B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113365216B (en) * 2021-04-19 2023-04-07 杭州羿腾科技有限公司 Tracking early warning method, system and equipment
CN113840235B (en) * 2021-08-04 2024-05-07 杭州羿腾科技有限公司 Accurate information interaction method, system and terminal in near field range

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932734A (en) * 2012-09-28 2013-02-13 腾讯科技(深圳)有限公司 Method, device and system for determining distance between terminals
CN103581828A (en) * 2013-11-14 2014-02-12 三星电子(中国)研发中心 Method for inquiring nearby mobile terminals, server and system
CN103906226A (en) * 2012-12-26 2014-07-02 中国电信股份有限公司 Adjacent terminal discovery method and device, terminal and server

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9400321B2 (en) * 2013-06-05 2016-07-26 Apple Inc. Utilizing mobile wireless access gateways for location and context purposes

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932734A (en) * 2012-09-28 2013-02-13 腾讯科技(深圳)有限公司 Method, device and system for determining distance between terminals
CN103906226A (en) * 2012-12-26 2014-07-02 中国电信股份有限公司 Adjacent terminal discovery method and device, terminal and server
CN103581828A (en) * 2013-11-14 2014-02-12 三星电子(中国)研发中心 Method for inquiring nearby mobile terminals, server and system

Also Published As

Publication number Publication date
CN106028282A (en) 2016-10-12

Similar Documents

Publication Publication Date Title
CN106019218B (en) Terminal relative distance acquisition methods and the terminal that relative distance can be obtained
CN104507162B (en) Bluetooth beacon data service system based on binding relationship
US9538325B2 (en) Rotation based alignment of a group of wireless tags
US9390302B2 (en) Location measurments using a mesh of wireless tags
CN104798419B (en) Geographic location signal fingerprint recognition
Jiménez et al. Finding objects using UWB or BLE localization technology: A museum-like use case
US20120270573A1 (en) Positioning system and method for single and multilevel structures
CN107223356A (en) The distribution and utilization of the aerial information of operation are determined for position
CN107678051A (en) The method and relevant device of a kind of positioning
CN103995251A (en) Positioning system and method of indoor mobile device
CN107251586A (en) The distribution and utilization of the aerial information of operation are determined for position
Antevski et al. A hybrid BLE and Wi-Fi localization system for the creation of study groups in smart libraries
CN102595592A (en) Indoor positioning method for goal nodes of mobile social network
CN103945526B (en) Based on the wireless device localization method and system that induce Detection Techniques
CN104239453B (en) Data processing method and device
Papandrea et al. Proximity marketing solution tailored to user needs
CN104978427A (en) Method for displaying air quality information in real time on network map and air quality information system
CN106028282B (en) Based on Wi-Fi apart from acquisition methods, terminal, system, server and electronic equipment
Alexandr et al. Comparative analysis of indoor positioning methods based on the wireless sensor network of bluetooth low energy beacons
Kuo et al. The NTP experimental platform for heterogeneous wireless sensor networks
Moen et al. The potential for location-based services with wi-fi rfid tags in citywide wireless networks
Kaji et al. Multi-algorithm on-site evaluation system for PDR challenge
Carlin et al. An active low cost mesh networking indoor tracking system
KR101667211B1 (en) Method and mobile device for localizing indoor using virtual access point and access point
CN203951496U (en) A kind of indoor locating system based on WIFI

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant